refactor(core): move EventManager from core to platform/dom

Closes #5465
This commit is contained in:
vsavkin 2015-11-24 15:05:04 -08:00 committed by Victor Savkin
parent 0c9596ae2b
commit b7b3c85033
17 changed files with 27 additions and 18 deletions

View File

@ -13,5 +13,6 @@ export 'package:angular2/src/core/application_tokens.dart'
hide APP_COMPONENT_REF_PROMISE, APP_ID_RANDOM_PROVIDER; hide APP_COMPONENT_REF_PROMISE, APP_ID_RANDOM_PROVIDER;
export 'package:angular2/src/platform/dom/dom_tokens.dart'; export 'package:angular2/src/platform/dom/dom_tokens.dart';
export 'package:angular2/src/platform/dom/dom_adapter.dart'; export 'package:angular2/src/platform/dom/dom_adapter.dart';
export 'package:angular2/src/platform/dom/events/event_manager.dart';
export 'package:angular2/src/compiler/url_resolver.dart'; export 'package:angular2/src/compiler/url_resolver.dart';
export 'package:angular2/src/compiler/app_root_url.dart'; export 'package:angular2/src/compiler/app_root_url.dart';

View File

@ -3,5 +3,6 @@ export * from './core';
export * from './instrumentation'; export * from './instrumentation';
export * from './platform/browser'; export * from './platform/browser';
export * from './src/platform/dom/dom_adapter'; export * from './src/platform/dom/dom_adapter';
export * from './src/platform/dom/events/event_manager';
export * from './upgrade'; export * from './upgrade';
export {UrlResolver, AppRootUrl} from './compiler'; export {UrlResolver, AppRootUrl} from './compiler';

View File

