@angular/core 17.0.8 → 17.0.9
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 +21 -5
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +56 -0
- package/esm2022/src/core_private_export.mjs +2 -1
- package/esm2022/src/core_render3_private_export.mjs +1 -2
- package/esm2022/src/defer/dom_triggers.mjs +1 -5
- package/esm2022/src/di/inject_switch.mjs +2 -3
- package/esm2022/src/di/r3_injector.mjs +8 -6
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/utils.mjs +2 -2
- package/esm2022/src/hydration/views.mjs +2 -2
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/render3/after_render_hooks.mjs +15 -33
- package/esm2022/src/render3/collect_native_nodes.mjs +2 -3
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/debug/injector_profiler.mjs +1 -1
- package/esm2022/src/render3/errors_di.mjs +4 -3
- package/esm2022/src/render3/instructions/advance.mjs +2 -2
- package/esm2022/src/render3/instructions/change_detection.mjs +1 -6
- package/esm2022/src/render3/instructions/mark_view_dirty.mjs +2 -2
- package/esm2022/src/render3/instructions/shared.mjs +2 -2
- package/esm2022/src/render3/interfaces/container.mjs +1 -6
- package/esm2022/src/render3/node_manipulation.mjs +8 -8
- package/esm2022/src/render3/reactivity/effect.mjs +8 -6
- package/esm2022/src/render3/styling/style_binding_list.mjs +4 -4
- package/esm2022/src/render3/util/discovery_utils.mjs +3 -3
- package/esm2022/src/render3/util/global_utils.mjs +28 -28
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +1 -1
- package/esm2022/src/render3/util/injector_utils.mjs +6 -5
- package/esm2022/src/render3/util/view_traversal_utils.mjs +3 -12
- package/esm2022/src/render3/util/view_utils.mjs +19 -15
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +62 -58
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +206 -177
- 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 +62 -58
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +368 -25
- 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 +66 -103
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/bundle.js +67 -104
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +83 -118
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +6 -2
|
@@ -8076,13 +8076,6 @@ var DeferTriggerKind;
|
|
|
8076
8076
|
DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
|
|
8077
8077
|
DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
|
|
8078
8078
|
})(DeferTriggerKind || (DeferTriggerKind = {}));
|
|
8079
|
-
var DerivedRepeaterVarIdentity;
|
|
8080
|
-
(function(DerivedRepeaterVarIdentity2) {
|
|
8081
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
|
|
8082
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
|
|
8083
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
8084
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
8085
|
-
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
8086
8079
|
var I18nContextKind;
|
|
8087
8080
|
(function(I18nContextKind2) {
|
|
8088
8081
|
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
@@ -8237,10 +8230,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
8237
8230
|
sourceSpan
|
|
8238
8231
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8239
8232
|
}
|
|
8240
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
8233
|
+
function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
8241
8234
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
8242
8235
|
kind: OpKind.Attribute,
|
|
8243
8236
|
target,
|
|
8237
|
+
namespace,
|
|
8244
8238
|
name,
|
|
8245
8239
|
expression,
|
|
8246
8240
|
securityContext,
|
|
@@ -8895,27 +8889,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
|
|
|
8895
8889
|
}
|
|
8896
8890
|
}
|
|
8897
8891
|
};
|
|
8898
|
-
var DerivedRepeaterVarExpr = class extends ExpressionBase {
|
|
8899
|
-
constructor(xref, identity) {
|
|
8900
|
-
super();
|
|
8901
|
-
this.xref = xref;
|
|
8902
|
-
this.identity = identity;
|
|
8903
|
-
this.kind = ExpressionKind.DerivedRepeaterVar;
|
|
8904
|
-
}
|
|
8905
|
-
transformInternalExpressions(transform2, flags) {
|
|
8906
|
-
}
|
|
8907
|
-
visitExpression(visitor, context) {
|
|
8908
|
-
}
|
|
8909
|
-
isEquivalent(e) {
|
|
8910
|
-
return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
|
|
8911
|
-
}
|
|
8912
|
-
isConstant() {
|
|
8913
|
-
return false;
|
|
8914
|
-
}
|
|
8915
|
-
clone() {
|
|
8916
|
-
return new DerivedRepeaterVarExpr(this.xref, this.identity);
|
|
8917
|
-
}
|
|
8918
|
-
};
|
|
8919
8892
|
var ConstCollectedExpr = class extends ExpressionBase {
|
|
8920
8893
|
constructor(expr) {
|
|
8921
8894
|
super();
|
|
@@ -9511,11 +9484,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
|
|
|
9511
9484
|
sourceSpan
|
|
9512
9485
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
9513
9486
|
}
|
|
9514
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
9487
|
+
function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
9515
9488
|
return __spreadValues({
|
|
9516
9489
|
kind: OpKind.ExtractedAttribute,
|
|
9517
9490
|
target,
|
|
9518
9491
|
bindingKind,
|
|
9492
|
+
namespace,
|
|
9519
9493
|
name,
|
|
9520
9494
|
expression,
|
|
9521
9495
|
i18nContext,
|
|
@@ -9905,6 +9879,7 @@ function extractAttributes(job) {
|
|
|
9905
9879
|
createExtractedAttributeOp(
|
|
9906
9880
|
op.target,
|
|
9907
9881
|
bindingKind,
|
|
9882
|
+
null,
|
|
9908
9883
|
op.name,
|
|
9909
9884
|
null,
|
|
9910
9885
|
null,
|
|
@@ -9921,6 +9896,7 @@ function extractAttributes(job) {
|
|
|
9921
9896
|
OpList.insertBefore(createExtractedAttributeOp(
|
|
9922
9897
|
op.target,
|
|
9923
9898
|
BindingKind.Property,
|
|
9899
|
+
null,
|
|
9924
9900
|
op.name,
|
|
9925
9901
|
null,
|
|
9926
9902
|
null,
|
|
@@ -9934,6 +9910,7 @@ function extractAttributes(job) {
|
|
|
9934
9910
|
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9935
9911
|
op.target,
|
|
9936
9912
|
BindingKind.Property,
|
|
9913
|
+
null,
|
|
9937
9914
|
op.name,
|
|
9938
9915
|
null,
|
|
9939
9916
|
null,
|
|
@@ -9967,7 +9944,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9967
9944
|
extractable && (extractable = op.isTextAttribute);
|
|
9968
9945
|
}
|
|
9969
9946
|
if (extractable) {
|
|
9970
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9947
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9971
9948
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9972
9949
|
unit.create.push(extractedAttributeOp);
|
|
9973
9950
|
} else {
|
|
@@ -10008,7 +9985,8 @@ function specializeBindings(job) {
|
|
|
10008
9985
|
const target = lookupElement2(elements, op.target);
|
|
10009
9986
|
target.nonBindable = true;
|
|
10010
9987
|
} else {
|
|
10011
|
-
|
|
9988
|
+
const [namespace, name] = splitNsName(op.name);
|
|
9989
|
+
OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
10012
9990
|
}
|
|
10013
9991
|
break;
|
|
10014
9992
|
case BindingKind.Property:
|
|
@@ -10201,7 +10179,7 @@ function collectElementConsts(job) {
|
|
|
10201
10179
|
if (op.kind === OpKind.ExtractedAttribute) {
|
|
10202
10180
|
const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
|
|
10203
10181
|
allElementAttributes.set(op.target, attributes);
|
|
10204
|
-
attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
|
|
10182
|
+
attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
|
|
10205
10183
|
OpList.remove(op);
|
|
10206
10184
|
}
|
|
10207
10185
|
}
|
|
@@ -10274,7 +10252,7 @@ var ElementAttributes = class {
|
|
|
10274
10252
|
nameToValue.add(name);
|
|
10275
10253
|
return false;
|
|
10276
10254
|
}
|
|
10277
|
-
add(kind, name, value, trustedValueFn) {
|
|
10255
|
+
add(kind, name, value, namespace, trustedValueFn) {
|
|
10278
10256
|
var _a2;
|
|
10279
10257
|
const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
|
|
10280
10258
|
if (!allowDuplicates && this.isKnown(kind, name, value)) {
|
|
@@ -10287,7 +10265,7 @@ var ElementAttributes = class {
|
|
|
10287
10265
|
this.projectAs = value.value.toString();
|
|
10288
10266
|
}
|
|
10289
10267
|
const array = this.arrayFor(kind);
|
|
10290
|
-
array.push(...getAttributeNameLiterals(name));
|
|
10268
|
+
array.push(...getAttributeNameLiterals(namespace, name));
|
|
10291
10269
|
if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
|
|
10292
10270
|
if (value === null) {
|
|
10293
10271
|
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
@@ -10309,15 +10287,10 @@ var ElementAttributes = class {
|
|
|
10309
10287
|
return this.byKind.get(kind);
|
|
10310
10288
|
}
|
|
10311
10289
|
};
|
|
10312
|
-
function getAttributeNameLiterals(name) {
|
|
10313
|
-
const
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
return [
|
|
10317
|
-
literal(0),
|
|
10318
|
-
literal(attributeNamespace),
|
|
10319
|
-
nameLiteral
|
|
10320
|
-
];
|
|
10290
|
+
function getAttributeNameLiterals(namespace, name) {
|
|
10291
|
+
const nameLiteral = literal(name);
|
|
10292
|
+
if (namespace) {
|
|
10293
|
+
return [literal(0), literal(namespace), nameLiteral];
|
|
10321
10294
|
}
|
|
10322
10295
|
return [nameLiteral];
|
|
10323
10296
|
}
|
|
@@ -11108,7 +11081,7 @@ function parseHostStyleProperties(job) {
|
|
|
11108
11081
|
if (op.name.startsWith(STYLE_DOT)) {
|
|
11109
11082
|
op.bindingKind = BindingKind.StyleProperty;
|
|
11110
11083
|
op.name = op.name.substring(STYLE_DOT.length);
|
|
11111
|
-
if (isCssCustomProperty(op.name)) {
|
|
11084
|
+
if (!isCssCustomProperty(op.name)) {
|
|
11112
11085
|
op.name = hyphenate(op.name);
|
|
11113
11086
|
}
|
|
11114
11087
|
const { property: property2, suffix } = parseProperty(op.name);
|
|
@@ -17745,13 +17718,13 @@ function parseExtractedStyles(job) {
|
|
|
17745
17718
|
if (op.name === "style") {
|
|
17746
17719
|
const parsedStyles = parse(op.expression.value);
|
|
17747
17720
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
17748
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
17721
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
17749
17722
|
}
|
|
17750
17723
|
OpList.remove(op);
|
|
17751
17724
|
} else if (op.name === "class") {
|
|
17752
17725
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
17753
17726
|
for (const parsedClass of parsedClasses) {
|
|
17754
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
17727
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
17755
17728
|
}
|
|
17756
17729
|
OpList.remove(op);
|
|
17757
17730
|
}
|
|
@@ -18081,9 +18054,7 @@ function namespaceMath() {
|
|
|
18081
18054
|
return call(Identifiers.namespaceMathML, [], null);
|
|
18082
18055
|
}
|
|
18083
18056
|
function advance(delta, sourceSpan) {
|
|
18084
|
-
return call(Identifiers.advance, [
|
|
18085
|
-
literal(delta)
|
|
18086
|
-
], sourceSpan);
|
|
18057
|
+
return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
|
|
18087
18058
|
}
|
|
18088
18059
|
function reference(slot) {
|
|
18089
18060
|
return importExpr(Identifiers.reference).callFn([
|
|
@@ -18221,10 +18192,13 @@ function property(name, expression, sanitizer, sourceSpan) {
|
|
|
18221
18192
|
}
|
|
18222
18193
|
return call(Identifiers.property, args, sourceSpan);
|
|
18223
18194
|
}
|
|
18224
|
-
function attribute(name, expression, sanitizer) {
|
|
18195
|
+
function attribute(name, expression, sanitizer, namespace) {
|
|
18225
18196
|
const args = [literal(name), expression];
|
|
18226
|
-
if (sanitizer !== null) {
|
|
18227
|
-
args.push(sanitizer);
|
|
18197
|
+
if (sanitizer !== null || namespace !== null) {
|
|
18198
|
+
args.push(sanitizer != null ? sanitizer : literal(null));
|
|
18199
|
+
}
|
|
18200
|
+
if (namespace !== null) {
|
|
18201
|
+
args.push(literal(namespace));
|
|
18228
18202
|
}
|
|
18229
18203
|
return call(Identifiers.attribute, args, null);
|
|
18230
18204
|
}
|
|
@@ -18737,7 +18711,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
18737
18711
|
if (op.expression instanceof Interpolation2) {
|
|
18738
18712
|
OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
|
|
18739
18713
|
} else {
|
|
18740
|
-
OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
|
|
18714
|
+
OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
|
|
18741
18715
|
}
|
|
18742
18716
|
break;
|
|
18743
18717
|
case OpKind.HostProperty:
|
|
@@ -18906,38 +18880,6 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
18906
18880
|
}
|
|
18907
18881
|
}
|
|
18908
18882
|
|
|
18909
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
18910
|
-
function generateRepeaterDerivedVars(job) {
|
|
18911
|
-
const repeaters = /* @__PURE__ */ new Map();
|
|
18912
|
-
for (const unit of job.units) {
|
|
18913
|
-
for (const op of unit.ops()) {
|
|
18914
|
-
if (op.kind === OpKind.RepeaterCreate) {
|
|
18915
|
-
repeaters.set(op.xref, op);
|
|
18916
|
-
}
|
|
18917
|
-
}
|
|
18918
|
-
}
|
|
18919
|
-
for (const unit of job.units) {
|
|
18920
|
-
for (const op of unit.ops()) {
|
|
18921
|
-
transformExpressionsInOp(op, (expr) => {
|
|
18922
|
-
if (!(expr instanceof DerivedRepeaterVarExpr)) {
|
|
18923
|
-
return expr;
|
|
18924
|
-
}
|
|
18925
|
-
const repeaterOp = repeaters.get(expr.xref);
|
|
18926
|
-
switch (expr.identity) {
|
|
18927
|
-
case DerivedRepeaterVarIdentity.First:
|
|
18928
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
|
|
18929
|
-
case DerivedRepeaterVarIdentity.Last:
|
|
18930
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
|
|
18931
|
-
case DerivedRepeaterVarIdentity.Even:
|
|
18932
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
18933
|
-
case DerivedRepeaterVarIdentity.Odd:
|
|
18934
|
-
return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
18935
|
-
}
|
|
18936
|
-
}, VisitorContextFlag.None);
|
|
18937
|
-
}
|
|
18938
|
-
}
|
|
18939
|
-
}
|
|
18940
|
-
|
|
18941
18883
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
18942
18884
|
function resolveContexts(job) {
|
|
18943
18885
|
for (const unit of job.units) {
|
|
@@ -20041,7 +19983,6 @@ var phases = [
|
|
|
20041
19983
|
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
20042
19984
|
{ kind: CompilationJobKind.Both, fn: deleteAnyCasts },
|
|
20043
19985
|
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
20044
|
-
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
20045
19986
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
20046
19987
|
{ kind: CompilationJobKind.Both, fn: resolveNames },
|
|
20047
19988
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
@@ -20392,6 +20333,9 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
20392
20333
|
}
|
|
20393
20334
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
20394
20335
|
var _a2;
|
|
20336
|
+
if (switchBlock.cases.length === 0) {
|
|
20337
|
+
return;
|
|
20338
|
+
}
|
|
20395
20339
|
let firstXref = null;
|
|
20396
20340
|
let firstSlotHandle = null;
|
|
20397
20341
|
let conditions = [];
|
|
@@ -20536,21 +20480,37 @@ function ingestIcu(unit, icu) {
|
|
|
20536
20480
|
function ingestForBlock(unit, forBlock) {
|
|
20537
20481
|
var _a2, _b2, _c2;
|
|
20538
20482
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
20539
|
-
const createRepeaterAlias = (ident, repeaterVar) => {
|
|
20540
|
-
repeaterView.aliases.add({
|
|
20541
|
-
kind: SemanticVariableKind.Alias,
|
|
20542
|
-
name: null,
|
|
20543
|
-
identifier: ident,
|
|
20544
|
-
expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
|
|
20545
|
-
});
|
|
20546
|
-
};
|
|
20547
20483
|
repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
|
|
20548
20484
|
repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
|
|
20549
20485
|
repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20486
|
+
const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
|
|
20487
|
+
const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
|
|
20488
|
+
repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
|
|
20489
|
+
repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
|
|
20490
|
+
repeaterView.aliases.add({
|
|
20491
|
+
kind: SemanticVariableKind.Alias,
|
|
20492
|
+
name: null,
|
|
20493
|
+
identifier: forBlock.contextVariables.$first.name,
|
|
20494
|
+
expression: new LexicalReadExpr(indexName).identical(literal(0))
|
|
20495
|
+
});
|
|
20496
|
+
repeaterView.aliases.add({
|
|
20497
|
+
kind: SemanticVariableKind.Alias,
|
|
20498
|
+
name: null,
|
|
20499
|
+
identifier: forBlock.contextVariables.$last.name,
|
|
20500
|
+
expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
|
|
20501
|
+
});
|
|
20502
|
+
repeaterView.aliases.add({
|
|
20503
|
+
kind: SemanticVariableKind.Alias,
|
|
20504
|
+
name: null,
|
|
20505
|
+
identifier: forBlock.contextVariables.$even.name,
|
|
20506
|
+
expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
|
|
20507
|
+
});
|
|
20508
|
+
repeaterView.aliases.add({
|
|
20509
|
+
kind: SemanticVariableKind.Alias,
|
|
20510
|
+
name: null,
|
|
20511
|
+
identifier: forBlock.contextVariables.$odd.name,
|
|
20512
|
+
expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
|
|
20513
|
+
});
|
|
20554
20514
|
const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
|
|
20555
20515
|
const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
|
|
20556
20516
|
ingestNodes(repeaterView, forBlock.children);
|
|
@@ -20747,7 +20707,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
20747
20707
|
}
|
|
20748
20708
|
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
20749
20709
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
20750
|
-
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
|
|
20710
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
|
|
20751
20711
|
}
|
|
20752
20712
|
}
|
|
20753
20713
|
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
@@ -20758,7 +20718,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
|
|
|
20758
20718
|
const isTextBinding = typeof value === "string";
|
|
20759
20719
|
if (templateKind === TemplateKind.Structural) {
|
|
20760
20720
|
if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
|
|
20761
|
-
return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
|
|
20721
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
|
|
20762
20722
|
}
|
|
20763
20723
|
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
20764
20724
|
return null;
|
|
@@ -23617,6 +23577,9 @@ var TemplateDefinitionBuilder = class {
|
|
|
23617
23577
|
this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
|
|
23618
23578
|
}
|
|
23619
23579
|
visitSwitchBlock(block) {
|
|
23580
|
+
if (block.cases.length === 0) {
|
|
23581
|
+
return;
|
|
23582
|
+
}
|
|
23620
23583
|
const caseData = block.cases.map((currentCase) => {
|
|
23621
23584
|
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
|
|
23622
23585
|
const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
|
|
@@ -23939,7 +23902,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
23939
23902
|
if (delta < 1) {
|
|
23940
23903
|
throw new Error("advance instruction can only go forwards");
|
|
23941
23904
|
}
|
|
23942
|
-
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
|
|
23905
|
+
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
|
|
23943
23906
|
this._currentIndex = nodeIndex;
|
|
23944
23907
|
}
|
|
23945
23908
|
}
|
|
@@ -26366,7 +26329,7 @@ function publishFacade(global) {
|
|
|
26366
26329
|
}
|
|
26367
26330
|
|
|
26368
26331
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
26369
|
-
var VERSION2 = new Version("17.0.
|
|
26332
|
+
var VERSION2 = new Version("17.0.9");
|
|
26370
26333
|
|
|
26371
26334
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
26372
26335
|
var _I18N_ATTR = "i18n";
|
|
@@ -27432,7 +27395,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
|
|
|
27432
27395
|
function compileDeclareClassMetadata(metadata) {
|
|
27433
27396
|
const definitionMap = new DefinitionMap();
|
|
27434
27397
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
27435
|
-
definitionMap.set("version", literal("17.0.
|
|
27398
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27436
27399
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27437
27400
|
definitionMap.set("type", metadata.type);
|
|
27438
27401
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -27503,7 +27466,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
27503
27466
|
const hasTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);
|
|
27504
27467
|
const minVersion = hasTransformFunctions ? MINIMUM_PARTIAL_LINKER_VERSION2 : "14.0.0";
|
|
27505
27468
|
definitionMap.set("minVersion", literal(minVersion));
|
|
27506
|
-
definitionMap.set("version", literal("17.0.
|
|
27469
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27507
27470
|
definitionMap.set("type", meta.type.value);
|
|
27508
27471
|
if (meta.isStandalone) {
|
|
27509
27472
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -27735,7 +27698,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION3 = "12.0.0";
|
|
|
27735
27698
|
function compileDeclareFactoryFunction(meta) {
|
|
27736
27699
|
const definitionMap = new DefinitionMap();
|
|
27737
27700
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
27738
|
-
definitionMap.set("version", literal("17.0.
|
|
27701
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27739
27702
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27740
27703
|
definitionMap.set("type", meta.type.value);
|
|
27741
27704
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -27758,7 +27721,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
27758
27721
|
function createInjectableDefinitionMap(meta) {
|
|
27759
27722
|
const definitionMap = new DefinitionMap();
|
|
27760
27723
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
27761
|
-
definitionMap.set("version", literal("17.0.
|
|
27724
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27762
27725
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27763
27726
|
definitionMap.set("type", meta.type.value);
|
|
27764
27727
|
if (meta.providedIn !== void 0) {
|
|
@@ -27796,7 +27759,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
27796
27759
|
function createInjectorDefinitionMap(meta) {
|
|
27797
27760
|
const definitionMap = new DefinitionMap();
|
|
27798
27761
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
27799
|
-
definitionMap.set("version", literal("17.0.
|
|
27762
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27800
27763
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27801
27764
|
definitionMap.set("type", meta.type.value);
|
|
27802
27765
|
definitionMap.set("providers", meta.providers);
|
|
@@ -27820,7 +27783,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
27820
27783
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
27821
27784
|
}
|
|
27822
27785
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
27823
|
-
definitionMap.set("version", literal("17.0.
|
|
27786
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27824
27787
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27825
27788
|
definitionMap.set("type", meta.type.value);
|
|
27826
27789
|
if (meta.bootstrap.length > 0) {
|
|
@@ -27855,7 +27818,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
27855
27818
|
function createPipeDefinitionMap(meta) {
|
|
27856
27819
|
const definitionMap = new DefinitionMap();
|
|
27857
27820
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION7));
|
|
27858
|
-
definitionMap.set("version", literal("17.0.
|
|
27821
|
+
definitionMap.set("version", literal("17.0.9"));
|
|
27859
27822
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27860
27823
|
definitionMap.set("type", meta.type.value);
|
|
27861
27824
|
if (meta.isStandalone) {
|
|
@@ -27872,7 +27835,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
27872
27835
|
publishFacade(_global);
|
|
27873
27836
|
|
|
27874
27837
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
27875
|
-
var VERSION3 = new Version("17.0.
|
|
27838
|
+
var VERSION3 = new Version("17.0.9");
|
|
27876
27839
|
|
|
27877
27840
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
27878
27841
|
var EmitFlags;
|
|
@@ -32271,7 +32234,7 @@ var DtsMetadataReader = class {
|
|
|
32271
32234
|
const inputs = ClassPropertyMapping.fromMappedObject(readInputsType(def.type.typeArguments[3]));
|
|
32272
32235
|
const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
|
|
32273
32236
|
const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
|
|
32274
|
-
const
|
|
32237
|
+
const isSignal2 = def.type.typeArguments.length > 9 && ((_b2 = readBooleanType(def.type.typeArguments[9])) != null ? _b2 : false);
|
|
32275
32238
|
return __spreadProps(__spreadValues({
|
|
32276
32239
|
kind: MetaKind.Directive,
|
|
32277
32240
|
matchSource: MatchSource.Selector,
|
|
@@ -32291,7 +32254,7 @@ var DtsMetadataReader = class {
|
|
|
32291
32254
|
animationTriggerNames: null,
|
|
32292
32255
|
ngContentSelectors,
|
|
32293
32256
|
isStandalone,
|
|
32294
|
-
isSignal,
|
|
32257
|
+
isSignal: isSignal2,
|
|
32295
32258
|
imports: null,
|
|
32296
32259
|
schemas: null,
|
|
32297
32260
|
decorator: null,
|
|
@@ -34911,14 +34874,14 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
|
|
|
34911
34874
|
}
|
|
34912
34875
|
isStandalone = resolved;
|
|
34913
34876
|
}
|
|
34914
|
-
let
|
|
34877
|
+
let isSignal2 = false;
|
|
34915
34878
|
if (directive.has("signals")) {
|
|
34916
34879
|
const expr = directive.get("signals");
|
|
34917
34880
|
const resolved = evaluator.evaluate(expr);
|
|
34918
34881
|
if (typeof resolved !== "boolean") {
|
|
34919
34882
|
throw createValueHasWrongTypeError(expr, resolved, `signals flag must be a boolean`);
|
|
34920
34883
|
}
|
|
34921
|
-
|
|
34884
|
+
isSignal2 = resolved;
|
|
34922
34885
|
}
|
|
34923
34886
|
const usesInheritance = reflector.hasBaseClass(clazz);
|
|
34924
34887
|
const sourceFile = clazz.getSourceFile();
|
|
@@ -34948,7 +34911,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
|
|
|
34948
34911
|
exportAs,
|
|
34949
34912
|
providers,
|
|
34950
34913
|
isStandalone,
|
|
34951
|
-
isSignal,
|
|
34914
|
+
isSignal: isSignal2,
|
|
34952
34915
|
hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
|
|
34953
34916
|
};
|
|
34954
34917
|
return {
|
|
@@ -44891,10 +44854,12 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
|
44891
44854
|
return [];
|
|
44892
44855
|
}
|
|
44893
44856
|
};
|
|
44857
|
+
function isSignal(symbol) {
|
|
44858
|
+
return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal") && symbol.parent.escapedName.includes("@angular/core");
|
|
44859
|
+
}
|
|
44894
44860
|
function buildDiagnosticForSignal(ctx, node, component) {
|
|
44895
|
-
var _a2, _b2;
|
|
44896
44861
|
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
44897
|
-
if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && ((
|
|
44862
|
+
if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (isSignal(symbol.tsType.symbol) || isSignal(symbol.tsType.aliasSymbol))) {
|
|
44898
44863
|
const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
|
|
44899
44864
|
const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
|
|
44900
44865
|
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
|