@angular/core 15.2.7 → 15.2.8
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/debug/debug_node.mjs +4 -9
- package/esm2020/src/di/interface/defs.mjs +3 -18
- package/esm2020/src/render3/instructions/element_validation.mjs +4 -5
- package/esm2020/src/render3/instructions/styling.mjs +22 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/styling.mjs +1 -2
- package/esm2020/testing/src/testing_internal.mjs +1 -2
- package/fesm2015/core.mjs +31 -32
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +28 -24
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +31 -32
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +28 -24
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +10 -15
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +1 -1
- package/esm2020/testing/src/ng_zone_mock.mjs +0 -33
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.8
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -402,30 +402,15 @@ function getOwnDefinition(type, field) {
|
|
|
402
402
|
function getInheritedInjectableDef(type) {
|
|
403
403
|
const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);
|
|
404
404
|
if (def) {
|
|
405
|
-
const typeName = getTypeName(type);
|
|
406
405
|
ngDevMode &&
|
|
407
|
-
console.warn(`DEPRECATED: DI is instantiating a token "${
|
|
408
|
-
`This will become an error in a future version of Angular. Please add @Injectable() to the "${
|
|
406
|
+
console.warn(`DEPRECATED: DI is instantiating a token "${type.name}" that inherits its @Injectable decorator but does not provide one itself.\n` +
|
|
407
|
+
`This will become an error in a future version of Angular. Please add @Injectable() to the "${type.name}" class.`);
|
|
409
408
|
return def;
|
|
410
409
|
}
|
|
411
410
|
else {
|
|
412
411
|
return null;
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
|
-
/** Gets the name of a type, accounting for some cross-browser differences. */
|
|
416
|
-
function getTypeName(type) {
|
|
417
|
-
// `Function.prototype.name` behaves differently between IE and other browsers. In most browsers
|
|
418
|
-
// it'll always return the name of the function itself, no matter how many other functions it
|
|
419
|
-
// inherits from. On IE the function doesn't have its own `name` property, but it takes it from
|
|
420
|
-
// the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most
|
|
421
|
-
// browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around
|
|
422
|
-
// the issue by converting the function to a string and parsing its name out that way via a regex.
|
|
423
|
-
if (type.hasOwnProperty('name')) {
|
|
424
|
-
return type.name;
|
|
425
|
-
}
|
|
426
|
-
const match = ('' + type).match(/^function\s*([^\s(]+)/);
|
|
427
|
-
return match === null ? '' : match[1];
|
|
428
|
-
}
|
|
429
414
|
/**
|
|
430
415
|
* Read the injector def type in a way which is immune to accidentally reading inherited value.
|
|
431
416
|
*
|
|
@@ -4878,8 +4863,8 @@ function validateElementIsKnown(element, lView, tagName, schemas, hasDirectives)
|
|
|
4878
4863
|
// as a custom element. Note that unknown elements with a dash in their name won't be instances
|
|
4879
4864
|
// of HTMLUnknownElement in browsers that support web components.
|
|
4880
4865
|
const isUnknown =
|
|
4881
|
-
// Note that we can't check for `typeof HTMLUnknownElement === 'function'
|
|
4882
|
-
//
|
|
4866
|
+
// Note that we can't check for `typeof HTMLUnknownElement === 'function'` because
|
|
4867
|
+
// Domino doesn't expose HTMLUnknownElement globally.
|
|
4883
4868
|
(typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&
|
|
4884
4869
|
element instanceof HTMLUnknownElement) ||
|
|
4885
4870
|
(typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&
|
|
@@ -4936,8 +4921,7 @@ function isPropertyValid(element, propName, tagName, schemas) {
|
|
|
4936
4921
|
if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
|
|
4937
4922
|
return true;
|
|
4938
4923
|
}
|
|
4939
|
-
// Note: `typeof Node` returns 'function' in most browsers, but
|
|
4940
|
-
// need to account for both here, while being careful with `typeof null` also returning 'object'.
|
|
4924
|
+
// Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.
|
|
4941
4925
|
return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
|
|
4942
4926
|
}
|
|
4943
4927
|
/**
|
|
@@ -8347,7 +8331,7 @@ class Version {
|
|
|
8347
8331
|
/**
|
|
8348
8332
|
* @publicApi
|
|
8349
8333
|
*/
|
|
8350
|
-
const VERSION = new Version('15.2.
|
|
8334
|
+
const VERSION = new Version('15.2.8');
|
|
8351
8335
|
|
|
8352
8336
|
// This default value is when checking the hierarchy for a token.
|
|
8353
8337
|
//
|
|
@@ -15427,7 +15411,7 @@ function styleStringParser(keyValueArray, text) {
|
|
|
15427
15411
|
* @codeGenApi
|
|
15428
15412
|
*/
|
|
15429
15413
|
function ɵɵclassMap(classes) {
|
|
15430
|
-
checkStylingMap(
|
|
15414
|
+
checkStylingMap(classKeyValueArraySet, classStringParser, classes, true);
|
|
15431
15415
|
}
|
|
15432
15416
|
/**
|
|
15433
15417
|
* Parse text as class and add values to KeyValueArray.
|
|
@@ -15869,6 +15853,26 @@ function toStylingKeyValueArray(keyValueArraySet, stringParser, value) {
|
|
|
15869
15853
|
function styleKeyValueArraySet(keyValueArray, key, value) {
|
|
15870
15854
|
keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));
|
|
15871
15855
|
}
|
|
15856
|
+
/**
|
|
15857
|
+
* Class-binding-specific function for setting the `value` for a `key`.
|
|
15858
|
+
*
|
|
15859
|
+
* See: `keyValueArraySet` for details
|
|
15860
|
+
*
|
|
15861
|
+
* @param keyValueArray KeyValueArray to add to.
|
|
15862
|
+
* @param key Style key to add.
|
|
15863
|
+
* @param value The value to set.
|
|
15864
|
+
*/
|
|
15865
|
+
function classKeyValueArraySet(keyValueArray, key, value) {
|
|
15866
|
+
// We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into
|
|
15867
|
+
// `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers
|
|
15868
|
+
// will be added. Stringify the key here so that our internal data structure matches the value in
|
|
15869
|
+
// the DOM. The only exceptions are empty strings and strings that contain spaces for which
|
|
15870
|
+
// the browser throws an error. We ignore such values, because the error is somewhat cryptic.
|
|
15871
|
+
const stringKey = String(key);
|
|
15872
|
+
if (stringKey !== '' && !stringKey.includes(' ')) {
|
|
15873
|
+
keyValueArraySet(keyValueArray, stringKey, value);
|
|
15874
|
+
}
|
|
15875
|
+
}
|
|
15872
15876
|
/**
|
|
15873
15877
|
* Update map based styling.
|
|
15874
15878
|
*
|
|
@@ -25833,16 +25837,11 @@ class DebugElement extends DebugNode {
|
|
|
25833
25837
|
i += 2;
|
|
25834
25838
|
}
|
|
25835
25839
|
}
|
|
25836
|
-
const
|
|
25837
|
-
for (let i = 0; i < eAttrs.length; i++) {
|
|
25838
|
-
const attr = eAttrs[i];
|
|
25839
|
-
const lowercaseName = attr.name.toLowerCase();
|
|
25840
|
+
for (const attr of element.attributes) {
|
|
25840
25841
|
// Make sure that we don't assign the same attribute both in its
|
|
25841
25842
|
// case-sensitive form and the lower-cased one from the browser.
|
|
25842
|
-
if (lowercaseTNodeAttrs.
|
|
25843
|
-
|
|
25844
|
-
// IE preserves the case, while all other browser convert it to lower case.
|
|
25845
|
-
attributes[lowercaseName] = attr.value;
|
|
25843
|
+
if (!lowercaseTNodeAttrs.includes(attr.name)) {
|
|
25844
|
+
attributes[attr.name] = attr.value;
|
|
25846
25845
|
}
|
|
25847
25846
|
}
|
|
25848
25847
|
return attributes;
|