@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
|
@@ -8,30 +8,32 @@
|
|
|
8
8
|
import { Injector } from '../../di/injector';
|
|
9
9
|
import { QueryList } from '../../linker';
|
|
10
10
|
import { Sanitizer } from '../../sanitization/security';
|
|
11
|
-
import { PlayerHandler } from '../interfaces/player';
|
|
12
11
|
import { LContainer } from './container';
|
|
13
12
|
import { ComponentDef, ComponentQuery, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList } from './definition';
|
|
14
13
|
import { TElementNode, TNode, TViewNode } from './node';
|
|
14
|
+
import { PlayerHandler } from './player';
|
|
15
15
|
import { LQueries } from './query';
|
|
16
|
-
import { Renderer3 } from './renderer';
|
|
16
|
+
import { RElement, Renderer3 } from './renderer';
|
|
17
|
+
import { StylingContext } from './styling';
|
|
17
18
|
/** Size of LViewData's header. Necessary to adjust for it when setting slots. */
|
|
18
|
-
export declare const HEADER_OFFSET =
|
|
19
|
+
export declare const HEADER_OFFSET = 17;
|
|
19
20
|
export declare const TVIEW = 0;
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
21
|
+
export declare const FLAGS = 1;
|
|
22
|
+
export declare const PARENT = 2;
|
|
23
|
+
export declare const NEXT = 3;
|
|
24
|
+
export declare const QUERIES = 4;
|
|
25
|
+
export declare const HOST = 5;
|
|
26
|
+
export declare const HOST_NODE = 6;
|
|
27
|
+
export declare const BINDING_INDEX = 7;
|
|
28
|
+
export declare const CLEANUP = 8;
|
|
29
|
+
export declare const CONTEXT = 9;
|
|
30
|
+
export declare const INJECTOR = 10;
|
|
31
|
+
export declare const RENDERER = 11;
|
|
32
|
+
export declare const SANITIZER = 12;
|
|
33
|
+
export declare const TAIL = 13;
|
|
34
|
+
export declare const CONTAINER_INDEX = 14;
|
|
35
|
+
export declare const CONTENT_QUERIES = 15;
|
|
36
|
+
export declare const DECLARATION_VIEW = 16;
|
|
35
37
|
export interface OpaqueViewState {
|
|
36
38
|
'__brand__': 'Brand for OpaqueViewState that nothing will match';
|
|
37
39
|
}
|
|
@@ -52,6 +54,8 @@ export interface LViewData extends Array<any> {
|
|
|
52
54
|
* directive defs are stored).
|
|
53
55
|
*/
|
|
54
56
|
[TVIEW]: TView;
|
|
57
|
+
/** Flags for this view. See LViewFlags for more info. */
|
|
58
|
+
[FLAGS]: LViewFlags;
|
|
55
59
|
/**
|
|
56
60
|
* The parent view is needed when we exit the view and must restore the previous
|
|
57
61
|
* `LViewData`. Without this, the render method would have to keep a stack of
|
|
@@ -73,8 +77,12 @@ export interface LViewData extends Array<any> {
|
|
|
73
77
|
[NEXT]: LViewData | LContainer | null;
|
|
74
78
|
/** Queries active for this view - nodes from a view are reported to those queries. */
|
|
75
79
|
[QUERIES]: LQueries | null;
|
|
76
|
-
/**
|
|
77
|
-
|
|
80
|
+
/**
|
|
81
|
+
* The host node for this LViewData instance, if this is a component view.
|
|
82
|
+
*
|
|
83
|
+
* If this is an embedded view, HOST will be null.
|
|
84
|
+
*/
|
|
85
|
+
[HOST]: RElement | StylingContext | null;
|
|
78
86
|
/**
|
|
79
87
|
* Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.
|
|
80
88
|
*
|
|
@@ -294,14 +302,6 @@ export interface TView {
|
|
|
294
302
|
* - String, temporary 'CIRCULAR' token set while dependencies are being resolved
|
|
295
303
|
*/
|
|
296
304
|
currentMatches: CurrentMatchesList | null;
|
|
297
|
-
/**
|
|
298
|
-
* Directive and component defs that have already been matched to nodes on
|
|
299
|
-
* this view.
|
|
300
|
-
*
|
|
301
|
-
* Defs are stored at the same index in TView.directives[] as their instances
|
|
302
|
-
* are stored in LView.directives[]. This simplifies lookup in DI.
|
|
303
|
-
*/
|
|
304
|
-
directives: DirectiveDefList | null;
|
|
305
305
|
/**
|
|
306
306
|
* Set of instructions used to process host bindings efficiently.
|
|
307
307
|
*
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow
|
|
10
|
+
* for late binding of `@angular/compiler` for JIT purposes.
|
|
11
|
+
*
|
|
12
|
+
* This file has two copies. Please ensure that they are in sync:
|
|
13
|
+
* - packages/compiler/src/compiler_facade_interface.ts (master)
|
|
14
|
+
* - packages/core/src/render3/jit/compiler_facade_interface.ts (copy)
|
|
15
|
+
*
|
|
16
|
+
* Please ensure that the two files are in sync using this command:
|
|
17
|
+
* ```
|
|
18
|
+
* cp packages/compiler/src/compiler_facade_interface.ts \
|
|
19
|
+
* packages/core/src/render3/jit/compiler_facade_interface.ts
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export interface ExportedCompilerFacade {
|
|
23
|
+
ɵcompilerFacade: CompilerFacade;
|
|
24
|
+
}
|
|
25
|
+
export interface CompilerFacade {
|
|
26
|
+
compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade): any;
|
|
27
|
+
compileInjectable(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;
|
|
28
|
+
compileInjector(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;
|
|
29
|
+
compileNgModule(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;
|
|
30
|
+
compileDirective(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;
|
|
31
|
+
compileComponent(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;
|
|
32
|
+
R3ResolvedDependencyType: typeof R3ResolvedDependencyType;
|
|
33
|
+
}
|
|
34
|
+
export interface CoreEnvironment {
|
|
35
|
+
[name: string]: Function;
|
|
36
|
+
}
|
|
37
|
+
export declare type StringMap = {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type StringMapWithRename = {
|
|
41
|
+
[key: string]: string | [string, string];
|
|
42
|
+
};
|
|
43
|
+
export declare type Provider = any;
|
|
44
|
+
export declare enum R3ResolvedDependencyType {
|
|
45
|
+
Token = 0,
|
|
46
|
+
Attribute = 1,
|
|
47
|
+
Injector = 2
|
|
48
|
+
}
|
|
49
|
+
export interface R3DependencyMetadataFacade {
|
|
50
|
+
token: any;
|
|
51
|
+
resolved: R3ResolvedDependencyType;
|
|
52
|
+
host: boolean;
|
|
53
|
+
optional: boolean;
|
|
54
|
+
self: boolean;
|
|
55
|
+
skipSelf: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface R3PipeMetadataFacade {
|
|
58
|
+
name: string;
|
|
59
|
+
type: any;
|
|
60
|
+
pipeName: string;
|
|
61
|
+
deps: R3DependencyMetadataFacade[] | null;
|
|
62
|
+
pure: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface R3InjectableMetadataFacade {
|
|
65
|
+
name: string;
|
|
66
|
+
type: any;
|
|
67
|
+
ctorDeps: R3DependencyMetadataFacade[] | null;
|
|
68
|
+
providedIn: any;
|
|
69
|
+
useClass?: any;
|
|
70
|
+
useFactory?: any;
|
|
71
|
+
useExisting?: any;
|
|
72
|
+
useValue?: any;
|
|
73
|
+
userDeps?: R3DependencyMetadataFacade[];
|
|
74
|
+
}
|
|
75
|
+
export interface R3NgModuleMetadataFacade {
|
|
76
|
+
type: any;
|
|
77
|
+
bootstrap: Function[];
|
|
78
|
+
declarations: Function[];
|
|
79
|
+
imports: Function[];
|
|
80
|
+
exports: Function[];
|
|
81
|
+
emitInline: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface R3InjectorMetadataFacade {
|
|
84
|
+
name: string;
|
|
85
|
+
type: any;
|
|
86
|
+
deps: R3DependencyMetadataFacade[] | null;
|
|
87
|
+
providers: any;
|
|
88
|
+
imports: any;
|
|
89
|
+
}
|
|
90
|
+
export interface R3DirectiveMetadataFacade {
|
|
91
|
+
name: string;
|
|
92
|
+
type: any;
|
|
93
|
+
typeArgumentCount: number;
|
|
94
|
+
typeSourceSpan: null;
|
|
95
|
+
deps: R3DependencyMetadataFacade[] | null;
|
|
96
|
+
selector: string | null;
|
|
97
|
+
queries: R3QueryMetadataFacade[];
|
|
98
|
+
host: {
|
|
99
|
+
[key: string]: string;
|
|
100
|
+
};
|
|
101
|
+
propMetadata: {
|
|
102
|
+
[key: string]: any[];
|
|
103
|
+
};
|
|
104
|
+
lifecycle: {
|
|
105
|
+
usesOnChanges: boolean;
|
|
106
|
+
};
|
|
107
|
+
inputs: string[];
|
|
108
|
+
outputs: string[];
|
|
109
|
+
usesInheritance: boolean;
|
|
110
|
+
exportAs: string | null;
|
|
111
|
+
providers: Provider[] | null;
|
|
112
|
+
}
|
|
113
|
+
export interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {
|
|
114
|
+
template: string;
|
|
115
|
+
preserveWhitespaces: boolean;
|
|
116
|
+
animations: any[] | undefined;
|
|
117
|
+
viewQueries: R3QueryMetadataFacade[];
|
|
118
|
+
pipes: Map<string, any>;
|
|
119
|
+
directives: Map<string, any>;
|
|
120
|
+
styles: string[];
|
|
121
|
+
encapsulation: ViewEncapsulation;
|
|
122
|
+
viewProviders: Provider[] | null;
|
|
123
|
+
}
|
|
124
|
+
export declare type ViewEncapsulation = number;
|
|
125
|
+
export interface R3QueryMetadataFacade {
|
|
126
|
+
propertyName: string;
|
|
127
|
+
first: boolean;
|
|
128
|
+
predicate: any | string[];
|
|
129
|
+
descendants: boolean;
|
|
130
|
+
read: any | null;
|
|
131
|
+
}
|
|
@@ -5,8 +5,10 @@
|
|
|
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 { Query } from '../../metadata/di';
|
|
8
9
|
import { Component, Directive } from '../../metadata/directives';
|
|
9
10
|
import { Type } from '../../type';
|
|
11
|
+
import { R3QueryMetadataFacade } from './compiler_facade_interface';
|
|
10
12
|
/**
|
|
11
13
|
* Compile an Angular component according to its decorator metadata, and patch the resulting
|
|
12
14
|
* ngComponentDef onto the component type.
|
|
@@ -26,3 +28,4 @@ export declare function compileComponent(type: Type<any>, metadata: Component):
|
|
|
26
28
|
*/
|
|
27
29
|
export declare function compileDirective(type: Type<any>, directive: Directive): void;
|
|
28
30
|
export declare function extendsDirectlyFromObject(type: Type<any>): boolean;
|
|
31
|
+
export declare function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade;
|
|
@@ -5,9 +5,9 @@
|
|
|
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 { R3DependencyMetadata } from '@angular/compiler';
|
|
9
8
|
import { ReflectionCapabilities } from '../../reflection/reflection_capabilities';
|
|
10
9
|
import { Type } from '../../type';
|
|
10
|
+
import { R3DependencyMetadataFacade } from './compiler_facade';
|
|
11
11
|
export declare function getReflect(): ReflectionCapabilities;
|
|
12
|
-
export declare function reflectDependencies(type: Type<any>):
|
|
13
|
-
export declare function convertDependencies(deps: any[]):
|
|
12
|
+
export declare function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[];
|
|
13
|
+
export declare function convertDependencies(deps: any[]): R3DependencyMetadataFacade[];
|
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { LContainer } from './interfaces/container';
|
|
9
|
-
import {
|
|
10
|
-
import { RComment, RNode, RText, Renderer3 } from './interfaces/renderer';
|
|
9
|
+
import { TContainerNode, TElementContainerNode, TElementNode, TNode, TViewNode } from './interfaces/node';
|
|
10
|
+
import { RComment, RElement, RNode, RText, Renderer3 } from './interfaces/renderer';
|
|
11
11
|
import { LViewData } from './interfaces/view';
|
|
12
|
-
/** Retrieves the parent
|
|
13
|
-
export declare function
|
|
12
|
+
/** Retrieves the parent element of a given node. */
|
|
13
|
+
export declare function getParentNative(tNode: TNode, currentView: LViewData): RElement | RComment | null;
|
|
14
14
|
/**
|
|
15
|
-
* Gets the host
|
|
16
|
-
*
|
|
15
|
+
* Gets the host element given a view. Will return null if the current view is an embedded view,
|
|
16
|
+
* which does not have a host element.
|
|
17
17
|
*/
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
18
|
+
export declare function getHostNative(currentView: LViewData): RElement | null;
|
|
19
|
+
export declare function getLContainer(tNode: TViewNode, embeddedView: LViewData): LContainer | null;
|
|
20
20
|
/**
|
|
21
|
-
* Retrieves render parent
|
|
21
|
+
* Retrieves render parent for a given view.
|
|
22
22
|
* Might be null if a view is not yet attached to any container.
|
|
23
23
|
*/
|
|
24
|
-
export declare function getContainerRenderParent(tViewNode: TViewNode, view: LViewData):
|
|
24
|
+
export declare function getContainerRenderParent(tViewNode: TViewNode, view: LViewData): RElement | null;
|
|
25
25
|
/**
|
|
26
26
|
* Given a current view, finds the nearest component's host (LElement).
|
|
27
27
|
*
|
|
@@ -90,7 +90,7 @@ export declare function detachView(lContainer: LContainer, removeIndex: number,
|
|
|
90
90
|
* @param tContainer The TContainer node associated with the LContainer
|
|
91
91
|
* @param removeIndex The index of the view to remove
|
|
92
92
|
*/
|
|
93
|
-
export declare function removeView(lContainer: LContainer,
|
|
93
|
+
export declare function removeView(lContainer: LContainer, containerHost: TElementNode | TContainerNode | TElementContainerNode, removeIndex: number): void;
|
|
94
94
|
/** Gets the child of the given LViewData */
|
|
95
95
|
export declare function getLViewChild(viewData: LViewData): LViewData | LContainer | null;
|
|
96
96
|
/**
|
|
@@ -113,7 +113,7 @@ export declare function destroyLView(view: LViewData): void;
|
|
|
113
113
|
* @returns The correct parent LViewOrLContainer
|
|
114
114
|
*/
|
|
115
115
|
export declare function getParentState(state: LViewData | LContainer, rootView: LViewData): LViewData | LContainer | null;
|
|
116
|
-
export declare function getRenderParent(tNode: TNode, currentView: LViewData):
|
|
116
|
+
export declare function getRenderParent(tNode: TNode, currentView: LViewData): RElement | null;
|
|
117
117
|
/**
|
|
118
118
|
* Returns whether a native element can be inserted into the given parent.
|
|
119
119
|
*
|
|
@@ -144,24 +144,23 @@ export declare function canInsertNativeNode(tNode: TNode, currentView: LViewData
|
|
|
144
144
|
* @returns Whether or not the child was appended
|
|
145
145
|
*/
|
|
146
146
|
export declare function appendChild(childEl: RNode | null, childTNode: TNode, currentView: LViewData): boolean;
|
|
147
|
-
export declare function getBeforeNodeForView(index: number, views: LViewData[],
|
|
147
|
+
export declare function getBeforeNodeForView(index: number, views: LViewData[], containerNative: RComment): RComment;
|
|
148
148
|
/**
|
|
149
|
-
* Removes the `child` element
|
|
149
|
+
* Removes the `child` element from the DOM if not in view and not projected.
|
|
150
150
|
*
|
|
151
|
-
* @param
|
|
152
|
-
* @param
|
|
151
|
+
* @param childTNode The TNode of the child to remove
|
|
152
|
+
* @param childEl The child that should be removed
|
|
153
153
|
* @param currentView The current LView
|
|
154
154
|
* @returns Whether or not the child was removed
|
|
155
155
|
*/
|
|
156
|
-
export declare function removeChild(
|
|
156
|
+
export declare function removeChild(childTNode: TNode, childEl: RNode | null, currentView: LViewData): boolean;
|
|
157
157
|
/**
|
|
158
158
|
* Appends a projected node to the DOM, or in the case of a projected container,
|
|
159
159
|
* appends the nodes from all of the container's active views to the DOM.
|
|
160
160
|
*
|
|
161
|
-
* @param
|
|
162
|
-
* @param
|
|
163
|
-
* @param tProjectionNode
|
|
161
|
+
* @param projectedTNode The TNode to be projected
|
|
162
|
+
* @param tProjectionNode The projection (ng-content) TNode
|
|
164
163
|
* @param currentView Current LView
|
|
165
|
-
* @param projectionView Projection view
|
|
164
|
+
* @param projectionView Projection view (view above current)
|
|
166
165
|
*/
|
|
167
|
-
export declare function appendProjectedNode(
|
|
166
|
+
export declare function appendProjectedNode(projectedTNode: TNode, tProjectionNode: TNode, currentView: LViewData, projectionView: LViewData): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 './ng_dev_mode';
|
|
9
|
+
import { ComponentInstance, DirectiveInstance, Player } from './interfaces/player';
|
|
10
|
+
/**
|
|
11
|
+
* Adds a player to an element, directive or component instance that will later be
|
|
12
|
+
* animated once change detection has passed.
|
|
13
|
+
*
|
|
14
|
+
* When a player is added to a reference it will stay active until `player.destroy()`
|
|
15
|
+
* is called. Once called then the player will be removed from the active players
|
|
16
|
+
* present on the associated ref instance.
|
|
17
|
+
*
|
|
18
|
+
* To get a list of all the active players on an element see [getPlayers].
|
|
19
|
+
*
|
|
20
|
+
* @param ref The element, directive or component that the player will be placed on.
|
|
21
|
+
* @param player The player that will be triggered to play once change detection has run.
|
|
22
|
+
*/
|
|
23
|
+
export declare function addPlayer(ref: ComponentInstance | DirectiveInstance | HTMLElement, player: Player): void;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a list of all the active players present on the provided ref instance (which can
|
|
26
|
+
* be an instance of a directive, component or element).
|
|
27
|
+
*
|
|
28
|
+
* This function will only return players that have been added to the ref instance using
|
|
29
|
+
* `addPlayer` or any players that are active through any template styling bindings
|
|
30
|
+
* (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).
|
|
31
|
+
*/
|
|
32
|
+
export declare function getPlayers(ref: ComponentInstance | DirectiveInstance | HTMLElement): Player[];
|
|
@@ -7,16 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { StyleSanitizeFn } from '../../sanitization/style_sanitizer';
|
|
9
9
|
import { InitialStylingFlags } from '../interfaces/definition';
|
|
10
|
-
import {
|
|
10
|
+
import { BindingStore, BindingType, Player, PlayerBuilder, PlayerFactory } from '../interfaces/player';
|
|
11
11
|
import { Renderer3 } from '../interfaces/renderer';
|
|
12
12
|
import { StylingContext } from '../interfaces/styling';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* A pre-computed template is designed to be computed once for a given element
|
|
17
|
-
* (instructions.ts has logic for caching this).
|
|
18
|
-
*/
|
|
19
|
-
export declare function allocStylingContext(lElement: LElementNode | null, templateStyleContext: StylingContext): StylingContext;
|
|
13
|
+
import { LViewData, RootContext } from '../interfaces/view';
|
|
14
|
+
import { BoundPlayerFactory } from './player_factory';
|
|
20
15
|
/**
|
|
21
16
|
* Creates a styling context template where styling information is stored.
|
|
22
17
|
* Any styles that are later referenced using `updateStyleProp` must be
|
|
@@ -42,7 +37,7 @@ export declare function allocStylingContext(lElement: LElementNode | null, templ
|
|
|
42
37
|
export declare function createStylingContextTemplate(initialClassDeclarations?: (string | boolean | InitialStylingFlags)[] | null, initialStyleDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleSanitizer?: StyleSanitizeFn | null): StylingContext;
|
|
43
38
|
/**
|
|
44
39
|
* Sets and resolves all `multi` styling on an `StylingContext` so that they can be
|
|
45
|
-
* applied to the element once `
|
|
40
|
+
* applied to the element once `renderStyleAndClassBindings` is called.
|
|
46
41
|
*
|
|
47
42
|
* All missing styles/class (any values that are not provided in the new `styles`
|
|
48
43
|
* or `classes` params) will resolve to `null` within their respective positions
|
|
@@ -50,17 +45,21 @@ export declare function createStylingContextTemplate(initialClassDeclarations?:
|
|
|
50
45
|
*
|
|
51
46
|
* @param context The styling context that will be updated with the
|
|
52
47
|
* newly provided style values.
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
48
|
+
* @param classesInput The key/value map of CSS class names that will be used for the update.
|
|
49
|
+
* @param stylesInput The key/value map of CSS styles that will be used for the update.
|
|
55
50
|
*/
|
|
56
|
-
export declare function updateStylingMap(context: StylingContext,
|
|
51
|
+
export declare function updateStylingMap(context: StylingContext, classesInput: {
|
|
57
52
|
[key: string]: any;
|
|
58
|
-
} | string | null
|
|
53
|
+
} | string | BoundPlayerFactory<null | string | {
|
|
59
54
|
[key: string]: any;
|
|
60
|
-
} | null
|
|
55
|
+
}> | null, stylesInput?: {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
} | BoundPlayerFactory<null | {
|
|
58
|
+
[key: string]: any;
|
|
59
|
+
}> | null): void;
|
|
61
60
|
/**
|
|
62
61
|
* Sets and resolves a single styling property/value on the provided `StylingContext` so
|
|
63
|
-
* that they can be applied to the element once `
|
|
62
|
+
* that they can be applied to the element once `renderStyleAndClassBindings` is called.
|
|
64
63
|
*
|
|
65
64
|
* Note that prop-level styling values are considered higher priority than any styling that
|
|
66
65
|
* has been applied using `updateStylingMap`, therefore, when styling values are rendered
|
|
@@ -72,7 +71,7 @@ export declare function updateStylingMap(context: StylingContext, classes: {
|
|
|
72
71
|
* @param index The index of the property which is being updated.
|
|
73
72
|
* @param value The CSS style value that will be assigned
|
|
74
73
|
*/
|
|
75
|
-
export declare function updateStyleProp(context: StylingContext, index: number,
|
|
74
|
+
export declare function updateStyleProp(context: StylingContext, index: number, input: string | boolean | null | BoundPlayerFactory<string | boolean | null>): void;
|
|
76
75
|
/**
|
|
77
76
|
* This method will toggle the referenced CSS class (by the provided index)
|
|
78
77
|
* within the given context.
|
|
@@ -82,7 +81,7 @@ export declare function updateStyleProp(context: StylingContext, index: number,
|
|
|
82
81
|
* @param index The index of the CSS class which is being updated.
|
|
83
82
|
* @param addOrRemove Whether or not to add or remove the CSS class
|
|
84
83
|
*/
|
|
85
|
-
export declare function updateClassProp(context: StylingContext, index: number, addOrRemove: boolean): void;
|
|
84
|
+
export declare function updateClassProp(context: StylingContext, index: number, addOrRemove: boolean | BoundPlayerFactory<boolean>): void;
|
|
86
85
|
/**
|
|
87
86
|
* Renders all queued styling using a renderer onto the given element.
|
|
88
87
|
*
|
|
@@ -96,15 +95,23 @@ export declare function updateClassProp(context: StylingContext, index: number,
|
|
|
96
95
|
* @param context The styling context that will be used to determine
|
|
97
96
|
* what styles will be rendered
|
|
98
97
|
* @param renderer the renderer that will be used to apply the styling
|
|
99
|
-
* @param
|
|
98
|
+
* @param classesStore if provided, the updated class values will be applied
|
|
100
99
|
* to this key/value map instead of being renderered via the renderer.
|
|
101
|
-
* @param
|
|
100
|
+
* @param stylesStore if provided, the updated style values will be applied
|
|
102
101
|
* to this key/value map instead of being renderered via the renderer.
|
|
102
|
+
* @returns number the total amount of players that got queued for animation (if any)
|
|
103
103
|
*/
|
|
104
|
-
export declare function
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
}, classStore?: {
|
|
107
|
-
[key: string]: boolean;
|
|
108
|
-
}): void;
|
|
104
|
+
export declare function renderStyleAndClassBindings(context: StylingContext, renderer: Renderer3, rootOrView: RootContext | LViewData, classesStore?: BindingStore | null, stylesStore?: BindingStore | null): number;
|
|
109
105
|
export declare function isContextDirty(context: StylingContext): boolean;
|
|
110
106
|
export declare function setContextDirty(context: StylingContext, isDirtyYes: boolean): void;
|
|
107
|
+
export declare function setContextPlayersDirty(context: StylingContext, isDirtyYes: boolean): void;
|
|
108
|
+
export declare class ClassAndStylePlayerBuilder<T> implements PlayerBuilder {
|
|
109
|
+
private _element;
|
|
110
|
+
private _type;
|
|
111
|
+
private _values;
|
|
112
|
+
private _dirty;
|
|
113
|
+
private _factory;
|
|
114
|
+
constructor(factory: PlayerFactory, _element: HTMLElement, _type: BindingType);
|
|
115
|
+
setValue(prop: string, value: any): void;
|
|
116
|
+
buildPlayer(currentPlayer?: Player | null): Player | undefined | null;
|
|
117
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { PlayerFactory, PlayerFactoryBuildFn } from '../interfaces/player';
|
|
9
|
+
/**
|
|
10
|
+
* Combines the binding value and a factory for an animation player.
|
|
11
|
+
*
|
|
12
|
+
* Used to bind a player to an element template binding (currently only
|
|
13
|
+
* `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings
|
|
14
|
+
* supported). The provided `factoryFn` function will be run once all
|
|
15
|
+
* the associated bindings have been evaluated on the element and is
|
|
16
|
+
* designed to return a player which will then be placed on the element.
|
|
17
|
+
*
|
|
18
|
+
* @param factoryFn The function that is used to create a player
|
|
19
|
+
* once all the rendering-related (styling values) have been
|
|
20
|
+
* processed for the element binding.
|
|
21
|
+
* @param value The raw value that will be exposed to the binding
|
|
22
|
+
* so that the binding can update its internal values when
|
|
23
|
+
* any changes are evaluated.
|
|
24
|
+
*/
|
|
25
|
+
export declare function bindPlayerFactory<T>(factoryFn: PlayerFactoryBuildFn, value: T): PlayerFactory;
|
|
26
|
+
export declare class BoundPlayerFactory<T> {
|
|
27
|
+
fn: PlayerFactoryBuildFn;
|
|
28
|
+
value: T;
|
|
29
|
+
'__brand__': 'Brand for PlayerFactory that nothing will match';
|
|
30
|
+
constructor(fn: PlayerFactoryBuildFn, value: T);
|
|
31
|
+
}
|
|
@@ -5,14 +5,36 @@
|
|
|
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 '../ng_dev_mode';
|
|
8
9
|
import { StyleSanitizeFn } from '../../sanitization/style_sanitizer';
|
|
9
|
-
import { LContext } from '../
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { LContext } from '../interfaces/context';
|
|
11
|
+
import { Player, PlayerContext } from '../interfaces/player';
|
|
12
|
+
import { RElement } from '../interfaces/renderer';
|
|
12
13
|
import { InitialStyles, StylingContext } from '../interfaces/styling';
|
|
13
|
-
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
import { LViewData, RootContext } from '../interfaces/view';
|
|
15
|
+
export declare function createEmptyStylingContext(element?: RElement | null, sanitizer?: StyleSanitizeFn | null, initialStylingValues?: InitialStyles): StylingContext;
|
|
16
|
+
/**
|
|
17
|
+
* Used clone a copy of a pre-computed template of a styling context.
|
|
18
|
+
*
|
|
19
|
+
* A pre-computed template is designed to be computed once for a given element
|
|
20
|
+
* (instructions.ts has logic for caching this).
|
|
21
|
+
*/
|
|
22
|
+
export declare function allocStylingContext(element: RElement | null, templateStyleContext: StylingContext): StylingContext;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve the `StylingContext` at a given index.
|
|
25
|
+
*
|
|
26
|
+
* This method lazily creates the `StylingContext`. This is because in most cases
|
|
27
|
+
* we have styling without any bindings. Creating `StylingContext` eagerly would mean that
|
|
28
|
+
* every style declaration such as `<div style="color: red">` would result `StyleContext`
|
|
29
|
+
* which would create unnecessary memory pressure.
|
|
30
|
+
*
|
|
31
|
+
* @param index Index of the style allocation. See: `elementStyling`.
|
|
32
|
+
* @param viewData The view to search for the styling context
|
|
33
|
+
*/
|
|
34
|
+
export declare function getStylingContext(index: number, viewData: LViewData): StylingContext;
|
|
35
|
+
export declare function addPlayerInternal(playerContext: PlayerContext, rootContext: RootContext, element: HTMLElement, player: Player | null, playerContextIndex: number, ref?: any): boolean;
|
|
36
|
+
export declare function getPlayersInternal(playerContext: PlayerContext): Player[];
|
|
37
|
+
export declare function getOrCreatePlayerContext(target: {}, context?: LContext | null): PlayerContext | null;
|
|
38
|
+
export declare function getPlayerContext(stylingContext: StylingContext): PlayerContext | null;
|
|
39
|
+
export declare function allocPlayerContext(data: StylingContext): PlayerContext;
|
|
40
|
+
export declare function throwInvalidRefError(): void;
|
package/src/render3/util.d.ts
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
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 {
|
|
8
|
+
import { LContainer } from './interfaces/container';
|
|
9
|
+
import { LContext } from './interfaces/context';
|
|
10
|
+
import { TNode } from './interfaces/node';
|
|
11
|
+
import { RComment, RElement, RText } from './interfaces/renderer';
|
|
12
|
+
import { StylingContext } from './interfaces/styling';
|
|
9
13
|
import { LViewData, RootContext, TData } from './interfaces/view';
|
|
10
14
|
/**
|
|
11
15
|
* Returns whether the values are different from a change detection stand point.
|
|
@@ -14,13 +18,6 @@ import { LViewData, RootContext, TData } from './interfaces/view';
|
|
|
14
18
|
*/
|
|
15
19
|
export declare function isDifferent(a: any, b: any, checkNoChangesMode: boolean): boolean;
|
|
16
20
|
export declare function stringify(value: any): string;
|
|
17
|
-
/**
|
|
18
|
-
* Function that throws a "not implemented" error so it's clear certain
|
|
19
|
-
* behaviors/methods aren't yet ready.
|
|
20
|
-
*
|
|
21
|
-
* @returns Not implemented error
|
|
22
|
-
*/
|
|
23
|
-
export declare function notImplemented(): Error;
|
|
24
21
|
/**
|
|
25
22
|
* Flattens an array in non-recursive way. Input arrays are not modified.
|
|
26
23
|
*/
|
|
@@ -28,15 +25,29 @@ export declare function flatten(list: any[]): any[];
|
|
|
28
25
|
/** Retrieves a value from any `LViewData` or `TData`. */
|
|
29
26
|
export declare function loadInternal<T>(index: number, arr: LViewData | TData): T;
|
|
30
27
|
export declare function assertDataInRangeInternal(index: number, arr: any[]): void;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Takes the value of a slot in `LViewData` and returns the element node.
|
|
30
|
+
*
|
|
31
|
+
* Normally, element nodes are stored flat, but if the node has styles/classes on it,
|
|
32
|
+
* it might be wrapped in a styling context. Or if that node has a directive that injects
|
|
33
|
+
* ViewContainerRef, it may be wrapped in an LContainer. Or if that node is a component,
|
|
34
|
+
* it will be wrapped in LViewData. It could even have all three, so we keep looping
|
|
35
|
+
* until we find something that isn't an array.
|
|
36
|
+
*
|
|
37
|
+
* @param value The initial value in `LViewData`
|
|
38
|
+
*/
|
|
39
|
+
export declare function readElementValue(value: RElement | StylingContext | LContainer | LViewData): RElement;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
42
|
+
* from any containers, component views, or style contexts.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getNativeByIndex(index: number, arr: LViewData): RElement;
|
|
45
|
+
export declare function getNativeByTNode(tNode: TNode, hostView: LViewData): RElement | RText | RComment;
|
|
46
|
+
export declare function getTNode(index: number, view: LViewData): TNode;
|
|
47
|
+
export declare function getComponentViewByIndex(nodeIndex: number, hostView: LViewData): LViewData;
|
|
38
48
|
export declare function isContentQueryHost(tNode: TNode): boolean;
|
|
39
49
|
export declare function isComponent(tNode: TNode): boolean;
|
|
50
|
+
export declare function isLContainer(value: RElement | RComment | LContainer | StylingContext): boolean;
|
|
40
51
|
/**
|
|
41
52
|
* Retrieve the root view from any component by walking the parent `LViewData` until
|
|
42
53
|
* reaching the root `LViewData`.
|
|
@@ -45,3 +56,9 @@ export declare function isComponent(tNode: TNode): boolean;
|
|
|
45
56
|
*/
|
|
46
57
|
export declare function getRootView(target: LViewData | {}): LViewData;
|
|
47
58
|
export declare function getRootContext(viewOrComponent: LViewData | {}): RootContext;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the monkey-patch value data present on the target (which could be
|
|
61
|
+
* a component, directive or a DOM node).
|
|
62
|
+
*/
|
|
63
|
+
export declare function readPatchedData(target: any): LViewData | LContext | null;
|
|
64
|
+
export declare function readPatchedLViewData(target: any): LViewData | null;
|
|
@@ -9,6 +9,7 @@ import { ChangeDetectorRef as ViewEngine_ChangeDetectorRef } from '../change_det
|
|
|
9
9
|
import { ElementRef as ViewEngine_ElementRef } from '../linker/element_ref';
|
|
10
10
|
import { TemplateRef as ViewEngine_TemplateRef } from '../linker/template_ref';
|
|
11
11
|
import { ViewContainerRef as ViewEngine_ViewContainerRef } from '../linker/view_container_ref';
|
|
12
|
+
import { Renderer2 } from '../render/api';
|
|
12
13
|
import { TContainerNode, TElementContainerNode, TElementNode, TNode } from './interfaces/node';
|
|
13
14
|
import { LViewData } from './interfaces/view';
|
|
14
15
|
/**
|
|
@@ -70,3 +71,5 @@ export declare function injectChangeDetectorRef(): ViewEngine_ChangeDetectorRef;
|
|
|
70
71
|
* @returns The ChangeDetectorRef to use
|
|
71
72
|
*/
|
|
72
73
|
export declare function createViewRef(hostTNode: TNode, hostView: LViewData, context: any): ViewEngine_ChangeDetectorRef;
|
|
74
|
+
/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */
|
|
75
|
+
export declare function injectRenderer2(): Renderer2;
|