@angular/core 7.2.0-rc.0 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +193 -131
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +11 -11
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +1777 -1329
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +111 -125
- package/bundles/core.umd.min.js.map +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/core.js +1 -1
- package/esm2015/index.js +2 -2
- package/esm2015/public_api.js +2 -2
- package/esm2015/src/application_init.js +1 -1
- package/esm2015/src/application_module.js +1 -1
- package/esm2015/src/application_ref.js +1 -1
- package/esm2015/src/application_tokens.js +1 -1
- package/esm2015/src/change_detection/change_detection.js +1 -1
- package/esm2015/src/change_detection/change_detection_util.js +1 -1
- package/esm2015/src/change_detection/change_detector_ref.js +1 -1
- package/esm2015/src/change_detection/constants.js +3 -3
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +1 -1
- package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +1 -1
- package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm2015/src/change_detection/differs/keyvalue_differs.js +1 -1
- package/esm2015/src/change_detection/pipe_transform.js +1 -1
- package/esm2015/src/change_detection.js +1 -1
- package/esm2015/src/codegen_private_exports.js +1 -1
- package/esm2015/src/console.js +1 -1
- package/esm2015/src/core.js +2 -2
- package/esm2015/src/core_private_export.js +1 -1
- package/esm2015/src/core_render3_private_export.js +2 -2
- package/esm2015/src/debug/debug_node.js +6 -6
- package/esm2015/src/di/defs.js +1 -1
- package/esm2015/src/di/forward_ref.js +1 -1
- package/esm2015/src/di/injectable.js +1 -1
- package/esm2015/src/di/injection_token.js +2 -2
- package/esm2015/src/di/injector.js +1 -1
- package/esm2015/src/di/injector_compatibility.js +1 -1
- package/esm2015/src/di/metadata.js +1 -1
- package/esm2015/src/di/provider.js +1 -1
- package/esm2015/src/di/r3_injector.js +1 -1
- package/esm2015/src/di/reflective_errors.js +1 -1
- package/esm2015/src/di/reflective_injector.js +1 -1
- package/esm2015/src/di/reflective_key.js +1 -1
- package/esm2015/src/di/reflective_provider.js +1 -1
- package/esm2015/src/di/scope.js +1 -1
- package/esm2015/src/di/util.js +1 -1
- package/esm2015/src/di.js +1 -1
- package/esm2015/src/error_handler.js +1 -1
- package/esm2015/src/errors.js +1 -1
- package/esm2015/src/event_emitter.js +1 -1
- package/esm2015/src/i18n/tokens.js +1 -1
- package/esm2015/src/is_dev_mode.js +1 -1
- package/esm2015/src/ivy_switch.js +1 -1
- package/esm2015/src/linker/compiler.js +1 -1
- package/esm2015/src/linker/component_factory.js +1 -1
- package/esm2015/src/linker/component_factory_resolver.js +1 -1
- package/esm2015/src/linker/element_ref.js +1 -1
- package/esm2015/src/linker/ng_module_factory.js +1 -1
- package/esm2015/src/linker/ng_module_factory_loader.js +1 -1
- package/esm2015/src/linker/query_list.js +1 -1
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +1 -1
- package/esm2015/src/linker/template_ref.js +6 -4
- package/esm2015/src/linker/view_container_ref.js +1 -1
- package/esm2015/src/linker/view_ref.js +1 -1
- package/esm2015/src/linker.js +1 -1
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/metadata/directives.js +1 -1
- package/esm2015/src/metadata/lifecycle_hooks.js +1 -1
- package/esm2015/src/metadata/ng_module.js +1 -1
- package/esm2015/src/metadata/resource_loading.js +1 -1
- package/esm2015/src/metadata/view.js +1 -1
- package/esm2015/src/metadata.js +1 -1
- package/esm2015/src/platform_core_providers.js +1 -1
- package/esm2015/src/profile/profile.js +1 -1
- package/esm2015/src/profile/wtf_impl.js +1 -1
- package/esm2015/src/r3_symbols.js +1 -1
- package/esm2015/src/reflection/platform_reflection_capabilities.js +1 -1
- package/esm2015/src/reflection/reflection.js +1 -1
- package/esm2015/src/reflection/reflection_capabilities.js +1 -1
- package/esm2015/src/reflection/reflector.js +1 -1
- package/esm2015/src/reflection/types.js +1 -1
- package/esm2015/src/render/api.js +1 -1
- package/esm2015/src/render.js +1 -1
- package/esm2015/src/render3/assert.js +1 -1
- package/esm2015/src/render3/bindings.js +3 -3
- package/esm2015/src/render3/component.js +8 -6
- package/esm2015/src/render3/component_ref.js +5 -5
- package/esm2015/src/render3/context_discovery.js +2 -2
- package/esm2015/src/render3/definition.js +3 -10
- package/esm2015/src/render3/di.js +107 -93
- package/esm2015/src/render3/di_setup.js +1 -1
- package/esm2015/src/render3/discovery_utils.js +5 -5
- package/esm2015/src/render3/empty.js +28 -0
- package/esm2015/src/render3/errors.js +1 -1
- package/esm2015/src/render3/features/inherit_definition_feature.js +3 -3
- package/esm2015/src/render3/features/ng_onchanges_feature.js +1 -1
- package/esm2015/src/render3/features/providers_feature.js +1 -1
- package/esm2015/src/render3/fields.js +1 -1
- package/esm2015/src/render3/global_utils.js +1 -1
- package/esm2015/src/render3/global_utils_api.js +1 -1
- package/esm2015/src/render3/hooks.js +14 -12
- package/esm2015/src/render3/i18n.js +3 -3
- package/esm2015/src/render3/index.js +2 -2
- package/esm2015/src/render3/instructions.js +319 -370
- package/esm2015/src/render3/interfaces/container.js +10 -1
- package/esm2015/src/render3/interfaces/context.js +1 -1
- package/esm2015/src/render3/interfaces/definition.js +1 -6
- package/esm2015/src/render3/interfaces/i18n.js +1 -1
- package/esm2015/src/render3/interfaces/injector.js +1 -2
- package/esm2015/src/render3/interfaces/node.js +37 -2
- package/esm2015/src/render3/interfaces/player.js +1 -1
- package/esm2015/src/render3/interfaces/projection.js +1 -1
- package/esm2015/src/render3/interfaces/query.js +1 -1
- package/esm2015/src/render3/interfaces/renderer.js +1 -1
- package/esm2015/src/render3/interfaces/sanitization.js +1 -1
- package/esm2015/src/render3/interfaces/styling.js +304 -113
- package/esm2015/src/render3/interfaces/view.js +15 -7
- package/esm2015/src/render3/jit/compiler_facade.js +1 -1
- package/esm2015/src/render3/jit/compiler_facade_interface.js +3 -1
- package/esm2015/src/render3/jit/directive.js +6 -7
- package/esm2015/src/render3/jit/environment.js +3 -1
- package/esm2015/src/render3/jit/injectable.js +1 -1
- package/esm2015/src/render3/jit/module.js +11 -9
- package/esm2015/src/render3/jit/pipe.js +1 -1
- package/esm2015/src/render3/jit/util.js +1 -1
- package/esm2015/src/render3/metadata.js +1 -1
- package/esm2015/src/render3/ng_dev_mode.js +1 -1
- package/esm2015/src/render3/ng_module_ref.js +1 -1
- package/esm2015/src/render3/node_assert.js +1 -1
- package/esm2015/src/render3/node_manipulation.js +5 -22
- package/esm2015/src/render3/node_selector_matcher.js +3 -3
- package/esm2015/src/render3/pipe.js +2 -2
- package/esm2015/src/render3/players.js +1 -1
- package/esm2015/src/render3/pure_function.js +3 -3
- package/esm2015/src/render3/query.js +3 -3
- package/esm2015/src/render3/state.js +14 -20
- package/esm2015/src/render3/styling/class_and_style_bindings.js +893 -213
- package/esm2015/src/render3/styling/core_player_handler.js +1 -1
- package/esm2015/src/render3/styling/player_factory.js +1 -1
- package/esm2015/src/render3/styling/util.js +37 -14
- package/esm2015/src/render3/tokens.js +1 -1
- package/esm2015/src/render3/util.js +21 -5
- package/esm2015/src/render3/view_engine_compatibility.js +5 -6
- package/esm2015/src/render3/view_engine_compatibility_prebound.js +1 -1
- package/esm2015/src/render3/view_ref.js +6 -16
- package/esm2015/src/sanitization/bypass.js +1 -1
- package/esm2015/src/sanitization/html_sanitizer.js +2 -2
- package/esm2015/src/sanitization/inert_body.js +4 -4
- package/esm2015/src/sanitization/sanitization.js +1 -1
- package/esm2015/src/sanitization/security.js +1 -1
- package/esm2015/src/sanitization/style_sanitizer.js +1 -1
- package/esm2015/src/sanitization/url_sanitizer.js +1 -1
- package/esm2015/src/testability/testability.js +1 -1
- package/esm2015/src/type.js +1 -1
- package/esm2015/src/util/decorators.js +1 -1
- package/esm2015/src/util/lang.js +1 -1
- package/esm2015/src/util/ng_reflect.js +1 -1
- package/esm2015/src/util/noop.js +1 -1
- package/esm2015/src/util/property.js +1 -1
- package/esm2015/src/util.js +1 -1
- package/esm2015/src/version.js +2 -2
- package/esm2015/src/view/element.js +1 -1
- package/esm2015/src/view/entrypoint.js +1 -1
- package/esm2015/src/view/errors.js +1 -1
- package/esm2015/src/view/index.js +1 -1
- package/esm2015/src/view/ng_content.js +1 -1
- package/esm2015/src/view/ng_module.js +1 -1
- package/esm2015/src/view/provider.js +1 -1
- package/esm2015/src/view/pure_expression.js +1 -1
- package/esm2015/src/view/query.js +1 -1
- package/esm2015/src/view/refs.js +1 -1
- package/esm2015/src/view/services.js +1 -1
- package/esm2015/src/view/text.js +1 -1
- package/esm2015/src/view/types.js +1 -1
- package/esm2015/src/view/util.js +1 -1
- package/esm2015/src/view/view.js +1 -1
- package/esm2015/src/view/view_attach.js +1 -1
- package/esm2015/src/zone/ng_zone.js +1 -1
- package/esm2015/src/zone.js +1 -1
- package/esm2015/testing/index.js +1 -1
- package/esm2015/testing/public_api.js +1 -1
- package/esm2015/testing/src/async.js +1 -1
- package/esm2015/testing/src/async_fallback.js +1 -1
- package/esm2015/testing/src/async_test_completer.js +1 -1
- package/esm2015/testing/src/before_each.js +1 -1
- package/esm2015/testing/src/component_fixture.js +1 -1
- package/esm2015/testing/src/fake_async.js +1 -1
- package/esm2015/testing/src/fake_async_fallback.js +1 -1
- package/esm2015/testing/src/lang_utils.js +1 -1
- package/esm2015/testing/src/logger.js +1 -1
- package/esm2015/testing/src/metadata_override.js +1 -1
- package/esm2015/testing/src/metadata_overrider.js +1 -1
- package/esm2015/testing/src/ng_zone_mock.js +1 -1
- package/esm2015/testing/src/private_export_testing.js +1 -1
- package/esm2015/testing/src/r3_test_bed.js +234 -152
- package/esm2015/testing/src/resolvers.js +12 -5
- package/esm2015/testing/src/test_bed.js +1 -1
- package/esm2015/testing/src/test_bed_common.js +1 -1
- package/esm2015/testing/src/test_compiler.js +1 -1
- package/esm2015/testing/src/testing.js +1 -1
- package/esm2015/testing/src/testing_internal.js +2 -2
- package/esm2015/testing/testing.js +1 -1
- package/esm5/core.js +1 -1
- package/esm5/index.js +1 -1
- package/esm5/public_api.js +1 -1
- package/esm5/src/application_init.js +1 -1
- package/esm5/src/application_module.js +1 -1
- package/esm5/src/application_ref.js +1 -1
- package/esm5/src/application_tokens.js +1 -1
- package/esm5/src/change_detection/change_detection.js +1 -1
- package/esm5/src/change_detection/change_detection_util.js +1 -1
- package/esm5/src/change_detection/change_detector_ref.js +1 -1
- package/esm5/src/change_detection/constants.js +3 -3
- package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -1
- package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -1
- package/esm5/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -1
- package/esm5/src/change_detection/pipe_transform.js +1 -1
- package/esm5/src/change_detection.js +1 -1
- package/esm5/src/codegen_private_exports.js +1 -1
- package/esm5/src/console.js +1 -1
- package/esm5/src/core.js +1 -1
- package/esm5/src/core_private_export.js +1 -1
- package/esm5/src/core_render3_private_export.js +2 -2
- package/esm5/src/debug/debug_node.js +6 -6
- package/esm5/src/di/defs.js +1 -1
- package/esm5/src/di/forward_ref.js +1 -1
- package/esm5/src/di/injectable.js +1 -1
- package/esm5/src/di/injection_token.js +2 -2
- package/esm5/src/di/injector.js +1 -1
- package/esm5/src/di/injector_compatibility.js +1 -1
- package/esm5/src/di/metadata.js +1 -1
- package/esm5/src/di/provider.js +1 -1
- package/esm5/src/di/r3_injector.js +1 -1
- package/esm5/src/di/reflective_errors.js +1 -1
- package/esm5/src/di/reflective_injector.js +1 -1
- package/esm5/src/di/reflective_key.js +1 -1
- package/esm5/src/di/reflective_provider.js +1 -1
- package/esm5/src/di/scope.js +1 -1
- package/esm5/src/di/util.js +1 -1
- package/esm5/src/di.js +1 -1
- package/esm5/src/error_handler.js +1 -1
- package/esm5/src/errors.js +1 -1
- package/esm5/src/event_emitter.js +1 -1
- package/esm5/src/i18n/tokens.js +1 -1
- package/esm5/src/is_dev_mode.js +1 -1
- package/esm5/src/ivy_switch.js +1 -1
- package/esm5/src/linker/compiler.js +1 -1
- package/esm5/src/linker/component_factory.js +1 -1
- package/esm5/src/linker/component_factory_resolver.js +1 -1
- package/esm5/src/linker/element_ref.js +1 -1
- package/esm5/src/linker/ng_module_factory.js +1 -1
- package/esm5/src/linker/ng_module_factory_loader.js +1 -1
- package/esm5/src/linker/query_list.js +1 -1
- package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -1
- package/esm5/src/linker/template_ref.js +1 -1
- package/esm5/src/linker/view_container_ref.js +1 -1
- package/esm5/src/linker/view_ref.js +1 -1
- package/esm5/src/linker.js +1 -1
- package/esm5/src/metadata/di.js +1 -1
- package/esm5/src/metadata/directives.js +1 -1
- package/esm5/src/metadata/lifecycle_hooks.js +1 -1
- package/esm5/src/metadata/ng_module.js +1 -1
- package/esm5/src/metadata/resource_loading.js +1 -1
- package/esm5/src/metadata/view.js +1 -1
- package/esm5/src/metadata.js +1 -1
- package/esm5/src/platform_core_providers.js +1 -1
- package/esm5/src/profile/profile.js +1 -1
- package/esm5/src/profile/wtf_impl.js +1 -1
- package/esm5/src/r3_symbols.js +1 -1
- package/esm5/src/reflection/platform_reflection_capabilities.js +1 -1
- package/esm5/src/reflection/reflection.js +1 -1
- package/esm5/src/reflection/reflection_capabilities.js +1 -1
- package/esm5/src/reflection/reflector.js +1 -1
- package/esm5/src/reflection/types.js +1 -1
- package/esm5/src/render/api.js +1 -1
- package/esm5/src/render.js +1 -1
- package/esm5/src/render3/assert.js +1 -1
- package/esm5/src/render3/bindings.js +3 -3
- package/esm5/src/render3/component.js +8 -6
- package/esm5/src/render3/component_ref.js +5 -5
- package/esm5/src/render3/context_discovery.js +2 -2
- package/esm5/src/render3/definition.js +3 -8
- package/esm5/src/render3/di.js +94 -84
- package/esm5/src/render3/di_setup.js +1 -1
- package/esm5/src/render3/discovery_utils.js +5 -5
- package/esm5/src/render3/empty.js +22 -0
- package/esm5/src/render3/errors.js +1 -1
- package/esm5/src/render3/features/inherit_definition_feature.js +3 -3
- package/esm5/src/render3/features/ng_onchanges_feature.js +1 -1
- package/esm5/src/render3/features/providers_feature.js +1 -1
- package/esm5/src/render3/fields.js +1 -1
- package/esm5/src/render3/global_utils.js +1 -1
- package/esm5/src/render3/global_utils_api.js +1 -1
- package/esm5/src/render3/hooks.js +11 -9
- package/esm5/src/render3/i18n.js +3 -3
- package/esm5/src/render3/index.js +2 -2
- package/esm5/src/render3/instructions.js +282 -282
- package/esm5/src/render3/interfaces/container.js +9 -1
- package/esm5/src/render3/interfaces/context.js +1 -1
- package/esm5/src/render3/interfaces/definition.js +1 -1
- package/esm5/src/render3/interfaces/i18n.js +1 -1
- package/esm5/src/render3/interfaces/injector.js +1 -1
- package/esm5/src/render3/interfaces/node.js +1 -1
- package/esm5/src/render3/interfaces/player.js +1 -1
- package/esm5/src/render3/interfaces/projection.js +1 -1
- package/esm5/src/render3/interfaces/query.js +1 -1
- package/esm5/src/render3/interfaces/renderer.js +1 -1
- package/esm5/src/render3/interfaces/sanitization.js +1 -1
- package/esm5/src/render3/interfaces/styling.js +1 -1
- package/esm5/src/render3/interfaces/view.js +1 -1
- package/esm5/src/render3/jit/compiler_facade.js +1 -1
- package/esm5/src/render3/jit/compiler_facade_interface.js +1 -1
- package/esm5/src/render3/jit/directive.js +6 -6
- package/esm5/src/render3/jit/environment.js +3 -1
- package/esm5/src/render3/jit/injectable.js +1 -1
- package/esm5/src/render3/jit/module.js +10 -8
- package/esm5/src/render3/jit/pipe.js +1 -1
- package/esm5/src/render3/jit/util.js +1 -1
- package/esm5/src/render3/metadata.js +1 -1
- package/esm5/src/render3/ng_dev_mode.js +1 -1
- package/esm5/src/render3/ng_module_ref.js +1 -1
- package/esm5/src/render3/node_assert.js +1 -1
- package/esm5/src/render3/node_manipulation.js +5 -21
- package/esm5/src/render3/node_selector_matcher.js +3 -3
- package/esm5/src/render3/pipe.js +2 -2
- package/esm5/src/render3/players.js +1 -1
- package/esm5/src/render3/pure_function.js +3 -3
- package/esm5/src/render3/query.js +3 -3
- package/esm5/src/render3/state.js +14 -19
- package/esm5/src/render3/styling/class_and_style_bindings.js +681 -210
- package/esm5/src/render3/styling/core_player_handler.js +1 -1
- package/esm5/src/render3/styling/player_factory.js +1 -1
- package/esm5/src/render3/styling/util.js +26 -13
- package/esm5/src/render3/tokens.js +1 -1
- package/esm5/src/render3/util.js +20 -5
- package/esm5/src/render3/view_engine_compatibility.js +5 -6
- package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -1
- package/esm5/src/render3/view_ref.js +6 -15
- package/esm5/src/sanitization/bypass.js +1 -1
- package/esm5/src/sanitization/html_sanitizer.js +2 -2
- package/esm5/src/sanitization/inert_body.js +4 -4
- package/esm5/src/sanitization/sanitization.js +1 -1
- package/esm5/src/sanitization/security.js +1 -1
- package/esm5/src/sanitization/style_sanitizer.js +1 -1
- package/esm5/src/sanitization/url_sanitizer.js +1 -1
- package/esm5/src/testability/testability.js +1 -1
- package/esm5/src/type.js +1 -1
- package/esm5/src/util/decorators.js +1 -1
- package/esm5/src/util/lang.js +1 -1
- package/esm5/src/util/ng_reflect.js +1 -1
- package/esm5/src/util/noop.js +1 -1
- package/esm5/src/util/property.js +1 -1
- package/esm5/src/util.js +1 -1
- package/esm5/src/version.js +2 -2
- package/esm5/src/view/element.js +1 -1
- package/esm5/src/view/entrypoint.js +1 -1
- package/esm5/src/view/errors.js +1 -1
- package/esm5/src/view/index.js +1 -1
- package/esm5/src/view/ng_content.js +1 -1
- package/esm5/src/view/ng_module.js +1 -1
- package/esm5/src/view/provider.js +1 -1
- package/esm5/src/view/pure_expression.js +1 -1
- package/esm5/src/view/query.js +1 -1
- package/esm5/src/view/refs.js +1 -1
- package/esm5/src/view/services.js +1 -1
- package/esm5/src/view/text.js +1 -1
- package/esm5/src/view/types.js +1 -1
- package/esm5/src/view/util.js +1 -1
- package/esm5/src/view/view.js +1 -1
- package/esm5/src/view/view_attach.js +1 -1
- package/esm5/src/zone/ng_zone.js +1 -1
- package/esm5/src/zone.js +1 -1
- package/esm5/testing/index.js +1 -1
- package/esm5/testing/public_api.js +1 -1
- package/esm5/testing/src/async.js +1 -1
- package/esm5/testing/src/async_fallback.js +1 -1
- package/esm5/testing/src/async_test_completer.js +1 -1
- package/esm5/testing/src/before_each.js +1 -1
- package/esm5/testing/src/component_fixture.js +1 -1
- package/esm5/testing/src/fake_async.js +1 -1
- package/esm5/testing/src/fake_async_fallback.js +1 -1
- package/esm5/testing/src/lang_utils.js +1 -1
- package/esm5/testing/src/logger.js +1 -1
- package/esm5/testing/src/metadata_override.js +1 -1
- package/esm5/testing/src/metadata_overrider.js +1 -1
- package/esm5/testing/src/ng_zone_mock.js +1 -1
- package/esm5/testing/src/private_export_testing.js +1 -1
- package/esm5/testing/src/r3_test_bed.js +174 -127
- package/esm5/testing/src/resolvers.js +11 -6
- package/esm5/testing/src/test_bed.js +1 -1
- package/esm5/testing/src/test_bed_common.js +1 -1
- package/esm5/testing/src/test_compiler.js +1 -1
- package/esm5/testing/src/testing.js +1 -1
- package/esm5/testing/src/testing_internal.js +2 -2
- package/esm5/testing/testing.js +1 -1
- package/fesm2015/core.js +2306 -1733
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +223 -150
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +1781 -1335
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +181 -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 +1 -1
- package/src/di/injection_token.d.ts +1 -1
- package/src/event_emitter.d.ts +2 -2
- package/src/linker/template_ref.d.ts +5 -3
- package/src/metadata/di.d.ts +1 -3
- package/src/metadata/directives.d.ts +3 -3
- package/src/render3/definition.d.ts +2 -4
- package/src/render3/di.d.ts +4 -3
- package/src/render3/empty.d.ts +16 -0
- package/src/render3/hooks.d.ts +3 -3
- package/src/render3/index.d.ts +1 -1
- package/src/render3/instructions.d.ts +117 -72
- package/src/render3/interfaces/container.d.ts +1 -0
- package/src/render3/interfaces/definition.d.ts +0 -3
- package/src/render3/interfaces/injector.d.ts +0 -1
- package/src/render3/interfaces/node.d.ts +37 -2
- package/src/render3/interfaces/styling.d.ts +392 -117
- package/src/render3/interfaces/view.d.ts +14 -6
- package/src/render3/jit/compiler_facade_interface.d.ts +2 -0
- package/src/render3/node_manipulation.d.ts +0 -7
- package/src/render3/state.d.ts +3 -4
- package/src/render3/styling/class_and_style_bindings.d.ts +114 -43
- package/src/render3/styling/util.d.ts +5 -2
- package/src/render3/util.d.ts +7 -0
- package/testing/src/r3_test_bed.d.ts +15 -0
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +2 -3
package/fesm2015/testing.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.2.
|
|
2
|
+
* @license Angular v7.2.3
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, InjectionToken, Injector, ɵresetCompiledComponents, ɵgetInjectableDef, NgZone, ɵRender3ComponentFactory, ɵRender3NgModuleRef, ApplicationInitStatus, ɵcompileNgModuleDefs, resolveForwardRef, ɵcompileComponent, ɵcompileDirective, ɵcompilePipe, ɵpatchComponentDefWithScope, Compiler, Injectable, ɵclearOverrides, ɵoverrideComponentView, ɵAPP_ROOT, ɵoverrideProvider, ɵivyEnabled, Optional, SkipSelf } from '@angular/core';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @fileoverview added by tsickle
|
|
@@ -872,7 +872,12 @@ class OverrideResolver {
|
|
|
872
872
|
*/
|
|
873
873
|
setOverrides(overrides) {
|
|
874
874
|
this.overrides.clear();
|
|
875
|
-
overrides.forEach(([type, override]) =>
|
|
875
|
+
overrides.forEach(([type, override]) => {
|
|
876
|
+
/** @type {?} */
|
|
877
|
+
const overrides = this.overrides.get(type) || [];
|
|
878
|
+
overrides.push(override);
|
|
879
|
+
this.overrides.set(type, overrides);
|
|
880
|
+
});
|
|
876
881
|
}
|
|
877
882
|
/**
|
|
878
883
|
* @param {?} type
|
|
@@ -892,11 +897,13 @@ class OverrideResolver {
|
|
|
892
897
|
resolved = this.getAnnotation(type);
|
|
893
898
|
if (resolved) {
|
|
894
899
|
/** @type {?} */
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
900
|
+
const overrides = this.overrides.get(type);
|
|
901
|
+
if (overrides) {
|
|
897
902
|
/** @type {?} */
|
|
898
903
|
const overrider = new MetadataOverrider();
|
|
899
|
-
|
|
904
|
+
overrides.forEach(override => {
|
|
905
|
+
resolved = overrider.overrideMetadata(this.type, (/** @type {?} */ (resolved)), override);
|
|
906
|
+
});
|
|
900
907
|
}
|
|
901
908
|
}
|
|
902
909
|
this.resolved.set(type, resolved);
|
|
@@ -962,6 +969,8 @@ const ComponentFixtureNoNgZone = new InjectionToken('ComponentFixtureNoNgZone');
|
|
|
962
969
|
*/
|
|
963
970
|
/** @type {?} */
|
|
964
971
|
let _nextRootElementId = 0;
|
|
972
|
+
/** @type {?} */
|
|
973
|
+
const EMPTY_ARRAY = [];
|
|
965
974
|
/**
|
|
966
975
|
* \@description
|
|
967
976
|
* Configures and initializes environment for unit testing and provides methods for
|
|
@@ -984,6 +993,8 @@ class TestBedRender3 {
|
|
|
984
993
|
this._pipeOverrides = [];
|
|
985
994
|
this._providerOverrides = [];
|
|
986
995
|
this._rootProviderOverrides = [];
|
|
996
|
+
this._providerOverridesByToken = new Map();
|
|
997
|
+
this._templateOverrides = new Map();
|
|
987
998
|
// test module configuration
|
|
988
999
|
this._providers = [];
|
|
989
1000
|
this._declarations = [];
|
|
@@ -991,6 +1002,7 @@ class TestBedRender3 {
|
|
|
991
1002
|
this._schemas = [];
|
|
992
1003
|
this._activeFixtures = [];
|
|
993
1004
|
this._moduleRef = (/** @type {?} */ (null));
|
|
1005
|
+
this._testModuleType = (/** @type {?} */ (null));
|
|
994
1006
|
this._instantiated = false;
|
|
995
1007
|
}
|
|
996
1008
|
/**
|
|
@@ -1112,7 +1124,10 @@ class TestBedRender3 {
|
|
|
1112
1124
|
* @return {?}
|
|
1113
1125
|
*/
|
|
1114
1126
|
overrideTemplateUsingTestingModule(component, template) {
|
|
1115
|
-
|
|
1127
|
+
if (this._instantiated) {
|
|
1128
|
+
throw new Error('Cannot override template when the test module has already been instantiated');
|
|
1129
|
+
}
|
|
1130
|
+
this._templateOverrides.set(component, template);
|
|
1116
1131
|
}
|
|
1117
1132
|
/**
|
|
1118
1133
|
* @param {?} token
|
|
@@ -1201,12 +1216,15 @@ class TestBedRender3 {
|
|
|
1201
1216
|
this._pipeOverrides = [];
|
|
1202
1217
|
this._providerOverrides = [];
|
|
1203
1218
|
this._rootProviderOverrides = [];
|
|
1219
|
+
this._providerOverridesByToken.clear();
|
|
1220
|
+
this._templateOverrides.clear();
|
|
1204
1221
|
// reset test module config
|
|
1205
1222
|
this._providers = [];
|
|
1206
1223
|
this._declarations = [];
|
|
1207
1224
|
this._imports = [];
|
|
1208
1225
|
this._schemas = [];
|
|
1209
1226
|
this._moduleRef = (/** @type {?} */ (null));
|
|
1227
|
+
this._testModuleType = (/** @type {?} */ (null));
|
|
1210
1228
|
this._instantiated = false;
|
|
1211
1229
|
this._activeFixtures.forEach((fixture) => {
|
|
1212
1230
|
try {
|
|
@@ -1328,18 +1346,22 @@ class TestBedRender3 {
|
|
|
1328
1346
|
*/
|
|
1329
1347
|
overrideProvider(token, provider) {
|
|
1330
1348
|
/** @type {?} */
|
|
1349
|
+
const providerDef = provider.useFactory ?
|
|
1350
|
+
{ provide: token, useFactory: provider.useFactory, deps: provider.deps || [] } :
|
|
1351
|
+
{ provide: token, useValue: provider.useValue };
|
|
1352
|
+
/** @type {?} */
|
|
1331
1353
|
let injectableDef;
|
|
1332
1354
|
/** @type {?} */
|
|
1333
1355
|
const isRoot = (typeof token !== 'string' && (injectableDef = ɵgetInjectableDef(token)) &&
|
|
1334
1356
|
injectableDef.providedIn === 'root');
|
|
1335
1357
|
/** @type {?} */
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1358
|
+
const overridesBucket = isRoot ? this._rootProviderOverrides : this._providerOverrides;
|
|
1359
|
+
overridesBucket.push(providerDef);
|
|
1360
|
+
// keep all overrides grouped by token as well for fast lookups using token
|
|
1361
|
+
/** @type {?} */
|
|
1362
|
+
const overridesForToken = this._providerOverridesByToken.get(token) || [];
|
|
1363
|
+
overridesForToken.push(providerDef);
|
|
1364
|
+
this._providerOverridesByToken.set(token, overridesForToken);
|
|
1343
1365
|
}
|
|
1344
1366
|
/**
|
|
1345
1367
|
* @param {?} token
|
|
@@ -1396,17 +1418,29 @@ class TestBedRender3 {
|
|
|
1396
1418
|
}
|
|
1397
1419
|
/** @type {?} */
|
|
1398
1420
|
const resolvers = this._getResolvers();
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
compileNgModule(testModuleType, resolvers);
|
|
1421
|
+
this._testModuleType = this._createTestModule();
|
|
1422
|
+
this._compileNgModule(this._testModuleType, resolvers);
|
|
1402
1423
|
/** @type {?} */
|
|
1403
1424
|
const parentInjector = this.platform.injector;
|
|
1404
|
-
this._moduleRef = new ɵRender3NgModuleRef(
|
|
1425
|
+
this._moduleRef = new ɵRender3NgModuleRef(this._testModuleType, parentInjector);
|
|
1405
1426
|
// ApplicationInitStatus.runInitializers() is marked @internal
|
|
1406
1427
|
// to core. Cast it to any before accessing it.
|
|
1407
1428
|
((/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus)))).runInitializers();
|
|
1408
1429
|
this._instantiated = true;
|
|
1409
1430
|
}
|
|
1431
|
+
// get overrides for a specific provider (if any)
|
|
1432
|
+
/**
|
|
1433
|
+
* @private
|
|
1434
|
+
* @param {?} provider
|
|
1435
|
+
* @return {?}
|
|
1436
|
+
*/
|
|
1437
|
+
_getProviderOverrides(provider) {
|
|
1438
|
+
/** @type {?} */
|
|
1439
|
+
const token = typeof provider === 'object' && provider.hasOwnProperty('provide') ?
|
|
1440
|
+
provider.provide :
|
|
1441
|
+
provider;
|
|
1442
|
+
return this._providerOverridesByToken.get(token) || [];
|
|
1443
|
+
}
|
|
1410
1444
|
// creates resolvers taking overrides into account
|
|
1411
1445
|
/**
|
|
1412
1446
|
* @private
|
|
@@ -1471,161 +1505,200 @@ class TestBedRender3 {
|
|
|
1471
1505
|
];
|
|
1472
1506
|
return (/** @type {?} */ (DynamicTestModule));
|
|
1473
1507
|
}
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
return testBed = testBed || new TestBedRender3();
|
|
1482
|
-
}
|
|
1483
|
-
// Module compiler
|
|
1484
|
-
/** @type {?} */
|
|
1485
|
-
const EMPTY_ARRAY = [];
|
|
1486
|
-
/**
|
|
1487
|
-
* @param {?} moduleType
|
|
1488
|
-
* @param {?} resolvers
|
|
1489
|
-
* @return {?}
|
|
1490
|
-
*/
|
|
1491
|
-
function compileNgModule(moduleType, resolvers) {
|
|
1492
|
-
/** @type {?} */
|
|
1493
|
-
const ngModule = resolvers.module.resolve(moduleType);
|
|
1494
|
-
if (ngModule === null) {
|
|
1495
|
-
throw new Error(`${ɵstringify(moduleType)} has not @NgModule annotation`);
|
|
1496
|
-
}
|
|
1497
|
-
ɵcompileNgModuleDefs(moduleType, ngModule);
|
|
1498
|
-
/** @type {?} */
|
|
1499
|
-
const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);
|
|
1500
|
-
/** @type {?} */
|
|
1501
|
-
const compiledComponents = [];
|
|
1502
|
-
// Compile the components, directives and pipes declared by this module
|
|
1503
|
-
declarations.forEach(declaration => {
|
|
1504
|
-
/** @type {?} */
|
|
1505
|
-
const component = resolvers.component.resolve(declaration);
|
|
1506
|
-
if (component) {
|
|
1507
|
-
ɵcompileComponent(declaration, component);
|
|
1508
|
-
compiledComponents.push(declaration);
|
|
1509
|
-
return;
|
|
1510
|
-
}
|
|
1508
|
+
/**
|
|
1509
|
+
* @private
|
|
1510
|
+
* @param {?} meta
|
|
1511
|
+
* @param {?=} type
|
|
1512
|
+
* @return {?}
|
|
1513
|
+
*/
|
|
1514
|
+
_getMetaWithOverrides(meta, type) {
|
|
1511
1515
|
/** @type {?} */
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
+
const overrides = {};
|
|
1517
|
+
if (meta.providers && meta.providers.length) {
|
|
1518
|
+
/** @type {?} */
|
|
1519
|
+
const providerOverrides = flatten(meta.providers, (provider) => this._getProviderOverrides(provider));
|
|
1520
|
+
if (providerOverrides.length) {
|
|
1521
|
+
overrides.providers = [...meta.providers, ...providerOverrides];
|
|
1522
|
+
}
|
|
1516
1523
|
}
|
|
1517
1524
|
/** @type {?} */
|
|
1518
|
-
const
|
|
1519
|
-
if (
|
|
1520
|
-
|
|
1521
|
-
return;
|
|
1525
|
+
const hasTemplateOverride = !!type && this._templateOverrides.has(type);
|
|
1526
|
+
if (hasTemplateOverride) {
|
|
1527
|
+
overrides.template = this._templateOverrides.get((/** @type {?} */ (type)));
|
|
1522
1528
|
}
|
|
1523
|
-
|
|
1524
|
-
// Compile transitive modules, components, directives and pipes
|
|
1525
|
-
/** @type {?} */
|
|
1526
|
-
const transitiveScope = transitiveScopesFor(moduleType, resolvers);
|
|
1527
|
-
compiledComponents.forEach(cmp => ɵpatchComponentDefWithScope(((/** @type {?} */ (cmp))).ngComponentDef, transitiveScope));
|
|
1528
|
-
}
|
|
1529
|
-
/**
|
|
1530
|
-
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
|
|
1531
|
-
*
|
|
1532
|
-
* This operation is memoized and the result is cached on the module's definition. It can be called
|
|
1533
|
-
* on modules with components that have not fully compiled yet, but the result should not be used
|
|
1534
|
-
* until they have.
|
|
1535
|
-
* @template T
|
|
1536
|
-
* @param {?} moduleType
|
|
1537
|
-
* @param {?} resolvers
|
|
1538
|
-
* @return {?}
|
|
1539
|
-
*/
|
|
1540
|
-
function transitiveScopesFor(moduleType, resolvers) {
|
|
1541
|
-
if (!isNgModule(moduleType)) {
|
|
1542
|
-
throw new Error(`${moduleType.name} does not have an ngModuleDef`);
|
|
1529
|
+
return Object.keys(overrides).length ? Object.assign({}, meta, overrides) : meta;
|
|
1543
1530
|
}
|
|
1544
|
-
/**
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
compilation: {
|
|
1552
|
-
directives: new Set(),
|
|
1553
|
-
pipes: new Set(),
|
|
1554
|
-
},
|
|
1555
|
-
exported: {
|
|
1556
|
-
directives: new Set(),
|
|
1557
|
-
pipes: new Set(),
|
|
1558
|
-
},
|
|
1559
|
-
};
|
|
1560
|
-
def.declarations.forEach(declared => {
|
|
1561
|
-
/** @type {?} */
|
|
1562
|
-
const declaredWithDefs = (/** @type {?} */ (declared));
|
|
1563
|
-
if (declaredWithDefs.ngPipeDef !== undefined) {
|
|
1564
|
-
scopes.compilation.pipes.add(declared);
|
|
1565
|
-
}
|
|
1566
|
-
else {
|
|
1567
|
-
scopes.compilation.directives.add(declared);
|
|
1568
|
-
}
|
|
1569
|
-
});
|
|
1570
|
-
def.imports.forEach((imported) => {
|
|
1531
|
+
/**
|
|
1532
|
+
* @private
|
|
1533
|
+
* @param {?} moduleType
|
|
1534
|
+
* @param {?} resolvers
|
|
1535
|
+
* @return {?}
|
|
1536
|
+
*/
|
|
1537
|
+
_compileNgModule(moduleType, resolvers) {
|
|
1571
1538
|
/** @type {?} */
|
|
1572
|
-
const ngModule = resolvers.module.resolve(
|
|
1539
|
+
const ngModule = resolvers.module.resolve(moduleType);
|
|
1573
1540
|
if (ngModule === null) {
|
|
1574
|
-
throw new Error(
|
|
1541
|
+
throw new Error(`${ɵstringify(moduleType)} has not @NgModule annotation`);
|
|
1575
1542
|
}
|
|
1576
|
-
else {
|
|
1577
|
-
compileNgModule(imported, resolvers);
|
|
1578
|
-
}
|
|
1579
|
-
// When this module imports another, the imported module's exported directives and pipes are
|
|
1580
|
-
// added to the compilation scope of this module.
|
|
1581
1543
|
/** @type {?} */
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
// ngComponentDef as it might be compiled asynchronously).
|
|
1591
|
-
if (isNgModule(exportedTyped)) {
|
|
1592
|
-
// When this module exports another, the exported module's exported directives and pipes are
|
|
1593
|
-
// added to both the compilation and exported scopes of this module.
|
|
1544
|
+
const metadata = this._getMetaWithOverrides(ngModule);
|
|
1545
|
+
ɵcompileNgModuleDefs(moduleType, metadata);
|
|
1546
|
+
/** @type {?} */
|
|
1547
|
+
const declarations = flatten(ngModule.declarations || EMPTY_ARRAY, resolveForwardRef);
|
|
1548
|
+
/** @type {?} */
|
|
1549
|
+
const compiledComponents = [];
|
|
1550
|
+
// Compile the components, directives and pipes declared by this module
|
|
1551
|
+
declarations.forEach(declaration => {
|
|
1594
1552
|
/** @type {?} */
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1553
|
+
const component = resolvers.component.resolve(declaration);
|
|
1554
|
+
if (component) {
|
|
1555
|
+
/** @type {?} */
|
|
1556
|
+
const metadata = this._getMetaWithOverrides(component, declaration);
|
|
1557
|
+
ɵcompileComponent(declaration, metadata);
|
|
1558
|
+
compiledComponents.push(declaration);
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
/** @type {?} */
|
|
1562
|
+
const directive = resolvers.directive.resolve(declaration);
|
|
1563
|
+
if (directive) {
|
|
1564
|
+
/** @type {?} */
|
|
1565
|
+
const metadata = this._getMetaWithOverrides(directive);
|
|
1566
|
+
ɵcompileDirective(declaration, metadata);
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
/** @type {?} */
|
|
1570
|
+
const pipe = resolvers.pipe.resolve(declaration);
|
|
1571
|
+
if (pipe) {
|
|
1572
|
+
ɵcompilePipe(declaration, pipe);
|
|
1573
|
+
return;
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
// Compile transitive modules, components, directives and pipes
|
|
1577
|
+
/** @type {?} */
|
|
1578
|
+
const transitiveScope = this._transitiveScopesFor(moduleType, resolvers);
|
|
1579
|
+
compiledComponents.forEach(cmp => {
|
|
1580
|
+
/** @type {?} */
|
|
1581
|
+
const scope = this._templateOverrides.has(cmp) ?
|
|
1582
|
+
// if we have template override via `TestBed.overrideTemplateUsingTestingModule` -
|
|
1583
|
+
// define Component scope as TestingModule scope, instead of the scope of NgModule
|
|
1584
|
+
// where this Component was declared
|
|
1585
|
+
this._transitiveScopesFor(this._testModuleType, resolvers) :
|
|
1586
|
+
transitiveScope;
|
|
1587
|
+
ɵpatchComponentDefWithScope(((/** @type {?} */ (cmp))).ngComponentDef, scope);
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given
|
|
1592
|
+
* module.
|
|
1593
|
+
*
|
|
1594
|
+
* This operation is memoized and the result is cached on the module's definition. It can be
|
|
1595
|
+
* called on modules with components that have not fully compiled yet, but the result should not
|
|
1596
|
+
* be used until they have.
|
|
1597
|
+
* @private
|
|
1598
|
+
* @template T
|
|
1599
|
+
* @param {?} moduleType
|
|
1600
|
+
* @param {?} resolvers
|
|
1601
|
+
* @return {?}
|
|
1602
|
+
*/
|
|
1603
|
+
_transitiveScopesFor(moduleType, resolvers) {
|
|
1604
|
+
if (!isNgModule(moduleType)) {
|
|
1605
|
+
throw new Error(`${moduleType.name} does not have an ngModuleDef`);
|
|
1610
1606
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1607
|
+
/** @nocollapse @type {?} */
|
|
1608
|
+
const def = moduleType.ngModuleDef;
|
|
1609
|
+
if (def.transitiveCompileScopes !== null) {
|
|
1610
|
+
return def.transitiveCompileScopes;
|
|
1611
|
+
}
|
|
1612
|
+
/** @type {?} */
|
|
1613
|
+
const scopes = {
|
|
1614
|
+
compilation: {
|
|
1615
|
+
directives: new Set(),
|
|
1616
|
+
pipes: new Set(),
|
|
1617
|
+
},
|
|
1618
|
+
exported: {
|
|
1619
|
+
directives: new Set(),
|
|
1620
|
+
pipes: new Set(),
|
|
1621
|
+
},
|
|
1622
|
+
};
|
|
1623
|
+
def.declarations.forEach(declared => {
|
|
1624
|
+
/** @type {?} */
|
|
1625
|
+
const declaredWithDefs = (/** @type {?} */ (declared));
|
|
1626
|
+
if (declaredWithDefs.ngPipeDef !== undefined) {
|
|
1627
|
+
scopes.compilation.pipes.add(declared);
|
|
1628
|
+
}
|
|
1629
|
+
else {
|
|
1630
|
+
scopes.compilation.directives.add(declared);
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
def.imports.forEach((imported) => {
|
|
1634
|
+
/** @type {?} */
|
|
1635
|
+
const ngModule = resolvers.module.resolve(imported);
|
|
1636
|
+
if (ngModule === null) {
|
|
1637
|
+
throw new Error(`Importing ${imported.name} which does not have an @ngModule`);
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
this._compileNgModule(imported, resolvers);
|
|
1641
|
+
}
|
|
1642
|
+
// When this module imports another, the imported module's exported directives and pipes are
|
|
1643
|
+
// added to the compilation scope of this module.
|
|
1644
|
+
/** @type {?} */
|
|
1645
|
+
const importedScope = this._transitiveScopesFor(imported, resolvers);
|
|
1646
|
+
importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));
|
|
1647
|
+
importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));
|
|
1648
|
+
});
|
|
1649
|
+
def.exports.forEach((exported) => {
|
|
1650
|
+
/** @type {?} */
|
|
1651
|
+
const exportedTyped = (/** @type {?} */ (exported));
|
|
1652
|
+
// Either the type is a module, a pipe, or a component/directive (which may not have an
|
|
1653
|
+
// ngComponentDef as it might be compiled asynchronously).
|
|
1654
|
+
if (isNgModule(exportedTyped)) {
|
|
1655
|
+
// When this module exports another, the exported module's exported directives and pipes are
|
|
1656
|
+
// added to both the compilation and exported scopes of this module.
|
|
1657
|
+
/** @type {?} */
|
|
1658
|
+
const exportedScope = this._transitiveScopesFor(exportedTyped, resolvers);
|
|
1659
|
+
exportedScope.exported.directives.forEach(entry => {
|
|
1660
|
+
scopes.compilation.directives.add(entry);
|
|
1661
|
+
scopes.exported.directives.add(entry);
|
|
1662
|
+
});
|
|
1663
|
+
exportedScope.exported.pipes.forEach(entry => {
|
|
1664
|
+
scopes.compilation.pipes.add(entry);
|
|
1665
|
+
scopes.exported.pipes.add(entry);
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
else if (exportedTyped.ngPipeDef !== undefined) {
|
|
1669
|
+
scopes.exported.pipes.add(exportedTyped);
|
|
1670
|
+
}
|
|
1671
|
+
else {
|
|
1672
|
+
scopes.exported.directives.add(exportedTyped);
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
def.transitiveCompileScopes = scopes;
|
|
1676
|
+
return scopes;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
/** @type {?} */
|
|
1680
|
+
let testBed;
|
|
1681
|
+
/**
|
|
1682
|
+
* @return {?}
|
|
1683
|
+
*/
|
|
1684
|
+
function _getTestBedRender3() {
|
|
1685
|
+
return testBed = testBed || new TestBedRender3();
|
|
1614
1686
|
}
|
|
1615
1687
|
/**
|
|
1616
1688
|
* @template T
|
|
1617
1689
|
* @param {?} values
|
|
1690
|
+
* @param {?=} mapFn
|
|
1618
1691
|
* @return {?}
|
|
1619
1692
|
*/
|
|
1620
|
-
function flatten(values) {
|
|
1693
|
+
function flatten(values, mapFn) {
|
|
1621
1694
|
/** @type {?} */
|
|
1622
1695
|
const out = [];
|
|
1623
1696
|
values.forEach(value => {
|
|
1624
1697
|
if (Array.isArray(value)) {
|
|
1625
|
-
out.push(...flatten(value));
|
|
1698
|
+
out.push(...flatten(value, mapFn));
|
|
1626
1699
|
}
|
|
1627
1700
|
else {
|
|
1628
|
-
out.push(value);
|
|
1701
|
+
out.push(mapFn ? mapFn(value) : value);
|
|
1629
1702
|
}
|
|
1630
1703
|
});
|
|
1631
1704
|
return out;
|