@angular/core 17.1.2 → 17.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/esm2022/src/application/application_ref.mjs +54 -16
- package/esm2022/src/authoring/input.mjs +1 -1
- package/esm2022/src/authoring/input_signal.mjs +1 -1
- package/esm2022/src/authoring/input_type_checking.mjs +1 -1
- package/esm2022/src/authoring.mjs +1 -1
- package/esm2022/src/defer/instructions.mjs +13 -6
- package/esm2022/src/render3/after_render_hooks.mjs +2 -6
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/definition.mjs +1 -1
- package/esm2022/src/render3/errors_di.mjs +2 -2
- package/esm2022/src/render3/i18n/i18n_locale_id.mjs +2 -2
- package/esm2022/src/render3/instructions/change_detection.mjs +6 -6
- package/esm2022/src/render3/instructions/write_to_directive_input.mjs +1 -1
- package/esm2022/src/render3/util/view_utils.mjs +3 -3
- package/esm2022/src/render3/view_ref.mjs +1 -1
- package/esm2022/src/util/stringify.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +4 -4
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +438 -401
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +49 -17
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +27 -9
- package/schematics/migrations/block-template-entities/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +27 -9
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +176 -77
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
|
@@ -1752,6 +1752,7 @@ var ConstantPool = class {
|
|
|
1752
1752
|
this.literals = /* @__PURE__ */ new Map();
|
|
1753
1753
|
this.literalFactories = /* @__PURE__ */ new Map();
|
|
1754
1754
|
this.sharedConstants = /* @__PURE__ */ new Map();
|
|
1755
|
+
this._claimedNames = /* @__PURE__ */ new Map();
|
|
1755
1756
|
this.nextNameIndex = 0;
|
|
1756
1757
|
}
|
|
1757
1758
|
getConstLiteral(literal2, forceShared) {
|
|
@@ -1844,8 +1845,12 @@ var ConstantPool = class {
|
|
|
1844
1845
|
}
|
|
1845
1846
|
return { literalFactory, literalFactoryArguments };
|
|
1846
1847
|
}
|
|
1847
|
-
uniqueName(
|
|
1848
|
-
|
|
1848
|
+
uniqueName(name, alwaysIncludeSuffix = true) {
|
|
1849
|
+
var _a2;
|
|
1850
|
+
const count = (_a2 = this._claimedNames.get(name)) != null ? _a2 : 0;
|
|
1851
|
+
const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;
|
|
1852
|
+
this._claimedNames.set(name, count + 1);
|
|
1853
|
+
return result;
|
|
1849
1854
|
}
|
|
1850
1855
|
freshName() {
|
|
1851
1856
|
return this.uniqueName(CONSTANT_PREFIX);
|
|
@@ -9502,7 +9507,10 @@ function createDeferDepsFns(job) {
|
|
|
9502
9507
|
const dependencies = [];
|
|
9503
9508
|
for (const dep of op.metadata.deps) {
|
|
9504
9509
|
if (dep.isDeferrable) {
|
|
9505
|
-
const innerFn = arrowFn(
|
|
9510
|
+
const innerFn = arrowFn(
|
|
9511
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
9512
|
+
variable("m").prop(dep.isDefaultImport ? "default" : dep.symbolName)
|
|
9513
|
+
);
|
|
9506
9514
|
const importExpr2 = new DynamicImportExpr(dep.importPath).prop("then").callFn([innerFn]);
|
|
9507
9515
|
dependencies.push(importExpr2);
|
|
9508
9516
|
} else {
|
|
@@ -16580,7 +16588,7 @@ function nameFunctionsAndVariables(job) {
|
|
|
16580
16588
|
}
|
|
16581
16589
|
function addNamesToView(unit, baseName, state, compatibility) {
|
|
16582
16590
|
if (unit.fnName === null) {
|
|
16583
|
-
unit.fnName = sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`);
|
|
16591
|
+
unit.fnName = unit.job.pool.uniqueName(sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`), false);
|
|
16584
16592
|
}
|
|
16585
16593
|
const varNames = /* @__PURE__ */ new Map();
|
|
16586
16594
|
for (const op of unit.ops()) {
|
|
@@ -19858,11 +19866,18 @@ function asMessage(i18nMeta) {
|
|
|
19858
19866
|
function ingestElementBindings(unit, op, element2) {
|
|
19859
19867
|
var _a2;
|
|
19860
19868
|
let bindings = new Array();
|
|
19869
|
+
let i18nAttributeBindingNames = /* @__PURE__ */ new Set();
|
|
19861
19870
|
for (const attr of element2.attributes) {
|
|
19862
19871
|
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19863
19872
|
bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19873
|
+
if (attr.i18n) {
|
|
19874
|
+
i18nAttributeBindingNames.add(attr.name);
|
|
19875
|
+
}
|
|
19864
19876
|
}
|
|
19865
19877
|
for (const input of element2.inputs) {
|
|
19878
|
+
if (i18nAttributeBindingNames.has(input.name)) {
|
|
19879
|
+
console.error(`On component ${unit.job.componentName}, the binding ${input.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`);
|
|
19880
|
+
}
|
|
19866
19881
|
bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, (_a2 = asMessage(input.i18n)) != null ? _a2 : null, input.sourceSpan));
|
|
19867
19882
|
}
|
|
19868
19883
|
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
@@ -22651,7 +22666,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22651
22666
|
}
|
|
22652
22667
|
}
|
|
22653
22668
|
const contextName = `${this.contextName}${contextNameSuffix}_${index}`;
|
|
22654
|
-
const name = `${contextName}_Template
|
|
22669
|
+
const name = this.constantPool.uniqueName(`${contextName}_Template`, false);
|
|
22655
22670
|
const visitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, index, name, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this.elementLocations, this.allDeferrableDepsFn, this._constants);
|
|
22656
22671
|
this._nestedTemplateFns.push(() => {
|
|
22657
22672
|
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
@@ -22860,7 +22875,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22860
22875
|
const dependencyExp = [];
|
|
22861
22876
|
for (const deferredDep of metadata.deps) {
|
|
22862
22877
|
if (deferredDep.isDeferrable) {
|
|
22863
|
-
const innerFn = arrowFn(
|
|
22878
|
+
const innerFn = arrowFn(
|
|
22879
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
22880
|
+
variable("m").prop(deferredDep.isDefaultImport ? "default" : deferredDep.symbolName)
|
|
22881
|
+
);
|
|
22864
22882
|
const importExpr2 = new DynamicImportExpr(deferredDep.importPath).prop("then").callFn([innerFn]);
|
|
22865
22883
|
dependencyExp.push(importExpr2);
|
|
22866
22884
|
} else {
|
|
@@ -23857,8 +23875,8 @@ function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
|
|
|
23857
23875
|
}
|
|
23858
23876
|
function createDeferredDepsFunction(constantPool, name, deps) {
|
|
23859
23877
|
const dependencyExp = [];
|
|
23860
|
-
for (const [symbolName, importPath] of deps) {
|
|
23861
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(symbolName));
|
|
23878
|
+
for (const [symbolName, { importPath, isDefaultImport }] of deps) {
|
|
23879
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName));
|
|
23862
23880
|
const importExpr2 = new DynamicImportExpr(importPath).prop("then").callFn([innerFn]);
|
|
23863
23881
|
dependencyExp.push(importExpr2);
|
|
23864
23882
|
}
|
|
@@ -25604,7 +25622,7 @@ function publishFacade(global) {
|
|
|
25604
25622
|
}
|
|
25605
25623
|
|
|
25606
25624
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25607
|
-
var VERSION2 = new Version("17.1.
|
|
25625
|
+
var VERSION2 = new Version("17.1.3");
|
|
25608
25626
|
|
|
25609
25627
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25610
25628
|
var _VisitorMode;
|