@angular/core 12.1.0-next.3 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +229 -101
- 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 +269 -19
- 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/debug/debug_node.js +1 -1
- package/esm2015/src/di/injectable.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/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 +103 -42
- 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/esm2015/testing/src/testing_internal.js +1 -182
- package/fesm2015/core.js +55 -24
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +206 -77
- 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 -10
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/esm2015/testing/src/async_test_completer.js +0 -28
- package/esm2015/testing/src/before_each.js +0 -33
package/bundles/core.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.0
|
|
2
|
+
* @license Angular v12.1.0
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -358,10 +358,16 @@
|
|
|
358
358
|
r[k] = a[j];
|
|
359
359
|
return r;
|
|
360
360
|
}
|
|
361
|
-
function __spreadArray(to, from) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
361
|
+
function __spreadArray(to, from, pack) {
|
|
362
|
+
if (pack || arguments.length === 2)
|
|
363
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
364
|
+
if (ar || !(i in from)) {
|
|
365
|
+
if (!ar)
|
|
366
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
367
|
+
ar[i] = from[i];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return to.concat(ar || from);
|
|
365
371
|
}
|
|
366
372
|
function __await(v) {
|
|
367
373
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -1236,22 +1242,22 @@
|
|
|
1236
1242
|
* @codeGenApi
|
|
1237
1243
|
*/
|
|
1238
1244
|
function ɵɵdefineNgModule(def) {
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1245
|
+
return noSideEffects(function () {
|
|
1246
|
+
var res = {
|
|
1247
|
+
type: def.type,
|
|
1248
|
+
bootstrap: def.bootstrap || EMPTY_ARRAY,
|
|
1249
|
+
declarations: def.declarations || EMPTY_ARRAY,
|
|
1250
|
+
imports: def.imports || EMPTY_ARRAY,
|
|
1251
|
+
exports: def.exports || EMPTY_ARRAY,
|
|
1252
|
+
transitiveCompileScopes: null,
|
|
1253
|
+
schemas: def.schemas || null,
|
|
1254
|
+
id: def.id || null,
|
|
1255
|
+
};
|
|
1256
|
+
if (def.id != null) {
|
|
1251
1257
|
autoRegisterModuleById[def.id] = def.type;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1258
|
+
}
|
|
1259
|
+
return res;
|
|
1260
|
+
});
|
|
1255
1261
|
}
|
|
1256
1262
|
/**
|
|
1257
1263
|
* Adds the module metadata that is necessary to compute the module's transitive scope to an
|
|
@@ -6888,6 +6894,10 @@
|
|
|
6888
6894
|
/**
|
|
6889
6895
|
* Defines a schema that allows any property on any element.
|
|
6890
6896
|
*
|
|
6897
|
+
* This schema allows you to ignore the errors related to any unknown elements or properties in a
|
|
6898
|
+
* template. The usage of this schema is generally discouraged because it prevents useful validation
|
|
6899
|
+
* and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
|
|
6900
|
+
*
|
|
6891
6901
|
* @publicApi
|
|
6892
6902
|
*/
|
|
6893
6903
|
var NO_ERRORS_SCHEMA = {
|
|
@@ -21791,6 +21801,9 @@
|
|
|
21791
21801
|
* then use the factory's `create()` method to create a component of that type.
|
|
21792
21802
|
*
|
|
21793
21803
|
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
21804
|
+
* @see [Usage Example](guide/dynamic-component-loader#resolving-components)
|
|
21805
|
+
* @see <live-example name="dynamic-component-loader" noDownload></live-example>
|
|
21806
|
+
of the code in this cookbook
|
|
21794
21807
|
* @publicApi
|
|
21795
21808
|
*/
|
|
21796
21809
|
var ComponentFactoryResolver = /** @class */ (function () {
|
|
@@ -22031,7 +22044,7 @@
|
|
|
22031
22044
|
/**
|
|
22032
22045
|
* @publicApi
|
|
22033
22046
|
*/
|
|
22034
|
-
var VERSION = new Version('12.1.0
|
|
22047
|
+
var VERSION = new Version('12.1.0');
|
|
22035
22048
|
|
|
22036
22049
|
/**
|
|
22037
22050
|
* @license
|
|
@@ -24277,6 +24290,8 @@
|
|
|
24277
24290
|
(renderParent.element.componentRendererType.encapsulation ===
|
|
24278
24291
|
exports.ViewEncapsulation.ShadowDom ||
|
|
24279
24292
|
// TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.
|
|
24293
|
+
// @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum
|
|
24294
|
+
// value that is not known (but previously was the value for ViewEncapsulation.Native)
|
|
24280
24295
|
renderParent.element.componentRendererType.encapsulation === 1))) {
|
|
24281
24296
|
// only children of non components, or children of components with native encapsulation should
|
|
24282
24297
|
// be attached.
|
|
@@ -26839,6 +26854,7 @@
|
|
|
26839
26854
|
};
|
|
26840
26855
|
return QueryList;
|
|
26841
26856
|
}());
|
|
26857
|
+
Symbol.iterator;
|
|
26842
26858
|
|
|
26843
26859
|
/**
|
|
26844
26860
|
* @license
|
|
@@ -30270,20 +30286,41 @@
|
|
|
30270
30286
|
rxjs.merge(isCurrentlyStable, isStable.pipe(operators.share()));
|
|
30271
30287
|
}
|
|
30272
30288
|
/**
|
|
30273
|
-
* Bootstrap a
|
|
30289
|
+
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
30290
|
+
* specified element.
|
|
30274
30291
|
*
|
|
30275
30292
|
* @usageNotes
|
|
30276
30293
|
* ### Bootstrap process
|
|
30277
30294
|
*
|
|
30278
|
-
* When bootstrapping a
|
|
30279
|
-
*
|
|
30280
|
-
*
|
|
30295
|
+
* When bootstrapping a component, Angular mounts it onto a target DOM element
|
|
30296
|
+
* and kicks off automatic change detection. The target DOM element can be
|
|
30297
|
+
* provided using the `rootSelectorOrNode` argument.
|
|
30281
30298
|
*
|
|
30282
|
-
*
|
|
30283
|
-
*
|
|
30299
|
+
* If the target DOM element is not provided, Angular tries to find one on a page
|
|
30300
|
+
* using the `selector` of the component that is being bootstrapped
|
|
30301
|
+
* (first matched element is used).
|
|
30284
30302
|
*
|
|
30285
30303
|
* ### Example
|
|
30286
|
-
*
|
|
30304
|
+
*
|
|
30305
|
+
* Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
|
30306
|
+
* but it requires us to know the component while writing the application code.
|
|
30307
|
+
*
|
|
30308
|
+
* Imagine a situation where we have to wait for an API call to decide about the component to
|
|
30309
|
+
* bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
|
30310
|
+
* dynamically bootstrap a component.
|
|
30311
|
+
*
|
|
30312
|
+
* {@example core/ts/platform/platform.ts region='componentSelector'}
|
|
30313
|
+
*
|
|
30314
|
+
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
30315
|
+
* selector of the bootstrapped component.
|
|
30316
|
+
*
|
|
30317
|
+
* In the following example, we are providing a CSS selector to match the target element.
|
|
30318
|
+
*
|
|
30319
|
+
* {@example core/ts/platform/platform.ts region='cssSelector'}
|
|
30320
|
+
*
|
|
30321
|
+
* While in this example, we are providing reference to a DOM node.
|
|
30322
|
+
*
|
|
30323
|
+
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
30287
30324
|
*/
|
|
30288
30325
|
ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {
|
|
30289
30326
|
var _this = this;
|