@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
|
@@ -7190,13 +7190,6 @@ var DeferTriggerKind;
|
|
|
7190
7190
|
DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
|
|
7191
7191
|
DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
|
|
7192
7192
|
})(DeferTriggerKind || (DeferTriggerKind = {}));
|
|
7193
|
-
var DerivedRepeaterVarIdentity;
|
|
7194
|
-
(function(DerivedRepeaterVarIdentity2) {
|
|
7195
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
|
|
7196
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
|
|
7197
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7198
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7199
|
-
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7200
7193
|
var I18nContextKind;
|
|
7201
7194
|
(function(I18nContextKind2) {
|
|
7202
7195
|
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
@@ -7351,10 +7344,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7351
7344
|
sourceSpan
|
|
7352
7345
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7353
7346
|
}
|
|
7354
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7347
|
+
function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7355
7348
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7356
7349
|
kind: OpKind.Attribute,
|
|
7357
7350
|
target,
|
|
7351
|
+
namespace,
|
|
7358
7352
|
name,
|
|
7359
7353
|
expression,
|
|
7360
7354
|
securityContext,
|
|
@@ -8009,27 +8003,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
|
|
|
8009
8003
|
}
|
|
8010
8004
|
}
|
|
8011
8005
|
};
|
|
8012
|
-
var DerivedRepeaterVarExpr = class extends ExpressionBase {
|
|
8013
|
-
constructor(xref, identity) {
|
|
8014
|
-
super();
|
|
8015
|
-
this.xref = xref;
|
|
8016
|
-
this.identity = identity;
|
|
8017
|
-
this.kind = ExpressionKind.DerivedRepeaterVar;
|
|
8018
|
-
}
|
|
8019
|
-
transformInternalExpressions(transform2, flags) {
|
|
8020
|
-
}
|
|
8021
|
-
visitExpression(visitor, context) {
|
|
8022
|
-
}
|
|
8023
|
-
isEquivalent(e) {
|
|
8024
|
-
return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
|
|
8025
|
-
}
|
|
8026
|
-
isConstant() {
|
|
8027
|
-
return false;
|
|
8028
|
-
}
|
|
8029
|
-
clone() {
|
|
8030
|
-
return new DerivedRepeaterVarExpr(this.xref, this.identity);
|
|
8031
|
-
}
|
|
8032
|
-
};
|
|
8033
8006
|
var ConstCollectedExpr = class extends ExpressionBase {
|
|
8034
8007
|
constructor(expr) {
|
|
8035
8008
|
super();
|
|
@@ -8625,11 +8598,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
|
|
|
8625
8598
|
sourceSpan
|
|
8626
8599
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8627
8600
|
}
|
|
8628
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
8601
|
+
function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
8629
8602
|
return __spreadValues({
|
|
8630
8603
|
kind: OpKind.ExtractedAttribute,
|
|
8631
8604
|
target,
|
|
8632
8605
|
bindingKind,
|
|
8606
|
+
namespace,
|
|
8633
8607
|
name,
|
|
8634
8608
|
expression,
|
|
8635
8609
|
i18nContext,
|
|
@@ -9019,6 +8993,7 @@ function extractAttributes(job) {
|
|
|
9019
8993
|
createExtractedAttributeOp(
|
|
9020
8994
|
op.target,
|
|
9021
8995
|
bindingKind,
|
|
8996
|
+
null,
|
|
9022
8997
|
op.name,
|
|
9023
8998
|
null,
|
|
9024
8999
|
null,
|
|
@@ -9035,6 +9010,7 @@ function extractAttributes(job) {
|
|
|
9035
9010
|
OpList.insertBefore(createExtractedAttributeOp(
|
|
9036
9011
|
op.target,
|
|
9037
9012
|
BindingKind.Property,
|
|
9013
|
+
null,
|
|
9038
9014
|
op.name,
|
|
9039
9015
|
null,
|
|
9040
9016
|
null,
|
|
@@ -9048,6 +9024,7 @@ function extractAttributes(job) {
|
|
|
9048
9024
|
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9049
9025
|
op.target,
|
|
9050
9026
|
BindingKind.Property,
|
|
9027
|
+
null,
|
|
9051
9028
|
op.name,
|
|
9052
9029
|
null,
|
|
9053
9030
|
null,
|
|
@@ -9081,7 +9058,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9081
9058
|
extractable && (extractable = op.isTextAttribute);
|
|
9082
9059
|
}
|
|
9083
9060
|
if (extractable) {
|
|
9084
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9061
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9085
9062
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9086
9063
|
unit.create.push(extractedAttributeOp);
|
|
9087
9064
|
} else {
|
|
@@ -9122,7 +9099,8 @@ function specializeBindings(job) {
|
|
|
9122
9099
|
const target = lookupElement2(elements, op.target);
|
|
9123
9100
|
target.nonBindable = true;
|
|
9124
9101
|
} else {
|
|
9125
|
-
|
|
9102
|
+
const [namespace, name] = splitNsName(op.name);
|
|
9103
|
+
OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
9126
9104
|
}
|
|
9127
9105
|
break;
|
|
9128
9106
|
case BindingKind.Property:
|
|
@@ -9315,7 +9293,7 @@ function collectElementConsts(job) {
|
|
|
9315
9293
|
if (op.kind === OpKind.ExtractedAttribute) {
|
|
9316
9294
|
const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
|
|
9317
9295
|
allElementAttributes.set(op.target, attributes);
|
|
9318
|
-
attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
|
|
9296
|
+
attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
|
|
9319
9297
|
OpList.remove(op);
|
|
9320
9298
|
}
|
|
9321
9299
|
}
|
|
@@ -9388,7 +9366,7 @@ var ElementAttributes = class {
|
|
|
9388
9366
|
nameToValue.add(name);
|
|
9389
9367
|
return false;
|
|
9390
9368
|
}
|
|
9391
|
-
add(kind, name, value, trustedValueFn) {
|
|
9369
|
+
add(kind, name, value, namespace, trustedValueFn) {
|
|
9392
9370
|
var _a2;
|
|
9393
9371
|
const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
|
|
9394
9372
|
if (!allowDuplicates && this.isKnown(kind, name, value)) {
|
|
@@ -9401,7 +9379,7 @@ var ElementAttributes = class {
|
|
|
9401
9379
|
this.projectAs = value.value.toString();
|
|
9402
9380
|
}
|
|
9403
9381
|
const array = this.arrayFor(kind);
|
|
9404
|
-
array.push(...getAttributeNameLiterals(name));
|
|
9382
|
+
array.push(...getAttributeNameLiterals(namespace, name));
|
|
9405
9383
|
if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
|
|
9406
9384
|
if (value === null) {
|
|
9407
9385
|
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
@@ -9423,15 +9401,10 @@ var ElementAttributes = class {
|
|
|
9423
9401
|
return this.byKind.get(kind);
|
|
9424
9402
|
}
|
|
9425
9403
|
};
|
|
9426
|
-
function getAttributeNameLiterals(name) {
|
|
9427
|
-
const
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
return [
|
|
9431
|
-
literal(0),
|
|
9432
|
-
literal(attributeNamespace),
|
|
9433
|
-
nameLiteral
|
|
9434
|
-
];
|
|
9404
|
+
function getAttributeNameLiterals(namespace, name) {
|
|
9405
|
+
const nameLiteral = literal(name);
|
|
9406
|
+
if (namespace) {
|
|
9407
|
+
return [literal(0), literal(namespace), nameLiteral];
|
|
9435
9408
|
}
|
|
9436
9409
|
return [nameLiteral];
|
|
9437
9410
|
}
|
|
@@ -10222,7 +10195,7 @@ function parseHostStyleProperties(job) {
|
|
|
10222
10195
|
if (op.name.startsWith(STYLE_DOT)) {
|
|
10223
10196
|
op.bindingKind = BindingKind.StyleProperty;
|
|
10224
10197
|
op.name = op.name.substring(STYLE_DOT.length);
|
|
10225
|
-
if (isCssCustomProperty(op.name)) {
|
|
10198
|
+
if (!isCssCustomProperty(op.name)) {
|
|
10226
10199
|
op.name = hyphenate(op.name);
|
|
10227
10200
|
}
|
|
10228
10201
|
const { property: property2, suffix } = parseProperty(op.name);
|
|
@@ -16900,13 +16873,13 @@ function parseExtractedStyles(job) {
|
|
|
16900
16873
|
if (op.name === "style") {
|
|
16901
16874
|
const parsedStyles = parse(op.expression.value);
|
|
16902
16875
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
16903
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
16876
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
16904
16877
|
}
|
|
16905
16878
|
OpList.remove(op);
|
|
16906
16879
|
} else if (op.name === "class") {
|
|
16907
16880
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16908
16881
|
for (const parsedClass of parsedClasses) {
|
|
16909
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
16882
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
16910
16883
|
}
|
|
16911
16884
|
OpList.remove(op);
|
|
16912
16885
|
}
|
|
@@ -17236,9 +17209,7 @@ function namespaceMath() {
|
|
|
17236
17209
|
return call(Identifiers.namespaceMathML, [], null);
|
|
17237
17210
|
}
|
|
17238
17211
|
function advance(delta, sourceSpan) {
|
|
17239
|
-
return call(Identifiers.advance, [
|
|
17240
|
-
literal(delta)
|
|
17241
|
-
], sourceSpan);
|
|
17212
|
+
return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
|
|
17242
17213
|
}
|
|
17243
17214
|
function reference(slot) {
|
|
17244
17215
|
return importExpr(Identifiers.reference).callFn([
|
|
@@ -17376,10 +17347,13 @@ function property(name, expression, sanitizer, sourceSpan) {
|
|
|
17376
17347
|
}
|
|
17377
17348
|
return call(Identifiers.property, args, sourceSpan);
|
|
17378
17349
|
}
|
|
17379
|
-
function attribute(name, expression, sanitizer) {
|
|
17350
|
+
function attribute(name, expression, sanitizer, namespace) {
|
|
17380
17351
|
const args = [literal(name), expression];
|
|
17381
|
-
if (sanitizer !== null) {
|
|
17382
|
-
args.push(sanitizer);
|
|
17352
|
+
if (sanitizer !== null || namespace !== null) {
|
|
17353
|
+
args.push(sanitizer != null ? sanitizer : literal(null));
|
|
17354
|
+
}
|
|
17355
|
+
if (namespace !== null) {
|
|
17356
|
+
args.push(literal(namespace));
|
|
17383
17357
|
}
|
|
17384
17358
|
return call(Identifiers.attribute, args, null);
|
|
17385
17359
|
}
|
|
@@ -17892,7 +17866,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17892
17866
|
if (op.expression instanceof Interpolation2) {
|
|
17893
17867
|
OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
|
|
17894
17868
|
} else {
|
|
17895
|
-
OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
|
|
17869
|
+
OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
|
|
17896
17870
|
}
|
|
17897
17871
|
break;
|
|
17898
17872
|
case OpKind.HostProperty:
|
|
@@ -18061,38 +18035,6 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
18061
18035
|
}
|
|
18062
18036
|
}
|
|
18063
18037
|
|
|
18064
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
18065
|
-
function generateRepeaterDerivedVars(job) {
|
|
18066
|
-
const repeaters = /* @__PURE__ */ new Map();
|
|
18067
|
-
for (const unit of job.units) {
|
|
18068
|
-
for (const op of unit.ops()) {
|
|
18069
|
-
if (op.kind === OpKind.RepeaterCreate) {
|
|
18070
|
-
repeaters.set(op.xref, op);
|
|
18071
|
-
}
|
|
18072
|
-
}
|
|
18073
|
-
}
|
|
18074
|
-
for (const unit of job.units) {
|
|
18075
|
-
for (const op of unit.ops()) {
|
|
18076
|
-
transformExpressionsInOp(op, (expr) => {
|
|
18077
|
-
if (!(expr instanceof DerivedRepeaterVarExpr)) {
|
|
18078
|
-
return expr;
|
|
18079
|
-
}
|
|
18080
|
-
const repeaterOp = repeaters.get(expr.xref);
|
|
18081
|
-
switch (expr.identity) {
|
|
18082
|
-
case DerivedRepeaterVarIdentity.First:
|
|
18083
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
|
|
18084
|
-
case DerivedRepeaterVarIdentity.Last:
|
|
18085
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
|
|
18086
|
-
case DerivedRepeaterVarIdentity.Even:
|
|
18087
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
18088
|
-
case DerivedRepeaterVarIdentity.Odd:
|
|
18089
|
-
return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
18090
|
-
}
|
|
18091
|
-
}, VisitorContextFlag.None);
|
|
18092
|
-
}
|
|
18093
|
-
}
|
|
18094
|
-
}
|
|
18095
|
-
|
|
18096
18038
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
18097
18039
|
function resolveContexts(job) {
|
|
18098
18040
|
for (const unit of job.units) {
|
|
@@ -19196,7 +19138,6 @@ var phases = [
|
|
|
19196
19138
|
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
19197
19139
|
{ kind: CompilationJobKind.Both, fn: deleteAnyCasts },
|
|
19198
19140
|
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
19199
|
-
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
19200
19141
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
19201
19142
|
{ kind: CompilationJobKind.Both, fn: resolveNames },
|
|
19202
19143
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
@@ -19547,6 +19488,9 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19547
19488
|
}
|
|
19548
19489
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
19549
19490
|
var _a2;
|
|
19491
|
+
if (switchBlock.cases.length === 0) {
|
|
19492
|
+
return;
|
|
19493
|
+
}
|
|
19550
19494
|
let firstXref = null;
|
|
19551
19495
|
let firstSlotHandle = null;
|
|
19552
19496
|
let conditions = [];
|
|
@@ -19691,21 +19635,37 @@ function ingestIcu(unit, icu) {
|
|
|
19691
19635
|
function ingestForBlock(unit, forBlock) {
|
|
19692
19636
|
var _a2, _b2, _c2;
|
|
19693
19637
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
19694
|
-
const createRepeaterAlias = (ident, repeaterVar) => {
|
|
19695
|
-
repeaterView.aliases.add({
|
|
19696
|
-
kind: SemanticVariableKind.Alias,
|
|
19697
|
-
name: null,
|
|
19698
|
-
identifier: ident,
|
|
19699
|
-
expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
|
|
19700
|
-
});
|
|
19701
|
-
};
|
|
19702
19638
|
repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
|
|
19703
19639
|
repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
|
|
19704
19640
|
repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19708
|
-
|
|
19641
|
+
const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
|
|
19642
|
+
const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
|
|
19643
|
+
repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
|
|
19644
|
+
repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
|
|
19645
|
+
repeaterView.aliases.add({
|
|
19646
|
+
kind: SemanticVariableKind.Alias,
|
|
19647
|
+
name: null,
|
|
19648
|
+
identifier: forBlock.contextVariables.$first.name,
|
|
19649
|
+
expression: new LexicalReadExpr(indexName).identical(literal(0))
|
|
19650
|
+
});
|
|
19651
|
+
repeaterView.aliases.add({
|
|
19652
|
+
kind: SemanticVariableKind.Alias,
|
|
19653
|
+
name: null,
|
|
19654
|
+
identifier: forBlock.contextVariables.$last.name,
|
|
19655
|
+
expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
|
|
19656
|
+
});
|
|
19657
|
+
repeaterView.aliases.add({
|
|
19658
|
+
kind: SemanticVariableKind.Alias,
|
|
19659
|
+
name: null,
|
|
19660
|
+
identifier: forBlock.contextVariables.$even.name,
|
|
19661
|
+
expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
|
|
19662
|
+
});
|
|
19663
|
+
repeaterView.aliases.add({
|
|
19664
|
+
kind: SemanticVariableKind.Alias,
|
|
19665
|
+
name: null,
|
|
19666
|
+
identifier: forBlock.contextVariables.$odd.name,
|
|
19667
|
+
expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
|
|
19668
|
+
});
|
|
19709
19669
|
const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
|
|
19710
19670
|
const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
|
|
19711
19671
|
ingestNodes(repeaterView, forBlock.children);
|
|
@@ -19902,7 +19862,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
19902
19862
|
}
|
|
19903
19863
|
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19904
19864
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
19905
|
-
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
|
|
19865
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
|
|
19906
19866
|
}
|
|
19907
19867
|
}
|
|
19908
19868
|
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
@@ -19913,7 +19873,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
|
|
|
19913
19873
|
const isTextBinding = typeof value === "string";
|
|
19914
19874
|
if (templateKind === TemplateKind.Structural) {
|
|
19915
19875
|
if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
|
|
19916
|
-
return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
|
|
19876
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
|
|
19917
19877
|
}
|
|
19918
19878
|
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19919
19879
|
return null;
|
|
@@ -22772,6 +22732,9 @@ var TemplateDefinitionBuilder = class {
|
|
|
22772
22732
|
this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
|
|
22773
22733
|
}
|
|
22774
22734
|
visitSwitchBlock(block) {
|
|
22735
|
+
if (block.cases.length === 0) {
|
|
22736
|
+
return;
|
|
22737
|
+
}
|
|
22775
22738
|
const caseData = block.cases.map((currentCase) => {
|
|
22776
22739
|
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
|
|
22777
22740
|
const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
|
|
@@ -23094,7 +23057,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
23094
23057
|
if (delta < 1) {
|
|
23095
23058
|
throw new Error("advance instruction can only go forwards");
|
|
23096
23059
|
}
|
|
23097
|
-
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
|
|
23060
|
+
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
|
|
23098
23061
|
this._currentIndex = nodeIndex;
|
|
23099
23062
|
}
|
|
23100
23063
|
}
|
|
@@ -25521,7 +25484,7 @@ function publishFacade(global) {
|
|
|
25521
25484
|
}
|
|
25522
25485
|
|
|
25523
25486
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25524
|
-
var VERSION2 = new Version("17.0.
|
|
25487
|
+
var VERSION2 = new Version("17.0.9");
|
|
25525
25488
|
|
|
25526
25489
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25527
25490
|
var _VisitorMode;
|