@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/fesm2015/testing.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
|
*/
|
|
@@ -2048,7 +2048,7 @@ function setCurrentInjector(injector) {
|
|
|
2048
2048
|
function injectInjectorOnly(token, flags = InjectFlags.Default) {
|
|
2049
2049
|
if (_currentInjector === undefined) {
|
|
2050
2050
|
throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&
|
|
2051
|
-
`inject() must be called from an injection context
|
|
2051
|
+
`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\`.`);
|
|
2052
2052
|
}
|
|
2053
2053
|
else if (_currentInjector === null) {
|
|
2054
2054
|
return injectRootLimpMode(token, undefined, flags);
|
|
@@ -2574,7 +2574,6 @@ function extractDirectiveDef(type) {
|
|
|
2574
2574
|
function nonNull(value) {
|
|
2575
2575
|
return value !== null;
|
|
2576
2576
|
}
|
|
2577
|
-
const autoRegisterModuleById = {};
|
|
2578
2577
|
/**
|
|
2579
2578
|
* @codeGenApi
|
|
2580
2579
|
*/
|
|
@@ -2590,9 +2589,6 @@ function ɵɵdefineNgModule(def) {
|
|
|
2590
2589
|
schemas: def.schemas || null,
|
|
2591
2590
|
id: def.id || null,
|
|
2592
2591
|
};
|
|
2593
|
-
if (def.id != null) {
|
|
2594
|
-
autoRegisterModuleById[def.id] = def.type;
|
|
2595
|
-
}
|
|
2596
2592
|
return res;
|
|
2597
2593
|
});
|
|
2598
2594
|
}
|
|
@@ -7618,7 +7614,7 @@ class Version {
|
|
|
7618
7614
|
/**
|
|
7619
7615
|
* @publicApi
|
|
7620
7616
|
*/
|
|
7621
|
-
const VERSION = new Version('14.1.
|
|
7617
|
+
const VERSION = new Version('14.1.3');
|
|
7622
7618
|
|
|
7623
7619
|
/**
|
|
7624
7620
|
* @license
|
|
@@ -7834,9 +7830,10 @@ function handleUnknownPropertyError(propName, tagName, nodeType, lView) {
|
|
|
7834
7830
|
'a part of an @NgModule where this component is declared';
|
|
7835
7831
|
if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {
|
|
7836
7832
|
// Most likely this is a control flow directive (such as `*ngIf`) used in
|
|
7837
|
-
// a template, but the `CommonModule` is not imported.
|
|
7833
|
+
// a template, but the directive or the `CommonModule` is not imported.
|
|
7834
|
+
const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);
|
|
7838
7835
|
message += `\nIf the '${propName}' is an Angular control flow directive, ` +
|
|
7839
|
-
`please make sure that the 'CommonModule' is ${importLocation}.`;
|
|
7836
|
+
`please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;
|
|
7840
7837
|
}
|
|
7841
7838
|
else {
|
|
7842
7839
|
// May be an Angular component, which is not imported/declared?
|
|
@@ -7916,11 +7913,14 @@ function getTemplateLocationDetails(lView) {
|
|
|
7916
7913
|
return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';
|
|
7917
7914
|
}
|
|
7918
7915
|
/**
|
|
7919
|
-
* The set of known control flow directives.
|
|
7916
|
+
* The set of known control flow directives and their corresponding imports.
|
|
7920
7917
|
* We use this set to produce a more precises error message with a note
|
|
7921
7918
|
* that the `CommonModule` should also be included.
|
|
7922
7919
|
*/
|
|
7923
|
-
const KNOWN_CONTROL_FLOW_DIRECTIVES = new
|
|
7920
|
+
const KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([
|
|
7921
|
+
['ngIf', 'NgIf'], ['ngFor', 'NgForOf'], ['ngSwitchCase', 'NgSwitchCase'],
|
|
7922
|
+
['ngSwitchDefault', 'NgSwitchDefault']
|
|
7923
|
+
]);
|
|
7924
7924
|
/**
|
|
7925
7925
|
* Returns true if the tag name is allowed by specified schemas.
|
|
7926
7926
|
* @param schemas Array of schemas
|
|
@@ -13397,13 +13397,15 @@ function refreshContainsDirtyView(lView) {
|
|
|
13397
13397
|
for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
|
|
13398
13398
|
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
13399
13399
|
const embeddedLView = lContainer[i];
|
|
13400
|
-
if (embeddedLView
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
|
|
13406
|
-
|
|
13400
|
+
if (viewAttachedToChangeDetector(embeddedLView)) {
|
|
13401
|
+
if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {
|
|
13402
|
+
const embeddedTView = embeddedLView[TVIEW];
|
|
13403
|
+
ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');
|
|
13404
|
+
refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);
|
|
13405
|
+
}
|
|
13406
|
+
else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
|
|
13407
|
+
refreshContainsDirtyView(embeddedLView);
|
|
13408
|
+
}
|
|
13407
13409
|
}
|
|
13408
13410
|
}
|
|
13409
13411
|
}
|