@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
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* This file contains reuseable "empty" symbols that can be used as default return values
|
|
11
|
+
* in different parts of the rendering code. Because the same symbols are returned, this
|
|
12
|
+
* allows for identity checks against these values to be consistently used by the framework
|
|
13
|
+
* code.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EMPTY_OBJ: {};
|
|
16
|
+
export declare const EMPTY_ARRAY: any[];
|
package/src/render3/errors.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export declare function throwCyclicDependencyError(token: any): never;
|
|
|
11
11
|
/** Called when there are multiple component selectors that match a given node */
|
|
12
12
|
export declare function throwMultipleComponentError(tNode: TNode): never;
|
|
13
13
|
/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
|
|
14
|
-
export declare function throwErrorIfNoChangesMode(creationMode: boolean,
|
|
14
|
+
export declare function throwErrorIfNoChangesMode(creationMode: boolean, oldValue: any, currValue: any): never | void;
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* to generate a d.ts file containing all the published symbols that is then compared to the golden
|
|
14
14
|
* file in the public_api_guard test.
|
|
15
15
|
*/
|
|
16
|
-
export { getComponent, getDirectives, getHostElement, getInjector, getRootComponents, getViewComponent } from './discovery_utils';
|
|
16
|
+
export { getComponent, getContext, getDirectives, getHostElement, getInjector, getListeners, getRootComponents, getViewComponent } from './discovery_utils';
|
|
17
17
|
export { markDirty } from './instructions';
|
|
18
18
|
export { getPlayers } from './players';
|
package/src/render3/hooks.d.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
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 { TNode } from './interfaces/node';
|
|
9
|
+
import { HookData, LView, TView } from './interfaces/view';
|
|
9
10
|
/**
|
|
10
11
|
* If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into
|
|
11
12
|
* TView.initHooks during directiveCreate.
|
|
@@ -14,7 +15,7 @@ import { HookData, LViewData, TView } from './interfaces/view';
|
|
|
14
15
|
* directive index), then saved in the even indices of the initHooks array. The odd indices
|
|
15
16
|
* hold the hook functions themselves.
|
|
16
17
|
*
|
|
17
|
-
* @param index The index of the directive in
|
|
18
|
+
* @param index The index of the directive in LView
|
|
18
19
|
* @param hooks The static hooks map on the directive def
|
|
19
20
|
* @param tView The current TView
|
|
20
21
|
*/
|
|
@@ -23,22 +24,22 @@ export declare function queueInitHooks(index: number, onInit: (() => void) | nul
|
|
|
23
24
|
* Loops through the directives on a node and queues all their hooks except ngOnInit
|
|
24
25
|
* and ngDoCheck, which are queued separately in directiveCreate.
|
|
25
26
|
*/
|
|
26
|
-
export declare function queueLifecycleHooks(
|
|
27
|
+
export declare function queueLifecycleHooks(tView: TView, tNode: TNode): void;
|
|
27
28
|
/**
|
|
28
29
|
* Calls onInit and doCheck calls if they haven't already been called.
|
|
29
30
|
*
|
|
30
31
|
* @param currentView The current view
|
|
31
32
|
*/
|
|
32
|
-
export declare function executeInitHooks(currentView:
|
|
33
|
+
export declare function executeInitHooks(currentView: LView, tView: TView, checkNoChangesMode: boolean): void;
|
|
33
34
|
/**
|
|
34
35
|
* Iterates over afterViewInit and afterViewChecked functions and calls them.
|
|
35
36
|
*
|
|
36
37
|
* @param currentView The current view
|
|
37
38
|
*/
|
|
38
|
-
export declare function executeHooks(
|
|
39
|
+
export declare function executeHooks(currentView: LView, allHooks: HookData | null, checkHooks: HookData | null, checkNoChangesMode: boolean): void;
|
|
39
40
|
/**
|
|
40
41
|
* Calls lifecycle hooks with their contexts, skipping init hooks if it's not
|
|
41
|
-
*
|
|
42
|
+
* the first LView pass.
|
|
42
43
|
*
|
|
43
44
|
* @param currentView The current view
|
|
44
45
|
* @param arr The array in which the hooks are found
|
package/src/render3/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { LifecycleHooksFeature, renderComponent, whenRendered } from './component';
|
|
9
9
|
import { defineBase, defineComponent, defineDirective, defineNgModule, definePipe } from './definition';
|
|
10
|
-
import { getHostElement, getRenderedText } from './discovery_utils';
|
|
10
|
+
import { getComponent, getHostElement, getRenderedText } from './discovery_utils';
|
|
11
11
|
import { InheritDefinitionFeature } from './features/inherit_definition_feature';
|
|
12
12
|
import { NgOnChangesFeature } from './features/ng_onchanges_feature';
|
|
13
13
|
import { ProvidersFeature } from './features/providers_feature';
|
|
@@ -16,8 +16,8 @@ export { ComponentFactory, ComponentFactoryResolver, ComponentRef, injectCompone
|
|
|
16
16
|
export { getFactoryOf, getInheritedFactory } from './di';
|
|
17
17
|
export { RenderFlags } from './interfaces/definition';
|
|
18
18
|
export { CssSelectorList } from './interfaces/projection';
|
|
19
|
-
export { bind, interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV, container, containerRefreshStart, containerRefreshEnd, nextContext, element, elementAttribute, elementClassProp, elementEnd, elementProperty, elementStart, elementContainerStart, elementContainerEnd, elementStyling, elementStylingMap, elementStyleProp, elementStylingApply, listener, store, load, namespaceHTML, namespaceMathML, namespaceSVG, projection, projectionDef, text, textBinding, template, reference, embeddedViewStart, embeddedViewEnd, detectChanges, markDirty, tick, directiveInject, injectAttribute, } from './instructions';
|
|
20
|
-
export {
|
|
19
|
+
export { allocHostVars, bind, interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV, container, containerRefreshStart, containerRefreshEnd, nextContext, element, elementAttribute, elementClassProp, elementEnd, elementProperty, componentHostSyntheticProperty, elementStart, elementContainerStart, elementContainerEnd, elementStyling, elementHostAttrs, elementStylingMap, elementStyleProp, elementStylingApply, listener, store, load, namespaceHTML, namespaceMathML, namespaceSVG, projection, projectionDef, text, textBinding, template, reference, embeddedViewStart, embeddedViewEnd, detectChanges, markDirty, tick, directiveInject, injectAttribute, getCurrentView } from './instructions';
|
|
20
|
+
export { restoreView, enableBindings, disableBindings, } from './state';
|
|
21
21
|
export { i18n, i18nAttributes, i18nExp, i18nStart, i18nEnd, i18nApply, i18nPostprocess } from './i18n';
|
|
22
22
|
export { NgModuleFactory, NgModuleRef, NgModuleType } from './ng_module_ref';
|
|
23
23
|
export { AttributeMarker } from './interfaces/node';
|
|
@@ -27,5 +27,5 @@ export { QueryList, query, queryRefresh, } from './query';
|
|
|
27
27
|
export { registerContentQuery, loadQueryList, } from './instructions';
|
|
28
28
|
export { pureFunction0, pureFunction1, pureFunction2, pureFunction3, pureFunction4, pureFunction5, pureFunction6, pureFunction7, pureFunction8, pureFunctionV, } from './pure_function';
|
|
29
29
|
export { templateRefExtractor } from './view_engine_compatibility_prebound';
|
|
30
|
-
export { BaseDef, ComponentDef, ComponentDefWithMeta, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveDefWithMeta, DirectiveType, NgOnChangesFeature, InheritDefinitionFeature, ProvidersFeature, PipeDef, PipeDefWithMeta, LifecycleHooksFeature, defineComponent, defineDirective, defineNgModule, defineBase, definePipe, getHostElement, getRenderedText, renderComponent, whenRendered, };
|
|
30
|
+
export { BaseDef, ComponentDef, ComponentDefWithMeta, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveDefWithMeta, DirectiveType, NgOnChangesFeature, InheritDefinitionFeature, ProvidersFeature, PipeDef, PipeDefWithMeta, LifecycleHooksFeature, defineComponent, defineDirective, defineNgModule, defineBase, definePipe, getHostElement, getComponent, getRenderedText, renderComponent, whenRendered, };
|
|
31
31
|
export { NO_CHANGE } from './tokens';
|
|
@@ -13,14 +13,14 @@ import { Sanitizer } from '../sanitization/security';
|
|
|
13
13
|
import { StyleSanitizeFn } from '../sanitization/style_sanitizer';
|
|
14
14
|
import { Type } from '../type';
|
|
15
15
|
import { LContainer } from './interfaces/container';
|
|
16
|
-
import { ComponentDef, ComponentQuery, ComponentTemplate, DirectiveDefListOrFactory,
|
|
16
|
+
import { ComponentDef, ComponentQuery, ComponentTemplate, DirectiveDefListOrFactory, PipeDefListOrFactory, RenderFlags } from './interfaces/definition';
|
|
17
17
|
import { LocalRefExtractor, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TProjectionNode, TViewNode } from './interfaces/node';
|
|
18
18
|
import { PlayerFactory } from './interfaces/player';
|
|
19
19
|
import { CssSelectorList } from './interfaces/projection';
|
|
20
20
|
import { LQueries } from './interfaces/query';
|
|
21
21
|
import { RComment, RElement, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
|
|
22
22
|
import { SanitizerFn } from './interfaces/sanitization';
|
|
23
|
-
import {
|
|
23
|
+
import { LView, LViewFlags, OpaqueViewState, RootContext, RootContextFlags, TView } from './interfaces/view';
|
|
24
24
|
import { NO_CHANGE } from './tokens';
|
|
25
25
|
/**
|
|
26
26
|
* Refreshes the view, executing the following steps in that order:
|
|
@@ -28,10 +28,10 @@ import { NO_CHANGE } from './tokens';
|
|
|
28
28
|
* bindings, refreshes child components.
|
|
29
29
|
* Note: view hooks are triggered later when leaving the view.
|
|
30
30
|
*/
|
|
31
|
-
export declare function refreshDescendantViews(
|
|
31
|
+
export declare function refreshDescendantViews(lView: LView): void;
|
|
32
32
|
/** Sets the host bindings for the current view. */
|
|
33
|
-
export declare function setHostBindings(tView: TView, viewData:
|
|
34
|
-
export declare function
|
|
33
|
+
export declare function setHostBindings(tView: TView, viewData: LView): void;
|
|
34
|
+
export declare function createLView<T>(parentLView: LView | null, tView: TView, context: T | null, flags: LViewFlags, rendererFactory?: RendererFactory3 | null, renderer?: Renderer3 | null, sanitizer?: Sanitizer | null, injector?: Injector | null): LView;
|
|
35
35
|
/**
|
|
36
36
|
* Create and stores the TNode, and hooks it up to the tree.
|
|
37
37
|
*
|
|
@@ -45,15 +45,15 @@ export declare function createLViewData<T>(parentLView: LViewData | null, tView:
|
|
|
45
45
|
export declare function createNodeAtIndex(index: number, type: TNodeType.Element, native: RElement | RText | null, name: string | null, attrs: TAttributes | null): TElementNode;
|
|
46
46
|
export declare function createNodeAtIndex(index: number, type: TNodeType.Container, native: RComment, name: string | null, attrs: TAttributes | null): TContainerNode;
|
|
47
47
|
export declare function createNodeAtIndex(index: number, type: TNodeType.Projection, native: null, name: null, attrs: TAttributes | null): TProjectionNode;
|
|
48
|
-
export declare function createNodeAtIndex(index: number, type: TNodeType.ElementContainer, native: RComment, name: null, attrs: TAttributes | null): TElementContainerNode;
|
|
48
|
+
export declare function createNodeAtIndex(index: number, type: TNodeType.ElementContainer, native: RComment, name: string | null, attrs: TAttributes | null): TElementContainerNode;
|
|
49
49
|
export declare function createNodeAtIndex(index: number, type: TNodeType.IcuContainer, native: RComment, name: null, attrs: TAttributes | null): TElementContainerNode;
|
|
50
|
-
export declare function createViewNode(index: number, view:
|
|
50
|
+
export declare function createViewNode(index: number, view: LView): TViewNode;
|
|
51
51
|
/**
|
|
52
52
|
* When elements are created dynamically after a view blueprint is created (e.g. through
|
|
53
53
|
* i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future
|
|
54
54
|
* template passes.
|
|
55
55
|
*/
|
|
56
|
-
export declare function allocExpando(view:
|
|
56
|
+
export declare function allocExpando(view: LView): void;
|
|
57
57
|
/**
|
|
58
58
|
*
|
|
59
59
|
* @param hostNode Existing node to render into.
|
|
@@ -65,13 +65,13 @@ export declare function allocExpando(view: LViewData): void;
|
|
|
65
65
|
* @param directives Directive defs that should be used for matching
|
|
66
66
|
* @param pipes Pipe defs that should be used for matching
|
|
67
67
|
*/
|
|
68
|
-
export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3, hostView:
|
|
68
|
+
export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3, hostView: LView | null, directives?: DirectiveDefListOrFactory | null, pipes?: PipeDefListOrFactory | null, sanitizer?: Sanitizer | null): LView;
|
|
69
69
|
/**
|
|
70
70
|
* Used for creating the LViewNode of a dynamic embedded view,
|
|
71
71
|
* either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().
|
|
72
72
|
* Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).
|
|
73
73
|
*/
|
|
74
|
-
export declare function createEmbeddedViewAndNode<T>(tView: TView, context: T, declarationView:
|
|
74
|
+
export declare function createEmbeddedViewAndNode<T>(tView: TView, context: T, declarationView: LView, renderer: Renderer3, queries: LQueries | null, injectorIndex: number): LView;
|
|
75
75
|
/**
|
|
76
76
|
* Used for rendering embedded views (e.g. dynamically created views)
|
|
77
77
|
*
|
|
@@ -82,7 +82,7 @@ export declare function createEmbeddedViewAndNode<T>(tView: TView, context: T, d
|
|
|
82
82
|
* can't store TViews in the template function itself (as we do for comps). Instead, we store the
|
|
83
83
|
* TView for dynamically created views on their host TNode, which only has one instance.
|
|
84
84
|
*/
|
|
85
|
-
export declare function renderEmbeddedTemplate<T>(viewToRender:
|
|
85
|
+
export declare function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, context: T): void;
|
|
86
86
|
/**
|
|
87
87
|
* Retrieves a context at the level specified and saves it as the global, contextViewData.
|
|
88
88
|
* Will get the next level up if level is not specified.
|
|
@@ -102,7 +102,8 @@ export declare function namespaceHTML(): void;
|
|
|
102
102
|
*
|
|
103
103
|
* @param index Index of the element in the data array
|
|
104
104
|
* @param name Name of the DOM Node
|
|
105
|
-
* @param attrs Statically bound set of attributes to be written into the DOM
|
|
105
|
+
* @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
|
|
106
|
+
* element on creation. Use [AttributeMarker] to denote the meaning of this array.
|
|
106
107
|
* @param localRefs A set of local reference bindings on the element.
|
|
107
108
|
*/
|
|
108
109
|
export declare function element(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void;
|
|
@@ -110,7 +111,7 @@ export declare function element(index: number, name: string, attrs?: TAttributes
|
|
|
110
111
|
* Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
|
|
111
112
|
* The instruction must later be followed by `elementContainerEnd()` call.
|
|
112
113
|
*
|
|
113
|
-
* @param index Index of the element in the
|
|
114
|
+
* @param index Index of the element in the LView array
|
|
114
115
|
* @param attrs Set of attributes to be used when matching directives.
|
|
115
116
|
* @param localRefs A set of local reference bindings on the element.
|
|
116
117
|
*
|
|
@@ -124,9 +125,10 @@ export declare function elementContainerEnd(): void;
|
|
|
124
125
|
/**
|
|
125
126
|
* Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
|
126
127
|
*
|
|
127
|
-
* @param index Index of the element in the
|
|
128
|
+
* @param index Index of the element in the LView array
|
|
128
129
|
* @param name Name of the DOM Node
|
|
129
|
-
* @param attrs Statically bound set of attributes to be written into the DOM
|
|
130
|
+
* @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
|
|
131
|
+
* element on creation. Use [AttributeMarker] to denote the meaning of this array.
|
|
130
132
|
* @param localRefs A set of local reference bindings on the element.
|
|
131
133
|
*
|
|
132
134
|
* Attributes and localRefs are passed as an array of strings where elements with an even index
|
|
@@ -188,7 +190,7 @@ export declare function listener(eventName: string, listenerFn: (e?: any) => any
|
|
|
188
190
|
* - Cleanup function
|
|
189
191
|
* - Index of context we just saved in LView.cleanupInstances
|
|
190
192
|
*/
|
|
191
|
-
export declare function storeCleanupWithContext(
|
|
193
|
+
export declare function storeCleanupWithContext(lView: LView, context: any, cleanupFn: Function): void;
|
|
192
194
|
/**
|
|
193
195
|
* Saves the cleanup function itself in LView.cleanupInstances.
|
|
194
196
|
*
|
|
@@ -197,7 +199,7 @@ export declare function storeCleanupWithContext(view: LViewData | null, context:
|
|
|
197
199
|
*
|
|
198
200
|
* On the first template pass, the index of the cleanup function is saved in TView.
|
|
199
201
|
*/
|
|
200
|
-
export declare function storeCleanupFn(view:
|
|
202
|
+
export declare function storeCleanupFn(view: LView, cleanupFn: Function): void;
|
|
201
203
|
/** Mark the end of the element. */
|
|
202
204
|
export declare function elementEnd(): void;
|
|
203
205
|
/**
|
|
@@ -211,7 +213,7 @@ export declare function elementEnd(): void;
|
|
|
211
213
|
*/
|
|
212
214
|
export declare function elementAttribute(index: number, name: string, value: any, sanitizer?: SanitizerFn | null): void;
|
|
213
215
|
/**
|
|
214
|
-
* Update a property on an
|
|
216
|
+
* Update a property on an element.
|
|
215
217
|
*
|
|
216
218
|
* If the property name also exists as an input property on one of the element's directives,
|
|
217
219
|
* the component property will be set instead of the element property. This check must
|
|
@@ -222,8 +224,32 @@ export declare function elementAttribute(index: number, name: string, value: any
|
|
|
222
224
|
* renaming as part of minification.
|
|
223
225
|
* @param value New value to write.
|
|
224
226
|
* @param sanitizer An optional function used to sanitize the value.
|
|
227
|
+
* @param nativeOnly Whether or not we should only set native properties and skip input check
|
|
228
|
+
* (this is necessary for host property bindings)
|
|
225
229
|
*/
|
|
226
|
-
export declare function elementProperty<T>(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null): void;
|
|
230
|
+
export declare function elementProperty<T>(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void;
|
|
231
|
+
/**
|
|
232
|
+
* Updates a synthetic host binding (e.g. `[@foo]`) on a component.
|
|
233
|
+
*
|
|
234
|
+
* This instruction is for compatibility purposes and is designed to ensure that a
|
|
235
|
+
* synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
|
|
236
|
+
* the component's renderer. Normally all host bindings are evaluated with the parent
|
|
237
|
+
* component's renderer, but, in the case of animation @triggers, they need to be
|
|
238
|
+
* evaluated with the sub components renderer (because that's where the animation
|
|
239
|
+
* triggers are defined).
|
|
240
|
+
*
|
|
241
|
+
* Do not use this instruction as a replacement for `elementProperty`. This instruction
|
|
242
|
+
* only exists to ensure compatibility with the ViewEngine's host binding behavior.
|
|
243
|
+
*
|
|
244
|
+
* @param index The index of the element to update in the data array
|
|
245
|
+
* @param propName Name of property. Because it is going to DOM, this is not subject to
|
|
246
|
+
* renaming as part of minification.
|
|
247
|
+
* @param value New value to write.
|
|
248
|
+
* @param sanitizer An optional function used to sanitize the value.
|
|
249
|
+
* @param nativeOnly Whether or not we should only set native properties and skip input check
|
|
250
|
+
* (this is necessary for host property bindings)
|
|
251
|
+
*/
|
|
252
|
+
export declare function componentHostSyntheticProperty<T>(index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void;
|
|
227
253
|
/**
|
|
228
254
|
* Constructs a TNode object from the arguments.
|
|
229
255
|
*
|
|
@@ -234,108 +260,130 @@ export declare function elementProperty<T>(index: number, propName: string, valu
|
|
|
234
260
|
* @param tViews Any TViews attached to this node
|
|
235
261
|
* @returns the TNode object
|
|
236
262
|
*/
|
|
237
|
-
export declare function createTNode(
|
|
263
|
+
export declare function createTNode(lView: LView, type: TNodeType, adjustedIndex: number, tagName: string | null, attrs: TAttributes | null, tViews: TView[] | null): TNode;
|
|
238
264
|
/**
|
|
239
|
-
*
|
|
265
|
+
* Assign any inline style values to the element during creation mode.
|
|
240
266
|
*
|
|
241
|
-
* This instruction is meant to
|
|
267
|
+
* This instruction is meant to be called during creation mode to register all
|
|
268
|
+
* dynamic style and class bindings on the element. Note for static values (no binding)
|
|
269
|
+
* see `elementStart` and `elementHostAttrs`.
|
|
270
|
+
*
|
|
271
|
+
* @param classBindingNames An array containing bindable class names.
|
|
272
|
+
* The `elementClassProp` refers to the class name by index in this array.
|
|
273
|
+
* (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).
|
|
274
|
+
* @param styleBindingNames An array containing bindable style properties.
|
|
275
|
+
* The `elementStyleProp` refers to the class name by index in this array.
|
|
276
|
+
* (i.e. `['width', 'height']` means `width=0` and `height=1`).
|
|
277
|
+
* @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS
|
|
278
|
+
* property values that are applied to the element (during rendering).
|
|
279
|
+
* Note that the sanitizer instance itself is tied to the `directive` (if provided).
|
|
280
|
+
* @param directive A directive instance the styling is associated with. If not provided
|
|
281
|
+
* current view's controller instance is assumed.
|
|
242
282
|
*
|
|
243
|
-
* @
|
|
244
|
-
* @param classIndex Index of class to toggle. Because it is going to DOM, this is not subject to
|
|
245
|
-
* renaming as part of minification.
|
|
246
|
-
* @param value A value indicating if a given class should be added or removed.
|
|
247
|
-
* @param directive the ref to the directive that is attempting to change styling.
|
|
283
|
+
* @publicApi
|
|
248
284
|
*/
|
|
249
|
-
export declare function
|
|
285
|
+
export declare function elementStyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null, directive?: {}): void;
|
|
250
286
|
/**
|
|
251
|
-
* Assign
|
|
287
|
+
* Assign static styling values to a host element.
|
|
252
288
|
*
|
|
253
|
-
* This instruction is meant to
|
|
254
|
-
* (e.g. `style="..."`) values to the element. This is also where the provided index
|
|
255
|
-
* value is allocated for the styling details for its corresponding element (the element
|
|
256
|
-
* index is the previous index value from this one).
|
|
289
|
+
* NOTE: This instruction is meant to used from `hostBindings` function only.
|
|
257
290
|
*
|
|
258
|
-
*
|
|
291
|
+
* @param directive A directive instance the styling is associated with.
|
|
292
|
+
* @param attrs An array containing class and styling information. The values must be marked with
|
|
293
|
+
* `AttributeMarker`.
|
|
259
294
|
*
|
|
295
|
+
* ```
|
|
296
|
+
* var attrs = [AttributeMarker.Classes, 'foo', 'bar',
|
|
297
|
+
* AttributeMarker.Styles, 'width', '100px', 'height, '200px']
|
|
298
|
+
* elementHostAttrs(directive, attrs);
|
|
299
|
+
* ```
|
|
260
300
|
*
|
|
261
|
-
* @
|
|
262
|
-
* (Note that this is not the element index, but rather an index value allocated
|
|
263
|
-
* specifically for element styling--the index must be the next index after the element
|
|
264
|
-
* index.)
|
|
265
|
-
* @param classDeclarations A key/value array of CSS classes that will be registered on the element.
|
|
266
|
-
* Each individual style will be used on the element as long as it is not overridden
|
|
267
|
-
* by any classes placed on the element by multiple (`[class]`) or singular (`[class.named]`)
|
|
268
|
-
* bindings. If a class binding changes its value to a falsy value then the matching initial
|
|
269
|
-
* class value that are passed in here will be applied to the element (if matched).
|
|
270
|
-
* @param styleDeclarations A key/value array of CSS styles that will be registered on the element.
|
|
271
|
-
* Each individual style will be used on the element as long as it is not overridden
|
|
272
|
-
* by any styles placed on the element by multiple (`[style]`) or singular (`[style.prop]`)
|
|
273
|
-
* bindings. If a style binding changes its value to null then the initial styling
|
|
274
|
-
* values that are passed in here will be applied to the element (if matched).
|
|
275
|
-
* @param styleSanitizer An optional sanitizer function that will be used (if provided)
|
|
276
|
-
* to sanitize the any CSS property values that are applied to the element (during rendering).
|
|
277
|
-
* @param directive the ref to the directive that is attempting to change styling.
|
|
301
|
+
* @publicApi
|
|
278
302
|
*/
|
|
279
|
-
export declare function
|
|
303
|
+
export declare function elementHostAttrs(directive: any, attrs: TAttributes): void;
|
|
280
304
|
/**
|
|
281
|
-
* Apply
|
|
305
|
+
* Apply styling binding to the element.
|
|
306
|
+
*
|
|
307
|
+
* This instruction is meant to be run after `elementStyle` and/or `elementStyleProp`.
|
|
308
|
+
* if any styling bindings have changed then the changes are flushed to the element.
|
|
282
309
|
*
|
|
283
|
-
* This instruction is meant to be run once one or more `elementStyle` and/or `elementStyleProp`
|
|
284
|
-
* have been issued against the element. This function will also determine if any styles have
|
|
285
|
-
* changed and will then skip the operation if there is nothing new to render.
|
|
286
310
|
*
|
|
287
|
-
*
|
|
311
|
+
* @param index Index of the element's with which styling is associated.
|
|
312
|
+
* @param directive Directive instance that is attempting to change styling. (Defaults to the
|
|
313
|
+
* component of the current view).
|
|
314
|
+
components
|
|
288
315
|
*
|
|
289
|
-
* @
|
|
290
|
-
* (Note that this is not the element index, but rather an index value allocated
|
|
291
|
-
* specifically for element styling--the index must be the next index after the element
|
|
292
|
-
* index.)
|
|
293
|
-
* @param directive the ref to the directive that is attempting to change styling.
|
|
316
|
+
* @publicApi
|
|
294
317
|
*/
|
|
295
|
-
export declare function elementStylingApply(index: number, directive?:
|
|
318
|
+
export declare function elementStylingApply(index: number, directive?: any): void;
|
|
296
319
|
/**
|
|
297
|
-
*
|
|
320
|
+
* Update a style bindings value on an element.
|
|
298
321
|
*
|
|
299
322
|
* If the style value is `null` then it will be removed from the element
|
|
300
323
|
* (or assigned a different value depending if there are any styles placed
|
|
301
324
|
* on the element with `elementStyle` or any styles that are present
|
|
302
325
|
* from when the element was created (with `elementStyling`).
|
|
303
326
|
*
|
|
304
|
-
* (Note that the styling
|
|
327
|
+
* (Note that the styling element is updated as part of `elementStylingApply`.)
|
|
305
328
|
*
|
|
306
|
-
* @param index Index of the element's
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
* @param
|
|
311
|
-
*
|
|
329
|
+
* @param index Index of the element's with which styling is associated.
|
|
330
|
+
* @param styleIndex Index of style to update. This index value refers to the
|
|
331
|
+
* index of the style in the style bindings array that was passed into
|
|
332
|
+
* `elementStlyingBindings`.
|
|
333
|
+
* @param value New value to write (null to remove). Note that if a directive also
|
|
334
|
+
* attempts to write to the same binding value then it will only be able to
|
|
335
|
+
* do so if the template binding value is `null` (or doesn't exist at all).
|
|
312
336
|
* @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
|
|
313
337
|
* Note that when a suffix is provided then the underlying sanitizer will
|
|
314
338
|
* be ignored.
|
|
315
|
-
* @param directive
|
|
339
|
+
* @param directive Directive instance that is attempting to change styling. (Defaults to the
|
|
340
|
+
* component of the current view).
|
|
341
|
+
components
|
|
342
|
+
*
|
|
343
|
+
* @publicApi
|
|
344
|
+
*/
|
|
345
|
+
export declare function elementStyleProp(index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string | null, directive?: {}): void;
|
|
346
|
+
/**
|
|
347
|
+
* Add or remove a class via a class binding on a DOM element.
|
|
348
|
+
*
|
|
349
|
+
* This instruction is meant to handle the [class.foo]="exp" case and, therefore,
|
|
350
|
+
* the class itself must already be applied using `elementStyling` within
|
|
351
|
+
* the creation block.
|
|
352
|
+
*
|
|
353
|
+
* @param index Index of the element's with which styling is associated.
|
|
354
|
+
* @param classIndex Index of class to toggle. This index value refers to the
|
|
355
|
+
* index of the class in the class bindings array that was passed into
|
|
356
|
+
* `elementStlyingBindings` (which is meant to be called before this
|
|
357
|
+
* function is).
|
|
358
|
+
* @param value A true/false value which will turn the class on or off.
|
|
359
|
+
* @param directive Directive instance that is attempting to change styling. (Defaults to the
|
|
360
|
+
* component of the current view).
|
|
361
|
+
components
|
|
362
|
+
*
|
|
363
|
+
* @publicApi
|
|
316
364
|
*/
|
|
317
|
-
export declare function
|
|
365
|
+
export declare function elementClassProp(index: number, classIndex: number, value: boolean | PlayerFactory, directive?: {}): void;
|
|
318
366
|
/**
|
|
319
|
-
*
|
|
367
|
+
* Update style and/or class bindings using object literal.
|
|
320
368
|
*
|
|
321
|
-
* This instruction is meant
|
|
322
|
-
* the Element they will then be placed with respect to
|
|
323
|
-
* If any styles are set to `null` then they will be
|
|
324
|
-
*
|
|
369
|
+
* This instruction is meant apply styling via the `[style]="exp"` and `[class]="exp"` template
|
|
370
|
+
* bindings. When styles are applied to the Element they will then be placed with respect to
|
|
371
|
+
* any styles set with `elementStyleProp`. If any styles are set to `null` then they will be
|
|
372
|
+
* removed from the element.
|
|
325
373
|
*
|
|
326
374
|
* (Note that the styling instruction will not be applied until `elementStylingApply` is called.)
|
|
327
375
|
*
|
|
328
|
-
* @param index Index of the element's
|
|
329
|
-
* (Note that this is not the element index, but rather an index value allocated
|
|
330
|
-
* specifically for element styling--the index must be the next index after the element
|
|
331
|
-
* index.)
|
|
376
|
+
* @param index Index of the element's with which styling is associated.
|
|
332
377
|
* @param classes A key/value style map of CSS classes that will be added to the given element.
|
|
333
378
|
* Any missing classes (that have already been applied to the element beforehand) will be
|
|
334
379
|
* removed (unset) from the element's list of CSS classes.
|
|
335
380
|
* @param styles A key/value style map of the styles that will be applied to the given element.
|
|
336
381
|
* Any missing styles (that have already been applied to the element beforehand) will be
|
|
337
382
|
* removed (unset) from the element's styling.
|
|
338
|
-
* @param directive
|
|
383
|
+
* @param directive Directive instance that is attempting to change styling. (Defaults to the
|
|
384
|
+
* component of the current view).
|
|
385
|
+
*
|
|
386
|
+
* @publicApi
|
|
339
387
|
*/
|
|
340
388
|
export declare function elementStylingMap<T>(index: number, classes: {
|
|
341
389
|
[key: string]: any;
|
|
@@ -360,7 +408,7 @@ export declare function textBinding<T>(index: number, value: T | NO_CHANGE): voi
|
|
|
360
408
|
/**
|
|
361
409
|
* Instantiate a root component.
|
|
362
410
|
*/
|
|
363
|
-
export declare function instantiateRootComponent<T>(tView: TView, viewData:
|
|
411
|
+
export declare function instantiateRootComponent<T>(tView: TView, viewData: LView, def: ComponentDef<T>): T;
|
|
364
412
|
/**
|
|
365
413
|
* Generates a new block in TView.expandoInstructions for this node.
|
|
366
414
|
*
|
|
@@ -368,12 +416,6 @@ export declare function instantiateRootComponent<T>(tView: TView, viewData: LVie
|
|
|
368
416
|
* it from the hostVar count) and the directive count. See more in VIEW_DATA.md.
|
|
369
417
|
*/
|
|
370
418
|
export declare function generateExpandoInstructionBlock(tView: TView, tNode: TNode, directiveCount: number): void;
|
|
371
|
-
/**
|
|
372
|
-
* On the first template pass, we need to reserve space for host binding values
|
|
373
|
-
* after directives are matched (so all directives are saved, then bindings).
|
|
374
|
-
* Because we are updating the blueprint, we only need to do this once.
|
|
375
|
-
*/
|
|
376
|
-
export declare function prefillHostVars(tView: TView, viewData: LViewData, totalHostVars: number): void;
|
|
377
419
|
/** Stores index of component's host element so it will be queued for view refresh during CD. */
|
|
378
420
|
export declare function queueComponentIndexForCheck(previousOrParentTNode: TNode): void;
|
|
379
421
|
/**
|
|
@@ -392,7 +434,7 @@ export declare function initNodeFlags(tNode: TNode, index: number, numberOfDirec
|
|
|
392
434
|
* @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
|
|
393
435
|
* @returns LContainer
|
|
394
436
|
*/
|
|
395
|
-
export declare function createLContainer(hostNative: RElement | RComment, hostTNode: TElementNode | TContainerNode | TElementContainerNode, currentView:
|
|
437
|
+
export declare function createLContainer(hostNative: RElement | RComment, hostTNode: TElementNode | TContainerNode | TElementContainerNode, currentView: LView, native: RComment, isForViewContainerRef?: boolean): LContainer;
|
|
396
438
|
/**
|
|
397
439
|
* Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
|
|
398
440
|
*
|
|
@@ -445,12 +487,11 @@ export declare function embeddedViewEnd(): void;
|
|
|
445
487
|
/**
|
|
446
488
|
* Refreshes components by entering the component view and processing its bindings, queries, etc.
|
|
447
489
|
*
|
|
448
|
-
* @param adjustedElementIndex Element index in
|
|
449
|
-
* @param rf The render flags that should be used to process this template
|
|
490
|
+
* @param adjustedElementIndex Element index in LView[] (adjusted for HEADER_OFFSET)
|
|
450
491
|
*/
|
|
451
|
-
export declare function componentRefresh<T>(adjustedElementIndex: number
|
|
492
|
+
export declare function componentRefresh<T>(adjustedElementIndex: number): void;
|
|
452
493
|
/** Returns a boolean for whether the view is attached */
|
|
453
|
-
export declare function viewAttached(view:
|
|
494
|
+
export declare function viewAttached(view: LView): boolean;
|
|
454
495
|
/**
|
|
455
496
|
* Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
|
456
497
|
* It takes all the selectors from the entire component's template and decides where
|
|
@@ -484,19 +525,19 @@ export declare function projectionDef(selectors?: CssSelectorList[], textSelecto
|
|
|
484
525
|
*/
|
|
485
526
|
export declare function projection(nodeIndex: number, selectorIndex?: number, attrs?: string[]): void;
|
|
486
527
|
/**
|
|
487
|
-
* Adds
|
|
528
|
+
* Adds LView or LContainer to the end of the current view tree.
|
|
488
529
|
*
|
|
489
530
|
* This structure will be used to traverse through nested views to remove listeners
|
|
490
531
|
* and call onDestroy callbacks.
|
|
491
532
|
*
|
|
492
|
-
* @param
|
|
493
|
-
* @param adjustedHostIndex Index of the view's host node in
|
|
494
|
-
* @param state The
|
|
533
|
+
* @param lView The view where LView or LContainer should be added
|
|
534
|
+
* @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header
|
|
535
|
+
* @param state The LView or LContainer to add to the view tree
|
|
495
536
|
* @returns The state passed in
|
|
496
537
|
*/
|
|
497
|
-
export declare function addToViewTree<T extends
|
|
538
|
+
export declare function addToViewTree<T extends LView | LContainer>(lView: LView, adjustedHostIndex: number, state: T): T;
|
|
498
539
|
/** Marks current view and all ancestors dirty */
|
|
499
|
-
export declare function markViewDirty(
|
|
540
|
+
export declare function markViewDirty(lView: LView): void;
|
|
500
541
|
/**
|
|
501
542
|
* Used to schedule change detection on the whole application.
|
|
502
543
|
*
|
|
@@ -536,12 +577,13 @@ export declare function tick<T>(component: T): void;
|
|
|
536
577
|
* @param component The component which the change detection should be performed on.
|
|
537
578
|
*/
|
|
538
579
|
export declare function detectChanges<T>(component: T): void;
|
|
580
|
+
export declare function detectChangesInternal<T>(view: LView, context: T): void;
|
|
539
581
|
/**
|
|
540
582
|
* Synchronously perform change detection on a root view and its components.
|
|
541
583
|
*
|
|
542
|
-
* @param
|
|
584
|
+
* @param lView The view which the change detection should be performed on.
|
|
543
585
|
*/
|
|
544
|
-
export declare function detectChangesInRootView(
|
|
586
|
+
export declare function detectChangesInRootView(lView: LView): void;
|
|
545
587
|
/**
|
|
546
588
|
* Checks the change detector and its children, and throws if any changes are detected.
|
|
547
589
|
*
|
|
@@ -556,9 +598,11 @@ export declare function checkNoChanges<T>(component: T): void;
|
|
|
556
598
|
* This is used in development mode to verify that running change detection doesn't
|
|
557
599
|
* introduce other changes.
|
|
558
600
|
*
|
|
559
|
-
* @param
|
|
601
|
+
* @param lView The view which the change detection should be checked on.
|
|
560
602
|
*/
|
|
561
|
-
export declare function checkNoChangesInRootView(
|
|
603
|
+
export declare function checkNoChangesInRootView(lView: LView): void;
|
|
604
|
+
/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */
|
|
605
|
+
export declare function checkView<T>(hostView: LView, component: T): void;
|
|
562
606
|
/**
|
|
563
607
|
* Mark the component as dirty (needing change detection).
|
|
564
608
|
*
|
|
@@ -582,6 +626,12 @@ export declare function markDirty<T>(component: T): void;
|
|
|
582
626
|
* @param value Value to diff
|
|
583
627
|
*/
|
|
584
628
|
export declare function bind<T>(value: T): T | NO_CHANGE;
|
|
629
|
+
/**
|
|
630
|
+
* Allocates the necessary amount of slots for host vars.
|
|
631
|
+
*
|
|
632
|
+
* @param count Amount of vars to be allocated
|
|
633
|
+
*/
|
|
634
|
+
export declare function allocHostVars(count: number): void;
|
|
585
635
|
/**
|
|
586
636
|
* Create interpolation bindings with a variable number of expressions.
|
|
587
637
|
*
|
|
@@ -631,18 +681,6 @@ export declare function reference<T>(index: number): T;
|
|
|
631
681
|
export declare function loadQueryList<T>(queryListIdx: number): QueryList<T>;
|
|
632
682
|
/** Retrieves a value from current `viewData`. */
|
|
633
683
|
export declare function load<T>(index: number): T;
|
|
634
|
-
/** Gets the current binding value. */
|
|
635
|
-
export declare function getBinding(bindingIndex: number): any;
|
|
636
|
-
/** Updates binding if changed, then returns whether it was updated. */
|
|
637
|
-
export declare function bindingUpdated(bindingIndex: number, value: any): boolean;
|
|
638
|
-
/** Updates binding and returns the value. */
|
|
639
|
-
export declare function updateBinding(bindingIndex: number, value: any): any;
|
|
640
|
-
/** Updates 2 bindings if changed, then returns whether either was updated. */
|
|
641
|
-
export declare function bindingUpdated2(bindingIndex: number, exp1: any, exp2: any): boolean;
|
|
642
|
-
/** Updates 3 bindings if changed, then returns whether any was updated. */
|
|
643
|
-
export declare function bindingUpdated3(bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean;
|
|
644
|
-
/** Updates 4 bindings if changed, then returns whether any was updated. */
|
|
645
|
-
export declare function bindingUpdated4(bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean;
|
|
646
684
|
/**
|
|
647
685
|
* Returns the value associated to the given token from the injectors.
|
|
648
686
|
*
|
|
@@ -676,4 +714,11 @@ export declare function injectAttribute(attrNameToInject: string): string | null
|
|
|
676
714
|
*/
|
|
677
715
|
export declare function registerContentQuery<Q>(queryList: QueryList<Q>, currentDirectiveIndex: number): void;
|
|
678
716
|
export declare const CLEAN_PROMISE: Promise<null>;
|
|
679
|
-
|
|
717
|
+
/**
|
|
718
|
+
* Returns the current OpaqueViewState instance.
|
|
719
|
+
*
|
|
720
|
+
* Used in conjunction with the restoreView() instruction to save a snapshot
|
|
721
|
+
* of the current view and restore it when listeners are invoked. This allows
|
|
722
|
+
* walking the declaration view tree in listeners to get vars from parent views.
|
|
723
|
+
*/
|
|
724
|
+
export declare function getCurrentView(): OpaqueViewState;
|