@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/fesm2020/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
|
*/
|
|
@@ -772,10 +772,9 @@ function getInheritedInjectableDef(type) {
|
|
|
772
772
|
const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);
|
|
773
773
|
if (def) {
|
|
774
774
|
const typeName = getTypeName(type);
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
`This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`);
|
|
775
|
+
ngDevMode &&
|
|
776
|
+
console.warn(`DEPRECATED: DI is instantiating a token "${typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` +
|
|
777
|
+
`This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`);
|
|
779
778
|
return def;
|
|
780
779
|
}
|
|
781
780
|
else {
|
|
@@ -8743,7 +8742,7 @@ class Version {
|
|
|
8743
8742
|
/**
|
|
8744
8743
|
* @publicApi
|
|
8745
8744
|
*/
|
|
8746
|
-
const VERSION = new Version('15.2.
|
|
8745
|
+
const VERSION = new Version('15.2.1');
|
|
8747
8746
|
|
|
8748
8747
|
// This default value is when checking the hierarchy for a token.
|
|
8749
8748
|
//
|
|
@@ -10556,6 +10555,7 @@ function createTNodeAtIndex(tView, index, type, name, attrs) {
|
|
|
10556
10555
|
// In the case of i18n the `currentTNode` may already be linked, in which case we don't want
|
|
10557
10556
|
// to break the links which i18n created.
|
|
10558
10557
|
currentTNode.next = tNode;
|
|
10558
|
+
tNode.prev = currentTNode;
|
|
10559
10559
|
}
|
|
10560
10560
|
}
|
|
10561
10561
|
}
|
|
@@ -10996,6 +10996,7 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
10996
10996
|
outputs: null,
|
|
10997
10997
|
tViews: null,
|
|
10998
10998
|
next: null,
|
|
10999
|
+
prev: null,
|
|
10999
11000
|
projectionNext: null,
|
|
11000
11001
|
child: null,
|
|
11001
11002
|
parent: tParent,
|
|
@@ -11205,7 +11206,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11205
11206
|
// Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in
|
|
11206
11207
|
// tsickle.
|
|
11207
11208
|
ngDevMode && assertFirstCreatePass(tView);
|
|
11208
|
-
let hasDirectives = false;
|
|
11209
11209
|
if (getBindingsEnabled()) {
|
|
11210
11210
|
const exportsMap = localRefs === null ? null : { '': -1 };
|
|
11211
11211
|
const matchResult = findDirectiveDefMatches(tView, tNode);
|
|
@@ -11218,7 +11218,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11218
11218
|
[directiveDefs, hostDirectiveDefs] = matchResult;
|
|
11219
11219
|
}
|
|
11220
11220
|
if (directiveDefs !== null) {
|
|
11221
|
-
hasDirectives = true;
|
|
11222
11221
|
initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);
|
|
11223
11222
|
}
|
|
11224
11223
|
if (exportsMap)
|
|
@@ -11226,7 +11225,6 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
11226
11225
|
}
|
|
11227
11226
|
// Merge the template attrs last so that they have the highest priority.
|
|
11228
11227
|
tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
|
|
11229
|
-
return hasDirectives;
|
|
11230
11228
|
}
|
|
11231
11229
|
/** Initializes the data structures necessary for a list of directives to be instantiated. */
|
|
11232
11230
|
function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {
|
|
@@ -13092,41 +13090,19 @@ function validateMappings(bindingType, def, hostDirectiveBindings) {
|
|
|
13092
13090
|
}
|
|
13093
13091
|
}
|
|
13094
13092
|
|
|
13095
|
-
let _symbolIterator = null;
|
|
13096
|
-
function getSymbolIterator() {
|
|
13097
|
-
if (!_symbolIterator) {
|
|
13098
|
-
const Symbol = _global$1['Symbol'];
|
|
13099
|
-
if (Symbol && Symbol.iterator) {
|
|
13100
|
-
_symbolIterator = Symbol.iterator;
|
|
13101
|
-
}
|
|
13102
|
-
else {
|
|
13103
|
-
// es6-shim specific logic
|
|
13104
|
-
const keys = Object.getOwnPropertyNames(Map.prototype);
|
|
13105
|
-
for (let i = 0; i < keys.length; ++i) {
|
|
13106
|
-
const key = keys[i];
|
|
13107
|
-
if (key !== 'entries' && key !== 'size' &&
|
|
13108
|
-
Map.prototype[key] === Map.prototype['entries']) {
|
|
13109
|
-
_symbolIterator = key;
|
|
13110
|
-
}
|
|
13111
|
-
}
|
|
13112
|
-
}
|
|
13113
|
-
}
|
|
13114
|
-
return _symbolIterator;
|
|
13115
|
-
}
|
|
13116
|
-
|
|
13117
13093
|
function isIterable(obj) {
|
|
13118
|
-
return obj !== null && typeof obj === 'object' && obj[
|
|
13094
|
+
return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;
|
|
13119
13095
|
}
|
|
13120
13096
|
function isListLikeIterable(obj) {
|
|
13121
13097
|
if (!isJsObject(obj))
|
|
13122
13098
|
return false;
|
|
13123
13099
|
return Array.isArray(obj) ||
|
|
13124
13100
|
(!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
|
|
13125
|
-
|
|
13101
|
+
Symbol.iterator in obj); // JS Iterable have a Symbol.iterator prop
|
|
13126
13102
|
}
|
|
13127
13103
|
function areIterablesEqual(a, b, comparator) {
|
|
13128
|
-
const iterator1 = a[
|
|
13129
|
-
const iterator2 = b[
|
|
13104
|
+
const iterator1 = a[Symbol.iterator]();
|
|
13105
|
+
const iterator2 = b[Symbol.iterator]();
|
|
13130
13106
|
while (true) {
|
|
13131
13107
|
const item1 = iterator1.next();
|
|
13132
13108
|
const item2 = iterator2.next();
|
|
@@ -13145,7 +13121,7 @@ function iterateListLike(obj, fn) {
|
|
|
13145
13121
|
}
|
|
13146
13122
|
}
|
|
13147
13123
|
else {
|
|
13148
|
-
const iterator = obj[
|
|
13124
|
+
const iterator = obj[Symbol.iterator]();
|
|
13149
13125
|
let item;
|
|
13150
13126
|
while (!((item = iterator.next()).done)) {
|
|
13151
13127
|
fn(item.value);
|
|
@@ -13908,16 +13884,13 @@ function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isCla
|
|
|
13908
13884
|
setInputsForProperty(tView, lView, inputs[property], property, value);
|
|
13909
13885
|
}
|
|
13910
13886
|
|
|
13911
|
-
function elementStartFirstCreatePass(index, tView, lView,
|
|
13887
|
+
function elementStartFirstCreatePass(index, tView, lView, name, attrsIndex, localRefsIndex) {
|
|
13912
13888
|
ngDevMode && assertFirstCreatePass(tView);
|
|
13913
13889
|
ngDevMode && ngDevMode.firstCreatePass++;
|
|
13914
13890
|
const tViewConsts = tView.consts;
|
|
13915
13891
|
const attrs = getConstant(tViewConsts, attrsIndex);
|
|
13916
13892
|
const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);
|
|
13917
|
-
|
|
13918
|
-
if (ngDevMode) {
|
|
13919
|
-
validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);
|
|
13920
|
-
}
|
|
13893
|
+
resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
|
|
13921
13894
|
if (tNode.attrs !== null) {
|
|
13922
13895
|
computeStaticStyling(tNode, tNode.attrs, false);
|
|
13923
13896
|
}
|
|
@@ -13952,10 +13925,14 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
13952
13925
|
assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');
|
|
13953
13926
|
ngDevMode && assertIndexInRange(lView, adjustedIndex);
|
|
13954
13927
|
const renderer = lView[RENDERER];
|
|
13955
|
-
const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());
|
|
13956
13928
|
const tNode = tView.firstCreatePass ?
|
|
13957
|
-
elementStartFirstCreatePass(adjustedIndex, tView, lView,
|
|
13929
|
+
elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex) :
|
|
13958
13930
|
tView.data[adjustedIndex];
|
|
13931
|
+
const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());
|
|
13932
|
+
const hasDirectives = isDirectiveHost(tNode);
|
|
13933
|
+
if (ngDevMode && tView.firstCreatePass) {
|
|
13934
|
+
validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);
|
|
13935
|
+
}
|
|
13959
13936
|
setCurrentTNode(tNode, true);
|
|
13960
13937
|
setupStaticAttributes(renderer, native, tNode);
|
|
13961
13938
|
if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {
|
|
@@ -13970,7 +13947,7 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
13970
13947
|
attachPatchData(native, lView);
|
|
13971
13948
|
}
|
|
13972
13949
|
increaseElementDepthCount();
|
|
13973
|
-
if (
|
|
13950
|
+
if (hasDirectives) {
|
|
13974
13951
|
createDirectivesInstances(tView, lView, tNode);
|
|
13975
13952
|
executeContentQueries(tView, tNode, lView);
|
|
13976
13953
|
}
|
|
@@ -21285,7 +21262,8 @@ function _wrapInTimeout(fn) {
|
|
|
21285
21262
|
const EventEmitter = EventEmitter_;
|
|
21286
21263
|
|
|
21287
21264
|
function symbolIterator() {
|
|
21288
|
-
|
|
21265
|
+
// @ts-expect-error accessing a private member
|
|
21266
|
+
return this._results[Symbol.iterator]();
|
|
21289
21267
|
}
|
|
21290
21268
|
/**
|
|
21291
21269
|
* An unmodifiable list of items that Angular keeps up to date when the state
|
|
@@ -21337,11 +21315,10 @@ class QueryList {
|
|
|
21337
21315
|
// This function should be declared on the prototype, but doing so there will cause the class
|
|
21338
21316
|
// declaration to have side-effects and become not tree-shakable. For this reason we do it in
|
|
21339
21317
|
// the constructor.
|
|
21340
|
-
// [
|
|
21341
|
-
const symbol = getSymbolIterator();
|
|
21318
|
+
// [Symbol.iterator](): Iterator<T> { ... }
|
|
21342
21319
|
const proto = QueryList.prototype;
|
|
21343
|
-
if (!proto[
|
|
21344
|
-
proto[
|
|
21320
|
+
if (!proto[Symbol.iterator])
|
|
21321
|
+
proto[Symbol.iterator] = symbolIterator;
|
|
21345
21322
|
}
|
|
21346
21323
|
/**
|
|
21347
21324
|
* Returns the QueryList entry at `index`.
|