@angular/core 12.1.0-next.4 → 12.1.1
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 +225 -43
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core.umd.js +65 -28
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +85 -10
- package/core.metadata.json +1 -1
- package/esm2015/src/application_ref.js +29 -8
- package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm2015/src/di/injector_marker.js +1 -1
- package/esm2015/src/linker/component_factory_resolver.js +4 -1
- package/esm2015/src/linker/element_ref.js +1 -1
- package/esm2015/src/linker/query_list.js +2 -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/metadata/ng_module.js +1 -1
- package/esm2015/src/metadata/schema.js +5 -1
- package/esm2015/src/render3/definition.js +16 -16
- package/esm2015/src/render3/node_assert.js +1 -1
- package/esm2015/src/util/assert.js +1 -1
- package/esm2015/src/util/decorators.js +1 -1
- package/esm2015/src/util/dom.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/src/view/util.js +3 -1
- package/esm2015/testing/src/r3_test_bed.js +84 -7
- package/esm2015/testing/src/test_bed.js +99 -18
- 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 +55 -24
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +202 -26
- package/fesm2015/testing.js.map +1 -1
- package/package.json +2 -2
- package/schematics/migrations/can-activate-with-redirect-to/util.js +1 -1
- package/schematics/migrations/can-activate-with-redirect-to/util.mjs +1 -1
- package/schematics/migrations/initial-navigation/collector.js +3 -2
- package/schematics/migrations/initial-navigation/collector.mjs +3 -2
- package/schematics/migrations/navigation-extras-omissions/util.js +2 -3
- package/schematics/migrations/navigation-extras-omissions/util.mjs +2 -3
- package/schematics/migrations/relative-link-resolution/collector.js +3 -2
- package/schematics/migrations/relative-link-resolution/collector.mjs +3 -2
- package/schematics/migrations/relative-link-resolution/update_recorder.js +1 -1
- package/schematics/migrations/relative-link-resolution/update_recorder.mjs +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.js +2 -2
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.mjs +2 -2
- package/schematics/migrations/xhr-factory/index.js +1 -1
- package/schematics/migrations/xhr-factory/index.mjs +1 -1
- package/schematics/utils/typescript/imports.js +2 -2
- package/schematics/utils/typescript/imports.mjs +2 -2
- package/src/r3_symbols.d.ts +4 -1
- package/testing/testing.d.ts +63 -5
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/esm2015/testing/src/before_each.js +0 -33
package/fesm2015/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.
|
|
2
|
+
* @license Angular v12.1.1
|
|
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
|
|
@@ -6548,6 +6548,10 @@ const CUSTOM_ELEMENTS_SCHEMA = {
|
|
|
6548
6548
|
/**
|
|
6549
6549
|
* Defines a schema that allows any property on any element.
|
|
6550
6550
|
*
|
|
6551
|
+
* This schema allows you to ignore the errors related to any unknown elements or properties in a
|
|
6552
|
+
* template. The usage of this schema is generally discouraged because it prevents useful validation
|
|
6553
|
+
* and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
|
|
6554
|
+
*
|
|
6551
6555
|
* @publicApi
|
|
6552
6556
|
*/
|
|
6553
6557
|
const NO_ERRORS_SCHEMA = {
|
|
@@ -21244,6 +21248,9 @@ class _NullComponentFactoryResolver {
|
|
|
21244
21248
|
* then use the factory's `create()` method to create a component of that type.
|
|
21245
21249
|
*
|
|
21246
21250
|
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
21251
|
+
* @see [Usage Example](guide/dynamic-component-loader#resolving-components)
|
|
21252
|
+
* @see <live-example name="dynamic-component-loader" noDownload></live-example>
|
|
21253
|
+
of the code in this cookbook
|
|
21247
21254
|
* @publicApi
|
|
21248
21255
|
*/
|
|
21249
21256
|
class ComponentFactoryResolver {
|
|
@@ -21462,7 +21469,7 @@ class Version {
|
|
|
21462
21469
|
/**
|
|
21463
21470
|
* @publicApi
|
|
21464
21471
|
*/
|
|
21465
|
-
const VERSION = new Version('12.1.
|
|
21472
|
+
const VERSION = new Version('12.1.1');
|
|
21466
21473
|
|
|
21467
21474
|
/**
|
|
21468
21475
|
* @license
|
|
@@ -23650,6 +23657,8 @@ function getParentRenderElement(view, renderHost, def) {
|
|
|
23650
23657
|
(renderParent.element.componentRendererType.encapsulation ===
|
|
23651
23658
|
ViewEncapsulation.ShadowDom ||
|
|
23652
23659
|
// TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.
|
|
23660
|
+
// @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum
|
|
23661
|
+
// value that is not known (but previously was the value for ViewEncapsulation.Native)
|
|
23653
23662
|
renderParent.element.componentRendererType.encapsulation === 1))) {
|
|
23654
23663
|
// only children of non components, or children of components with native encapsulation should
|
|
23655
23664
|
// be attached.
|
|
@@ -26138,6 +26147,7 @@ class QueryList {
|
|
|
26138
26147
|
this.changes.unsubscribe();
|
|
26139
26148
|
}
|
|
26140
26149
|
}
|
|
26150
|
+
Symbol.iterator;
|
|
26141
26151
|
|
|
26142
26152
|
/**
|
|
26143
26153
|
* @license
|
|
@@ -29557,20 +29567,41 @@ class ApplicationRef {
|
|
|
29557
29567
|
merge$1(isCurrentlyStable, isStable.pipe(share()));
|
|
29558
29568
|
}
|
|
29559
29569
|
/**
|
|
29560
|
-
* Bootstrap a
|
|
29570
|
+
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
29571
|
+
* specified element.
|
|
29561
29572
|
*
|
|
29562
29573
|
* @usageNotes
|
|
29563
29574
|
* ### Bootstrap process
|
|
29564
29575
|
*
|
|
29565
|
-
* When bootstrapping a
|
|
29566
|
-
*
|
|
29567
|
-
*
|
|
29576
|
+
* When bootstrapping a component, Angular mounts it onto a target DOM element
|
|
29577
|
+
* and kicks off automatic change detection. The target DOM element can be
|
|
29578
|
+
* provided using the `rootSelectorOrNode` argument.
|
|
29568
29579
|
*
|
|
29569
|
-
*
|
|
29570
|
-
*
|
|
29580
|
+
* If the target DOM element is not provided, Angular tries to find one on a page
|
|
29581
|
+
* using the `selector` of the component that is being bootstrapped
|
|
29582
|
+
* (first matched element is used).
|
|
29571
29583
|
*
|
|
29572
29584
|
* ### Example
|
|
29573
|
-
*
|
|
29585
|
+
*
|
|
29586
|
+
* Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
|
29587
|
+
* but it requires us to know the component while writing the application code.
|
|
29588
|
+
*
|
|
29589
|
+
* Imagine a situation where we have to wait for an API call to decide about the component to
|
|
29590
|
+
* bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
|
29591
|
+
* dynamically bootstrap a component.
|
|
29592
|
+
*
|
|
29593
|
+
* {@example core/ts/platform/platform.ts region='componentSelector'}
|
|
29594
|
+
*
|
|
29595
|
+
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
29596
|
+
* selector of the bootstrapped component.
|
|
29597
|
+
*
|
|
29598
|
+
* In the following example, we are providing a CSS selector to match the target element.
|
|
29599
|
+
*
|
|
29600
|
+
* {@example core/ts/platform/platform.ts region='cssSelector'}
|
|
29601
|
+
*
|
|
29602
|
+
* While in this example, we are providing reference to a DOM node.
|
|
29603
|
+
*
|
|
29604
|
+
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
29574
29605
|
*/
|
|
29575
29606
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
29576
29607
|
if (!this._initStatus.done) {
|