@angular/core 14.1.0 → 14.1.3
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/di/injector_compatibility.mjs +2 -2
- package/esm2020/src/linker/template_ref.mjs +1 -1
- package/esm2020/src/render3/definition.mjs +1 -5
- package/esm2020/src/render3/instructions/element_validation.mjs +9 -5
- package/esm2020/src/render3/instructions/shared.mjs +10 -8
- 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 +20 -18
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +20 -18
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +20 -18
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +20 -18
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +2 -3
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1.
|
|
2
|
+
* @license Angular v14.1.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -967,7 +967,6 @@ function extractDirectiveDef(type) {
|
|
|
967
967
|
function nonNull(value) {
|
|
968
968
|
return value !== null;
|
|
969
969
|
}
|
|
970
|
-
const autoRegisterModuleById = {};
|
|
971
970
|
/**
|
|
972
971
|
* @codeGenApi
|
|
973
972
|
*/
|
|
@@ -983,9 +982,6 @@ function ɵɵdefineNgModule(def) {
|
|
|
983
982
|
schemas: def.schemas || null,
|
|
984
983
|
id: def.id || null,
|
|
985
984
|
};
|
|
986
|
-
if (def.id != null) {
|
|
987
|
-
autoRegisterModuleById[def.id] = def.type;
|
|
988
|
-
}
|
|
989
985
|
return res;
|
|
990
986
|
});
|
|
991
987
|
}
|
|
@@ -4770,7 +4766,7 @@ function setCurrentInjector(injector) {
|
|
|
4770
4766
|
function injectInjectorOnly(token, flags = InjectFlags.Default) {
|
|
4771
4767
|
if (_currentInjector === undefined) {
|
|
4772
4768
|
throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&
|
|
4773
|
-
`inject() must be called from an injection context
|
|
4769
|
+
`inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \`EnvironmentInjector#runInContext\`.`);
|
|
4774
4770
|
}
|
|
4775
4771
|
else if (_currentInjector === null) {
|
|
4776
4772
|
return injectRootLimpMode(token, undefined, flags);
|
|
@@ -7258,7 +7254,7 @@ class Version {
|
|
|
7258
7254
|
/**
|
|
7259
7255
|
* @publicApi
|
|
7260
7256
|
*/
|
|
7261
|
-
const VERSION = new Version('14.1.
|
|
7257
|
+
const VERSION = new Version('14.1.3');
|
|
7262
7258
|
|
|
7263
7259
|
/**
|
|
7264
7260
|
* @license
|
|
@@ -7474,9 +7470,10 @@ function handleUnknownPropertyError(propName, tagName, nodeType, lView) {
|
|
|
7474
7470
|
'a part of an @NgModule where this component is declared';
|
|
7475
7471
|
if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {
|
|
7476
7472
|
// Most likely this is a control flow directive (such as `*ngIf`) used in
|
|
7477
|
-
// a template, but the `CommonModule` is not imported.
|
|
7473
|
+
// a template, but the directive or the `CommonModule` is not imported.
|
|
7474
|
+
const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);
|
|
7478
7475
|
message += `\nIf the '${propName}' is an Angular control flow directive, ` +
|
|
7479
|
-
`please make sure that the 'CommonModule' is ${importLocation}.`;
|
|
7476
|
+
`please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;
|
|
7480
7477
|
}
|
|
7481
7478
|
else {
|
|
7482
7479
|
// May be an Angular component, which is not imported/declared?
|
|
@@ -7555,11 +7552,14 @@ function getTemplateLocationDetails(lView) {
|
|
|
7555
7552
|
return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';
|
|
7556
7553
|
}
|
|
7557
7554
|
/**
|
|
7558
|
-
* The set of known control flow directives.
|
|
7555
|
+
* The set of known control flow directives and their corresponding imports.
|
|
7559
7556
|
* We use this set to produce a more precises error message with a note
|
|
7560
7557
|
* that the `CommonModule` should also be included.
|
|
7561
7558
|
*/
|
|
7562
|
-
const KNOWN_CONTROL_FLOW_DIRECTIVES = new
|
|
7559
|
+
const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([
|
|
7560
|
+
['ngIf', 'NgIf'], ['ngFor', 'NgForOf'], ['ngSwitchCase', 'NgSwitchCase'],
|
|
7561
|
+
['ngSwitchDefault', 'NgSwitchDefault']
|
|
7562
|
+
]);
|
|
7563
7563
|
/**
|
|
7564
7564
|
* Returns true if the tag name is allowed by specified schemas.
|
|
7565
7565
|
* @param schemas Array of schemas
|
|
@@ -13095,13 +13095,15 @@ function refreshContainsDirtyView(lView) {
|
|
|
13095
13095
|
for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
|
|
13096
13096
|
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
13097
13097
|
const embeddedLView = lContainer[i];
|
|
13098
|
-
if (embeddedLView
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13098
|
+
if (viewAttachedToChangeDetector(embeddedLView)) {
|
|
13099
|
+
if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {
|
|
13100
|
+
const embeddedTView = embeddedLView[TVIEW];
|
|
13101
|
+
ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');
|
|
13102
|
+
refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);
|
|
13103
|
+
}
|
|
13104
|
+
else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
|
|
13105
|
+
refreshContainsDirtyView(embeddedLView);
|
|
13106
|
+
}
|
|
13105
13107
|
}
|
|
13106
13108
|
}
|
|
13107
13109
|
}
|