@angular/core 18.2.10 → 18.2.11
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/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/features/host_directives_feature.mjs +42 -23
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/list_reconciliation.mjs +6 -4
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/application_error_handler.mjs +3 -3
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +49 -27
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +13 -4
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/after-render-phase/bundle.js +267 -267
- package/schematics/migrations/http-providers/bundle.js +270 -270
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +161 -161
- package/schematics/ng-generate/control-flow-migration/bundle.js +270 -270
- package/schematics/ng-generate/inject-migration/bundle.js +273 -273
- package/schematics/ng-generate/route-lazy-loading/bundle.js +269 -269
- package/schematics/ng-generate/standalone-migration/bundle.js +451 -451
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.2.
|
|
2
|
+
* @license Angular v18.2.11
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -16940,7 +16940,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
|
|
|
16940
16940
|
function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
|
|
16941
16941
|
if (rootSelectorOrNode) {
|
|
16942
16942
|
// The placeholder will be replaced with the actual version at build time.
|
|
16943
|
-
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.2.
|
|
16943
|
+
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.2.11']);
|
|
16944
16944
|
}
|
|
16945
16945
|
else {
|
|
16946
16946
|
// If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
|
|
@@ -18764,21 +18764,18 @@ function ɵɵCopyDefinitionFeature(definition) {
|
|
|
18764
18764
|
*/
|
|
18765
18765
|
function ɵɵHostDirectivesFeature(rawHostDirectives) {
|
|
18766
18766
|
const feature = (definition) => {
|
|
18767
|
-
const
|
|
18768
|
-
return typeof dir === 'function'
|
|
18769
|
-
? { directive: resolveForwardRef(dir), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ }
|
|
18770
|
-
: {
|
|
18771
|
-
directive: resolveForwardRef(dir.directive),
|
|
18772
|
-
inputs: bindingArrayToMap(dir.inputs),
|
|
18773
|
-
outputs: bindingArrayToMap(dir.outputs),
|
|
18774
|
-
};
|
|
18775
|
-
});
|
|
18767
|
+
const isEager = Array.isArray(rawHostDirectives);
|
|
18776
18768
|
if (definition.hostDirectives === null) {
|
|
18777
18769
|
definition.findHostDirectiveDefs = findHostDirectiveDefs;
|
|
18778
|
-
definition.hostDirectives =
|
|
18770
|
+
definition.hostDirectives = isEager
|
|
18771
|
+
? rawHostDirectives.map(createHostDirectiveDef)
|
|
18772
|
+
: [rawHostDirectives];
|
|
18773
|
+
}
|
|
18774
|
+
else if (isEager) {
|
|
18775
|
+
definition.hostDirectives.unshift(...rawHostDirectives.map(createHostDirectiveDef));
|
|
18779
18776
|
}
|
|
18780
18777
|
else {
|
|
18781
|
-
definition.hostDirectives.unshift(
|
|
18778
|
+
definition.hostDirectives.unshift(rawHostDirectives);
|
|
18782
18779
|
}
|
|
18783
18780
|
};
|
|
18784
18781
|
feature.ngInherit = true;
|
|
@@ -18786,21 +18783,43 @@ function ɵɵHostDirectivesFeature(rawHostDirectives) {
|
|
|
18786
18783
|
}
|
|
18787
18784
|
function findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {
|
|
18788
18785
|
if (currentDef.hostDirectives !== null) {
|
|
18789
|
-
for (const
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18786
|
+
for (const configOrFn of currentDef.hostDirectives) {
|
|
18787
|
+
if (typeof configOrFn === 'function') {
|
|
18788
|
+
const resolved = configOrFn();
|
|
18789
|
+
for (const config of resolved) {
|
|
18790
|
+
trackHostDirectiveDef(createHostDirectiveDef(config), matchedDefs, hostDirectiveDefs);
|
|
18791
|
+
}
|
|
18792
|
+
}
|
|
18793
|
+
else {
|
|
18794
|
+
trackHostDirectiveDef(configOrFn, matchedDefs, hostDirectiveDefs);
|
|
18793
18795
|
}
|
|
18794
|
-
// We need to patch the `declaredInputs` so that
|
|
18795
|
-
// `ngOnChanges` can map the properties correctly.
|
|
18796
|
-
patchDeclaredInputs(hostDirectiveDef.declaredInputs, hostDirectiveConfig.inputs);
|
|
18797
|
-
// Host directives execute before the host so that its host bindings can be overwritten.
|
|
18798
|
-
findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);
|
|
18799
|
-
hostDirectiveDefs.set(hostDirectiveDef, hostDirectiveConfig);
|
|
18800
|
-
matchedDefs.push(hostDirectiveDef);
|
|
18801
18796
|
}
|
|
18802
18797
|
}
|
|
18803
18798
|
}
|
|
18799
|
+
/** Tracks a single host directive during directive matching. */
|
|
18800
|
+
function trackHostDirectiveDef(def, matchedDefs, hostDirectiveDefs) {
|
|
18801
|
+
const hostDirectiveDef = getDirectiveDef(def.directive);
|
|
18802
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
18803
|
+
validateHostDirective(def, hostDirectiveDef);
|
|
18804
|
+
}
|
|
18805
|
+
// We need to patch the `declaredInputs` so that
|
|
18806
|
+
// `ngOnChanges` can map the properties correctly.
|
|
18807
|
+
patchDeclaredInputs(hostDirectiveDef.declaredInputs, def.inputs);
|
|
18808
|
+
// Host directives execute before the host so that its host bindings can be overwritten.
|
|
18809
|
+
findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);
|
|
18810
|
+
hostDirectiveDefs.set(hostDirectiveDef, def);
|
|
18811
|
+
matchedDefs.push(hostDirectiveDef);
|
|
18812
|
+
}
|
|
18813
|
+
/** Creates a `HostDirectiveDef` from a used-defined host directive configuration. */
|
|
18814
|
+
function createHostDirectiveDef(config) {
|
|
18815
|
+
return typeof config === 'function'
|
|
18816
|
+
? { directive: resolveForwardRef(config), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ }
|
|
18817
|
+
: {
|
|
18818
|
+
directive: resolveForwardRef(config.directive),
|
|
18819
|
+
inputs: bindingArrayToMap(config.inputs),
|
|
18820
|
+
outputs: bindingArrayToMap(config.outputs),
|
|
18821
|
+
};
|
|
18822
|
+
}
|
|
18804
18823
|
/**
|
|
18805
18824
|
* Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into
|
|
18806
18825
|
* a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.
|
|
@@ -23929,8 +23948,11 @@ class UniqueValueMultiKeyMap {
|
|
|
23929
23948
|
set(key, value) {
|
|
23930
23949
|
if (this.kvMap.has(key)) {
|
|
23931
23950
|
let prevValue = this.kvMap.get(key);
|
|
23932
|
-
|
|
23933
|
-
|
|
23951
|
+
// Note: we don't use `assertNotSame`, because the value needs to be stringified even if
|
|
23952
|
+
// there is no error which can freeze the browser for large values (see #58509).
|
|
23953
|
+
if (ngDevMode && prevValue === value) {
|
|
23954
|
+
throw new Error(`Detected a duplicated value ${value} for the key ${key}`);
|
|
23955
|
+
}
|
|
23934
23956
|
if (this._vMap === undefined) {
|
|
23935
23957
|
this._vMap = new Map();
|
|
23936
23958
|
}
|
|
@@ -31034,7 +31056,7 @@ class Version {
|
|
|
31034
31056
|
/**
|
|
31035
31057
|
* @publicApi
|
|
31036
31058
|
*/
|
|
31037
|
-
const VERSION = new Version('18.2.
|
|
31059
|
+
const VERSION = new Version('18.2.11');
|
|
31038
31060
|
|
|
31039
31061
|
/*
|
|
31040
31062
|
* This file exists to support compilation of @angular/core in Ivy mode.
|