2015-02-05 21:33:57 -05:00
|
|
|
import {int, isBlank} from 'angular2/src/facade/lang';
|
2015-02-27 17:50:06 -05:00
|
|
|
import {DOM} from 'angular2/src/dom/dom_adapter';
|
2015-02-05 21:33:57 -05:00
|
|
|
import {MapWrapper} from 'angular2/src/facade/collection';
|
|
|
|
|
|
|
|
import {Parser, Lexer, ChangeDetector, ChangeDetection}
|
|
|
|
from 'angular2/change_detection';
|
2015-02-16 08:55:00 -05:00
|
|
|
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
|
2015-02-13 20:30:56 -05:00
|
|
|
import {
|
2015-04-09 15:20:11 -04:00
|
|
|
bootstrap, Component, Viewport, View, ViewContainer, Compiler, onChange, NgElement, Decorator
|
2015-02-13 20:30:56 -05:00
|
|
|
} from 'angular2/angular2';
|
2015-03-11 14:57:21 -04:00
|
|
|
import {reflector} from 'angular2/src/reflection/reflection';
|
2015-04-09 20:53:36 -04:00
|
|
|
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
|
2015-02-05 21:33:57 -05:00
|
|
|
import {CompilerCache} from 'angular2/src/core/compiler/compiler';
|
|
|
|
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
|
2015-04-07 23:54:20 -04:00
|
|
|
import {ShadowDomStrategy} from 'angular2/src/render/dom/shadow_dom/shadow_dom_strategy';
|
|
|
|
import {NativeShadowDomStrategy} from 'angular2/src/render/dom/shadow_dom/native_shadow_dom_strategy';
|
|
|
|
import {EmulatedUnscopedShadowDomStrategy} from 'angular2/src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy';
|
2015-04-02 17:40:49 -04:00
|
|
|
import {TemplateLoader} from 'angular2/src/render/dom/compiler/template_loader';
|
2015-02-12 08:44:59 -05:00
|
|
|
import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver';
|
2015-02-05 21:33:57 -05:00
|
|
|
import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle';
|
2015-04-02 12:52:00 -04:00
|
|
|
import {XHR} from 'angular2/src/services/xhr';
|
|
|
|
import {XHRImpl} from 'angular2/src/services/xhr_impl';
|
|
|
|
import {UrlResolver} from 'angular2/src/services/url_resolver';
|
2015-04-02 17:40:49 -04:00
|
|
|
import {StyleUrlResolver} from 'angular2/src/render/dom/shadow_dom/style_url_resolver';
|
2015-02-24 10:05:45 -05:00
|
|
|
import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper';
|
2015-04-02 17:40:49 -04:00
|
|
|
import {StyleInliner} from 'angular2/src/render/dom/shadow_dom/style_inliner';
|
2015-04-06 16:19:30 -04:00
|
|
|
import {DynamicComponentLoader} from 'angular2/src/core/compiler/dynamic_component_loader';
|
2015-03-23 19:46:18 -04:00
|
|
|
import {TestabilityRegistry, Testability} from 'angular2/src/core/testability/testability';
|
2015-02-05 21:33:57 -05:00
|
|
|
|
2015-03-13 19:22:01 -04:00
|
|
|
import {If, For} from 'angular2/directives';
|
2015-04-09 20:53:36 -04:00
|
|
|
import {App} from './app';
|
|
|
|
import {ScrollAreaComponent} from './scroll_area';
|
|
|
|
import {ScrollItemComponent} from './scroll_item';
|
2015-02-05 21:33:57 -05:00
|
|
|
import {CompanyNameComponent, OpportunityNameComponent, OfferingNameComponent,
|
2015-04-09 20:53:36 -04:00
|
|
|
AccountCellComponent, StageButtonsComponent, FormattedCellComponent}
|
2015-02-05 21:33:57 -05:00
|
|
|
from './cells';
|
|
|
|
|
2015-04-02 12:52:00 -04:00
|
|
|
import {EventManager} from 'angular2/src/render/dom/events/event_manager';
|
2015-04-07 23:54:20 -04:00
|
|
|
import {ViewFactory, VIEW_POOL_CAPACITY} from 'angular2/src/core/compiler/view_factory';
|
|
|
|
import {ProtoViewFactory} from 'angular2/src/core/compiler/proto_view_factory';
|
|
|
|
import {Renderer} from 'angular2/src/render/api';
|
|
|
|
import {DirectDomRenderer} from 'angular2/src/render/dom/direct_dom_renderer';
|
|
|
|
import * as rc from 'angular2/src/render/dom/compiler/compiler';
|
|
|
|
import * as rvf from 'angular2/src/render/dom/view/view_factory';
|
2015-04-09 20:53:36 -04:00
|
|
|
import {Inject, bind} from 'angular2/di';
|
2015-03-24 05:19:05 -04:00
|
|
|
|
2015-02-05 21:33:57 -05:00
|
|
|
export function main() {
|
|
|
|
setupReflector();
|
2015-04-09 20:53:36 -04:00
|
|
|
bootstrap(App, createBindings());
|
2015-02-05 21:33:57 -05:00
|
|
|
}
|
|
|
|
|
2015-04-09 20:53:36 -04:00
|
|
|
function createBindings():List {
|
|
|
|
return [bind(VIEW_POOL_CAPACITY).toValue(100000)];
|
|
|
|
}
|
2015-02-05 21:33:57 -05:00
|
|
|
|
2015-04-09 20:53:36 -04:00
|
|
|
export function setupReflector() {
|
|
|
|
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
2015-02-05 21:33:57 -05:00
|
|
|
|
2015-04-09 20:53:36 -04:00
|
|
|
// TODO(kegluneq): Generate this.
|
2015-02-05 21:33:57 -05:00
|
|
|
reflector.registerSetters({
|
|
|
|
'style': (o, m) => {
|
|
|
|
//if (isBlank(m)) return;
|
|
|
|
// HACK
|
|
|
|
MapWrapper.forEach(m, function(v, k) {
|
|
|
|
o.style.setProperty(k, v);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
reflector.registerMethods({
|
|
|
|
'onScroll': (o, args) => {
|
|
|
|
// HACK
|
|
|
|
o.onScroll(args[0]);
|
|
|
|
},
|
|
|
|
'setStage': (o, args) => o.setStage(args[0])
|
|
|
|
});
|
|
|
|
}
|