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