@angular/core 15.0.2 → 15.0.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/esm2020/src/application_init.mjs +2 -1
- package/esm2020/src/application_ref.mjs +9 -2
- package/esm2020/src/di/create_injector.mjs +1 -1
- package/esm2020/src/di/r3_injector.mjs +2 -2
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/render3/assert.mjs +1 -6
- package/esm2020/src/render3/instructions/shared.mjs +9 -8
- package/esm2020/src/render3/namespaces.mjs +1 -8
- package/esm2020/src/render3/node_manipulation.mjs +3 -7
- package/esm2020/src/render3/node_selector_matcher.mjs +1 -4
- package/esm2020/src/render3/query.mjs +1 -6
- package/esm2020/src/render3/state.mjs +1 -4
- package/esm2020/src/render3/util/view_utils.mjs +1 -15
- package/esm2020/src/util/array_utils.mjs +3 -71
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/test_bed.mjs +1 -1
- package/fesm2015/core.mjs +27 -162
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +18 -161
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +27 -162
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +18 -161
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/schematics/migrations.json +3 -18
- package/testing/index.d.ts +4 -1
- package/schematics/migrations/entry-components/index.d.ts +0 -11
- package/schematics/migrations/entry-components/index.js +0 -71
- package/schematics/migrations/entry-components/util.d.ts +0 -16
- package/schematics/migrations/entry-components/util.js +0 -57
- package/schematics/migrations/path-match-type/index.d.ts +0 -11
- package/schematics/migrations/path-match-type/index.js +0 -95
- package/schematics/migrations/path-match-type/transform.d.ts +0 -19
- package/schematics/migrations/path-match-type/transform.js +0 -48
- package/schematics/migrations/path-match-type/update_recorder.d.ts +0 -18
- package/schematics/migrations/path-match-type/update_recorder.js +0 -20
- package/schematics/migrations/path-match-type/util.d.ts +0 -11
- package/schematics/migrations/path-match-type/util.js +0 -106
- package/schematics/migrations/typed-forms/index.d.ts +0 -10
- package/schematics/migrations/typed-forms/index.js +0 -68
- package/schematics/migrations/typed-forms/util.d.ts +0 -19
- package/schematics/migrations/typed-forms/util.js +0 -134
package/fesm2015/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1095,17 +1095,6 @@ function assertOneOf(value, ...validValues) {
|
|
|
1095
1095
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1096
1096
|
* found in the LICENSE file at https://angular.io/license
|
|
1097
1097
|
*/
|
|
1098
|
-
/**
|
|
1099
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
1100
|
-
*
|
|
1101
|
-
* @param items The items to add
|
|
1102
|
-
* @param arr The array to which you want to add the items
|
|
1103
|
-
*/
|
|
1104
|
-
function addAllToArray(items, arr) {
|
|
1105
|
-
for (let i = 0; i < items.length; i++) {
|
|
1106
|
-
arr.push(items[i]);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
1098
|
/**
|
|
1110
1099
|
* Determines if the contents of two arrays is identical
|
|
1111
1100
|
*
|
|
@@ -1133,25 +1122,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
1133
1122
|
/**
|
|
1134
1123
|
* Flattens an array.
|
|
1135
1124
|
*/
|
|
1136
|
-
function flatten$1(list
|
|
1137
|
-
|
|
1138
|
-
dst = list;
|
|
1139
|
-
for (let i = 0; i < list.length; i++) {
|
|
1140
|
-
let item = list[i];
|
|
1141
|
-
if (Array.isArray(item)) {
|
|
1142
|
-
// we need to inline it.
|
|
1143
|
-
if (dst === list) {
|
|
1144
|
-
// Our assumption that the list was already flat was wrong and
|
|
1145
|
-
// we need to clone flat since we need to write to it.
|
|
1146
|
-
dst = list.slice(0, i);
|
|
1147
|
-
}
|
|
1148
|
-
flatten$1(item, dst);
|
|
1149
|
-
}
|
|
1150
|
-
else if (dst !== list) {
|
|
1151
|
-
dst.push(item);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
return dst;
|
|
1125
|
+
function flatten$1(list) {
|
|
1126
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
1155
1127
|
}
|
|
1156
1128
|
function deepForEach(input, fn) {
|
|
1157
1129
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -1261,46 +1233,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
1261
1233
|
array[index + 1] = value2;
|
|
1262
1234
|
}
|
|
1263
1235
|
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
1266
|
-
*
|
|
1267
|
-
* NOTE:
|
|
1268
|
-
* - Duplicates are not allowed, and are ignored.
|
|
1269
|
-
* - This uses binary search algorithm for fast inserts.
|
|
1270
|
-
*
|
|
1271
|
-
* @param array A sorted array to insert into.
|
|
1272
|
-
* @param value The value to insert.
|
|
1273
|
-
* @returns index of the inserted value.
|
|
1274
|
-
*/
|
|
1275
|
-
function arrayInsertSorted(array, value) {
|
|
1276
|
-
let index = arrayIndexOfSorted(array, value);
|
|
1277
|
-
if (index < 0) {
|
|
1278
|
-
// if we did not find it insert it.
|
|
1279
|
-
index = ~index;
|
|
1280
|
-
arrayInsert(array, index, value);
|
|
1281
|
-
}
|
|
1282
|
-
return index;
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
* Remove `value` from a sorted `array`.
|
|
1286
|
-
*
|
|
1287
|
-
* NOTE:
|
|
1288
|
-
* - This uses binary search algorithm for fast removals.
|
|
1289
|
-
*
|
|
1290
|
-
* @param array A sorted array to remove from.
|
|
1291
|
-
* @param value The value to remove.
|
|
1292
|
-
* @returns index of the removed value.
|
|
1293
|
-
* - positive index if value found and removed.
|
|
1294
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
1295
|
-
* inserted)
|
|
1296
|
-
*/
|
|
1297
|
-
function arrayRemoveSorted(array, value) {
|
|
1298
|
-
const index = arrayIndexOfSorted(array, value);
|
|
1299
|
-
if (index >= 0) {
|
|
1300
|
-
arraySplice(array, index, 1);
|
|
1301
|
-
}
|
|
1302
|
-
return index;
|
|
1303
|
-
}
|
|
1304
1236
|
/**
|
|
1305
1237
|
* Get an index of an `value` in a sorted `array`.
|
|
1306
1238
|
*
|
|
@@ -2851,7 +2783,7 @@ const MOVED_VIEWS = 9;
|
|
|
2851
2783
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
2852
2784
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2853
2785
|
// failure based on types.
|
|
2854
|
-
const unusedValueExportToPlacateAjd$
|
|
2786
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
2855
2787
|
|
|
2856
2788
|
/**
|
|
2857
2789
|
* @license
|
|
@@ -2896,7 +2828,7 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
2896
2828
|
const HEADER_OFFSET = 22;
|
|
2897
2829
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2898
2830
|
// failure based on types.
|
|
2899
|
-
const unusedValueExportToPlacateAjd$
|
|
2831
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
2900
2832
|
|
|
2901
2833
|
/**
|
|
2902
2834
|
* @license
|
|
@@ -2981,11 +2913,6 @@ function assertHasParent(tNode) {
|
|
|
2981
2913
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
2982
2914
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
2983
2915
|
}
|
|
2984
|
-
function assertDataNext(lView, index, arr) {
|
|
2985
|
-
if (arr == null)
|
|
2986
|
-
arr = lView;
|
|
2987
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
2988
|
-
}
|
|
2989
2916
|
function assertLContainer(value) {
|
|
2990
2917
|
assertDefined(value, 'LContainer must be defined');
|
|
2991
2918
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -3234,14 +3161,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
3234
3161
|
* found in the LICENSE file at https://angular.io/license
|
|
3235
3162
|
*/
|
|
3236
3163
|
const SVG_NAMESPACE = 'svg';
|
|
3237
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
3238
3164
|
const MATH_ML_NAMESPACE = 'math';
|
|
3239
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
3240
|
-
function getNamespaceUri(namespace) {
|
|
3241
|
-
const name = namespace.toLowerCase();
|
|
3242
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
3243
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
3244
|
-
}
|
|
3245
3165
|
|
|
3246
3166
|
/**
|
|
3247
3167
|
* @license
|
|
@@ -3290,20 +3210,6 @@ function unwrapLView(value) {
|
|
|
3290
3210
|
}
|
|
3291
3211
|
return null;
|
|
3292
3212
|
}
|
|
3293
|
-
/**
|
|
3294
|
-
* Returns `LContainer` or `null` if not found.
|
|
3295
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
3296
|
-
*/
|
|
3297
|
-
function unwrapLContainer(value) {
|
|
3298
|
-
while (Array.isArray(value)) {
|
|
3299
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
3300
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
3301
|
-
if (value[TYPE] === true)
|
|
3302
|
-
return value;
|
|
3303
|
-
value = value[HOST];
|
|
3304
|
-
}
|
|
3305
|
-
return null;
|
|
3306
|
-
}
|
|
3307
3213
|
/**
|
|
3308
3214
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
3309
3215
|
* from any containers, component views, or style contexts.
|
|
@@ -3563,9 +3469,6 @@ function isCurrentTNodeParent() {
|
|
|
3563
3469
|
function setCurrentTNodeAsNotParent() {
|
|
3564
3470
|
instructionState.lFrame.isParent = false;
|
|
3565
3471
|
}
|
|
3566
|
-
function setCurrentTNodeAsParent() {
|
|
3567
|
-
instructionState.lFrame.isParent = true;
|
|
3568
|
-
}
|
|
3569
3472
|
function getContextLView() {
|
|
3570
3473
|
const contextLView = instructionState.lFrame.contextLView;
|
|
3571
3474
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -4288,7 +4191,7 @@ function isFactory(obj) {
|
|
|
4288
4191
|
}
|
|
4289
4192
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4290
4193
|
// failure based on types.
|
|
4291
|
-
const unusedValueExportToPlacateAjd$
|
|
4194
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
4292
4195
|
|
|
4293
4196
|
/**
|
|
4294
4197
|
* Converts `TNodeType` into human readable text.
|
|
@@ -4307,7 +4210,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
4307
4210
|
}
|
|
4308
4211
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4309
4212
|
// failure based on types.
|
|
4310
|
-
const unusedValueExportToPlacateAjd$
|
|
4213
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
4311
4214
|
/**
|
|
4312
4215
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
4313
4216
|
*
|
|
@@ -6348,28 +6251,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6348
6251
|
}
|
|
6349
6252
|
}
|
|
6350
6253
|
|
|
6351
|
-
/**
|
|
6352
|
-
* @license
|
|
6353
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6354
|
-
*
|
|
6355
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6356
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6357
|
-
*/
|
|
6358
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6359
|
-
// failure based on types.
|
|
6360
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6361
|
-
|
|
6362
|
-
/**
|
|
6363
|
-
* @license
|
|
6364
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6365
|
-
*
|
|
6366
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6367
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6368
|
-
*/
|
|
6369
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6370
|
-
// failure based on types.
|
|
6371
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6372
|
-
|
|
6373
6254
|
/**
|
|
6374
6255
|
* @license
|
|
6375
6256
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6441,7 +6322,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6441
6322
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6442
6323
|
* found in the LICENSE file at https://angular.io/license
|
|
6443
6324
|
*/
|
|
6444
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$8 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$7;
|
|
6445
6325
|
/**
|
|
6446
6326
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6447
6327
|
* being passed as an argument.
|
|
@@ -9082,7 +8962,7 @@ class R3Injector extends EnvironmentInjector {
|
|
|
9082
8962
|
try {
|
|
9083
8963
|
const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);
|
|
9084
8964
|
if (ngDevMode && !Array.isArray(initializers)) {
|
|
9085
|
-
throw new RuntimeError(209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +
|
|
8965
|
+
throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +
|
|
9086
8966
|
`(expected an array, but got ${typeof initializers}). ` +
|
|
9087
8967
|
'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +
|
|
9088
8968
|
'`multi: true` provider.');
|
|
@@ -9512,7 +9392,7 @@ class Version {
|
|
|
9512
9392
|
/**
|
|
9513
9393
|
* @publicApi
|
|
9514
9394
|
*/
|
|
9515
|
-
const VERSION = new Version('15.0.
|
|
9395
|
+
const VERSION = new Version('15.0.4');
|
|
9516
9396
|
|
|
9517
9397
|
/**
|
|
9518
9398
|
* @license
|
|
@@ -9778,7 +9658,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9778
9658
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9779
9659
|
* found in the LICENSE file at https://angular.io/license
|
|
9780
9660
|
*/
|
|
9781
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9782
9661
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9783
9662
|
/**
|
|
9784
9663
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -12238,6 +12117,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
12238
12117
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
12239
12118
|
const start = tNode.directiveStart;
|
|
12240
12119
|
const end = tNode.directiveEnd;
|
|
12120
|
+
// The component view needs to be created before creating the node injector
|
|
12121
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
12122
|
+
if (isComponentHost(tNode)) {
|
|
12123
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12124
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
12125
|
+
}
|
|
12241
12126
|
if (!tView.firstCreatePass) {
|
|
12242
12127
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
12243
12128
|
}
|
|
@@ -12245,19 +12130,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
12245
12130
|
const initialInputs = tNode.initialInputs;
|
|
12246
12131
|
for (let i = start; i < end; i++) {
|
|
12247
12132
|
const def = tView.data[i];
|
|
12248
|
-
const isComponent = isComponentDef(def);
|
|
12249
|
-
if (isComponent) {
|
|
12250
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12251
|
-
addComponentLogic(lView, tNode, def);
|
|
12252
|
-
}
|
|
12253
12133
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
12254
12134
|
attachPatchData(directive, lView);
|
|
12255
12135
|
if (initialInputs !== null) {
|
|
12256
12136
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
12257
12137
|
}
|
|
12258
|
-
if (
|
|
12138
|
+
if (isComponentDef(def)) {
|
|
12259
12139
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
12260
|
-
componentView[CONTEXT] =
|
|
12140
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
12261
12141
|
}
|
|
12262
12142
|
}
|
|
12263
12143
|
}
|
|
@@ -19161,7 +19041,7 @@ var I18nCreateOpCode;
|
|
|
19161
19041
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
19162
19042
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
19163
19043
|
// failure based on types.
|
|
19164
|
-
const unusedValueExportToPlacateAjd
|
|
19044
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
19165
19045
|
|
|
19166
19046
|
/**
|
|
19167
19047
|
* @license
|
|
@@ -23159,29 +23039,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
23159
23039
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23160
23040
|
* found in the LICENSE file at https://angular.io/license
|
|
23161
23041
|
*/
|
|
23162
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23163
|
-
// failure based on types.
|
|
23164
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
23165
|
-
|
|
23166
|
-
/**
|
|
23167
|
-
* @license
|
|
23168
|
-
* Copyright Google LLC All Rights Reserved.
|
|
23169
|
-
*
|
|
23170
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
23171
|
-
* found in the LICENSE file at https://angular.io/license
|
|
23172
|
-
*/
|
|
23173
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23174
|
-
// failure based on types.
|
|
23175
|
-
const unusedValueExportToPlacateAjd = 1;
|
|
23176
|
-
|
|
23177
|
-
/**
|
|
23178
|
-
* @license
|
|
23179
|
-
* Copyright Google LLC All Rights Reserved.
|
|
23180
|
-
*
|
|
23181
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
23182
|
-
* found in the LICENSE file at https://angular.io/license
|
|
23183
|
-
*/
|
|
23184
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
23185
23042
|
class LQuery_ {
|
|
23186
23043
|
constructor(queryList) {
|
|
23187
23044
|
this.queryList = queryList;
|