@angular/core 15.2.0 → 15.2.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/esm2020/src/core_render3_private_export.mjs +2 -1
- package/esm2020/src/linker/query_list.mjs +6 -7
- package/esm2020/src/render3/instructions/element.mjs +10 -9
- package/esm2020/src/render3/instructions/shared.mjs +3 -4
- package/esm2020/src/render3/interfaces/node.mjs +1 -1
- package/esm2020/src/util/iterable.mjs +6 -7
- 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/fesm2015/core.mjs +24 -46
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +23 -45
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +24 -46
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +23 -45
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +10 -1
- package/package.json +2 -2
- package/schematics/migrations/relative-link-resolution/bundle.js +7 -7
- package/schematics/migrations/router-link-with-href/bundle.js +10 -10
- package/schematics/ng-generate/standalone-migration/bundle.js +401 -367
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +1 -1
- package/esm2020/src/util/symbol.mjs +0 -30
package/fesm2015/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8750,7 +8750,7 @@ class Version {
|
|
|
8750
8750
|
/**
|
|
8751
8751
|
* @publicApi
|
|
8752
8752
|
*/
|
|
8753
|
-
const VERSION = new Version('15.2.
|
|
8753
|
+
const VERSION = new Version('15.2.1');
|
|
8754
8754
|
|
|
8755
8755
|
// This default value is when checking the hierarchy for a token.
|
|
8756
8756
|
//
|
|
@@ -10564,6 +10564,7 @@ function createTNodeAtIndex(tView, index, type, name, attrs) {
|
|
|
10564
10564
|
// In the case of i18n the `currentTNode` may already be linked, in which case we don't want
|
|
10565
10565
|
// to break the links which i18n created.
|
|
10566
10566
|
currentTNode.next = tNode;
|
|
10567
|
+
tNode.prev = currentTNode;
|
|
10567
10568
|
}
|
|
10568
10569
|
}
|
|
10569
10570
|
}
|
|
@@ -11004,6 +11005,7 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
11004
11005
|
outputs: null,
|
|
11005
11006
|
tViews: null,
|
|
11006
11007
|
next: null,
|
|
11008
|
+
prev: null,
|
|
11007
11009
|
projectionNext: null,
|
|
11008
11010
|
child: null,
|
|
11009
11011
|
parent: tParent,
|
|
@@ -11213,7 +11215,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11213
11215
|
// Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in
|
|
11214
11216
|
// tsickle.
|
|
11215
11217
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11216
|
-
let hasDirectives = false;
|
|
11217
11218
|
if (getBindingsEnabled()) {
|
|
11218
11219
|
const exportsMap = localRefs === null ? null : { '': -1 };
|
|
11219
11220
|
const matchResult = findDirectiveDefMatches(tView, tNode);
|
|
@@ -11226,7 +11227,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11226
11227
|
[directiveDefs, hostDirectiveDefs] = matchResult;
|
|
11227
11228
|
}
|
|
11228
11229
|
if (directiveDefs !== null) {
|
|
11229
|
-
hasDirectives = true;
|
|
11230
11230
|
initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);
|
|
11231
11231
|
}
|
|
11232
11232
|
if (exportsMap)
|
|
@@ -11234,7 +11234,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11234
11234
|
}
|
|
11235
11235
|
// Merge the template attrs last so that they have the highest priority.
|
|
11236
11236
|
tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
|
|
11237
|
-
return hasDirectives;
|
|
11238
11237
|
}
|
|
11239
11238
|
/** Initializes the data structures necessary for a list of directives to be instantiated. */
|
|
11240
11239
|
function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {
|
|
@@ -13101,41 +13100,19 @@ function validateMappings(bindingType, def, hostDirectiveBindings) {
|
|
|
13101
13100
|
}
|
|
13102
13101
|
}
|
|
13103
13102
|
|
|
13104
|
-
let _symbolIterator = null;
|
|
13105
|
-
function getSymbolIterator() {
|
|
13106
|
-
if (!_symbolIterator) {
|
|
13107
|
-
const Symbol = _global$1['Symbol'];
|
|
13108
|
-
if (Symbol && Symbol.iterator) {
|
|
13109
|
-
_symbolIterator = Symbol.iterator;
|
|
13110
|
-
}
|
|
13111
|
-
else {
|
|
13112
|
-
// es6-shim specific logic
|
|
13113
|
-
const keys = Object.getOwnPropertyNames(Map.prototype);
|
|
13114
|
-
for (let i = 0; i < keys.length; ++i) {
|
|
13115
|
-
const key = keys[i];
|
|
13116
|
-
if (key !== 'entries' && key !== 'size' &&
|
|
13117
|
-
Map.prototype[key] === Map.prototype['entries']) {
|
|
13118
|
-
_symbolIterator = key;
|
|
13119
|
-
}
|
|
13120
|
-
}
|
|
13121
|
-
}
|
|
13122
|
-
}
|
|
13123
|
-
return _symbolIterator;
|
|
13124
|
-
}
|
|
13125
|
-
|
|
13126
13103
|
function isIterable(obj) {
|
|
13127
|
-
return obj !== null && typeof obj === 'object' && obj[
|
|
13104
|
+
return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;
|
|
13128
13105
|
}
|
|
13129
13106
|
function isListLikeIterable(obj) {
|
|
13130
13107
|
if (!isJsObject(obj))
|
|
13131
13108
|
return false;
|
|
13132
13109
|
return Array.isArray(obj) ||
|
|
13133
13110
|
(!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
|
|
13134
|
-
|
|
13111
|
+
Symbol.iterator in obj); // JS Iterable have a Symbol.iterator prop
|
|
13135
13112
|
}
|
|
13136
13113
|
function areIterablesEqual(a, b, comparator) {
|
|
13137
|
-
const iterator1 = a[
|
|
13138
|
-
const iterator2 = b[
|
|
13114
|
+
const iterator1 = a[Symbol.iterator]();
|
|
13115
|
+
const iterator2 = b[Symbol.iterator]();
|
|
13139
13116
|
while (true) {
|
|
13140
13117
|
const item1 = iterator1.next();
|
|
13141
13118
|
const item2 = iterator2.next();
|
|
@@ -13154,7 +13131,7 @@ function iterateListLike(obj, fn) {
|
|
|
13154
13131
|
}
|
|
13155
13132
|
}
|
|
13156
13133
|
else {
|
|
13157
|
-
const iterator = obj[
|
|
13134
|
+
const iterator = obj[Symbol.iterator]();
|
|
13158
13135
|
let item;
|
|
13159
13136
|
while (!((item = iterator.next()).done)) {
|
|
13160
13137
|
fn(item.value);
|
|
@@ -13917,16 +13894,13 @@ function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isCla
|
|
|
13917
13894
|
setInputsForProperty(tView, lView, inputs[property], property, value);
|
|
13918
13895
|
}
|
|
13919
13896
|
|
|
13920
|
-
function elementStartFirstCreatePass(index, tView, lView,
|
|
13897
|
+
function elementStartFirstCreatePass(index, tView, lView, name, attrsIndex, localRefsIndex) {
|
|
13921
13898
|
ngDevMode && assertFirstCreatePass(tView);
|
|
13922
13899
|
ngDevMode && ngDevMode.firstCreatePass++;
|
|
13923
13900
|
const tViewConsts = tView.consts;
|
|
13924
13901
|
const attrs = getConstant(tViewConsts, attrsIndex);
|
|
13925
13902
|
const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);
|
|
13926
|
-
|
|
13927
|
-
if (ngDevMode) {
|
|
13928
|
-
validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);
|
|
13929
|
-
}
|
|
13903
|
+
resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
|
|
13930
13904
|
if (tNode.attrs !== null) {
|
|
13931
13905
|
computeStaticStyling(tNode, tNode.attrs, false);
|
|
13932
13906
|
}
|
|
@@ -13961,10 +13935,14 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
13961
13935
|
assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');
|
|
13962
13936
|
ngDevMode && assertIndexInRange(lView, adjustedIndex);
|
|
13963
13937
|
const renderer = lView[RENDERER];
|
|
13964
|
-
const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());
|
|
13965
13938
|
const tNode = tView.firstCreatePass ?
|
|
13966
|
-
elementStartFirstCreatePass(adjustedIndex, tView, lView,
|
|
13939
|
+
elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex) :
|
|
13967
13940
|
tView.data[adjustedIndex];
|
|
13941
|
+
const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());
|
|
13942
|
+
const hasDirectives = isDirectiveHost(tNode);
|
|
13943
|
+
if (ngDevMode && tView.firstCreatePass) {
|
|
13944
|
+
validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);
|
|
13945
|
+
}
|
|
13968
13946
|
setCurrentTNode(tNode, true);
|
|
13969
13947
|
setupStaticAttributes(renderer, native, tNode);
|
|
13970
13948
|
if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {
|
|
@@ -13979,7 +13957,7 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
13979
13957
|
attachPatchData(native, lView);
|
|
13980
13958
|
}
|
|
13981
13959
|
increaseElementDepthCount();
|
|
13982
|
-
if (
|
|
13960
|
+
if (hasDirectives) {
|
|
13983
13961
|
createDirectivesInstances(tView, lView, tNode);
|
|
13984
13962
|
executeContentQueries(tView, tNode, lView);
|
|
13985
13963
|
}
|
|
@@ -21295,7 +21273,8 @@ function _wrapInTimeout(fn) {
|
|
|
21295
21273
|
const EventEmitter = EventEmitter_;
|
|
21296
21274
|
|
|
21297
21275
|
function symbolIterator() {
|
|
21298
|
-
|
|
21276
|
+
// @ts-expect-error accessing a private member
|
|
21277
|
+
return this._results[Symbol.iterator]();
|
|
21299
21278
|
}
|
|
21300
21279
|
/**
|
|
21301
21280
|
* An unmodifiable list of items that Angular keeps up to date when the state
|
|
@@ -21347,11 +21326,10 @@ class QueryList {
|
|
|
21347
21326
|
// This function should be declared on the prototype, but doing so there will cause the class
|
|
21348
21327
|
// declaration to have side-effects and become not tree-shakable. For this reason we do it in
|
|
21349
21328
|
// the constructor.
|
|
21350
|
-
// [
|
|
21351
|
-
const symbol = getSymbolIterator();
|
|
21329
|
+
// [Symbol.iterator](): Iterator<T> { ... }
|
|
21352
21330
|
const proto = QueryList.prototype;
|
|
21353
|
-
if (!proto[
|
|
21354
|
-
proto[
|
|
21331
|
+
if (!proto[Symbol.iterator])
|
|
21332
|
+
proto[Symbol.iterator] = symbolIterator;
|
|
21355
21333
|
}
|
|
21356
21334
|
/**
|
|
21357
21335
|
* Returns the QueryList entry at `index`.
|