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;
export 'package:angular2/src/platform/dom/dom_tokens.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/app_root_url.dart';

View File

@ -3,5 +3,6 @@ export * from './core';
export * from './instrumentation';
export * from './platform/browser';
export * from './src/platform/dom/dom_adapter';
export * from './src/platform/dom/events/event_manager';
export * from './upgrade';
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 {SharedStylesHost, DomSharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host';
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/debug_element_view_listener';

View File

@ -24,7 +24,6 @@ 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 {EventManager} from './render';
/**
* 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}),
DirectiveResolver,
PipeResolver,
new Provider(DynamicComponentLoader, {useClass: DynamicComponentLoader_}),
EventManager
new Provider(DynamicComponentLoader, {useClass: DynamicComponentLoader_})
]);

View File

@ -16,6 +16,4 @@ export {
RenderEmbeddedTemplateCmd,
RenderBeginCmd,
RenderComponentTemplate
} from './render/api';
export {EventManager, EventManagerPlugin, EVENT_MANAGER_PLUGINS} from './render/event_manager';
} from './render/api';

View File

@ -12,8 +12,7 @@ import {
Renderer,
reflector,
APPLICATION_COMMON_PROVIDERS,
PLATFORM_COMMON_PROVIDERS,
EVENT_MANAGER_PLUGINS
PLATFORM_COMMON_PROVIDERS
} from "angular2/core";
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common";
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 {BrowserGetTestability} from 'angular2/src/platform/browser/testability';
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 {Title} from 'angular2/src/platform/browser/title';
export {
@ -71,7 +71,8 @@ export const BROWSER_APP_COMMON_PROVIDERS: Array<any /*Type | Provider | any[]*/
DomSharedStylesHost,
Testability,
BrowserDetails,
AnimationBuilder
AnimationBuilder,
EventManager
]);
export function initDomAdapter() {

View File

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

View File

@ -1,5 +1,6 @@
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()
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';
var _eventNames = {

View File

@ -7,7 +7,7 @@ import {
NumberWrapper
} from 'angular2/src/facade/lang';
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 {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 {EventManager, EVENT_MANAGER_PLUGINS} from 'angular2/core';
import {MockDirectiveResolver} from 'angular2/src/mock/directive_resolver_mock';
import {MockViewResolver} from 'angular2/src/mock/view_resolver_mock';
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 {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 {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 {Reflector, reflector} from 'angular2/src/core/reflection/reflection';
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 {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter';
import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events';

View File

@ -9,7 +9,7 @@ import {
beforeEach,
el
} 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 {NgZone} from 'angular2/src/core/zone/ng_zone';
import {ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection';