@angular/core 14.0.0-next.11 → 14.0.0-next.12
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/core.d.ts +1 -1
- package/esm2020/src/render3/instructions/shared.mjs +28 -13
- 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 +29 -14
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/core.mjs +29 -14
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/package.json +1 -1
- package/schematics/migrations.json +2 -2
- package/testing/testing.d.ts +1 -1
package/fesm2015/testing.mjs
CHANGED
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.12
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -10252,9 +10252,9 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
|
|
|
10252
10252
|
propName = mapPropName(propName);
|
|
10253
10253
|
if (ngDevMode) {
|
|
10254
10254
|
validateAgainstEventProperties(propName);
|
|
10255
|
-
if (!validateProperty(
|
|
10255
|
+
if (!validateProperty(element, tNode.value, propName, tView.schemas)) {
|
|
10256
10256
|
// Return here since we only log warnings for unknown properties.
|
|
10257
|
-
logUnknownPropertyError(propName, tNode);
|
|
10257
|
+
logUnknownPropertyError(propName, tNode.value);
|
|
10258
10258
|
return;
|
|
10259
10259
|
}
|
|
10260
10260
|
ngDevMode.rendererSetProperty++;
|
|
@@ -10274,7 +10274,7 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
|
|
|
10274
10274
|
// If the node is a container and the property didn't
|
|
10275
10275
|
// match any of the inputs or schemas we should throw.
|
|
10276
10276
|
if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {
|
|
10277
|
-
logUnknownPropertyError(propName, tNode);
|
|
10277
|
+
logUnknownPropertyError(propName, tNode.value);
|
|
10278
10278
|
}
|
|
10279
10279
|
}
|
|
10280
10280
|
}
|
|
@@ -10326,21 +10326,36 @@ function setNgReflectProperties(lView, element, type, dataValue, value) {
|
|
|
10326
10326
|
}
|
|
10327
10327
|
}
|
|
10328
10328
|
}
|
|
10329
|
-
|
|
10329
|
+
/**
|
|
10330
|
+
* Validates that the property of the element is known at runtime and returns
|
|
10331
|
+
* false if it's not the case.
|
|
10332
|
+
* This check is relevant for JIT-compiled components (for AOT-compiled
|
|
10333
|
+
* ones this check happens at build time).
|
|
10334
|
+
*
|
|
10335
|
+
* The property is considered known if either:
|
|
10336
|
+
* - it's a known property of the element
|
|
10337
|
+
* - the element is allowed by one of the schemas
|
|
10338
|
+
* - the property is used for animations
|
|
10339
|
+
*
|
|
10340
|
+
* @param element Element to validate
|
|
10341
|
+
* @param tagName Name of the tag to check
|
|
10342
|
+
* @param propName Name of the property to check
|
|
10343
|
+
* @param schemas Array of schemas
|
|
10344
|
+
*/
|
|
10345
|
+
function validateProperty(element, tagName, propName, schemas) {
|
|
10330
10346
|
// If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
|
|
10331
10347
|
// mode where this check happens at compile time. In JIT mode, `schemas` is always present and
|
|
10332
10348
|
// defined as an array (as an empty array in case `schemas` field is not defined) and we should
|
|
10333
10349
|
// execute the check below.
|
|
10334
|
-
if (
|
|
10350
|
+
if (schemas === null)
|
|
10335
10351
|
return true;
|
|
10336
|
-
// The property is considered valid if the element matches the schema, it exists on the element
|
|
10352
|
+
// The property is considered valid if the element matches the schema, it exists on the element,
|
|
10337
10353
|
// or it is synthetic, and we are in a browser context (web worker nodes should be skipped).
|
|
10338
|
-
if (matchingSchemas(
|
|
10339
|
-
isAnimationProp(propName)) {
|
|
10354
|
+
if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
|
|
10340
10355
|
return true;
|
|
10341
10356
|
}
|
|
10342
10357
|
// Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we
|
|
10343
|
-
// need to account for both here, while being careful
|
|
10358
|
+
// need to account for both here, while being careful with `typeof null` also returning 'object'.
|
|
10344
10359
|
return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
|
|
10345
10360
|
}
|
|
10346
10361
|
/**
|
|
@@ -10363,10 +10378,10 @@ function matchingSchemas(schemas, tagName) {
|
|
|
10363
10378
|
/**
|
|
10364
10379
|
* Logs an error that a property is not supported on an element.
|
|
10365
10380
|
* @param propName Name of the invalid property.
|
|
10366
|
-
* @param
|
|
10381
|
+
* @param tagName Name of the node on which we encountered the property.
|
|
10367
10382
|
*/
|
|
10368
|
-
function logUnknownPropertyError(propName,
|
|
10369
|
-
|
|
10383
|
+
function logUnknownPropertyError(propName, tagName) {
|
|
10384
|
+
const message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'.`;
|
|
10370
10385
|
console.error(formatRuntimeError(303 /* UNKNOWN_BINDING */, message));
|
|
10371
10386
|
}
|
|
10372
10387
|
/**
|
|
@@ -21272,7 +21287,7 @@ class Version {
|
|
|
21272
21287
|
/**
|
|
21273
21288
|
* @publicApi
|
|
21274
21289
|
*/
|
|
21275
|
-
const VERSION = new Version('14.0.0-next.
|
|
21290
|
+
const VERSION = new Version('14.0.0-next.12');
|
|
21276
21291
|
|
|
21277
21292
|
/**
|
|
21278
21293
|
* @license
|