@angular/core 12.1.0-next.5 → 12.1.2
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 +239 -46
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core.umd.js +60 -37
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +45 -19
- package/core.metadata.json +1 -1
- package/esm2015/src/application_init.js +5 -5
- package/esm2015/src/application_ref.js +29 -8
- package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
- package/esm2015/src/error_handler.js +2 -6
- package/esm2015/src/event_emitter.js +1 -1
- package/esm2015/src/linker/component_factory_resolver.js +1 -1
- package/esm2015/src/linker/template_ref.js +1 -1
- package/esm2015/src/linker/view_container_ref.js +1 -1
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/metadata/do_boostrap.js +1 -1
- package/esm2015/src/render3/component_ref.js +1 -1
- package/esm2015/src/render3/definition.js +16 -16
- package/esm2015/src/render3/ng_module_ref.js +1 -1
- package/esm2015/src/render3/view_ref.js +1 -1
- package/esm2015/src/sanitization/bypass.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/src/view/entrypoint.js +1 -1
- package/esm2015/src/view/refs.js +1 -1
- package/esm2015/testing/src/ng_zone_mock.js +1 -1
- package/esm2015/testing/src/r3_test_bed.js +84 -7
- package/esm2015/testing/src/r3_test_bed_compiler.js +4 -1
- package/esm2015/testing/src/resolvers.js +1 -1
- package/esm2015/testing/src/test_bed.js +110 -21
- package/esm2015/testing/src/test_bed_common.js +7 -1
- package/esm2015/testing/src/test_hooks.js +45 -0
- package/esm2015/testing/src/testing.js +3 -3
- package/fesm2015/core.js +50 -33
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +216 -29
- package/fesm2015/testing.js.map +1 -1
- package/package.json +1 -1
- package/schematics/migrations/missing-injectable/providers_evaluator.js +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.js +1 -1
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js +1 -1
- package/schematics/migrations.json +1 -1
- package/src/r3_symbols.d.ts +2 -3
- package/testing/testing.d.ts +64 -5
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/esm2015/testing/src/before_each.js +0 -33
- package/schematics/migrations/abstract-control-parent/abstract-control-parent.externs.js +0 -0
- package/schematics/migrations/abstract-control-parent/index.mjs +0 -47
- package/schematics/migrations/abstract-control-parent/util.mjs +0 -50
- package/schematics/migrations/activated-route-snapshot-fragment/activated-route-snapshot-fragment.externs.js +0 -0
- package/schematics/migrations/activated-route-snapshot-fragment/index.mjs +0 -48
- package/schematics/migrations/activated-route-snapshot-fragment/util.mjs +0 -33
- package/schematics/migrations/can-activate-with-redirect-to/can-activate-with-redirect-to.externs.js +0 -0
- package/schematics/migrations/can-activate-with-redirect-to/index.mjs +0 -44
- package/schematics/migrations/can-activate-with-redirect-to/util.mjs +0 -55
- package/schematics/migrations/deep-shadow-piercing-selector/deep-shadow-piercing-selector.externs.js +0 -0
- package/schematics/migrations/deep-shadow-piercing-selector/index.mjs +0 -36
- package/schematics/migrations/dynamic-queries/dynamic-queries.externs.js +0 -0
- package/schematics/migrations/dynamic-queries/index.mjs +0 -51
- package/schematics/migrations/dynamic-queries/util.mjs +0 -65
- package/schematics/migrations/initial-navigation/collector.mjs +0 -105
- package/schematics/migrations/initial-navigation/index.mjs +0 -61
- package/schematics/migrations/initial-navigation/initial-navigation.externs.js +0 -0
- package/schematics/migrations/initial-navigation/transform.mjs +0 -54
- package/schematics/migrations/initial-navigation/update_recorder.mjs +0 -9
- package/schematics/migrations/initial-navigation/util.mjs +0 -28
- package/schematics/migrations/missing-injectable/definition_collector.mjs +0 -75
- package/schematics/migrations/missing-injectable/index.mjs +0 -100
- package/schematics/migrations/missing-injectable/missing-injectable.externs.js +0 -0
- package/schematics/migrations/missing-injectable/providers_evaluator.mjs +0 -50
- package/schematics/migrations/missing-injectable/transform.mjs +0 -187
- package/schematics/migrations/missing-injectable/update_recorder.mjs +0 -9
- package/schematics/migrations/module-with-providers/collector.mjs +0 -59
- package/schematics/migrations/module-with-providers/index.mjs +0 -71
- package/schematics/migrations/module-with-providers/module-with-providers.externs.js +0 -0
- package/schematics/migrations/module-with-providers/transform.mjs +0 -134
- package/schematics/migrations/module-with-providers/util.mjs +0 -25
- package/schematics/migrations/move-document/document_import_visitor.mjs +0 -60
- package/schematics/migrations/move-document/index.mjs +0 -71
- package/schematics/migrations/move-document/move-document.externs.js +0 -0
- package/schematics/migrations/move-document/move-import.mjs +0 -45
- package/schematics/migrations/native-view-encapsulation/index.mjs +0 -41
- package/schematics/migrations/native-view-encapsulation/native-view-encapsulation.externs.js +0 -0
- package/schematics/migrations/native-view-encapsulation/util.mjs +0 -34
- package/schematics/migrations/navigation-extras-omissions/index.mjs +0 -47
- package/schematics/migrations/navigation-extras-omissions/navigation-extras-omissions.externs.js +0 -0
- package/schematics/migrations/navigation-extras-omissions/util.mjs +0 -111
- package/schematics/migrations/relative-link-resolution/collector.mjs +0 -81
- package/schematics/migrations/relative-link-resolution/index.mjs +0 -62
- package/schematics/migrations/relative-link-resolution/relative-link-resolution.externs.js +0 -0
- package/schematics/migrations/relative-link-resolution/transform.mjs +0 -51
- package/schematics/migrations/relative-link-resolution/update_recorder.mjs +0 -9
- package/schematics/migrations/relative-link-resolution/util.mjs +0 -28
- package/schematics/migrations/renderer-to-renderer2/helpers.mjs +0 -224
- package/schematics/migrations/renderer-to-renderer2/index.mjs +0 -113
- package/schematics/migrations/renderer-to-renderer2/migration.mjs +0 -211
- package/schematics/migrations/renderer-to-renderer2/renderer-to-renderer2.externs.js +0 -0
- package/schematics/migrations/renderer-to-renderer2/util.mjs +0 -69
- package/schematics/migrations/router-preserve-query-params/index.mjs +0 -50
- package/schematics/migrations/router-preserve-query-params/router-preserve-query-params.externs.js +0 -0
- package/schematics/migrations/router-preserve-query-params/util.mjs +0 -88
- package/schematics/migrations/static-queries/angular/directive_inputs.mjs +0 -70
- package/schematics/migrations/static-queries/angular/ng_query_visitor.mjs +0 -113
- package/schematics/migrations/static-queries/angular/query-definition.mjs +0 -20
- package/schematics/migrations/static-queries/angular/super_class.mjs +0 -21
- package/schematics/migrations/static-queries/index.mjs +0 -206
- package/schematics/migrations/static-queries/static-queries.externs.js +0 -0
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.mjs +0 -200
- package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.mjs +0 -24
- package/schematics/migrations/static-queries/strategies/timing-strategy.mjs +0 -9
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.mjs +0 -355
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.mjs +0 -38
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.mjs +0 -80
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.mjs +0 -154
- package/schematics/migrations/static-queries/transform.mjs +0 -88
- package/schematics/migrations/template-var-assignment/analyze_template.mjs +0 -25
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.mjs +0 -65
- package/schematics/migrations/template-var-assignment/index.mjs +0 -68
- package/schematics/migrations/template-var-assignment/template-var-assignment.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-decorated-fields/index.mjs +0 -92
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.mjs +0 -286
- package/schematics/migrations/undecorated-classes-with-decorated-fields/undecorated-classes-with-decorated-fields.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.mjs +0 -9
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.mjs +0 -43
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.mjs +0 -82
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.mjs +0 -102
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.mjs +0 -111
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.mjs +0 -17
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.mjs +0 -51
- package/schematics/migrations/undecorated-classes-with-di/index.mjs +0 -162
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.mjs +0 -124
- package/schematics/migrations/undecorated-classes-with-di/transform.mjs +0 -356
- package/schematics/migrations/undecorated-classes-with-di/undecorated-classes-with-di.externs.js +0 -0
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.mjs +0 -9
- package/schematics/migrations/wait-for-async/index.mjs +0 -76
- package/schematics/migrations/wait-for-async/util.mjs +0 -23
- package/schematics/migrations/wait-for-async/wait-for-async.externs.js +0 -0
- package/schematics/migrations/xhr-factory/index.mjs +0 -91
- package/schematics/migrations/xhr-factory/xhr-factory.externs.js +0 -0
- package/schematics/utils/import_manager.mjs +0 -197
- package/schematics/utils/line_mappings.mjs +0 -60
- package/schematics/utils/ng_component_template.mjs +0 -96
- package/schematics/utils/ng_decorators.mjs +0 -23
- package/schematics/utils/parse_html.mjs +0 -24
- package/schematics/utils/project_tsconfig_paths.mjs +0 -74
- package/schematics/utils/schematics_prompt.mjs +0 -30
- package/schematics/utils/typescript/class_declaration.mjs +0 -33
- package/schematics/utils/typescript/compiler_host.mjs +0 -66
- package/schematics/utils/typescript/decorators.mjs +0 -20
- package/schematics/utils/typescript/find_base_classes.mjs +0 -30
- package/schematics/utils/typescript/functions.mjs +0 -28
- package/schematics/utils/typescript/imports.mjs +0 -91
- package/schematics/utils/typescript/nodes.mjs +0 -57
- package/schematics/utils/typescript/parse_tsconfig.mjs +0 -26
- package/schematics/utils/typescript/property_name.mjs +0 -23
- package/schematics/utils/typescript/symbol.mjs +0 -72
- package/schematics/utils/utils.externs.js +0 -0
package/fesm2015/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.
|
|
2
|
+
* @license Angular v12.1.2
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -947,22 +947,22 @@ const autoRegisterModuleById = {};
|
|
|
947
947
|
* @codeGenApi
|
|
948
948
|
*/
|
|
949
949
|
function ɵɵdefineNgModule(def) {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
950
|
+
return noSideEffects(() => {
|
|
951
|
+
const res = {
|
|
952
|
+
type: def.type,
|
|
953
|
+
bootstrap: def.bootstrap || EMPTY_ARRAY,
|
|
954
|
+
declarations: def.declarations || EMPTY_ARRAY,
|
|
955
|
+
imports: def.imports || EMPTY_ARRAY,
|
|
956
|
+
exports: def.exports || EMPTY_ARRAY,
|
|
957
|
+
transitiveCompileScopes: null,
|
|
958
|
+
schemas: def.schemas || null,
|
|
959
|
+
id: def.id || null,
|
|
960
|
+
};
|
|
961
|
+
if (def.id != null) {
|
|
962
962
|
autoRegisterModuleById[def.id] = def.type;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
|
|
963
|
+
}
|
|
964
|
+
return res;
|
|
965
|
+
});
|
|
966
966
|
}
|
|
967
967
|
/**
|
|
968
968
|
* Adds the module metadata that is necessary to compute the module's transitive scope to an
|
|
@@ -6511,11 +6511,7 @@ class ErrorHandler {
|
|
|
6511
6511
|
}
|
|
6512
6512
|
/** @internal */
|
|
6513
6513
|
_findContext(error) {
|
|
6514
|
-
|
|
6515
|
-
return getDebugContext(error) ? getDebugContext(error) :
|
|
6516
|
-
this._findContext(getOriginalError(error));
|
|
6517
|
-
}
|
|
6518
|
-
return null;
|
|
6514
|
+
return error ? (getDebugContext(error) || this._findContext(getOriginalError(error))) : null;
|
|
6519
6515
|
}
|
|
6520
6516
|
/** @internal */
|
|
6521
6517
|
_findOriginalError(error) {
|
|
@@ -21469,7 +21465,7 @@ class Version {
|
|
|
21469
21465
|
/**
|
|
21470
21466
|
* @publicApi
|
|
21471
21467
|
*/
|
|
21472
|
-
const VERSION = new Version('12.1.
|
|
21468
|
+
const VERSION = new Version('12.1.2');
|
|
21473
21469
|
|
|
21474
21470
|
/**
|
|
21475
21471
|
* @license
|
|
@@ -27877,11 +27873,11 @@ const SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;
|
|
|
27877
27873
|
* through DI.
|
|
27878
27874
|
*
|
|
27879
27875
|
* ```
|
|
27880
|
-
* function
|
|
27881
|
-
* return httpClient.get("https://someUrl.com/api/user")
|
|
27876
|
+
* function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
|
|
27877
|
+
* return () => httpClient.get("https://someUrl.com/api/user")
|
|
27882
27878
|
* .pipe(
|
|
27883
27879
|
* tap(user => { ... })
|
|
27884
|
-
* )
|
|
27880
|
+
* );
|
|
27885
27881
|
* }
|
|
27886
27882
|
*
|
|
27887
27883
|
* @NgModule({
|
|
@@ -27890,7 +27886,7 @@ const SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;
|
|
|
27890
27886
|
* bootstrap: [AppComponent],
|
|
27891
27887
|
* providers: [{
|
|
27892
27888
|
* provide: APP_INITIALIZER,
|
|
27893
|
-
* useFactory:
|
|
27889
|
+
* useFactory: initializeAppFactory,
|
|
27894
27890
|
* deps: [HttpClient],
|
|
27895
27891
|
* multi: true
|
|
27896
27892
|
* }]
|
|
@@ -29567,20 +29563,41 @@ class ApplicationRef {
|
|
|
29567
29563
|
merge$1(isCurrentlyStable, isStable.pipe(share()));
|
|
29568
29564
|
}
|
|
29569
29565
|
/**
|
|
29570
|
-
* Bootstrap a
|
|
29566
|
+
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
29567
|
+
* specified element.
|
|
29571
29568
|
*
|
|
29572
29569
|
* @usageNotes
|
|
29573
29570
|
* ### Bootstrap process
|
|
29574
29571
|
*
|
|
29575
|
-
* When bootstrapping a
|
|
29576
|
-
*
|
|
29577
|
-
*
|
|
29572
|
+
* When bootstrapping a component, Angular mounts it onto a target DOM element
|
|
29573
|
+
* and kicks off automatic change detection. The target DOM element can be
|
|
29574
|
+
* provided using the `rootSelectorOrNode` argument.
|
|
29578
29575
|
*
|
|
29579
|
-
*
|
|
29580
|
-
*
|
|
29576
|
+
* If the target DOM element is not provided, Angular tries to find one on a page
|
|
29577
|
+
* using the `selector` of the component that is being bootstrapped
|
|
29578
|
+
* (first matched element is used).
|
|
29581
29579
|
*
|
|
29582
29580
|
* ### Example
|
|
29583
|
-
*
|
|
29581
|
+
*
|
|
29582
|
+
* Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
|
29583
|
+
* but it requires us to know the component while writing the application code.
|
|
29584
|
+
*
|
|
29585
|
+
* Imagine a situation where we have to wait for an API call to decide about the component to
|
|
29586
|
+
* bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
|
29587
|
+
* dynamically bootstrap a component.
|
|
29588
|
+
*
|
|
29589
|
+
* {@example core/ts/platform/platform.ts region='componentSelector'}
|
|
29590
|
+
*
|
|
29591
|
+
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
29592
|
+
* selector of the bootstrapped component.
|
|
29593
|
+
*
|
|
29594
|
+
* In the following example, we are providing a CSS selector to match the target element.
|
|
29595
|
+
*
|
|
29596
|
+
* {@example core/ts/platform/platform.ts region='cssSelector'}
|
|
29597
|
+
*
|
|
29598
|
+
* While in this example, we are providing reference to a DOM node.
|
|
29599
|
+
*
|
|
29600
|
+
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
29584
29601
|
*/
|
|
29585
29602
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
29586
29603
|
if (!this._initStatus.done) {
|