@angular/core 7.0.0-rc.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +36 -33
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +3 -3
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +1856 -1463
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +155 -94
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +7 -6
- package/core.metadata.json +1 -1
- package/esm2015/core.externs.js +0 -3
- package/esm2015/core.js +6 -6
- package/esm2015/index.js +2 -2
- package/esm2015/public_api.js +2 -2
- package/esm2015/src/application_init.js +5 -1
- package/esm2015/src/application_module.js +2 -2
- package/esm2015/src/application_ref.js +11 -9
- package/esm2015/src/application_tokens.js +7 -7
- package/esm2015/src/change_detection/change_detection_util.js +3 -1
- package/esm2015/src/change_detection/change_detector_ref.js +2 -1
- package/esm2015/src/change_detection/constants.js +1 -1
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +2 -1
- package/esm2015/src/change_detection/differs/iterable_differs.js +8 -6
- package/esm2015/src/change_detection/differs/keyvalue_differs.js +6 -5
- package/esm2015/src/change_detection/pipe_transform.js +2 -2
- package/esm2015/src/core.js +2 -2
- package/esm2015/src/core_render3_private_export.js +5 -4
- package/esm2015/src/debug/debug_node.js +6 -6
- package/esm2015/src/di/defs.js +5 -5
- package/esm2015/src/di/forward_ref.js +4 -4
- package/esm2015/src/di/injectable.js +5 -2
- package/esm2015/src/di/injection_token.js +3 -1
- package/esm2015/src/di/injector.js +3 -3
- package/esm2015/src/di/metadata.js +16 -1
- package/esm2015/src/di/provider.js +16 -6
- package/esm2015/src/di/r3_injector.js +2 -2
- package/esm2015/src/di/reflective_injector.js +2 -2
- package/esm2015/src/di/reflective_key.js +3 -1
- package/esm2015/src/di/reflective_provider.js +3 -3
- package/esm2015/src/error_handler.js +3 -1
- package/esm2015/src/event_emitter.js +2 -1
- package/esm2015/src/i18n/tokens.js +4 -4
- package/esm2015/src/is_dev_mode.js +4 -2
- package/esm2015/src/ivy_switch/runtime/index.js +2 -2
- package/esm2015/src/ivy_switch/runtime/ivy_switch_on.js +4 -2
- package/esm2015/src/ivy_switch/runtime/jit.js +2 -2
- package/esm2015/src/ivy_switch/runtime/legacy.js +7 -1
- package/esm2015/src/ivy_switch/runtime/local.js +2 -2
- package/esm2015/src/linker/compiler.js +5 -4
- package/esm2015/src/linker/component_factory.js +4 -2
- package/esm2015/src/linker/component_factory_resolver.js +2 -1
- package/esm2015/src/linker/element_ref.js +2 -2
- package/esm2015/src/linker/ng_module_factory.js +3 -3
- package/esm2015/src/linker/ng_module_factory_loader.js +4 -3
- package/esm2015/src/linker/query_list.js +3 -1
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +3 -3
- package/esm2015/src/linker/template_ref.js +2 -1
- package/esm2015/src/linker/view_container_ref.js +2 -1
- package/esm2015/src/linker/view_ref.js +4 -2
- package/esm2015/src/metadata/di.js +13 -5
- package/esm2015/src/metadata/directives.js +20 -7
- package/esm2015/src/metadata/lifecycle_hooks.js +10 -5
- package/esm2015/src/metadata/ng_module.js +8 -6
- package/esm2015/src/metadata/view.js +1 -1
- package/esm2015/src/platform_core_providers.js +2 -2
- package/esm2015/src/profile/profile.js +5 -5
- package/esm2015/src/profile/wtf_impl.js +2 -2
- package/esm2015/src/r3_symbols.js +1 -1
- package/esm2015/src/reflection/reflection_capabilities.js +3 -3
- package/esm2015/src/render/api.js +20 -7
- package/esm2015/src/render3/component.js +52 -18
- package/esm2015/src/render3/component_ref.js +15 -15
- package/esm2015/src/render3/context_discovery.js +35 -126
- package/esm2015/src/render3/debug.js +33 -56
- package/esm2015/src/render3/definition.js +42 -37
- package/esm2015/src/render3/di.js +4 -28
- package/esm2015/src/render3/discovery_utils.js +10 -7
- package/esm2015/src/render3/i18n.js +60 -34
- package/esm2015/src/render3/index.js +3 -3
- package/esm2015/src/render3/instructions.js +162 -275
- package/esm2015/src/render3/interfaces/container.js +7 -5
- package/esm2015/src/render3/interfaces/context.js +60 -0
- package/esm2015/src/render3/interfaces/definition.js +7 -1
- package/esm2015/src/render3/interfaces/i18n.js +338 -0
- package/esm2015/src/render3/interfaces/node.js +12 -126
- package/esm2015/src/render3/interfaces/player.js +73 -1
- package/esm2015/src/render3/interfaces/styling.js +18 -22
- package/esm2015/src/render3/interfaces/view.js +19 -26
- package/esm2015/src/render3/jit/compiler_facade.js +22 -0
- package/esm2015/src/render3/jit/compiler_facade_interface.js +229 -0
- package/esm2015/src/render3/jit/directive.js +57 -93
- package/esm2015/src/render3/jit/environment.js +7 -3
- package/esm2015/src/render3/jit/injectable.js +21 -46
- package/esm2015/src/render3/jit/module.js +16 -43
- package/esm2015/src/render3/jit/pipe.js +6 -12
- package/esm2015/src/render3/jit/util.js +14 -17
- package/esm2015/src/render3/node_assert.js +1 -1
- package/esm2015/src/render3/node_manipulation.js +99 -109
- package/esm2015/src/render3/players.js +67 -0
- package/esm2015/src/render3/styling/class_and_style_bindings.js +347 -88
- package/esm2015/src/render3/styling/core_player_handler.js +2 -2
- package/esm2015/src/render3/styling/player_factory.js +48 -0
- package/esm2015/src/render3/styling/util.js +165 -17
- package/esm2015/src/render3/util.js +73 -20
- package/esm2015/src/render3/view_engine_compatibility.js +56 -40
- package/esm2015/src/sanitization/security.js +2 -2
- package/esm2015/src/testability/testability.js +5 -6
- package/esm2015/src/type.js +5 -2
- package/esm2015/src/util/decorators.js +2 -1
- package/esm2015/src/util.js +15 -1
- package/esm2015/src/version.js +6 -4
- package/esm2015/src/view/refs.js +3 -3
- package/esm2015/src/view/services.js +8 -6
- package/esm2015/src/zone/ng_zone.js +2 -2
- package/esm2015/testing/src/async.js +2 -2
- package/esm2015/testing/src/component_fixture.js +2 -2
- package/esm2015/testing/src/fake_async.js +7 -7
- package/esm2015/testing/src/fake_async_fallback.js +7 -7
- package/esm2015/testing/src/metadata_override.js +1 -1
- package/esm2015/testing/src/r3_test_bed.js +8 -6
- package/esm2015/testing/src/test_bed.js +10 -8
- package/esm2015/testing/src/test_bed_common.js +6 -6
- package/esm2015/testing/src/test_compiler.js +3 -3
- package/esm5/core.js +6 -6
- package/esm5/src/application_init.js +5 -1
- package/esm5/src/application_module.js +2 -2
- package/esm5/src/application_ref.js +11 -9
- package/esm5/src/application_tokens.js +7 -7
- package/esm5/src/change_detection/change_detection_util.js +3 -1
- package/esm5/src/change_detection/change_detector_ref.js +2 -1
- package/esm5/src/change_detection/constants.js +2 -1
- package/esm5/src/change_detection/differs/default_iterable_differ.js +2 -1
- package/esm5/src/change_detection/differs/iterable_differs.js +2 -1
- package/esm5/src/change_detection/differs/keyvalue_differs.js +2 -1
- package/esm5/src/change_detection/pipe_transform.js +1 -1
- package/esm5/src/core_render3_private_export.js +5 -4
- package/esm5/src/debug/debug_node.js +5 -5
- package/esm5/src/di/defs.js +3 -3
- package/esm5/src/di/forward_ref.js +3 -3
- package/esm5/src/di/injectable.js +6 -5
- package/esm5/src/di/injection_token.js +3 -1
- package/esm5/src/di/injector.js +3 -3
- package/esm5/src/di/metadata.js +6 -1
- package/esm5/src/di/provider.js +1 -1
- package/esm5/src/di/r3_injector.js +2 -2
- package/esm5/src/di/reflective_injector.js +2 -2
- package/esm5/src/di/reflective_key.js +3 -1
- package/esm5/src/di/reflective_provider.js +2 -2
- package/esm5/src/error_handler.js +3 -1
- package/esm5/src/event_emitter.js +2 -1
- package/esm5/src/i18n/tokens.js +5 -5
- package/esm5/src/is_dev_mode.js +4 -2
- package/esm5/src/ivy_switch/runtime/ivy_switch_on.js +3 -2
- package/esm5/src/ivy_switch/runtime/legacy.js +4 -1
- package/esm5/src/linker/compiler.js +5 -4
- package/esm5/src/linker/component_factory.js +5 -1
- package/esm5/src/linker/component_factory_resolver.js +4 -1
- package/esm5/src/linker/element_ref.js +2 -2
- package/esm5/src/linker/ng_module_factory.js +3 -3
- package/esm5/src/linker/ng_module_factory_loader.js +4 -3
- package/esm5/src/linker/query_list.js +3 -1
- package/esm5/src/linker/system_js_ng_module_factory_loader.js +3 -3
- package/esm5/src/linker/template_ref.js +2 -1
- package/esm5/src/linker/view_container_ref.js +2 -1
- package/esm5/src/linker/view_ref.js +4 -2
- package/esm5/src/metadata/di.js +10 -3
- package/esm5/src/metadata/directives.js +9 -6
- package/esm5/src/metadata/lifecycle_hooks.js +1 -1
- package/esm5/src/metadata/ng_module.js +4 -3
- package/esm5/src/metadata/view.js +4 -1
- package/esm5/src/platform_core_providers.js +2 -2
- package/esm5/src/profile/profile.js +5 -5
- package/esm5/src/profile/wtf_impl.js +1 -1
- package/esm5/src/r3_symbols.js +1 -1
- package/esm5/src/reflection/reflection_capabilities.js +3 -3
- package/esm5/src/render/api.js +11 -5
- package/esm5/src/render3/component.js +45 -16
- package/esm5/src/render3/component_ref.js +12 -13
- package/esm5/src/render3/context_discovery.js +33 -65
- package/esm5/src/render3/debug.js +31 -50
- package/esm5/src/render3/definition.js +35 -31
- package/esm5/src/render3/di.js +4 -20
- package/esm5/src/render3/discovery_utils.js +12 -7
- package/esm5/src/render3/i18n.js +40 -30
- package/esm5/src/render3/index.js +3 -3
- package/esm5/src/render3/instructions.js +143 -230
- package/esm5/src/render3/interfaces/container.js +6 -5
- package/esm5/src/render3/interfaces/context.js +13 -0
- package/esm5/src/render3/interfaces/definition.js +1 -1
- package/esm5/src/render3/interfaces/i18n.js +25 -0
- package/esm5/src/render3/interfaces/node.js +1 -1
- package/esm5/src/render3/interfaces/player.js +1 -1
- package/esm5/src/render3/interfaces/styling.js +1 -8
- package/esm5/src/render3/interfaces/view.js +18 -17
- package/esm5/src/render3/jit/compiler_facade.js +21 -0
- package/esm5/src/render3/jit/compiler_facade_interface.js +15 -0
- package/esm5/src/render3/jit/directive.js +44 -79
- package/esm5/src/render3/jit/environment.js +7 -3
- package/esm5/src/render3/jit/injectable.js +26 -46
- package/esm5/src/render3/jit/module.js +16 -31
- package/esm5/src/render3/jit/pipe.js +6 -9
- package/esm5/src/render3/jit/util.js +12 -17
- package/esm5/src/render3/node_assert.js +1 -1
- package/esm5/src/render3/node_manipulation.js +89 -101
- package/esm5/src/render3/players.js +59 -0
- package/esm5/src/render3/styling/class_and_style_bindings.js +248 -85
- package/esm5/src/render3/styling/core_player_handler.js +2 -2
- package/esm5/src/render3/styling/player_factory.js +29 -0
- package/esm5/src/render3/styling/util.js +132 -14
- package/esm5/src/render3/util.js +54 -21
- package/esm5/src/render3/view_engine_compatibility.js +46 -32
- package/esm5/src/sanitization/security.js +3 -3
- package/esm5/src/testability/testability.js +4 -4
- package/esm5/src/type.js +2 -2
- package/esm5/src/util/decorators.js +1 -1
- package/esm5/src/util.js +13 -1
- package/esm5/src/version.js +6 -3
- package/esm5/src/view/refs.js +1 -1
- package/esm5/src/view/services.js +7 -10
- package/esm5/src/zone/ng_zone.js +2 -2
- package/esm5/testing/src/async.js +2 -2
- package/esm5/testing/src/component_fixture.js +2 -2
- package/esm5/testing/src/fake_async.js +7 -7
- package/esm5/testing/src/fake_async_fallback.js +7 -7
- package/esm5/testing/src/metadata_override.js +1 -1
- package/esm5/testing/src/r3_test_bed.js +8 -7
- package/esm5/testing/src/test_bed.js +10 -8
- package/esm5/testing/src/test_bed_common.js +4 -4
- package/esm5/testing/src/test_compiler.js +3 -3
- package/fesm2015/core.js +2486 -1951
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +36 -32
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +1830 -1439
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +36 -33
- package/fesm5/testing.js.map +1 -1
- package/package.json +1 -2
- package/src/application_init.d.ts +4 -0
- package/src/application_module.d.ts +1 -1
- package/src/application_ref.d.ts +10 -8
- package/src/application_tokens.d.ts +6 -6
- package/src/change_detection/change_detection_util.d.ts +2 -0
- package/src/change_detection/change_detector_ref.d.ts +1 -0
- package/src/change_detection/constants.d.ts +1 -0
- package/src/change_detection/differs/default_iterable_differ.d.ts +1 -0
- package/src/change_detection/differs/iterable_differs.d.ts +8 -6
- package/src/change_detection/differs/keyvalue_differs.d.ts +5 -4
- package/src/change_detection/pipe_transform.d.ts +1 -1
- package/src/core_render3_private_export.d.ts +7 -5
- package/src/debug/debug_node.d.ts +5 -5
- package/src/di/defs.d.ts +4 -4
- package/src/di/forward_ref.d.ts +3 -3
- package/src/di/injectable.d.ts +10 -7
- package/src/di/injection_token.d.ts +2 -0
- package/src/di/injector.d.ts +5 -3
- package/src/di/metadata.d.ts +24 -1
- package/src/di/provider.d.ts +19 -5
- package/src/di/r3_injector.d.ts +1 -1
- package/src/di/reflective_injector.d.ts +1 -1
- package/src/di/reflective_key.d.ts +2 -0
- package/src/di/reflective_provider.d.ts +2 -2
- package/src/error_handler.d.ts +2 -0
- package/src/event_emitter.d.ts +1 -0
- package/src/i18n/tokens.d.ts +4 -4
- package/src/is_dev_mode.d.ts +3 -1
- package/src/ivy_switch/runtime/ivy_switch_on.d.ts +2 -1
- package/src/ivy_switch/runtime/legacy.d.ts +3 -0
- package/src/linker/compiler.d.ts +5 -4
- package/src/linker/component_factory.d.ts +5 -1
- package/src/linker/component_factory_resolver.d.ts +3 -0
- package/src/linker/element_ref.d.ts +1 -1
- package/src/linker/ng_module_factory.d.ts +2 -2
- package/src/linker/ng_module_factory_loader.d.ts +3 -2
- package/src/linker/query_list.d.ts +2 -0
- package/src/linker/system_js_ng_module_factory_loader.d.ts +2 -2
- package/src/linker/template_ref.d.ts +1 -0
- package/src/linker/view_container_ref.d.ts +1 -0
- package/src/linker/view_ref.d.ts +3 -1
- package/src/metadata/di.d.ts +13 -5
- package/src/metadata/directives.d.ts +19 -6
- package/src/metadata/lifecycle_hooks.d.ts +9 -4
- package/src/metadata/ng_module.d.ts +7 -7
- package/src/metadata/view.d.ts +3 -0
- package/src/platform_core_providers.d.ts +1 -1
- package/src/profile/profile.d.ts +4 -4
- package/src/profile/wtf_impl.d.ts +1 -1
- package/src/r3_symbols.d.ts +1 -1
- package/src/render/api.d.ts +10 -7
- package/src/render3/component.d.ts +14 -3
- package/src/render3/context_discovery.d.ts +6 -58
- package/src/render3/definition.d.ts +0 -4
- package/src/render3/di.d.ts +1 -3
- package/src/render3/discovery_utils.d.ts +7 -1
- package/src/render3/i18n.d.ts +4 -0
- package/src/render3/index.d.ts +2 -2
- package/src/render3/instructions.d.ts +43 -50
- package/src/render3/interfaces/container.d.ts +36 -22
- package/src/render3/interfaces/context.d.ts +52 -0
- package/src/render3/interfaces/definition.d.ts +8 -3
- package/src/render3/interfaces/i18n.d.ts +326 -0
- package/src/render3/interfaces/node.d.ts +12 -89
- package/src/render3/interfaces/player.d.ts +58 -4
- package/src/render3/interfaces/styling.d.ts +17 -15
- package/src/render3/interfaces/view.d.ts +28 -28
- package/src/render3/jit/compiler_facade.d.ts +3 -0
- package/src/render3/jit/compiler_facade_interface.d.ts +131 -0
- package/src/render3/jit/directive.d.ts +3 -0
- package/src/render3/jit/util.d.ts +3 -3
- package/src/render3/node_manipulation.d.ts +21 -22
- package/src/render3/players.d.ts +32 -0
- package/src/render3/styling/class_and_style_bindings.d.ts +31 -24
- package/src/render3/styling/player_factory.d.ts +31 -0
- package/src/render3/styling/util.d.ts +31 -9
- package/src/render3/util.d.ts +32 -15
- package/src/render3/view_engine_compatibility.d.ts +3 -0
- package/src/sanitization/security.d.ts +2 -2
- package/src/testability/testability.d.ts +5 -6
- package/src/type.d.ts +6 -1
- package/src/util/decorators.d.ts +1 -0
- package/src/util.d.ts +10 -0
- package/src/version.d.ts +4 -1
- package/src/view/services.d.ts +2 -2
- package/src/zone/ng_zone.d.ts +1 -1
- package/testing/src/async.d.ts +1 -1
- package/testing/src/component_fixture.d.ts +1 -1
- package/testing/src/fake_async.d.ts +6 -6
- package/testing/src/fake_async_fallback.d.ts +6 -6
- package/testing/src/metadata_override.d.ts +1 -1
- package/testing/src/r3_test_bed.d.ts +4 -4
- package/testing/src/test_bed.d.ts +12 -10
- package/testing/src/test_bed_common.d.ts +6 -6
- package/testing/src/test_compiler.d.ts +2 -2
- package/testing/testing.metadata.json +1 -1
- package/esm2015/src/render3/player.js +0 -51
- package/esm5/src/render3/player.js +0 -39
- package/src/render3/player.d.ts +0 -3
|
@@ -11,11 +11,12 @@ import { Sanitizer } from '../sanitization/security';
|
|
|
11
11
|
import { StyleSanitizeFn } from '../sanitization/style_sanitizer';
|
|
12
12
|
import { LContainer } from './interfaces/container';
|
|
13
13
|
import { ComponentDef, ComponentQuery, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, InitialStylingFlags, PipeDefListOrFactory, RenderFlags } from './interfaces/definition';
|
|
14
|
-
import {
|
|
14
|
+
import { LocalRefExtractor, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TProjectionNode, TViewNode } from './interfaces/node';
|
|
15
|
+
import { PlayerFactory } from './interfaces/player';
|
|
15
16
|
import { CssSelectorList } from './interfaces/projection';
|
|
16
17
|
import { LQueries } from './interfaces/query';
|
|
17
|
-
import { RComment, RElement, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
|
|
18
|
-
import { CurrentMatchesList, LViewData, LViewFlags, OpaqueViewState, RootContext, TView } from './interfaces/view';
|
|
18
|
+
import { RComment, RElement, RNode, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
|
|
19
|
+
import { CurrentMatchesList, LViewData, LViewFlags, OpaqueViewState, RootContext, RootContextFlags, TView } from './interfaces/view';
|
|
19
20
|
/**
|
|
20
21
|
* Function used to sanitize the value before writing it into the renderer.
|
|
21
22
|
*/
|
|
@@ -48,7 +49,6 @@ export declare function getCurrentView(): OpaqueViewState;
|
|
|
48
49
|
* @param viewToRestore The OpaqueViewState instance to restore.
|
|
49
50
|
*/
|
|
50
51
|
export declare function restoreView(viewToRestore: OpaqueViewState): void;
|
|
51
|
-
export declare function getPreviousOrParentNode(): LNode | null;
|
|
52
52
|
export declare function getPreviousOrParentTNode(): TNode;
|
|
53
53
|
export declare function setEnvironment(tNode: TNode, view: LViewData): void;
|
|
54
54
|
/**
|
|
@@ -96,30 +96,22 @@ export declare function setHostBindings(): void;
|
|
|
96
96
|
export declare function executeInitAndContentHooks(): void;
|
|
97
97
|
export declare function createLViewData<T>(renderer: Renderer3, tView: TView, context: T | null, flags: LViewFlags, sanitizer?: Sanitizer | null): LViewData;
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
100
|
-
* with the same shape
|
|
101
|
-
* (same properties assigned in the same order).
|
|
102
|
-
*/
|
|
103
|
-
export declare function createLNodeObject(type: TNodeType, native: RText | RElement | RComment | null, state: any): LElementNode & LTextNode & LViewNode & LContainerNode & LProjectionNode;
|
|
104
|
-
/**
|
|
105
|
-
* A common way of creating the LNode to make sure that all of them have same shape to
|
|
106
|
-
* keep the execution code monomorphic and fast.
|
|
99
|
+
* Create and stores the TNode, and hooks it up to the tree.
|
|
107
100
|
*
|
|
108
|
-
* @param index The index at which the
|
|
101
|
+
* @param index The index at which the TNode should be saved (null if view, since they are not
|
|
109
102
|
* saved).
|
|
110
|
-
* @param type The type of
|
|
111
|
-
* @param native The native element for this
|
|
103
|
+
* @param type The type of TNode to create
|
|
104
|
+
* @param native The native element for this node, if applicable
|
|
112
105
|
* @param name The tag name of the associated native element, if applicable
|
|
113
106
|
* @param attrs Any attrs for the native element, if applicable
|
|
114
|
-
* @param data Any data that should be saved on the LNode
|
|
115
107
|
*/
|
|
116
|
-
export declare function createNodeAtIndex(index: number, type: TNodeType.Element, native: RElement | RText | null, name: string | null, attrs: TAttributes | null
|
|
117
|
-
export declare function createNodeAtIndex(index: number, type: TNodeType.
|
|
118
|
-
export declare function createNodeAtIndex(index: number, type: TNodeType.
|
|
119
|
-
export declare function createNodeAtIndex(index: number, type: TNodeType.
|
|
120
|
-
export declare function
|
|
108
|
+
export declare function createNodeAtIndex(index: number, type: TNodeType.Element, native: RElement | RText | null, name: string | null, attrs: TAttributes | null): TElementNode;
|
|
109
|
+
export declare function createNodeAtIndex(index: number, type: TNodeType.Container, native: RComment, name: string | null, attrs: TAttributes | null): TContainerNode;
|
|
110
|
+
export declare function createNodeAtIndex(index: number, type: TNodeType.Projection, native: null, name: null, attrs: TAttributes | null): TProjectionNode;
|
|
111
|
+
export declare function createNodeAtIndex(index: number, type: TNodeType.ElementContainer, native: RComment, name: null, attrs: TAttributes | null): TElementContainerNode;
|
|
112
|
+
export declare function createViewNode(index: number, view: LViewData): TViewNode;
|
|
121
113
|
/**
|
|
122
|
-
* When
|
|
114
|
+
* When elements are created dynamically after a view blueprint is created (e.g. through
|
|
123
115
|
* i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future
|
|
124
116
|
* template passes.
|
|
125
117
|
*/
|
|
@@ -139,7 +131,7 @@ export declare function resetComponentState(): void;
|
|
|
139
131
|
* @param directives Directive defs that should be used for matching
|
|
140
132
|
* @param pipes Pipe defs that should be used for matching
|
|
141
133
|
*/
|
|
142
|
-
export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3,
|
|
134
|
+
export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3, hostView: LViewData | null, directives?: DirectiveDefListOrFactory | null, pipes?: PipeDefListOrFactory | null, sanitizer?: Sanitizer | null): LViewData;
|
|
143
135
|
/**
|
|
144
136
|
* Used for creating the LViewNode of a dynamic embedded view,
|
|
145
137
|
* either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().
|
|
@@ -226,6 +218,18 @@ export declare function resolveDirective(def: DirectiveDef<any>, valueIndex: num
|
|
|
226
218
|
/** Stores index of directive and host element so it will be queued for binding refresh during CD.
|
|
227
219
|
*/
|
|
228
220
|
export declare function queueHostBindingForCheck(dirIndex: number, def: DirectiveDef<any> | ComponentDef<any>): void;
|
|
221
|
+
/**
|
|
222
|
+
* Gets TView from a template function or creates a new TView
|
|
223
|
+
* if it doesn't already exist.
|
|
224
|
+
*
|
|
225
|
+
* @param templateFn The template from which to get static data
|
|
226
|
+
* @param consts The number of nodes, local refs, and pipes in this view
|
|
227
|
+
* @param vars The number of bindings and pure function bindings in this view
|
|
228
|
+
* @param directives Directive defs that should be saved on TView
|
|
229
|
+
* @param pipes Pipe defs that should be saved on TView
|
|
230
|
+
* @returns TView
|
|
231
|
+
*/
|
|
232
|
+
export declare function getOrCreateTView(templateFn: ComponentTemplate<any>, consts: number, vars: number, directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null, viewQuery: ComponentQuery<any> | null): TView;
|
|
229
233
|
/**
|
|
230
234
|
* Creates a TView instance
|
|
231
235
|
*
|
|
@@ -243,15 +247,6 @@ export declare function createError(text: string, token: any): Error;
|
|
|
243
247
|
* @param elementOrSelector Render element or CSS selector to locate the element.
|
|
244
248
|
*/
|
|
245
249
|
export declare function locateHostElement(factory: RendererFactory3, elementOrSelector: RElement | string): RElement | null;
|
|
246
|
-
/**
|
|
247
|
-
* Creates the host LNode.
|
|
248
|
-
*
|
|
249
|
-
* @param rNode Render host element.
|
|
250
|
-
* @param def ComponentDef
|
|
251
|
-
*
|
|
252
|
-
* @returns LElementNode created
|
|
253
|
-
*/
|
|
254
|
-
export declare function hostElement(tag: string, rNode: RElement | null, def: ComponentDef<any>, sanitizer?: Sanitizer | null): LElementNode;
|
|
255
250
|
/**
|
|
256
251
|
* Adds an event listener to the current node.
|
|
257
252
|
*
|
|
@@ -349,11 +344,10 @@ export declare function disableBindings(): void;
|
|
|
349
344
|
* @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET
|
|
350
345
|
* @param tagName The tag name of the node
|
|
351
346
|
* @param attrs The attributes defined on this node
|
|
352
|
-
* @param parent The parent of this node
|
|
353
347
|
* @param tViews Any TViews attached to this node
|
|
354
348
|
* @returns the TNode object
|
|
355
349
|
*/
|
|
356
|
-
export declare function createTNode(type: TNodeType, adjustedIndex: number, tagName: string | null, attrs: TAttributes | null,
|
|
350
|
+
export declare function createTNode(type: TNodeType, adjustedIndex: number, tagName: string | null, attrs: TAttributes | null, tViews: TView[] | null): TNode;
|
|
357
351
|
/**
|
|
358
352
|
* Add or remove a class in a `classList` on a DOM element.
|
|
359
353
|
*
|
|
@@ -364,7 +358,7 @@ export declare function createTNode(type: TNodeType, adjustedIndex: number, tagN
|
|
|
364
358
|
* renaming as part of minification.
|
|
365
359
|
* @param value A value indicating if a given class should be added or removed.
|
|
366
360
|
*/
|
|
367
|
-
export declare function elementClassProp
|
|
361
|
+
export declare function elementClassProp(index: number, stylingIndex: number, value: boolean | PlayerFactory): void;
|
|
368
362
|
/**
|
|
369
363
|
* Assign any inline style values to the element during creation mode.
|
|
370
364
|
*
|
|
@@ -393,7 +387,7 @@ export declare function elementClassProp<T>(index: number, stylingIndex: number,
|
|
|
393
387
|
* @param styleSanitizer An optional sanitizer function that will be used (if provided)
|
|
394
388
|
* to sanitize the any CSS property values that are applied to the element (during rendering).
|
|
395
389
|
*/
|
|
396
|
-
export declare function elementStyling
|
|
390
|
+
export declare function elementStyling(classDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleSanitizer?: StyleSanitizeFn | null): void;
|
|
397
391
|
/**
|
|
398
392
|
* Apply all styling values to the element which have been queued by any styling instructions.
|
|
399
393
|
*
|
|
@@ -408,7 +402,7 @@ export declare function elementStyling<T>(classDeclarations?: (string | boolean
|
|
|
408
402
|
* specifically for element styling--the index must be the next index after the element
|
|
409
403
|
* index.)
|
|
410
404
|
*/
|
|
411
|
-
export declare function elementStylingApply
|
|
405
|
+
export declare function elementStylingApply(index: number): void;
|
|
412
406
|
/**
|
|
413
407
|
* Queue a given style to be rendered on an Element.
|
|
414
408
|
*
|
|
@@ -424,14 +418,12 @@ export declare function elementStylingApply<T>(index: number): void;
|
|
|
424
418
|
* specifically for element styling--the index must be the next index after the element
|
|
425
419
|
* index.)
|
|
426
420
|
* @param styleIndex Index of the style property on this element. (Monotonically increasing.)
|
|
427
|
-
* @param styleName Name of property. Because it is going to DOM this is not subject to
|
|
428
|
-
* renaming as part of minification.
|
|
429
421
|
* @param value New value to write (null to remove).
|
|
430
422
|
* @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
|
|
431
423
|
* Note that when a suffix is provided then the underlying sanitizer will
|
|
432
424
|
* be ignored.
|
|
433
425
|
*/
|
|
434
|
-
export declare function elementStyleProp
|
|
426
|
+
export declare function elementStyleProp(index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string): void;
|
|
435
427
|
/**
|
|
436
428
|
* Queue a key/value map of styles to be rendered on an Element.
|
|
437
429
|
*
|
|
@@ -489,17 +481,20 @@ export declare function directiveCreate<T>(directiveDefIdx: number, directive: T
|
|
|
489
481
|
* This version does not contain features that we don't already support at root in
|
|
490
482
|
* current Angular. Example: local refs and inputs on root component.
|
|
491
483
|
*/
|
|
492
|
-
export declare function baseDirectiveCreate<T>(index: number, directive: T, directiveDef: DirectiveDef<T> | ComponentDef<T>,
|
|
484
|
+
export declare function baseDirectiveCreate<T>(index: number, directive: T, directiveDef: DirectiveDef<T> | ComponentDef<T>, native: RNode | null): T;
|
|
493
485
|
/**
|
|
494
486
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
495
487
|
*
|
|
488
|
+
* @param hostNative The host element for the LContainer
|
|
489
|
+
* @param hostTNode The host TNode for the LContainer
|
|
496
490
|
* @param currentView The parent view of the LContainer
|
|
491
|
+
* @param native The native comment element
|
|
497
492
|
* @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
|
|
498
493
|
* @returns LContainer
|
|
499
494
|
*/
|
|
500
|
-
export declare function createLContainer(currentView: LViewData, isForViewContainerRef?: boolean): LContainer;
|
|
495
|
+
export declare function createLContainer(hostNative: RElement | RComment, hostTNode: TElementNode | TContainerNode | TElementContainerNode, currentView: LViewData, native: RComment, isForViewContainerRef?: boolean): LContainer;
|
|
501
496
|
/**
|
|
502
|
-
* Creates an
|
|
497
|
+
* Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
|
|
503
498
|
*
|
|
504
499
|
* <ng-template #foo>
|
|
505
500
|
* <div></div>
|
|
@@ -517,7 +512,7 @@ export declare function createLContainer(currentView: LViewData, isForViewContai
|
|
|
517
512
|
*/
|
|
518
513
|
export declare function template(index: number, templateFn: ComponentTemplate<any> | null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor): void;
|
|
519
514
|
/**
|
|
520
|
-
* Creates an
|
|
515
|
+
* Creates an LContainer for inline views, e.g.
|
|
521
516
|
*
|
|
522
517
|
* % if (showing) {
|
|
523
518
|
* <div></div>
|
|
@@ -533,9 +528,9 @@ export declare function container(index: number): void;
|
|
|
533
528
|
*/
|
|
534
529
|
export declare function containerRefreshStart(index: number): void;
|
|
535
530
|
/**
|
|
536
|
-
* Marks the end of the
|
|
531
|
+
* Marks the end of the LContainer.
|
|
537
532
|
*
|
|
538
|
-
* Marking the end of
|
|
533
|
+
* Marking the end of LContainer is the time when to child views get inserted or removed.
|
|
539
534
|
*/
|
|
540
535
|
export declare function containerRefreshEnd(): void;
|
|
541
536
|
/**
|
|
@@ -600,7 +595,7 @@ export declare function projection(nodeIndex: number, selectorIndex?: number, at
|
|
|
600
595
|
*/
|
|
601
596
|
export declare function addToViewTree<T extends LViewData | LContainer>(currentView: LViewData, adjustedHostIndex: number, state: T): T;
|
|
602
597
|
/** If node is an OnPush component, marks its LViewData dirty. */
|
|
603
|
-
export declare function markDirtyIfOnPush(
|
|
598
|
+
export declare function markDirtyIfOnPush(viewIndex: number): void;
|
|
604
599
|
/** Wraps an event listener with preventDefault behavior. */
|
|
605
600
|
export declare function wrapListenerWithPreventDefault(listenerFn: (e?: any) => any): EventListener;
|
|
606
601
|
/** Marks current view and all ancestors dirty */
|
|
@@ -616,7 +611,7 @@ export declare function markViewDirty(view: LViewData): void;
|
|
|
616
611
|
* `scheduleTick` requests. The scheduling function can be overridden in
|
|
617
612
|
* `renderComponent`'s `scheduler` option.
|
|
618
613
|
*/
|
|
619
|
-
export declare function scheduleTick<T>(rootContext: RootContext): void;
|
|
614
|
+
export declare function scheduleTick<T>(rootContext: RootContext, flags: RootContextFlags): void;
|
|
620
615
|
/**
|
|
621
616
|
* Used to perform change detection on the whole application.
|
|
622
617
|
*
|
|
@@ -744,8 +739,6 @@ export declare function reference<T>(index: number): T;
|
|
|
744
739
|
export declare function loadQueryList<T>(queryListIdx: number): QueryList<T>;
|
|
745
740
|
/** Retrieves a value from current `viewData`. */
|
|
746
741
|
export declare function load<T>(index: number): T;
|
|
747
|
-
export declare function loadElement(index: number): LElementNode;
|
|
748
|
-
export declare function getTNode(index: number): TNode;
|
|
749
742
|
/** Gets the current binding value. */
|
|
750
743
|
export declare function getBinding(bindingIndex: number): any;
|
|
751
744
|
/** Updates binding if changed, then returns whether it was updated. */
|
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { LElementNode } from './node';
|
|
9
8
|
import { LQueries } from './query';
|
|
10
|
-
import {
|
|
9
|
+
import { RComment, RElement } from './renderer';
|
|
10
|
+
import { StylingContext } from './styling';
|
|
11
|
+
import { HOST, LViewData, NEXT, PARENT, QUERIES } from './view';
|
|
11
12
|
/**
|
|
12
13
|
* Below are constants for LContainer indices to help us look up LContainer members
|
|
13
14
|
* without having to remember the specific indices.
|
|
14
15
|
* Uglify will inline these when minifying so there shouldn't be a cost.
|
|
15
16
|
*/
|
|
16
17
|
export declare const ACTIVE_INDEX = 0;
|
|
17
|
-
export declare const VIEWS =
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const VIEWS = 1;
|
|
19
|
+
export declare const NATIVE = 6;
|
|
20
|
+
export declare const RENDER_PARENT = 7;
|
|
19
21
|
/**
|
|
20
|
-
* The state associated with
|
|
22
|
+
* The state associated with a container.
|
|
21
23
|
*
|
|
22
24
|
* This is an array so that its structure is closer to LViewData. This helps
|
|
23
25
|
* when traversing the view tree (which is a mix of containers and component
|
|
@@ -32,7 +34,15 @@ export interface LContainer extends Array<any> {
|
|
|
32
34
|
* it is set to null to identify this scenario, as indices are "absolute" in that case,
|
|
33
35
|
* i.e. provided directly by the user of the ViewContainerRef API.
|
|
34
36
|
*/
|
|
35
|
-
[ACTIVE_INDEX]: number
|
|
37
|
+
[ACTIVE_INDEX]: number;
|
|
38
|
+
/**
|
|
39
|
+
* A list of the container's currently active child views. Views will be inserted
|
|
40
|
+
* here as they are added and spliced from here when they are removed. We need
|
|
41
|
+
* to keep a record of current views so we know which views are already in the DOM
|
|
42
|
+
* (and don't need to be re-added) and so we can remove views from the DOM when they
|
|
43
|
+
* are no longer required.
|
|
44
|
+
*/
|
|
45
|
+
[VIEWS]: LViewData[];
|
|
36
46
|
/**
|
|
37
47
|
* Access to the parent view is necessary so we can propagate back
|
|
38
48
|
* up from inside a container to parent[NEXT].
|
|
@@ -49,33 +59,37 @@ export interface LContainer extends Array<any> {
|
|
|
49
59
|
*/
|
|
50
60
|
[QUERIES]: LQueries | null;
|
|
51
61
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
62
|
+
* The host element of this LContainer.
|
|
63
|
+
*
|
|
64
|
+
* The host could be an LViewData if this container is on a component node.
|
|
65
|
+
* In that case, the component LViewData is its HOST.
|
|
66
|
+
*
|
|
67
|
+
* It could also be a styling context if this is a node with a style/class
|
|
68
|
+
* binding.
|
|
57
69
|
*/
|
|
58
|
-
[
|
|
70
|
+
[HOST]: RElement | RComment | StylingContext | LViewData;
|
|
71
|
+
/** The comment element that serves as an anchor for this LContainer. */
|
|
72
|
+
[NATIVE]: RComment;
|
|
59
73
|
/**
|
|
60
|
-
* Parent Element which will contain the location where all of the
|
|
74
|
+
* Parent Element which will contain the location where all of the views will be
|
|
61
75
|
* inserted into to.
|
|
62
76
|
*
|
|
63
77
|
* If `renderParent` is `null` it is headless. This means that it is contained
|
|
64
|
-
* in another
|
|
78
|
+
* in another view which in turn is contained in another container and
|
|
65
79
|
* therefore it does not yet have its own parent.
|
|
66
80
|
*
|
|
67
81
|
* If `renderParent` is not `null` then it may be:
|
|
68
|
-
* - same as `
|
|
69
|
-
* - different from `
|
|
70
|
-
* In other words `
|
|
71
|
-
* `
|
|
82
|
+
* - same as `tContainerNode.parent` in which case it is just a normal container.
|
|
83
|
+
* - different from `tContainerNode.parent` in which case it has been re-projected.
|
|
84
|
+
* In other words `tContainerNode.parent` is logical parent where as
|
|
85
|
+
* `tContainerNode.projectedParent` is render parent.
|
|
72
86
|
*
|
|
73
|
-
* When views are inserted into `
|
|
74
|
-
* - `null`, we are in
|
|
87
|
+
* When views are inserted into `LContainer` then `renderParent` is:
|
|
88
|
+
* - `null`, we are in a view, keep going up a hierarchy until actual
|
|
75
89
|
* `renderParent` is found.
|
|
76
90
|
* - not `null`, then use the `projectedParent.native` as the `RElement` to insert
|
|
77
|
-
*
|
|
91
|
+
* views into.
|
|
78
92
|
*/
|
|
79
|
-
[RENDER_PARENT]:
|
|
93
|
+
[RENDER_PARENT]: RElement | null;
|
|
80
94
|
}
|
|
81
95
|
export declare const unusedValueExportToPlacateAjd = 1;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { RElement } from './renderer';
|
|
9
|
+
import { LViewData } from './view';
|
|
10
|
+
/**
|
|
11
|
+
* This property will be monkey-patched on elements, components and directives
|
|
12
|
+
*/
|
|
13
|
+
export declare const MONKEY_PATCH_KEY_NAME = "__ngContext__";
|
|
14
|
+
/**
|
|
15
|
+
* The internal view context which is specific to a given DOM element, directive or
|
|
16
|
+
* component instance. Each value in here (besides the LViewData and element node details)
|
|
17
|
+
* can be present, null or undefined. If undefined then it implies the value has not been
|
|
18
|
+
* looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
|
|
19
|
+
*
|
|
20
|
+
* Each value will get filled when the respective value is examined within the getContext
|
|
21
|
+
* function. The component, element and each directive instance will share the same instance
|
|
22
|
+
* of the context.
|
|
23
|
+
*/
|
|
24
|
+
export interface LContext {
|
|
25
|
+
/**
|
|
26
|
+
* The component's parent view data.
|
|
27
|
+
*/
|
|
28
|
+
lViewData: LViewData;
|
|
29
|
+
/**
|
|
30
|
+
* The index instance of the node.
|
|
31
|
+
*/
|
|
32
|
+
nodeIndex: number;
|
|
33
|
+
/**
|
|
34
|
+
* The instance of the DOM node that is attached to the lNode.
|
|
35
|
+
*/
|
|
36
|
+
native: RElement;
|
|
37
|
+
/**
|
|
38
|
+
* The instance of the Component node.
|
|
39
|
+
*/
|
|
40
|
+
component: {} | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The list of active directives that exist on this element.
|
|
43
|
+
*/
|
|
44
|
+
directives: any[] | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The map of local references (local reference name => element or directive instance) that exist
|
|
47
|
+
* on this element.
|
|
48
|
+
*/
|
|
49
|
+
localRefs: {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
} | null | undefined;
|
|
52
|
+
}
|
|
@@ -178,7 +178,7 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
|
|
|
178
178
|
/**
|
|
179
179
|
* Runtime unique component ID.
|
|
180
180
|
*/
|
|
181
|
-
id: string;
|
|
181
|
+
readonly id: string;
|
|
182
182
|
/**
|
|
183
183
|
* The View template of the component.
|
|
184
184
|
*/
|
|
@@ -193,14 +193,14 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
|
|
|
193
193
|
* Used to calculate the length of the component's LViewData array, so we
|
|
194
194
|
* can pre-fill the array and set the binding start index.
|
|
195
195
|
*/
|
|
196
|
-
consts: number;
|
|
196
|
+
readonly consts: number;
|
|
197
197
|
/**
|
|
198
198
|
* The number of bindings in this component template (including pure fn bindings).
|
|
199
199
|
*
|
|
200
200
|
* Used to calculate the length of the component's LViewData array, so we
|
|
201
201
|
* can pre-fill the array and set the host binding start index.
|
|
202
202
|
*/
|
|
203
|
-
vars: number;
|
|
203
|
+
readonly vars: number;
|
|
204
204
|
/**
|
|
205
205
|
* Query-related instructions for a component.
|
|
206
206
|
*/
|
|
@@ -248,6 +248,11 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
|
|
|
248
248
|
* `PipeDefs`s. The function is necessary to be able to support forward declarations.
|
|
249
249
|
*/
|
|
250
250
|
pipeDefs: PipeDefListOrFactory | null;
|
|
251
|
+
/**
|
|
252
|
+
* Used to store the result of `noSideEffects` function so that it is not removed by closure
|
|
253
|
+
* compiler. The property should never be read.
|
|
254
|
+
*/
|
|
255
|
+
readonly _?: never;
|
|
251
256
|
}
|
|
252
257
|
/**
|
|
253
258
|
* Runtime link information for Pipes.
|