From 738d93caf76d068a7e78842e85a123d36c95253c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Fri, 17 Feb 2017 12:55:55 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20rewrite=20private=20export=20using?= =?UTF-8?q?=20the=20=C9=B5=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../animation/src/animation_module.ts | 5 +- .../animation/src/engine/animation_driver.ts | 5 +- .../engine/dom_animation_transition_engine.ts | 9 +- .../animation/src/private_import_core.ts | 13 -- .../dom_animation_transition_engine_spec.ts | 5 +- .../testing/mock_animation_driver.ts | 6 +- .../@angular/common/src/pipes/async_pipe.ts | 7 +- .../common/src/private_import_core.ts | 12 - .../compiler-cli/src/private_import_core.ts | 18 -- .../@angular/compiler-cli/test/main_spec.ts | 4 +- .../compiler-cli/test/private_import_core.ts | 13 -- .../src/animation/animation_compiler.ts | 19 +- .../src/animation/animation_parser.ts | 9 +- .../compiler/src/aot/compiler_factory.ts | 4 +- .../src/aot/static_reflection_capabilities.ts | 12 +- .../compiler/src/aot/static_reflector.ts | 7 +- .../@angular/compiler/src/compile_metadata.ts | 7 +- .../compiler/src/compiler_util/render_util.ts | 4 +- .../compiler/src/directive_resolver.ts | 5 +- .../src/directive_wrapper_compiler.ts | 3 +- .../compiler/src/i18n/i18n_html_parser.ts | 5 +- .../compiler/src/i18n/translation_bundle.ts | 5 +- modules/@angular/compiler/src/jit/compiler.ts | 3 +- .../compiler/src/jit/compiler_factory.ts | 4 +- .../compiler/src/lifecycle_reflector.ts | 26 +-- .../compiler/src/metadata_resolver.ts | 13 +- .../compiler/src/ng_module_compiler.ts | 6 +- .../compiler/src/ng_module_resolver.ts | 5 +- .../@angular/compiler/src/pipe_resolver.ts | 5 +- .../compiler/src/private_import_core.ts | 76 ------- .../src/template_parser/template_ast.ts | 3 +- .../src/template_parser/template_parser.ts | 7 +- .../src/view_compiler/compile_view.ts | 3 +- .../compiler/src/view_compiler/constants.ts | 4 +- .../src/view_compiler/lifecycle_binder.ts | 3 +- .../src/view_compiler/property_binder.ts | 4 +- .../compiler/src/view_compiler/util.ts | 3 +- .../src/view_compiler/view_builder.ts | 4 +- .../src/view_compiler_next/view_compiler.ts | 3 +- .../test/animation/animation_parser_spec.ts | 4 +- .../compiler/test/aot/compiler_spec.ts | 4 +- .../compiler/test/aot/private_import_core.ts | 13 -- .../test/directive_resolver_mock_spec.ts | 5 +- .../compiler/test/private_import_core.ts | 15 -- .../compiler/test/runtime_compiler_spec.ts | 4 +- .../testing/directive_resolver_mock.ts | 4 +- modules/@angular/compiler/testing/index.ts | 3 +- .../compiler/testing/private_import_core.ts | 21 -- .../@angular/core/src/core_private_export.ts | 207 +++--------------- .../core/testing/private_export_testing.ts | 17 +- .../core/testing/private_import_core.ts | 11 - modules/@angular/core/testing/test_bed.ts | 4 +- .../@angular/core/testing/testing_internal.ts | 3 +- modules/@angular/forms/src/model.ts | 2 +- .../@angular/forms/src/private_import_core.ts | 12 - modules/@angular/forms/src/validators.ts | 4 +- .../@angular/http/src/backends/xhr_backend.ts | 4 +- .../http/test/backends/xhr_backend_spec.ts | 3 +- .../src/platform_providers.ts | 2 +- .../src/private_export.ts | 13 +- .../src/private_import_core.ts | 13 -- .../src/private_import_platform-browser.ts | 13 -- .../testing/dom_test_component_renderer.ts | 3 +- .../platform-browser-dynamic/testing/index.ts | 2 +- .../testing/private_export_testing.ts | 7 +- ...private_import_platform-browser-dynamic.ts | 13 -- .../private_import_platform-browser.ts | 11 - .../src/dom/animation_driver.ts | 4 +- .../src/dom/debug/ng_probe.ts | 5 +- .../platform-browser/src/dom/dom_renderer.ts | 5 +- .../src/dom/web_animations_driver.ts | 3 +- .../src/dom/web_animations_player.ts | 5 +- .../platform-browser/src/private_export.ts | 88 +------- .../src/private_import_core.ts | 39 ---- .../test/dom/web_animations_driver_spec.ts | 4 +- .../platform-browser/testing/browser.ts | 4 +- .../platform-browser/testing/browser_util.ts | 4 +- .../platform-browser/testing/matchers.ts | 4 +- .../testing/mock_animation_driver.ts | 4 +- .../testing/private_import_core.ts | 33 --- .../private_import_platform-browser.ts | 13 -- .../@angular/platform-server/src/location.ts | 4 +- .../platform-server/src/parse5_adapter.ts | 2 +- .../platform-server/src/platform_state.ts | 6 +- .../platform-server/src/private_export.ts | 10 +- .../src/private_import_core.ts | 26 --- .../src/private_import_platform-browser.ts | 22 -- .../@angular/platform-server/src/server.ts | 7 +- .../platform-server/src/server_renderer.ts | 7 +- .../platform-server/src/styles_host.ts | 3 +- .../testing/private_import_platform_server.ts | 13 -- .../platform-server/testing/server.ts | 3 +- .../src/platform-webworker-dynamic.ts | 2 +- .../src/private_import_core.ts | 13 -- ...private_import_platform-browser-dynamic.ts | 11 - .../src/private_import_platform-browser.ts | 13 -- .../src/private_import_core.ts | 36 --- .../src/private_import_platform-browser.ts | 29 --- .../src/web_workers/ui/location_providers.ts | 2 +- .../src/web_workers/ui/platform_location.ts | 2 +- .../src/web_workers/worker/renderer.ts | 6 +- .../src/web_workers/worker/worker_adapter.ts | 2 +- .../platform-webworker/src/worker_app.ts | 4 +- .../platform-webworker/src/worker_render.ts | 7 +- modules/@angular/router/src/private_export.ts | 16 +- .../router/src/private_import_core.ts | 12 - .../src/private_import_platform-browser.ts | 10 - modules/@angular/router/src/router_module.ts | 2 +- .../@angular/router/src/utils/collection.ts | 4 +- .../router/testing/private_import_router.ts | 13 -- .../router/testing/router_testing_module.ts | 4 +- 111 files changed, 202 insertions(+), 1070 deletions(-) delete mode 100644 modules/@angular/animation/src/private_import_core.ts delete mode 100644 modules/@angular/common/src/private_import_core.ts delete mode 100644 modules/@angular/compiler-cli/src/private_import_core.ts delete mode 100644 modules/@angular/compiler-cli/test/private_import_core.ts delete mode 100644 modules/@angular/compiler/src/private_import_core.ts delete mode 100644 modules/@angular/compiler/test/aot/private_import_core.ts delete mode 100644 modules/@angular/compiler/test/private_import_core.ts delete mode 100644 modules/@angular/compiler/testing/private_import_core.ts delete mode 100644 modules/@angular/core/testing/private_import_core.ts delete mode 100644 modules/@angular/forms/src/private_import_core.ts delete mode 100644 modules/@angular/platform-browser-dynamic/src/private_import_core.ts delete mode 100644 modules/@angular/platform-browser-dynamic/src/private_import_platform-browser.ts delete mode 100644 modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser-dynamic.ts delete mode 100644 modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser.ts delete mode 100644 modules/@angular/platform-browser/src/private_import_core.ts delete mode 100644 modules/@angular/platform-browser/testing/private_import_core.ts delete mode 100644 modules/@angular/platform-browser/testing/private_import_platform-browser.ts delete mode 100644 modules/@angular/platform-server/src/private_import_core.ts delete mode 100644 modules/@angular/platform-server/src/private_import_platform-browser.ts delete mode 100644 modules/@angular/platform-server/testing/private_import_platform_server.ts delete mode 100644 modules/@angular/platform-webworker-dynamic/src/private_import_core.ts delete mode 100644 modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser-dynamic.ts delete mode 100644 modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser.ts delete mode 100644 modules/@angular/platform-webworker/src/private_import_core.ts delete mode 100644 modules/@angular/platform-webworker/src/private_import_platform-browser.ts delete mode 100644 modules/@angular/router/src/private_import_core.ts delete mode 100644 modules/@angular/router/src/private_import_platform-browser.ts delete mode 100644 modules/@angular/router/testing/private_import_router.ts diff --git a/modules/@angular/animation/src/animation_module.ts b/modules/@angular/animation/src/animation_module.ts index 42387486c1..245584a5b0 100644 --- a/modules/@angular/animation/src/animation_module.ts +++ b/modules/@angular/animation/src/animation_module.ts @@ -5,13 +5,12 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; +import {NgModule, ɵTransitionEngine} from '@angular/core'; import {AnimationStyleNormalizer} from './dsl/style_normalization/animation_style_normalizer'; import {WebAnimationsStyleNormalizer} from './dsl/style_normalization/web_animations_style_normalizer'; import {AnimationDriver, NoOpAnimationDriver} from './engine/animation_driver'; import {DomAnimationTransitionEngine} from './engine/dom_animation_transition_engine'; import {WebAnimationsDriver, supportsWebAnimations} from './engine/web_animations/web_animations_driver'; -import {TransitionEngine} from './private_import_core'; export function resolveDefaultAnimationDriver(): AnimationDriver { if (supportsWebAnimations()) { @@ -29,7 +28,7 @@ export function resolveDefaultAnimationDriver(): AnimationDriver { providers: [ {provide: AnimationDriver, useFactory: resolveDefaultAnimationDriver}, {provide: AnimationStyleNormalizer, useClass: WebAnimationsStyleNormalizer}, - {provide: TransitionEngine, useClass: DomAnimationTransitionEngine} + {provide: ɵTransitionEngine, useClass: DomAnimationTransitionEngine} ] }) export class AnimationModule { diff --git a/modules/@angular/animation/src/engine/animation_driver.ts b/modules/@angular/animation/src/engine/animation_driver.ts index b851ee4bf6..c22cf3f8c7 100644 --- a/modules/@angular/animation/src/engine/animation_driver.ts +++ b/modules/@angular/animation/src/engine/animation_driver.ts @@ -6,9 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; +import {AnimationPlayer, ɵNoOpAnimationPlayer} from '@angular/core'; import {StyleData} from '../common/style_data'; -import {NoOpAnimationPlayer} from '../private_import_core'; /** * @experimental @@ -17,7 +16,7 @@ export class NoOpAnimationDriver implements AnimationDriver { animate( element: any, keyframes: StyleData[], duration: number, delay: number, easing: string, previousPlayers: AnimationPlayer[] = []): AnimationPlayer { - return new NoOpAnimationPlayer(); + return new ɵNoOpAnimationPlayer(); } } diff --git a/modules/@angular/animation/src/engine/dom_animation_transition_engine.ts b/modules/@angular/animation/src/engine/dom_animation_transition_engine.ts index cce6a46a50..4062caff62 100644 --- a/modules/@angular/animation/src/engine/dom_animation_transition_engine.ts +++ b/modules/@angular/animation/src/engine/dom_animation_transition_engine.ts @@ -5,12 +5,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer, Injectable} from '@angular/core'; +import {AnimationPlayer, Injectable, ɵAnimationGroupPlayer, ɵNoOpAnimationPlayer, ɵTransitionEngine} from '@angular/core'; import {StyleData} from '../common/style_data'; import {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction'; import {AnimationTransitionInstruction} from '../dsl/animation_transition_instruction'; import {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer'; -import {AnimationGroupPlayer, NoOpAnimationPlayer, TransitionEngine} from '../private_import_core'; import {AnimationDriver} from './animation_driver'; import {AnimationEngineInstruction, AnimationTransitionInstructionType} from './animation_engine_instruction'; @@ -20,7 +19,7 @@ export declare type AnimationPlayerTuple = { }; @Injectable() -export class DomAnimationTransitionEngine extends TransitionEngine { +export class DomAnimationTransitionEngine extends ɵTransitionEngine { private _flaggedInserts = new Set(); private _queuedRemovals: any[] = []; private _queuedAnimations: AnimationPlayerTuple[] = []; @@ -48,7 +47,7 @@ export class DomAnimationTransitionEngine extends TransitionEngine { return this._handleTimelineAnimation( element, instruction, []); } - return new NoOpAnimationPlayer(); + return new ɵNoOpAnimationPlayer(); }); return optimizeGroupPlayer(players); } @@ -224,7 +223,7 @@ function eraseStyles(element: any, styles: StyleData) { } function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer { - return players.length == 1 ? players[0] : new AnimationGroupPlayer(players); + return players.length == 1 ? players[0] : new ɵAnimationGroupPlayer(players); } function copyArray(source: any[]): any[] { diff --git a/modules/@angular/animation/src/private_import_core.ts b/modules/@angular/animation/src/private_import_core.ts deleted file mode 100644 index df77b22d85..0000000000 --- a/modules/@angular/animation/src/private_import_core.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer; -export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer; -export const TransitionEngine: typeof r.TransitionEngine = r.TransitionEngine; diff --git a/modules/@angular/animation/test/animation_engine/dom_animation_transition_engine_spec.ts b/modules/@angular/animation/test/animation_engine/dom_animation_transition_engine_spec.ts index 35f2d6a12f..785ae6e663 100644 --- a/modules/@angular/animation/test/animation_engine/dom_animation_transition_engine_spec.ts +++ b/modules/@angular/animation/test/animation_engine/dom_animation_transition_engine_spec.ts @@ -5,14 +5,15 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import {ɵNoOpAnimationPlayer} from '@angular/core'; import {el} from '@angular/platform-browser/testing/browser_util'; + import {animate, keyframes, state, style, transition} from '../../src/dsl/animation_metadata'; import {buildAnimationKeyframes} from '../../src/dsl/animation_timeline_visitor'; import {trigger} from '../../src/dsl/animation_trigger'; import {AnimationStyleNormalizer, NoOpAnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer'; import {AnimationEngineInstruction} from '../../src/engine/animation_engine_instruction'; import {DomAnimationTransitionEngine} from '../../src/engine/dom_animation_transition_engine'; -import {NoOpAnimationPlayer} from '../../src/private_import_core'; import {MockAnimationDriver, MockAnimationPlayer} from '../../testing/mock_animation_driver'; export function main() { @@ -81,7 +82,7 @@ export function main() { expect(MockAnimationDriver.log.length).toEqual(0); const player = engine.process(element, [instruction]); expect(MockAnimationDriver.log.length).toEqual(0); - expect(player instanceof NoOpAnimationPlayer).toBeTruthy(); + expect(player instanceof ɵNoOpAnimationPlayer).toBeTruthy(); }); }); diff --git a/modules/@angular/animation/testing/mock_animation_driver.ts b/modules/@angular/animation/testing/mock_animation_driver.ts index e36e4e122d..bc1418875c 100644 --- a/modules/@angular/animation/testing/mock_animation_driver.ts +++ b/modules/@angular/animation/testing/mock_animation_driver.ts @@ -5,11 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; - +import {AnimationPlayer, ɵNoOpAnimationPlayer} from '@angular/core'; import {StyleData} from '../src/common/style_data'; import {AnimationDriver} from '../src/engine/animation_driver'; -import {NoOpAnimationPlayer} from '../src/private_import_core'; export class MockAnimationDriver implements AnimationDriver { static log: AnimationPlayer[] = []; @@ -24,7 +22,7 @@ export class MockAnimationDriver implements AnimationDriver { } } -export class MockAnimationPlayer extends NoOpAnimationPlayer { +export class MockAnimationPlayer extends ɵNoOpAnimationPlayer { constructor( public element: any, public keyframes: StyleData[], public duration: number, public delay: number, public easing: string, public previousPlayers: AnimationPlayer[]) { diff --git a/modules/@angular/common/src/pipes/async_pipe.ts b/modules/@angular/common/src/pipes/async_pipe.ts index 3c21fd13c0..b3bfebfe65 100644 --- a/modules/@angular/common/src/pipes/async_pipe.ts +++ b/modules/@angular/common/src/pipes/async_pipe.ts @@ -6,9 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform, WrappedValue} from '@angular/core'; +import {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform, WrappedValue, ɵisObservable, ɵisPromise} from '@angular/core'; import {EventEmitter, Observable} from '../facade/async'; -import {isObservable, isPromise} from '../private_import_core'; import {invalidPipeArgumentError} from './invalid_pipe_argument_error'; interface SubscriptionStrategy { @@ -115,11 +114,11 @@ export class AsyncPipe implements OnDestroy, PipeTransform { } private _selectStrategy(obj: Observable|Promise|EventEmitter): any { - if (isPromise(obj)) { + if (ɵisPromise(obj)) { return _promiseStrategy; } - if (isObservable(obj)) { + if (ɵisObservable(obj)) { return _observableStrategy; } diff --git a/modules/@angular/common/src/private_import_core.ts b/modules/@angular/common/src/private_import_core.ts deleted file mode 100644 index 8de9d5f09f..0000000000 --- a/modules/@angular/common/src/private_import_core.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const isPromise: typeof r.isPromise = r.isPromise; -export const isObservable: typeof r.isObservable = r.isObservable; diff --git a/modules/@angular/compiler-cli/src/private_import_core.ts b/modules/@angular/compiler-cli/src/private_import_core.ts deleted file mode 100644 index 9961fd4ea2..0000000000 --- a/modules/@angular/compiler-cli/src/private_import_core.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export type ReflectorReader = typeof r._ReflectorReader; -export const ReflectorReader: typeof r.ReflectorReader = r.ReflectorReader; - -export type ReflectionCapabilities = typeof r._ReflectionCapabilities; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; - -export type Console = typeof r._Console; -export const Console: typeof r.Console = r.Console; diff --git a/modules/@angular/compiler-cli/test/main_spec.ts b/modules/@angular/compiler-cli/test/main_spec.ts index 84f09a6379..bbb50117be 100644 --- a/modules/@angular/compiler-cli/test/main_spec.ts +++ b/modules/@angular/compiler-cli/test/main_spec.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵReflectionCapabilities, ɵreflector} from '@angular/core'; import {makeTempDir} from '@angular/tsc-wrapped/test/test_support'; import * as fs from 'fs'; import * as path from 'path'; import {main} from '../src/main'; -import {ReflectionCapabilities, reflector} from './private_import_core'; describe('compiler-cli', () => { @@ -43,7 +43,7 @@ describe('compiler-cli', () => { }); // Restore reflector since AoT compiler will update it with a new static reflector - afterEach(() => { reflector.updateCapabilities(new ReflectionCapabilities()); }); + afterEach(() => { ɵreflector.updateCapabilities(new ɵReflectionCapabilities()); }); it('should compile without errors', (done) => { write('test.ts', 'export const A = 1;'); diff --git a/modules/@angular/compiler-cli/test/private_import_core.ts b/modules/@angular/compiler-cli/test/private_import_core.ts deleted file mode 100644 index e86f1ec763..0000000000 --- a/modules/@angular/compiler-cli/test/private_import_core.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export type ReflectionCapabilities = typeof r._ReflectionCapabilities; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const reflector: typeof r.reflector = r.reflector; diff --git a/modules/@angular/compiler/src/animation/animation_compiler.ts b/modules/@angular/compiler/src/animation/animation_compiler.ts index 0824e6c80c..9c7ce7dded 100644 --- a/modules/@angular/compiler/src/animation/animation_compiler.ts +++ b/modules/@angular/compiler/src/animation/animation_compiler.ts @@ -7,10 +7,11 @@ */ +import {ɵANY_STATE, ɵDEFAULT_STATE, ɵEMPTY_STATE} from '@angular/core'; + import {isPresent} from '../facade/lang'; import {Identifiers, createIdentifier} from '../identifiers'; import * as o from '../output/output_ast'; -import {ANY_STATE, DEFAULT_STATE, EMPTY_STATE} from '../private_import_core'; import {AnimationAst, AnimationAstVisitor, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStateTransitionFnExpression, AnimationStepAst, AnimationStylesAst} from './animation_ast'; @@ -171,11 +172,11 @@ class _AnimationBuilder implements AnimationAstVisitor { _compareToAnimationStateExpr(_ANIMATION_CURRENT_STATE_VAR, stateChange.fromState) .and(_compareToAnimationStateExpr(_ANIMATION_NEXT_STATE_VAR, stateChange.toState))); - if (stateChange.fromState != ANY_STATE) { + if (stateChange.fromState != ɵANY_STATE) { context.stateMap.registerState(stateChange.fromState); } - if (stateChange.toState != ANY_STATE) { + if (stateChange.toState != ɵANY_STATE) { context.stateMap.registerState(stateChange.toState); } } @@ -198,7 +199,7 @@ class _AnimationBuilder implements AnimationAstVisitor { ast.stateDeclarations.forEach(def => def.visit(this, context)); // this should always be defined even if the user overrides it - context.stateMap.registerState(DEFAULT_STATE, {}); + context.stateMap.registerState(ɵDEFAULT_STATE, {}); const statements: o.Statement[] = []; statements.push(_PREVIOUS_ANIMATION_PLAYERS @@ -206,7 +207,7 @@ class _AnimationBuilder implements AnimationAstVisitor { 'getAnimationPlayers', [ _ANIMATION_FACTORY_ELEMENT_VAR, - _ANIMATION_NEXT_STATE_VAR.equals(o.literal(EMPTY_STATE)) + _ANIMATION_NEXT_STATE_VAR.equals(o.literal(ɵEMPTY_STATE)) .conditional(o.NULL_EXPR, o.literal(this.animationName)) ])) .toDeclStmt()); @@ -216,7 +217,7 @@ class _AnimationBuilder implements AnimationAstVisitor { statements.push(_ANIMATION_TIME_VAR.set(o.literal(0)).toDeclStmt()); statements.push( - _ANIMATION_DEFAULT_STATE_VAR.set(this._statesMapVar.key(o.literal(DEFAULT_STATE))) + _ANIMATION_DEFAULT_STATE_VAR.set(this._statesMapVar.key(o.literal(ɵDEFAULT_STATE))) .toDeclStmt()); statements.push( @@ -361,12 +362,12 @@ class _AnimationBuilderStateMap { } function _compareToAnimationStateExpr(value: o.Expression, animationState: string): o.Expression { - const emptyStateLiteral = o.literal(EMPTY_STATE); + const emptyStateLiteral = o.literal(ɵEMPTY_STATE); switch (animationState) { - case EMPTY_STATE: + case ɵEMPTY_STATE: return value.equals(emptyStateLiteral); - case ANY_STATE: + case ɵANY_STATE: return o.literal(true); default: diff --git a/modules/@angular/compiler/src/animation/animation_parser.ts b/modules/@angular/compiler/src/animation/animation_parser.ts index 020369ff14..96f5fef313 100644 --- a/modules/@angular/compiler/src/animation/animation_parser.ts +++ b/modules/@angular/compiler/src/animation/animation_parser.ts @@ -6,13 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵANY_STATE, ɵFILL_STYLE_FLAG} from '@angular/core'; + import {StaticSymbol} from '../aot/static_symbol'; import {CompileAnimationAnimateMetadata, CompileAnimationEntryMetadata, CompileAnimationGroupMetadata, CompileAnimationKeyframesSequenceMetadata, CompileAnimationMetadata, CompileAnimationSequenceMetadata, CompileAnimationStateDeclarationMetadata, CompileAnimationStateTransitionMetadata, CompileAnimationStyleMetadata, CompileAnimationWithStepsMetadata, CompileDirectiveMetadata, identifierName} from '../compile_metadata'; import {StringMapWrapper} from '../facade/collection'; import {isBlank, isPresent} from '../facade/lang'; import {CompilerInjectable} from '../injectable'; import {ParseError} from '../parse_util'; -import {ANY_STATE, FILL_STYLE_FLAG} from '../private_import_core'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {AnimationAst, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStateTransitionExpression, AnimationStateTransitionFnExpression, AnimationStepAst, AnimationStylesAst, AnimationWithStepsAst} from './animation_ast'; @@ -164,7 +165,7 @@ function _parseAnimationTransitionExpr( const toState = match[3]; expressions.push(new AnimationStateTransitionExpression(fromState, toState)); - const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE; + const isFullAnyStateExpr = fromState == ɵANY_STATE && toState == ɵANY_STATE; if (separator[0] == '<' && !isFullAnyStateExpr) { expressions.push(new AnimationStateTransitionExpression(toState, fromState)); } @@ -399,7 +400,7 @@ function _parseAnimationKeyframes( Object.keys(styles).forEach(prop => { if (!isPresent(firstKeyframeStyles[prop])) { - firstKeyframeStyles[prop] = FILL_STYLE_FLAG; + firstKeyframeStyles[prop] = ɵFILL_STYLE_FLAG; } }); } @@ -588,7 +589,7 @@ function _createStartKeyframeFromEndKeyframe( // this is a flag that the runtime code uses to pass // in a value either from the state declaration styles // or using the AUTO_STYLE value (e.g. getComputedStyle) - value = FILL_STYLE_FLAG; + value = ɵFILL_STYLE_FLAG; } if (isPresent(nextEntry) && !nextEntry.matches(endTime, val)) { diff --git a/modules/@angular/compiler/src/aot/compiler_factory.ts b/modules/@angular/compiler/src/aot/compiler_factory.ts index 656c4d0f2c..b5da6f1f2d 100644 --- a/modules/@angular/compiler/src/aot/compiler_factory.ts +++ b/modules/@angular/compiler/src/aot/compiler_factory.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {MissingTranslationStrategy, ViewEncapsulation} from '@angular/core'; - +import {MissingTranslationStrategy, ViewEncapsulation, ɵConsole as Console} from '@angular/core'; import {AnimationParser} from '../animation/animation_parser'; import {CompilerConfig} from '../config'; import {DirectiveNormalizer} from '../directive_normalizer'; @@ -22,7 +21,6 @@ import {NgModuleCompiler} from '../ng_module_compiler'; import {NgModuleResolver} from '../ng_module_resolver'; import {TypeScriptEmitter} from '../output/ts_emitter'; import {PipeResolver} from '../pipe_resolver'; -import {Console} from '../private_import_core'; import {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry'; import {StyleCompiler} from '../style_compiler'; import {TemplateParser} from '../template_parser/template_parser'; diff --git a/modules/@angular/compiler/src/aot/static_reflection_capabilities.ts b/modules/@angular/compiler/src/aot/static_reflection_capabilities.ts index c5d1ce4460..870c3c7f38 100644 --- a/modules/@angular/compiler/src/aot/static_reflection_capabilities.ts +++ b/modules/@angular/compiler/src/aot/static_reflection_capabilities.ts @@ -6,16 +6,16 @@ * found in the LICENSE file at https://angular.io/license */ -import {GetterFn, MethodFn, ReflectionCapabilities, SetterFn, reflector} from '../private_import_core'; +import {ɵGetterFn, ɵMethodFn, ɵReflectionCapabilities, ɵSetterFn, ɵreflector} from '@angular/core'; import {StaticReflector} from './static_reflector'; import {StaticSymbol} from './static_symbol'; export class StaticAndDynamicReflectionCapabilities { static install(staticDelegate: StaticReflector) { - reflector.updateCapabilities(new StaticAndDynamicReflectionCapabilities(staticDelegate)); + ɵreflector.updateCapabilities(new StaticAndDynamicReflectionCapabilities(staticDelegate)); } - private dynamicDelegate = new ReflectionCapabilities(); + private dynamicDelegate = new ɵReflectionCapabilities(); constructor(private staticDelegate: StaticReflector) {} @@ -38,9 +38,9 @@ export class StaticAndDynamicReflectionCapabilities { return isStaticType(typeOrFunc) ? this.staticDelegate.propMetadata(typeOrFunc) : this.dynamicDelegate.propMetadata(typeOrFunc); } - getter(name: string): GetterFn { return this.dynamicDelegate.getter(name); } - setter(name: string): SetterFn { return this.dynamicDelegate.setter(name); } - method(name: string): MethodFn { return this.dynamicDelegate.method(name); } + getter(name: string): ɵGetterFn { return this.dynamicDelegate.getter(name); } + setter(name: string): ɵSetterFn { return this.dynamicDelegate.setter(name); } + method(name: string): ɵMethodFn { return this.dynamicDelegate.method(name); } importUri(type: any): string { return this.staticDelegate.importUri(type); } resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any) { return this.staticDelegate.resolveIdentifier(name, moduleUrl, members); diff --git a/modules/@angular/compiler/src/aot/static_reflector.ts b/modules/@angular/compiler/src/aot/static_reflector.ts index 2e95c7dca1..7c286c86a3 100644 --- a/modules/@angular/compiler/src/aot/static_reflector.ts +++ b/modules/@angular/compiler/src/aot/static_reflector.ts @@ -6,11 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {Attribute, Component, ContentChild, ContentChildren, Directive, Host, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, Pipe, Self, SkipSelf, ViewChild, ViewChildren, animate, group, keyframes, sequence, state, style, transition, trigger} from '@angular/core'; - -import {ReflectorReader} from '../private_import_core'; +import {Attribute, Component, ContentChild, ContentChildren, Directive, Host, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, Pipe, Self, SkipSelf, ViewChild, ViewChildren, animate, group, keyframes, sequence, state, style, transition, trigger, ɵReflectorReader} from '@angular/core'; import {syntaxError} from '../util'; - import {StaticSymbol} from './static_symbol'; import {StaticSymbolResolver} from './static_symbol_resolver'; @@ -22,7 +19,7 @@ const HIDDEN_KEY = /^\$.*\$$/; * A static reflector implements enough of the Reflector API that is necessary to compile * templates statically. */ -export class StaticReflector implements ReflectorReader { +export class StaticReflector implements ɵReflectorReader { private annotationCache = new Map(); private propertyCache = new Map(); private parameterCache = new Map(); diff --git a/modules/@angular/compiler/src/compile_metadata.ts b/modules/@angular/compiler/src/compile_metadata.ts index 5b74ce411d..a1f4e26994 100644 --- a/modules/@angular/compiler/src/compile_metadata.ts +++ b/modules/@angular/compiler/src/compile_metadata.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectionStrategy, ComponentFactory, RendererTypeV2, SchemaMetadata, Type, ViewEncapsulation} from '@angular/core'; +import {ChangeDetectionStrategy, ComponentFactory, ComponentRenderTypeV2, SchemaMetadata, Type, ViewEncapsulation, ɵLifecycleHooks, ɵreflector} from '@angular/core'; import {StaticSymbol} from './aot/static_symbol'; import {ListWrapper} from './facade/collection'; import {isPresent, stringify} from './facade/lang'; -import {LifecycleHooks, reflector} from './private_import_core'; import {CssSelector} from './selector'; import {splitAtColon} from './util'; @@ -110,7 +109,7 @@ export function identifierModuleUrl(compileIdentifier: CompileIdentifierMetadata if (ref instanceof StaticSymbol) { return ref.filePath; } - return reflector.importUri(ref); + return ɵreflector.importUri(ref); } export function viewClassName(compType: any, embeddedTemplateIndex: number): string { @@ -203,7 +202,7 @@ export interface CompileTokenMetadata { */ export interface CompileTypeMetadata extends CompileIdentifierMetadata { diDeps: CompileDiDependencyMetadata[]; - lifecycleHooks: LifecycleHooks[]; + lifecycleHooks: ɵLifecycleHooks[]; reference: any; } diff --git a/modules/@angular/compiler/src/compiler_util/render_util.ts b/modules/@angular/compiler/src/compiler_util/render_util.ts index f6be8950a4..e2d30c5d29 100644 --- a/modules/@angular/compiler/src/compiler_util/render_util.ts +++ b/modules/@angular/compiler/src/compiler_util/render_util.ts @@ -5,11 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import {SecurityContext} from '@angular/core'; - +import {SecurityContext, ɵEMPTY_STATE as EMPTY_ANIMATION_STATE} from '@angular/core'; import {Identifiers, createIdentifier} from '../identifiers'; import * as o from '../output/output_ast'; -import {EMPTY_STATE as EMPTY_ANIMATION_STATE} from '../private_import_core'; import {BoundElementPropertyAst, BoundEventAst, PropertyBindingType} from '../template_parser/template_ast'; import {isFirstViewCheck} from './binding_util'; diff --git a/modules/@angular/compiler/src/directive_resolver.ts b/modules/@angular/compiler/src/directive_resolver.ts index 8b874a5762..4e5e0f6077 100644 --- a/modules/@angular/compiler/src/directive_resolver.ts +++ b/modules/@angular/compiler/src/directive_resolver.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, Directive, HostBinding, HostListener, Input, Output, Query, Type, resolveForwardRef} from '@angular/core'; +import {Component, Directive, HostBinding, HostListener, Input, Output, Query, Type, resolveForwardRef, ɵReflectorReader, ɵreflector} from '@angular/core'; import {ListWrapper, StringMapWrapper} from './facade/collection'; import {stringify} from './facade/lang'; import {CompilerInjectable} from './injectable'; -import {ReflectorReader, reflector} from './private_import_core'; import {splitAtColon} from './util'; /* @@ -23,7 +22,7 @@ import {splitAtColon} from './util'; */ @CompilerInjectable() export class DirectiveResolver { - constructor(private _reflector: ReflectorReader = reflector) {} + constructor(private _reflector: ɵReflectorReader = ɵreflector) {} isDirective(type: Type) { const typeMetadata = this._reflector.annotations(resolveForwardRef(type)); diff --git a/modules/@angular/compiler/src/directive_wrapper_compiler.ts b/modules/@angular/compiler/src/directive_wrapper_compiler.ts index 8531b0f286..2771f4033e 100644 --- a/modules/@angular/compiler/src/directive_wrapper_compiler.ts +++ b/modules/@angular/compiler/src/directive_wrapper_compiler.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵConsole as Console, ɵLifecycleHooks as LifecycleHooks} from '@angular/core'; + import {CompileDirectiveMetadata, CompileDirectiveSummary, CompileIdentifierMetadata, dirWrapperClassName, identifierModuleUrl, identifierName} from './compile_metadata'; import {createCheckBindingField, isFirstViewCheck} from './compiler_util/binding_util'; import {EventHandlerVars, convertActionBinding, legacyConvertPropertyBinding} from './compiler_util/expression_converter'; @@ -18,7 +20,6 @@ import {DEFAULT_INTERPOLATION_CONFIG} from './ml_parser/interpolation_config'; import {ClassBuilder, createClassStmt} from './output/class_builder'; import * as o from './output/output_ast'; import {ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util'; -import {Console, LifecycleHooks} from './private_import_core'; import {ElementSchemaRegistry} from './schema/element_schema_registry'; import {BindingParser} from './template_parser/binding_parser'; import {BoundElementPropertyAst, BoundEventAst} from './template_parser/template_ast'; diff --git a/modules/@angular/compiler/src/i18n/i18n_html_parser.ts b/modules/@angular/compiler/src/i18n/i18n_html_parser.ts index 57bcff2c87..3cb35db441 100644 --- a/modules/@angular/compiler/src/i18n/i18n_html_parser.ts +++ b/modules/@angular/compiler/src/i18n/i18n_html_parser.ts @@ -6,13 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {MissingTranslationStrategy} from '@angular/core'; - +import {MissingTranslationStrategy, ɵConsole as Console} from '@angular/core'; import {HtmlParser} from '../ml_parser/html_parser'; import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config'; import {ParseTreeResult} from '../ml_parser/parser'; -import {Console} from '../private_import_core'; - import {mergeTranslations} from './extractor_merger'; import {Serializer} from './serializers/serializer'; import {Xliff} from './serializers/xliff'; diff --git a/modules/@angular/compiler/src/i18n/translation_bundle.ts b/modules/@angular/compiler/src/i18n/translation_bundle.ts index 1ef8fec6c9..251afb6a58 100644 --- a/modules/@angular/compiler/src/i18n/translation_bundle.ts +++ b/modules/@angular/compiler/src/i18n/translation_bundle.ts @@ -6,12 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {MissingTranslationStrategy} from '@angular/core'; - +import {MissingTranslationStrategy, ɵConsole as Console} from '@angular/core'; import * as html from '../ml_parser/ast'; import {HtmlParser} from '../ml_parser/html_parser'; -import {Console} from '../private_import_core'; - import * as i18n from './i18n_ast'; import {I18nError} from './parse_util'; import {PlaceholderMapper, Serializer} from './serializers/serializer'; diff --git a/modules/@angular/compiler/src/jit/compiler.ts b/modules/@angular/compiler/src/jit/compiler.ts index a90429cf64..42b247f805 100644 --- a/modules/@angular/compiler/src/jit/compiler.ts +++ b/modules/@angular/compiler/src/jit/compiler.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Compiler, ComponentFactory, Inject, Injector, ModuleWithComponentFactories, NgModuleFactory, RendererTypeV2, Type} from '@angular/core'; +import {Compiler, ComponentFactory, ComponentRenderTypeV2, Inject, Injector, ModuleWithComponentFactories, NgModuleFactory, Type, ɵview_utils as view_utils} from '@angular/core'; import {AnimationCompiler} from '../animation/animation_compiler'; import {AnimationParser} from '../animation/animation_parser'; @@ -20,7 +20,6 @@ import {NgModuleCompiler} from '../ng_module_compiler'; import * as ir from '../output/output_ast'; import {interpretStatements} from '../output/output_interpreter'; import {jitStatements} from '../output/output_jit'; -import {view_utils} from '../private_import_core'; import {CompiledStylesheet, StyleCompiler} from '../style_compiler'; import {TemplateParser} from '../template_parser/template_parser'; import {SyncAsyncResult} from '../util'; diff --git a/modules/@angular/compiler/src/jit/compiler_factory.ts b/modules/@angular/compiler/src/jit/compiler_factory.ts index e83d5cabbc..129fc693b6 100644 --- a/modules/@angular/compiler/src/jit/compiler_factory.ts +++ b/modules/@angular/compiler/src/jit/compiler_factory.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {COMPILER_OPTIONS, Compiler, CompilerFactory, CompilerOptions, Inject, InjectionToken, MissingTranslationStrategy, Optional, PLATFORM_INITIALIZER, PlatformRef, Provider, ReflectiveInjector, TRANSLATIONS, TRANSLATIONS_FORMAT, Type, ViewEncapsulation, createPlatformFactory, isDevMode, platformCore} from '@angular/core'; - +import {COMPILER_OPTIONS, Compiler, CompilerFactory, CompilerOptions, Inject, InjectionToken, MissingTranslationStrategy, Optional, PLATFORM_INITIALIZER, PlatformRef, Provider, ReflectiveInjector, TRANSLATIONS, TRANSLATIONS_FORMAT, Type, ViewEncapsulation, createPlatformFactory, isDevMode, platformCore, ɵConsole as Console, ɵReflectionCapabilities as ReflectionCapabilities, ɵReflector as Reflector, ɵReflectorReader as ReflectorReader, ɵreflector as reflector} from '@angular/core'; import {AnimationParser} from '../animation/animation_parser'; import {CompilerConfig, USE_VIEW_ENGINE} from '../config'; import {DirectiveNormalizer} from '../directive_normalizer'; @@ -22,7 +21,6 @@ import {HtmlParser} from '../ml_parser/html_parser'; import {NgModuleCompiler} from '../ng_module_compiler'; import {NgModuleResolver} from '../ng_module_resolver'; import {PipeResolver} from '../pipe_resolver'; -import {Console, ReflectionCapabilities, Reflector, ReflectorReader, reflector} from '../private_import_core'; import {ResourceLoader} from '../resource_loader'; import {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; diff --git a/modules/@angular/compiler/src/lifecycle_reflector.ts b/modules/@angular/compiler/src/lifecycle_reflector.ts index 3cecb5e3ac..00decb2c51 100644 --- a/modules/@angular/compiler/src/lifecycle_reflector.ts +++ b/modules/@angular/compiler/src/lifecycle_reflector.ts @@ -6,30 +6,30 @@ * found in the LICENSE file at https://angular.io/license */ -import {LifecycleHooks, reflector} from './private_import_core'; +import {ɵLifecycleHooks, ɵreflector} from '@angular/core'; -export function hasLifecycleHook(hook: LifecycleHooks, token: any): boolean { - return reflector.hasLifecycleHook(token, getHookName(hook)); +export function hasLifecycleHook(hook: ɵLifecycleHooks, token: any): boolean { + return ɵreflector.hasLifecycleHook(token, getHookName(hook)); } -function getHookName(hook: LifecycleHooks): string { +function getHookName(hook: ɵLifecycleHooks): string { switch (hook) { - case LifecycleHooks.OnInit: + case ɵLifecycleHooks.OnInit: return 'ngOnInit'; - case LifecycleHooks.OnDestroy: + case ɵLifecycleHooks.OnDestroy: return 'ngOnDestroy'; - case LifecycleHooks.DoCheck: + case ɵLifecycleHooks.DoCheck: return 'ngDoCheck'; - case LifecycleHooks.OnChanges: + case ɵLifecycleHooks.OnChanges: return 'ngOnChanges'; - case LifecycleHooks.AfterContentInit: + case ɵLifecycleHooks.AfterContentInit: return 'ngAfterContentInit'; - case LifecycleHooks.AfterContentChecked: + case ɵLifecycleHooks.AfterContentChecked: return 'ngAfterContentChecked'; - case LifecycleHooks.AfterViewInit: + case ɵLifecycleHooks.AfterViewInit: return 'ngAfterViewInit'; - case LifecycleHooks.AfterViewChecked: + case ɵLifecycleHooks.AfterViewChecked: return 'ngAfterViewChecked'; } -} \ No newline at end of file +} diff --git a/modules/@angular/compiler/src/metadata_resolver.ts b/modules/@angular/compiler/src/metadata_resolver.ts index a7c7603033..40c84e71bf 100644 --- a/modules/@angular/compiler/src/metadata_resolver.ts +++ b/modules/@angular/compiler/src/metadata_resolver.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationStateDeclarationMetadata, AnimationStateMetadata, AnimationStateTransitionMetadata, AnimationStyleMetadata, AnimationWithStepsMetadata, Attribute, ChangeDetectionStrategy, Component, ComponentFactory, Directive, Host, Inject, Injectable, InjectionToken, ModuleWithProviders, Optional, Provider, Query, RendererTypeV2, SchemaMetadata, Self, SkipSelf, Type, resolveForwardRef} from '@angular/core'; +import {AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationStateDeclarationMetadata, AnimationStateMetadata, AnimationStateTransitionMetadata, AnimationStyleMetadata, AnimationWithStepsMetadata, Attribute, ChangeDetectionStrategy, Component, ComponentFactory, ComponentRenderTypeV2, Directive, Host, Inject, Injectable, InjectionToken, ModuleWithProviders, Optional, Provider, Query, SchemaMetadata, Self, SkipSelf, Type, resolveForwardRef, ɵERROR_COMPONENT_TYPE, ɵLIFECYCLE_HOOKS_VALUES, ɵReflectorReader, ɵreflector, ɵviewEngine} from '@angular/core'; import {StaticSymbol, StaticSymbolCache} from './aot/static_symbol'; import {ngfactoryFilePath} from './aot/util'; @@ -21,7 +21,6 @@ import {CompilerInjectable} from './injectable'; import {hasLifecycleHook} from './lifecycle_reflector'; import {NgModuleResolver} from './ng_module_resolver'; import {PipeResolver} from './pipe_resolver'; -import {ERROR_COMPONENT_TYPE, LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector, viewEngine} from './private_import_core'; import {ElementSchemaRegistry} from './schema/element_schema_registry'; import {SummaryResolver} from './summary_resolver'; import {getUrlScheme} from './url_resolver'; @@ -54,7 +53,7 @@ export class CompileMetadataResolver { private _schemaRegistry: ElementSchemaRegistry, private _directiveNormalizer: DirectiveNormalizer, @Optional() private _staticSymbolCache: StaticSymbolCache, - private _reflector: ReflectorReader = reflector, + private _reflector: ɵReflectorReader = ɵreflector, @Optional() @Inject(ERROR_COLLECTOR_TOKEN) private _errorCollector?: ErrorCollector) {} clearCacheFor(type: Type) { @@ -152,7 +151,7 @@ export class CompileMetadataResolver { } else { const hostView = this.getHostComponentViewClass(dirType); if (this._config.useViewEngine) { - return viewEngine.createComponentFactory(selector, dirType, hostView); + return ɵviewEngine.createComponentFactory(selector, dirType, hostView); } else { return new ComponentFactory(selector, hostView, dirType); } @@ -742,7 +741,7 @@ export class CompileMetadataResolver { reference: identifier.reference, diDeps: this._getDependenciesMetadata(identifier.reference, dependencies), lifecycleHooks: - LIFECYCLE_HOOKS_VALUES.filter(hook => hasLifecycleHook(hook, identifier.reference)), + ɵLIFECYCLE_HOOKS_VALUES.filter(hook => hasLifecycleHook(hook, identifier.reference)), }; } @@ -1092,7 +1091,7 @@ function isValidType(value: any): boolean { } export function componentModuleUrl( - reflector: ReflectorReader, type: Type, cmpMetadata: Component): string { + reflector: ɵReflectorReader, type: Type, cmpMetadata: Component): string { if (type instanceof StaticSymbol) { return type.filePath; } @@ -1136,6 +1135,6 @@ function componentStillLoadingError(compType: Type) { debugger; const error = Error(`Can't compile synchronously as ${stringify(compType)} is still being loaded!`); - (error as any)[ERROR_COMPONENT_TYPE] = compType; + (error as any)[ɵERROR_COMPONENT_TYPE] = compType; return error; } diff --git a/modules/@angular/compiler/src/ng_module_compiler.ts b/modules/@angular/compiler/src/ng_module_compiler.ts index a917c9df81..cb25348107 100644 --- a/modules/@angular/compiler/src/ng_module_compiler.ts +++ b/modules/@angular/compiler/src/ng_module_compiler.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵLifecycleHooks} from '@angular/core'; + import {CompileDiDependencyMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompileProviderMetadata, CompileTokenMetadata, identifierModuleUrl, identifierName, tokenName, tokenReference} from './compile_metadata'; import {createDiTokenExpression} from './compiler_util/identifier_util'; import {isPresent} from './facade/lang'; @@ -15,10 +17,10 @@ import {ClassBuilder, createClassStmt} from './output/class_builder'; import * as o from './output/output_ast'; import {convertValueToOutputAst} from './output/value_util'; import {ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util'; -import {LifecycleHooks} from './private_import_core'; import {NgModuleProviderAnalyzer} from './provider_analyzer'; import {ProviderAst} from './template_parser/template_ast'; + /** * This is currently not read, but will probably be used in the future. * We keep it as we already pass it through all the rigth places... @@ -109,7 +111,7 @@ class _InjectorBuilder implements ClassBuilder { const instance = this._createProviderProperty( propName, resolvedProvider, providerValueExpressions, resolvedProvider.multiProvider, resolvedProvider.eager); - if (resolvedProvider.lifecycleHooks.indexOf(LifecycleHooks.OnDestroy) !== -1) { + if (resolvedProvider.lifecycleHooks.indexOf(ɵLifecycleHooks.OnDestroy) !== -1) { this._destroyStmts.push(instance.callMethod('ngOnDestroy', []).toStmt()); } this._tokens.push(resolvedProvider.token); diff --git a/modules/@angular/compiler/src/ng_module_resolver.ts b/modules/@angular/compiler/src/ng_module_resolver.ts index 581b4110ad..85dca86449 100644 --- a/modules/@angular/compiler/src/ng_module_resolver.ts +++ b/modules/@angular/compiler/src/ng_module_resolver.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule, Type} from '@angular/core'; +import {NgModule, Type, ɵReflectorReader, ɵreflector} from '@angular/core'; import {ListWrapper} from './facade/collection'; import {stringify} from './facade/lang'; import {CompilerInjectable} from './injectable'; -import {ReflectorReader, reflector} from './private_import_core'; function _isNgModuleMetadata(obj: any): obj is NgModule { return obj instanceof NgModule; @@ -22,7 +21,7 @@ function _isNgModuleMetadata(obj: any): obj is NgModule { */ @CompilerInjectable() export class NgModuleResolver { - constructor(private _reflector: ReflectorReader = reflector) {} + constructor(private _reflector: ɵReflectorReader = ɵreflector) {} isNgModule(type: any) { return this._reflector.annotations(type).some(_isNgModuleMetadata); } diff --git a/modules/@angular/compiler/src/pipe_resolver.ts b/modules/@angular/compiler/src/pipe_resolver.ts index 2a8cb7e6ee..140e4f845f 100644 --- a/modules/@angular/compiler/src/pipe_resolver.ts +++ b/modules/@angular/compiler/src/pipe_resolver.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {Pipe, Type, resolveForwardRef} from '@angular/core'; +import {Pipe, Type, resolveForwardRef, ɵReflectorReader, ɵreflector} from '@angular/core'; import {ListWrapper} from './facade/collection'; import {stringify} from './facade/lang'; import {CompilerInjectable} from './injectable'; -import {ReflectorReader, reflector} from './private_import_core'; function _isPipeMetadata(type: any): boolean { return type instanceof Pipe; @@ -26,7 +25,7 @@ function _isPipeMetadata(type: any): boolean { */ @CompilerInjectable() export class PipeResolver { - constructor(private _reflector: ReflectorReader = reflector) {} + constructor(private _reflector: ɵReflectorReader = ɵreflector) {} isPipe(type: Type) { const typeMetadata = this._reflector.annotations(resolveForwardRef(type)); diff --git a/modules/@angular/compiler/src/private_import_core.ts b/modules/@angular/compiler/src/private_import_core.ts deleted file mode 100644 index 8f8811dbb6..0000000000 --- a/modules/@angular/compiler/src/private_import_core.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const isDefaultChangeDetectionStrategy: typeof r.isDefaultChangeDetectionStrategy = - r.isDefaultChangeDetectionStrategy; -export type ChangeDetectorStatus = typeof r._ChangeDetectorStatus; -export const ChangeDetectorStatus: typeof r.ChangeDetectorStatus = r.ChangeDetectorStatus; -export type LifecycleHooks = typeof r._LifecycleHooks; -export const LifecycleHooks: typeof r.LifecycleHooks = r.LifecycleHooks; -export const LIFECYCLE_HOOKS_VALUES: typeof r.LIFECYCLE_HOOKS_VALUES = r.LIFECYCLE_HOOKS_VALUES; -export type ReflectorReader = typeof r._ReflectorReader; -export const ReflectorReader: typeof r.ReflectorReader = r.ReflectorReader; -export type ViewContainer = typeof r._ViewContainer; -export const ViewContainer: typeof r.ViewContainer = r.ViewContainer; -export const CodegenComponentFactoryResolver: typeof r.CodegenComponentFactoryResolver = - r.CodegenComponentFactoryResolver; -export const ComponentRef_: typeof r.ComponentRef_ = r.ComponentRef_; -export const AppView: typeof r.AppView = r.AppView; -export const DebugAppView: typeof r.DebugAppView = r.DebugAppView; -export const NgModuleInjector: typeof r.NgModuleInjector = r.NgModuleInjector; -export const registerModuleFactory: typeof r.registerModuleFactory = r.registerModuleFactory; -export type ViewType = typeof r._ViewType; -export const ViewType: typeof r.ViewType = r.ViewType; -export const view_utils: typeof r.view_utils = r.view_utils; -export const viewEngine: typeof r.viewEngine = r.viewEngine; -export const DebugContext: typeof r.DebugContext = r.DebugContext; -export const StaticNodeDebugInfo: typeof r.StaticNodeDebugInfo = r.StaticNodeDebugInfo; -export const devModeEqual: typeof r.devModeEqual = r.devModeEqual; -export const ValueUnwrapper: typeof r.ValueUnwrapper = r.ValueUnwrapper; -export const TemplateRef_: typeof r.TemplateRef_ = r.TemplateRef_; -export type RenderDebugInfo = typeof r._RenderDebugInfo; -export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo; -export type Console = typeof r._Console; -export const Console: typeof r.Console = r.Console; -export const reflector: typeof r.reflector = r.reflector; -export const Reflector: typeof r.Reflector = r.Reflector; -export type Reflector = typeof r._Reflector; -export type ReflectionCapabilities = typeof r._ReflectionCapabilities; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer; -export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer; -export type AnimationPlayer = typeof r._AnimationPlayer; -export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer; -export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer; -export const AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer; -export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer; -export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer; -export type AnimationKeyframe = typeof r._AnimationKeyframe; -export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe; -export type AnimationStyles = typeof r._AnimationStyles; -export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles; -export const ANY_STATE = r.ANY_STATE; -export const DEFAULT_STATE = r.DEFAULT_STATE; -export const EMPTY_STATE = r.EMPTY_STATE; -export const ERROR_COMPONENT_TYPE = r.ERROR_COMPONENT_TYPE; -export const FILL_STYLE_FLAG = r.FILL_STYLE_FLAG; -export const prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles = - r.prepareFinalAnimationStyles; -export const balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes = - r.balanceAnimationKeyframes; -export const clearStyles: typeof r.clearStyles = r.clearStyles; -export const collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles; -export const renderStyles: typeof r.renderStyles = r.renderStyles; -export type ViewMetadata = typeof r._ViewMetadata; -export const ViewMetadata: typeof r.ViewMetadata = r.ViewMetadata; -export const AnimationTransition: typeof r.AnimationTransition = r.AnimationTransition; -export type SetterFn = typeof r._SetterFn; -export type GetterFn = typeof r._GetterFn; -export type MethodFn = typeof r._MethodFn; diff --git a/modules/@angular/compiler/src/template_parser/template_ast.ts b/modules/@angular/compiler/src/template_parser/template_ast.ts index ead3cff538..a017233bef 100644 --- a/modules/@angular/compiler/src/template_parser/template_ast.ts +++ b/modules/@angular/compiler/src/template_parser/template_ast.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import {SecurityContext} from '@angular/core'; +import {SecurityContext, ɵLifecycleHooks as LifecycleHooks} from '@angular/core'; import {CompileDirectiveSummary, CompileProviderMetadata, CompileTokenMetadata} from '../compile_metadata'; import {AST} from '../expression_parser/ast'; import {ParseSourceSpan} from '../parse_util'; -import {LifecycleHooks} from '../private_import_core'; /** * An Abstract Syntax Tree node representing part of a parsed Angular template. diff --git a/modules/@angular/compiler/src/template_parser/template_parser.ts b/modules/@angular/compiler/src/template_parser/template_parser.ts index 23dbe16ac4..986f3900ce 100644 --- a/modules/@angular/compiler/src/template_parser/template_parser.ts +++ b/modules/@angular/compiler/src/template_parser/template_parser.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Inject, InjectionToken, Optional, SchemaMetadata} from '@angular/core'; - +import {Inject, InjectionToken, Optional, SchemaMetadata, ɵConsole as Console} from '@angular/core'; import {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileTemplateSummary, CompileTokenMetadata, CompileTypeMetadata, identifierName} from '../compile_metadata'; import {CompilerConfig} from '../config'; import {AST, ASTWithSource, EmptyExpr} from '../expression_parser/ast'; @@ -22,13 +21,11 @@ import {expandNodes} from '../ml_parser/icu_ast_expander'; import {InterpolationConfig} from '../ml_parser/interpolation_config'; import {splitNsName} from '../ml_parser/tags'; import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util'; -import {Console} from '../private_import_core'; import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {CssSelector, SelectorMatcher} from '../selector'; import {isStyleUrlResolvable} from '../style_url_resolver'; import {syntaxError} from '../util'; - import {BindingParser, BoundProperty} from './binding_parser'; import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from './template_ast'; import {PreparsedElementType, preparseElement} from './template_preparser'; @@ -901,4 +898,4 @@ function isEmptyExpression(ast: AST): boolean { ast = ast.ast; } return ast instanceof EmptyExpr; -} \ No newline at end of file +} diff --git a/modules/@angular/compiler/src/view_compiler/compile_view.ts b/modules/@angular/compiler/src/view_compiler/compile_view.ts index 768151dbc5..89534664b8 100644 --- a/modules/@angular/compiler/src/view_compiler/compile_view.ts +++ b/modules/@angular/compiler/src/view_compiler/compile_view.ts @@ -6,13 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵViewType as ViewType} from '@angular/core'; + import {AnimationEntryCompileResult} from '../animation/animation_compiler'; import {CompileDirectiveMetadata, CompilePipeSummary, rendererTypeName, tokenName, viewClassName} from '../compile_metadata'; import {EventHandlerVars, LegacyNameResolver} from '../compiler_util/expression_converter'; import {CompilerConfig} from '../config'; import {isPresent} from '../facade/lang'; import * as o from '../output/output_ast'; -import {ViewType} from '../private_import_core'; import {CompileElement, CompileNode} from './compile_element'; import {CompileMethod} from './compile_method'; diff --git a/modules/@angular/compiler/src/view_compiler/constants.ts b/modules/@angular/compiler/src/view_compiler/constants.ts index 684925d329..2f887b8be8 100644 --- a/modules/@angular/compiler/src/view_compiler/constants.ts +++ b/modules/@angular/compiler/src/view_compiler/constants.ts @@ -6,12 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; - +import {ChangeDetectionStrategy, ViewEncapsulation, ɵViewType as ViewType} from '@angular/core'; import {createEnumExpression} from '../compiler_util/identifier_util'; import {Identifiers} from '../identifiers'; import * as o from '../output/output_ast'; -import {ViewType} from '../private_import_core'; export class ViewTypeEnum { static fromValue(value: ViewType): o.Expression { diff --git a/modules/@angular/compiler/src/view_compiler/lifecycle_binder.ts b/modules/@angular/compiler/src/view_compiler/lifecycle_binder.ts index 9fd8e2fb23..a403045f54 100644 --- a/modules/@angular/compiler/src/view_compiler/lifecycle_binder.ts +++ b/modules/@angular/compiler/src/view_compiler/lifecycle_binder.ts @@ -6,11 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵLifecycleHooks as LifecycleHooks} from '@angular/core'; + import {CompileDirectiveSummary, CompilePipeSummary} from '../compile_metadata'; import {isFirstViewCheck} from '../compiler_util/binding_util'; import {DirectiveWrapperExpressions} from '../directive_wrapper_compiler'; import * as o from '../output/output_ast'; -import {LifecycleHooks} from '../private_import_core'; import {DirectiveAst, ProviderAst, ProviderAstType} from '../template_parser/template_ast'; import {CompileElement} from './compile_element'; diff --git a/modules/@angular/compiler/src/view_compiler/property_binder.ts b/modules/@angular/compiler/src/view_compiler/property_binder.ts index 7e3b98d7bb..5f81473bb3 100644 --- a/modules/@angular/compiler/src/view_compiler/property_binder.ts +++ b/modules/@angular/compiler/src/view_compiler/property_binder.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {SecurityContext} from '@angular/core'; - +import {SecurityContext, ɵisDefaultChangeDetectionStrategy as isDefaultChangeDetectionStrategy} from '@angular/core'; import {createCheckBindingField} from '../compiler_util/binding_util'; import {legacyConvertPropertyBinding} from '../compiler_util/expression_converter'; import {createEnumExpression} from '../compiler_util/identifier_util'; @@ -15,7 +14,6 @@ import {createCheckAnimationBindingStmts, createCheckRenderBindingStmt} from '.. import {DirectiveWrapperExpressions} from '../directive_wrapper_compiler'; import {Identifiers, createIdentifier} from '../identifiers'; import * as o from '../output/output_ast'; -import {isDefaultChangeDetectionStrategy} from '../private_import_core'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, PropertyBindingType} from '../template_parser/template_ast'; diff --git a/modules/@angular/compiler/src/view_compiler/util.ts b/modules/@angular/compiler/src/view_compiler/util.ts index 800aa3914a..6c1c1336e1 100644 --- a/modules/@angular/compiler/src/view_compiler/util.ts +++ b/modules/@angular/compiler/src/view_compiler/util.ts @@ -7,10 +7,11 @@ */ +import {ɵViewType as ViewType} from '@angular/core'; + import {CompileTokenMetadata} from '../compile_metadata'; import {createDiTokenExpression} from '../compiler_util/identifier_util'; import * as o from '../output/output_ast'; -import {ViewType} from '../private_import_core'; import {CompileView} from './compile_view'; diff --git a/modules/@angular/compiler/src/view_compiler/view_builder.ts b/modules/@angular/compiler/src/view_compiler/view_builder.ts index e93f44c554..eabcb8a925 100644 --- a/modules/@angular/compiler/src/view_compiler/view_builder.ts +++ b/modules/@angular/compiler/src/view_compiler/view_builder.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ViewEncapsulation} from '@angular/core'; - +import {ViewEncapsulation, ɵChangeDetectorStatus as ChangeDetectorStatus, ɵViewType as ViewType, ɵisDefaultChangeDetectionStrategy as isDefaultChangeDetectionStrategy} from '@angular/core'; import {CompileDirectiveSummary, identifierModuleUrl, identifierName} from '../compile_metadata'; import {legacyCreateSharedBindingVariablesIfNeeded} from '../compiler_util/expression_converter'; import {createDiTokenExpression, createInlineArray} from '../compiler_util/identifier_util'; @@ -15,7 +14,6 @@ import {isPresent} from '../facade/lang'; import {Identifiers, createIdentifier, identifierToken} from '../identifiers'; import {createClassStmt} from '../output/class_builder'; import * as o from '../output/output_ast'; -import {ChangeDetectorStatus, ViewType, isDefaultChangeDetectionStrategy} from '../private_import_core'; import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast'; import {CompileElement, CompileNode} from './compile_element'; diff --git a/modules/@angular/compiler/src/view_compiler_next/view_compiler.ts b/modules/@angular/compiler/src/view_compiler_next/view_compiler.ts index 125f133e3c..f5d5a57a9a 100644 --- a/modules/@angular/compiler/src/view_compiler_next/view_compiler.ts +++ b/modules/@angular/compiler/src/view_compiler_next/view_compiler.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; +import {ChangeDetectionStrategy, ViewEncapsulation, ɵLifecycleHooks as LifecycleHooks, ɵviewEngine as viewEngine} from '@angular/core'; import {AnimationEntryCompileResult} from '../animation/animation_compiler'; import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileProviderMetadata, CompileTokenMetadata, CompileTypeMetadata, identifierModuleUrl, identifierName, rendererTypeName, tokenReference, viewClassName} from '../compile_metadata'; @@ -17,7 +17,6 @@ import {Identifiers, createIdentifier, createIdentifierToken, resolveIdentifier} import {CompilerInjectable} from '../injectable'; import * as o from '../output/output_ast'; import {convertValueToOutputAst} from '../output/value_util'; -import {LifecycleHooks, viewEngine} from '../private_import_core'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAst, ProviderAstType, QueryMatch, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast'; import {ComponentFactoryDependency, ComponentViewDependency, DirectiveWrapperDependency, ViewCompileResult, ViewCompiler} from '../view_compiler/view_compiler'; diff --git a/modules/@angular/compiler/test/animation/animation_parser_spec.ts b/modules/@angular/compiler/test/animation/animation_parser_spec.ts index df02546cec..37aa1c95d6 100644 --- a/modules/@angular/compiler/test/animation/animation_parser_spec.ts +++ b/modules/@angular/compiler/test/animation/animation_parser_spec.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationMetadata, animate, group, keyframes, sequence, style, transition, trigger} from '@angular/core'; +import {AnimationMetadata, animate, group, keyframes, sequence, style, transition, trigger, ɵFILL_STYLE_FLAG as FILL_STYLE_FLAG, ɵflattenStyles as flattenStyles} from '@angular/core'; import {beforeEach, describe, inject, it} from '@angular/core/testing/testing_internal'; import {expect} from '@angular/platform-browser/testing/matchers'; - import {AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStepAst, AnimationStylesAst} from '../../src/animation/animation_ast'; import {AnimationParser} from '../../src/animation/animation_parser'; import {CompileMetadataResolver} from '../../src/metadata_resolver'; import {ElementSchemaRegistry} from '../../src/schema/element_schema_registry'; -import {FILL_STYLE_FLAG, flattenStyles} from '../private_import_core'; export function main() { describe('parseAnimationEntry', () => { diff --git a/modules/@angular/compiler/test/aot/compiler_spec.ts b/modules/@angular/compiler/test/aot/compiler_spec.ts index 923757eefe..1a4fd41bb9 100644 --- a/modules/@angular/compiler/test/aot/compiler_spec.ts +++ b/modules/@angular/compiler/test/aot/compiler_spec.ts @@ -7,13 +7,11 @@ */ import {AotCompiler, AotCompilerHost, AotCompilerOptions, createAotCompiler} from '@angular/compiler'; -import {RenderComponentType} from '@angular/core'; +import {RenderComponentType, ɵReflectionCapabilities as ReflectionCapabilities, ɵreflector as reflector} from '@angular/core'; import {async} from '@angular/core/testing'; import {MetadataBundler, MetadataCollector, ModuleMetadata, privateEntriesToIndex} from '@angular/tsc-wrapped'; import * as path from 'path'; import * as ts from 'typescript'; - -import {ReflectionCapabilities, reflector} from './private_import_core'; import {EmittingCompilerHost, MockAotCompilerHost, MockCompilerHost, MockData, MockMetadataBundlerHost, settings} from './test_util'; const DTS = /\.d\.ts$/; diff --git a/modules/@angular/compiler/test/aot/private_import_core.ts b/modules/@angular/compiler/test/aot/private_import_core.ts deleted file mode 100644 index e86f1ec763..0000000000 --- a/modules/@angular/compiler/test/aot/private_import_core.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export type ReflectionCapabilities = typeof r._ReflectionCapabilities; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const reflector: typeof r.reflector = r.reflector; diff --git a/modules/@angular/compiler/test/directive_resolver_mock_spec.ts b/modules/@angular/compiler/test/directive_resolver_mock_spec.ts index c7624fe7f6..240a6f6289 100644 --- a/modules/@angular/compiler/test/directive_resolver_mock_spec.ts +++ b/modules/@angular/compiler/test/directive_resolver_mock_spec.ts @@ -6,13 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, Directive, Injector} from '@angular/core'; +import {Component, Directive, Injector, ɵViewMetadata as ViewMetadata} from '@angular/core'; import {TestBed, inject} from '@angular/core/testing'; - import {MockDirectiveResolver} from '../testing/index'; -import {ViewMetadata} from './private_import_core'; - export function main() { describe('MockDirectiveResolver', () => { let dirResolver: MockDirectiveResolver; diff --git a/modules/@angular/compiler/test/private_import_core.ts b/modules/@angular/compiler/test/private_import_core.ts deleted file mode 100644 index e78ac704bb..0000000000 --- a/modules/@angular/compiler/test/private_import_core.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as _} from '../../core/index'; - -export type ViewMetadata = typeof _._ViewMetadata; -export const ViewMetadata: typeof _.ViewMetadata = _.ViewMetadata; - -export const FILL_STYLE_FLAG = _.FILL_STYLE_FLAG; -export const flattenStyles: typeof _.flattenStyles = _.flattenStyles; diff --git a/modules/@angular/compiler/test/runtime_compiler_spec.ts b/modules/@angular/compiler/test/runtime_compiler_spec.ts index 59b5c41e91..80127bd27d 100644 --- a/modules/@angular/compiler/test/runtime_compiler_spec.ts +++ b/modules/@angular/compiler/test/runtime_compiler_spec.ts @@ -7,14 +7,12 @@ */ import {DirectiveResolver, ResourceLoader} from '@angular/compiler'; -import {Compiler, Component, Injector, NgModule, NgModuleFactory} from '@angular/core'; +import {Compiler, Component, Injector, NgModule, NgModuleFactory, ɵViewMetadata as ViewMetadata} from '@angular/core'; import {TestBed, async, fakeAsync, inject, tick} from '@angular/core/testing'; import {expect} from '@angular/platform-browser/testing/matchers'; import {stringify} from '../src/facade/lang'; import {MockDirectiveResolver} from '../testing/index'; - -import {ViewMetadata} from './private_import_core'; import {SpyResourceLoader} from './spies'; @Component({selector: 'child-cmp'}) diff --git a/modules/@angular/compiler/testing/directive_resolver_mock.ts b/modules/@angular/compiler/testing/directive_resolver_mock.ts index dd83f28885..8f2bb286fb 100644 --- a/modules/@angular/compiler/testing/directive_resolver_mock.ts +++ b/modules/@angular/compiler/testing/directive_resolver_mock.ts @@ -6,10 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import {DirectiveResolver} from '@angular/compiler'; -import {AnimationEntryMetadata, Compiler, Component, Directive, Injectable, Injector, Provider, Type, resolveForwardRef} from '@angular/core'; - +import {AnimationEntryMetadata, Compiler, Component, Directive, Injectable, Injector, Provider, Type, resolveForwardRef, ɵViewMetadata as ViewMetadata} from '@angular/core'; import {isPresent} from './facade/lang'; -import {ViewMetadata} from './private_import_core'; diff --git a/modules/@angular/compiler/testing/index.ts b/modules/@angular/compiler/testing/index.ts index 6f2ad57269..dc5aeb67e9 100644 --- a/modules/@angular/compiler/testing/index.ts +++ b/modules/@angular/compiler/testing/index.ts @@ -27,8 +27,7 @@ export * from './ng_module_resolver_mock'; export * from './pipe_resolver_mock'; import {createPlatformFactory, ModuleWithComponentFactories, Injectable, CompilerOptions, COMPILER_OPTIONS, CompilerFactory, NgModuleFactory, Injector, NgModule, Component, Directive, Pipe, Type, PlatformRef} from '@angular/core'; -import {MetadataOverride} from '@angular/core/testing'; -import {TestingCompilerFactory, TestingCompiler} from './private_import_core'; +import {MetadataOverride, ɵTestingCompilerFactory as TestingCompilerFactory, ɵTestingCompiler as TestingCompiler} from '@angular/core/testing'; import {platformCoreDynamic, JitCompiler, DirectiveResolver, NgModuleResolver, PipeResolver} from '@angular/compiler'; import {MockDirectiveResolver} from './directive_resolver_mock'; import {MockNgModuleResolver} from './ng_module_resolver_mock'; diff --git a/modules/@angular/compiler/testing/private_import_core.ts b/modules/@angular/compiler/testing/private_import_core.ts deleted file mode 100644 index 7764054ca6..0000000000 --- a/modules/@angular/compiler/testing/private_import_core.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - - -import {__core_private__ as r} from '@angular/core'; - -export type ViewMetadata = typeof r._ViewMetadata; -export const ViewMetadata: typeof r.ViewMetadata = r.ViewMetadata; - -import {__core_private_testing__ as r2} from '@angular/core/testing'; - -export type TestingCompiler = typeof r2._TestingCompiler; -export const TestingCompiler: typeof r2.TestingCompiler = r2.TestingCompiler; - -export type TestingCompilerFactory = typeof r2._TestingCompilerFactory; -export const TestingCompilerFactory: typeof r2.TestingCompilerFactory = r2.TestingCompilerFactory; diff --git a/modules/@angular/core/src/core_private_export.ts b/modules/@angular/core/src/core_private_export.ts index af753febd1..c98b02e4e8 100644 --- a/modules/@angular/core/src/core_private_export.ts +++ b/modules/@angular/core/src/core_private_export.ts @@ -6,180 +6,35 @@ * found in the LICENSE file at https://angular.io/license */ -import {ANY_STATE as ANY_STATE_, DEFAULT_STATE as DEFAULT_STATE_, EMPTY_STATE as EMPTY_STATE_, FILL_STYLE_FLAG as FILL_STYLE_FLAG_} from './animation/animation_constants'; -import {AnimationGroupPlayer as AnimationGroupPlayer_} from './animation/animation_group_player'; -import {AnimationKeyframe as AnimationKeyframe_} from './animation/animation_keyframe'; -import {AnimationPlayer as AnimationPlayer_, NoOpAnimationPlayer as NoOpAnimationPlayer_} from './animation/animation_player'; -import {AnimationSequencePlayer as AnimationSequencePlayer_} from './animation/animation_sequence_player'; -import * as animationUtils from './animation/animation_style_util'; -import {AnimationStyles as AnimationStyles_} from './animation/animation_styles'; -import {AnimationTransition} from './animation/animation_transition'; -import {ALLOW_MULTIPLE_PLATFORMS} from './application_ref'; -import * as application_tokens from './application_tokens'; -import * as change_detection_util from './change_detection/change_detection_util'; -import * as constants from './change_detection/constants'; -import * as console from './console'; -import * as debug from './debug/debug_renderer'; -import * as reflective_provider from './di/reflective_provider'; -import {ERROR_COMPONENT_TYPE} from './errors'; -import * as component_factory from './linker/component_factory'; -import * as component_factory_resolver from './linker/component_factory_resolver'; -import * as debug_context from './linker/debug_context'; -import * as ng_module_factory from './linker/ng_module_factory'; -import * as ng_module_factory_loader from './linker/ng_module_factory_loader'; -import * as template_ref from './linker/template_ref'; -import * as view from './linker/view'; -import * as view_container from './linker/view_container'; -import * as view_type from './linker/view_type'; -import * as view_utils from './linker/view_utils'; -import * as lifecycle_hooks from './metadata/lifecycle_hooks'; -import * as metadata_view from './metadata/view'; -import * as reflection from './reflection/reflection'; +export {ANY_STATE as ɵANY_STATE, DEFAULT_STATE as ɵDEFAULT_STATE, EMPTY_STATE as ɵEMPTY_STATE, FILL_STYLE_FLAG as ɵFILL_STYLE_FLAG} from './animation/animation_constants'; +export {AnimationGroupPlayer as ɵAnimationGroupPlayer} from './animation/animation_group_player'; +export {AnimationKeyframe as ɵAnimationKeyframe} from './animation/animation_keyframe'; +export {AnimationPlayer as ɵAnimationPlayer, NoOpAnimationPlayer as ɵNoOpAnimationPlayer} from './animation/animation_player'; +export {AnimationSequencePlayer as ɵAnimationSequencePlayer} from './animation/animation_sequence_player'; +export {balanceAnimationKeyframes as ɵbalanceAnimationKeyframes, clearStyles as ɵclearStyles, collectAndResolveStyles as ɵcollectAndResolveStyles, flattenStyles as ɵflattenStyles, prepareFinalAnimationStyles as ɵprepareFinalAnimationStyles, renderStyles as ɵrenderStyles} from './animation/animation_style_util'; +export {AnimationStyles as ɵAnimationStyles} from './animation/animation_styles'; +export {AnimationTransition as ɵAnimationTransition} from './animation/animation_transition'; +export {ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS} from './application_ref'; +export {APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER} from './application_tokens'; +export {ValueUnwrapper as ɵValueUnwrapper, devModeEqual as ɵdevModeEqual} from './change_detection/change_detection_util'; +export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants'; +export {Console as ɵConsole} from './console'; +export {DebugDomRootRenderer as ɵDebugDomRootRenderer} from './debug/debug_renderer'; +export {ERROR_COMPONENT_TYPE as ɵERROR_COMPONENT_TYPE} from './errors'; +export {ComponentFactory as ɵComponentFactory} from './linker/component_factory'; +export {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver'; +export {DebugContext as ɵDebugContext, StaticNodeDebugInfo as ɵStaticNodeDebugInfo} from './linker/debug_context'; +export {AppView as ɵAppView, DebugAppView as ɵDebugAppView} from './linker/view'; +export {ViewContainer as ɵViewContainer} from './linker/view_container'; +export {ViewType as ɵViewType} from './linker/view_type'; +export {LIFECYCLE_HOOKS_VALUES as ɵLIFECYCLE_HOOKS_VALUES, LifecycleHooks as ɵLifecycleHooks} from './metadata/lifecycle_hooks'; +export {ViewMetadata as ɵViewMetadata} from './metadata/view'; +export {Reflector as ɵReflector, reflector as ɵreflector} from './reflection/reflection'; // We need to import this name separately from the above wildcard, because this symbol is exposed. -import {Reflector} from './reflection/reflection'; // tslint:disable-line -import * as reflection_capabilities from './reflection/reflection_capabilities'; -import * as reflector_reader from './reflection/reflector_reader'; -import * as reflection_types from './reflection/types'; -import * as api from './render/api'; -import {TransitionEngine} from './transition/transition_engine'; -import * as decorators from './util/decorators'; -import {isObservable, isPromise} from './util/lang'; -import * as viewEngine from './view/index'; - -export const __core_private__: { - isDefaultChangeDetectionStrategy: typeof constants.isDefaultChangeDetectionStrategy, - ChangeDetectorStatus: typeof constants.ChangeDetectorStatus, - _ChangeDetectorStatus: constants.ChangeDetectorStatus, - constructDependencies: typeof reflective_provider.constructDependencies, - LifecycleHooks: typeof lifecycle_hooks.LifecycleHooks, - _LifecycleHooks: lifecycle_hooks.LifecycleHooks, - LIFECYCLE_HOOKS_VALUES: typeof lifecycle_hooks.LIFECYCLE_HOOKS_VALUES, - ReflectorReader: typeof reflector_reader.ReflectorReader, - _ReflectorReader: reflector_reader.ReflectorReader, - _SetterFn: reflection_types.SetterFn; - _GetterFn: reflection_types.GetterFn; - _MethodFn: reflection_types.MethodFn; - CodegenComponentFactoryResolver: - typeof component_factory_resolver.CodegenComponentFactoryResolver, - ComponentRef_: typeof component_factory.ComponentRef_, - _CodegenComponentFactoryResolver: component_factory_resolver.CodegenComponentFactoryResolver, - ViewContainer: typeof view_container.ViewContainer, - _ViewContainer: view_container.ViewContainer, - AppView: typeof view.AppView, - _AppView: view.AppView, - DebugAppView: typeof view.DebugAppView, - _DebugAppView: view.DebugAppView, - NgModuleInjector: typeof ng_module_factory.NgModuleInjector, - _NgModuleInjector: ng_module_factory.NgModuleInjector, - registerModuleFactory: typeof ng_module_factory_loader.registerModuleFactory, - ViewType: typeof view_type.ViewType, - _ViewType: view_type.ViewType, - ViewMetadata: typeof metadata_view.ViewMetadata, - _ViewMetadata: metadata_view.ViewMetadata, - DebugContext: typeof debug_context.DebugContext, - _DebugContext: debug_context.DebugContext, - StaticNodeDebugInfo: typeof debug_context.StaticNodeDebugInfo, - _StaticNodeDebugInfo: debug_context.StaticNodeDebugInfo, - devModeEqual: typeof change_detection_util.devModeEqual, - ValueUnwrapper: typeof change_detection_util.ValueUnwrapper, - _ValueUnwrapper: change_detection_util.ValueUnwrapper, - RenderDebugInfo: typeof api.RenderDebugInfo, - _RenderDebugInfo: api.RenderDebugInfo, - _DirectRenderer: api.DirectRenderer, - TemplateRef_: typeof template_ref.TemplateRef_, - _TemplateRef_: template_ref.TemplateRef_, - ReflectionCapabilities: typeof reflection_capabilities.ReflectionCapabilities, - _ReflectionCapabilities: reflection_capabilities.ReflectionCapabilities, - makeDecorator: typeof decorators.makeDecorator, - DebugDomRootRenderer: typeof debug.DebugDomRootRenderer, - _DebugDomRootRenderer: debug.DebugDomRootRenderer, - Console: typeof console.Console, - _Console: console.Console, - reflector: typeof reflection.reflector, - Reflector: typeof reflection.Reflector, - _Reflector: reflection.Reflector, - NoOpAnimationPlayer: typeof NoOpAnimationPlayer_, - _NoOpAnimationPlayer: NoOpAnimationPlayer_, - AnimationPlayer: typeof AnimationPlayer_, - _AnimationPlayer: AnimationPlayer_, - AnimationSequencePlayer: typeof AnimationSequencePlayer_, - _AnimationSequencePlayer: AnimationSequencePlayer_, - AnimationGroupPlayer: typeof AnimationGroupPlayer_, - _AnimationGroupPlayer: AnimationGroupPlayer_, - AnimationKeyframe: typeof AnimationKeyframe_, - _AnimationKeyframe: AnimationKeyframe_, - prepareFinalAnimationStyles: typeof animationUtils.prepareFinalAnimationStyles, - balanceAnimationKeyframes: typeof animationUtils.balanceAnimationKeyframes, - flattenStyles: typeof animationUtils.flattenStyles, - clearStyles: typeof animationUtils.clearStyles, - renderStyles: typeof animationUtils.renderStyles, - collectAndResolveStyles: typeof animationUtils.collectAndResolveStyles, - APP_ID_RANDOM_PROVIDER: typeof application_tokens.APP_ID_RANDOM_PROVIDER, - AnimationStyles: typeof AnimationStyles_, - _AnimationStyles: AnimationStyles_, - ANY_STATE: typeof ANY_STATE_, - DEFAULT_STATE: typeof DEFAULT_STATE_, - EMPTY_STATE: typeof EMPTY_STATE_, - FILL_STYLE_FLAG: typeof FILL_STYLE_FLAG_, - isPromise: typeof isPromise, - isObservable: typeof isObservable, - AnimationTransition: typeof AnimationTransition, - ALLOW_MULTIPLE_PLATFORMS: typeof ALLOW_MULTIPLE_PLATFORMS, - view_utils: typeof view_utils, - ERROR_COMPONENT_TYPE: typeof ERROR_COMPONENT_TYPE, - viewEngine: typeof viewEngine, - TransitionEngine: typeof TransitionEngine -} = { - isDefaultChangeDetectionStrategy: constants.isDefaultChangeDetectionStrategy, - ChangeDetectorStatus: constants.ChangeDetectorStatus, - constructDependencies: reflective_provider.constructDependencies, - LifecycleHooks: lifecycle_hooks.LifecycleHooks, - LIFECYCLE_HOOKS_VALUES: lifecycle_hooks.LIFECYCLE_HOOKS_VALUES, - ReflectorReader: reflector_reader.ReflectorReader, - CodegenComponentFactoryResolver: component_factory_resolver.CodegenComponentFactoryResolver, - ComponentRef_: component_factory.ComponentRef_, - ViewContainer: view_container.ViewContainer, - AppView: view.AppView, - DebugAppView: view.DebugAppView, - NgModuleInjector: ng_module_factory.NgModuleInjector, - registerModuleFactory: ng_module_factory_loader.registerModuleFactory, - ViewType: view_type.ViewType, - view_utils: view_utils, - viewEngine: viewEngine, - ViewMetadata: metadata_view.ViewMetadata, - DebugContext: debug_context.DebugContext, - StaticNodeDebugInfo: debug_context.StaticNodeDebugInfo, - devModeEqual: change_detection_util.devModeEqual, - ValueUnwrapper: change_detection_util.ValueUnwrapper, - RenderDebugInfo: api.RenderDebugInfo, - TemplateRef_: template_ref.TemplateRef_, - ReflectionCapabilities: reflection_capabilities.ReflectionCapabilities, - makeDecorator: decorators.makeDecorator, - DebugDomRootRenderer: debug.DebugDomRootRenderer, - Console: console.Console, - reflector: reflection.reflector, - Reflector: reflection.Reflector, - NoOpAnimationPlayer: NoOpAnimationPlayer_, - AnimationPlayer: AnimationPlayer_, - AnimationSequencePlayer: AnimationSequencePlayer_, - AnimationGroupPlayer: AnimationGroupPlayer_, - AnimationKeyframe: AnimationKeyframe_, - prepareFinalAnimationStyles: animationUtils.prepareFinalAnimationStyles, - balanceAnimationKeyframes: animationUtils.balanceAnimationKeyframes, - flattenStyles: animationUtils.flattenStyles, - clearStyles: animationUtils.clearStyles, - renderStyles: animationUtils.renderStyles, - collectAndResolveStyles: animationUtils.collectAndResolveStyles, - APP_ID_RANDOM_PROVIDER: application_tokens.APP_ID_RANDOM_PROVIDER, - AnimationStyles: AnimationStyles_, - ANY_STATE: ANY_STATE_, - DEFAULT_STATE: DEFAULT_STATE_, - EMPTY_STATE: EMPTY_STATE_, - FILL_STYLE_FLAG: FILL_STYLE_FLAG_, - isPromise: isPromise, - isObservable: isObservable, - AnimationTransition: AnimationTransition, - ALLOW_MULTIPLE_PLATFORMS: ALLOW_MULTIPLE_PLATFORMS, - ERROR_COMPONENT_TYPE: ERROR_COMPONENT_TYPE, - TransitionEngine: TransitionEngine -} as any /* TODO(misko): export these using omega names instead */; +export {ReflectionCapabilities as ɵReflectionCapabilities} from './reflection/reflection_capabilities'; +export {ReflectorReader as ɵReflectorReader} from './reflection/reflector_reader'; +export {GetterFn as ɵGetterFn, MethodFn as ɵMethodFn, SetterFn as ɵSetterFn} from './reflection/types'; +export {DirectRenderer as ɵDirectRenderer, RenderDebugInfo as ɵRenderDebugInfo} from './render/api'; +export {TransitionEngine as ɵTransitionEngine} from './transition/transition_engine'; +export {makeDecorator as ɵmakeDecorator} from './util/decorators'; +export {isObservable as ɵisObservable, isPromise as ɵisPromise} from './util/lang'; diff --git a/modules/@angular/core/testing/private_export_testing.ts b/modules/@angular/core/testing/private_export_testing.ts index 5723c671c3..0bd3fefba8 100644 --- a/modules/@angular/core/testing/private_export_testing.ts +++ b/modules/@angular/core/testing/private_export_testing.ts @@ -6,18 +6,5 @@ * found in the LICENSE file at https://angular.io/license */ -import * as mock_animation_player from './mock_animation_player'; -import * as test_compiler from './test_compiler'; - -export const __core_private_testing__: { - TestingCompiler: typeof test_compiler.TestingCompiler, - _TestingCompiler: test_compiler.TestingCompiler, - TestingCompilerFactory: typeof test_compiler.TestingCompilerFactory, - _TestingCompilerFactory: test_compiler.TestingCompilerFactory, - MockAnimationPlayer: typeof mock_animation_player.MockAnimationPlayer - _MockAnimationPlayer: mock_animation_player.MockAnimationPlayer -} = { - TestingCompiler: test_compiler.TestingCompiler, - TestingCompilerFactory: test_compiler.TestingCompilerFactory, - MockAnimationPlayer: mock_animation_player.MockAnimationPlayer -} as any /* TODO(misko): export these using omega names instead */; +export {MockAnimationPlayer as ɵMockAnimationPlayer} from './mock_animation_player'; +export {TestingCompiler as ɵTestingCompiler, TestingCompilerFactory as ɵTestingCompilerFactory} from './test_compiler'; diff --git a/modules/@angular/core/testing/private_import_core.ts b/modules/@angular/core/testing/private_import_core.ts deleted file mode 100644 index 0292fbf02f..0000000000 --- a/modules/@angular/core/testing/private_import_core.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const isPromise: typeof r.isPromise = r.isPromise; diff --git a/modules/@angular/core/testing/test_bed.ts b/modules/@angular/core/testing/test_bed.ts index e46d9607fb..b43c95d7ef 100644 --- a/modules/@angular/core/testing/test_bed.ts +++ b/modules/@angular/core/testing/test_bed.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompilerOptions, Component, Directive, InjectionToken, Injector, ModuleWithComponentFactories, NgModule, NgModuleRef, NgZone, Pipe, PlatformRef, Provider, ReflectiveInjector, SchemaMetadata, Type, __core_private__} from '@angular/core'; +import {CompilerOptions, Component, Directive, InjectionToken, Injector, ModuleWithComponentFactories, NgModule, NgModuleRef, NgZone, Pipe, PlatformRef, Provider, ReflectiveInjector, SchemaMetadata, Type, ɵERROR_COMPONENT_TYPE} from '@angular/core'; import {AsyncTestCompleter} from './async_test_completer'; import {ComponentFixture} from './component_fixture'; import {stringify} from './facade/lang'; @@ -472,5 +472,5 @@ export function withModule(moduleDef: TestModuleMetadata, fn: Function = null): } function getComponentType(error: Error): Function { - return (error as any)[__core_private__.ERROR_COMPONENT_TYPE]; + return (error as any)[ɵERROR_COMPONENT_TYPE]; } diff --git a/modules/@angular/core/testing/testing_internal.ts b/modules/@angular/core/testing/testing_internal.ts index 13e466a11f..a447c7a317 100644 --- a/modules/@angular/core/testing/testing_internal.ts +++ b/modules/@angular/core/testing/testing_internal.ts @@ -6,10 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵisPromise as isPromise} from '@angular/core'; + import {AsyncTestCompleter} from './async_test_completer'; import {StringMapWrapper} from './facade/collection'; import {global} from './facade/lang'; -import {isPromise} from './private_import_core'; import {getTestBed, inject} from './test_bed'; export {AsyncTestCompleter} from './async_test_completer'; diff --git a/modules/@angular/forms/src/model.ts b/modules/@angular/forms/src/model.ts index 53717eb061..48e83c00ed 100644 --- a/modules/@angular/forms/src/model.ts +++ b/modules/@angular/forms/src/model.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ +import {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core'; import {fromPromise} from 'rxjs/observable/fromPromise'; import {composeAsyncValidators, composeValidators} from './directives/shared'; import {AsyncValidatorFn, ValidatorFn} from './directives/validators'; import {EventEmitter, Observable} from './facade/async'; -import {isObservable, isPromise} from './private_import_core'; diff --git a/modules/@angular/forms/src/private_import_core.ts b/modules/@angular/forms/src/private_import_core.ts deleted file mode 100644 index 8de9d5f09f..0000000000 --- a/modules/@angular/forms/src/private_import_core.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const isPromise: typeof r.isPromise = r.isPromise; -export const isObservable: typeof r.isObservable = r.isObservable; diff --git a/modules/@angular/forms/src/validators.ts b/modules/@angular/forms/src/validators.ts index a56dc0974d..4307415b78 100644 --- a/modules/@angular/forms/src/validators.ts +++ b/modules/@angular/forms/src/validators.ts @@ -6,14 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import {InjectionToken} from '@angular/core'; +import {InjectionToken, ɵisPromise as isPromise} from '@angular/core'; import {toPromise} from 'rxjs/operator/toPromise'; - import {AsyncValidatorFn, Validator, ValidatorFn} from './directives/validators'; import {StringMapWrapper} from './facade/collection'; import {isPresent} from './facade/lang'; import {AbstractControl, FormControl, FormGroup} from './model'; -import {isPromise} from './private_import_core'; function isEmptyInputValue(value: any): boolean { // we don't check for string here so it also works with arrays diff --git a/modules/@angular/http/src/backends/xhr_backend.ts b/modules/@angular/http/src/backends/xhr_backend.ts index cc8ac2532b..923f805bad 100644 --- a/modules/@angular/http/src/backends/xhr_backend.ts +++ b/modules/@angular/http/src/backends/xhr_backend.ts @@ -7,7 +7,7 @@ */ import {Injectable} from '@angular/core'; -import {__platform_browser_private__} from '@angular/platform-browser'; +import {ɵgetDOM as getDOM} from '@angular/platform-browser'; import {Observable} from 'rxjs/Observable'; import {Observer} from 'rxjs/Observer'; import {ResponseOptions} from '../base_response_options'; @@ -195,7 +195,7 @@ export class CookieXSRFStrategy implements XSRFStrategy { private _cookieName: string = 'XSRF-TOKEN', private _headerName: string = 'X-XSRF-TOKEN') {} configureRequest(req: Request): void { - const xsrfToken = __platform_browser_private__.getDOM().getCookie(this._cookieName); + const xsrfToken = getDOM().getCookie(this._cookieName); if (xsrfToken) { req.headers.set(this._headerName, xsrfToken); } diff --git a/modules/@angular/http/test/backends/xhr_backend_spec.ts b/modules/@angular/http/test/backends/xhr_backend_spec.ts index f46765ba06..ca9f0c6aa9 100644 --- a/modules/@angular/http/test/backends/xhr_backend_spec.ts +++ b/modules/@angular/http/test/backends/xhr_backend_spec.ts @@ -8,7 +8,7 @@ import {Injectable} from '@angular/core'; import {AsyncTestCompleter, SpyObject, afterEach, beforeEach, beforeEachProviders, describe, expect, inject, it} from '@angular/core/testing/testing_internal'; -import {__platform_browser_private__} from '@angular/platform-browser'; +import {ɵgetDOM as getDOM} from '@angular/platform-browser'; import {BrowserXhr} from '../../src/backends/browser_xhr'; import {CookieXSRFStrategy, XHRBackend, XHRConnection} from '../../src/backends/xhr_backend'; import {BaseRequestOptions, RequestOptions} from '../../src/base_request_options'; @@ -115,7 +115,6 @@ export function main() { () => { expect(() => backend.createConnection(sampleRequest)).not.toThrow(); }); }); - const getDOM = __platform_browser_private__.getDOM; if (getDOM().supportsCookies()) { describe('XSRF support', () => { it('sets an XSRF header by default', () => { diff --git a/modules/@angular/platform-browser-dynamic/src/platform_providers.ts b/modules/@angular/platform-browser-dynamic/src/platform_providers.ts index 9bc1fb27d1..08822d53dd 100644 --- a/modules/@angular/platform-browser-dynamic/src/platform_providers.ts +++ b/modules/@angular/platform-browser-dynamic/src/platform_providers.ts @@ -9,7 +9,7 @@ import {ResourceLoader} from '@angular/compiler'; import {COMPILER_OPTIONS, Provider} from '@angular/core'; -import {INTERNAL_BROWSER_PLATFORM_PROVIDERS} from './private_import_platform-browser'; +import {ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS as INTERNAL_BROWSER_PLATFORM_PROVIDERS} from '@angular/platform-browser'; import {ResourceLoaderImpl} from './resource_loader/resource_loader_impl'; diff --git a/modules/@angular/platform-browser-dynamic/src/private_export.ts b/modules/@angular/platform-browser-dynamic/src/private_export.ts index bf246cb359..e6cbe564f4 100644 --- a/modules/@angular/platform-browser-dynamic/src/private_export.ts +++ b/modules/@angular/platform-browser-dynamic/src/private_export.ts @@ -6,14 +6,5 @@ * found in the LICENSE file at https://angular.io/license */ -import {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers'; -import * as resource_loader from './resource_loader/resource_loader_impl'; - -export const __platform_browser_dynamic_private__: { - INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: typeof INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, - _ResourceLoaderImpl?: resource_loader.ResourceLoaderImpl, - ResourceLoaderImpl: typeof resource_loader.ResourceLoaderImpl -} = { - INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, - ResourceLoaderImpl: resource_loader.ResourceLoaderImpl -}; +export {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers'; +export {ResourceLoaderImpl as ɵResourceLoaderImpl} from './resource_loader/resource_loader_impl'; diff --git a/modules/@angular/platform-browser-dynamic/src/private_import_core.ts b/modules/@angular/platform-browser-dynamic/src/private_import_core.ts deleted file mode 100644 index 3550c72218..0000000000 --- a/modules/@angular/platform-browser-dynamic/src/private_import_core.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const reflector: typeof r.reflector = r.reflector; -export const Console: typeof r.Console = r.Console; diff --git a/modules/@angular/platform-browser-dynamic/src/private_import_platform-browser.ts b/modules/@angular/platform-browser-dynamic/src/private_import_platform-browser.ts deleted file mode 100644 index e2ae59f8ea..0000000000 --- a/modules/@angular/platform-browser-dynamic/src/private_import_platform-browser.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof _.INTERNAL_BROWSER_PLATFORM_PROVIDERS = - _.INTERNAL_BROWSER_PLATFORM_PROVIDERS; -export const getDOM: typeof _.getDOM = _.getDOM; diff --git a/modules/@angular/platform-browser-dynamic/testing/dom_test_component_renderer.ts b/modules/@angular/platform-browser-dynamic/testing/dom_test_component_renderer.ts index fbb22f663f..acf1420610 100644 --- a/modules/@angular/platform-browser-dynamic/testing/dom_test_component_renderer.ts +++ b/modules/@angular/platform-browser-dynamic/testing/dom_test_component_renderer.ts @@ -8,8 +8,7 @@ import {Inject, Injectable} from '@angular/core'; import {TestComponentRenderer} from '@angular/core/testing'; -import {DOCUMENT} from '@angular/platform-browser'; -import {getDOM} from './private_import_platform-browser'; +import {DOCUMENT, ɵgetDOM as getDOM} from '@angular/platform-browser'; /** * A DOM based implementation of the TestComponentRenderer. diff --git a/modules/@angular/platform-browser-dynamic/testing/index.ts b/modules/@angular/platform-browser-dynamic/testing/index.ts index 0d3d0b9e5e..fea035e9e4 100644 --- a/modules/@angular/platform-browser-dynamic/testing/index.ts +++ b/modules/@angular/platform-browser-dynamic/testing/index.ts @@ -9,10 +9,10 @@ import {platformCoreDynamicTesting} from '@angular/compiler/testing'; import {NgModule, PlatformRef, Provider, createPlatformFactory} from '@angular/core'; import {TestComponentRenderer} from '@angular/core/testing'; +import {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic'; import {BrowserTestingModule} from '@angular/platform-browser/testing'; import {DOMTestComponentRenderer} from './dom_test_component_renderer'; -import {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './private_import_platform-browser-dynamic'; export * from './private_export_testing' diff --git a/modules/@angular/platform-browser-dynamic/testing/private_export_testing.ts b/modules/@angular/platform-browser-dynamic/testing/private_export_testing.ts index a7bd260f34..56680f524a 100644 --- a/modules/@angular/platform-browser-dynamic/testing/private_export_testing.ts +++ b/modules/@angular/platform-browser-dynamic/testing/private_export_testing.ts @@ -6,9 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ -import * as testing from './dom_test_component_renderer'; - -export const __platform_browser_dynamic_private__: - {DOMTestComponentRenderer: typeof testing.DOMTestComponentRenderer} = { - DOMTestComponentRenderer: testing.DOMTestComponentRenderer - }; +export {DOMTestComponentRenderer as ɵDOMTestComponentRenderer} from './dom_test_component_renderer'; diff --git a/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser-dynamic.ts b/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser-dynamic.ts deleted file mode 100644 index f9a6bab7e0..0000000000 --- a/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser-dynamic.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_dynamic_private__ as _} from '@angular/platform-browser-dynamic'; - -export const INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: - typeof _.INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = - _.INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS; diff --git a/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser.ts b/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser.ts deleted file mode 100644 index 54c9a7577a..0000000000 --- a/modules/@angular/platform-browser-dynamic/testing/private_import_platform-browser.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export const getDOM: typeof _.getDOM = _.getDOM; diff --git a/modules/@angular/platform-browser/src/dom/animation_driver.ts b/modules/@angular/platform-browser/src/dom/animation_driver.ts index 5d560d0529..668151a4e9 100644 --- a/modules/@angular/platform-browser/src/dom/animation_driver.ts +++ b/modules/@angular/platform-browser/src/dom/animation_driver.ts @@ -6,9 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; - -import {AnimationKeyframe, AnimationStyles, NoOpAnimationPlayer} from '../private_import_core'; +import {AnimationPlayer, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationStyles as AnimationStyles, ɵNoOpAnimationPlayer as NoOpAnimationPlayer} from '@angular/core'; /** * @experimental diff --git a/modules/@angular/platform-browser/src/dom/debug/ng_probe.ts b/modules/@angular/platform-browser/src/dom/debug/ng_probe.ts index 9c83773ba3..d0b76b03de 100644 --- a/modules/@angular/platform-browser/src/dom/debug/ng_probe.ts +++ b/modules/@angular/platform-browser/src/dom/debug/ng_probe.ts @@ -9,7 +9,6 @@ import * as core from '@angular/core'; import {StringMapWrapper} from '../../facade/collection'; -import {DebugDomRootRenderer} from '../../private_import_core'; import {getDOM} from '../dom_adapter'; import {DomRendererFactoryV2, DomRootRenderer} from '../dom_renderer'; @@ -51,7 +50,7 @@ function _createRootRenderer(rootRenderer: any, extraTokens: NgProbeToken[]) { getDOM().setGlobalVar( CORE_TOKENS_GLOBAL_NAME, StringMapWrapper.merge(CORE_TOKENS, _ngProbeTokensToMap(extraTokens || []))); - return new DebugDomRootRenderer(rootRenderer); + return new core.ɵDebugDomRootRenderer(rootRenderer); } function _ngProbeTokensToMap(tokens: NgProbeToken[]): {[name: string]: any} { @@ -71,4 +70,4 @@ export const ELEMENT_PROBE_PROVIDERS: core.Provider[] = [ [core.NgProbeToken, new core.Optional()], ], }, -]; \ No newline at end of file +]; diff --git a/modules/@angular/platform-browser/src/dom/dom_renderer.ts b/modules/@angular/platform-browser/src/dom/dom_renderer.ts index 32d4eb9b25..eb8d4b8d96 100644 --- a/modules/@angular/platform-browser/src/dom/dom_renderer.ts +++ b/modules/@angular/platform-browser/src/dom/dom_renderer.ts @@ -6,10 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {APP_ID, Inject, Injectable, RenderComponentType, Renderer, RendererFactoryV2, RendererTypeV2, RendererV2, RootRenderer, ViewEncapsulation} from '@angular/core'; +import {APP_ID, ComponentRenderTypeV2, Inject, Injectable, RenderComponentType, Renderer, RendererFactoryV2, RendererV2, RootRenderer, ViewEncapsulation, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationPlayer as AnimationPlayer, ɵAnimationStyles as AnimationStyles, ɵDirectRenderer as DirectRenderer, ɵNoOpAnimationPlayer as NoOpAnimationPlayer, ɵRenderDebugInfo as RenderDebugInfo} from '@angular/core'; import {isPresent, stringify} from '../facade/lang'; -import {AnimationKeyframe, AnimationPlayer, AnimationStyles, DirectRenderer, NoOpAnimationPlayer, RenderDebugInfo} from '../private_import_core'; import {AnimationDriver} from './animation_driver'; import {DOCUMENT} from './dom_tokens'; @@ -541,4 +540,4 @@ class ShadowDomRenderer extends DefaultDomRendererV2 { parentNode(node: any): any { return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node))); } -} \ No newline at end of file +} diff --git a/modules/@angular/platform-browser/src/dom/web_animations_driver.ts b/modules/@angular/platform-browser/src/dom/web_animations_driver.ts index df3760a905..0ca5b79600 100644 --- a/modules/@angular/platform-browser/src/dom/web_animations_driver.ts +++ b/modules/@angular/platform-browser/src/dom/web_animations_driver.ts @@ -6,9 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; +import {AnimationPlayer, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationStyles as AnimationStyles} from '@angular/core'; import {isPresent} from '../facade/lang'; -import {AnimationKeyframe, AnimationStyles} from '../private_import_core'; import {AnimationDriver} from './animation_driver'; import {WebAnimationsPlayer} from './web_animations_player'; diff --git a/modules/@angular/platform-browser/src/dom/web_animations_player.ts b/modules/@angular/platform-browser/src/dom/web_animations_player.ts index ae3cb4c5e8..b6376aef40 100644 --- a/modules/@angular/platform-browser/src/dom/web_animations_player.ts +++ b/modules/@angular/platform-browser/src/dom/web_animations_player.ts @@ -6,11 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {AUTO_STYLE} from '@angular/core'; - +import {AUTO_STYLE, ɵAnimationPlayer as AnimationPlayer} from '@angular/core'; import {isPresent} from '../facade/lang'; -import {AnimationPlayer} from '../private_import_core'; - import {getDOM} from './dom_adapter'; import {DomAnimatePlayer} from './dom_animate_player'; diff --git a/modules/@angular/platform-browser/src/private_export.ts b/modules/@angular/platform-browser/src/private_export.ts index 67dea5adf2..355e903a3b 100644 --- a/modules/@angular/platform-browser/src/private_export.ts +++ b/modules/@angular/platform-browser/src/private_export.ts @@ -6,79 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ - -import * as browser from './browser'; -import * as browserDomAdapter from './browser/browser_adapter'; -import * as location from './browser/location/browser_platform_location'; -import * as testability from './browser/testability'; -import * as ng_probe from './dom/debug/ng_probe'; -import * as dom_adapter from './dom/dom_adapter'; -import * as dom_renderer from './dom/dom_renderer'; -import * as dom_events from './dom/events/dom_events'; -import * as hammer_gesture from './dom/events/hammer_gestures'; -import * as key_events from './dom/events/key_events'; -import * as shared_styles_host from './dom/shared_styles_host'; -import {WebAnimationsDriver} from './dom/web_animations_driver'; - -export const __platform_browser_private__: { - _BrowserPlatformLocation?: location.BrowserPlatformLocation, - BrowserPlatformLocation: typeof location.BrowserPlatformLocation, - _DomAdapter?: dom_adapter.DomAdapter, - DomAdapter: typeof dom_adapter.DomAdapter, - _BrowserDomAdapter?: browserDomAdapter.BrowserDomAdapter, - BrowserDomAdapter: typeof browserDomAdapter.BrowserDomAdapter, - _BrowserGetTestability?: testability.BrowserGetTestability, - BrowserGetTestability: typeof testability.BrowserGetTestability, - getDOM: typeof dom_adapter.getDOM, - setRootDomAdapter: typeof dom_adapter.setRootDomAdapter, - _DomRootRenderer?: dom_renderer.DomRootRenderer, - DomRootRenderer: typeof dom_renderer.DomRootRenderer, - DomRootRenderer_: typeof dom_renderer.DomRootRenderer_, - DomRendererFactoryV2: typeof dom_renderer.DomRendererFactoryV2, - NAMESPACE_URIS: typeof dom_renderer.NAMESPACE_URIS, - shimContentAttribute: typeof dom_renderer.shimContentAttribute, - shimHostAttribute: typeof dom_renderer.shimHostAttribute, - flattenStyles: typeof dom_renderer.flattenStyles, - splitNamespace: typeof dom_renderer.splitNamespace, - isNamespaced: typeof dom_renderer.isNamespaced, - _DomSharedStylesHost?: shared_styles_host.DomSharedStylesHost, - DomSharedStylesHost: typeof shared_styles_host.DomSharedStylesHost, - _SharedStylesHost?: shared_styles_host.SharedStylesHost, - SharedStylesHost: typeof shared_styles_host.SharedStylesHost, - ELEMENT_PROBE_PROVIDERS: typeof ng_probe.ELEMENT_PROBE_PROVIDERS, - _DomEventsPlugin?: dom_events.DomEventsPlugin, - DomEventsPlugin: typeof dom_events.DomEventsPlugin, _KeyEventsPlugin?: key_events.KeyEventsPlugin, - KeyEventsPlugin: typeof key_events.KeyEventsPlugin, - _HammerGesturesPlugin?: hammer_gesture.HammerGesturesPlugin, - HammerGesturesPlugin: typeof hammer_gesture.HammerGesturesPlugin, - initDomAdapter: typeof browser.initDomAdapter, - INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof browser.INTERNAL_BROWSER_PLATFORM_PROVIDERS, - BROWSER_SANITIZATION_PROVIDERS: typeof browser.BROWSER_SANITIZATION_PROVIDERS, - WebAnimationsDriver: typeof WebAnimationsDriver -} = { - BrowserPlatformLocation: location.BrowserPlatformLocation, - DomAdapter: dom_adapter.DomAdapter, - BrowserDomAdapter: browserDomAdapter.BrowserDomAdapter, - BrowserGetTestability: testability.BrowserGetTestability, - getDOM: dom_adapter.getDOM, - setRootDomAdapter: dom_adapter.setRootDomAdapter, - DomRootRenderer_: dom_renderer.DomRootRenderer_, - DomRootRenderer: dom_renderer.DomRootRenderer, - DomRendererFactoryV2: dom_renderer.DomRendererFactoryV2, - NAMESPACE_URIS: dom_renderer.NAMESPACE_URIS, - shimContentAttribute: dom_renderer.shimContentAttribute, - shimHostAttribute: dom_renderer.shimHostAttribute, - flattenStyles: dom_renderer.flattenStyles, - splitNamespace: dom_renderer.splitNamespace, - isNamespaced: dom_renderer.isNamespaced, - DomSharedStylesHost: shared_styles_host.DomSharedStylesHost, - SharedStylesHost: shared_styles_host.SharedStylesHost, - ELEMENT_PROBE_PROVIDERS: ng_probe.ELEMENT_PROBE_PROVIDERS, - DomEventsPlugin: dom_events.DomEventsPlugin, - KeyEventsPlugin: key_events.KeyEventsPlugin, - HammerGesturesPlugin: hammer_gesture.HammerGesturesPlugin, - initDomAdapter: browser.initDomAdapter, - INTERNAL_BROWSER_PLATFORM_PROVIDERS: browser.INTERNAL_BROWSER_PLATFORM_PROVIDERS, - BROWSER_SANITIZATION_PROVIDERS: browser.BROWSER_SANITIZATION_PROVIDERS, - WebAnimationsDriver: WebAnimationsDriver -}; +export {BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, initDomAdapter as ɵinitDomAdapter} from './browser'; +export {BrowserDomAdapter as ɵBrowserDomAdapter} from './browser/browser_adapter'; +export {BrowserPlatformLocation as ɵBrowserPlatformLocation} from './browser/location/browser_platform_location'; +export {BrowserGetTestability as ɵBrowserGetTestability} from './browser/testability'; +export {ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe'; +export {DomAdapter as ɵDomAdapter, getDOM as ɵgetDOM, setRootDomAdapter as ɵsetRootDomAdapter} from './dom/dom_adapter'; +export {DomRendererFactoryV2 as ɵDomRendererFactoryV2, DomRootRenderer as ɵDomRootRenderer, DomRootRenderer_ as ɵDomRootRenderer_, NAMESPACE_URIS as ɵNAMESPACE_URIS, flattenStyles as ɵflattenStyles, isNamespaced as ɵisNamespaced, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute, splitNamespace as ɵsplitNamespace} from './dom/dom_renderer'; +export {DomEventsPlugin as ɵDomEventsPlugin} from './dom/events/dom_events'; +export {HammerGesturesPlugin as ɵHammerGesturesPlugin} from './dom/events/hammer_gestures'; +export {KeyEventsPlugin as ɵKeyEventsPlugin} from './dom/events/key_events'; +export {DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost} from './dom/shared_styles_host'; +export {WebAnimationsDriver as ɵWebAnimationsDriver} from './dom/web_animations_driver'; diff --git a/modules/@angular/platform-browser/src/private_import_core.ts b/modules/@angular/platform-browser/src/private_import_core.ts deleted file mode 100644 index 668b0f8f18..0000000000 --- a/modules/@angular/platform-browser/src/private_import_core.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export type RenderDebugInfo = typeof r._RenderDebugInfo; -export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo; -export type DirectRenderer = typeof r._DirectRenderer; - -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; - -export type DebugDomRootRenderer = typeof r._DebugDomRootRenderer; -export const DebugDomRootRenderer: typeof r.DebugDomRootRenderer = r.DebugDomRootRenderer; - -export const reflector: typeof r.reflector = r.reflector; - -export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer; -export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer; -export type AnimationPlayer = typeof r._AnimationPlayer; -export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer; -export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer; -export const AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer; -export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer; -export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer; -export type AnimationKeyframe = typeof r._AnimationKeyframe; -export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe; -export type AnimationStyles = typeof r._AnimationStyles; -export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles; -export const prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles = - r.prepareFinalAnimationStyles; -export const balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes = - r.balanceAnimationKeyframes; -export const clearStyles: typeof r.clearStyles = r.clearStyles; -export const collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles; diff --git a/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts b/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts index 529bc9b927..f0ccf0884e 100644 --- a/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts +++ b/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts @@ -6,12 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; +import {AnimationPlayer, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationStyles as AnimationStyles, ɵNoOpAnimationPlayer as NoOpAnimationPlayer} from '@angular/core'; import {el} from '@angular/platform-browser/testing/browser_util'; - import {WebAnimationsDriver} from '../../src/dom/web_animations_driver'; import {WebAnimationsPlayer} from '../../src/dom/web_animations_player'; -import {AnimationKeyframe, AnimationStyles, NoOpAnimationPlayer} from '../../src/private_import_core'; function _makeStyles(styles: {[key: string]: string | number}): AnimationStyles { return new AnimationStyles([styles]); diff --git a/modules/@angular/platform-browser/testing/browser.ts b/modules/@angular/platform-browser/testing/browser.ts index 758eb2748a..c10c8b5f66 100644 --- a/modules/@angular/platform-browser/testing/browser.ts +++ b/modules/@angular/platform-browser/testing/browser.ts @@ -6,10 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import {APP_ID, NgModule, NgZone, PLATFORM_INITIALIZER, PlatformRef, Provider, createPlatformFactory, platformCore} from '@angular/core'; -import {AnimationDriver, BrowserModule} from '@angular/platform-browser'; - +import {AnimationDriver, BrowserModule, ɵBrowserDomAdapter as BrowserDomAdapter, ɵELEMENT_PROBE_PROVIDERS as ELEMENT_PROBE_PROVIDERS} from '@angular/platform-browser'; import {BrowserDetection, createNgZone} from './browser_util'; -import {BrowserDomAdapter, ELEMENT_PROBE_PROVIDERS} from './private_import_platform-browser'; function initBrowserTests() { BrowserDomAdapter.makeCurrent(); diff --git a/modules/@angular/platform-browser/testing/browser_util.ts b/modules/@angular/platform-browser/testing/browser_util.ts index ca62d1b6b2..aa5e4615c2 100644 --- a/modules/@angular/platform-browser/testing/browser_util.ts +++ b/modules/@angular/platform-browser/testing/browser_util.ts @@ -7,9 +7,9 @@ */ import {NgZone} from '@angular/core'; +import {ɵgetDOM as getDOM} from '@angular/platform-browser'; import {global} from './facade/lang'; -import {getDOM} from './private_import_platform-browser'; export let browserDetection: BrowserDetection; @@ -136,4 +136,4 @@ export function stringifyElement(el: any /** TODO #9100 */): string { export function createNgZone(): NgZone { return new NgZone({enableLongStackTrace: true}); -} \ No newline at end of file +} diff --git a/modules/@angular/platform-browser/testing/matchers.ts b/modules/@angular/platform-browser/testing/matchers.ts index aae97de856..8bf986f223 100644 --- a/modules/@angular/platform-browser/testing/matchers.ts +++ b/modules/@angular/platform-browser/testing/matchers.ts @@ -7,8 +7,10 @@ */ +import {ɵgetDOM as getDOM} from '@angular/platform-browser'; + import {global} from './facade/lang'; -import {getDOM} from './private_import_platform-browser'; + /** diff --git a/modules/@angular/platform-browser/testing/mock_animation_driver.ts b/modules/@angular/platform-browser/testing/mock_animation_driver.ts index 50f5e86a01..a63d21fb8a 100644 --- a/modules/@angular/platform-browser/testing/mock_animation_driver.ts +++ b/modules/@angular/platform-browser/testing/mock_animation_driver.ts @@ -6,12 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '@angular/core'; +import {AnimationPlayer, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationStyles as AnimationStyles} from '@angular/core'; import {MockAnimationPlayer} from '@angular/core/testing/testing_internal'; import {AnimationDriver} from '@angular/platform-browser'; - import {ListWrapper} from './facade/collection'; -import {AnimationKeyframe, AnimationStyles} from './private_import_core'; export class MockAnimationDriver extends AnimationDriver { public log: {[key: string]: any}[] = []; diff --git a/modules/@angular/platform-browser/testing/private_import_core.ts b/modules/@angular/platform-browser/testing/private_import_core.ts deleted file mode 100644 index bc03a3d271..0000000000 --- a/modules/@angular/platform-browser/testing/private_import_core.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import {__core_private__ as r} from '@angular/core'; - - -export type RenderDebugInfo = typeof r._RenderDebugInfo; -export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const reflector: typeof r.reflector = r.reflector; - -export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer; -export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer; -export type AnimationPlayer = typeof r._AnimationPlayer; -export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer; -export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer; -export const AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer; -export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer; -export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer; -export type AnimationKeyframe = typeof r._AnimationKeyframe; -export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe; -export type AnimationStyles = typeof r._AnimationStyles; -export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles; -export const prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles = - r.prepareFinalAnimationStyles; -export const balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes = - r.balanceAnimationKeyframes; -export const clearStyles: typeof r.clearStyles = r.clearStyles; -export const collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles; diff --git a/modules/@angular/platform-browser/testing/private_import_platform-browser.ts b/modules/@angular/platform-browser/testing/private_import_platform-browser.ts deleted file mode 100644 index d088254e50..0000000000 --- a/modules/@angular/platform-browser/testing/private_import_platform-browser.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export const getDOM: typeof _.getDOM = _.getDOM; -export const BrowserDomAdapter: typeof _.BrowserDomAdapter = _.BrowserDomAdapter; -export const ELEMENT_PROBE_PROVIDERS: typeof _.ELEMENT_PROBE_PROVIDERS = _.ELEMENT_PROBE_PROVIDERS; diff --git a/modules/@angular/platform-server/src/location.ts b/modules/@angular/platform-server/src/location.ts index 3f0783b6a8..c168b8018f 100644 --- a/modules/@angular/platform-server/src/location.ts +++ b/modules/@angular/platform-server/src/location.ts @@ -8,12 +8,10 @@ import {LocationChangeEvent, LocationChangeListener, PlatformLocation} from '@angular/common'; import {Inject, Injectable, Optional} from '@angular/core'; -import {DOCUMENT} from '@angular/platform-browser'; +import {DOCUMENT, ɵgetDOM as getDOM} from '@angular/platform-browser'; import {Subject} from 'rxjs/Subject'; import * as url from 'url'; - import {scheduleMicroTask} from './facade/lang'; -import {getDOM} from './private_import_platform-browser'; import {INITIAL_CONFIG, PlatformConfig} from './tokens'; diff --git a/modules/@angular/platform-server/src/parse5_adapter.ts b/modules/@angular/platform-server/src/parse5_adapter.ts index 8bb791fe71..151bb93367 100644 --- a/modules/@angular/platform-server/src/parse5_adapter.ts +++ b/modules/@angular/platform-server/src/parse5_adapter.ts @@ -9,7 +9,7 @@ const parse5 = require('parse5'); import {ListWrapper} from '../src/facade/collection'; -import {DomAdapter, setRootDomAdapter} from './private_import_platform-browser'; +import {ɵDomAdapter as DomAdapter, ɵsetRootDomAdapter as setRootDomAdapter} from '@angular/platform-browser'; import {isPresent, isBlank, global, setValueOnPath} from '../src/facade/lang'; import {SelectorMatcher, CssSelector} from '@angular/compiler'; diff --git a/modules/@angular/platform-server/src/platform_state.ts b/modules/@angular/platform-server/src/platform_state.ts index aaaaff5b30..d61aeff9ec 100644 --- a/modules/@angular/platform-server/src/platform_state.ts +++ b/modules/@angular/platform-server/src/platform_state.ts @@ -9,9 +9,7 @@ const parse5 = require('parse5'); import {Injectable, Inject} from '@angular/core'; -import {DOCUMENT} from '@angular/platform-browser'; - -import {getDOM} from './private_import_platform-browser'; +import {DOCUMENT, ɵgetDOM as getDOM} from '@angular/platform-browser'; /** * Representation of the current platform state. @@ -31,4 +29,4 @@ export class PlatformState { * Returns the current DOM state. */ getDocument(): any { return this._doc; } -} \ No newline at end of file +} diff --git a/modules/@angular/platform-server/src/private_export.ts b/modules/@angular/platform-server/src/private_export.ts index 7fb60e7a2d..e4ba93a683 100644 --- a/modules/@angular/platform-server/src/private_export.ts +++ b/modules/@angular/platform-server/src/private_export.ts @@ -7,12 +7,4 @@ */ -import {INTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS} from './server'; - -export const __platform_server_private__: { - INTERNAL_SERVER_PLATFORM_PROVIDERS: typeof INTERNAL_SERVER_PLATFORM_PROVIDERS, - SERVER_RENDER_PROVIDERS: typeof SERVER_RENDER_PROVIDERS, -} = { - INTERNAL_SERVER_PLATFORM_PROVIDERS: INTERNAL_SERVER_PLATFORM_PROVIDERS, - SERVER_RENDER_PROVIDERS: SERVER_RENDER_PROVIDERS, -}; +export {INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS} from './server'; diff --git a/modules/@angular/platform-server/src/private_import_core.ts b/modules/@angular/platform-server/src/private_import_core.ts deleted file mode 100644 index c76c5e6fd1..0000000000 --- a/modules/@angular/platform-server/src/private_import_core.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const reflector: typeof r.reflector = r.reflector; -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const Console: typeof r.Console = r.Console; -export type AnimationKeyframe = typeof r._AnimationKeyframe; -export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe; -export type AnimationPlayer = typeof r._AnimationPlayer; -export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer; -export type AnimationStyles = typeof r._AnimationStyles; -export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles; -export type RenderDebugInfo = typeof r._RenderDebugInfo; -export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo; -export type DebugDomRootRenderer = typeof r._DebugDomRootRenderer; -export const DebugDomRootRenderer: typeof r.DebugDomRootRenderer = r.DebugDomRootRenderer; -export type ALLOW_MULTIPLE_PLATFORMS = typeof r.ALLOW_MULTIPLE_PLATFORMS; -export const ALLOW_MULTIPLE_PLATFORMS: typeof r.ALLOW_MULTIPLE_PLATFORMS = - r.ALLOW_MULTIPLE_PLATFORMS; diff --git a/modules/@angular/platform-server/src/private_import_platform-browser.ts b/modules/@angular/platform-server/src/private_import_platform-browser.ts deleted file mode 100644 index bf90997ed5..0000000000 --- a/modules/@angular/platform-server/src/private_import_platform-browser.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export type DomAdapter = typeof _._DomAdapter; -export const DomAdapter: typeof _.DomAdapter = _.DomAdapter; -export const setRootDomAdapter: typeof _.setRootDomAdapter = _.setRootDomAdapter; -export const getDOM: typeof _.getDOM = _.getDOM; -export const SharedStylesHost: typeof _.SharedStylesHost = _.SharedStylesHost; -export type SharedStylesHost = typeof _._SharedStylesHost; -export const NAMESPACE_URIS: typeof _.NAMESPACE_URIS = _.NAMESPACE_URIS; -export const shimContentAttribute: typeof _.shimContentAttribute = _.shimContentAttribute; -export const shimHostAttribute: typeof _.shimHostAttribute = _.shimHostAttribute; -export const flattenStyles: typeof _.flattenStyles = _.flattenStyles; -export const splitNamespace: typeof _.splitNamespace = _.splitNamespace; -export const isNamespaced: typeof _.isNamespaced = _.isNamespaced; diff --git a/modules/@angular/platform-server/src/server.ts b/modules/@angular/platform-server/src/server.ts index 1795e18975..1b4455d008 100644 --- a/modules/@angular/platform-server/src/server.ts +++ b/modules/@angular/platform-server/src/server.ts @@ -8,16 +8,13 @@ import {PlatformLocation} from '@angular/common'; import {platformCoreDynamic} from '@angular/compiler'; -import {APP_BOOTSTRAP_LISTENER, Injectable, InjectionToken, Injector, NgModule, PLATFORM_INITIALIZER, PlatformRef, Provider, RendererFactoryV2, RootRenderer, createPlatformFactory, isDevMode, platformCore} from '@angular/core'; +import {APP_BOOTSTRAP_LISTENER, Injectable, InjectionToken, Injector, NgModule, PLATFORM_INITIALIZER, PlatformRef, Provider, RendererFactoryV2, RootRenderer, createPlatformFactory, isDevMode, platformCore, ɵALLOW_MULTIPLE_PLATFORMS as ALLOW_MULTIPLE_PLATFORMS, ɵDebugDomRootRenderer as DebugDomRootRenderer} from '@angular/core'; import {HttpModule} from '@angular/http'; -import {BrowserModule, DOCUMENT} from '@angular/platform-browser'; - +import {BrowserModule, DOCUMENT, ɵSharedStylesHost as SharedStylesHost, ɵgetDOM as getDOM} from '@angular/platform-browser'; import {SERVER_HTTP_PROVIDERS} from './http'; import {ServerPlatformLocation} from './location'; import {Parse5DomAdapter, parseDocument} from './parse5_adapter'; import {PlatformState} from './platform_state'; -import {ALLOW_MULTIPLE_PLATFORMS, DebugDomRootRenderer} from './private_import_core'; -import {SharedStylesHost, getDOM} from './private_import_platform-browser'; import {ServerRendererFactoryV2, ServerRootRenderer} from './server_renderer'; import {ServerStylesHost} from './styles_host'; import {INITIAL_CONFIG, PlatformConfig} from './tokens'; diff --git a/modules/@angular/platform-server/src/server_renderer.ts b/modules/@angular/platform-server/src/server_renderer.ts index a014bc91e9..f500d3edcb 100644 --- a/modules/@angular/platform-server/src/server_renderer.ts +++ b/modules/@angular/platform-server/src/server_renderer.ts @@ -7,12 +7,9 @@ */ import {DomElementSchemaRegistry} from '@angular/compiler'; -import {APP_ID, Inject, Injectable, NgZone, RenderComponentType, Renderer, RendererFactoryV2, RendererTypeV2, RendererV2, RootRenderer, ViewEncapsulation} from '@angular/core'; -import {AnimationDriver, DOCUMENT} from '@angular/platform-browser'; - +import {APP_ID, ComponentRenderTypeV2, Inject, Injectable, NgZone, RenderComponentType, Renderer, RendererFactoryV2, RendererV2, RootRenderer, ViewEncapsulation, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationPlayer as AnimationPlayer, ɵAnimationStyles as AnimationStyles, ɵRenderDebugInfo as RenderDebugInfo} from '@angular/core'; +import {AnimationDriver, DOCUMENT, ɵNAMESPACE_URIS as NAMESPACE_URIS, ɵSharedStylesHost as SharedStylesHost, ɵflattenStyles as flattenStyles, ɵgetDOM as getDOM, ɵisNamespaced as isNamespaced, ɵshimContentAttribute as shimContentAttribute, ɵshimHostAttribute as shimHostAttribute, ɵsplitNamespace as splitNamespace} from '@angular/platform-browser'; import {isBlank, isPresent, stringify} from './facade/lang'; -import {AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo} from './private_import_core'; -import {NAMESPACE_URIS, SharedStylesHost, flattenStyles, getDOM, isNamespaced, shimContentAttribute, shimHostAttribute, splitNamespace} from './private_import_platform-browser'; const TEMPLATE_COMMENT_TEXT = 'template bindings={}'; const TEMPLATE_BINDINGS_EXP = /^template bindings=(.*)$/; diff --git a/modules/@angular/platform-server/src/styles_host.ts b/modules/@angular/platform-server/src/styles_host.ts index 01f417b873..d22c8cfdeb 100644 --- a/modules/@angular/platform-server/src/styles_host.ts +++ b/modules/@angular/platform-server/src/styles_host.ts @@ -7,10 +7,9 @@ */ import {ApplicationRef, Inject, Injectable} from '@angular/core'; -import {DOCUMENT} from '@angular/platform-browser'; +import {DOCUMENT, ɵSharedStylesHost as SharedStylesHost, ɵgetDOM as getDOM} from '@angular/platform-browser'; import {Parse5DomAdapter} from './parse5_adapter'; -import {SharedStylesHost, getDOM} from './private_import_platform-browser'; @Injectable() export class ServerStylesHost extends SharedStylesHost { diff --git a/modules/@angular/platform-server/testing/private_import_platform_server.ts b/modules/@angular/platform-server/testing/private_import_platform_server.ts deleted file mode 100644 index 945fd4f7b9..0000000000 --- a/modules/@angular/platform-server/testing/private_import_platform_server.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_server_private__ as _} from '@angular/platform-server'; - -export const INTERNAL_SERVER_PLATFORM_PROVIDERS: typeof _.INTERNAL_SERVER_PLATFORM_PROVIDERS = - _.INTERNAL_SERVER_PLATFORM_PROVIDERS; -export const SERVER_RENDER_PROVIDERS: typeof _.SERVER_RENDER_PROVIDERS = _.SERVER_RENDER_PROVIDERS; diff --git a/modules/@angular/platform-server/testing/server.ts b/modules/@angular/platform-server/testing/server.ts index 1379ccdeb2..97bd8816db 100644 --- a/modules/@angular/platform-server/testing/server.ts +++ b/modules/@angular/platform-server/testing/server.ts @@ -9,8 +9,7 @@ import {platformCoreDynamicTesting} from '@angular/compiler/testing'; import {NgModule, PlatformRef, Provider, createPlatformFactory} from '@angular/core'; import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing'; - -import {INTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS} from './private_import_platform_server'; +import {ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS, ɵSERVER_RENDER_PROVIDERS as SERVER_RENDER_PROVIDERS} from '@angular/platform-server'; /** diff --git a/modules/@angular/platform-webworker-dynamic/src/platform-webworker-dynamic.ts b/modules/@angular/platform-webworker-dynamic/src/platform-webworker-dynamic.ts index 5e95ce464b..a3e3b48618 100644 --- a/modules/@angular/platform-webworker-dynamic/src/platform-webworker-dynamic.ts +++ b/modules/@angular/platform-webworker-dynamic/src/platform-webworker-dynamic.ts @@ -8,7 +8,7 @@ import {ResourceLoader, platformCoreDynamic} from '@angular/compiler'; import {COMPILER_OPTIONS, PlatformRef, Provider, createPlatformFactory} from '@angular/core'; -import {ResourceLoaderImpl} from './private_import_platform-browser-dynamic'; +import {ɵResourceLoaderImpl as ResourceLoaderImpl} from '@angular/platform-browser-dynamic'; export {VERSION} from './version'; /** diff --git a/modules/@angular/platform-webworker-dynamic/src/private_import_core.ts b/modules/@angular/platform-webworker-dynamic/src/private_import_core.ts deleted file mode 100644 index 3550c72218..0000000000 --- a/modules/@angular/platform-webworker-dynamic/src/private_import_core.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; -export const reflector: typeof r.reflector = r.reflector; -export const Console: typeof r.Console = r.Console; diff --git a/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser-dynamic.ts b/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser-dynamic.ts deleted file mode 100644 index f4d4ec0f68..0000000000 --- a/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser-dynamic.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_dynamic_private__ as _} from '@angular/platform-browser-dynamic'; - -export const ResourceLoaderImpl: typeof _.ResourceLoaderImpl = _.ResourceLoaderImpl; diff --git a/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser.ts b/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser.ts deleted file mode 100644 index e2ae59f8ea..0000000000 --- a/modules/@angular/platform-webworker-dynamic/src/private_import_platform-browser.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof _.INTERNAL_BROWSER_PLATFORM_PROVIDERS = - _.INTERNAL_BROWSER_PLATFORM_PROVIDERS; -export const getDOM: typeof _.getDOM = _.getDOM; diff --git a/modules/@angular/platform-webworker/src/private_import_core.ts b/modules/@angular/platform-webworker/src/private_import_core.ts deleted file mode 100644 index eb29dc4a4f..0000000000 --- a/modules/@angular/platform-webworker/src/private_import_core.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export type RenderDebugInfo = typeof r._RenderDebugInfo; -export const RenderDebugInfo: typeof r.RenderDebugInfo = r.RenderDebugInfo; - -export const ReflectionCapabilities: typeof r.ReflectionCapabilities = r.ReflectionCapabilities; - -export const reflector: typeof r.reflector = r.reflector; - -export type NoOpAnimationPlayer = typeof r._NoOpAnimationPlayer; -export const NoOpAnimationPlayer: typeof r.NoOpAnimationPlayer = r.NoOpAnimationPlayer; -export type AnimationPlayer = typeof r._AnimationPlayer; -export const AnimationPlayer: typeof r.AnimationPlayer = r.AnimationPlayer; -export type AnimationSequencePlayer = typeof r._AnimationSequencePlayer; -export const AnimationSequencePlayer: typeof r.AnimationSequencePlayer = r.AnimationSequencePlayer; -export type AnimationGroupPlayer = typeof r._AnimationGroupPlayer; -export const AnimationGroupPlayer: typeof r.AnimationGroupPlayer = r.AnimationGroupPlayer; -export type AnimationKeyframe = typeof r._AnimationKeyframe; -export const AnimationKeyframe: typeof r.AnimationKeyframe = r.AnimationKeyframe; -export type AnimationStyles = typeof r._AnimationStyles; -export const AnimationStyles: typeof r.AnimationStyles = r.AnimationStyles; -export const prepareFinalAnimationStyles: typeof r.prepareFinalAnimationStyles = - r.prepareFinalAnimationStyles; -export const balanceAnimationKeyframes: typeof r.balanceAnimationKeyframes = - r.balanceAnimationKeyframes; -export const clearStyles: typeof r.clearStyles = r.clearStyles; -export const collectAndResolveStyles: typeof r.collectAndResolveStyles = r.collectAndResolveStyles; -export const APP_ID_RANDOM_PROVIDER: typeof r.APP_ID_RANDOM_PROVIDER = r.APP_ID_RANDOM_PROVIDER; diff --git a/modules/@angular/platform-webworker/src/private_import_platform-browser.ts b/modules/@angular/platform-webworker/src/private_import_platform-browser.ts deleted file mode 100644 index 99c9a930d2..0000000000 --- a/modules/@angular/platform-webworker/src/private_import_platform-browser.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__platform_browser_private__ as _} from '@angular/platform-browser'; - -export const BROWSER_SANITIZATION_PROVIDERS: typeof _.BROWSER_SANITIZATION_PROVIDERS = - _.BROWSER_SANITIZATION_PROVIDERS; -export type BrowserPlatformLocation = typeof _._BrowserPlatformLocation; -export const BrowserPlatformLocation: typeof _.BrowserPlatformLocation = _.BrowserPlatformLocation; -export const getDOM: typeof _.getDOM = _.getDOM; -export const BrowserDomAdapter: typeof _.BrowserDomAdapter = _.BrowserDomAdapter; -export const BrowserGetTestability: typeof _.BrowserGetTestability = _.BrowserGetTestability; -export const DomRootRenderer: typeof _.DomRootRenderer = _.DomRootRenderer; -export const DomRootRenderer_: typeof _.DomRootRenderer_ = _.DomRootRenderer_; -export const DomRendererFactoryV2: typeof _.DomRendererFactoryV2 = _.DomRendererFactoryV2; - -export const DomEventsPlugin: typeof _.DomEventsPlugin = _.DomEventsPlugin; -export const DomSharedStylesHost: typeof _.DomSharedStylesHost = _.DomSharedStylesHost; -export const SharedStylesHost: typeof _.SharedStylesHost = _.SharedStylesHost; -export const KeyEventsPlugin: typeof _.KeyEventsPlugin = _.KeyEventsPlugin; -export const HammerGesturesPlugin: typeof _.HammerGesturesPlugin = _.HammerGesturesPlugin; -export const DomAdapter: typeof _.DomAdapter = _.DomAdapter; -export const setRootDomAdapter: typeof _.setRootDomAdapter = _.setRootDomAdapter; -export const WebAnimationsDriver: typeof _.WebAnimationsDriver = _.WebAnimationsDriver; diff --git a/modules/@angular/platform-webworker/src/web_workers/ui/location_providers.ts b/modules/@angular/platform-webworker/src/web_workers/ui/location_providers.ts index 2c4de16e27..71192b3547 100644 --- a/modules/@angular/platform-webworker/src/web_workers/ui/location_providers.ts +++ b/modules/@angular/platform-webworker/src/web_workers/ui/location_providers.ts @@ -8,7 +8,7 @@ import {Injector, NgZone, PLATFORM_INITIALIZER, Provider} from '@angular/core'; -import {BrowserPlatformLocation} from '../../private_import_platform-browser'; +import {ɵBrowserPlatformLocation as BrowserPlatformLocation} from '@angular/platform-browser'; import {MessageBasedPlatformLocation} from './platform_location'; diff --git a/modules/@angular/platform-webworker/src/web_workers/ui/platform_location.ts b/modules/@angular/platform-webworker/src/web_workers/ui/platform_location.ts index eeedbc03f8..73845f5dee 100644 --- a/modules/@angular/platform-webworker/src/web_workers/ui/platform_location.ts +++ b/modules/@angular/platform-webworker/src/web_workers/ui/platform_location.ts @@ -8,9 +8,9 @@ import {LocationChangeListener} from '@angular/common'; import {Injectable} from '@angular/core'; +import {ɵBrowserPlatformLocation as BrowserPlatformLocation} from '@angular/platform-browser'; import {EventEmitter} from '../../facade/async'; -import {BrowserPlatformLocation} from '../../private_import_platform-browser'; import {MessageBus} from '../shared/message_bus'; import {ROUTER_CHANNEL} from '../shared/messaging_api'; import {LocationType, Serializer, SerializerTypes} from '../shared/serializer'; diff --git a/modules/@angular/platform-webworker/src/web_workers/worker/renderer.ts b/modules/@angular/platform-webworker/src/web_workers/worker/renderer.ts index c2652ed8c4..4bce7dd7c9 100644 --- a/modules/@angular/platform-webworker/src/web_workers/worker/renderer.ts +++ b/modules/@angular/platform-webworker/src/web_workers/worker/renderer.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {Injectable, RenderComponentType, Renderer, RendererFactoryV2, RendererTypeV2, RendererV2, RootRenderer, ViewEncapsulation} from '@angular/core'; - -import {AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo} from '../../private_import_core'; +import {Injectable, RenderComponentType, Renderer, RootRenderer, ViewEncapsulation, RendererFactoryV2, RendererTypeV2, RendererV2, ɵAnimationKeyframe as AnimationKeyframe, ɵAnimationPlayer as AnimationPlayer, ɵAnimationStyles as AnimationStyles, ɵRenderDebugInfo as RenderDebugInfo} from '@angular/core'; +import {ListWrapper} from '../../facade/collection'; +import {isPresent} from '../../facade/lang'; import {ClientMessageBroker, ClientMessageBrokerFactory, FnArg, UiArguments} from '../shared/client_message_broker'; import {MessageBus} from '../shared/message_bus'; import {EVENT_CHANNEL, EVENT_V2_CHANNEL, RENDERER_CHANNEL, RENDERER_V2_CHANNEL} from '../shared/messaging_api'; diff --git a/modules/@angular/platform-webworker/src/web_workers/worker/worker_adapter.ts b/modules/@angular/platform-webworker/src/web_workers/worker/worker_adapter.ts index 4e88aa6f92..6cfc957ec2 100644 --- a/modules/@angular/platform-webworker/src/web_workers/worker/worker_adapter.ts +++ b/modules/@angular/platform-webworker/src/web_workers/worker/worker_adapter.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {DomAdapter, setRootDomAdapter} from '../../private_import_platform-browser'; +import {ɵDomAdapter as DomAdapter, ɵsetRootDomAdapter as setRootDomAdapter} from '@angular/platform-browser'; /** * This adapter is required to log error messages. diff --git a/modules/@angular/platform-webworker/src/worker_app.ts b/modules/@angular/platform-webworker/src/worker_app.ts index 89f5ef04a5..8982689fae 100644 --- a/modules/@angular/platform-webworker/src/worker_app.ts +++ b/modules/@angular/platform-webworker/src/worker_app.ts @@ -8,9 +8,7 @@ import {CommonModule} from '@angular/common'; import {APP_INITIALIZER, ApplicationModule, ErrorHandler, NgModule, NgZone, PlatformRef, Provider, RendererFactoryV2, RootRenderer, createPlatformFactory, platformCore} from '@angular/core'; -import {DOCUMENT} from '@angular/platform-browser'; - -import {BROWSER_SANITIZATION_PROVIDERS} from './private_import_platform-browser'; +import {DOCUMENT, ɵBROWSER_SANITIZATION_PROVIDERS as BROWSER_SANITIZATION_PROVIDERS} from '@angular/platform-browser'; import {ON_WEB_WORKER} from './web_workers/shared/api'; import {ClientMessageBrokerFactory, ClientMessageBrokerFactory_} from './web_workers/shared/client_message_broker'; import {MessageBus} from './web_workers/shared/message_bus'; diff --git a/modules/@angular/platform-webworker/src/worker_render.ts b/modules/@angular/platform-webworker/src/worker_render.ts index 1b81a94d9d..ac962b63b6 100644 --- a/modules/@angular/platform-webworker/src/worker_render.ts +++ b/modules/@angular/platform-webworker/src/worker_render.ts @@ -6,11 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ErrorHandler, Injectable, InjectionToken, Injector, NgZone, PLATFORM_INITIALIZER, PlatformRef, Provider, RendererFactoryV2, RootRenderer, Testability, createPlatformFactory, isDevMode, platformCore} from '@angular/core'; -import {AnimationDriver, DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '@angular/platform-browser'; - -import {APP_ID_RANDOM_PROVIDER} from './private_import_core'; -import {BROWSER_SANITIZATION_PROVIDERS, BrowserDomAdapter, BrowserGetTestability, DomEventsPlugin, DomRendererFactoryV2, DomRootRenderer, DomRootRenderer_, DomSharedStylesHost, HammerGesturesPlugin, KeyEventsPlugin, SharedStylesHost, WebAnimationsDriver, getDOM} from './private_import_platform-browser'; +import {ErrorHandler, Injectable, InjectionToken, Injector, NgZone, PLATFORM_INITIALIZER, PlatformRef, Provider, RendererFactoryV2, RootRenderer, Testability, createPlatformFactory, isDevMode, platformCore, ɵAPP_ID_RANDOM_PROVIDER as APP_ID_RANDOM_PROVIDER, ɵAPP_ID_RANDOM_PROVIDER as APP_ID_RANDOM_PROVIDER} from '@angular/core'; +import {AnimationDriver, DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HammerGestureConfig, ɵBROWSER_SANITIZATION_PROVIDERS as BROWSER_SANITIZATION_PROVIDERS, ɵBrowserDomAdapter as BrowserDomAdapter, ɵBrowserGetTestability as BrowserGetTestability, ɵDomEventsPlugin as DomEventsPlugin, ɵDomRootRenderer as DomRootRenderer, ɵDomRootRenderer_ as DomRootRenderer_, ɵDomSharedStylesHost as DomSharedStylesHost, ɵHammerGesturesPlugin as HammerGesturesPlugin, ɵKeyEventsPlugin as KeyEventsPlugin, ɵSharedStylesHost as SharedStylesHost, ɵWebAnimationsDriver as WebAnimationsDriver, ɵgetDOM as getDOM, ɵDomRendererFactoryV2 as DomRendererFactoryV2} from '@angular/platform-browser'; import {ON_WEB_WORKER} from './web_workers/shared/api'; import {ClientMessageBrokerFactory, ClientMessageBrokerFactory_} from './web_workers/shared/client_message_broker'; import {MessageBus} from './web_workers/shared/message_bus'; diff --git a/modules/@angular/router/src/private_export.ts b/modules/@angular/router/src/private_export.ts index e6f8bdfdbf..d65388ee99 100644 --- a/modules/@angular/router/src/private_export.ts +++ b/modules/@angular/router/src/private_export.ts @@ -8,16 +8,6 @@ -import {ROUTES} from './router_config_loader'; -import {ROUTER_PROVIDERS} from './router_module'; -import {flatten} from './utils/collection'; - -export const __router_private__: { - ROUTER_PROVIDERS: typeof ROUTER_PROVIDERS, - ROUTES: typeof ROUTES, - flatten: typeof flatten, -} = { - ROUTER_PROVIDERS: ROUTER_PROVIDERS, - ROUTES: ROUTES, - flatten: flatten, -}; +export {ROUTES as ɵROUTES} from './router_config_loader'; +export {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module'; +export {flatten as ɵflatten} from './utils/collection'; diff --git a/modules/@angular/router/src/private_import_core.ts b/modules/@angular/router/src/private_import_core.ts deleted file mode 100644 index 8de9d5f09f..0000000000 --- a/modules/@angular/router/src/private_import_core.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__core_private__ as r} from '@angular/core'; - -export const isPromise: typeof r.isPromise = r.isPromise; -export const isObservable: typeof r.isObservable = r.isObservable; diff --git a/modules/@angular/router/src/private_import_platform-browser.ts b/modules/@angular/router/src/private_import_platform-browser.ts deleted file mode 100644 index e1001c4b37..0000000000 --- a/modules/@angular/router/src/private_import_platform-browser.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import {__platform_browser_private__ as r} from '@angular/platform-browser'; - -export const getDOM: typeof r.getDOM = r.getDOM; diff --git a/modules/@angular/router/src/router_module.ts b/modules/@angular/router/src/router_module.ts index 2f3a762473..53552070e3 100644 --- a/modules/@angular/router/src/router_module.ts +++ b/modules/@angular/router/src/router_module.ts @@ -8,12 +8,12 @@ import {APP_BASE_HREF, HashLocationStrategy, Location, LocationStrategy, PathLocationStrategy, PlatformLocation} from '@angular/common'; import {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, ApplicationRef, Compiler, ComponentRef, Inject, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core'; +import {ɵgetDOM as getDOM} from '@angular/platform-browser'; import {Route, Routes} from './config'; import {RouterLink, RouterLinkWithHref} from './directives/router_link'; import {RouterLinkActive} from './directives/router_link_active'; import {RouterOutlet} from './directives/router_outlet'; -import {getDOM} from './private_import_platform-browser'; import {RouteReuseStrategy} from './route_reuse_strategy'; import {ErrorHandler, Router} from './router'; import {ROUTES} from './router_config_loader'; diff --git a/modules/@angular/router/src/utils/collection.ts b/modules/@angular/router/src/utils/collection.ts index 779520244e..cbd99c9e34 100644 --- a/modules/@angular/router/src/utils/collection.ts +++ b/modules/@angular/router/src/utils/collection.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModuleFactory} from '@angular/core'; +import {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {fromPromise} from 'rxjs/observable/fromPromise'; import {of } from 'rxjs/observable/of'; @@ -15,8 +15,6 @@ import {every} from 'rxjs/operator/every'; import * as l from 'rxjs/operator/last'; import {map} from 'rxjs/operator/map'; import {mergeAll} from 'rxjs/operator/mergeAll'; - -import {isObservable, isPromise} from '../private_import_core'; import {PRIMARY_OUTLET} from '../shared'; export function shallowEqualArrays(a: any[], b: any[]): boolean { diff --git a/modules/@angular/router/testing/private_import_router.ts b/modules/@angular/router/testing/private_import_router.ts deleted file mode 100644 index fa48491490..0000000000 --- a/modules/@angular/router/testing/private_import_router.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import {__router_private__ as _} from '@angular/router'; - -export const ROUTER_PROVIDERS: typeof _.ROUTER_PROVIDERS = _.ROUTER_PROVIDERS; -export const ROUTES: typeof _.ROUTES = _.ROUTES; -export const flatten: typeof _.flatten = _.flatten; diff --git a/modules/@angular/router/testing/router_testing_module.ts b/modules/@angular/router/testing/router_testing_module.ts index bcedf62453..d65ba0370f 100644 --- a/modules/@angular/router/testing/router_testing_module.ts +++ b/modules/@angular/router/testing/router_testing_module.ts @@ -9,9 +9,7 @@ import {Location, LocationStrategy} from '@angular/common'; import {MockLocationStrategy, SpyLocation} from '@angular/common/testing'; import {Compiler, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactory, NgModuleFactoryLoader, Optional} from '@angular/core'; -import {NoPreloading, PreloadingStrategy, Route, Router, RouterModule, RouterOutletMap, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes} from '@angular/router'; - -import {ROUTER_PROVIDERS, ROUTES, flatten} from './private_import_router'; +import {NoPreloading, PreloadingStrategy, Route, Router, RouterModule, RouterOutletMap, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵROUTES as ROUTES, ɵflatten as flatten} from '@angular/router';