@ -6,5 +6,10 @@ export {DomRenderer} from 'angular2/src/platform/dom/dom_renderer';
export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens'; export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
export {SharedStylesHost, DomSharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host'; export {SharedStylesHost, DomSharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host';
export {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events'; export {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events';
export {
EVENT_MANAGER_PLUGINS,
EventManager,
EventManagerPlugin
} from 'angular2/src/platform/dom/events/event_manager';
export * from 'angular2/src/platform/dom/debug/by'; export * from 'angular2/src/platform/dom/debug/by';
export * from 'angular2/src/platform/dom/debug/debug_element_view_listener'; export * from 'angular2/src/platform/dom/debug/debug_element_view_listener';

View File

@ -24,7 +24,6 @@ import {Compiler} from './linker/compiler';
import {Compiler_} from "./linker/compiler"; import {Compiler_} from "./linker/compiler";
import {DynamicComponentLoader} from './linker/dynamic_component_loader'; import {DynamicComponentLoader} from './linker/dynamic_component_loader';
import {DynamicComponentLoader_} from "./linker/dynamic_component_loader"; import {DynamicComponentLoader_} from "./linker/dynamic_component_loader";
import {EventManager} from './render';
/** /**
* A default set of providers which should be included in any Angular * A default set of providers which should be included in any Angular
@ -44,6 +43,5 @@ export const APPLICATION_COMMON_PROVIDERS: Array<Type | Provider | any[]> = CONS
new Provider(KeyValueDiffers, {useValue: defaultKeyValueDiffers}), new Provider(KeyValueDiffers, {useValue: defaultKeyValueDiffers}),
DirectiveResolver, DirectiveResolver,
PipeResolver, PipeResolver,
new Provider(DynamicComponentLoader, {useClass: DynamicComponentLoader_}), new Provider(DynamicComponentLoader, {useClass: DynamicComponentLoader_})
EventManager
]); ]);

View File

@ -17,5 +17,3 @@ export {
RenderBeginCmd, RenderBeginCmd,
RenderComponentTemplate RenderComponentTemplate
} from './render/api'; } from './render/api';
export {EventManager, EventManagerPlugin, EVENT_MANAGER_PLUGINS} from './render/event_manager';

View File

@ -12,8 +12,7 @@ import {
Renderer, Renderer,
reflector, reflector,
APPLICATION_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS,
PLATFORM_COMMON_PROVIDERS, PLATFORM_COMMON_PROVIDERS
EVENT_MANAGER_PLUGINS
} from "angular2/core"; } from "angular2/core";
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common"; import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common";
import {Testability} from 'angular2/src/core/testability/testability'; import {Testability} from 'angular2/src/core/testability/testability';
@ -30,6 +29,7 @@ import {AnimationBuilder} from "angular2/src/animate/animation_builder";
import {BrowserDomAdapter} from './browser/browser_adapter'; import {BrowserDomAdapter} from './browser/browser_adapter';
import {BrowserGetTestability} from 'angular2/src/platform/browser/testability'; import {BrowserGetTestability} from 'angular2/src/platform/browser/testability';
import {wtfInit} from 'angular2/src/core/profile/wtf_init'; import {wtfInit} from 'angular2/src/core/profile/wtf_init';
import {EventManager, EVENT_MANAGER_PLUGINS} from "angular2/src/platform/dom/events/event_manager";
export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens'; export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
export {Title} from 'angular2/src/platform/browser/title'; export {Title} from 'angular2/src/platform/browser/title';
export { export {
@ -71,7 +71,8 @@ export const BROWSER_APP_COMMON_PROVIDERS: Array<any /*Type | Provider | any[]*/
DomSharedStylesHost, DomSharedStylesHost,
Testability, Testability,
BrowserDetails, BrowserDetails,
AnimationBuilder AnimationBuilder,
EventManager
]); ]);
export function initDomAdapter() { export function initDomAdapter() {

View File

@ -23,10 +23,11 @@ import {
RenderViewWithFragments, RenderViewWithFragments,
RenderTemplateCmd, RenderTemplateCmd,
RenderEventDispatcher, RenderEventDispatcher,
RenderComponentTemplate, RenderComponentTemplate
EventManager
} from 'angular2/core'; } from 'angular2/core';
import {EventManager} from './events/event_manager';
import {DOCUMENT} from './dom_tokens'; import {DOCUMENT} from './dom_tokens';
import { import {
createRenderView, createRenderView,

View File

@ -1,5 +1,6 @@
import {DOM} from 'angular2/src/platform/dom/dom_adapter'; import {DOM} from 'angular2/src/platform/dom/dom_adapter';
import {Injectable, EventManagerPlugin, EventManager} from 'angular2/core'; import {Injectable} from 'angular2/core';
import {EventManagerPlugin, EventManager} from './event_manager';
@Injectable() @Injectable()
export class DomEventsPlugin extends EventManagerPlugin { export class DomEventsPlugin extends EventManagerPlugin {

View File

@ -1,4 +1,4 @@
import {EventManagerPlugin} from 'angular2/core'; import {EventManagerPlugin} from './event_manager';
import {StringMapWrapper} from 'angular2/src/facade/collection'; import {StringMapWrapper} from 'angular2/src/facade/collection';
var _eventNames = { var _eventNames = {

View File

@ -7,7 +7,7 @@ import {
NumberWrapper NumberWrapper
} from 'angular2/src/facade/lang'; } from 'angular2/src/facade/lang';
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection'; import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {EventManagerPlugin} from 'angular2/core'; import {EventManagerPlugin} from './event_manager';
import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';

View File

@ -21,7 +21,6 @@ import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {DOM} from 'angular2/src/platform/dom/dom_adapter'; import {DOM} from 'angular2/src/platform/dom/dom_adapter';
import {EventManager, EVENT_MANAGER_PLUGINS} from 'angular2/core';
import {MockDirectiveResolver} from 'angular2/src/mock/directive_resolver_mock'; import {MockDirectiveResolver} from 'angular2/src/mock/directive_resolver_mock';
import {MockViewResolver} from 'angular2/src/mock/view_resolver_mock'; import {MockViewResolver} from 'angular2/src/mock/view_resolver_mock';
import {MockLocationStrategy} from 'angular2/src/mock/mock_location_strategy'; import {MockLocationStrategy} from 'angular2/src/mock/mock_location_strategy';
@ -31,7 +30,11 @@ import {MockNgZone} from 'angular2/src/mock/ng_zone_mock';
import {TestComponentBuilder} from './test_component_builder'; import {TestComponentBuilder} from './test_component_builder';
import {Injector} from 'angular2/src/core/di'; import {Injector} from 'angular2/src/core/di';
import {ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/common_dom'; import {
EventManager,
EVENT_MANAGER_PLUGINS,
ELEMENT_PROBE_PROVIDERS
} from 'angular2/platform/common_dom';
import {ListWrapper} from 'angular2/src/facade/collection'; import {ListWrapper} from 'angular2/src/facade/collection';
import {FunctionWrapper, Type} from 'angular2/src/facade/lang'; import {FunctionWrapper, Type} from 'angular2/src/facade/lang';

View File

@ -5,7 +5,7 @@ import {AnimationBuilder} from 'angular2/src/animate/animation_builder';
import {BrowserDetails} from 'angular2/src/animate/browser_details'; import {BrowserDetails} from 'angular2/src/animate/browser_details';
import {Reflector, reflector} from 'angular2/src/core/reflection/reflection'; import {Reflector, reflector} from 'angular2/src/core/reflection/reflection';
import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection'; import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';
import {EventManager, EVENT_MANAGER_PLUGINS} from 'angular2/core'; import {EventManager, EVENT_MANAGER_PLUGINS} from 'angular2/platform/common_dom';
import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory'; import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory';
import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter'; import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter';
import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events'; import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events';

View File

@ -9,7 +9,7 @@ import {
beforeEach, beforeEach,
el el
} from 'angular2/testing_internal'; } from 'angular2/testing_internal';
import {EventManager, EventManagerPlugin} from 'angular2/core'; import {EventManager, EventManagerPlugin} from 'angular2/platform/common_dom';
import {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events'; import {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events';
import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection'; import {ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection';