@angular/core 7.1.0 → 7.1.4
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 +1 -1
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +48 -33
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +106 -98
- package/bundles/core.umd.min.js.map +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/core.externs.js +44 -34
- package/esm2015/core.js +1 -2
- package/esm2015/index.js +3 -4
- package/esm2015/public_api.js +3 -5
- package/esm2015/src/application_init.js +6 -6
- package/esm2015/src/application_module.js +6 -5
- package/esm2015/src/application_ref.js +31 -22
- 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 +51 -15
- package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +7 -6
- 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 +7 -4
- package/esm2015/src/debug/debug_node.js +4 -4
- 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 +6 -5
- package/esm2015/src/di/injector.js +55 -48
- package/esm2015/src/di/injector_compatibility.js +27 -20
- package/esm2015/src/di/metadata.js +22 -13
- package/esm2015/src/di/provider.js +137 -120
- package/esm2015/src/di/r3_injector.js +61 -38
- package/esm2015/src/di/reflective_errors.js +19 -13
- package/esm2015/src/di/reflective_injector.js +10 -15
- package/esm2015/src/di/reflective_key.js +3 -4
- 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 +3 -4
- 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 +5 -8
- package/esm2015/src/linker/component_factory.js +2 -3
- package/esm2015/src/linker/component_factory_resolver.js +4 -5
- 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 +2 -3
- package/esm2015/src/linker/query_list.js +12 -13
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +2 -3
- 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 +34 -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 +31 -26
- 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 +5 -3
- package/esm2015/src/render3/component.js +66 -64
- package/esm2015/src/render3/component_ref.js +24 -21
- package/esm2015/src/render3/context_discovery.js +37 -17
- package/esm2015/src/render3/debug.js +9 -6
- package/esm2015/src/render3/definition.js +28 -28
- package/esm2015/src/render3/di.js +66 -39
- package/esm2015/src/render3/di_setup.js +34 -14
- package/esm2015/src/render3/discovery_utils.js +16 -17
- package/esm2015/src/render3/errors.js +2 -3
- package/esm2015/src/render3/features/inherit_definition_feature.js +12 -8
- package/esm2015/src/render3/features/ng_onchanges_feature.js +5 -6
- 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 +19 -6
- package/esm2015/src/render3/global_utils_api.js +12 -6
- package/esm2015/src/render3/hooks.js +4 -5
- package/esm2015/src/render3/i18n.js +112 -89
- package/esm2015/src/render3/index.js +11 -3
- package/esm2015/src/render3/instructions.js +201 -150
- package/esm2015/src/render3/interfaces/container.js +27 -5
- package/esm2015/src/render3/interfaces/context.js +38 -36
- package/esm2015/src/render3/interfaces/definition.js +234 -261
- package/esm2015/src/render3/interfaces/i18n.js +154 -126
- package/esm2015/src/render3/interfaces/injector.js +93 -10
- package/esm2015/src/render3/interfaces/node.js +369 -373
- 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 +288 -117
- package/esm2015/src/render3/interfaces/sanitization.js +2 -6
- package/esm2015/src/render3/interfaces/styling.js +26 -6
- package/esm2015/src/render3/interfaces/view.js +326 -285
- package/esm2015/src/render3/jit/compiler_facade.js +10 -4
- package/esm2015/src/render3/jit/compiler_facade_interface.js +189 -152
- package/esm2015/src/render3/jit/directive.js +6 -6
- package/esm2015/src/render3/jit/environment.js +5 -5
- package/esm2015/src/render3/jit/injectable.js +6 -8
- package/esm2015/src/render3/jit/module.js +17 -13
- 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 +11 -10
- package/esm2015/src/render3/node_assert.js +2 -3
- package/esm2015/src/render3/node_manipulation.js +86 -73
- package/esm2015/src/render3/node_selector_matcher.js +13 -12
- package/esm2015/src/render3/pipe.js +4 -5
- package/esm2015/src/render3/players.js +11 -5
- package/esm2015/src/render3/pure_function.js +29 -3
- package/esm2015/src/render3/query.js +74 -70
- package/esm2015/src/render3/state.js +44 -33
- package/esm2015/src/render3/styling/class_and_style_bindings.js +62 -43
- package/esm2015/src/render3/styling/core_player_handler.js +2 -3
- package/esm2015/src/render3/styling/player_factory.js +3 -4
- package/esm2015/src/render3/styling/util.js +18 -13
- package/esm2015/src/render3/tokens.js +7 -6
- package/esm2015/src/render3/util.js +18 -16
- package/esm2015/src/render3/view_engine_compatibility.js +18 -18
- package/esm2015/src/render3/view_engine_compatibility_prebound.js +2 -3
- package/esm2015/src/render3/view_ref.js +7 -10
- package/esm2015/src/sanitization/bypass.js +29 -6
- package/esm2015/src/sanitization/html_sanitizer.js +41 -15
- package/esm2015/src/sanitization/inert_body.js +14 -12
- package/esm2015/src/sanitization/sanitization.js +7 -7
- 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 +47 -37
- 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/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 +7 -3
- 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 +24 -22
- package/esm2015/src/view/services.js +41 -31
- package/esm2015/src/view/text.js +5 -6
- package/esm2015/src/view/types.js +386 -324
- 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 +2 -3
- package/esm2015/testing/src/before_each.js +10 -4
- package/esm2015/testing/src/component_fixture.js +6 -7
- 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 +5 -7
- 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 +34 -27
- package/esm2015/testing/src/resolvers.js +9 -5
- package/esm2015/testing/src/test_bed.js +38 -34
- 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 +8 -9
- package/esm2015/testing/testing.js +1 -2
- package/esm5/core.js +1 -2
- 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 +1 -2
- 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 +1 -2
- package/esm5/src/debug/debug_node.js +1 -2
- package/esm5/src/di/defs.js +1 -2
- 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 +7 -8
- package/esm5/src/di/injector_compatibility.js +30 -10
- package/esm5/src/di/metadata.js +1 -2
- package/esm5/src/di/provider.js +1 -2
- package/esm5/src/di/r3_injector.js +5 -6
- 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 +2 -3
- 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 +1 -2
- 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 +1 -2
- package/esm5/src/render3/component.js +1 -2
- package/esm5/src/render3/component_ref.js +1 -2
- package/esm5/src/render3/context_discovery.js +1 -2
- package/esm5/src/render3/debug.js +1 -2
- package/esm5/src/render3/definition.js +1 -2
- package/esm5/src/render3/di.js +12 -13
- package/esm5/src/render3/di_setup.js +1 -2
- package/esm5/src/render3/discovery_utils.js +1 -2
- package/esm5/src/render3/errors.js +1 -2
- package/esm5/src/render3/features/inherit_definition_feature.js +1 -2
- package/esm5/src/render3/features/ng_onchanges_feature.js +1 -2
- 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 +1 -2
- package/esm5/src/render3/global_utils_api.js +1 -2
- package/esm5/src/render3/hooks.js +1 -2
- package/esm5/src/render3/i18n.js +1 -2
- package/esm5/src/render3/index.js +1 -2
- package/esm5/src/render3/instructions.js +3 -3
- package/esm5/src/render3/interfaces/container.js +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/esm5/src/render3/jit/environment.js +1 -2
- package/esm5/src/render3/jit/injectable.js +1 -2
- package/esm5/src/render3/jit/module.js +1 -2
- 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 +1 -2
- package/esm5/src/render3/node_assert.js +1 -2
- package/esm5/src/render3/node_manipulation.js +1 -2
- package/esm5/src/render3/node_selector_matcher.js +1 -2
- package/esm5/src/render3/pipe.js +1 -2
- package/esm5/src/render3/players.js +1 -2
- package/esm5/src/render3/pure_function.js +1 -2
- package/esm5/src/render3/query.js +1 -2
- package/esm5/src/render3/state.js +1 -2
- package/esm5/src/render3/styling/class_and_style_bindings.js +1 -2
- 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 +1 -2
- package/esm5/src/render3/tokens.js +1 -2
- package/esm5/src/render3/util.js +1 -2
- package/esm5/src/render3/view_engine_compatibility.js +3 -3
- package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -2
- package/esm5/src/render3/view_ref.js +1 -2
- package/esm5/src/sanitization/bypass.js +1 -2
- package/esm5/src/sanitization/html_sanitizer.js +1 -2
- package/esm5/src/sanitization/inert_body.js +1 -2
- package/esm5/src/sanitization/sanitization.js +1 -2
- 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/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 +5 -5
- 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 +1 -2
- package/esm5/testing/src/resolvers.js +1 -2
- 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 +1 -2
- package/esm5/testing/testing.js +1 -2
- package/fesm2015/core.js +2040 -1354
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +123 -89
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +55 -34
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/fesm5/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/di/injector_compatibility.d.ts +1 -1
- package/testing.d.ts +5 -0
- package/npm_package.es6/external/ngdeps/node_modules/tslib/tslib.d.ts +0 -33
package/bundles/core.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.1.
|
|
2
|
+
* @license Angular v7.1.4
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1197,6 +1197,21 @@
|
|
|
1197
1197
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1198
1198
|
* found in the LICENSE file at https://angular.io/license
|
|
1199
1199
|
*/
|
|
1200
|
+
(function (InjectFlags) {
|
|
1201
|
+
// TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.
|
|
1202
|
+
InjectFlags[InjectFlags["Default"] = 0] = "Default";
|
|
1203
|
+
/**
|
|
1204
|
+
* Specifies that an injector should retrieve a dependency from any injector until reaching the
|
|
1205
|
+
* host element of the current component. (Only used with Element Injector)
|
|
1206
|
+
*/
|
|
1207
|
+
InjectFlags[InjectFlags["Host"] = 1] = "Host";
|
|
1208
|
+
/** Don't descend into ancestors of the node requesting injection. */
|
|
1209
|
+
InjectFlags[InjectFlags["Self"] = 2] = "Self";
|
|
1210
|
+
/** Skip the node that is requesting injection. */
|
|
1211
|
+
InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf";
|
|
1212
|
+
/** Inject `defaultValue` instead if token not found. */
|
|
1213
|
+
InjectFlags[InjectFlags["Optional"] = 8] = "Optional";
|
|
1214
|
+
})(exports.InjectFlags || (exports.InjectFlags = {}));
|
|
1200
1215
|
/**
|
|
1201
1216
|
* Current injector value used by `inject`.
|
|
1202
1217
|
* - `undefined`: it is an error to call `inject`
|
|
@@ -1228,7 +1243,7 @@
|
|
|
1228
1243
|
return previous;
|
|
1229
1244
|
}
|
|
1230
1245
|
function injectInjectorOnly(token, flags) {
|
|
1231
|
-
if (flags === void 0) { flags =
|
|
1246
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
1232
1247
|
if (_currentInjector === undefined) {
|
|
1233
1248
|
throw new Error("inject() must be called from an injection context");
|
|
1234
1249
|
}
|
|
@@ -1236,11 +1251,11 @@
|
|
|
1236
1251
|
return injectRootLimpMode(token, undefined, flags);
|
|
1237
1252
|
}
|
|
1238
1253
|
else {
|
|
1239
|
-
return _currentInjector.get(token, flags &
|
|
1254
|
+
return _currentInjector.get(token, flags & exports.InjectFlags.Optional ? null : undefined, flags);
|
|
1240
1255
|
}
|
|
1241
1256
|
}
|
|
1242
1257
|
function inject(token, flags) {
|
|
1243
|
-
if (flags === void 0) { flags =
|
|
1258
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
1244
1259
|
return (_injectImplementation || injectInjectorOnly)(token, flags);
|
|
1245
1260
|
}
|
|
1246
1261
|
/**
|
|
@@ -1256,7 +1271,7 @@
|
|
|
1256
1271
|
return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
|
|
1257
1272
|
injectableDef.value;
|
|
1258
1273
|
}
|
|
1259
|
-
if (flags &
|
|
1274
|
+
if (flags & exports.InjectFlags.Optional)
|
|
1260
1275
|
return null;
|
|
1261
1276
|
if (notFoundValue !== undefined)
|
|
1262
1277
|
return notFoundValue;
|
|
@@ -1271,17 +1286,17 @@
|
|
|
1271
1286
|
throw new Error('Arguments array must have arguments.');
|
|
1272
1287
|
}
|
|
1273
1288
|
var type = undefined;
|
|
1274
|
-
var flags =
|
|
1289
|
+
var flags = exports.InjectFlags.Default;
|
|
1275
1290
|
for (var j = 0; j < arg.length; j++) {
|
|
1276
1291
|
var meta = arg[j];
|
|
1277
1292
|
if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {
|
|
1278
|
-
flags |=
|
|
1293
|
+
flags |= exports.InjectFlags.Optional;
|
|
1279
1294
|
}
|
|
1280
1295
|
else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {
|
|
1281
|
-
flags |=
|
|
1296
|
+
flags |= exports.InjectFlags.SkipSelf;
|
|
1282
1297
|
}
|
|
1283
1298
|
else if (meta instanceof Self || meta.ngMetadataName === 'Self') {
|
|
1284
|
-
flags |=
|
|
1299
|
+
flags |= exports.InjectFlags.Self;
|
|
1285
1300
|
}
|
|
1286
1301
|
else if (meta instanceof Inject) {
|
|
1287
1302
|
type = meta.token;
|
|
@@ -2627,7 +2642,7 @@
|
|
|
2627
2642
|
* @returns the value from the injector or `null` when not found
|
|
2628
2643
|
*/
|
|
2629
2644
|
function getOrCreateInjectable(tNode, lViewData, token, flags, notFoundValue) {
|
|
2630
|
-
if (flags === void 0) { flags =
|
|
2645
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
2631
2646
|
var bloomHash = bloomHashBitOrFactory(token);
|
|
2632
2647
|
// If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
|
|
2633
2648
|
// so just call the factory function to create it.
|
|
@@ -2637,7 +2652,7 @@
|
|
|
2637
2652
|
setTNodeAndViewData(tNode, lViewData);
|
|
2638
2653
|
try {
|
|
2639
2654
|
var value = bloomHash();
|
|
2640
|
-
if (value == null && !(flags &
|
|
2655
|
+
if (value == null && !(flags & exports.InjectFlags.Optional)) {
|
|
2641
2656
|
throw new Error("No provider for " + stringify$1(token));
|
|
2642
2657
|
}
|
|
2643
2658
|
else {
|
|
@@ -2657,7 +2672,7 @@
|
|
|
2657
2672
|
var parentLocation = NO_PARENT_INJECTOR;
|
|
2658
2673
|
// If we should skip this injector, or if there is no injector on this node, start by searching
|
|
2659
2674
|
// the parent injector.
|
|
2660
|
-
if (injectorIndex === -1 || flags &
|
|
2675
|
+
if (injectorIndex === -1 || flags & exports.InjectFlags.SkipSelf) {
|
|
2661
2676
|
parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lViewData) :
|
|
2662
2677
|
lViewData[injectorIndex + PARENT_INJECTOR];
|
|
2663
2678
|
if (!shouldSearchParent(flags, parentLocation)) {
|
|
@@ -2700,20 +2715,20 @@
|
|
|
2700
2715
|
}
|
|
2701
2716
|
}
|
|
2702
2717
|
}
|
|
2703
|
-
if (flags &
|
|
2718
|
+
if (flags & exports.InjectFlags.Optional && notFoundValue === undefined) {
|
|
2704
2719
|
// This must be set or the NullInjector will throw for optional deps
|
|
2705
2720
|
notFoundValue = null;
|
|
2706
2721
|
}
|
|
2707
|
-
if ((flags & (
|
|
2722
|
+
if ((flags & (exports.InjectFlags.Self | exports.InjectFlags.Host)) === 0) {
|
|
2708
2723
|
var moduleInjector = lViewData[INJECTOR];
|
|
2709
2724
|
if (moduleInjector) {
|
|
2710
|
-
return moduleInjector.get(token, notFoundValue, flags &
|
|
2725
|
+
return moduleInjector.get(token, notFoundValue, flags & exports.InjectFlags.Optional);
|
|
2711
2726
|
}
|
|
2712
2727
|
else {
|
|
2713
|
-
return injectRootLimpMode(token, notFoundValue, flags &
|
|
2728
|
+
return injectRootLimpMode(token, notFoundValue, flags & exports.InjectFlags.Optional);
|
|
2714
2729
|
}
|
|
2715
2730
|
}
|
|
2716
|
-
if (flags &
|
|
2731
|
+
if (flags & exports.InjectFlags.Optional) {
|
|
2717
2732
|
return notFoundValue;
|
|
2718
2733
|
}
|
|
2719
2734
|
else {
|
|
@@ -2835,8 +2850,8 @@
|
|
|
2835
2850
|
}
|
|
2836
2851
|
/** Returns true if flags prevent parent injector from being searched for tokens */
|
|
2837
2852
|
function shouldSearchParent(flags, parentLocation) {
|
|
2838
|
-
return !(flags &
|
|
2839
|
-
(flags &
|
|
2853
|
+
return !(flags & exports.InjectFlags.Self ||
|
|
2854
|
+
(flags & exports.InjectFlags.Host &&
|
|
2840
2855
|
(parentLocation & 32768 /* AcrossHostBoundary */)));
|
|
2841
2856
|
}
|
|
2842
2857
|
function injectInjector() {
|
|
@@ -3353,7 +3368,7 @@
|
|
|
3353
3368
|
recursivelyProcessProviders(records, providers);
|
|
3354
3369
|
}
|
|
3355
3370
|
StaticInjector.prototype.get = function (token, notFoundValue, flags) {
|
|
3356
|
-
if (flags === void 0) { flags =
|
|
3371
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
3357
3372
|
var record = this._records.get(token);
|
|
3358
3373
|
try {
|
|
3359
3374
|
return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);
|
|
@@ -3478,7 +3493,7 @@
|
|
|
3478
3493
|
function resolveToken(token, record, records, parent, notFoundValue, flags) {
|
|
3479
3494
|
var _a;
|
|
3480
3495
|
var value;
|
|
3481
|
-
if (record && !(flags &
|
|
3496
|
+
if (record && !(flags & exports.InjectFlags.SkipSelf)) {
|
|
3482
3497
|
// If we don't have a record, this implies that we don't own the provider hence don't know how
|
|
3483
3498
|
// to resolve it.
|
|
3484
3499
|
value = record.value;
|
|
@@ -3508,14 +3523,14 @@
|
|
|
3508
3523
|
records,
|
|
3509
3524
|
// If we don't know how to resolve dependency and we should not check parent for it,
|
|
3510
3525
|
// than pass in Null injector.
|
|
3511
|
-
!childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND,
|
|
3526
|
+
!childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, exports.InjectFlags.Default));
|
|
3512
3527
|
}
|
|
3513
3528
|
}
|
|
3514
3529
|
record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);
|
|
3515
3530
|
}
|
|
3516
3531
|
}
|
|
3517
|
-
else if (!(flags &
|
|
3518
|
-
value = parent.get(token, notFoundValue,
|
|
3532
|
+
else if (!(flags & exports.InjectFlags.Self)) {
|
|
3533
|
+
value = parent.get(token, notFoundValue, exports.InjectFlags.Default);
|
|
3519
3534
|
}
|
|
3520
3535
|
return value;
|
|
3521
3536
|
}
|
|
@@ -7700,7 +7715,7 @@
|
|
|
7700
7715
|
return bindingUpdated2(bindingIndex + 2, exp3, exp4) || different;
|
|
7701
7716
|
}
|
|
7702
7717
|
function directiveInject(token, flags) {
|
|
7703
|
-
if (flags === void 0) { flags =
|
|
7718
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
7704
7719
|
token = resolveForwardRef(token);
|
|
7705
7720
|
return getOrCreateInjectable(getPreviousOrParentTNode(), getViewData(), token, flags);
|
|
7706
7721
|
}
|
|
@@ -8123,7 +8138,7 @@
|
|
|
8123
8138
|
this._hostView = _hostView;
|
|
8124
8139
|
}
|
|
8125
8140
|
NodeInjector$$1.prototype.get = function (token, notFoundValue) {
|
|
8126
|
-
return getOrCreateInjectable(this._tNode, this._hostView, token,
|
|
8141
|
+
return getOrCreateInjectable(this._tNode, this._hostView, token, exports.InjectFlags.Default, notFoundValue);
|
|
8127
8142
|
};
|
|
8128
8143
|
return NodeInjector$$1;
|
|
8129
8144
|
}());
|
|
@@ -9164,13 +9179,13 @@
|
|
|
9164
9179
|
};
|
|
9165
9180
|
R3Injector.prototype.get = function (token, notFoundValue, flags) {
|
|
9166
9181
|
if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
|
|
9167
|
-
if (flags === void 0) { flags =
|
|
9182
|
+
if (flags === void 0) { flags = exports.InjectFlags.Default; }
|
|
9168
9183
|
this.assertNotDestroyed();
|
|
9169
9184
|
// Set the injection context.
|
|
9170
9185
|
var previousInjector = setCurrentInjector(this);
|
|
9171
9186
|
try {
|
|
9172
9187
|
// Check for the SkipSelf flag.
|
|
9173
|
-
if (!(flags &
|
|
9188
|
+
if (!(flags & exports.InjectFlags.SkipSelf)) {
|
|
9174
9189
|
// SkipSelf isn't set, check if the record belongs to this injector.
|
|
9175
9190
|
var record = this.records.get(token);
|
|
9176
9191
|
if (record === undefined) {
|
|
@@ -9191,7 +9206,7 @@
|
|
|
9191
9206
|
}
|
|
9192
9207
|
// Select the next injector based on the Self flag - if self is set, the next injector is
|
|
9193
9208
|
// the NullInjector, otherwise it's the parent.
|
|
9194
|
-
var nextInjector = !(flags &
|
|
9209
|
+
var nextInjector = !(flags & exports.InjectFlags.Self) ? this.parent : getNullInjector();
|
|
9195
9210
|
return nextInjector.get(token, notFoundValue);
|
|
9196
9211
|
}
|
|
9197
9212
|
finally {
|
|
@@ -9928,7 +9943,7 @@
|
|
|
9928
9943
|
/**
|
|
9929
9944
|
* @publicApi
|
|
9930
9945
|
*/
|
|
9931
|
-
var VERSION = new Version('7.1.
|
|
9946
|
+
var VERSION = new Version('7.1.4');
|
|
9932
9947
|
|
|
9933
9948
|
/**
|
|
9934
9949
|
* @license
|
|
@@ -20468,12 +20483,12 @@
|
|
|
20468
20483
|
}
|
|
20469
20484
|
NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {
|
|
20470
20485
|
if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
|
|
20471
|
-
if (injectFlags === void 0) { injectFlags =
|
|
20486
|
+
if (injectFlags === void 0) { injectFlags = exports.InjectFlags.Default; }
|
|
20472
20487
|
var flags = 0 /* None */;
|
|
20473
|
-
if (injectFlags &
|
|
20488
|
+
if (injectFlags & exports.InjectFlags.SkipSelf) {
|
|
20474
20489
|
flags |= 1 /* SkipSelf */;
|
|
20475
20490
|
}
|
|
20476
|
-
else if (injectFlags &
|
|
20491
|
+
else if (injectFlags & exports.InjectFlags.Self) {
|
|
20477
20492
|
flags |= 4 /* Self */;
|
|
20478
20493
|
}
|
|
20479
20494
|
return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);
|