@angular/core 7.2.0-beta.0 → 7.2.0
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 +194 -128
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +10 -10
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +5582 -4512
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +122 -129
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +12 -12
- package/core.metadata.json +1 -1
- package/esm2015/core.externs.js +45 -35
- package/esm2015/core.js +12 -13
- package/esm2015/index.js +3 -4
- package/esm2015/public_api.js +3 -5
- package/esm2015/src/application_init.js +22 -10
- package/esm2015/src/application_module.js +6 -5
- package/esm2015/src/application_ref.js +94 -37
- package/esm2015/src/application_tokens.js +21 -16
- package/esm2015/src/change_detection/change_detection.js +8 -7
- package/esm2015/src/change_detection/change_detection_util.js +2 -4
- package/esm2015/src/change_detection/change_detector_ref.js +2 -3
- package/esm2015/src/change_detection/constants.js +30 -32
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +108 -29
- package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +53 -16
- package/esm2015/src/change_detection/differs/iterable_differs.js +100 -90
- package/esm2015/src/change_detection/differs/keyvalue_differs.js +85 -73
- package/esm2015/src/change_detection/pipe_transform.js +10 -5
- package/esm2015/src/change_detection.js +7 -3
- package/esm2015/src/codegen_private_exports.js +2 -3
- package/esm2015/src/console.js +3 -3
- package/esm2015/src/core.js +3 -4
- package/esm2015/src/core_private_export.js +2 -3
- package/esm2015/src/core_render3_private_export.js +13 -7
- package/esm2015/src/debug/debug_node.js +132 -90
- package/esm2015/src/di/defs.js +59 -50
- package/esm2015/src/di/forward_ref.js +5 -6
- package/esm2015/src/di/injectable.js +11 -11
- package/esm2015/src/di/injection_token.js +10 -6
- package/esm2015/src/di/injector.js +53 -43
- package/esm2015/src/di/injector_compatibility.js +13 -12
- package/esm2015/src/di/metadata.js +22 -13
- package/esm2015/src/di/provider.js +137 -120
- package/esm2015/src/di/r3_injector.js +127 -57
- package/esm2015/src/di/reflective_errors.js +19 -13
- package/esm2015/src/di/reflective_injector.js +20 -16
- package/esm2015/src/di/reflective_key.js +7 -5
- package/esm2015/src/di/reflective_provider.js +21 -20
- package/esm2015/src/di/scope.js +5 -5
- package/esm2015/src/di/util.js +13 -14
- package/esm2015/src/di.js +2 -3
- package/esm2015/src/error_handler.js +5 -4
- package/esm2015/src/errors.js +7 -8
- package/esm2015/src/event_emitter.js +3 -3
- package/esm2015/src/i18n/tokens.js +12 -10
- package/esm2015/src/is_dev_mode.js +2 -3
- package/esm2015/src/ivy_switch.js +2 -3
- package/esm2015/src/linker/compiler.js +9 -12
- package/esm2015/src/linker/component_factory.js +2 -3
- package/esm2015/src/linker/component_factory_resolver.js +24 -10
- package/esm2015/src/linker/element_ref.js +5 -3
- package/esm2015/src/linker/ng_module_factory.js +6 -5
- package/esm2015/src/linker/ng_module_factory_loader.js +63 -16
- package/esm2015/src/linker/query_list.js +16 -14
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +12 -5
- package/esm2015/src/linker/template_ref.js +2 -3
- package/esm2015/src/linker/view_container_ref.js +2 -3
- package/esm2015/src/linker/view_ref.js +13 -7
- package/esm2015/src/linker.js +3 -3
- package/esm2015/src/metadata/di.js +22 -15
- package/esm2015/src/metadata/directives.js +33 -19
- package/esm2015/src/metadata/lifecycle_hooks.js +81 -66
- package/esm2015/src/metadata/ng_module.js +82 -68
- package/esm2015/src/metadata/resource_loading.js +4 -3
- package/esm2015/src/metadata/view.js +25 -26
- package/esm2015/src/metadata.js +6 -3
- package/esm2015/src/platform_core_providers.js +5 -5
- package/esm2015/src/profile/profile.js +17 -13
- package/esm2015/src/profile/wtf_impl.js +36 -16
- package/esm2015/src/r3_symbols.js +18 -5
- package/esm2015/src/reflection/platform_reflection_capabilities.js +81 -40
- package/esm2015/src/reflection/reflection.js +5 -5
- package/esm2015/src/reflection/reflection_capabilities.js +38 -27
- package/esm2015/src/reflection/reflector.js +2 -3
- package/esm2015/src/reflection/types.js +2 -12
- package/esm2015/src/render/api.js +67 -47
- package/esm2015/src/render.js +3 -3
- package/esm2015/src/render3/assert.js +38 -3
- package/esm2015/src/render3/bindings.js +111 -0
- package/esm2015/src/render3/component.js +88 -77
- package/esm2015/src/render3/component_ref.js +86 -56
- package/esm2015/src/render3/context_discovery.js +94 -92
- package/esm2015/src/render3/definition.js +58 -51
- package/esm2015/src/render3/di.js +206 -166
- package/esm2015/src/render3/di_setup.js +51 -31
- package/esm2015/src/render3/discovery_utils.js +225 -39
- package/esm2015/src/render3/empty.js +28 -0
- package/esm2015/src/render3/errors.js +11 -15
- package/esm2015/src/render3/features/inherit_definition_feature.js +13 -10
- package/esm2015/src/render3/features/ng_onchanges_feature.js +15 -12
- package/esm2015/src/render3/features/providers_feature.js +2 -3
- package/esm2015/src/render3/fields.js +5 -5
- package/esm2015/src/render3/global_utils.js +22 -7
- package/esm2015/src/render3/global_utils_api.js +13 -7
- package/esm2015/src/render3/hooks.js +21 -26
- package/esm2015/src/render3/i18n.js +134 -115
- package/esm2015/src/render3/index.js +15 -7
- package/esm2015/src/render3/instructions.js +938 -813
- package/esm2015/src/render3/interfaces/container.js +37 -6
- package/esm2015/src/render3/interfaces/context.js +39 -37
- package/esm2015/src/render3/interfaces/definition.js +225 -265
- package/esm2015/src/render3/interfaces/i18n.js +179 -151
- package/esm2015/src/render3/interfaces/injector.js +95 -13
- package/esm2015/src/render3/interfaces/node.js +413 -382
- package/esm2015/src/render3/interfaces/player.js +78 -37
- package/esm2015/src/render3/interfaces/projection.js +5 -10
- package/esm2015/src/render3/interfaces/query.js +66 -60
- package/esm2015/src/render3/interfaces/renderer.js +292 -117
- package/esm2015/src/render3/interfaces/sanitization.js +2 -6
- package/esm2015/src/render3/interfaces/styling.js +322 -111
- package/esm2015/src/render3/interfaces/view.js +356 -298
- package/esm2015/src/render3/jit/compiler_facade.js +10 -4
- package/esm2015/src/render3/jit/compiler_facade_interface.js +195 -152
- package/esm2015/src/render3/jit/directive.js +26 -16
- package/esm2015/src/render3/jit/environment.js +8 -5
- package/esm2015/src/render3/jit/injectable.js +7 -10
- package/esm2015/src/render3/jit/module.js +309 -25
- package/esm2015/src/render3/jit/pipe.js +2 -3
- package/esm2015/src/render3/jit/util.js +2 -3
- package/esm2015/src/render3/metadata.js +11 -10
- package/esm2015/src/render3/ng_dev_mode.js +5 -6
- package/esm2015/src/render3/ng_module_ref.js +48 -22
- package/esm2015/src/render3/node_assert.js +2 -3
- package/esm2015/src/render3/node_manipulation.js +137 -117
- package/esm2015/src/render3/node_selector_matcher.js +46 -19
- package/esm2015/src/render3/pipe.js +36 -21
- package/esm2015/src/render3/players.js +17 -12
- package/esm2015/src/render3/pure_function.js +86 -39
- package/esm2015/src/render3/query.js +93 -80
- package/esm2015/src/render3/state.js +88 -203
- package/esm2015/src/render3/styling/class_and_style_bindings.js +963 -249
- package/esm2015/src/render3/styling/core_player_handler.js +6 -4
- package/esm2015/src/render3/styling/player_factory.js +3 -4
- package/esm2015/src/render3/styling/util.js +69 -31
- package/esm2015/src/render3/tokens.js +7 -6
- package/esm2015/src/render3/util.js +65 -55
- package/esm2015/src/render3/view_engine_compatibility.js +36 -59
- package/esm2015/src/render3/view_engine_compatibility_prebound.js +2 -3
- package/esm2015/src/render3/view_ref.js +58 -44
- package/esm2015/src/sanitization/bypass.js +29 -6
- package/esm2015/src/sanitization/html_sanitizer.js +48 -16
- package/esm2015/src/sanitization/inert_body.js +33 -18
- package/esm2015/src/sanitization/sanitization.js +35 -25
- package/esm2015/src/sanitization/security.js +3 -4
- package/esm2015/src/sanitization/style_sanitizer.js +10 -7
- package/esm2015/src/sanitization/url_sanitizer.js +9 -7
- package/esm2015/src/testability/testability.js +72 -42
- package/esm2015/src/type.js +6 -8
- package/esm2015/src/util/decorators.js +19 -14
- package/esm2015/src/util/lang.js +2 -3
- package/esm2015/src/util/ng_reflect.js +2 -3
- package/esm2015/src/util/noop.js +2 -3
- package/esm2015/src/util/property.js +3 -4
- package/esm2015/src/util.js +12 -4
- package/esm2015/src/version.js +6 -6
- package/esm2015/src/view/element.js +17 -17
- package/esm2015/src/view/entrypoint.js +15 -5
- package/esm2015/src/view/errors.js +4 -5
- package/esm2015/src/view/index.js +2 -3
- package/esm2015/src/view/ng_content.js +3 -4
- package/esm2015/src/view/ng_module.js +2 -3
- package/esm2015/src/view/provider.js +89 -24
- package/esm2015/src/view/pure_expression.js +14 -15
- package/esm2015/src/view/query.js +14 -14
- package/esm2015/src/view/refs.js +96 -38
- package/esm2015/src/view/services.js +64 -37
- package/esm2015/src/view/text.js +5 -6
- package/esm2015/src/view/types.js +390 -325
- package/esm2015/src/view/util.js +29 -24
- package/esm2015/src/view/view.js +43 -36
- package/esm2015/src/view/view_attach.js +9 -10
- package/esm2015/src/zone/ng_zone.js +29 -28
- package/esm2015/src/zone.js +3 -3
- package/esm2015/testing/index.js +2 -3
- package/esm2015/testing/public_api.js +4 -4
- package/esm2015/testing/src/async.js +2 -3
- package/esm2015/testing/src/async_fallback.js +8 -7
- package/esm2015/testing/src/async_test_completer.js +14 -6
- package/esm2015/testing/src/before_each.js +10 -4
- package/esm2015/testing/src/component_fixture.js +48 -17
- package/esm2015/testing/src/fake_async.js +9 -3
- package/esm2015/testing/src/fake_async_fallback.js +5 -5
- package/esm2015/testing/src/lang_utils.js +3 -4
- package/esm2015/testing/src/logger.js +2 -3
- package/esm2015/testing/src/metadata_override.js +2 -6
- package/esm2015/testing/src/metadata_overrider.js +9 -8
- package/esm2015/testing/src/ng_zone_mock.js +2 -3
- package/esm2015/testing/src/private_export_testing.js +2 -3
- package/esm2015/testing/src/r3_test_bed.js +324 -174
- package/esm2015/testing/src/resolvers.js +28 -11
- package/esm2015/testing/src/test_bed.js +123 -54
- package/esm2015/testing/src/test_bed_common.js +142 -85
- package/esm2015/testing/src/test_compiler.js +2 -3
- package/esm2015/testing/src/testing.js +3 -3
- package/esm2015/testing/src/testing_internal.js +17 -12
- package/esm2015/testing/testing.js +1 -2
- package/esm5/core.js +12 -13
- package/esm5/index.js +1 -2
- package/esm5/public_api.js +1 -2
- package/esm5/src/application_init.js +1 -2
- package/esm5/src/application_module.js +1 -2
- package/esm5/src/application_ref.js +1 -2
- package/esm5/src/application_tokens.js +1 -2
- package/esm5/src/change_detection/change_detection.js +1 -2
- package/esm5/src/change_detection/change_detection_util.js +1 -2
- package/esm5/src/change_detection/change_detector_ref.js +1 -2
- package/esm5/src/change_detection/constants.js +3 -4
- package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -2
- package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -2
- package/esm5/src/change_detection/differs/iterable_differs.js +1 -2
- package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -2
- package/esm5/src/change_detection/pipe_transform.js +1 -2
- package/esm5/src/change_detection.js +1 -2
- package/esm5/src/codegen_private_exports.js +1 -2
- package/esm5/src/console.js +1 -2
- package/esm5/src/core.js +1 -2
- package/esm5/src/core_private_export.js +1 -2
- package/esm5/src/core_render3_private_export.js +7 -5
- package/esm5/src/debug/debug_node.js +79 -58
- package/esm5/src/di/defs.js +3 -4
- package/esm5/src/di/forward_ref.js +1 -2
- package/esm5/src/di/injectable.js +1 -2
- package/esm5/src/di/injection_token.js +1 -2
- package/esm5/src/di/injector.js +1 -2
- package/esm5/src/di/injector_compatibility.js +1 -2
- package/esm5/src/di/metadata.js +1 -2
- package/esm5/src/di/provider.js +1 -2
- package/esm5/src/di/r3_injector.js +48 -28
- package/esm5/src/di/reflective_errors.js +1 -2
- package/esm5/src/di/reflective_injector.js +1 -2
- package/esm5/src/di/reflective_key.js +1 -2
- package/esm5/src/di/reflective_provider.js +1 -2
- package/esm5/src/di/scope.js +1 -2
- package/esm5/src/di/util.js +1 -2
- package/esm5/src/di.js +1 -2
- package/esm5/src/error_handler.js +1 -2
- package/esm5/src/errors.js +1 -2
- package/esm5/src/event_emitter.js +1 -2
- package/esm5/src/i18n/tokens.js +1 -2
- package/esm5/src/is_dev_mode.js +1 -2
- package/esm5/src/ivy_switch.js +1 -2
- package/esm5/src/linker/compiler.js +1 -2
- package/esm5/src/linker/component_factory.js +1 -2
- package/esm5/src/linker/component_factory_resolver.js +1 -2
- package/esm5/src/linker/element_ref.js +1 -2
- package/esm5/src/linker/ng_module_factory.js +1 -2
- package/esm5/src/linker/ng_module_factory_loader.js +37 -13
- package/esm5/src/linker/query_list.js +1 -2
- package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -2
- package/esm5/src/linker/template_ref.js +1 -2
- package/esm5/src/linker/view_container_ref.js +1 -2
- package/esm5/src/linker/view_ref.js +1 -2
- package/esm5/src/linker.js +1 -2
- package/esm5/src/metadata/di.js +1 -2
- package/esm5/src/metadata/directives.js +1 -2
- package/esm5/src/metadata/lifecycle_hooks.js +1 -2
- package/esm5/src/metadata/ng_module.js +1 -2
- package/esm5/src/metadata/resource_loading.js +1 -2
- package/esm5/src/metadata/view.js +1 -2
- package/esm5/src/metadata.js +1 -2
- package/esm5/src/platform_core_providers.js +1 -2
- package/esm5/src/profile/profile.js +1 -2
- package/esm5/src/profile/wtf_impl.js +1 -2
- package/esm5/src/r3_symbols.js +1 -2
- package/esm5/src/reflection/platform_reflection_capabilities.js +1 -2
- package/esm5/src/reflection/reflection.js +1 -2
- package/esm5/src/reflection/reflection_capabilities.js +1 -2
- package/esm5/src/reflection/reflector.js +1 -2
- package/esm5/src/reflection/types.js +1 -2
- package/esm5/src/render/api.js +1 -2
- package/esm5/src/render.js +1 -2
- package/esm5/src/render3/assert.js +15 -2
- package/esm5/src/render3/bindings.js +63 -0
- package/esm5/src/render3/component.js +23 -16
- package/esm5/src/render3/component_ref.js +43 -36
- package/esm5/src/render3/context_discovery.js +68 -77
- package/esm5/src/render3/definition.js +30 -24
- package/esm5/src/render3/di.js +142 -135
- package/esm5/src/render3/di_setup.js +20 -21
- package/esm5/src/render3/discovery_utils.js +167 -36
- package/esm5/src/render3/empty.js +22 -0
- package/esm5/src/render3/errors.js +9 -12
- package/esm5/src/render3/features/inherit_definition_feature.js +3 -5
- package/esm5/src/render3/features/ng_onchanges_feature.js +11 -10
- package/esm5/src/render3/features/providers_feature.js +1 -2
- package/esm5/src/render3/fields.js +1 -2
- package/esm5/src/render3/global_utils.js +4 -3
- package/esm5/src/render3/global_utils_api.js +2 -3
- package/esm5/src/render3/hooks.js +14 -16
- package/esm5/src/render3/i18n.js +22 -27
- package/esm5/src/render3/index.js +5 -6
- package/esm5/src/render3/instructions.js +698 -593
- package/esm5/src/render3/interfaces/container.js +10 -3
- package/esm5/src/render3/interfaces/context.js +1 -2
- package/esm5/src/render3/interfaces/definition.js +1 -2
- package/esm5/src/render3/interfaces/i18n.js +1 -2
- package/esm5/src/render3/interfaces/injector.js +5 -6
- package/esm5/src/render3/interfaces/node.js +1 -2
- package/esm5/src/render3/interfaces/player.js +1 -2
- package/esm5/src/render3/interfaces/projection.js +1 -2
- package/esm5/src/render3/interfaces/query.js +1 -2
- package/esm5/src/render3/interfaces/renderer.js +1 -2
- package/esm5/src/render3/interfaces/sanitization.js +1 -2
- package/esm5/src/render3/interfaces/styling.js +1 -2
- package/esm5/src/render3/interfaces/view.js +3 -4
- package/esm5/src/render3/jit/compiler_facade.js +1 -2
- package/esm5/src/render3/jit/compiler_facade_interface.js +1 -2
- package/esm5/src/render3/jit/directive.js +19 -10
- package/esm5/src/render3/jit/environment.js +4 -2
- package/esm5/src/render3/jit/injectable.js +17 -18
- package/esm5/src/render3/jit/module.js +207 -13
- package/esm5/src/render3/jit/pipe.js +1 -2
- package/esm5/src/render3/jit/util.js +1 -2
- package/esm5/src/render3/metadata.js +1 -2
- package/esm5/src/render3/ng_dev_mode.js +1 -2
- package/esm5/src/render3/ng_module_ref.js +29 -11
- package/esm5/src/render3/node_assert.js +1 -2
- package/esm5/src/render3/node_manipulation.js +54 -50
- package/esm5/src/render3/node_selector_matcher.js +28 -9
- package/esm5/src/render3/pipe.js +33 -19
- package/esm5/src/render3/players.js +7 -9
- package/esm5/src/render3/pure_function.js +48 -38
- package/esm5/src/render3/query.js +8 -9
- package/esm5/src/render3/state.js +50 -135
- package/esm5/src/render3/styling/class_and_style_bindings.js +684 -214
- package/esm5/src/render3/styling/core_player_handler.js +1 -2
- package/esm5/src/render3/styling/player_factory.js +1 -2
- package/esm5/src/render3/styling/util.js +39 -22
- package/esm5/src/render3/tokens.js +1 -2
- package/esm5/src/render3/util.js +49 -37
- package/esm5/src/render3/view_engine_compatibility.js +20 -33
- package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -2
- package/esm5/src/render3/view_ref.js +33 -30
- package/esm5/src/sanitization/bypass.js +1 -2
- package/esm5/src/sanitization/html_sanitizer.js +1 -2
- package/esm5/src/sanitization/inert_body.js +4 -5
- package/esm5/src/sanitization/sanitization.js +25 -20
- package/esm5/src/sanitization/security.js +1 -2
- package/esm5/src/sanitization/style_sanitizer.js +1 -2
- package/esm5/src/sanitization/url_sanitizer.js +1 -2
- package/esm5/src/testability/testability.js +1 -2
- package/esm5/src/type.js +1 -2
- package/esm5/src/util/decorators.js +1 -2
- package/esm5/src/util/lang.js +1 -2
- package/esm5/src/util/ng_reflect.js +1 -2
- package/esm5/src/util/noop.js +1 -2
- package/esm5/src/util/property.js +1 -2
- package/esm5/src/util.js +1 -2
- package/esm5/src/version.js +2 -3
- package/esm5/src/view/element.js +1 -2
- package/esm5/src/view/entrypoint.js +1 -2
- package/esm5/src/view/errors.js +1 -2
- package/esm5/src/view/index.js +1 -2
- package/esm5/src/view/ng_content.js +1 -2
- package/esm5/src/view/ng_module.js +1 -2
- package/esm5/src/view/provider.js +1 -2
- package/esm5/src/view/pure_expression.js +1 -2
- package/esm5/src/view/query.js +1 -2
- package/esm5/src/view/refs.js +1 -2
- package/esm5/src/view/services.js +1 -2
- package/esm5/src/view/text.js +1 -2
- package/esm5/src/view/types.js +1 -2
- package/esm5/src/view/util.js +1 -2
- package/esm5/src/view/view.js +1 -2
- package/esm5/src/view/view_attach.js +1 -2
- package/esm5/src/zone/ng_zone.js +1 -2
- package/esm5/src/zone.js +1 -2
- package/esm5/testing/index.js +1 -2
- package/esm5/testing/public_api.js +1 -2
- package/esm5/testing/src/async.js +1 -2
- package/esm5/testing/src/async_fallback.js +1 -2
- package/esm5/testing/src/async_test_completer.js +1 -2
- package/esm5/testing/src/before_each.js +1 -2
- package/esm5/testing/src/component_fixture.js +1 -2
- package/esm5/testing/src/fake_async.js +1 -2
- package/esm5/testing/src/fake_async_fallback.js +1 -2
- package/esm5/testing/src/lang_utils.js +1 -2
- package/esm5/testing/src/logger.js +1 -2
- package/esm5/testing/src/metadata_override.js +1 -2
- package/esm5/testing/src/metadata_overrider.js +1 -2
- package/esm5/testing/src/ng_zone_mock.js +1 -2
- package/esm5/testing/src/private_export_testing.js +1 -2
- package/esm5/testing/src/r3_test_bed.js +182 -121
- package/esm5/testing/src/resolvers.js +11 -7
- package/esm5/testing/src/test_bed.js +1 -2
- package/esm5/testing/src/test_bed_common.js +1 -2
- package/esm5/testing/src/test_compiler.js +1 -2
- package/esm5/testing/src/testing.js +1 -2
- package/esm5/testing/src/testing_internal.js +2 -3
- package/esm5/testing/testing.js +1 -2
- package/fesm2015/core.js +8560 -6153
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +351 -229
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +5541 -4482
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +185 -130
- package/fesm5/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/change_detection/constants.d.ts +2 -2
- package/src/core_render3_private_export.d.ts +6 -3
- package/src/di/injectable.d.ts +3 -2
- package/src/di/r3_injector.d.ts +1 -1
- package/src/linker/ng_module_factory_loader.d.ts +5 -1
- package/src/render3/assert.d.ts +6 -0
- package/src/render3/bindings.d.ts +20 -0
- package/src/render3/component.d.ts +3 -3
- package/src/render3/component_ref.d.ts +14 -4
- package/src/render3/context_discovery.d.ts +9 -9
- package/src/render3/definition.d.ts +8 -23
- package/src/render3/di.d.ts +19 -17
- package/src/render3/discovery_utils.d.ts +66 -8
- package/src/render3/empty.d.ts +16 -0
- package/src/render3/errors.d.ts +1 -1
- package/src/render3/global_utils_api.d.ts +1 -1
- package/src/render3/hooks.d.ts +7 -6
- package/src/render3/index.d.ts +4 -4
- package/src/render3/instructions.d.ts +163 -118
- package/src/render3/interfaces/container.d.ts +9 -8
- package/src/render3/interfaces/context.d.ts +3 -3
- package/src/render3/interfaces/definition.d.ts +2 -12
- package/src/render3/interfaces/i18n.d.ts +25 -25
- package/src/render3/interfaces/injector.d.ts +8 -9
- package/src/render3/interfaces/node.d.ts +56 -23
- package/src/render3/interfaces/renderer.d.ts +2 -1
- package/src/render3/interfaces/styling.d.ts +392 -117
- package/src/render3/interfaces/view.d.ts +49 -35
- package/src/render3/jit/compiler_facade_interface.d.ts +10 -3
- package/src/render3/jit/module.d.ts +9 -1
- package/src/render3/metadata.d.ts +1 -1
- package/src/render3/ng_module_ref.d.ts +8 -6
- package/src/render3/node_manipulation.d.ts +21 -27
- package/src/render3/node_selector_matcher.d.ts +2 -2
- package/src/render3/state.d.ts +11 -38
- package/src/render3/styling/class_and_style_bindings.d.ts +130 -43
- package/src/render3/styling/util.d.ts +9 -4
- package/src/render3/util.d.ts +31 -25
- package/src/render3/view_engine_compatibility.d.ts +5 -12
- package/src/render3/view_engine_compatibility_prebound.d.ts +2 -2
- package/src/render3/view_ref.d.ts +2 -2
- package/src/sanitization/sanitization.d.ts +3 -2
- package/testing/src/r3_test_bed.d.ts +15 -0
- package/testing/src/resolvers.d.ts +2 -2
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +5 -0
|
@@ -36,22 +36,22 @@ export declare const TAIL = 14;
|
|
|
36
36
|
export declare const CONTAINER_INDEX = 15;
|
|
37
37
|
export declare const CONTENT_QUERIES = 16;
|
|
38
38
|
export declare const DECLARATION_VIEW = 17;
|
|
39
|
-
/** Size of
|
|
39
|
+
/** Size of LView's header. Necessary to adjust for it when setting slots. */
|
|
40
40
|
export declare const HEADER_OFFSET = 18;
|
|
41
41
|
export interface OpaqueViewState {
|
|
42
42
|
'__brand__': 'Brand for OpaqueViewState that nothing will match';
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* `
|
|
45
|
+
* `LView` stores all of the information needed to process the instructions as
|
|
46
46
|
* they are invoked from the template. Each embedded view and component view has its
|
|
47
|
-
* own `
|
|
48
|
-
* `
|
|
49
|
-
* whatever the original `viewData` was before (the parent `
|
|
47
|
+
* own `LView`. When processing a particular view, we set the `viewData` to that
|
|
48
|
+
* `LView`. When that view is done processing, the `viewData` is set back to
|
|
49
|
+
* whatever the original `viewData` was before (the parent `LView`).
|
|
50
50
|
*
|
|
51
51
|
* Keeping separate state for each view facilities view insertion / deletion, so we
|
|
52
52
|
* don't have to edit the data array based on which views are present.
|
|
53
53
|
*/
|
|
54
|
-
export interface
|
|
54
|
+
export interface LView extends Array<any> {
|
|
55
55
|
/**
|
|
56
56
|
* The static data for this view. We need a reference to this so we can easily walk up the
|
|
57
57
|
* node tree in DI and get the TView.data array associated with a node (where the
|
|
@@ -62,27 +62,27 @@ export interface LViewData extends Array<any> {
|
|
|
62
62
|
[FLAGS]: LViewFlags;
|
|
63
63
|
/**
|
|
64
64
|
* The parent view is needed when we exit the view and must restore the previous
|
|
65
|
-
* `
|
|
65
|
+
* `LView`. Without this, the render method would have to keep a stack of
|
|
66
66
|
* views as it is recursively rendering templates.
|
|
67
67
|
*
|
|
68
68
|
* This is the "insertion" view for embedded views. This allows us to properly
|
|
69
69
|
* destroy embedded views.
|
|
70
70
|
*/
|
|
71
|
-
[PARENT]:
|
|
71
|
+
[PARENT]: LView | null;
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
|
-
* The next sibling
|
|
74
|
+
* The next sibling LView or LContainer.
|
|
75
75
|
*
|
|
76
76
|
* Allows us to propagate between sibling view states that aren't in the same
|
|
77
77
|
* container. Embedded views already have a node.next, but it is only set for
|
|
78
78
|
* views in the same container. We need a way to link component views and views
|
|
79
79
|
* across containers as well.
|
|
80
80
|
*/
|
|
81
|
-
[NEXT]:
|
|
81
|
+
[NEXT]: LView | LContainer | null;
|
|
82
82
|
/** Queries active for this view - nodes from a view are reported to those queries. */
|
|
83
83
|
[QUERIES]: LQueries | null;
|
|
84
84
|
/**
|
|
85
|
-
* The host node for this
|
|
85
|
+
* The host node for this LView instance, if this is a component view.
|
|
86
86
|
*
|
|
87
87
|
* If this is an embedded view, HOST will be null.
|
|
88
88
|
*/
|
|
@@ -132,12 +132,12 @@ export interface LViewData extends Array<any> {
|
|
|
132
132
|
/** An optional custom sanitizer. */
|
|
133
133
|
[SANITIZER]: Sanitizer | null;
|
|
134
134
|
/**
|
|
135
|
-
* The last
|
|
135
|
+
* The last LView or LContainer beneath this LView in the hierarchy.
|
|
136
136
|
*
|
|
137
137
|
* The tail allows us to quickly add a new state to the end of the view list
|
|
138
138
|
* without having to propagate starting from the first child.
|
|
139
139
|
*/
|
|
140
|
-
[TAIL]:
|
|
140
|
+
[TAIL]: LView | LContainer | null;
|
|
141
141
|
/**
|
|
142
142
|
* The index of the parent container's host node. Applicable only to embedded views that
|
|
143
143
|
* have been inserted dynamically. Will be -1 for component views and inline views.
|
|
@@ -160,7 +160,7 @@ export interface LViewData extends Array<any> {
|
|
|
160
160
|
*
|
|
161
161
|
* The template for a dynamically created view may be declared in a different view than
|
|
162
162
|
* it is inserted. We already track the "insertion view" (view where the template was
|
|
163
|
-
* inserted) in
|
|
163
|
+
* inserted) in LView[PARENT], but we also need access to the "declaration view"
|
|
164
164
|
* (view where the template was declared). Otherwise, we wouldn't be able to call the
|
|
165
165
|
* view's template function with the proper contexts. Context should be inherited from
|
|
166
166
|
* the declaration view tree, not the insertion view tree.
|
|
@@ -177,9 +177,9 @@ export interface LViewData extends Array<any> {
|
|
|
177
177
|
* template function during change detection, we need the declaration view to get inherited
|
|
178
178
|
* context.
|
|
179
179
|
*/
|
|
180
|
-
[DECLARATION_VIEW]:
|
|
180
|
+
[DECLARATION_VIEW]: LView | null;
|
|
181
181
|
}
|
|
182
|
-
/** Flags associated with an LView (saved in
|
|
182
|
+
/** Flags associated with an LView (saved in LView[FLAGS]) */
|
|
183
183
|
export declare const enum LViewFlags {
|
|
184
184
|
/**
|
|
185
185
|
* Whether or not the view is in creationMode.
|
|
@@ -190,12 +190,20 @@ export declare const enum LViewFlags {
|
|
|
190
190
|
* improperly reported as false.
|
|
191
191
|
*/
|
|
192
192
|
CreationMode = 1,
|
|
193
|
+
/**
|
|
194
|
+
* Whether or not this LView instance is on its first processing pass.
|
|
195
|
+
*
|
|
196
|
+
* An LView instance is considered to be on its "first pass" until it
|
|
197
|
+
* has completed one creation mode run and one update mode run. At this
|
|
198
|
+
* time, the flag is turned off.
|
|
199
|
+
*/
|
|
200
|
+
FirstLViewPass = 2,
|
|
193
201
|
/** Whether this view has default change detection strategy (checks always) or onPush */
|
|
194
|
-
CheckAlways =
|
|
202
|
+
CheckAlways = 4,
|
|
195
203
|
/** Whether or not this view is currently dirty (needing check) */
|
|
196
|
-
Dirty =
|
|
204
|
+
Dirty = 8,
|
|
197
205
|
/** Whether or not this view is currently attached to change detection tree. */
|
|
198
|
-
Attached =
|
|
206
|
+
Attached = 16,
|
|
199
207
|
/**
|
|
200
208
|
* Whether or not the init hooks have run.
|
|
201
209
|
*
|
|
@@ -203,11 +211,11 @@ export declare const enum LViewFlags {
|
|
|
203
211
|
* runs OR the first cR() instruction that runs (so inits are run for the top level view before
|
|
204
212
|
* any embedded views).
|
|
205
213
|
*/
|
|
206
|
-
RunInit =
|
|
214
|
+
RunInit = 32,
|
|
207
215
|
/** Whether or not this view is destroyed. */
|
|
208
|
-
Destroyed =
|
|
216
|
+
Destroyed = 64,
|
|
209
217
|
/** Whether or not this view is the root view */
|
|
210
|
-
IsRoot =
|
|
218
|
+
IsRoot = 128
|
|
211
219
|
}
|
|
212
220
|
/**
|
|
213
221
|
* The static data for an LView (shared between all templates of a
|
|
@@ -225,10 +233,10 @@ export interface TView {
|
|
|
225
233
|
*/
|
|
226
234
|
readonly id: number;
|
|
227
235
|
/**
|
|
228
|
-
* This is a blueprint used to generate
|
|
229
|
-
* blueprint is faster than creating a new
|
|
236
|
+
* This is a blueprint used to generate LView instances for this TView. Copying this
|
|
237
|
+
* blueprint is faster than creating a new LView from scratch.
|
|
230
238
|
*/
|
|
231
|
-
blueprint:
|
|
239
|
+
blueprint: LView;
|
|
232
240
|
/**
|
|
233
241
|
* The template function used to refresh the view of dynamically created views
|
|
234
242
|
* and components. Will be null for inline views.
|
|
@@ -241,7 +249,7 @@ export interface TView {
|
|
|
241
249
|
/**
|
|
242
250
|
* Pointer to the `TNode` that represents the root of the view.
|
|
243
251
|
*
|
|
244
|
-
* If this is a `
|
|
252
|
+
* If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.
|
|
245
253
|
* We need this pointer to be able to efficiently find this node when inserting the view
|
|
246
254
|
* into an anchor.
|
|
247
255
|
*
|
|
@@ -266,9 +274,9 @@ export interface TView {
|
|
|
266
274
|
*/
|
|
267
275
|
bindingStartIndex: number;
|
|
268
276
|
/**
|
|
269
|
-
* The index where the "expando" section of `
|
|
277
|
+
* The index where the "expando" section of `LView` begins. The expando
|
|
270
278
|
* section contains injectors, directive instances, and host binding values.
|
|
271
|
-
* Unlike the "consts" and "vars" sections of `
|
|
279
|
+
* Unlike the "consts" and "vars" sections of `LView`, the length of this
|
|
272
280
|
* section cannot be calculated at compile-time because directives are matched
|
|
273
281
|
* at runtime to preserve locality.
|
|
274
282
|
*
|
|
@@ -296,7 +304,7 @@ export interface TView {
|
|
|
296
304
|
*
|
|
297
305
|
* See VIEW_DATA.md for more information.
|
|
298
306
|
*/
|
|
299
|
-
expandoInstructions: (number | HostBindingsFunction<any>)[] | null;
|
|
307
|
+
expandoInstructions: (number | HostBindingsFunction<any> | null)[] | null;
|
|
300
308
|
/**
|
|
301
309
|
* Full registry of directives and components that may be found in this view.
|
|
302
310
|
*
|
|
@@ -385,19 +393,25 @@ export interface TView {
|
|
|
385
393
|
* saves on memory (70 bytes per array) and on a few bytes of code size (for two
|
|
386
394
|
* separate for loops).
|
|
387
395
|
*
|
|
388
|
-
* If it's a native DOM listener being stored:
|
|
389
|
-
* 1st index is: event name
|
|
390
|
-
* 2nd index is: index of native element
|
|
391
|
-
* 3rd index is: index of
|
|
392
|
-
* 4th index is:
|
|
396
|
+
* If it's a native DOM listener or output subscription being stored:
|
|
397
|
+
* 1st index is: event name `name = tView.cleanup[i+0]`
|
|
398
|
+
* 2nd index is: index of native element `element = lView[tView.cleanup[i+1]]`
|
|
399
|
+
* 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
|
|
400
|
+
* 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
|
|
401
|
+
* `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
|
|
402
|
+
* `typeof useCaptureOrIndx == 'number':
|
|
403
|
+
* `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
|
|
404
|
+
* `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
|
|
393
405
|
*
|
|
394
406
|
* If it's a renderer2 style listener or ViewRef destroy hook being stored:
|
|
395
407
|
* 1st index is: index of the cleanup function in LView.cleanupInstances[]
|
|
396
|
-
* 2nd index is: null
|
|
408
|
+
* 2nd index is: `null`
|
|
409
|
+
* `lView[CLEANUP][tView.cleanup[i+0]]()`
|
|
397
410
|
*
|
|
398
411
|
* If it's an output subscription or query list destroy hook:
|
|
399
412
|
* 1st index is: output unsubscribe function / query list destroy function
|
|
400
413
|
* 2nd index is: index of function context in LView.cleanupInstances[]
|
|
414
|
+
* `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
|
|
401
415
|
*/
|
|
402
416
|
cleanup: any[] | null;
|
|
403
417
|
/**
|
|
@@ -63,6 +63,7 @@ export interface R3PipeMetadataFacade {
|
|
|
63
63
|
export interface R3InjectableMetadataFacade {
|
|
64
64
|
name: string;
|
|
65
65
|
type: any;
|
|
66
|
+
typeArgumentCount: number;
|
|
66
67
|
ctorDeps: R3DependencyMetadataFacade[] | null;
|
|
67
68
|
providedIn: any;
|
|
68
69
|
useClass?: any;
|
|
@@ -83,8 +84,8 @@ export interface R3InjectorMetadataFacade {
|
|
|
83
84
|
name: string;
|
|
84
85
|
type: any;
|
|
85
86
|
deps: R3DependencyMetadataFacade[] | null;
|
|
86
|
-
providers: any;
|
|
87
|
-
imports: any;
|
|
87
|
+
providers: any[];
|
|
88
|
+
imports: any[];
|
|
88
89
|
}
|
|
89
90
|
export interface R3DirectiveMetadataFacade {
|
|
90
91
|
name: string;
|
|
@@ -115,12 +116,18 @@ export interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {
|
|
|
115
116
|
animations: any[] | undefined;
|
|
116
117
|
viewQueries: R3QueryMetadataFacade[];
|
|
117
118
|
pipes: Map<string, any>;
|
|
118
|
-
directives:
|
|
119
|
+
directives: {
|
|
120
|
+
selector: string;
|
|
121
|
+
expression: any;
|
|
122
|
+
}[];
|
|
119
123
|
styles: string[];
|
|
120
124
|
encapsulation: ViewEncapsulation;
|
|
121
125
|
viewProviders: Provider[] | null;
|
|
126
|
+
interpolation?: [string, string];
|
|
127
|
+
changeDetection?: ChangeDetectionStrategy;
|
|
122
128
|
}
|
|
123
129
|
export declare type ViewEncapsulation = number;
|
|
130
|
+
export declare type ChangeDetectionStrategy = number;
|
|
124
131
|
export interface R3QueryMetadataFacade {
|
|
125
132
|
propertyName: string;
|
|
126
133
|
first: boolean;
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
import { NgModule, NgModuleTransitiveScopes } from '../../metadata/ng_module';
|
|
9
9
|
import { Type } from '../../type';
|
|
10
10
|
import { ComponentDef } from '../interfaces/definition';
|
|
11
|
+
import { NgModuleType } from '../ng_module_ref';
|
|
12
|
+
/**
|
|
13
|
+
* Loops over queued module definitions, if a given module definition has all of its
|
|
14
|
+
* declarations resolved, it dequeues that module definition and sets the scope on
|
|
15
|
+
* its declarations.
|
|
16
|
+
*/
|
|
17
|
+
export declare function flushModuleScopingQueueAsMuchAsPossible(): void;
|
|
11
18
|
/**
|
|
12
19
|
* Compiles a module in JIT mode.
|
|
13
20
|
*
|
|
@@ -17,7 +24,8 @@ export declare function compileNgModule(moduleType: Type<any>, ngModule?: NgModu
|
|
|
17
24
|
/**
|
|
18
25
|
* Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
|
|
19
26
|
*/
|
|
20
|
-
export declare function compileNgModuleDefs(moduleType:
|
|
27
|
+
export declare function compileNgModuleDefs(moduleType: NgModuleType, ngModule: NgModule): void;
|
|
28
|
+
export declare function resetCompiledComponents(): void;
|
|
21
29
|
/**
|
|
22
30
|
* Patch the definition of a component with directives and pipes from the compilation scope of
|
|
23
31
|
* a given module.
|
|
@@ -15,6 +15,6 @@ import { Type } from '../type';
|
|
|
15
15
|
* Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being
|
|
16
16
|
* tree-shaken away during production builds.
|
|
17
17
|
*/
|
|
18
|
-
export declare function setClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: any[] | null, propDecorators: {
|
|
18
|
+
export declare function setClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
|
|
19
19
|
[field: string]: any;
|
|
20
20
|
} | null): void;
|
|
@@ -6,22 +6,24 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Injector } from '../di/injector';
|
|
9
|
-
import {
|
|
9
|
+
import { InjectFlags } from '../di/injector_compatibility';
|
|
10
10
|
import { ComponentFactoryResolver as viewEngine_ComponentFactoryResolver } from '../linker/component_factory_resolver';
|
|
11
11
|
import { InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef } from '../linker/ng_module_factory';
|
|
12
12
|
import { NgModuleDef } from '../metadata/ng_module';
|
|
13
13
|
import { Type } from '../type';
|
|
14
|
-
export interface NgModuleType {
|
|
15
|
-
ngModuleDef: NgModuleDef<
|
|
14
|
+
export interface NgModuleType<T = any> extends Type<T> {
|
|
15
|
+
ngModuleDef: NgModuleDef<T>;
|
|
16
16
|
}
|
|
17
|
-
export declare const COMPONENT_FACTORY_RESOLVER: StaticProvider;
|
|
18
17
|
export declare class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {
|
|
18
|
+
_parent: Injector | null;
|
|
19
19
|
_bootstrapComponents: Type<any>[];
|
|
20
|
+
_r3Injector: Injector;
|
|
20
21
|
injector: Injector;
|
|
21
|
-
componentFactoryResolver: viewEngine_ComponentFactoryResolver;
|
|
22
22
|
instance: T;
|
|
23
23
|
destroyCbs: (() => void)[] | null;
|
|
24
|
-
constructor(ngModuleType: Type<T>,
|
|
24
|
+
constructor(ngModuleType: Type<T>, _parent: Injector | null);
|
|
25
|
+
get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
|
|
26
|
+
readonly componentFactoryResolver: viewEngine_ComponentFactoryResolver;
|
|
25
27
|
destroy(): void;
|
|
26
28
|
onDestroy(callback: () => void): void;
|
|
27
29
|
}
|
|
@@ -8,27 +8,20 @@
|
|
|
8
8
|
import { LContainer } from './interfaces/container';
|
|
9
9
|
import { TContainerNode, TElementContainerNode, TElementNode, TNode, TViewNode } from './interfaces/node';
|
|
10
10
|
import { RComment, RElement, RNode, RText, Renderer3 } from './interfaces/renderer';
|
|
11
|
-
import {
|
|
11
|
+
import { LView } from './interfaces/view';
|
|
12
12
|
/** Retrieves the parent element of a given node. */
|
|
13
|
-
export declare function getParentNative(tNode: TNode, currentView:
|
|
13
|
+
export declare function getParentNative(tNode: TNode, currentView: LView): RElement | RComment | null;
|
|
14
14
|
/**
|
|
15
15
|
* Gets the host element given a view. Will return null if the current view is an embedded view,
|
|
16
16
|
* which does not have a host element.
|
|
17
17
|
*/
|
|
18
|
-
export declare function getHostNative(currentView:
|
|
19
|
-
export declare function getLContainer(tNode: TViewNode, embeddedView:
|
|
18
|
+
export declare function getHostNative(currentView: LView): RElement | null;
|
|
19
|
+
export declare function getLContainer(tNode: TViewNode, embeddedView: LView): LContainer | null;
|
|
20
20
|
/**
|
|
21
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:
|
|
25
|
-
/**
|
|
26
|
-
* Given a current view, finds the nearest component's host (LElement).
|
|
27
|
-
*
|
|
28
|
-
* @param lViewData LViewData for which we want a host element node
|
|
29
|
-
* @returns The host node
|
|
30
|
-
*/
|
|
31
|
-
export declare function findComponentView(lViewData: LViewData): LViewData;
|
|
24
|
+
export declare function getContainerRenderParent(tViewNode: TViewNode, view: LView): RElement | null;
|
|
32
25
|
export declare function createTextNode(value: any, renderer: Renderer3): RText;
|
|
33
26
|
/**
|
|
34
27
|
* Adds or removes all DOM elements associated with a view.
|
|
@@ -41,8 +34,8 @@ export declare function createTextNode(value: any, renderer: Renderer3): RText;
|
|
|
41
34
|
* @param insertMode Whether or not elements should be added (if false, removing)
|
|
42
35
|
* @param beforeNode The node before which elements should be added, if insert mode
|
|
43
36
|
*/
|
|
44
|
-
export declare function addRemoveViewFromContainer(viewToWalk:
|
|
45
|
-
export declare function addRemoveViewFromContainer(viewToWalk:
|
|
37
|
+
export declare function addRemoveViewFromContainer(viewToWalk: LView, insertMode: true, beforeNode: RNode | null): void;
|
|
38
|
+
export declare function addRemoveViewFromContainer(viewToWalk: LView, insertMode: false): void;
|
|
46
39
|
/**
|
|
47
40
|
* Traverses down and up the tree of views and containers to remove listeners and
|
|
48
41
|
* call onDestroy callbacks.
|
|
@@ -56,7 +49,7 @@ export declare function addRemoveViewFromContainer(viewToWalk: LViewData, insert
|
|
|
56
49
|
*
|
|
57
50
|
* @param rootView The view to destroy
|
|
58
51
|
*/
|
|
59
|
-
export declare function destroyViewTree(rootView:
|
|
52
|
+
export declare function destroyViewTree(rootView: LView): void;
|
|
60
53
|
/**
|
|
61
54
|
* Inserts a view into a container.
|
|
62
55
|
*
|
|
@@ -71,7 +64,7 @@ export declare function destroyViewTree(rootView: LViewData): void;
|
|
|
71
64
|
* @param index The index at which to insert the view
|
|
72
65
|
* @param containerIndex The index of the container node, if dynamic
|
|
73
66
|
*/
|
|
74
|
-
export declare function insertView(lView:
|
|
67
|
+
export declare function insertView(lView: LView, lContainer: LContainer, parentView: LView, index: number, containerIndex: number): void;
|
|
75
68
|
/**
|
|
76
69
|
* Detaches a view from a container.
|
|
77
70
|
*
|
|
@@ -81,8 +74,9 @@ export declare function insertView(lView: LViewData, lContainer: LContainer, par
|
|
|
81
74
|
* @param lContainer The container from which to detach a view
|
|
82
75
|
* @param removeIndex The index of the view to detach
|
|
83
76
|
* @param detached Whether or not this view is already detached.
|
|
77
|
+
* @returns Detached LView instance.
|
|
84
78
|
*/
|
|
85
|
-
export declare function detachView(lContainer: LContainer, removeIndex: number, detached: boolean):
|
|
79
|
+
export declare function detachView(lContainer: LContainer, removeIndex: number, detached: boolean): LView;
|
|
86
80
|
/**
|
|
87
81
|
* Removes a view from a container, i.e. detaches it and then destroys the underlying LView.
|
|
88
82
|
*
|
|
@@ -91,15 +85,15 @@ export declare function detachView(lContainer: LContainer, removeIndex: number,
|
|
|
91
85
|
* @param removeIndex The index of the view to remove
|
|
92
86
|
*/
|
|
93
87
|
export declare function removeView(lContainer: LContainer, containerHost: TElementNode | TContainerNode | TElementContainerNode, removeIndex: number): void;
|
|
94
|
-
/** Gets the child of the given
|
|
95
|
-
export declare function getLViewChild(
|
|
88
|
+
/** Gets the child of the given LView */
|
|
89
|
+
export declare function getLViewChild(lView: LView): LView | LContainer | null;
|
|
96
90
|
/**
|
|
97
91
|
* A standalone function which destroys an LView,
|
|
98
92
|
* conducting cleanup (e.g. removing listeners, calling onDestroys).
|
|
99
93
|
*
|
|
100
94
|
* @param view The view to be destroyed.
|
|
101
95
|
*/
|
|
102
|
-
export declare function destroyLView(view:
|
|
96
|
+
export declare function destroyLView(view: LView): void;
|
|
103
97
|
/**
|
|
104
98
|
* Determines which LViewOrLContainer to jump to when traversing back up the
|
|
105
99
|
* tree in destroyViewTree.
|
|
@@ -112,8 +106,8 @@ export declare function destroyLView(view: LViewData): void;
|
|
|
112
106
|
* @param rootView The rootView, so we don't propagate too far up the view tree
|
|
113
107
|
* @returns The correct parent LViewOrLContainer
|
|
114
108
|
*/
|
|
115
|
-
export declare function getParentState(state:
|
|
116
|
-
export declare function getRenderParent(tNode: TNode, currentView:
|
|
109
|
+
export declare function getParentState(state: LView | LContainer, rootView: LView): LView | LContainer | null;
|
|
110
|
+
export declare function getRenderParent(tNode: TNode, currentView: LView): RElement | null;
|
|
117
111
|
/**
|
|
118
112
|
* Returns whether a native element can be inserted into the given parent.
|
|
119
113
|
*
|
|
@@ -132,7 +126,7 @@ export declare function getRenderParent(tNode: TNode, currentView: LViewData): R
|
|
|
132
126
|
* @param currentView Current LView being processed.
|
|
133
127
|
* @return boolean Whether the node should be inserted now (or delayed until later).
|
|
134
128
|
*/
|
|
135
|
-
export declare function canInsertNativeNode(tNode: TNode, currentView:
|
|
129
|
+
export declare function canInsertNativeNode(tNode: TNode, currentView: LView): boolean;
|
|
136
130
|
/**
|
|
137
131
|
* Inserts a native node before another native node for a given parent using {@link Renderer3}.
|
|
138
132
|
* This is a utility function that can be used when native nodes were determined - it abstracts an
|
|
@@ -157,8 +151,8 @@ export declare function nativeNextSibling(renderer: Renderer3, node: RNode): RNo
|
|
|
157
151
|
* @param currentView The current LView
|
|
158
152
|
* @returns Whether or not the child was appended
|
|
159
153
|
*/
|
|
160
|
-
export declare function appendChild(childEl: RNode | null | undefined, childTNode: TNode, currentView:
|
|
161
|
-
export declare function getBeforeNodeForView(index: number, views:
|
|
154
|
+
export declare function appendChild(childEl: RNode | null | undefined, childTNode: TNode, currentView: LView): boolean;
|
|
155
|
+
export declare function getBeforeNodeForView(index: number, views: LView[], containerNative: RComment): RComment | RElement;
|
|
162
156
|
/**
|
|
163
157
|
* Removes the `child` element from the DOM if not in view and not projected.
|
|
164
158
|
*
|
|
@@ -167,7 +161,7 @@ export declare function getBeforeNodeForView(index: number, views: LViewData[],
|
|
|
167
161
|
* @param currentView The current LView
|
|
168
162
|
* @returns Whether or not the child was removed
|
|
169
163
|
*/
|
|
170
|
-
export declare function removeChild(childTNode: TNode, childEl: RNode | null, currentView:
|
|
164
|
+
export declare function removeChild(childTNode: TNode, childEl: RNode | null, currentView: LView): boolean;
|
|
171
165
|
/**
|
|
172
166
|
* Appends a projected node to the DOM, or in the case of a projected container,
|
|
173
167
|
* appends the nodes from all of the container's active views to the DOM.
|
|
@@ -177,4 +171,4 @@ export declare function removeChild(childTNode: TNode, childEl: RNode | null, cu
|
|
|
177
171
|
* @param currentView Current LView
|
|
178
172
|
* @param projectionView Projection view (view above current)
|
|
179
173
|
*/
|
|
180
|
-
export declare function appendProjectedNode(projectedTNode: TNode, tProjectionNode: TNode, currentView:
|
|
174
|
+
export declare function appendProjectedNode(projectedTNode: TNode, tProjectionNode: TNode, currentView: LView, projectionView: LView): void;
|
|
@@ -15,8 +15,8 @@ import { CssSelector, CssSelectorList } from './interfaces/projection';
|
|
|
15
15
|
* @param selector
|
|
16
16
|
* @returns true if node matches the selector.
|
|
17
17
|
*/
|
|
18
|
-
export declare function isNodeMatchingSelector(tNode: TNode, selector: CssSelector): boolean;
|
|
19
|
-
export declare function isNodeMatchingSelectorList(tNode: TNode, selector: CssSelectorList): boolean;
|
|
18
|
+
export declare function isNodeMatchingSelector(tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean;
|
|
19
|
+
export declare function isNodeMatchingSelectorList(tNode: TNode, selector: CssSelectorList, isProjectionMode?: boolean): boolean;
|
|
20
20
|
export declare function getProjectAsAttrValue(tNode: TNode): string | null;
|
|
21
21
|
/**
|
|
22
22
|
* Checks a given node against matching selectors and returns
|
package/src/render3/state.d.ts
CHANGED
|
@@ -5,18 +5,15 @@
|
|
|
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 { ComponentDef, DirectiveDef } from './interfaces/definition';
|
|
9
9
|
import { TElementNode, TNode, TViewNode } from './interfaces/node';
|
|
10
10
|
import { LQueries } from './interfaces/query';
|
|
11
|
-
import {
|
|
12
|
-
import { LViewData, OpaqueViewState, TView } from './interfaces/view';
|
|
13
|
-
export declare function getRenderer(): Renderer3;
|
|
14
|
-
export declare function setRenderer(r: Renderer3): void;
|
|
15
|
-
export declare function getRendererFactory(): RendererFactory3;
|
|
16
|
-
export declare function getCurrentSanitizer(): Sanitizer | null;
|
|
11
|
+
import { LView, OpaqueViewState } from './interfaces/view';
|
|
17
12
|
export declare function getElementDepthCount(): number;
|
|
18
13
|
export declare function increaseElementDepthCount(): void;
|
|
19
14
|
export declare function decreaseElementDepthCount(): void;
|
|
15
|
+
export declare function getCurrentDirectiveDef(): DirectiveDef<any> | ComponentDef<any> | null;
|
|
16
|
+
export declare function setCurrentDirectiveDef(def: DirectiveDef<any> | ComponentDef<any> | null): void;
|
|
20
17
|
export declare function getBindingsEnabled(): boolean;
|
|
21
18
|
/**
|
|
22
19
|
* Enables directive matching on elements.
|
|
@@ -54,15 +51,7 @@ export declare function enableBindings(): void;
|
|
|
54
51
|
* ```
|
|
55
52
|
*/
|
|
56
53
|
export declare function disableBindings(): void;
|
|
57
|
-
|
|
58
|
-
* Returns the current OpaqueViewState instance.
|
|
59
|
-
*
|
|
60
|
-
* Used in conjunction with the restoreView() instruction to save a snapshot
|
|
61
|
-
* of the current view and restore it when listeners are invoked. This allows
|
|
62
|
-
* walking the declaration view tree in listeners to get vars from parent views.
|
|
63
|
-
*/
|
|
64
|
-
export declare function getCurrentView(): OpaqueViewState;
|
|
65
|
-
export declare function _getViewData(): LViewData;
|
|
54
|
+
export declare function getLView(): LView;
|
|
66
55
|
/**
|
|
67
56
|
* Restores `contextViewData` to the given OpaqueViewState instance.
|
|
68
57
|
*
|
|
@@ -75,12 +64,9 @@ export declare function _getViewData(): LViewData;
|
|
|
75
64
|
export declare function restoreView(viewToRestore: OpaqueViewState): void;
|
|
76
65
|
export declare function getPreviousOrParentTNode(): TNode;
|
|
77
66
|
export declare function setPreviousOrParentTNode(tNode: TNode): void;
|
|
78
|
-
export declare function setTNodeAndViewData(tNode: TNode, view:
|
|
67
|
+
export declare function setTNodeAndViewData(tNode: TNode, view: LView): void;
|
|
79
68
|
export declare function getIsParent(): boolean;
|
|
80
69
|
export declare function setIsParent(value: boolean): void;
|
|
81
|
-
export declare function getTView(): TView;
|
|
82
|
-
export declare function getCurrentQueries(): LQueries | null;
|
|
83
|
-
export declare function setCurrentQueries(queries: LQueries | null): void;
|
|
84
70
|
/**
|
|
85
71
|
* Query instructions can ask for "current queries" in 2 different cases:
|
|
86
72
|
* - when creating view queries (at the root of a component view, before any node is created - in
|
|
@@ -91,16 +77,9 @@ export declare function setCurrentQueries(queries: LQueries | null): void;
|
|
|
91
77
|
export declare function getOrCreateCurrentQueries(QueryType: {
|
|
92
78
|
new (parent: null, shallow: null, deep: null): LQueries;
|
|
93
79
|
}): LQueries;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
* The getCurrentView() instruction should be used for anything public.
|
|
99
|
-
*/
|
|
100
|
-
export declare function getViewData(): LViewData;
|
|
101
|
-
export declare function getContextViewData(): LViewData;
|
|
102
|
-
export declare function getCleanup(view: LViewData): any[];
|
|
103
|
-
export declare function getTViewCleanup(view: LViewData): any[];
|
|
80
|
+
/** Checks whether a given view is in creation mode */
|
|
81
|
+
export declare function isCreationMode(view?: LView): boolean;
|
|
82
|
+
export declare function getContextLView(): LView;
|
|
104
83
|
export declare function getCheckNoChangesMode(): boolean;
|
|
105
84
|
export declare function setCheckNoChangesMode(mode: boolean): void;
|
|
106
85
|
export declare function getFirstTemplatePass(): boolean;
|
|
@@ -119,7 +98,7 @@ export declare function setBindingRoot(value: number): void;
|
|
|
119
98
|
* @param host Element to which the View is a child of
|
|
120
99
|
* @returns the previous state;
|
|
121
100
|
*/
|
|
122
|
-
export declare function enterView(newView:
|
|
101
|
+
export declare function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView;
|
|
123
102
|
export declare function nextContextImpl<T = any>(level?: number): T;
|
|
124
103
|
/**
|
|
125
104
|
* Resets the application state.
|
|
@@ -130,11 +109,5 @@ export declare function resetComponentState(): void;
|
|
|
130
109
|
* the direction of traversal (up or down the view tree) a bit clearer.
|
|
131
110
|
*
|
|
132
111
|
* @param newView New state to become active
|
|
133
|
-
* @param creationOnly An optional boolean to indicate that the view was processed in creation mode
|
|
134
|
-
* only, i.e. the first update will be done later. Only possible for dynamically created views.
|
|
135
112
|
*/
|
|
136
|
-
export declare function leaveView(newView:
|
|
137
|
-
export declare function assertPreviousIsParent(): void;
|
|
138
|
-
export declare function assertHasParent(): void;
|
|
139
|
-
export declare function assertDataInRange(index: number, arr?: any[]): void;
|
|
140
|
-
export declare function assertDataNext(index: number, arr?: any[]): void;
|
|
113
|
+
export declare function leaveView(newView: LView): void;
|