@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/fesm2015/testing.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
|
*/
|
|
@@ -772,30 +772,15 @@ function getOwnDefinition(type, field) {
|
|
|
772
772
|
function getInheritedInjectableDef(type) {
|
|
773
773
|
const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);
|
|
774
774
|
if (def) {
|
|
775
|
-
const typeName = getTypeName(type);
|
|
776
775
|
ngDevMode &&
|
|
777
|
-
console.warn(`DEPRECATED: DI is instantiating a token "${
|
|
778
|
-
`This will become an error in a future version of Angular. Please add @Injectable() to the "${
|
|
776
|
+
console.warn(`DEPRECATED: DI is instantiating a token "${type.name}" 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 "${type.name}" class.`);
|
|
779
778
|
return def;
|
|
780
779
|
}
|
|
781
780
|
else {
|
|
782
781
|
return null;
|
|
783
782
|
}
|
|
784
783
|
}
|
|
785
|
-
/** Gets the name of a type, accounting for some cross-browser differences. */
|
|
786
|
-
function getTypeName(type) {
|
|
787
|
-
// `Function.prototype.name` behaves differently between IE and other browsers. In most browsers
|
|
788
|
-
// it'll always return the name of the function itself, no matter how many other functions it
|
|
789
|
-
// inherits from. On IE the function doesn't have its own `name` property, but it takes it from
|
|
790
|
-
// the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most
|
|
791
|
-
// browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around
|
|
792
|
-
// the issue by converting the function to a string and parsing its name out that way via a regex.
|
|
793
|
-
if (type.hasOwnProperty('name')) {
|
|
794
|
-
return type.name;
|
|
795
|
-
}
|
|
796
|
-
const match = ('' + type).match(/^function\s*([^\s(]+)/);
|
|
797
|
-
return match === null ? '' : match[1];
|
|
798
|
-
}
|
|
799
784
|
/**
|
|
800
785
|
* Read the injector def type in a way which is immune to accidentally reading inherited value.
|
|
801
786
|
*
|
|
@@ -5139,8 +5124,8 @@ function validateElementIsKnown(element, lView, tagName, schemas, hasDirectives)
|
|
|
5139
5124
|
// as a custom element. Note that unknown elements with a dash in their name won't be instances
|
|
5140
5125
|
// of HTMLUnknownElement in browsers that support web components.
|
|
5141
5126
|
const isUnknown =
|
|
5142
|
-
// Note that we can't check for `typeof HTMLUnknownElement === 'function'
|
|
5143
|
-
//
|
|
5127
|
+
// Note that we can't check for `typeof HTMLUnknownElement === 'function'` because
|
|
5128
|
+
// Domino doesn't expose HTMLUnknownElement globally.
|
|
5144
5129
|
(typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&
|
|
5145
5130
|
element instanceof HTMLUnknownElement) ||
|
|
5146
5131
|
(typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&
|
|
@@ -5197,8 +5182,7 @@ function isPropertyValid(element, propName, tagName, schemas) {
|
|
|
5197
5182
|
if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
|
|
5198
5183
|
return true;
|
|
5199
5184
|
}
|
|
5200
|
-
// Note: `typeof Node` returns 'function' in most browsers, but
|
|
5201
|
-
// need to account for both here, while being careful with `typeof null` also returning 'object'.
|
|
5185
|
+
// Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.
|
|
5202
5186
|
return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
|
|
5203
5187
|
}
|
|
5204
5188
|
/**
|
|
@@ -8697,7 +8681,7 @@ class Version {
|
|
|
8697
8681
|
/**
|
|
8698
8682
|
* @publicApi
|
|
8699
8683
|
*/
|
|
8700
|
-
const VERSION = new Version('15.2.
|
|
8684
|
+
const VERSION = new Version('15.2.8');
|
|
8701
8685
|
|
|
8702
8686
|
// This default value is when checking the hierarchy for a token.
|
|
8703
8687
|
//
|
|
@@ -15733,7 +15717,7 @@ function styleStringParser(keyValueArray, text) {
|
|
|
15733
15717
|
* @codeGenApi
|
|
15734
15718
|
*/
|
|
15735
15719
|
function ɵɵclassMap(classes) {
|
|
15736
|
-
checkStylingMap(
|
|
15720
|
+
checkStylingMap(classKeyValueArraySet, classStringParser, classes, true);
|
|
15737
15721
|
}
|
|
15738
15722
|
/**
|
|
15739
15723
|
* Parse text as class and add values to KeyValueArray.
|
|
@@ -16175,6 +16159,26 @@ function toStylingKeyValueArray(keyValueArraySet, stringParser, value) {
|
|
|
16175
16159
|
function styleKeyValueArraySet(keyValueArray, key, value) {
|
|
16176
16160
|
keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));
|
|
16177
16161
|
}
|
|
16162
|
+
/**
|
|
16163
|
+
* Class-binding-specific function for setting the `value` for a `key`.
|
|
16164
|
+
*
|
|
16165
|
+
* See: `keyValueArraySet` for details
|
|
16166
|
+
*
|
|
16167
|
+
* @param keyValueArray KeyValueArray to add to.
|
|
16168
|
+
* @param key Style key to add.
|
|
16169
|
+
* @param value The value to set.
|
|
16170
|
+
*/
|
|
16171
|
+
function classKeyValueArraySet(keyValueArray, key, value) {
|
|
16172
|
+
// We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into
|
|
16173
|
+
// `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers
|
|
16174
|
+
// will be added. Stringify the key here so that our internal data structure matches the value in
|
|
16175
|
+
// the DOM. The only exceptions are empty strings and strings that contain spaces for which
|
|
16176
|
+
// the browser throws an error. We ignore such values, because the error is somewhat cryptic.
|
|
16177
|
+
const stringKey = String(key);
|
|
16178
|
+
if (stringKey !== '' && !stringKey.includes(' ')) {
|
|
16179
|
+
keyValueArraySet(keyValueArray, stringKey, value);
|
|
16180
|
+
}
|
|
16181
|
+
}
|
|
16178
16182
|
/**
|
|
16179
16183
|
* Update map based styling.
|
|
16180
16184
|
*
|