From 4f56628566e24bf9a7d5d5267a2a79614d35af75 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 2 Apr 2015 09:52:00 -0700 Subject: [PATCH] refactor(render): move services to right location core/compiler/events -> render/dom/events core/compiler/url_resolver -> services/url_resolver core/compiler/xhr/* -> services/* --- modules/angular2/src/core/application.js | 10 +++++----- modules/angular2/src/core/compiler/compiler.js | 2 +- .../src/core/compiler/private_component_loader.js | 2 +- .../core/compiler/private_component_location.js | 2 +- .../angular2/src/core/compiler/style_inliner.js | 4 ++-- .../src/core/compiler/style_url_resolver.js | 2 +- .../angular2/src/core/compiler/template_loader.js | 4 ++-- modules/angular2/src/core/compiler/view.js | 14 +++++++------- .../angular2/src/core/compiler/view_container.js | 4 ++-- modules/angular2/src/mock/xhr_mock.js | 2 +- .../{core => render/dom}/events/event_manager.js | 0 .../{core => render/dom}/events/hammer_common.js | 0 .../dom}/events/hammer_gestures.dart | 2 +- .../dom}/events/hammer_gestures.es6 | 0 .../angular2/src/render/dom/view/view_factory.js | 2 +- .../{core/compiler => services}/url_resolver.js | 0 .../src/{core/compiler/xhr => services}/xhr.js | 0 .../{core/compiler/xhr => services}/xhr_impl.dart | 0 .../{core/compiler/xhr => services}/xhr_impl.es6 | 0 modules/angular2/src/test_lib/test_injector.js | 4 ++-- .../test/core/compiler/compiler_common_tests.js | 2 +- .../test/core/compiler/integration_spec.js | 4 ++-- .../shadow_dom_emulation_integration_spec.js | 2 +- .../test/core/compiler/shadow_dom_strategy_spec.js | 4 ++-- .../test/core/compiler/style_inliner_spec.js | 2 +- .../test/core/compiler/style_url_resolver_spec.js | 2 +- .../test/core/compiler/template_loader_spec.js | 2 +- modules/angular2/test/core/compiler/view_spec.js | 2 +- modules/angular2/test/directives/if_spec.js | 2 +- .../angular2/test/directives/non_bindable_spec.js | 2 +- modules/angular2/test/directives/switch_spec.js | 2 +- modules/angular2/test/forms/integration_spec.js | 4 ++-- .../dom}/events/event_manager_spec.js | 2 +- .../compiler => services}/url_resolver_spec.js | 2 +- .../benchmarks/src/compiler/compiler_benchmark.js | 2 +- .../src/largetable/largetable_benchmark.js | 8 ++++---- .../benchmarks/src/naive_infinite_scroll/index.js | 8 ++++---- modules/benchmarks/src/tree/tree_benchmark.js | 8 ++++---- modules/examples/src/hello_world/index_static.js | 8 ++++---- 39 files changed, 61 insertions(+), 61 deletions(-) rename modules/angular2/src/{core => render/dom}/events/event_manager.js (100%) rename modules/angular2/src/{core => render/dom}/events/hammer_common.js (100%) rename modules/angular2/src/{core => render/dom}/events/hammer_gestures.dart (97%) rename modules/angular2/src/{core => render/dom}/events/hammer_gestures.es6 (100%) rename modules/angular2/src/{core/compiler => services}/url_resolver.js (100%) rename modules/angular2/src/{core/compiler/xhr => services}/xhr.js (100%) rename modules/angular2/src/{core/compiler/xhr => services}/xhr_impl.dart (100%) rename modules/angular2/src/{core/compiler/xhr => services}/xhr_impl.es6 (100%) rename modules/angular2/test/{core => render/dom}/events/event_manager_spec.js (99%) rename modules/angular2/test/{core/compiler => services}/url_resolver_spec.js (96%) diff --git a/modules/angular2/src/core/application.js b/modules/angular2/src/core/application.js index fb1e29215e..41e7e4009f 100644 --- a/modules/angular2/src/core/application.js +++ b/modules/angular2/src/core/application.js @@ -15,13 +15,13 @@ import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; import {VmTurnZone} from 'angular2/src/core/zone/vm_turn_zone'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; import {ShadowDomStrategy, NativeShadowDomStrategy, EmulatedUnscopedShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; -import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl'; -import {EventManager, DomEventsPlugin} from 'angular2/src/core/events/event_manager'; -import {HammerGesturesPlugin} from 'angular2/src/core/events/hammer_gestures'; +import {XHR} from 'angular2/src/services/xhr'; +import {XHRImpl} from 'angular2/src/services/xhr_impl'; +import {EventManager, DomEventsPlugin} from 'angular2/src/render/dom/events/event_manager'; +import {HammerGesturesPlugin} from 'angular2/src/render/dom/events/hammer_gestures'; import {Binding} from 'angular2/src/di/binding'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/src/core/compiler/compiler.js b/modules/angular2/src/core/compiler/compiler.js index aeebee1a5b..f97982c298 100644 --- a/modules/angular2/src/core/compiler/compiler.js +++ b/modules/angular2/src/core/compiler/compiler.js @@ -16,7 +16,7 @@ import {Template} from '../annotations/template'; import {ShadowDomStrategy} from './shadow_dom_strategy'; import {CompileStep} from './pipeline/compile_step'; import {ComponentUrlMapper} from './component_url_mapper'; -import {UrlResolver} from './url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {CssProcessor} from './css_processor'; /** diff --git a/modules/angular2/src/core/compiler/private_component_loader.js b/modules/angular2/src/core/compiler/private_component_loader.js index 8352c3062b..6fef306425 100644 --- a/modules/angular2/src/core/compiler/private_component_loader.js +++ b/modules/angular2/src/core/compiler/private_component_loader.js @@ -1,6 +1,6 @@ import {Compiler} from './compiler'; import {ShadowDomStrategy} from './shadow_dom_strategy'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {Component} from 'angular2/src/core/annotations/annotations'; import {PrivateComponentLocation} from './private_component_location'; diff --git a/modules/angular2/src/core/compiler/private_component_location.js b/modules/angular2/src/core/compiler/private_component_location.js index 690e6d0565..86b7c01ff6 100644 --- a/modules/angular2/src/core/compiler/private_component_location.js +++ b/modules/angular2/src/core/compiler/private_component_location.js @@ -3,7 +3,7 @@ import {NgElement} from 'angular2/src/core/dom/element'; import * as viewModule from './view'; import * as eiModule from './element_injector'; import {ShadowDomStrategy} from './shadow_dom_strategy'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {ListWrapper} from 'angular2/src/facade/collection'; import {Type} from 'angular2/src/facade/lang'; diff --git a/modules/angular2/src/core/compiler/style_inliner.js b/modules/angular2/src/core/compiler/style_inliner.js index f797e15cf3..88942d15e1 100644 --- a/modules/angular2/src/core/compiler/style_inliner.js +++ b/modules/angular2/src/core/compiler/style_inliner.js @@ -1,7 +1,7 @@ import {Injectable} from 'angular2/di'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {ListWrapper} from 'angular2/src/facade/collection'; import { diff --git a/modules/angular2/src/core/compiler/style_url_resolver.js b/modules/angular2/src/core/compiler/style_url_resolver.js index 5ebd76bea7..93a1ad4891 100644 --- a/modules/angular2/src/core/compiler/style_url_resolver.js +++ b/modules/angular2/src/core/compiler/style_url_resolver.js @@ -3,7 +3,7 @@ import {Injectable} from 'angular2/di'; import {RegExp, RegExpWrapper, StringWrapper} from 'angular2/src/facade/lang'; -import {UrlResolver} from './url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; /** * Rewrites URLs by resolving '@import' and 'url()' URLs from the given base URL. diff --git a/modules/angular2/src/core/compiler/template_loader.js b/modules/angular2/src/core/compiler/template_loader.js index c1342ec448..c25c166ee5 100644 --- a/modules/angular2/src/core/compiler/template_loader.js +++ b/modules/angular2/src/core/compiler/template_loader.js @@ -3,11 +3,11 @@ import {isBlank, isPresent, BaseException, stringify} from 'angular2/src/facade/ import {Map, MapWrapper, StringMapWrapper, StringMap} from 'angular2/src/facade/collection'; import {DOM} from 'angular2/src/dom/dom_adapter'; -import {XHR} from './xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {Template} from 'angular2/src/core/annotations/template'; -import {UrlResolver} from './url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; /** * Strategy to load component templates. diff --git a/modules/angular2/src/core/compiler/view.js b/modules/angular2/src/core/compiler/view.js index c4384af952..fd9a6520e0 100644 --- a/modules/angular2/src/core/compiler/view.js +++ b/modules/angular2/src/core/compiler/view.js @@ -16,7 +16,7 @@ import {LightDom} from './shadow_dom_emulation/light_dom'; import {Content} from './shadow_dom_emulation/content_tag'; import {ShadowDomStrategy} from './shadow_dom_strategy'; import {ViewPool} from './view_pool'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; const NG_BINDING_CLASS = 'ng-binding'; const NG_BINDING_CLASS_SELECTOR = '.ng-binding'; @@ -306,7 +306,7 @@ export class ProtoView { parentProtoView:ProtoView; _variableBindings:List; - _directiveMementosMap:Map; + _directiveMementosMap:Map; _directiveMementos:List; constructor( @@ -486,7 +486,7 @@ export class ProtoView { ListWrapper.push(componentChildViews, childView); } lightDoms[binderIdx] = lightDom; - + var destLightDom = null; if (isPresent(binder.parent) && binder.distanceToParent === 1) { destLightDom = lightDoms[binder.parent.index]; @@ -574,7 +574,7 @@ export class ProtoView { bindElement(parent:ElementBinder, distanceToParent:int, protoElementInjector:ProtoElementInjector, componentDirective:DirectiveMetadata = null, viewportDirective:DirectiveMetadata = null):ElementBinder { - var elBinder = new ElementBinder(this.elementBinders.length, parent, distanceToParent, + var elBinder = new ElementBinder(this.elementBinders.length, parent, distanceToParent, protoElementInjector, componentDirective, viewportDirective); ListWrapper.push(this.elementBinders, elBinder); return elBinder; @@ -653,18 +653,18 @@ export class ProtoView { var directiveMemento = this._getDirectiveMemento(elementIndex, directiveIndex); ListWrapper.push(this.bindingRecords, new BindingRecord(expression, bindingMemento, directiveMemento)); } - + _getDirectiveMemento(elementInjectorIndex:number, directiveIndex:number) { var id = elementInjectorIndex * 100 + directiveIndex; var protoElementInjector = this.elementBinders[elementInjectorIndex].protoElementInjector; - + if (!MapWrapper.contains(this._directiveMementosMap, id)) { var binding = protoElementInjector.getDirectiveBindingAtIndex(directiveIndex); MapWrapper.set(this._directiveMementosMap, id, new DirectiveMemento(elementInjectorIndex, directiveIndex, binding.callOnAllChangesDone, binding.callOnChange)); } - + return MapWrapper.get(this._directiveMementosMap, id); } diff --git a/modules/angular2/src/core/compiler/view_container.js b/modules/angular2/src/core/compiler/view_container.js index 1b71ab24bb..5f8bc3ae1b 100644 --- a/modules/angular2/src/core/compiler/view_container.js +++ b/modules/angular2/src/core/compiler/view_container.js @@ -5,7 +5,7 @@ import {BaseException} from 'angular2/src/facade/lang'; import {Injector} from 'angular2/di'; import * as eiModule from 'angular2/src/core/compiler/element_injector'; import {isPresent, isBlank} from 'angular2/src/facade/lang'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {LightDom} from './shadow_dom_emulation/light_dom'; /** @@ -88,7 +88,7 @@ export class ViewContainer { var newView = this.defaultProtoView.instantiate(this.hostElementInjector, this._eventManager); // insertion must come before hydration so that element injector trees are attached. this.insert(newView, atIndex); - newView.hydrate(this.appInjector, this.hostElementInjector, this.hostLightDom, + newView.hydrate(this.appInjector, this.hostElementInjector, this.hostLightDom, this.parentView.context, this.parentView.locals); // new content tags might have appeared, we need to redistrubute. diff --git a/modules/angular2/src/mock/xhr_mock.js b/modules/angular2/src/mock/xhr_mock.js index 3de802cb08..1bf0d7d9c5 100644 --- a/modules/angular2/src/mock/xhr_mock.js +++ b/modules/angular2/src/mock/xhr_mock.js @@ -1,4 +1,4 @@ -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {List, ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection'; import {isBlank, isPresent, normalizeBlank, BaseException} from 'angular2/src/facade/lang'; import {PromiseWrapper, Promise} from 'angular2/src/facade/async'; diff --git a/modules/angular2/src/core/events/event_manager.js b/modules/angular2/src/render/dom/events/event_manager.js similarity index 100% rename from modules/angular2/src/core/events/event_manager.js rename to modules/angular2/src/render/dom/events/event_manager.js diff --git a/modules/angular2/src/core/events/hammer_common.js b/modules/angular2/src/render/dom/events/hammer_common.js similarity index 100% rename from modules/angular2/src/core/events/hammer_common.js rename to modules/angular2/src/render/dom/events/hammer_common.js diff --git a/modules/angular2/src/core/events/hammer_gestures.dart b/modules/angular2/src/render/dom/events/hammer_gestures.dart similarity index 97% rename from modules/angular2/src/core/events/hammer_gestures.dart rename to modules/angular2/src/render/dom/events/hammer_gestures.dart index edb2332b30..3dcab94e4c 100644 --- a/modules/angular2/src/core/events/hammer_gestures.dart +++ b/modules/angular2/src/render/dom/events/hammer_gestures.dart @@ -2,7 +2,7 @@ library angular.events; import 'dart:html'; import './hammer_common.dart'; -import '../../facade/lang.dart' show BaseException; +import 'package:angular2/src/facade/lang.dart' show BaseException; import 'dart:js' as js; diff --git a/modules/angular2/src/core/events/hammer_gestures.es6 b/modules/angular2/src/render/dom/events/hammer_gestures.es6 similarity index 100% rename from modules/angular2/src/core/events/hammer_gestures.es6 rename to modules/angular2/src/render/dom/events/hammer_gestures.es6 diff --git a/modules/angular2/src/render/dom/view/view_factory.js b/modules/angular2/src/render/dom/view/view_factory.js index 2654f46c0f..077bd7e624 100644 --- a/modules/angular2/src/render/dom/view/view_factory.js +++ b/modules/angular2/src/render/dom/view/view_factory.js @@ -6,7 +6,7 @@ import {DOM} from 'angular2/src/dom/dom_adapter'; import {Content} from '../shadow_dom/content_tag'; import {ShadowDomStrategy} from '../shadow_dom/shadow_dom_strategy'; -import {EventManager} from '../events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {ViewContainer} from './view_container'; import {ProtoView} from './proto_view'; diff --git a/modules/angular2/src/core/compiler/url_resolver.js b/modules/angular2/src/services/url_resolver.js similarity index 100% rename from modules/angular2/src/core/compiler/url_resolver.js rename to modules/angular2/src/services/url_resolver.js diff --git a/modules/angular2/src/core/compiler/xhr/xhr.js b/modules/angular2/src/services/xhr.js similarity index 100% rename from modules/angular2/src/core/compiler/xhr/xhr.js rename to modules/angular2/src/services/xhr.js diff --git a/modules/angular2/src/core/compiler/xhr/xhr_impl.dart b/modules/angular2/src/services/xhr_impl.dart similarity index 100% rename from modules/angular2/src/core/compiler/xhr/xhr_impl.dart rename to modules/angular2/src/services/xhr_impl.dart diff --git a/modules/angular2/src/core/compiler/xhr/xhr_impl.es6 b/modules/angular2/src/services/xhr_impl.es6 similarity index 100% rename from modules/angular2/src/core/compiler/xhr/xhr_impl.es6 rename to modules/angular2/src/services/xhr_impl.es6 diff --git a/modules/angular2/src/test_lib/test_injector.js b/modules/angular2/src/test_lib/test_injector.js index 489a0a9a63..7ff1b3f3a8 100644 --- a/modules/angular2/src/test_lib/test_injector.js +++ b/modules/angular2/src/test_lib/test_injector.js @@ -7,10 +7,10 @@ import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {ShadowDomStrategy, NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {XHRMock} from 'angular2/src/mock/xhr_mock'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/core/compiler/compiler_common_tests.js b/modules/angular2/test/core/compiler/compiler_common_tests.js index c21eefe8af..3163e8966b 100644 --- a/modules/angular2/test/core/compiler/compiler_common_tests.js +++ b/modules/angular2/test/core/compiler/compiler_common_tests.js @@ -27,7 +27,7 @@ import {CompileControl} from 'angular2/src/core/compiler/pipeline/compile_contro import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver'; import {ComponentUrlMapper, RuntimeComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/core/compiler/integration_spec.js b/modules/angular2/test/core/compiler/integration_spec.js index f7d3c93ea7..eb184a54f3 100644 --- a/modules/angular2/test/core/compiler/integration_spec.js +++ b/modules/angular2/test/core/compiler/integration_spec.js @@ -28,10 +28,10 @@ import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_compone import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {MockTemplateResolver} from 'angular2/src/mock/template_resolver_mock'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {Decorator, Component, Viewport, DynamicComponent} from 'angular2/src/core/annotations/annotations'; import {Template} from 'angular2/src/core/annotations/template'; diff --git a/modules/angular2/test/core/compiler/shadow_dom/shadow_dom_emulation_integration_spec.js b/modules/angular2/test/core/compiler/shadow_dom/shadow_dom_emulation_integration_spec.js index 97bacda4b3..b118d5ec8b 100644 --- a/modules/angular2/test/core/compiler/shadow_dom/shadow_dom_emulation_integration_spec.js +++ b/modules/angular2/test/core/compiler/shadow_dom/shadow_dom_emulation_integration_spec.js @@ -29,7 +29,7 @@ import {ShadowDomStrategy, } from 'angular2/src/core/compiler/shadow_dom_strategy'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/core/compiler/shadow_dom_strategy_spec.js b/modules/angular2/test/core/compiler/shadow_dom_strategy_spec.js index 9ab43997eb..f95019ca5d 100644 --- a/modules/angular2/test/core/compiler/shadow_dom_strategy_spec.js +++ b/modules/angular2/test/core/compiler/shadow_dom_strategy_spec.js @@ -17,7 +17,7 @@ import { EmulatedUnscopedShadowDomStrategy, resetShadowDomCache, } from 'angular2/src/core/compiler/shadow_dom_strategy'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; import {ProtoView} from 'angular2/src/core/compiler/view'; @@ -25,7 +25,7 @@ import {DirectiveMetadata} from 'angular2/src/core/compiler/directive_metadata'; import {CompileElement} from 'angular2/src/core/compiler/pipeline/compile_element'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {isPresent, isBlank} from 'angular2/src/facade/lang'; import {DOM} from 'angular2/src/dom/dom_adapter'; diff --git a/modules/angular2/test/core/compiler/style_inliner_spec.js b/modules/angular2/test/core/compiler/style_inliner_spec.js index bec4c549a0..5e016e265e 100644 --- a/modules/angular2/test/core/compiler/style_inliner_spec.js +++ b/modules/angular2/test/core/compiler/style_inliner_spec.js @@ -17,7 +17,7 @@ import {isBlank} from 'angular2/src/facade/lang'; import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; import {Map, MapWrapper} from 'angular2/src/facade/collection'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; +import {XHR} from 'angular2/src/services/xhr'; import {bind} from 'angular2/di'; diff --git a/modules/angular2/test/core/compiler/style_url_resolver_spec.js b/modules/angular2/test/core/compiler/style_url_resolver_spec.js index fbb23c328d..68d2096543 100644 --- a/modules/angular2/test/core/compiler/style_url_resolver_spec.js +++ b/modules/angular2/test/core/compiler/style_url_resolver_spec.js @@ -1,7 +1,7 @@ import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/test_lib'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; export function main() { describe('StyleUrlResolver', () => { diff --git a/modules/angular2/test/core/compiler/template_loader_spec.js b/modules/angular2/test/core/compiler/template_loader_spec.js index 0edb12fbd1..6fa4bcd5f8 100644 --- a/modules/angular2/test/core/compiler/template_loader_spec.js +++ b/modules/angular2/test/core/compiler/template_loader_spec.js @@ -12,7 +12,7 @@ import { } from 'angular2/test_lib'; import {DOM} from 'angular2/src/dom/dom_adapter'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {Template} from 'angular2/src/core/annotations/template'; import {PromiseWrapper} from 'angular2/src/facade/async'; diff --git a/modules/angular2/test/core/compiler/view_spec.js b/modules/angular2/test/core/compiler/view_spec.js index 2f161c7f63..66fdeb2c41 100644 --- a/modules/angular2/test/core/compiler/view_spec.js +++ b/modules/angular2/test/core/compiler/view_spec.js @@ -14,7 +14,7 @@ import {Injector} from 'angular2/di'; import {View, PropertyUpdate} from 'angular2/src/core/compiler/view'; import {ViewContainer} from 'angular2/src/core/compiler/view_container'; import {VmTurnZone} from 'angular2/src/core/zone/vm_turn_zone'; -import {EventManager, DomEventsPlugin} from 'angular2/src/core/events/event_manager'; +import {EventManager, DomEventsPlugin} from 'angular2/src/render/dom/events/event_manager'; import {reflector} from 'angular2/src/reflection/reflection'; class DummyDirective extends Directive { diff --git a/modules/angular2/test/directives/if_spec.js b/modules/angular2/test/directives/if_spec.js index 3f0e4479f6..2b5c33dba4 100644 --- a/modules/angular2/test/directives/if_spec.js +++ b/modules/angular2/test/directives/if_spec.js @@ -22,7 +22,7 @@ import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_meta import {NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/directives/non_bindable_spec.js b/modules/angular2/test/directives/non_bindable_spec.js index b256fb5e10..52e37677ee 100644 --- a/modules/angular2/test/directives/non_bindable_spec.js +++ b/modules/angular2/test/directives/non_bindable_spec.js @@ -18,7 +18,7 @@ import {Compiler, CompilerCache} from 'angular2/src/core/compiler/compiler'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/directives/switch_spec.js b/modules/angular2/test/directives/switch_spec.js index ea5ecaa342..6da34853b3 100644 --- a/modules/angular2/test/directives/switch_spec.js +++ b/modules/angular2/test/directives/switch_spec.js @@ -18,7 +18,7 @@ import {Compiler, CompilerCache} from 'angular2/src/core/compiler/compiler'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/angular2/test/forms/integration_spec.js b/modules/angular2/test/forms/integration_spec.js index 0561ba4bf8..6d1689affa 100644 --- a/modules/angular2/test/forms/integration_spec.js +++ b/modules/angular2/test/forms/integration_spec.js @@ -21,10 +21,10 @@ import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_meta import {NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; -import {EventManager, DomEventsPlugin} from 'angular2/src/core/events/event_manager'; +import {EventManager, DomEventsPlugin} from 'angular2/src/render/dom/events/event_manager'; import {VmTurnZone} from 'angular2/src/core/zone/vm_turn_zone'; import {MockTemplateResolver} from 'angular2/src/mock/template_resolver_mock'; diff --git a/modules/angular2/test/core/events/event_manager_spec.js b/modules/angular2/test/render/dom/events/event_manager_spec.js similarity index 99% rename from modules/angular2/test/core/events/event_manager_spec.js rename to modules/angular2/test/render/dom/events/event_manager_spec.js index fef9a6f9f2..81d0c89967 100644 --- a/modules/angular2/test/core/events/event_manager_spec.js +++ b/modules/angular2/test/render/dom/events/event_manager_spec.js @@ -1,5 +1,5 @@ import {describe, ddescribe, it, iit, xit, xdescribe, expect, beforeEach, el} from 'angular2/test_lib'; -import {EventManager, EventManagerPlugin, DomEventsPlugin} from 'angular2/src/core/events/event_manager'; +import {EventManager, EventManagerPlugin, DomEventsPlugin} from 'angular2/src/render/dom/events/event_manager'; import {VmTurnZone} from 'angular2/src/core/zone/vm_turn_zone'; import {List, ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection'; import {document} from 'angular2/src/facade/browser'; diff --git a/modules/angular2/test/core/compiler/url_resolver_spec.js b/modules/angular2/test/services/url_resolver_spec.js similarity index 96% rename from modules/angular2/test/core/compiler/url_resolver_spec.js rename to modules/angular2/test/services/url_resolver_spec.js index 8843433c69..a8c10f1b9d 100644 --- a/modules/angular2/test/core/compiler/url_resolver_spec.js +++ b/modules/angular2/test/services/url_resolver_spec.js @@ -1,5 +1,5 @@ import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/test_lib'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; export function main() { describe('UrlResolver', () => { diff --git a/modules/benchmarks/src/compiler/compiler_benchmark.js b/modules/benchmarks/src/compiler/compiler_benchmark.js index d2c2d9eb38..3c701a87c8 100644 --- a/modules/benchmarks/src/compiler/compiler_benchmark.js +++ b/modules/benchmarks/src/compiler/compiler_benchmark.js @@ -16,7 +16,7 @@ import {Decorator} from 'angular2/src/core/annotations/annotations'; import {Template} from 'angular2/src/core/annotations/template'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; diff --git a/modules/benchmarks/src/largetable/largetable_benchmark.js b/modules/benchmarks/src/largetable/largetable_benchmark.js index c5db9a5f8f..59b87647ee 100644 --- a/modules/benchmarks/src/largetable/largetable_benchmark.js +++ b/modules/benchmarks/src/largetable/largetable_benchmark.js @@ -12,7 +12,7 @@ import {ShadowDomStrategy, NativeShadowDomStrategy, EmulatedUnscopedShadowDomStr import {Content} from 'angular2/src/core/compiler/shadow_dom_emulation/content_tag'; import {DestinationLightDom} from 'angular2/src/core/compiler/shadow_dom_emulation/light_dom'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; @@ -26,13 +26,13 @@ import {isPresent, BaseException} from 'angular2/src/facade/lang'; import {window, document, gc} from 'angular2/src/facade/browser'; import {getIntParameter, getStringParameter, bindAction} from 'angular2/src/test_lib/benchmark_util'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; -import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl'; +import {XHR} from 'angular2/src/services/xhr'; +import {XHRImpl} from 'angular2/src/services/xhr_impl'; import {If, For, Switch, SwitchWhen, SwitchDefault} from 'angular2/directives'; import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {ListWrapper} from 'angular2/src/facade/collection'; import {Parent} from 'angular2/src/core/annotations/visibility'; diff --git a/modules/benchmarks/src/naive_infinite_scroll/index.js b/modules/benchmarks/src/naive_infinite_scroll/index.js index f773635893..c5bf48afee 100644 --- a/modules/benchmarks/src/naive_infinite_scroll/index.js +++ b/modules/benchmarks/src/naive_infinite_scroll/index.js @@ -17,9 +17,9 @@ import {DestinationLightDom} from 'angular2/src/core/compiler/shadow_dom_emulati import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; -import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {XHR} from 'angular2/src/services/xhr'; +import {XHRImpl} from 'angular2/src/services/xhr_impl'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; @@ -36,7 +36,7 @@ import {CompanyNameComponent, OpportunityNameComponent, OfferingNameComponent, setupReflectorForCells} from './cells'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; export function main() { setupReflector(); diff --git a/modules/benchmarks/src/tree/tree_benchmark.js b/modules/benchmarks/src/tree/tree_benchmark.js index ee5fc88ea0..c9ea41f571 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.js +++ b/modules/benchmarks/src/tree/tree_benchmark.js @@ -12,7 +12,7 @@ import {ShadowDomStrategy, NativeShadowDomStrategy, EmulatedUnscopedShadowDomStr import {Content} from 'angular2/src/core/compiler/shadow_dom_emulation/content_tag'; import {DestinationLightDom} from 'angular2/src/core/compiler/shadow_dom_emulation/light_dom'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; @@ -26,13 +26,13 @@ import {isPresent} from 'angular2/src/facade/lang'; import {window, document, gc} from 'angular2/src/facade/browser'; import {getIntParameter, bindAction} from 'angular2/src/test_lib/benchmark_util'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; -import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl'; +import {XHR} from 'angular2/src/services/xhr'; +import {XHRImpl} from 'angular2/src/services/xhr_impl'; import {If} from 'angular2/directives'; import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; function setupReflector() { // TODO: Put the general calls to reflector.register... in a shared file diff --git a/modules/examples/src/hello_world/index_static.js b/modules/examples/src/hello_world/index_static.js index df7e41f159..277e41f14e 100644 --- a/modules/examples/src/hello_world/index_static.js +++ b/modules/examples/src/hello_world/index_static.js @@ -12,14 +12,14 @@ import {Content} from 'angular2/src/core/compiler/shadow_dom_emulation/content_t import {DestinationLightDom} from 'angular2/src/core/compiler/shadow_dom_emulation/light_dom'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver'; -import {XHR} from 'angular2/src/core/compiler/xhr/xhr'; -import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl'; -import {UrlResolver} from 'angular2/src/core/compiler/url_resolver'; +import {XHR} from 'angular2/src/services/xhr'; +import {XHRImpl} from 'angular2/src/services/xhr_impl'; +import {UrlResolver} from 'angular2/src/services/url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver'; import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper'; import {StyleInliner} from 'angular2/src/core/compiler/style_inliner'; import {CssProcessor} from 'angular2/src/core/compiler/css_processor'; -import {EventManager} from 'angular2/src/core/events/event_manager'; +import {EventManager} from 'angular2/src/render/dom/events/event_manager'; import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_component_loader'; import {TestabilityRegistry, Testability} from 'angular2/src/core/testability/testability';