@angular-eslint/bundled-angular-compiler 20.1.2-alpha.2 → 20.1.2-alpha.20
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/dist/index.js +736 -721
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
BinaryOperator: () => BinaryOperator,
|
|
33
33
|
BinaryOperatorExpr: () => BinaryOperatorExpr,
|
|
34
34
|
BindingPipe: () => BindingPipe,
|
|
35
|
+
BindingPipeType: () => BindingPipeType,
|
|
35
36
|
BindingType: () => BindingType,
|
|
36
37
|
Block: () => Block,
|
|
37
38
|
BlockParameter: () => BlockParameter,
|
|
@@ -42,6 +43,7 @@ __export(index_exports, {
|
|
|
42
43
|
Call: () => Call,
|
|
43
44
|
Chain: () => Chain,
|
|
44
45
|
ChangeDetectionStrategy: () => ChangeDetectionStrategy,
|
|
46
|
+
CombinedRecursiveAstVisitor: () => CombinedRecursiveAstVisitor,
|
|
45
47
|
CommaExpr: () => CommaExpr,
|
|
46
48
|
Comment: () => Comment2,
|
|
47
49
|
CompilerConfig: () => CompilerConfig,
|
|
@@ -85,7 +87,6 @@ __export(index_exports, {
|
|
|
85
87
|
JSDocComment: () => JSDocComment,
|
|
86
88
|
JitEvaluator: () => JitEvaluator,
|
|
87
89
|
KeyedRead: () => KeyedRead,
|
|
88
|
-
KeyedWrite: () => KeyedWrite,
|
|
89
90
|
LeadingComment: () => LeadingComment,
|
|
90
91
|
LetDeclaration: () => LetDeclaration2,
|
|
91
92
|
Lexer: () => Lexer,
|
|
@@ -118,10 +119,8 @@ __export(index_exports, {
|
|
|
118
119
|
ParsedPropertyType: () => ParsedPropertyType,
|
|
119
120
|
ParsedVariable: () => ParsedVariable,
|
|
120
121
|
Parser: () => Parser2,
|
|
121
|
-
ParserError: () => ParserError,
|
|
122
122
|
PrefixNot: () => PrefixNot,
|
|
123
123
|
PropertyRead: () => PropertyRead,
|
|
124
|
-
PropertyWrite: () => PropertyWrite,
|
|
125
124
|
R3Identifiers: () => Identifiers,
|
|
126
125
|
R3NgModuleMetadataKind: () => R3NgModuleMetadataKind,
|
|
127
126
|
R3SelectorScopeMode: () => R3SelectorScopeMode,
|
|
@@ -214,9 +213,6 @@ __export(index_exports, {
|
|
|
214
213
|
VoidExpr: () => VoidExpr,
|
|
215
214
|
VoidExpression: () => VoidExpression,
|
|
216
215
|
WrappedNodeExpr: () => WrappedNodeExpr,
|
|
217
|
-
WriteKeyExpr: () => WriteKeyExpr,
|
|
218
|
-
WritePropExpr: () => WritePropExpr,
|
|
219
|
-
WriteVarExpr: () => WriteVarExpr,
|
|
220
216
|
Xliff: () => Xliff,
|
|
221
217
|
Xliff2: () => Xliff2,
|
|
222
218
|
Xmb: () => Xmb,
|
|
@@ -283,7 +279,7 @@ __export(index_exports, {
|
|
|
283
279
|
});
|
|
284
280
|
module.exports = __toCommonJS(index_exports);
|
|
285
281
|
|
|
286
|
-
// ../../node_modules/.pnpm/@angular+compiler@20.
|
|
282
|
+
// ../../node_modules/.pnpm/@angular+compiler@20.1.2/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
287
283
|
var _SELECTOR_REGEXP = new RegExp(
|
|
288
284
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
289
285
|
// 8: ","
|
|
@@ -1174,24 +1170,34 @@ var BinaryOperator;
|
|
|
1174
1170
|
(function(BinaryOperator2) {
|
|
1175
1171
|
BinaryOperator2[BinaryOperator2["Equals"] = 0] = "Equals";
|
|
1176
1172
|
BinaryOperator2[BinaryOperator2["NotEquals"] = 1] = "NotEquals";
|
|
1177
|
-
BinaryOperator2[BinaryOperator2["
|
|
1178
|
-
BinaryOperator2[BinaryOperator2["
|
|
1179
|
-
BinaryOperator2[BinaryOperator2["
|
|
1180
|
-
BinaryOperator2[BinaryOperator2["
|
|
1181
|
-
BinaryOperator2[BinaryOperator2["
|
|
1182
|
-
BinaryOperator2[BinaryOperator2["
|
|
1183
|
-
BinaryOperator2[BinaryOperator2["
|
|
1184
|
-
BinaryOperator2[BinaryOperator2["
|
|
1185
|
-
BinaryOperator2[BinaryOperator2["
|
|
1186
|
-
BinaryOperator2[BinaryOperator2["
|
|
1187
|
-
BinaryOperator2[BinaryOperator2["
|
|
1188
|
-
BinaryOperator2[BinaryOperator2["
|
|
1189
|
-
BinaryOperator2[BinaryOperator2["
|
|
1190
|
-
BinaryOperator2[BinaryOperator2["
|
|
1191
|
-
BinaryOperator2[BinaryOperator2["
|
|
1192
|
-
BinaryOperator2[BinaryOperator2["
|
|
1193
|
-
BinaryOperator2[BinaryOperator2["
|
|
1194
|
-
BinaryOperator2[BinaryOperator2["
|
|
1173
|
+
BinaryOperator2[BinaryOperator2["Assign"] = 2] = "Assign";
|
|
1174
|
+
BinaryOperator2[BinaryOperator2["Identical"] = 3] = "Identical";
|
|
1175
|
+
BinaryOperator2[BinaryOperator2["NotIdentical"] = 4] = "NotIdentical";
|
|
1176
|
+
BinaryOperator2[BinaryOperator2["Minus"] = 5] = "Minus";
|
|
1177
|
+
BinaryOperator2[BinaryOperator2["Plus"] = 6] = "Plus";
|
|
1178
|
+
BinaryOperator2[BinaryOperator2["Divide"] = 7] = "Divide";
|
|
1179
|
+
BinaryOperator2[BinaryOperator2["Multiply"] = 8] = "Multiply";
|
|
1180
|
+
BinaryOperator2[BinaryOperator2["Modulo"] = 9] = "Modulo";
|
|
1181
|
+
BinaryOperator2[BinaryOperator2["And"] = 10] = "And";
|
|
1182
|
+
BinaryOperator2[BinaryOperator2["Or"] = 11] = "Or";
|
|
1183
|
+
BinaryOperator2[BinaryOperator2["BitwiseOr"] = 12] = "BitwiseOr";
|
|
1184
|
+
BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 13] = "BitwiseAnd";
|
|
1185
|
+
BinaryOperator2[BinaryOperator2["Lower"] = 14] = "Lower";
|
|
1186
|
+
BinaryOperator2[BinaryOperator2["LowerEquals"] = 15] = "LowerEquals";
|
|
1187
|
+
BinaryOperator2[BinaryOperator2["Bigger"] = 16] = "Bigger";
|
|
1188
|
+
BinaryOperator2[BinaryOperator2["BiggerEquals"] = 17] = "BiggerEquals";
|
|
1189
|
+
BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 18] = "NullishCoalesce";
|
|
1190
|
+
BinaryOperator2[BinaryOperator2["Exponentiation"] = 19] = "Exponentiation";
|
|
1191
|
+
BinaryOperator2[BinaryOperator2["In"] = 20] = "In";
|
|
1192
|
+
BinaryOperator2[BinaryOperator2["AdditionAssignment"] = 21] = "AdditionAssignment";
|
|
1193
|
+
BinaryOperator2[BinaryOperator2["SubtractionAssignment"] = 22] = "SubtractionAssignment";
|
|
1194
|
+
BinaryOperator2[BinaryOperator2["MultiplicationAssignment"] = 23] = "MultiplicationAssignment";
|
|
1195
|
+
BinaryOperator2[BinaryOperator2["DivisionAssignment"] = 24] = "DivisionAssignment";
|
|
1196
|
+
BinaryOperator2[BinaryOperator2["RemainderAssignment"] = 25] = "RemainderAssignment";
|
|
1197
|
+
BinaryOperator2[BinaryOperator2["ExponentiationAssignment"] = 26] = "ExponentiationAssignment";
|
|
1198
|
+
BinaryOperator2[BinaryOperator2["AndAssignment"] = 27] = "AndAssignment";
|
|
1199
|
+
BinaryOperator2[BinaryOperator2["OrAssignment"] = 28] = "OrAssignment";
|
|
1200
|
+
BinaryOperator2[BinaryOperator2["NullishCoalesceAssignment"] = 29] = "NullishCoalesceAssignment";
|
|
1195
1201
|
})(BinaryOperator || (BinaryOperator = {}));
|
|
1196
1202
|
function nullSafeIsEquivalent(base, other) {
|
|
1197
1203
|
if (base == null || other == null) {
|
|
@@ -1328,7 +1334,7 @@ var ReadVarExpr = class _ReadVarExpr extends Expression {
|
|
|
1328
1334
|
return new _ReadVarExpr(this.name, this.type, this.sourceSpan);
|
|
1329
1335
|
}
|
|
1330
1336
|
set(value) {
|
|
1331
|
-
return new
|
|
1337
|
+
return new BinaryOperatorExpr(BinaryOperator.Assign, this, value, null, this.sourceSpan);
|
|
1332
1338
|
}
|
|
1333
1339
|
};
|
|
1334
1340
|
var TypeofExpr = class _TypeofExpr extends Expression {
|
|
@@ -1397,88 +1403,6 @@ var WrappedNodeExpr = class _WrappedNodeExpr extends Expression {
|
|
|
1397
1403
|
return new _WrappedNodeExpr(this.node, this.type, this.sourceSpan);
|
|
1398
1404
|
}
|
|
1399
1405
|
};
|
|
1400
|
-
var WriteVarExpr = class _WriteVarExpr extends Expression {
|
|
1401
|
-
static {
|
|
1402
|
-
__name(this, "WriteVarExpr");
|
|
1403
|
-
}
|
|
1404
|
-
name;
|
|
1405
|
-
value;
|
|
1406
|
-
constructor(name, value, type, sourceSpan) {
|
|
1407
|
-
super(type || value.type, sourceSpan);
|
|
1408
|
-
this.name = name;
|
|
1409
|
-
this.value = value;
|
|
1410
|
-
}
|
|
1411
|
-
isEquivalent(e) {
|
|
1412
|
-
return e instanceof _WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
|
|
1413
|
-
}
|
|
1414
|
-
isConstant() {
|
|
1415
|
-
return false;
|
|
1416
|
-
}
|
|
1417
|
-
visitExpression(visitor, context) {
|
|
1418
|
-
return visitor.visitWriteVarExpr(this, context);
|
|
1419
|
-
}
|
|
1420
|
-
clone() {
|
|
1421
|
-
return new _WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan);
|
|
1422
|
-
}
|
|
1423
|
-
toDeclStmt(type, modifiers) {
|
|
1424
|
-
return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
|
|
1425
|
-
}
|
|
1426
|
-
toConstDecl() {
|
|
1427
|
-
return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);
|
|
1428
|
-
}
|
|
1429
|
-
};
|
|
1430
|
-
var WriteKeyExpr = class _WriteKeyExpr extends Expression {
|
|
1431
|
-
static {
|
|
1432
|
-
__name(this, "WriteKeyExpr");
|
|
1433
|
-
}
|
|
1434
|
-
receiver;
|
|
1435
|
-
index;
|
|
1436
|
-
value;
|
|
1437
|
-
constructor(receiver, index, value, type, sourceSpan) {
|
|
1438
|
-
super(type || value.type, sourceSpan);
|
|
1439
|
-
this.receiver = receiver;
|
|
1440
|
-
this.index = index;
|
|
1441
|
-
this.value = value;
|
|
1442
|
-
}
|
|
1443
|
-
isEquivalent(e) {
|
|
1444
|
-
return e instanceof _WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
|
|
1445
|
-
}
|
|
1446
|
-
isConstant() {
|
|
1447
|
-
return false;
|
|
1448
|
-
}
|
|
1449
|
-
visitExpression(visitor, context) {
|
|
1450
|
-
return visitor.visitWriteKeyExpr(this, context);
|
|
1451
|
-
}
|
|
1452
|
-
clone() {
|
|
1453
|
-
return new _WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
var WritePropExpr = class _WritePropExpr extends Expression {
|
|
1457
|
-
static {
|
|
1458
|
-
__name(this, "WritePropExpr");
|
|
1459
|
-
}
|
|
1460
|
-
receiver;
|
|
1461
|
-
name;
|
|
1462
|
-
value;
|
|
1463
|
-
constructor(receiver, name, value, type, sourceSpan) {
|
|
1464
|
-
super(type || value.type, sourceSpan);
|
|
1465
|
-
this.receiver = receiver;
|
|
1466
|
-
this.name = name;
|
|
1467
|
-
this.value = value;
|
|
1468
|
-
}
|
|
1469
|
-
isEquivalent(e) {
|
|
1470
|
-
return e instanceof _WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);
|
|
1471
|
-
}
|
|
1472
|
-
isConstant() {
|
|
1473
|
-
return false;
|
|
1474
|
-
}
|
|
1475
|
-
visitExpression(visitor, context) {
|
|
1476
|
-
return visitor.visitWritePropExpr(this, context);
|
|
1477
|
-
}
|
|
1478
|
-
clone() {
|
|
1479
|
-
return new _WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);
|
|
1480
|
-
}
|
|
1481
|
-
};
|
|
1482
1406
|
var InvokeFunctionExpr = class _InvokeFunctionExpr extends Expression {
|
|
1483
1407
|
static {
|
|
1484
1408
|
__name(this, "InvokeFunctionExpr");
|
|
@@ -2024,6 +1948,10 @@ var BinaryOperatorExpr = class _BinaryOperatorExpr extends Expression {
|
|
|
2024
1948
|
clone() {
|
|
2025
1949
|
return new _BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
|
|
2026
1950
|
}
|
|
1951
|
+
isAssignment() {
|
|
1952
|
+
const op = this.operator;
|
|
1953
|
+
return op === BinaryOperator.Assign || op === BinaryOperator.AdditionAssignment || op === BinaryOperator.SubtractionAssignment || op === BinaryOperator.MultiplicationAssignment || op === BinaryOperator.DivisionAssignment || op === BinaryOperator.RemainderAssignment || op === BinaryOperator.ExponentiationAssignment || op === BinaryOperator.AndAssignment || op === BinaryOperator.OrAssignment || op === BinaryOperator.NullishCoalesceAssignment;
|
|
1954
|
+
}
|
|
2027
1955
|
};
|
|
2028
1956
|
var ReadPropExpr = class _ReadPropExpr extends Expression {
|
|
2029
1957
|
static {
|
|
@@ -2050,7 +1978,7 @@ var ReadPropExpr = class _ReadPropExpr extends Expression {
|
|
|
2050
1978
|
return visitor.visitReadPropExpr(this, context);
|
|
2051
1979
|
}
|
|
2052
1980
|
set(value) {
|
|
2053
|
-
return new
|
|
1981
|
+
return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.prop(this.name), value, null, this.sourceSpan);
|
|
2054
1982
|
}
|
|
2055
1983
|
clone() {
|
|
2056
1984
|
return new _ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);
|
|
@@ -2077,7 +2005,7 @@ var ReadKeyExpr = class _ReadKeyExpr extends Expression {
|
|
|
2077
2005
|
return visitor.visitReadKeyExpr(this, context);
|
|
2078
2006
|
}
|
|
2079
2007
|
set(value) {
|
|
2080
|
-
return new
|
|
2008
|
+
return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.key(this.index), value, null, this.sourceSpan);
|
|
2081
2009
|
}
|
|
2082
2010
|
clone() {
|
|
2083
2011
|
return new _ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
|
|
@@ -2370,21 +2298,6 @@ var RecursiveAstVisitor$1 = class RecursiveAstVisitor {
|
|
|
2370
2298
|
visitReadVarExpr(ast, context) {
|
|
2371
2299
|
return this.visitExpression(ast, context);
|
|
2372
2300
|
}
|
|
2373
|
-
visitWriteVarExpr(ast, context) {
|
|
2374
|
-
ast.value.visitExpression(this, context);
|
|
2375
|
-
return this.visitExpression(ast, context);
|
|
2376
|
-
}
|
|
2377
|
-
visitWriteKeyExpr(ast, context) {
|
|
2378
|
-
ast.receiver.visitExpression(this, context);
|
|
2379
|
-
ast.index.visitExpression(this, context);
|
|
2380
|
-
ast.value.visitExpression(this, context);
|
|
2381
|
-
return this.visitExpression(ast, context);
|
|
2382
|
-
}
|
|
2383
|
-
visitWritePropExpr(ast, context) {
|
|
2384
|
-
ast.receiver.visitExpression(this, context);
|
|
2385
|
-
ast.value.visitExpression(this, context);
|
|
2386
|
-
return this.visitExpression(ast, context);
|
|
2387
|
-
}
|
|
2388
2301
|
visitDynamicImportExpr(ast, context) {
|
|
2389
2302
|
return this.visitExpression(ast, context);
|
|
2390
2303
|
}
|
|
@@ -2703,9 +2616,6 @@ var output_ast = /* @__PURE__ */ Object.freeze({
|
|
|
2703
2616
|
UnaryOperatorExpr,
|
|
2704
2617
|
VoidExpr,
|
|
2705
2618
|
WrappedNodeExpr,
|
|
2706
|
-
WriteKeyExpr,
|
|
2707
|
-
WritePropExpr,
|
|
2708
|
-
WriteVarExpr,
|
|
2709
2619
|
areAllEquivalent,
|
|
2710
2620
|
arrowFn,
|
|
2711
2621
|
expressionType,
|
|
@@ -2799,23 +2709,23 @@ var ConstantPool = class {
|
|
|
2799
2709
|
}
|
|
2800
2710
|
if (!newValue && !fixup.shared || newValue && forceShared) {
|
|
2801
2711
|
const name = this.freshName();
|
|
2802
|
-
let
|
|
2712
|
+
let value;
|
|
2803
2713
|
let usage;
|
|
2804
2714
|
if (this.isClosureCompilerEnabled && isLongStringLiteral(literal2)) {
|
|
2805
|
-
|
|
2715
|
+
value = new FunctionExpr(
|
|
2806
2716
|
[],
|
|
2807
2717
|
// Params.
|
|
2808
2718
|
[
|
|
2809
2719
|
// Statements.
|
|
2810
2720
|
new ReturnStatement(literal2)
|
|
2811
2721
|
]
|
|
2812
|
-
)
|
|
2722
|
+
);
|
|
2813
2723
|
usage = variable(name).callFn([]);
|
|
2814
2724
|
} else {
|
|
2815
|
-
|
|
2725
|
+
value = literal2;
|
|
2816
2726
|
usage = variable(name);
|
|
2817
2727
|
}
|
|
2818
|
-
this.statements.push(
|
|
2728
|
+
this.statements.push(new DeclareVarStmt(name, value, INFERRED_TYPE, StmtModifier.Final));
|
|
2819
2729
|
fixup.fixup(usage);
|
|
2820
2730
|
}
|
|
2821
2731
|
return fixup;
|
|
@@ -2872,7 +2782,7 @@ var ConstantPool = class {
|
|
|
2872
2782
|
const parameters = resultExpressions.filter(isVariable).map((e) => new FnParam(e.name, DYNAMIC_TYPE));
|
|
2873
2783
|
const pureFunctionDeclaration = arrowFn(parameters, resultMap(resultExpressions), INFERRED_TYPE);
|
|
2874
2784
|
const name = this.freshName();
|
|
2875
|
-
this.statements.push(
|
|
2785
|
+
this.statements.push(new DeclareVarStmt(name, pureFunctionDeclaration, INFERRED_TYPE, StmtModifier.Final));
|
|
2876
2786
|
literalFactory = variable(name);
|
|
2877
2787
|
this.literalFactories.set(key, literalFactory);
|
|
2878
2788
|
}
|
|
@@ -2957,6 +2867,23 @@ var Identifiers = class {
|
|
|
2957
2867
|
static element = { name: "\u0275\u0275element", moduleName: CORE };
|
|
2958
2868
|
static elementStart = { name: "\u0275\u0275elementStart", moduleName: CORE };
|
|
2959
2869
|
static elementEnd = { name: "\u0275\u0275elementEnd", moduleName: CORE };
|
|
2870
|
+
static domElement = { name: "\u0275\u0275domElement", moduleName: CORE };
|
|
2871
|
+
static domElementStart = { name: "\u0275\u0275domElementStart", moduleName: CORE };
|
|
2872
|
+
static domElementEnd = { name: "\u0275\u0275domElementEnd", moduleName: CORE };
|
|
2873
|
+
static domElementContainer = {
|
|
2874
|
+
name: "\u0275\u0275domElementContainer",
|
|
2875
|
+
moduleName: CORE
|
|
2876
|
+
};
|
|
2877
|
+
static domElementContainerStart = {
|
|
2878
|
+
name: "\u0275\u0275domElementContainerStart",
|
|
2879
|
+
moduleName: CORE
|
|
2880
|
+
};
|
|
2881
|
+
static domElementContainerEnd = {
|
|
2882
|
+
name: "\u0275\u0275domElementContainerEnd",
|
|
2883
|
+
moduleName: CORE
|
|
2884
|
+
};
|
|
2885
|
+
static domTemplate = { name: "\u0275\u0275domTemplate", moduleName: CORE };
|
|
2886
|
+
static domListener = { name: "\u0275\u0275domListener", moduleName: CORE };
|
|
2960
2887
|
static advance = { name: "\u0275\u0275advance", moduleName: CORE };
|
|
2961
2888
|
static syntheticHostProperty = {
|
|
2962
2889
|
name: "\u0275\u0275syntheticHostProperty",
|
|
@@ -3309,6 +3236,7 @@ var Identifiers = class {
|
|
|
3309
3236
|
static InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: CORE };
|
|
3310
3237
|
static UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
|
|
3311
3238
|
static unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
|
|
3239
|
+
static assertType = { name: "\u0275assertType", moduleName: CORE };
|
|
3312
3240
|
};
|
|
3313
3241
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
3314
3242
|
function dashCaseToCamelCase(input) {
|
|
@@ -3569,6 +3497,38 @@ var _EmittedLine = class {
|
|
|
3569
3497
|
this.indent = indent;
|
|
3570
3498
|
}
|
|
3571
3499
|
};
|
|
3500
|
+
var BINARY_OPERATORS$1 = /* @__PURE__ */ new Map([
|
|
3501
|
+
[BinaryOperator.And, "&&"],
|
|
3502
|
+
[BinaryOperator.Bigger, ">"],
|
|
3503
|
+
[BinaryOperator.BiggerEquals, ">="],
|
|
3504
|
+
[BinaryOperator.BitwiseOr, "|"],
|
|
3505
|
+
[BinaryOperator.BitwiseAnd, "&"],
|
|
3506
|
+
[BinaryOperator.Divide, "/"],
|
|
3507
|
+
[BinaryOperator.Assign, "="],
|
|
3508
|
+
[BinaryOperator.Equals, "=="],
|
|
3509
|
+
[BinaryOperator.Identical, "==="],
|
|
3510
|
+
[BinaryOperator.Lower, "<"],
|
|
3511
|
+
[BinaryOperator.LowerEquals, "<="],
|
|
3512
|
+
[BinaryOperator.Minus, "-"],
|
|
3513
|
+
[BinaryOperator.Modulo, "%"],
|
|
3514
|
+
[BinaryOperator.Exponentiation, "**"],
|
|
3515
|
+
[BinaryOperator.Multiply, "*"],
|
|
3516
|
+
[BinaryOperator.NotEquals, "!="],
|
|
3517
|
+
[BinaryOperator.NotIdentical, "!=="],
|
|
3518
|
+
[BinaryOperator.NullishCoalesce, "??"],
|
|
3519
|
+
[BinaryOperator.Or, "||"],
|
|
3520
|
+
[BinaryOperator.Plus, "+"],
|
|
3521
|
+
[BinaryOperator.In, "in"],
|
|
3522
|
+
[BinaryOperator.AdditionAssignment, "+="],
|
|
3523
|
+
[BinaryOperator.SubtractionAssignment, "-="],
|
|
3524
|
+
[BinaryOperator.MultiplicationAssignment, "*="],
|
|
3525
|
+
[BinaryOperator.DivisionAssignment, "/="],
|
|
3526
|
+
[BinaryOperator.RemainderAssignment, "%="],
|
|
3527
|
+
[BinaryOperator.ExponentiationAssignment, "**="],
|
|
3528
|
+
[BinaryOperator.AndAssignment, "&&="],
|
|
3529
|
+
[BinaryOperator.OrAssignment, "||="],
|
|
3530
|
+
[BinaryOperator.NullishCoalesceAssignment, "??="]
|
|
3531
|
+
]);
|
|
3572
3532
|
var EmitterVisitorContext = class _EmitterVisitorContext {
|
|
3573
3533
|
static {
|
|
3574
3534
|
__name(this, "EmitterVisitorContext");
|
|
@@ -3765,46 +3725,6 @@ var AbstractEmitterVisitor = class {
|
|
|
3765
3725
|
ctx.println(stmt, `}`);
|
|
3766
3726
|
return null;
|
|
3767
3727
|
}
|
|
3768
|
-
visitWriteVarExpr(expr, ctx) {
|
|
3769
|
-
const lineWasEmpty = ctx.lineIsEmpty();
|
|
3770
|
-
if (!lineWasEmpty) {
|
|
3771
|
-
ctx.print(expr, "(");
|
|
3772
|
-
}
|
|
3773
|
-
ctx.print(expr, `${expr.name} = `);
|
|
3774
|
-
expr.value.visitExpression(this, ctx);
|
|
3775
|
-
if (!lineWasEmpty) {
|
|
3776
|
-
ctx.print(expr, ")");
|
|
3777
|
-
}
|
|
3778
|
-
return null;
|
|
3779
|
-
}
|
|
3780
|
-
visitWriteKeyExpr(expr, ctx) {
|
|
3781
|
-
const lineWasEmpty = ctx.lineIsEmpty();
|
|
3782
|
-
if (!lineWasEmpty) {
|
|
3783
|
-
ctx.print(expr, "(");
|
|
3784
|
-
}
|
|
3785
|
-
expr.receiver.visitExpression(this, ctx);
|
|
3786
|
-
ctx.print(expr, `[`);
|
|
3787
|
-
expr.index.visitExpression(this, ctx);
|
|
3788
|
-
ctx.print(expr, `] = `);
|
|
3789
|
-
expr.value.visitExpression(this, ctx);
|
|
3790
|
-
if (!lineWasEmpty) {
|
|
3791
|
-
ctx.print(expr, ")");
|
|
3792
|
-
}
|
|
3793
|
-
return null;
|
|
3794
|
-
}
|
|
3795
|
-
visitWritePropExpr(expr, ctx) {
|
|
3796
|
-
const lineWasEmpty = ctx.lineIsEmpty();
|
|
3797
|
-
if (!lineWasEmpty) {
|
|
3798
|
-
ctx.print(expr, "(");
|
|
3799
|
-
}
|
|
3800
|
-
expr.receiver.visitExpression(this, ctx);
|
|
3801
|
-
ctx.print(expr, `.${expr.name} = `);
|
|
3802
|
-
expr.value.visitExpression(this, ctx);
|
|
3803
|
-
if (!lineWasEmpty) {
|
|
3804
|
-
ctx.print(expr, ")");
|
|
3805
|
-
}
|
|
3806
|
-
return null;
|
|
3807
|
-
}
|
|
3808
3728
|
visitInvokeFunctionExpr(expr, ctx) {
|
|
3809
3729
|
const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;
|
|
3810
3730
|
if (shouldParenthesize) {
|
|
@@ -3923,76 +3843,15 @@ var AbstractEmitterVisitor = class {
|
|
|
3923
3843
|
return null;
|
|
3924
3844
|
}
|
|
3925
3845
|
visitBinaryOperatorExpr(ast, ctx) {
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
opStr = "==";
|
|
3930
|
-
break;
|
|
3931
|
-
case BinaryOperator.Identical:
|
|
3932
|
-
opStr = "===";
|
|
3933
|
-
break;
|
|
3934
|
-
case BinaryOperator.NotEquals:
|
|
3935
|
-
opStr = "!=";
|
|
3936
|
-
break;
|
|
3937
|
-
case BinaryOperator.NotIdentical:
|
|
3938
|
-
opStr = "!==";
|
|
3939
|
-
break;
|
|
3940
|
-
case BinaryOperator.And:
|
|
3941
|
-
opStr = "&&";
|
|
3942
|
-
break;
|
|
3943
|
-
case BinaryOperator.BitwiseOr:
|
|
3944
|
-
opStr = "|";
|
|
3945
|
-
break;
|
|
3946
|
-
case BinaryOperator.BitwiseAnd:
|
|
3947
|
-
opStr = "&";
|
|
3948
|
-
break;
|
|
3949
|
-
case BinaryOperator.Or:
|
|
3950
|
-
opStr = "||";
|
|
3951
|
-
break;
|
|
3952
|
-
case BinaryOperator.Plus:
|
|
3953
|
-
opStr = "+";
|
|
3954
|
-
break;
|
|
3955
|
-
case BinaryOperator.Minus:
|
|
3956
|
-
opStr = "-";
|
|
3957
|
-
break;
|
|
3958
|
-
case BinaryOperator.Divide:
|
|
3959
|
-
opStr = "/";
|
|
3960
|
-
break;
|
|
3961
|
-
case BinaryOperator.Multiply:
|
|
3962
|
-
opStr = "*";
|
|
3963
|
-
break;
|
|
3964
|
-
case BinaryOperator.Modulo:
|
|
3965
|
-
opStr = "%";
|
|
3966
|
-
break;
|
|
3967
|
-
case BinaryOperator.Exponentiation:
|
|
3968
|
-
opStr = "**";
|
|
3969
|
-
break;
|
|
3970
|
-
case BinaryOperator.Lower:
|
|
3971
|
-
opStr = "<";
|
|
3972
|
-
break;
|
|
3973
|
-
case BinaryOperator.LowerEquals:
|
|
3974
|
-
opStr = "<=";
|
|
3975
|
-
break;
|
|
3976
|
-
case BinaryOperator.Bigger:
|
|
3977
|
-
opStr = ">";
|
|
3978
|
-
break;
|
|
3979
|
-
case BinaryOperator.BiggerEquals:
|
|
3980
|
-
opStr = ">=";
|
|
3981
|
-
break;
|
|
3982
|
-
case BinaryOperator.NullishCoalesce:
|
|
3983
|
-
opStr = "??";
|
|
3984
|
-
break;
|
|
3985
|
-
case BinaryOperator.In:
|
|
3986
|
-
opStr = "in";
|
|
3987
|
-
break;
|
|
3988
|
-
default:
|
|
3989
|
-
throw new Error(`Unknown operator ${ast.operator}`);
|
|
3846
|
+
const operator = BINARY_OPERATORS$1.get(ast.operator);
|
|
3847
|
+
if (!operator) {
|
|
3848
|
+
throw new Error(`Unknown operator ${ast.operator}`);
|
|
3990
3849
|
}
|
|
3991
3850
|
const parens = ast !== this.lastIfCondition;
|
|
3992
3851
|
if (parens)
|
|
3993
3852
|
ctx.print(ast, `(`);
|
|
3994
3853
|
ast.lhs.visitExpression(this, ctx);
|
|
3995
|
-
ctx.print(ast, ` ${
|
|
3854
|
+
ctx.print(ast, ` ${operator} `);
|
|
3996
3855
|
ast.rhs.visitExpression(this, ctx);
|
|
3997
3856
|
if (parens)
|
|
3998
3857
|
ctx.print(ast, `)`);
|
|
@@ -4180,7 +4039,7 @@ function compileFactoryFunction(meta) {
|
|
|
4180
4039
|
let retExpr = null;
|
|
4181
4040
|
function makeConditionalFactory(nonCtorExpr) {
|
|
4182
4041
|
const r = variable("__ngConditionalFactory__");
|
|
4183
|
-
body.push(r.
|
|
4042
|
+
body.push(new DeclareVarStmt(r.name, NULL_EXPR, INFERRED_TYPE));
|
|
4184
4043
|
const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
|
|
4185
4044
|
body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
|
|
4186
4045
|
return r;
|
|
@@ -4309,21 +4168,6 @@ function getInjectFn(target) {
|
|
|
4309
4168
|
}
|
|
4310
4169
|
}
|
|
4311
4170
|
__name(getInjectFn, "getInjectFn");
|
|
4312
|
-
var ParserError = class {
|
|
4313
|
-
static {
|
|
4314
|
-
__name(this, "ParserError");
|
|
4315
|
-
}
|
|
4316
|
-
input;
|
|
4317
|
-
errLocation;
|
|
4318
|
-
ctxLocation;
|
|
4319
|
-
message;
|
|
4320
|
-
constructor(message, input, errLocation, ctxLocation) {
|
|
4321
|
-
this.input = input;
|
|
4322
|
-
this.errLocation = errLocation;
|
|
4323
|
-
this.ctxLocation = ctxLocation;
|
|
4324
|
-
this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;
|
|
4325
|
-
}
|
|
4326
|
-
};
|
|
4327
4171
|
var ParseSpan = class {
|
|
4328
4172
|
static {
|
|
4329
4173
|
__name(this, "ParseSpan");
|
|
@@ -4430,23 +4274,6 @@ var PropertyRead = class extends ASTWithName {
|
|
|
4430
4274
|
return visitor.visitPropertyRead(this, context);
|
|
4431
4275
|
}
|
|
4432
4276
|
};
|
|
4433
|
-
var PropertyWrite = class extends ASTWithName {
|
|
4434
|
-
static {
|
|
4435
|
-
__name(this, "PropertyWrite");
|
|
4436
|
-
}
|
|
4437
|
-
receiver;
|
|
4438
|
-
name;
|
|
4439
|
-
value;
|
|
4440
|
-
constructor(span, sourceSpan, nameSpan, receiver, name, value) {
|
|
4441
|
-
super(span, sourceSpan, nameSpan);
|
|
4442
|
-
this.receiver = receiver;
|
|
4443
|
-
this.name = name;
|
|
4444
|
-
this.value = value;
|
|
4445
|
-
}
|
|
4446
|
-
visit(visitor, context = null) {
|
|
4447
|
-
return visitor.visitPropertyWrite(this, context);
|
|
4448
|
-
}
|
|
4449
|
-
};
|
|
4450
4277
|
var SafePropertyRead = class extends ASTWithName {
|
|
4451
4278
|
static {
|
|
4452
4279
|
__name(this, "SafePropertyRead");
|
|
@@ -4492,23 +4319,11 @@ var SafeKeyedRead = class extends AST {
|
|
|
4492
4319
|
return visitor.visitSafeKeyedRead(this, context);
|
|
4493
4320
|
}
|
|
4494
4321
|
};
|
|
4495
|
-
var
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
key;
|
|
4501
|
-
value;
|
|
4502
|
-
constructor(span, sourceSpan, receiver, key, value) {
|
|
4503
|
-
super(span, sourceSpan);
|
|
4504
|
-
this.receiver = receiver;
|
|
4505
|
-
this.key = key;
|
|
4506
|
-
this.value = value;
|
|
4507
|
-
}
|
|
4508
|
-
visit(visitor, context = null) {
|
|
4509
|
-
return visitor.visitKeyedWrite(this, context);
|
|
4510
|
-
}
|
|
4511
|
-
};
|
|
4322
|
+
var BindingPipeType;
|
|
4323
|
+
(function(BindingPipeType2) {
|
|
4324
|
+
BindingPipeType2[BindingPipeType2["ReferencedByName"] = 0] = "ReferencedByName";
|
|
4325
|
+
BindingPipeType2[BindingPipeType2["ReferencedDirectly"] = 1] = "ReferencedDirectly";
|
|
4326
|
+
})(BindingPipeType || (BindingPipeType = {}));
|
|
4512
4327
|
var BindingPipe = class extends ASTWithName {
|
|
4513
4328
|
static {
|
|
4514
4329
|
__name(this, "BindingPipe");
|
|
@@ -4516,11 +4331,13 @@ var BindingPipe = class extends ASTWithName {
|
|
|
4516
4331
|
exp;
|
|
4517
4332
|
name;
|
|
4518
4333
|
args;
|
|
4519
|
-
|
|
4334
|
+
type;
|
|
4335
|
+
constructor(span, sourceSpan, exp, name, args, type, nameSpan) {
|
|
4520
4336
|
super(span, sourceSpan, nameSpan);
|
|
4521
4337
|
this.exp = exp;
|
|
4522
4338
|
this.name = name;
|
|
4523
4339
|
this.args = args;
|
|
4340
|
+
this.type = type;
|
|
4524
4341
|
}
|
|
4525
4342
|
visit(visitor, context = null) {
|
|
4526
4343
|
return visitor.visitPipe(this, context);
|
|
@@ -4598,6 +4415,9 @@ var Binary = class extends AST {
|
|
|
4598
4415
|
visit(visitor, context = null) {
|
|
4599
4416
|
return visitor.visitBinary(this, context);
|
|
4600
4417
|
}
|
|
4418
|
+
static isAssignmentOperation(op) {
|
|
4419
|
+
return op === "=" || op === "+=" || op === "-=" || op === "*=" || op === "/=" || op === "%=" || op === "**=" || op === "&&=" || op === "||=" || op === "??=";
|
|
4420
|
+
}
|
|
4601
4421
|
};
|
|
4602
4422
|
var Unary = class _Unary extends Binary {
|
|
4603
4423
|
static {
|
|
@@ -4894,11 +4714,6 @@ var RecursiveAstVisitor2 = class {
|
|
|
4894
4714
|
this.visit(ast.receiver, context);
|
|
4895
4715
|
this.visit(ast.key, context);
|
|
4896
4716
|
}
|
|
4897
|
-
visitKeyedWrite(ast, context) {
|
|
4898
|
-
this.visit(ast.receiver, context);
|
|
4899
|
-
this.visit(ast.key, context);
|
|
4900
|
-
this.visit(ast.value, context);
|
|
4901
|
-
}
|
|
4902
4717
|
visitLiteralArray(ast, context) {
|
|
4903
4718
|
this.visitAll(ast.expressions, context);
|
|
4904
4719
|
}
|
|
@@ -4922,10 +4737,6 @@ var RecursiveAstVisitor2 = class {
|
|
|
4922
4737
|
visitPropertyRead(ast, context) {
|
|
4923
4738
|
this.visit(ast.receiver, context);
|
|
4924
4739
|
}
|
|
4925
|
-
visitPropertyWrite(ast, context) {
|
|
4926
|
-
this.visit(ast.receiver, context);
|
|
4927
|
-
this.visit(ast.value, context);
|
|
4928
|
-
}
|
|
4929
4740
|
visitSafePropertyRead(ast, context) {
|
|
4930
4741
|
this.visit(ast.receiver, context);
|
|
4931
4742
|
}
|
|
@@ -4977,7 +4788,7 @@ var ParsedProperty = class {
|
|
|
4977
4788
|
keySpan;
|
|
4978
4789
|
valueSpan;
|
|
4979
4790
|
isLiteral;
|
|
4980
|
-
|
|
4791
|
+
isLegacyAnimation;
|
|
4981
4792
|
constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {
|
|
4982
4793
|
this.name = name;
|
|
4983
4794
|
this.expression = expression;
|
|
@@ -4986,20 +4797,20 @@ var ParsedProperty = class {
|
|
|
4986
4797
|
this.keySpan = keySpan;
|
|
4987
4798
|
this.valueSpan = valueSpan;
|
|
4988
4799
|
this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
|
|
4989
|
-
this.
|
|
4800
|
+
this.isLegacyAnimation = this.type === ParsedPropertyType.LEGACY_ANIMATION;
|
|
4990
4801
|
}
|
|
4991
4802
|
};
|
|
4992
4803
|
var ParsedPropertyType;
|
|
4993
4804
|
(function(ParsedPropertyType2) {
|
|
4994
4805
|
ParsedPropertyType2[ParsedPropertyType2["DEFAULT"] = 0] = "DEFAULT";
|
|
4995
4806
|
ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
|
|
4996
|
-
ParsedPropertyType2[ParsedPropertyType2["
|
|
4807
|
+
ParsedPropertyType2[ParsedPropertyType2["LEGACY_ANIMATION"] = 2] = "LEGACY_ANIMATION";
|
|
4997
4808
|
ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
|
|
4998
4809
|
})(ParsedPropertyType || (ParsedPropertyType = {}));
|
|
4999
4810
|
var ParsedEventType;
|
|
5000
4811
|
(function(ParsedEventType2) {
|
|
5001
4812
|
ParsedEventType2[ParsedEventType2["Regular"] = 0] = "Regular";
|
|
5002
|
-
ParsedEventType2[ParsedEventType2["
|
|
4813
|
+
ParsedEventType2[ParsedEventType2["LegacyAnimation"] = 1] = "LegacyAnimation";
|
|
5003
4814
|
ParsedEventType2[ParsedEventType2["TwoWay"] = 2] = "TwoWay";
|
|
5004
4815
|
})(ParsedEventType || (ParsedEventType = {}));
|
|
5005
4816
|
var ParsedEvent = class {
|
|
@@ -5046,7 +4857,7 @@ var BindingType;
|
|
|
5046
4857
|
BindingType2[BindingType2["Attribute"] = 1] = "Attribute";
|
|
5047
4858
|
BindingType2[BindingType2["Class"] = 2] = "Class";
|
|
5048
4859
|
BindingType2[BindingType2["Style"] = 3] = "Style";
|
|
5049
|
-
BindingType2[BindingType2["
|
|
4860
|
+
BindingType2[BindingType2["LegacyAnimation"] = 4] = "LegacyAnimation";
|
|
5050
4861
|
BindingType2[BindingType2["TwoWay"] = 5] = "TwoWay";
|
|
5051
4862
|
})(BindingType || (BindingType = {}));
|
|
5052
4863
|
var BoundElementProperty = class {
|
|
@@ -5237,7 +5048,7 @@ var BoundEvent = class _BoundEvent {
|
|
|
5237
5048
|
}
|
|
5238
5049
|
static fromParsedEvent(event) {
|
|
5239
5050
|
const target = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;
|
|
5240
|
-
const phase = event.type === ParsedEventType.
|
|
5051
|
+
const phase = event.type === ParsedEventType.LegacyAnimation ? event.targetOrPhase : null;
|
|
5241
5052
|
if (event.keySpan === void 0) {
|
|
5242
5053
|
throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);
|
|
5243
5054
|
}
|
|
@@ -5258,11 +5069,13 @@ var Element$1 = class Element {
|
|
|
5258
5069
|
directives;
|
|
5259
5070
|
children;
|
|
5260
5071
|
references;
|
|
5072
|
+
isSelfClosing;
|
|
5261
5073
|
sourceSpan;
|
|
5262
5074
|
startSourceSpan;
|
|
5263
5075
|
endSourceSpan;
|
|
5076
|
+
isVoid;
|
|
5264
5077
|
i18n;
|
|
5265
|
-
constructor(name, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5078
|
+
constructor(name, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, isVoid, i18n2) {
|
|
5266
5079
|
this.name = name;
|
|
5267
5080
|
this.attributes = attributes;
|
|
5268
5081
|
this.inputs = inputs;
|
|
@@ -5270,9 +5083,11 @@ var Element$1 = class Element {
|
|
|
5270
5083
|
this.directives = directives;
|
|
5271
5084
|
this.children = children;
|
|
5272
5085
|
this.references = references;
|
|
5086
|
+
this.isSelfClosing = isSelfClosing;
|
|
5273
5087
|
this.sourceSpan = sourceSpan;
|
|
5274
5088
|
this.startSourceSpan = startSourceSpan;
|
|
5275
5089
|
this.endSourceSpan = endSourceSpan;
|
|
5090
|
+
this.isVoid = isVoid;
|
|
5276
5091
|
this.i18n = i18n2;
|
|
5277
5092
|
}
|
|
5278
5093
|
visit(visitor) {
|
|
@@ -5642,11 +5457,12 @@ var Component$1 = class Component {
|
|
|
5642
5457
|
directives;
|
|
5643
5458
|
children;
|
|
5644
5459
|
references;
|
|
5460
|
+
isSelfClosing;
|
|
5645
5461
|
sourceSpan;
|
|
5646
5462
|
startSourceSpan;
|
|
5647
5463
|
endSourceSpan;
|
|
5648
5464
|
i18n;
|
|
5649
|
-
constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5465
|
+
constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5650
5466
|
this.componentName = componentName;
|
|
5651
5467
|
this.tagName = tagName;
|
|
5652
5468
|
this.fullName = fullName;
|
|
@@ -5656,6 +5472,7 @@ var Component$1 = class Component {
|
|
|
5656
5472
|
this.directives = directives;
|
|
5657
5473
|
this.children = children;
|
|
5658
5474
|
this.references = references;
|
|
5475
|
+
this.isSelfClosing = isSelfClosing;
|
|
5659
5476
|
this.sourceSpan = sourceSpan;
|
|
5660
5477
|
this.startSourceSpan = startSourceSpan;
|
|
5661
5478
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -5706,11 +5523,12 @@ var Template = class {
|
|
|
5706
5523
|
children;
|
|
5707
5524
|
references;
|
|
5708
5525
|
variables;
|
|
5526
|
+
isSelfClosing;
|
|
5709
5527
|
sourceSpan;
|
|
5710
5528
|
startSourceSpan;
|
|
5711
5529
|
endSourceSpan;
|
|
5712
5530
|
i18n;
|
|
5713
|
-
constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5531
|
+
constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5714
5532
|
this.tagName = tagName;
|
|
5715
5533
|
this.attributes = attributes;
|
|
5716
5534
|
this.inputs = inputs;
|
|
@@ -5720,6 +5538,7 @@ var Template = class {
|
|
|
5720
5538
|
this.children = children;
|
|
5721
5539
|
this.references = references;
|
|
5722
5540
|
this.variables = variables;
|
|
5541
|
+
this.isSelfClosing = isSelfClosing;
|
|
5723
5542
|
this.sourceSpan = sourceSpan;
|
|
5724
5543
|
this.startSourceSpan = startSourceSpan;
|
|
5725
5544
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -5736,15 +5555,17 @@ var Content = class {
|
|
|
5736
5555
|
selector;
|
|
5737
5556
|
attributes;
|
|
5738
5557
|
children;
|
|
5558
|
+
isSelfClosing;
|
|
5739
5559
|
sourceSpan;
|
|
5740
5560
|
startSourceSpan;
|
|
5741
5561
|
endSourceSpan;
|
|
5742
5562
|
i18n;
|
|
5743
5563
|
name = "ng-content";
|
|
5744
|
-
constructor(selector, attributes, children, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5564
|
+
constructor(selector, attributes, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
5745
5565
|
this.selector = selector;
|
|
5746
5566
|
this.attributes = attributes;
|
|
5747
5567
|
this.children = children;
|
|
5568
|
+
this.isSelfClosing = isSelfClosing;
|
|
5748
5569
|
this.sourceSpan = sourceSpan;
|
|
5749
5570
|
this.startSourceSpan = startSourceSpan;
|
|
5750
5571
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -5932,7 +5753,7 @@ function visitAll$1(visitor, nodes) {
|
|
|
5932
5753
|
const result = [];
|
|
5933
5754
|
if (visitor.visit) {
|
|
5934
5755
|
for (const node of nodes) {
|
|
5935
|
-
visitor.visit(node)
|
|
5756
|
+
visitor.visit(node);
|
|
5936
5757
|
}
|
|
5937
5758
|
} else {
|
|
5938
5759
|
for (const node of nodes) {
|
|
@@ -7119,7 +6940,7 @@ var ParseErrorLevel;
|
|
|
7119
6940
|
ParseErrorLevel2[ParseErrorLevel2["WARNING"] = 0] = "WARNING";
|
|
7120
6941
|
ParseErrorLevel2[ParseErrorLevel2["ERROR"] = 1] = "ERROR";
|
|
7121
6942
|
})(ParseErrorLevel || (ParseErrorLevel = {}));
|
|
7122
|
-
var ParseError = class {
|
|
6943
|
+
var ParseError = class extends Error {
|
|
7123
6944
|
static {
|
|
7124
6945
|
__name(this, "ParseError");
|
|
7125
6946
|
}
|
|
@@ -7128,10 +6949,12 @@ var ParseError = class {
|
|
|
7128
6949
|
level;
|
|
7129
6950
|
relatedError;
|
|
7130
6951
|
constructor(span, msg, level = ParseErrorLevel.ERROR, relatedError) {
|
|
6952
|
+
super(msg);
|
|
7131
6953
|
this.span = span;
|
|
7132
6954
|
this.msg = msg;
|
|
7133
6955
|
this.level = level;
|
|
7134
6956
|
this.relatedError = relatedError;
|
|
6957
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
7135
6958
|
}
|
|
7136
6959
|
contextualMessage() {
|
|
7137
6960
|
const ctx = this.span.start.getContext(100, 3);
|
|
@@ -7633,7 +7456,11 @@ function tupleOfTypes(types) {
|
|
|
7633
7456
|
__name(tupleOfTypes, "tupleOfTypes");
|
|
7634
7457
|
function compilePipeFromMetadata(metadata) {
|
|
7635
7458
|
const definitionMapValues = [];
|
|
7636
|
-
definitionMapValues.push({
|
|
7459
|
+
definitionMapValues.push({
|
|
7460
|
+
key: "name",
|
|
7461
|
+
value: literal(metadata.pipeName ?? metadata.name),
|
|
7462
|
+
quoted: false
|
|
7463
|
+
});
|
|
7637
7464
|
definitionMapValues.push({ key: "type", value: metadata.type.value, quoted: false });
|
|
7638
7465
|
definitionMapValues.push({ key: "pure", value: literal(metadata.pure), quoted: false });
|
|
7639
7466
|
if (metadata.isStandalone === false) {
|
|
@@ -8600,7 +8427,7 @@ var BindingKind;
|
|
|
8600
8427
|
BindingKind2[BindingKind2["Property"] = 3] = "Property";
|
|
8601
8428
|
BindingKind2[BindingKind2["Template"] = 4] = "Template";
|
|
8602
8429
|
BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
|
|
8603
|
-
BindingKind2[BindingKind2["
|
|
8430
|
+
BindingKind2[BindingKind2["LegacyAnimation"] = 6] = "LegacyAnimation";
|
|
8604
8431
|
BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
|
|
8605
8432
|
})(BindingKind || (BindingKind = {}));
|
|
8606
8433
|
var I18nParamResolutionTime;
|
|
@@ -8751,13 +8578,13 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
8751
8578
|
};
|
|
8752
8579
|
}
|
|
8753
8580
|
__name(createBindingOp, "createBindingOp");
|
|
8754
|
-
function createPropertyOp(target, name, expression,
|
|
8581
|
+
function createPropertyOp(target, name, expression, isLegacyAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
8755
8582
|
return {
|
|
8756
8583
|
kind: OpKind.Property,
|
|
8757
8584
|
target,
|
|
8758
8585
|
name,
|
|
8759
8586
|
expression,
|
|
8760
|
-
|
|
8587
|
+
isLegacyAnimationTrigger,
|
|
8761
8588
|
securityContext,
|
|
8762
8589
|
sanitizer: null,
|
|
8763
8590
|
isStructuralTemplateAttribute,
|
|
@@ -9922,13 +9749,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
9922
9749
|
} else if (expr instanceof ReadKeyExpr) {
|
|
9923
9750
|
expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
|
|
9924
9751
|
expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
|
|
9925
|
-
} else if (expr instanceof WritePropExpr) {
|
|
9926
|
-
expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
|
|
9927
|
-
expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
|
|
9928
|
-
} else if (expr instanceof WriteKeyExpr) {
|
|
9929
|
-
expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
|
|
9930
|
-
expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
|
|
9931
|
-
expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
|
|
9932
9752
|
} else if (expr instanceof InvokeFunctionExpr) {
|
|
9933
9753
|
expr.fn = transformExpressionsInExpression(expr.fn, transform2, flags);
|
|
9934
9754
|
for (let i = 0; i < expr.args.length; i++) {
|
|
@@ -9952,8 +9772,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
9952
9772
|
expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
|
|
9953
9773
|
} else if (expr instanceof VoidExpr) {
|
|
9954
9774
|
expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
|
|
9955
|
-
} else if (expr instanceof WriteVarExpr) {
|
|
9956
|
-
expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
|
|
9957
9775
|
} else if (expr instanceof LocalizedString) {
|
|
9958
9776
|
for (let i = 0; i < expr.expressions.length; i++) {
|
|
9959
9777
|
expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform2, flags);
|
|
@@ -10147,7 +9965,7 @@ var OpList = class _OpList {
|
|
|
10147
9965
|
oldOp.next = null;
|
|
10148
9966
|
let prev = oldPrev;
|
|
10149
9967
|
for (const newOp of newOps) {
|
|
10150
|
-
|
|
9968
|
+
_OpList.assertIsUnowned(newOp);
|
|
10151
9969
|
newOp.debugListId = listId;
|
|
10152
9970
|
prev.next = newOp;
|
|
10153
9971
|
newOp.prev = prev;
|
|
@@ -10183,7 +10001,7 @@ var OpList = class _OpList {
|
|
|
10183
10001
|
static insertBefore(op, target) {
|
|
10184
10002
|
if (Array.isArray(op)) {
|
|
10185
10003
|
for (const o of op) {
|
|
10186
|
-
|
|
10004
|
+
_OpList.insertBefore(o, target);
|
|
10187
10005
|
}
|
|
10188
10006
|
return;
|
|
10189
10007
|
}
|
|
@@ -10418,7 +10236,7 @@ function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
|
|
|
10418
10236
|
};
|
|
10419
10237
|
}
|
|
10420
10238
|
__name(createTextOp, "createTextOp");
|
|
10421
|
-
function createListenerOp(target, targetSlot, name, tag, handlerOps,
|
|
10239
|
+
function createListenerOp(target, targetSlot, name, tag, handlerOps, legacyAnimationPhase, eventTarget, hostListener, sourceSpan) {
|
|
10422
10240
|
const handlerList = new OpList();
|
|
10423
10241
|
handlerList.push(handlerOps);
|
|
10424
10242
|
return {
|
|
@@ -10431,8 +10249,8 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPh
|
|
|
10431
10249
|
handlerOps: handlerList,
|
|
10432
10250
|
handlerFnName: null,
|
|
10433
10251
|
consumesDollarEvent: false,
|
|
10434
|
-
|
|
10435
|
-
|
|
10252
|
+
isLegacyAnimationListener: legacyAnimationPhase !== null,
|
|
10253
|
+
legacyAnimationPhase,
|
|
10436
10254
|
eventTarget,
|
|
10437
10255
|
sourceSpan,
|
|
10438
10256
|
...NEW_OP
|
|
@@ -10677,12 +10495,12 @@ function createSourceLocationOp(templatePath, locations) {
|
|
|
10677
10495
|
};
|
|
10678
10496
|
}
|
|
10679
10497
|
__name(createSourceLocationOp, "createSourceLocationOp");
|
|
10680
|
-
function createDomPropertyOp(name, expression,
|
|
10498
|
+
function createDomPropertyOp(name, expression, isLegacyAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
10681
10499
|
return {
|
|
10682
10500
|
kind: OpKind.DomProperty,
|
|
10683
10501
|
name,
|
|
10684
10502
|
expression,
|
|
10685
|
-
|
|
10503
|
+
isLegacyAnimationTrigger,
|
|
10686
10504
|
i18nContext,
|
|
10687
10505
|
securityContext,
|
|
10688
10506
|
sanitizer: null,
|
|
@@ -10699,6 +10517,11 @@ var CompilationJobKind;
|
|
|
10699
10517
|
CompilationJobKind2[CompilationJobKind2["Host"] = 1] = "Host";
|
|
10700
10518
|
CompilationJobKind2[CompilationJobKind2["Both"] = 2] = "Both";
|
|
10701
10519
|
})(CompilationJobKind || (CompilationJobKind = {}));
|
|
10520
|
+
var TemplateCompilationMode;
|
|
10521
|
+
(function(TemplateCompilationMode2) {
|
|
10522
|
+
TemplateCompilationMode2[TemplateCompilationMode2["Full"] = 0] = "Full";
|
|
10523
|
+
TemplateCompilationMode2[TemplateCompilationMode2["DomOnly"] = 1] = "DomOnly";
|
|
10524
|
+
})(TemplateCompilationMode || (TemplateCompilationMode = {}));
|
|
10702
10525
|
var CompilationJob = class {
|
|
10703
10526
|
static {
|
|
10704
10527
|
__name(this, "CompilationJob");
|
|
@@ -10706,10 +10529,12 @@ var CompilationJob = class {
|
|
|
10706
10529
|
componentName;
|
|
10707
10530
|
pool;
|
|
10708
10531
|
compatibility;
|
|
10709
|
-
|
|
10532
|
+
mode;
|
|
10533
|
+
constructor(componentName, pool, compatibility, mode) {
|
|
10710
10534
|
this.componentName = componentName;
|
|
10711
10535
|
this.pool = pool;
|
|
10712
10536
|
this.compatibility = compatibility;
|
|
10537
|
+
this.mode = mode;
|
|
10713
10538
|
}
|
|
10714
10539
|
kind = CompilationJobKind.Both;
|
|
10715
10540
|
/**
|
|
@@ -10733,8 +10558,8 @@ var ComponentCompilationJob = class extends CompilationJob {
|
|
|
10733
10558
|
allDeferrableDepsFn;
|
|
10734
10559
|
relativeTemplatePath;
|
|
10735
10560
|
enableDebugLocations;
|
|
10736
|
-
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
|
|
10737
|
-
super(componentName, pool, compatibility);
|
|
10561
|
+
constructor(componentName, pool, compatibility, mode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
|
|
10562
|
+
super(componentName, pool, compatibility, mode);
|
|
10738
10563
|
this.relativeContextFilePath = relativeContextFilePath;
|
|
10739
10564
|
this.i18nUseExternalIds = i18nUseExternalIds;
|
|
10740
10565
|
this.deferMeta = deferMeta;
|
|
@@ -10877,8 +10702,8 @@ var HostBindingCompilationJob = class extends CompilationJob {
|
|
|
10877
10702
|
static {
|
|
10878
10703
|
__name(this, "HostBindingCompilationJob");
|
|
10879
10704
|
}
|
|
10880
|
-
constructor(componentName, pool, compatibility) {
|
|
10881
|
-
super(componentName, pool, compatibility);
|
|
10705
|
+
constructor(componentName, pool, compatibility, mode) {
|
|
10706
|
+
super(componentName, pool, compatibility, mode);
|
|
10882
10707
|
this.root = new HostBindingCompilationUnit(this);
|
|
10883
10708
|
}
|
|
10884
10709
|
kind = CompilationJobKind.Host;
|
|
@@ -11065,7 +10890,7 @@ function extractAttributes(job) {
|
|
|
11065
10890
|
extractAttributeOp(unit, op, elements);
|
|
11066
10891
|
break;
|
|
11067
10892
|
case OpKind.Property:
|
|
11068
|
-
if (!op.
|
|
10893
|
+
if (!op.isLegacyAnimationTrigger) {
|
|
11069
10894
|
let bindingKind;
|
|
11070
10895
|
if (op.i18nMessage !== null && op.templateKind === null) {
|
|
11071
10896
|
bindingKind = BindingKind.I18n;
|
|
@@ -11127,7 +10952,7 @@ function extractAttributes(job) {
|
|
|
11127
10952
|
}
|
|
11128
10953
|
break;
|
|
11129
10954
|
case OpKind.Listener:
|
|
11130
|
-
if (!op.
|
|
10955
|
+
if (!op.isLegacyAnimationListener) {
|
|
11131
10956
|
const extractedAttributeOp = createExtractedAttributeOp(
|
|
11132
10957
|
op.target,
|
|
11133
10958
|
BindingKind.Property,
|
|
@@ -11237,11 +11062,11 @@ function specializeBindings(job) {
|
|
|
11237
11062
|
}
|
|
11238
11063
|
break;
|
|
11239
11064
|
case BindingKind.Property:
|
|
11240
|
-
case BindingKind.
|
|
11065
|
+
case BindingKind.LegacyAnimation:
|
|
11241
11066
|
if (job.kind === CompilationJobKind.Host) {
|
|
11242
|
-
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.
|
|
11067
|
+
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.LegacyAnimation, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
11243
11068
|
} else {
|
|
11244
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.
|
|
11069
|
+
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.LegacyAnimation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
11245
11070
|
}
|
|
11246
11071
|
break;
|
|
11247
11072
|
case BindingKind.TwoWayProperty:
|
|
@@ -11281,7 +11106,15 @@ var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
|
|
|
11281
11106
|
[Identifiers.twoWayListener, Identifiers.twoWayListener],
|
|
11282
11107
|
[Identifiers.declareLet, Identifiers.declareLet],
|
|
11283
11108
|
[Identifiers.conditionalCreate, Identifiers.conditionalBranchCreate],
|
|
11284
|
-
[Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate]
|
|
11109
|
+
[Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate],
|
|
11110
|
+
[Identifiers.domElement, Identifiers.domElement],
|
|
11111
|
+
[Identifiers.domElementStart, Identifiers.domElementStart],
|
|
11112
|
+
[Identifiers.domElementEnd, Identifiers.domElementEnd],
|
|
11113
|
+
[Identifiers.domElementContainer, Identifiers.domElementContainer],
|
|
11114
|
+
[Identifiers.domElementContainerStart, Identifiers.domElementContainerStart],
|
|
11115
|
+
[Identifiers.domElementContainerEnd, Identifiers.domElementContainerEnd],
|
|
11116
|
+
[Identifiers.domListener, Identifiers.domListener],
|
|
11117
|
+
[Identifiers.domTemplate, Identifiers.domTemplate]
|
|
11285
11118
|
]);
|
|
11286
11119
|
var MAX_CHAIN_LENGTH = 256;
|
|
11287
11120
|
function chain(job) {
|
|
@@ -11378,6 +11211,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
11378
11211
|
["|", BinaryOperator.BitwiseOr],
|
|
11379
11212
|
["&", BinaryOperator.BitwiseAnd],
|
|
11380
11213
|
["/", BinaryOperator.Divide],
|
|
11214
|
+
["=", BinaryOperator.Assign],
|
|
11381
11215
|
["==", BinaryOperator.Equals],
|
|
11382
11216
|
["===", BinaryOperator.Identical],
|
|
11383
11217
|
["<", BinaryOperator.Lower],
|
|
@@ -11391,7 +11225,16 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
11391
11225
|
["??", BinaryOperator.NullishCoalesce],
|
|
11392
11226
|
["||", BinaryOperator.Or],
|
|
11393
11227
|
["+", BinaryOperator.Plus],
|
|
11394
|
-
["in", BinaryOperator.In]
|
|
11228
|
+
["in", BinaryOperator.In],
|
|
11229
|
+
["+=", BinaryOperator.AdditionAssignment],
|
|
11230
|
+
["-=", BinaryOperator.SubtractionAssignment],
|
|
11231
|
+
["*=", BinaryOperator.MultiplicationAssignment],
|
|
11232
|
+
["/=", BinaryOperator.DivisionAssignment],
|
|
11233
|
+
["%=", BinaryOperator.RemainderAssignment],
|
|
11234
|
+
["**=", BinaryOperator.ExponentiationAssignment],
|
|
11235
|
+
["&&=", BinaryOperator.AndAssignment],
|
|
11236
|
+
["||=", BinaryOperator.OrAssignment],
|
|
11237
|
+
["??=", BinaryOperator.NullishCoalesceAssignment]
|
|
11395
11238
|
]);
|
|
11396
11239
|
function namespaceForKey(namespacePrefixKey) {
|
|
11397
11240
|
const NAMESPACES = /* @__PURE__ */ new Map([
|
|
@@ -12607,16 +12450,20 @@ var Element2 = class extends NodeWithI18n {
|
|
|
12607
12450
|
attrs;
|
|
12608
12451
|
directives;
|
|
12609
12452
|
children;
|
|
12453
|
+
isSelfClosing;
|
|
12610
12454
|
startSourceSpan;
|
|
12611
12455
|
endSourceSpan;
|
|
12612
|
-
|
|
12456
|
+
isVoid;
|
|
12457
|
+
constructor(name, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, isVoid, i18n2) {
|
|
12613
12458
|
super(sourceSpan, i18n2);
|
|
12614
12459
|
this.name = name;
|
|
12615
12460
|
this.attrs = attrs;
|
|
12616
12461
|
this.directives = directives;
|
|
12617
12462
|
this.children = children;
|
|
12463
|
+
this.isSelfClosing = isSelfClosing;
|
|
12618
12464
|
this.startSourceSpan = startSourceSpan;
|
|
12619
12465
|
this.endSourceSpan = endSourceSpan;
|
|
12466
|
+
this.isVoid = isVoid;
|
|
12620
12467
|
}
|
|
12621
12468
|
visit(visitor, context) {
|
|
12622
12469
|
return visitor.visitElement(this, context);
|
|
@@ -12669,9 +12516,10 @@ var Component2 = class extends NodeWithI18n {
|
|
|
12669
12516
|
attrs;
|
|
12670
12517
|
directives;
|
|
12671
12518
|
children;
|
|
12519
|
+
isSelfClosing;
|
|
12672
12520
|
startSourceSpan;
|
|
12673
12521
|
endSourceSpan;
|
|
12674
|
-
constructor(componentName, tagName, fullName, attrs, directives, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
|
|
12522
|
+
constructor(componentName, tagName, fullName, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
|
|
12675
12523
|
super(sourceSpan, i18n2);
|
|
12676
12524
|
this.componentName = componentName;
|
|
12677
12525
|
this.tagName = tagName;
|
|
@@ -12679,6 +12527,7 @@ var Component2 = class extends NodeWithI18n {
|
|
|
12679
12527
|
this.attrs = attrs;
|
|
12680
12528
|
this.directives = directives;
|
|
12681
12529
|
this.children = children;
|
|
12530
|
+
this.isSelfClosing = isSelfClosing;
|
|
12682
12531
|
this.startSourceSpan = startSourceSpan;
|
|
12683
12532
|
this.endSourceSpan = endSourceSpan;
|
|
12684
12533
|
}
|
|
@@ -14940,16 +14789,6 @@ var NAMED_ENTITIES = {
|
|
|
14940
14789
|
};
|
|
14941
14790
|
var NGSP_UNICODE = "\uE500";
|
|
14942
14791
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14943
|
-
var TokenError = class extends ParseError {
|
|
14944
|
-
static {
|
|
14945
|
-
__name(this, "TokenError");
|
|
14946
|
-
}
|
|
14947
|
-
tokenType;
|
|
14948
|
-
constructor(errorMsg, tokenType, span) {
|
|
14949
|
-
super(span, errorMsg);
|
|
14950
|
-
this.tokenType = tokenType;
|
|
14951
|
-
}
|
|
14952
|
-
};
|
|
14953
14792
|
var TokenizeResult = class {
|
|
14954
14793
|
static {
|
|
14955
14794
|
__name(this, "TokenizeResult");
|
|
@@ -14988,15 +14827,20 @@ var CharacterReferenceType;
|
|
|
14988
14827
|
CharacterReferenceType2["HEX"] = "hexadecimal";
|
|
14989
14828
|
CharacterReferenceType2["DEC"] = "decimal";
|
|
14990
14829
|
})(CharacterReferenceType || (CharacterReferenceType = {}));
|
|
14991
|
-
var
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
14830
|
+
var SUPPORTED_BLOCKS = [
|
|
14831
|
+
"@if",
|
|
14832
|
+
"@else",
|
|
14833
|
+
// Covers `@else if` as well
|
|
14834
|
+
"@for",
|
|
14835
|
+
"@switch",
|
|
14836
|
+
"@case",
|
|
14837
|
+
"@default",
|
|
14838
|
+
"@empty",
|
|
14839
|
+
"@defer",
|
|
14840
|
+
"@placeholder",
|
|
14841
|
+
"@loading",
|
|
14842
|
+
"@error"
|
|
14843
|
+
];
|
|
15000
14844
|
var _Tokenizer = class {
|
|
15001
14845
|
static {
|
|
15002
14846
|
__name(this, "_Tokenizer");
|
|
@@ -15073,9 +14917,9 @@ var _Tokenizer = class {
|
|
|
15073
14917
|
}
|
|
15074
14918
|
} else if (this._tokenizeLet && // Use `peek` instead of `attempCharCode` since we
|
|
15075
14919
|
// don't want to advance in case it's not `@let`.
|
|
15076
|
-
this._cursor.peek() === $AT && !this._inInterpolation && this.
|
|
14920
|
+
this._cursor.peek() === $AT && !this._inInterpolation && this._isLetStart()) {
|
|
15077
14921
|
this._consumeLetDeclaration(start);
|
|
15078
|
-
} else if (this._tokenizeBlocks && this.
|
|
14922
|
+
} else if (this._tokenizeBlocks && this._isBlockStart()) {
|
|
15079
14923
|
this._consumeBlockStart(start);
|
|
15080
14924
|
} else if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode($RBRACE)) {
|
|
15081
14925
|
this._consumeBlockEnd(start);
|
|
@@ -15108,6 +14952,7 @@ var _Tokenizer = class {
|
|
|
15108
14952
|
return this._cursor.getChars(nameCursor).trim();
|
|
15109
14953
|
}
|
|
15110
14954
|
_consumeBlockStart(start) {
|
|
14955
|
+
this._requireCharCode($AT);
|
|
15111
14956
|
this._beginToken(24, start);
|
|
15112
14957
|
const startToken = this._endToken([this._getBlockName()]);
|
|
15113
14958
|
if (this._cursor.peek() === $LPAREN) {
|
|
@@ -15169,6 +15014,7 @@ var _Tokenizer = class {
|
|
|
15169
15014
|
}
|
|
15170
15015
|
}
|
|
15171
15016
|
_consumeLetDeclaration(start) {
|
|
15017
|
+
this._requireStr("@let");
|
|
15172
15018
|
this._beginToken(29, start);
|
|
15173
15019
|
if (isWhitespace(this._cursor.peek())) {
|
|
15174
15020
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
@@ -15264,10 +15110,10 @@ var _Tokenizer = class {
|
|
|
15264
15110
|
}
|
|
15265
15111
|
_endToken(parts, end) {
|
|
15266
15112
|
if (this._currentTokenStart === null) {
|
|
15267
|
-
throw new
|
|
15113
|
+
throw new ParseError(this._cursor.getSpan(end), "Programming error - attempted to end a token when there was no start to the token");
|
|
15268
15114
|
}
|
|
15269
15115
|
if (this._currentTokenType === null) {
|
|
15270
|
-
throw new
|
|
15116
|
+
throw new ParseError(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
|
|
15271
15117
|
}
|
|
15272
15118
|
const token = {
|
|
15273
15119
|
type: this._currentTokenType,
|
|
@@ -15283,17 +15129,17 @@ var _Tokenizer = class {
|
|
|
15283
15129
|
if (this._isInExpansionForm()) {
|
|
15284
15130
|
msg += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`;
|
|
15285
15131
|
}
|
|
15286
|
-
const error = new
|
|
15132
|
+
const error = new ParseError(span, msg);
|
|
15287
15133
|
this._currentTokenStart = null;
|
|
15288
15134
|
this._currentTokenType = null;
|
|
15289
|
-
return
|
|
15135
|
+
return error;
|
|
15290
15136
|
}
|
|
15291
15137
|
handleError(e) {
|
|
15292
15138
|
if (e instanceof CursorError) {
|
|
15293
15139
|
e = this._createError(e.msg, this._cursor.getSpan(e.cursor));
|
|
15294
15140
|
}
|
|
15295
|
-
if (e instanceof
|
|
15296
|
-
this.errors.push(e
|
|
15141
|
+
if (e instanceof ParseError) {
|
|
15142
|
+
this.errors.push(e);
|
|
15297
15143
|
} else {
|
|
15298
15144
|
throw e;
|
|
15299
15145
|
}
|
|
@@ -15368,6 +15214,26 @@ var _Tokenizer = class {
|
|
|
15368
15214
|
this._cursor.advance();
|
|
15369
15215
|
return char;
|
|
15370
15216
|
}
|
|
15217
|
+
_peekStr(chars) {
|
|
15218
|
+
const len = chars.length;
|
|
15219
|
+
if (this._cursor.charsLeft() < len) {
|
|
15220
|
+
return false;
|
|
15221
|
+
}
|
|
15222
|
+
const cursor = this._cursor.clone();
|
|
15223
|
+
for (let i = 0; i < len; i++) {
|
|
15224
|
+
if (cursor.peek() !== chars.charCodeAt(i)) {
|
|
15225
|
+
return false;
|
|
15226
|
+
}
|
|
15227
|
+
cursor.advance();
|
|
15228
|
+
}
|
|
15229
|
+
return true;
|
|
15230
|
+
}
|
|
15231
|
+
_isBlockStart() {
|
|
15232
|
+
return this._cursor.peek() === $AT && SUPPORTED_BLOCKS.some((blockName) => this._peekStr(blockName));
|
|
15233
|
+
}
|
|
15234
|
+
_isLetStart() {
|
|
15235
|
+
return this._cursor.peek() === $AT && this._peekStr("@let");
|
|
15236
|
+
}
|
|
15371
15237
|
_consumeEntity(textTokenType) {
|
|
15372
15238
|
this._beginToken(
|
|
15373
15239
|
9
|
|
@@ -15533,7 +15399,7 @@ var _Tokenizer = class {
|
|
|
15533
15399
|
this._consumeTagOpenEnd();
|
|
15534
15400
|
}
|
|
15535
15401
|
} catch (e) {
|
|
15536
|
-
if (e instanceof
|
|
15402
|
+
if (e instanceof ParseError) {
|
|
15537
15403
|
if (openToken) {
|
|
15538
15404
|
openToken.type = openToken.type === 33 ? 37 : 4;
|
|
15539
15405
|
} else {
|
|
@@ -15901,7 +15767,7 @@ var _Tokenizer = class {
|
|
|
15901
15767
|
return true;
|
|
15902
15768
|
}
|
|
15903
15769
|
}
|
|
15904
|
-
if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this.
|
|
15770
|
+
if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._isBlockStart() || this._isLetStart() || this._cursor.peek() === $RBRACE)) {
|
|
15905
15771
|
return true;
|
|
15906
15772
|
}
|
|
15907
15773
|
return false;
|
|
@@ -16224,15 +16090,17 @@ var EscapedCharacterCursor = class _EscapedCharacterCursor extends PlainCharacte
|
|
|
16224
16090
|
}
|
|
16225
16091
|
}
|
|
16226
16092
|
};
|
|
16227
|
-
var CursorError = class {
|
|
16093
|
+
var CursorError = class extends Error {
|
|
16228
16094
|
static {
|
|
16229
16095
|
__name(this, "CursorError");
|
|
16230
16096
|
}
|
|
16231
16097
|
msg;
|
|
16232
16098
|
cursor;
|
|
16233
16099
|
constructor(msg, cursor) {
|
|
16100
|
+
super(msg);
|
|
16234
16101
|
this.msg = msg;
|
|
16235
16102
|
this.cursor = cursor;
|
|
16103
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
16236
16104
|
}
|
|
16237
16105
|
};
|
|
16238
16106
|
var TreeError = class _TreeError extends ParseError {
|
|
@@ -16271,7 +16139,7 @@ var Parser$1 = class Parser {
|
|
|
16271
16139
|
const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);
|
|
16272
16140
|
const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);
|
|
16273
16141
|
parser.build();
|
|
16274
|
-
return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors
|
|
16142
|
+
return new ParseTreeResult(parser.rootNodes, [...tokenizeResult.errors, ...parser.errors]);
|
|
16275
16143
|
}
|
|
16276
16144
|
};
|
|
16277
16145
|
var _TreeBuilder = class __TreeBuilder {
|
|
@@ -16492,11 +16360,11 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16492
16360
|
const directives = [];
|
|
16493
16361
|
this._consumeAttributesAndDirectives(attrs, directives);
|
|
16494
16362
|
const fullName = this._getElementFullName(startTagToken, this._getClosestElementLikeParent());
|
|
16363
|
+
const tagDef = this._getTagDefinition(fullName);
|
|
16495
16364
|
let selfClosing = false;
|
|
16496
16365
|
if (this._peek.type === 2) {
|
|
16497
16366
|
this._advance();
|
|
16498
16367
|
selfClosing = true;
|
|
16499
|
-
const tagDef = this._getTagDefinition(fullName);
|
|
16500
16368
|
if (!(tagDef?.canSelfClose || getNsPrefix(fullName) !== null || tagDef?.isVoid)) {
|
|
16501
16369
|
this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed "${startTagToken.parts[1]}"`));
|
|
16502
16370
|
}
|
|
@@ -16507,7 +16375,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16507
16375
|
const end = this._peek.sourceSpan.fullStart;
|
|
16508
16376
|
const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
16509
16377
|
const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
16510
|
-
const el = new Element2(fullName, attrs, directives, [], span, startSpan, void 0);
|
|
16378
|
+
const el = new Element2(fullName, attrs, directives, [], selfClosing, span, startSpan, void 0, tagDef?.isVoid ?? false);
|
|
16511
16379
|
const parent = this._getContainer();
|
|
16512
16380
|
const isClosedByChild = parent !== null && !!this._getTagDefinition(parent)?.isClosedByChild(el.name);
|
|
16513
16381
|
this._pushContainer(el, isClosedByChild);
|
|
@@ -16531,7 +16399,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16531
16399
|
const end = this._peek.sourceSpan.fullStart;
|
|
16532
16400
|
const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
|
|
16533
16401
|
const startSpan = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
|
|
16534
|
-
const node = new Component2(componentName, tagName, fullName, attrs, directives, [], span, startSpan, void 0);
|
|
16402
|
+
const node = new Component2(componentName, tagName, fullName, attrs, directives, [], selfClosing, span, startSpan, void 0);
|
|
16535
16403
|
const parent = this._getContainer();
|
|
16536
16404
|
const isClosedByChild = parent !== null && node.tagName !== null && !!this._getTagDefinition(parent)?.isClosedByChild(node.tagName);
|
|
16537
16405
|
this._pushContainer(node, isClosedByChild);
|
|
@@ -16857,11 +16725,11 @@ var WhitespaceVisitor = class {
|
|
|
16857
16725
|
}
|
|
16858
16726
|
visitElement(element2, context) {
|
|
16859
16727
|
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
16860
|
-
const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
16728
|
+
const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
16861
16729
|
this.originalNodeMap?.set(newElement2, element2);
|
|
16862
16730
|
return newElement2;
|
|
16863
16731
|
}
|
|
16864
|
-
const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
16732
|
+
const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
16865
16733
|
this.originalNodeMap?.set(newElement, element2);
|
|
16866
16734
|
return newElement;
|
|
16867
16735
|
}
|
|
@@ -16922,11 +16790,11 @@ var WhitespaceVisitor = class {
|
|
|
16922
16790
|
}
|
|
16923
16791
|
visitComponent(node, context) {
|
|
16924
16792
|
if (node.tagName && SKIP_WS_TRIM_TAGS.has(node.tagName) || hasPreserveWhitespacesAttr(node.attrs)) {
|
|
16925
|
-
const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16793
|
+
const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16926
16794
|
this.originalNodeMap?.set(newElement2, node);
|
|
16927
16795
|
return newElement2;
|
|
16928
16796
|
}
|
|
16929
|
-
const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16797
|
+
const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16930
16798
|
this.originalNodeMap?.set(newElement, node);
|
|
16931
16799
|
return newElement;
|
|
16932
16800
|
}
|
|
@@ -17247,13 +17115,17 @@ var _Scanner = class {
|
|
|
17247
17115
|
case $HASH:
|
|
17248
17116
|
return this.scanPrivateIdentifier();
|
|
17249
17117
|
case $PLUS:
|
|
17118
|
+
return this.scanComplexOperator(start, "+", $EQ, "=");
|
|
17250
17119
|
case $MINUS:
|
|
17120
|
+
return this.scanComplexOperator(start, "-", $EQ, "=");
|
|
17251
17121
|
case $SLASH:
|
|
17122
|
+
return this.scanComplexOperator(start, "/", $EQ, "=");
|
|
17252
17123
|
case $PERCENT:
|
|
17124
|
+
return this.scanComplexOperator(start, "%", $EQ, "=");
|
|
17253
17125
|
case $CARET:
|
|
17254
|
-
return this.scanOperator(start,
|
|
17126
|
+
return this.scanOperator(start, "^");
|
|
17255
17127
|
case $STAR:
|
|
17256
|
-
return this.
|
|
17128
|
+
return this.scanStar(start);
|
|
17257
17129
|
case $QUESTION:
|
|
17258
17130
|
return this.scanQuestion(start);
|
|
17259
17131
|
case $LT:
|
|
@@ -17263,9 +17135,9 @@ var _Scanner = class {
|
|
|
17263
17135
|
case $EQ:
|
|
17264
17136
|
return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, "=", $EQ, "=");
|
|
17265
17137
|
case $AMPERSAND:
|
|
17266
|
-
return this.scanComplexOperator(start, "&", $AMPERSAND, "&");
|
|
17138
|
+
return this.scanComplexOperator(start, "&", $AMPERSAND, "&", $EQ, "=");
|
|
17267
17139
|
case $BAR:
|
|
17268
|
-
return this.scanComplexOperator(start, "|", $BAR, "|");
|
|
17140
|
+
return this.scanComplexOperator(start, "|", $BAR, "|", $EQ, "=");
|
|
17269
17141
|
case $NBSP:
|
|
17270
17142
|
while (isWhitespace(this.peek))
|
|
17271
17143
|
this.advance();
|
|
@@ -17398,12 +17270,19 @@ var _Scanner = class {
|
|
|
17398
17270
|
}
|
|
17399
17271
|
scanQuestion(start) {
|
|
17400
17272
|
this.advance();
|
|
17401
|
-
let
|
|
17402
|
-
if (this.peek === $QUESTION
|
|
17403
|
-
|
|
17273
|
+
let operator = "?";
|
|
17274
|
+
if (this.peek === $QUESTION) {
|
|
17275
|
+
operator += "?";
|
|
17276
|
+
this.advance();
|
|
17277
|
+
if (this.peek === $EQ) {
|
|
17278
|
+
operator += "=";
|
|
17279
|
+
this.advance();
|
|
17280
|
+
}
|
|
17281
|
+
} else if (this.peek === $PERIOD) {
|
|
17282
|
+
operator += ".";
|
|
17404
17283
|
this.advance();
|
|
17405
17284
|
}
|
|
17406
|
-
return newOperatorToken(start, this.index,
|
|
17285
|
+
return newOperatorToken(start, this.index, operator);
|
|
17407
17286
|
}
|
|
17408
17287
|
scanTemplateLiteralPart(start) {
|
|
17409
17288
|
let buffer = "";
|
|
@@ -17460,6 +17339,22 @@ var _Scanner = class {
|
|
|
17460
17339
|
buffer += String.fromCharCode(unescapedCode);
|
|
17461
17340
|
return buffer;
|
|
17462
17341
|
}
|
|
17342
|
+
scanStar(start) {
|
|
17343
|
+
this.advance();
|
|
17344
|
+
let operator = "*";
|
|
17345
|
+
if (this.peek === $STAR) {
|
|
17346
|
+
operator += "*";
|
|
17347
|
+
this.advance();
|
|
17348
|
+
if (this.peek === $EQ) {
|
|
17349
|
+
operator += "=";
|
|
17350
|
+
this.advance();
|
|
17351
|
+
}
|
|
17352
|
+
} else if (this.peek === $EQ) {
|
|
17353
|
+
operator += "=";
|
|
17354
|
+
this.advance();
|
|
17355
|
+
}
|
|
17356
|
+
return newOperatorToken(start, this.index, operator);
|
|
17357
|
+
}
|
|
17463
17358
|
};
|
|
17464
17359
|
function isIdentifierStart(code) {
|
|
17465
17360
|
return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;
|
|
@@ -17528,25 +17423,32 @@ var TemplateBindingParseResult = class {
|
|
|
17528
17423
|
this.errors = errors;
|
|
17529
17424
|
}
|
|
17530
17425
|
};
|
|
17426
|
+
function getLocation(span) {
|
|
17427
|
+
return span.start.toString() || "(unknown)";
|
|
17428
|
+
}
|
|
17429
|
+
__name(getLocation, "getLocation");
|
|
17531
17430
|
var Parser2 = class {
|
|
17532
17431
|
static {
|
|
17533
17432
|
__name(this, "Parser");
|
|
17534
17433
|
}
|
|
17535
17434
|
_lexer;
|
|
17536
|
-
|
|
17537
|
-
constructor(_lexer) {
|
|
17435
|
+
_supportsDirectPipeReferences;
|
|
17436
|
+
constructor(_lexer, _supportsDirectPipeReferences = false) {
|
|
17538
17437
|
this._lexer = _lexer;
|
|
17438
|
+
this._supportsDirectPipeReferences = _supportsDirectPipeReferences;
|
|
17539
17439
|
}
|
|
17540
|
-
parseAction(input,
|
|
17541
|
-
|
|
17440
|
+
parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17441
|
+
const errors = [];
|
|
17442
|
+
this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
|
|
17542
17443
|
const sourceToLex = this._stripComments(input);
|
|
17543
17444
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17544
|
-
const ast = new _ParseAST(input,
|
|
17545
|
-
return new ASTWithSource(ast, input,
|
|
17445
|
+
const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1, errors, 0, this._supportsDirectPipeReferences).parseChain();
|
|
17446
|
+
return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17546
17447
|
}
|
|
17547
|
-
parseBinding(input,
|
|
17548
|
-
const
|
|
17549
|
-
|
|
17448
|
+
parseBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17449
|
+
const errors = [];
|
|
17450
|
+
const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
|
|
17451
|
+
return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17550
17452
|
}
|
|
17551
17453
|
checkSimpleExpression(ast) {
|
|
17552
17454
|
const checker = new SimpleExpressionChecker();
|
|
@@ -17554,22 +17456,20 @@ var Parser2 = class {
|
|
|
17554
17456
|
return checker.errors;
|
|
17555
17457
|
}
|
|
17556
17458
|
// Host bindings parsed here
|
|
17557
|
-
parseSimpleBinding(input,
|
|
17558
|
-
const
|
|
17559
|
-
const
|
|
17560
|
-
|
|
17561
|
-
|
|
17459
|
+
parseSimpleBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17460
|
+
const errors = [];
|
|
17461
|
+
const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
|
|
17462
|
+
const simplExpressionErrors = this.checkSimpleExpression(ast);
|
|
17463
|
+
if (simplExpressionErrors.length > 0) {
|
|
17464
|
+
errors.push(getParseError(`Host binding expression cannot contain ${simplExpressionErrors.join(" ")}`, input, "", parseSourceSpan));
|
|
17562
17465
|
}
|
|
17563
|
-
return new ASTWithSource(ast, input,
|
|
17564
|
-
}
|
|
17565
|
-
_reportError(message, input, errLocation, ctxLocation) {
|
|
17566
|
-
this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
|
|
17466
|
+
return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17567
17467
|
}
|
|
17568
|
-
_parseBindingAst(input,
|
|
17569
|
-
this._checkNoInterpolation(input,
|
|
17468
|
+
_parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
|
|
17469
|
+
this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
|
|
17570
17470
|
const sourceToLex = this._stripComments(input);
|
|
17571
17471
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17572
|
-
return new _ParseAST(input,
|
|
17472
|
+
return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
|
|
17573
17473
|
}
|
|
17574
17474
|
/**
|
|
17575
17475
|
* Parse microsyntax template expression and return a list of bindings or
|
|
@@ -17597,53 +17497,48 @@ var Parser2 = class {
|
|
|
17597
17497
|
* @param absoluteKeyOffset start of the `templateKey`
|
|
17598
17498
|
* @param absoluteValueOffset start of the `templateValue`
|
|
17599
17499
|
*/
|
|
17600
|
-
parseTemplateBindings(templateKey, templateValue,
|
|
17500
|
+
parseTemplateBindings(templateKey, templateValue, parseSourceSpan, absoluteKeyOffset, absoluteValueOffset) {
|
|
17601
17501
|
const tokens = this._lexer.tokenize(templateValue);
|
|
17602
|
-
const
|
|
17603
|
-
|
|
17604
|
-
templateUrl,
|
|
17605
|
-
absoluteValueOffset,
|
|
17606
|
-
tokens,
|
|
17607
|
-
0,
|
|
17608
|
-
this.errors,
|
|
17609
|
-
0
|
|
17610
|
-
/* relative offset */
|
|
17611
|
-
);
|
|
17502
|
+
const errors = [];
|
|
17503
|
+
const parser = new _ParseAST(templateValue, parseSourceSpan, absoluteValueOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences);
|
|
17612
17504
|
return parser.parseTemplateBindings({
|
|
17613
17505
|
source: templateKey,
|
|
17614
17506
|
span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)
|
|
17615
17507
|
});
|
|
17616
17508
|
}
|
|
17617
|
-
parseInterpolation(input,
|
|
17618
|
-
const
|
|
17509
|
+
parseInterpolation(input, parseSourceSpan, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17510
|
+
const errors = [];
|
|
17511
|
+
const { strings, expressions, offsets } = this.splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig);
|
|
17619
17512
|
if (expressions.length === 0)
|
|
17620
17513
|
return null;
|
|
17621
17514
|
const expressionNodes = [];
|
|
17622
17515
|
for (let i = 0; i < expressions.length; ++i) {
|
|
17516
|
+
const expressionSpan = interpolatedTokens?.[i * 2 + 1]?.sourceSpan;
|
|
17623
17517
|
const expressionText = expressions[i].text;
|
|
17624
17518
|
const sourceToLex = this._stripComments(expressionText);
|
|
17625
17519
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17626
|
-
const ast = new _ParseAST(input,
|
|
17520
|
+
const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
|
|
17627
17521
|
expressionNodes.push(ast);
|
|
17628
17522
|
}
|
|
17629
|
-
return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input,
|
|
17523
|
+
return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17630
17524
|
}
|
|
17631
17525
|
/**
|
|
17632
17526
|
* Similar to `parseInterpolation`, but treats the provided string as a single expression
|
|
17633
17527
|
* element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
|
|
17634
17528
|
* This is used for parsing the switch expression in ICUs.
|
|
17635
17529
|
*/
|
|
17636
|
-
parseInterpolationExpression(expression,
|
|
17530
|
+
parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
|
|
17637
17531
|
const sourceToLex = this._stripComments(expression);
|
|
17638
17532
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17639
|
-
const
|
|
17533
|
+
const errors = [];
|
|
17534
|
+
const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
|
|
17640
17535
|
const strings = ["", ""];
|
|
17641
|
-
return this.createInterpolationAst(strings, [ast], expression,
|
|
17536
|
+
return this.createInterpolationAst(strings, [ast], expression, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17642
17537
|
}
|
|
17643
|
-
createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
|
|
17538
|
+
createInterpolationAst(strings, expressions, input, location, absoluteOffset, errors) {
|
|
17644
17539
|
const span = new ParseSpan(0, input.length);
|
|
17645
17540
|
const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);
|
|
17646
|
-
return new ASTWithSource(interpolation, input, location, absoluteOffset,
|
|
17541
|
+
return new ASTWithSource(interpolation, input, location, absoluteOffset, errors);
|
|
17647
17542
|
}
|
|
17648
17543
|
/**
|
|
17649
17544
|
* Splits a string of text into "raw" text segments and expressions present in interpolations in
|
|
@@ -17652,7 +17547,7 @@ var Parser2 = class {
|
|
|
17652
17547
|
* `SplitInterpolation` with splits that look like
|
|
17653
17548
|
* <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
|
|
17654
17549
|
*/
|
|
17655
|
-
splitInterpolation(input,
|
|
17550
|
+
splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17656
17551
|
const strings = [];
|
|
17657
17552
|
const expressions = [];
|
|
17658
17553
|
const offsets = [];
|
|
@@ -17683,7 +17578,7 @@ var Parser2 = class {
|
|
|
17683
17578
|
const fullEnd = exprEnd + interpEnd.length;
|
|
17684
17579
|
const text2 = input.substring(exprStart, exprEnd);
|
|
17685
17580
|
if (text2.trim().length === 0) {
|
|
17686
|
-
|
|
17581
|
+
errors.push(getParseError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, parseSourceSpan));
|
|
17687
17582
|
}
|
|
17688
17583
|
expressions.push({ text: text2, start: fullStart, end: fullEnd });
|
|
17689
17584
|
const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;
|
|
@@ -17704,9 +17599,9 @@ var Parser2 = class {
|
|
|
17704
17599
|
}
|
|
17705
17600
|
return new SplitInterpolation(strings, expressions, offsets);
|
|
17706
17601
|
}
|
|
17707
|
-
wrapLiteralPrimitive(input,
|
|
17602
|
+
wrapLiteralPrimitive(input, sourceSpanOrLocation, absoluteOffset) {
|
|
17708
17603
|
const span = new ParseSpan(0, input == null ? 0 : input.length);
|
|
17709
|
-
return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input,
|
|
17604
|
+
return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, typeof sourceSpanOrLocation === "string" ? sourceSpanOrLocation : getLocation(sourceSpanOrLocation), absoluteOffset, []);
|
|
17710
17605
|
}
|
|
17711
17606
|
_stripComments(input) {
|
|
17712
17607
|
const i = this._commentStart(input);
|
|
@@ -17727,7 +17622,7 @@ var Parser2 = class {
|
|
|
17727
17622
|
}
|
|
17728
17623
|
return null;
|
|
17729
17624
|
}
|
|
17730
|
-
_checkNoInterpolation(input,
|
|
17625
|
+
_checkNoInterpolation(errors, input, parseSourceSpan, { start, end }) {
|
|
17731
17626
|
let startIndex = -1;
|
|
17732
17627
|
let endIndex = -1;
|
|
17733
17628
|
for (const charIndex of this._forEachUnquotedChar(input, 0)) {
|
|
@@ -17743,7 +17638,7 @@ var Parser2 = class {
|
|
|
17743
17638
|
}
|
|
17744
17639
|
}
|
|
17745
17640
|
if (startIndex > -1 && endIndex > -1) {
|
|
17746
|
-
|
|
17641
|
+
errors.push(getParseError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
|
|
17747
17642
|
}
|
|
17748
17643
|
}
|
|
17749
17644
|
/**
|
|
@@ -17790,12 +17685,13 @@ var _ParseAST = class {
|
|
|
17790
17685
|
__name(this, "_ParseAST");
|
|
17791
17686
|
}
|
|
17792
17687
|
input;
|
|
17793
|
-
|
|
17688
|
+
parseSourceSpan;
|
|
17794
17689
|
absoluteOffset;
|
|
17795
17690
|
tokens;
|
|
17796
17691
|
parseFlags;
|
|
17797
17692
|
errors;
|
|
17798
17693
|
offset;
|
|
17694
|
+
supportsDirectPipeReferences;
|
|
17799
17695
|
rparensExpected = 0;
|
|
17800
17696
|
rbracketsExpected = 0;
|
|
17801
17697
|
rbracesExpected = 0;
|
|
@@ -17806,14 +17702,15 @@ var _ParseAST = class {
|
|
|
17806
17702
|
// and may change for subsequent expressions visited by the parser.
|
|
17807
17703
|
sourceSpanCache = /* @__PURE__ */ new Map();
|
|
17808
17704
|
index = 0;
|
|
17809
|
-
constructor(input,
|
|
17705
|
+
constructor(input, parseSourceSpan, absoluteOffset, tokens, parseFlags, errors, offset, supportsDirectPipeReferences) {
|
|
17810
17706
|
this.input = input;
|
|
17811
|
-
this.
|
|
17707
|
+
this.parseSourceSpan = parseSourceSpan;
|
|
17812
17708
|
this.absoluteOffset = absoluteOffset;
|
|
17813
17709
|
this.tokens = tokens;
|
|
17814
17710
|
this.parseFlags = parseFlags;
|
|
17815
17711
|
this.errors = errors;
|
|
17816
17712
|
this.offset = offset;
|
|
17713
|
+
this.supportsDirectPipeReferences = supportsDirectPipeReferences;
|
|
17817
17714
|
}
|
|
17818
17715
|
peek(offset) {
|
|
17819
17716
|
const i = this.index + offset;
|
|
@@ -17925,6 +17822,9 @@ var _ParseAST = class {
|
|
|
17925
17822
|
return false;
|
|
17926
17823
|
}
|
|
17927
17824
|
}
|
|
17825
|
+
isAssignmentOperator(token) {
|
|
17826
|
+
return token.type === TokenType.Operator && Binary.isAssignmentOperation(token.strValue);
|
|
17827
|
+
}
|
|
17928
17828
|
expectOperator(operator) {
|
|
17929
17829
|
if (this.consumeOptionalOperator(operator))
|
|
17930
17830
|
return;
|
|
@@ -18011,7 +17911,14 @@ var _ParseAST = class {
|
|
|
18011
17911
|
while (this.consumeOptionalCharacter($COLON)) {
|
|
18012
17912
|
args.push(this.parseExpression());
|
|
18013
17913
|
}
|
|
18014
|
-
|
|
17914
|
+
let type;
|
|
17915
|
+
if (this.supportsDirectPipeReferences) {
|
|
17916
|
+
const charCode = nameId.charCodeAt(0);
|
|
17917
|
+
type = charCode === $_ || charCode >= $A && charCode <= $Z ? BindingPipeType.ReferencedDirectly : BindingPipeType.ReferencedByName;
|
|
17918
|
+
} else {
|
|
17919
|
+
type = BindingPipeType.ReferencedByName;
|
|
17920
|
+
}
|
|
17921
|
+
result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, type, nameSpan);
|
|
18015
17922
|
} while (this.consumeOptionalOperator("|"));
|
|
18016
17923
|
}
|
|
18017
17924
|
return result;
|
|
@@ -18324,27 +18231,30 @@ var _ParseAST = class {
|
|
|
18324
18231
|
return id2;
|
|
18325
18232
|
});
|
|
18326
18233
|
const nameSpan = this.sourceSpan(nameStart);
|
|
18327
|
-
let receiver;
|
|
18328
18234
|
if (isSafe) {
|
|
18329
|
-
if (this.
|
|
18235
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18236
|
+
this.advance();
|
|
18330
18237
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
18331
|
-
|
|
18238
|
+
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
18332
18239
|
} else {
|
|
18333
|
-
|
|
18240
|
+
return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18334
18241
|
}
|
|
18335
18242
|
} else {
|
|
18336
|
-
if (this.
|
|
18243
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18244
|
+
const operation = this.next.strValue;
|
|
18337
18245
|
if (!(this.parseFlags & 1)) {
|
|
18246
|
+
this.advance();
|
|
18338
18247
|
this.error("Bindings cannot contain assignments");
|
|
18339
18248
|
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
18340
18249
|
}
|
|
18250
|
+
const receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18251
|
+
this.advance();
|
|
18341
18252
|
const value = this.parseConditional();
|
|
18342
|
-
|
|
18253
|
+
return new Binary(this.span(start), this.sourceSpan(start), operation, receiver, value);
|
|
18343
18254
|
} else {
|
|
18344
|
-
|
|
18255
|
+
return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18345
18256
|
}
|
|
18346
18257
|
}
|
|
18347
|
-
return receiver;
|
|
18348
18258
|
}
|
|
18349
18259
|
parseCall(receiver, start, isSafe) {
|
|
18350
18260
|
const argumentStart = this.inputIndex;
|
|
@@ -18437,12 +18347,16 @@ var _ParseAST = class {
|
|
|
18437
18347
|
}
|
|
18438
18348
|
this.rbracketsExpected--;
|
|
18439
18349
|
this.expectCharacter($RBRACKET);
|
|
18440
|
-
if (this.
|
|
18350
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18351
|
+
const operation = this.next.strValue;
|
|
18441
18352
|
if (isSafe) {
|
|
18353
|
+
this.advance();
|
|
18442
18354
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
18443
18355
|
} else {
|
|
18356
|
+
const binaryReceiver = new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
|
|
18357
|
+
this.advance();
|
|
18444
18358
|
const value = this.parseConditional();
|
|
18445
|
-
return new
|
|
18359
|
+
return new Binary(this.span(start), this.sourceSpan(start), operation, binaryReceiver, value);
|
|
18446
18360
|
}
|
|
18447
18361
|
} else {
|
|
18448
18362
|
return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
|
|
@@ -18499,7 +18413,7 @@ var _ParseAST = class {
|
|
|
18499
18413
|
const ast = this.parsePipe();
|
|
18500
18414
|
const { start, end } = ast.span;
|
|
18501
18415
|
const value = this.input.substring(start, end);
|
|
18502
|
-
return new ASTWithSource(ast, value, this.
|
|
18416
|
+
return new ASTWithSource(ast, value, getLocation(this.parseSourceSpan), this.absoluteOffset + start, this.errors);
|
|
18503
18417
|
}
|
|
18504
18418
|
/**
|
|
18505
18419
|
* Return the binding for a variable declared using `as`. Note that the order
|
|
@@ -18600,13 +18514,11 @@ var _ParseAST = class {
|
|
|
18600
18514
|
* Records an error and skips over the token stream until reaching a recoverable point. See
|
|
18601
18515
|
* `this.skip` for more details on token skipping.
|
|
18602
18516
|
*/
|
|
18603
|
-
error(message, index =
|
|
18604
|
-
this.errors.push(
|
|
18517
|
+
error(message, index = this.index) {
|
|
18518
|
+
this.errors.push(getParseError(message, this.input, this.getErrorLocationText(index), this.parseSourceSpan));
|
|
18605
18519
|
this.skip();
|
|
18606
18520
|
}
|
|
18607
|
-
|
|
18608
|
-
if (index == null)
|
|
18609
|
-
index = this.index;
|
|
18521
|
+
getErrorLocationText(index) {
|
|
18610
18522
|
return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`;
|
|
18611
18523
|
}
|
|
18612
18524
|
/**
|
|
@@ -18638,7 +18550,7 @@ var _ParseAST = class {
|
|
|
18638
18550
|
* none of the calling productions are not expecting the closing token else we will never
|
|
18639
18551
|
* make progress in the case of an extraneous group closing symbol (such as a stray ')').
|
|
18640
18552
|
* That is, we skip a closing symbol if we are not in a grouping production.
|
|
18641
|
-
* -
|
|
18553
|
+
* - Assignment in a `Writable` context
|
|
18642
18554
|
* - In this context, we are able to recover after seeing the `=` operator, which
|
|
18643
18555
|
* signals the presence of an independent rvalue expression following the `=` operator.
|
|
18644
18556
|
*
|
|
@@ -18647,15 +18559,24 @@ var _ParseAST = class {
|
|
|
18647
18559
|
*/
|
|
18648
18560
|
skip() {
|
|
18649
18561
|
let n = this.next;
|
|
18650
|
-
while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !
|
|
18562
|
+
while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !this.isAssignmentOperator(n))) {
|
|
18651
18563
|
if (this.next.isError()) {
|
|
18652
|
-
this.errors.push(
|
|
18564
|
+
this.errors.push(getParseError(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan));
|
|
18653
18565
|
}
|
|
18654
18566
|
this.advance();
|
|
18655
18567
|
n = this.next;
|
|
18656
18568
|
}
|
|
18657
18569
|
}
|
|
18658
18570
|
};
|
|
18571
|
+
function getParseError(message, input, locationText, parseSourceSpan) {
|
|
18572
|
+
if (locationText.length > 0) {
|
|
18573
|
+
locationText = ` ${locationText} `;
|
|
18574
|
+
}
|
|
18575
|
+
const location = getLocation(parseSourceSpan);
|
|
18576
|
+
const error = `Parser Error: ${message}${locationText}[${input}] in ${location}`;
|
|
18577
|
+
return new ParseError(parseSourceSpan, error);
|
|
18578
|
+
}
|
|
18579
|
+
__name(getParseError, "getParseError");
|
|
18659
18580
|
var SimpleExpressionChecker = class extends RecursiveAstVisitor2 {
|
|
18660
18581
|
static {
|
|
18661
18582
|
__name(this, "SimpleExpressionChecker");
|
|
@@ -18719,9 +18640,6 @@ var SerializeExpressionVisitor = class {
|
|
|
18719
18640
|
visitKeyedRead(ast, context) {
|
|
18720
18641
|
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}]`;
|
|
18721
18642
|
}
|
|
18722
|
-
visitKeyedWrite(ast, context) {
|
|
18723
|
-
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}] = ${ast.value.visit(this, context)}`;
|
|
18724
|
-
}
|
|
18725
18643
|
visitLiteralArray(ast, context) {
|
|
18726
18644
|
return `[${ast.expressions.map((e) => e.visit(this, context)).join(", ")}]`;
|
|
18727
18645
|
}
|
|
@@ -18759,13 +18677,6 @@ var SerializeExpressionVisitor = class {
|
|
|
18759
18677
|
return `${ast.receiver.visit(this, context)}.${ast.name}`;
|
|
18760
18678
|
}
|
|
18761
18679
|
}
|
|
18762
|
-
visitPropertyWrite(ast, context) {
|
|
18763
|
-
if (ast.receiver instanceof ImplicitReceiver) {
|
|
18764
|
-
return `${ast.name} = ${ast.value.visit(this, context)}`;
|
|
18765
|
-
} else {
|
|
18766
|
-
return `${ast.receiver.visit(this, context)}.${ast.name} = ${ast.value.visit(this, context)}`;
|
|
18767
|
-
}
|
|
18768
|
-
}
|
|
18769
18680
|
visitSafePropertyRead(ast, context) {
|
|
18770
18681
|
return `${ast.receiver.visit(this, context)}?.${ast.name}`;
|
|
18771
18682
|
}
|
|
@@ -19768,7 +19679,7 @@ var _I18nVisitor = class {
|
|
|
19768
19679
|
const expr = this._expressionParser.parseBinding(
|
|
19769
19680
|
expression,
|
|
19770
19681
|
/* location */
|
|
19771
|
-
token.sourceSpan
|
|
19682
|
+
token.sourceSpan,
|
|
19772
19683
|
/* absoluteOffset */
|
|
19773
19684
|
token.sourceSpan.start.offset,
|
|
19774
19685
|
this._interpolationConfig
|
|
@@ -19818,14 +19729,6 @@ function extractPlaceholderName(input) {
|
|
|
19818
19729
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
19819
19730
|
}
|
|
19820
19731
|
__name(extractPlaceholderName, "extractPlaceholderName");
|
|
19821
|
-
var I18nError = class extends ParseError {
|
|
19822
|
-
static {
|
|
19823
|
-
__name(this, "I18nError");
|
|
19824
|
-
}
|
|
19825
|
-
constructor(span, msg) {
|
|
19826
|
-
super(span, msg);
|
|
19827
|
-
}
|
|
19828
|
-
};
|
|
19829
19732
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
19830
19733
|
// NOTE: All strings in this set *must* be lowercase!
|
|
19831
19734
|
// TrustedHTML
|
|
@@ -20031,7 +19934,7 @@ var I18nMetaVisitor = class {
|
|
|
20031
19934
|
}
|
|
20032
19935
|
}
|
|
20033
19936
|
_reportError(node, msg) {
|
|
20034
|
-
this._errors.push(new
|
|
19937
|
+
this._errors.push(new ParseError(node.sourceSpan, msg));
|
|
20035
19938
|
}
|
|
20036
19939
|
};
|
|
20037
19940
|
var I18N_MEANING_SEPARATOR = "|";
|
|
@@ -20092,7 +19995,7 @@ function createGoogleGetMsgStatements(variable$1, message, closureVar, placehold
|
|
|
20092
19995
|
})))
|
|
20093
19996
|
}));
|
|
20094
19997
|
}
|
|
20095
|
-
const googGetMsgStmt = closureVar.
|
|
19998
|
+
const googGetMsgStmt = new DeclareVarStmt(closureVar.name, variable(GOOG_GET_MSG).callFn(args), INFERRED_TYPE, StmtModifier.Final);
|
|
20096
19999
|
googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));
|
|
20097
20000
|
const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
|
|
20098
20001
|
return [googGetMsgStmt, i18nAssignmentStmt];
|
|
@@ -20642,7 +20545,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20642
20545
|
switch (op.kind) {
|
|
20643
20546
|
case OpKind.Property:
|
|
20644
20547
|
case OpKind.DomProperty:
|
|
20645
|
-
if (op.
|
|
20548
|
+
if (op.isLegacyAnimationTrigger) {
|
|
20646
20549
|
op.name = "@" + op.name;
|
|
20647
20550
|
}
|
|
20648
20551
|
break;
|
|
@@ -20654,8 +20557,8 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20654
20557
|
throw new Error(`Expected a slot to be assigned`);
|
|
20655
20558
|
}
|
|
20656
20559
|
let animation = "";
|
|
20657
|
-
if (op.
|
|
20658
|
-
op.name = `@${op.name}.${op.
|
|
20560
|
+
if (op.isLegacyAnimationListener) {
|
|
20561
|
+
op.name = `@${op.name}.${op.legacyAnimationPhase}`;
|
|
20659
20562
|
animation = "animation";
|
|
20660
20563
|
}
|
|
20661
20564
|
if (op.hostListener) {
|
|
@@ -20879,7 +20782,7 @@ function kindWithInterpolationTest(kind, interpolation) {
|
|
|
20879
20782
|
}
|
|
20880
20783
|
__name(kindWithInterpolationTest, "kindWithInterpolationTest");
|
|
20881
20784
|
function basicListenerKindTest(op) {
|
|
20882
|
-
return op.kind === OpKind.Listener && !(op.hostListener && op.
|
|
20785
|
+
return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener;
|
|
20883
20786
|
}
|
|
20884
20787
|
__name(basicListenerKindTest, "basicListenerKindTest");
|
|
20885
20788
|
function nonInterpolationPropertyKindTest(op) {
|
|
@@ -20887,7 +20790,7 @@ function nonInterpolationPropertyKindTest(op) {
|
|
|
20887
20790
|
}
|
|
20888
20791
|
__name(nonInterpolationPropertyKindTest, "nonInterpolationPropertyKindTest");
|
|
20889
20792
|
var CREATE_ORDERING = [
|
|
20890
|
-
{ test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.
|
|
20793
|
+
{ test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isLegacyAnimationListener, "test") },
|
|
20891
20794
|
{ test: basicListenerKindTest }
|
|
20892
20795
|
];
|
|
20893
20796
|
var UPDATE_ORDERING = [
|
|
@@ -21234,6 +21137,38 @@ function elementOrContainerBase(instruction, slot, tag, constIndex, localRefInde
|
|
|
21234
21137
|
return call(instruction, args, sourceSpan);
|
|
21235
21138
|
}
|
|
21236
21139
|
__name(elementOrContainerBase, "elementOrContainerBase");
|
|
21140
|
+
function templateBase(instruction, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
21141
|
+
const args = [
|
|
21142
|
+
literal(slot),
|
|
21143
|
+
templateFnRef,
|
|
21144
|
+
literal(decls),
|
|
21145
|
+
literal(vars),
|
|
21146
|
+
literal(tag),
|
|
21147
|
+
literal(constIndex)
|
|
21148
|
+
];
|
|
21149
|
+
if (localRefs !== null) {
|
|
21150
|
+
args.push(literal(localRefs));
|
|
21151
|
+
args.push(importExpr(Identifiers.templateRefExtractor));
|
|
21152
|
+
}
|
|
21153
|
+
while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
|
|
21154
|
+
args.pop();
|
|
21155
|
+
}
|
|
21156
|
+
return call(instruction, args, sourceSpan);
|
|
21157
|
+
}
|
|
21158
|
+
__name(templateBase, "templateBase");
|
|
21159
|
+
function propertyBase(instruction, name, expression, sanitizer, sourceSpan) {
|
|
21160
|
+
const args = [literal(name)];
|
|
21161
|
+
if (expression instanceof Interpolation2) {
|
|
21162
|
+
args.push(interpolationToExpression(expression, sourceSpan));
|
|
21163
|
+
} else {
|
|
21164
|
+
args.push(expression);
|
|
21165
|
+
}
|
|
21166
|
+
if (sanitizer !== null) {
|
|
21167
|
+
args.push(sanitizer);
|
|
21168
|
+
}
|
|
21169
|
+
return call(instruction, args, sourceSpan);
|
|
21170
|
+
}
|
|
21171
|
+
__name(propertyBase, "propertyBase");
|
|
21237
21172
|
function elementEnd(sourceSpan) {
|
|
21238
21173
|
return call(Identifiers.elementEnd, [], sourceSpan);
|
|
21239
21174
|
}
|
|
@@ -21267,22 +21202,7 @@ function elementContainerEnd() {
|
|
|
21267
21202
|
}
|
|
21268
21203
|
__name(elementContainerEnd, "elementContainerEnd");
|
|
21269
21204
|
function template(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
21270
|
-
|
|
21271
|
-
literal(slot),
|
|
21272
|
-
templateFnRef,
|
|
21273
|
-
literal(decls),
|
|
21274
|
-
literal(vars),
|
|
21275
|
-
literal(tag),
|
|
21276
|
-
literal(constIndex)
|
|
21277
|
-
];
|
|
21278
|
-
if (localRefs !== null) {
|
|
21279
|
-
args.push(literal(localRefs));
|
|
21280
|
-
args.push(importExpr(Identifiers.templateRefExtractor));
|
|
21281
|
-
}
|
|
21282
|
-
while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
|
|
21283
|
-
args.pop();
|
|
21284
|
-
}
|
|
21285
|
-
return call(Identifiers.templateCreate, args, sourceSpan);
|
|
21205
|
+
return templateBase(Identifiers.templateCreate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
|
|
21286
21206
|
}
|
|
21287
21207
|
__name(template, "template");
|
|
21288
21208
|
function disableBindings() {
|
|
@@ -21641,16 +21561,7 @@ function i18nAttributes(slot, i18nAttributesConfig) {
|
|
|
21641
21561
|
}
|
|
21642
21562
|
__name(i18nAttributes, "i18nAttributes");
|
|
21643
21563
|
function property(name, expression, sanitizer, sourceSpan) {
|
|
21644
|
-
|
|
21645
|
-
if (expression instanceof Interpolation2) {
|
|
21646
|
-
args.push(interpolationToExpression(expression, sourceSpan));
|
|
21647
|
-
} else {
|
|
21648
|
-
args.push(expression);
|
|
21649
|
-
}
|
|
21650
|
-
if (sanitizer !== null) {
|
|
21651
|
-
args.push(sanitizer);
|
|
21652
|
-
}
|
|
21653
|
-
return call(Identifiers.property, args, sourceSpan);
|
|
21564
|
+
return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
|
|
21654
21565
|
}
|
|
21655
21566
|
__name(property, "property");
|
|
21656
21567
|
function twoWayProperty(name, expression, sanitizer, sourceSpan) {
|
|
@@ -21704,6 +21615,58 @@ function classMap(expression, sourceSpan) {
|
|
|
21704
21615
|
return call(Identifiers.classMap, [value], sourceSpan);
|
|
21705
21616
|
}
|
|
21706
21617
|
__name(classMap, "classMap");
|
|
21618
|
+
function domElement(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
21619
|
+
return elementOrContainerBase(Identifiers.domElement, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
21620
|
+
}
|
|
21621
|
+
__name(domElement, "domElement");
|
|
21622
|
+
function domElementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
21623
|
+
return elementOrContainerBase(Identifiers.domElementStart, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
21624
|
+
}
|
|
21625
|
+
__name(domElementStart, "domElementStart");
|
|
21626
|
+
function domElementEnd(sourceSpan) {
|
|
21627
|
+
return call(Identifiers.domElementEnd, [], sourceSpan);
|
|
21628
|
+
}
|
|
21629
|
+
__name(domElementEnd, "domElementEnd");
|
|
21630
|
+
function domElementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {
|
|
21631
|
+
return elementOrContainerBase(
|
|
21632
|
+
Identifiers.domElementContainerStart,
|
|
21633
|
+
slot,
|
|
21634
|
+
/* tag */
|
|
21635
|
+
null,
|
|
21636
|
+
constIndex,
|
|
21637
|
+
localRefIndex,
|
|
21638
|
+
sourceSpan
|
|
21639
|
+
);
|
|
21640
|
+
}
|
|
21641
|
+
__name(domElementContainerStart, "domElementContainerStart");
|
|
21642
|
+
function domElementContainer(slot, constIndex, localRefIndex, sourceSpan) {
|
|
21643
|
+
return elementOrContainerBase(
|
|
21644
|
+
Identifiers.domElementContainer,
|
|
21645
|
+
slot,
|
|
21646
|
+
/* tag */
|
|
21647
|
+
null,
|
|
21648
|
+
constIndex,
|
|
21649
|
+
localRefIndex,
|
|
21650
|
+
sourceSpan
|
|
21651
|
+
);
|
|
21652
|
+
}
|
|
21653
|
+
__name(domElementContainer, "domElementContainer");
|
|
21654
|
+
function domElementContainerEnd() {
|
|
21655
|
+
return call(Identifiers.domElementContainerEnd, [], null);
|
|
21656
|
+
}
|
|
21657
|
+
__name(domElementContainerEnd, "domElementContainerEnd");
|
|
21658
|
+
function domListener(name, handlerFn, eventTargetResolver, sourceSpan) {
|
|
21659
|
+
const args = [literal(name), handlerFn];
|
|
21660
|
+
if (eventTargetResolver !== null) {
|
|
21661
|
+
args.push(importExpr(eventTargetResolver));
|
|
21662
|
+
}
|
|
21663
|
+
return call(Identifiers.domListener, args, sourceSpan);
|
|
21664
|
+
}
|
|
21665
|
+
__name(domListener, "domListener");
|
|
21666
|
+
function domTemplate(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
21667
|
+
return templateBase(Identifiers.domTemplate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
|
|
21668
|
+
}
|
|
21669
|
+
__name(domTemplate, "domTemplate");
|
|
21707
21670
|
var PIPE_BINDINGS = [
|
|
21708
21671
|
Identifiers.pipeBind1,
|
|
21709
21672
|
Identifiers.pipeBind2,
|
|
@@ -21736,11 +21699,7 @@ function i18nApply(slot, sourceSpan) {
|
|
|
21736
21699
|
}
|
|
21737
21700
|
__name(i18nApply, "i18nApply");
|
|
21738
21701
|
function domProperty(name, expression, sanitizer, sourceSpan) {
|
|
21739
|
-
|
|
21740
|
-
if (sanitizer !== null) {
|
|
21741
|
-
args.push(sanitizer);
|
|
21742
|
-
}
|
|
21743
|
-
return call(Identifiers.domProperty, args, sourceSpan);
|
|
21702
|
+
return propertyBase(Identifiers.domProperty, name, expression, sanitizer, sourceSpan);
|
|
21744
21703
|
}
|
|
21745
21704
|
__name(domProperty, "domProperty");
|
|
21746
21705
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
@@ -21869,6 +21828,14 @@ var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
|
21869
21828
|
["document", Identifiers.resolveDocument],
|
|
21870
21829
|
["body", Identifiers.resolveBody]
|
|
21871
21830
|
]);
|
|
21831
|
+
var DOM_PROPERTY_REMAPPING = /* @__PURE__ */ new Map([
|
|
21832
|
+
["class", "className"],
|
|
21833
|
+
["for", "htmlFor"],
|
|
21834
|
+
["formaction", "formAction"],
|
|
21835
|
+
["innerHtml", "innerHTML"],
|
|
21836
|
+
["readonly", "readOnly"],
|
|
21837
|
+
["tabindex", "tabIndex"]
|
|
21838
|
+
]);
|
|
21872
21839
|
function reify(job) {
|
|
21873
21840
|
for (const unit of job.units) {
|
|
21874
21841
|
reifyCreateOperations(unit, unit.create);
|
|
@@ -21884,22 +21851,22 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21884
21851
|
OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
|
|
21885
21852
|
break;
|
|
21886
21853
|
case OpKind.ElementStart:
|
|
21887
|
-
OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21854
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21888
21855
|
break;
|
|
21889
21856
|
case OpKind.Element:
|
|
21890
|
-
OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21857
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElement(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan) : element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21891
21858
|
break;
|
|
21892
21859
|
case OpKind.ElementEnd:
|
|
21893
|
-
OpList.replace(op, elementEnd(op.sourceSpan));
|
|
21860
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementEnd(op.sourceSpan) : elementEnd(op.sourceSpan));
|
|
21894
21861
|
break;
|
|
21895
21862
|
case OpKind.ContainerStart:
|
|
21896
|
-
OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21863
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan) : elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21897
21864
|
break;
|
|
21898
21865
|
case OpKind.Container:
|
|
21899
|
-
OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21866
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan) : elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21900
21867
|
break;
|
|
21901
21868
|
case OpKind.ContainerEnd:
|
|
21902
|
-
OpList.replace(op, elementContainerEnd());
|
|
21869
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerEnd() : elementContainerEnd());
|
|
21903
21870
|
break;
|
|
21904
21871
|
case OpKind.I18nStart:
|
|
21905
21872
|
OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));
|
|
@@ -21924,7 +21891,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21924
21891
|
throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
|
|
21925
21892
|
}
|
|
21926
21893
|
const childView = unit.job.views.get(op.xref);
|
|
21927
|
-
OpList.replace(
|
|
21894
|
+
OpList.replace(
|
|
21895
|
+
op,
|
|
21896
|
+
// Block templates can't have directives so we can always generate them as DOM-only.
|
|
21897
|
+
op.templateKind === TemplateKind.Block || unit.job.mode === TemplateCompilationMode.DomOnly ? domTemplate(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan)
|
|
21898
|
+
);
|
|
21928
21899
|
break;
|
|
21929
21900
|
case OpKind.DisableBindings:
|
|
21930
21901
|
OpList.replace(op, disableBindings());
|
|
@@ -21944,7 +21915,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21944
21915
|
if (eventTargetResolver === void 0) {
|
|
21945
21916
|
throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
|
|
21946
21917
|
}
|
|
21947
|
-
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.
|
|
21918
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.hostListener && !op.isLegacyAnimationListener ? domListener(op.name, listenerFn, eventTargetResolver, op.sourceSpan) : listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isLegacyAnimationListener, op.sourceSpan));
|
|
21948
21919
|
break;
|
|
21949
21920
|
case OpKind.TwoWayListener:
|
|
21950
21921
|
OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
|
|
@@ -22096,7 +22067,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
22096
22067
|
}
|
|
22097
22068
|
}
|
|
22098
22069
|
__name(reifyCreateOperations, "reifyCreateOperations");
|
|
22099
|
-
function reifyUpdateOperations(
|
|
22070
|
+
function reifyUpdateOperations(unit, ops) {
|
|
22100
22071
|
for (const op of ops) {
|
|
22101
22072
|
transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
|
|
22102
22073
|
switch (op.kind) {
|
|
@@ -22104,7 +22075,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
22104
22075
|
OpList.replace(op, advance(op.delta, op.sourceSpan));
|
|
22105
22076
|
break;
|
|
22106
22077
|
case OpKind.Property:
|
|
22107
|
-
OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22078
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.isLegacyAnimationTrigger ? domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan) : property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22108
22079
|
break;
|
|
22109
22080
|
case OpKind.TwoWayProperty:
|
|
22110
22081
|
OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
@@ -22137,10 +22108,10 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
22137
22108
|
if (op.expression instanceof Interpolation2) {
|
|
22138
22109
|
throw new Error("not yet handled");
|
|
22139
22110
|
} else {
|
|
22140
|
-
if (op.
|
|
22111
|
+
if (op.isLegacyAnimationTrigger) {
|
|
22141
22112
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
22142
22113
|
} else {
|
|
22143
|
-
OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22114
|
+
OpList.replace(op, domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22144
22115
|
}
|
|
22145
22116
|
}
|
|
22146
22117
|
break;
|
|
@@ -23763,22 +23734,22 @@ function isSingleI18nIcu(meta) {
|
|
|
23763
23734
|
return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu2;
|
|
23764
23735
|
}
|
|
23765
23736
|
__name(isSingleI18nIcu, "isSingleI18nIcu");
|
|
23766
|
-
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
|
|
23767
|
-
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
|
|
23737
|
+
function ingestComponent(componentName, template2, constantPool, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
|
|
23738
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
|
|
23768
23739
|
ingestNodes(job.root, template2);
|
|
23769
23740
|
return job;
|
|
23770
23741
|
}
|
|
23771
23742
|
__name(ingestComponent, "ingestComponent");
|
|
23772
23743
|
function ingestHostBinding(input, bindingParser, constantPool) {
|
|
23773
|
-
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
|
|
23744
|
+
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode, TemplateCompilationMode.DomOnly);
|
|
23774
23745
|
for (const property2 of input.properties ?? []) {
|
|
23775
23746
|
let bindingKind = BindingKind.Property;
|
|
23776
23747
|
if (property2.name.startsWith("attr.")) {
|
|
23777
23748
|
property2.name = property2.name.substring("attr.".length);
|
|
23778
23749
|
bindingKind = BindingKind.Attribute;
|
|
23779
23750
|
}
|
|
23780
|
-
if (property2.
|
|
23781
|
-
bindingKind = BindingKind.
|
|
23751
|
+
if (property2.isLegacyAnimation) {
|
|
23752
|
+
bindingKind = BindingKind.LegacyAnimation;
|
|
23782
23753
|
}
|
|
23783
23754
|
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
23784
23755
|
ingestDomProperty(job, property2, bindingKind, securityContexts);
|
|
@@ -23839,7 +23810,7 @@ function ingestHostAttribute(job, name, value, securityContexts) {
|
|
|
23839
23810
|
}
|
|
23840
23811
|
__name(ingestHostAttribute, "ingestHostAttribute");
|
|
23841
23812
|
function ingestHostEvent(job, event) {
|
|
23842
|
-
const [phase, target] = event.type !== ParsedEventType.
|
|
23813
|
+
const [phase, target] = event.type !== ParsedEventType.LegacyAnimation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
23843
23814
|
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
23844
23815
|
job.root.create.push(eventBinding);
|
|
23845
23816
|
}
|
|
@@ -24259,20 +24230,6 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
24259
24230
|
} else {
|
|
24260
24231
|
return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
|
|
24261
24232
|
}
|
|
24262
|
-
} else if (ast instanceof PropertyWrite) {
|
|
24263
|
-
if (ast.receiver instanceof ImplicitReceiver) {
|
|
24264
|
-
return new WritePropExpr(
|
|
24265
|
-
// TODO: Is it correct to always use the root context in place of the implicit receiver?
|
|
24266
|
-
new ContextExpr(job.root.xref),
|
|
24267
|
-
ast.name,
|
|
24268
|
-
convertAst(ast.value, job, baseSourceSpan),
|
|
24269
|
-
null,
|
|
24270
|
-
convertSourceSpan(ast.span, baseSourceSpan)
|
|
24271
|
-
);
|
|
24272
|
-
}
|
|
24273
|
-
return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
24274
|
-
} else if (ast instanceof KeyedWrite) {
|
|
24275
|
-
return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
24276
24233
|
} else if (ast instanceof Call) {
|
|
24277
24234
|
if (ast.receiver instanceof ImplicitReceiver) {
|
|
24278
24235
|
throw new Error(`Unexpected ImplicitReceiver`);
|
|
@@ -24368,7 +24325,7 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
|
24368
24325
|
[BindingType.Attribute, BindingKind.Attribute],
|
|
24369
24326
|
[BindingType.Class, BindingKind.ClassName],
|
|
24370
24327
|
[BindingType.Style, BindingKind.StyleProperty],
|
|
24371
|
-
[BindingType.
|
|
24328
|
+
[BindingType.LegacyAnimation, BindingKind.LegacyAnimation]
|
|
24372
24329
|
]);
|
|
24373
24330
|
function isPlainTemplate(tmpl) {
|
|
24374
24331
|
return splitNsName(tmpl.tagName ?? "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
@@ -24403,7 +24360,7 @@ function ingestElementBindings(unit, op, element2) {
|
|
|
24403
24360
|
unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
|
|
24404
24361
|
unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
|
|
24405
24362
|
for (const output of element2.outputs) {
|
|
24406
|
-
if (output.type === ParsedEventType.
|
|
24363
|
+
if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
|
|
24407
24364
|
throw Error("Animation listener should have a phase");
|
|
24408
24365
|
}
|
|
24409
24366
|
if (output.type === ParsedEventType.TwoWay) {
|
|
@@ -24437,7 +24394,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
24437
24394
|
unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
|
|
24438
24395
|
unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
|
|
24439
24396
|
for (const output of template2.outputs) {
|
|
24440
|
-
if (output.type === ParsedEventType.
|
|
24397
|
+
if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
|
|
24441
24398
|
throw Error("Animation listener should have a phase");
|
|
24442
24399
|
}
|
|
24443
24400
|
if (templateKind === TemplateKind.NgTemplate) {
|
|
@@ -24447,7 +24404,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
24447
24404
|
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
24448
24405
|
}
|
|
24449
24406
|
}
|
|
24450
|
-
if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.
|
|
24407
|
+
if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.LegacyAnimation) {
|
|
24451
24408
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
24452
24409
|
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
|
|
24453
24410
|
}
|
|
@@ -24470,7 +24427,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
|
|
|
24470
24427
|
return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
|
|
24471
24428
|
}
|
|
24472
24429
|
}
|
|
24473
|
-
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.
|
|
24430
|
+
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation)) {
|
|
24474
24431
|
return null;
|
|
24475
24432
|
}
|
|
24476
24433
|
}
|
|
@@ -24566,7 +24523,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
24566
24523
|
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
24567
24524
|
}
|
|
24568
24525
|
for (const attr of root.inputs) {
|
|
24569
|
-
if (attr.type !== BindingType.
|
|
24526
|
+
if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Attribute) {
|
|
24570
24527
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
24571
24528
|
unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
|
|
24572
24529
|
}
|
|
@@ -24728,7 +24685,7 @@ var ATTRIBUTE_PREFIX = "attr";
|
|
|
24728
24685
|
var CLASS_PREFIX = "class";
|
|
24729
24686
|
var STYLE_PREFIX = "style";
|
|
24730
24687
|
var TEMPLATE_ATTR_PREFIX$1 = "*";
|
|
24731
|
-
var
|
|
24688
|
+
var LEGACY_ANIMATE_PROP_PREFIX = "animate-";
|
|
24732
24689
|
var BindingParser = class {
|
|
24733
24690
|
static {
|
|
24734
24691
|
__name(this, "BindingParser");
|
|
@@ -24798,16 +24755,16 @@ var BindingParser = class {
|
|
|
24798
24755
|
return targetEvents;
|
|
24799
24756
|
}
|
|
24800
24757
|
parseInterpolation(value, sourceSpan, interpolatedTokens) {
|
|
24801
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24802
24758
|
const absoluteOffset = sourceSpan.fullStart.offset;
|
|
24803
24759
|
try {
|
|
24804
|
-
const ast = this._exprParser.parseInterpolation(value,
|
|
24805
|
-
if (ast)
|
|
24806
|
-
this.
|
|
24760
|
+
const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens, this._interpolationConfig);
|
|
24761
|
+
if (ast) {
|
|
24762
|
+
this.errors.push(...ast.errors);
|
|
24763
|
+
}
|
|
24807
24764
|
return ast;
|
|
24808
24765
|
} catch (e) {
|
|
24809
24766
|
this._reportError(`${e}`, sourceSpan);
|
|
24810
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24767
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24811
24768
|
}
|
|
24812
24769
|
}
|
|
24813
24770
|
/**
|
|
@@ -24816,16 +24773,16 @@ var BindingParser = class {
|
|
|
24816
24773
|
* This is used for parsing the switch expression in ICUs.
|
|
24817
24774
|
*/
|
|
24818
24775
|
parseInterpolationExpression(expression, sourceSpan) {
|
|
24819
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24820
24776
|
const absoluteOffset = sourceSpan.start.offset;
|
|
24821
24777
|
try {
|
|
24822
|
-
const ast = this._exprParser.parseInterpolationExpression(expression,
|
|
24823
|
-
if (ast)
|
|
24824
|
-
this.
|
|
24778
|
+
const ast = this._exprParser.parseInterpolationExpression(expression, sourceSpan, absoluteOffset);
|
|
24779
|
+
if (ast) {
|
|
24780
|
+
this.errors.push(...ast.errors);
|
|
24781
|
+
}
|
|
24825
24782
|
return ast;
|
|
24826
24783
|
} catch (e) {
|
|
24827
24784
|
this._reportError(`${e}`, sourceSpan);
|
|
24828
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24785
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24829
24786
|
}
|
|
24830
24787
|
}
|
|
24831
24788
|
/**
|
|
@@ -24878,10 +24835,9 @@ var BindingParser = class {
|
|
|
24878
24835
|
* @param absoluteValueOffset start of the `tplValue`
|
|
24879
24836
|
*/
|
|
24880
24837
|
_parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {
|
|
24881
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24882
24838
|
try {
|
|
24883
|
-
const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue,
|
|
24884
|
-
|
|
24839
|
+
const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);
|
|
24840
|
+
bindingsResult.errors.forEach((e) => this.errors.push(e));
|
|
24885
24841
|
bindingsResult.warnings.forEach((warning) => {
|
|
24886
24842
|
this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);
|
|
24887
24843
|
});
|
|
@@ -24892,7 +24848,7 @@ var BindingParser = class {
|
|
|
24892
24848
|
}
|
|
24893
24849
|
}
|
|
24894
24850
|
parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
24895
|
-
if (
|
|
24851
|
+
if (isLegacyAnimationLabel(name)) {
|
|
24896
24852
|
name = name.substring(1);
|
|
24897
24853
|
if (keySpan !== void 0) {
|
|
24898
24854
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
@@ -24900,7 +24856,7 @@ var BindingParser = class {
|
|
|
24900
24856
|
if (value) {
|
|
24901
24857
|
this._reportError(`Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.`, sourceSpan, ParseErrorLevel.ERROR);
|
|
24902
24858
|
}
|
|
24903
|
-
this.
|
|
24859
|
+
this._parseLegacyAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24904
24860
|
} else {
|
|
24905
24861
|
targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
|
|
24906
24862
|
}
|
|
@@ -24909,22 +24865,22 @@ var BindingParser = class {
|
|
|
24909
24865
|
if (name.length === 0) {
|
|
24910
24866
|
this._reportError(`Property name is missing in binding`, sourceSpan);
|
|
24911
24867
|
}
|
|
24912
|
-
let
|
|
24913
|
-
if (name.startsWith(
|
|
24914
|
-
|
|
24915
|
-
name = name.substring(
|
|
24868
|
+
let isLegacyAnimationProp = false;
|
|
24869
|
+
if (name.startsWith(LEGACY_ANIMATE_PROP_PREFIX)) {
|
|
24870
|
+
isLegacyAnimationProp = true;
|
|
24871
|
+
name = name.substring(LEGACY_ANIMATE_PROP_PREFIX.length);
|
|
24916
24872
|
if (keySpan !== void 0) {
|
|
24917
|
-
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset +
|
|
24873
|
+
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + LEGACY_ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
|
|
24918
24874
|
}
|
|
24919
|
-
} else if (
|
|
24920
|
-
|
|
24875
|
+
} else if (isLegacyAnimationLabel(name)) {
|
|
24876
|
+
isLegacyAnimationProp = true;
|
|
24921
24877
|
name = name.substring(1);
|
|
24922
24878
|
if (keySpan !== void 0) {
|
|
24923
24879
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
24924
24880
|
}
|
|
24925
24881
|
}
|
|
24926
|
-
if (
|
|
24927
|
-
this.
|
|
24882
|
+
if (isLegacyAnimationProp) {
|
|
24883
|
+
this._parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24928
24884
|
} else {
|
|
24929
24885
|
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24930
24886
|
}
|
|
@@ -24941,29 +24897,29 @@ var BindingParser = class {
|
|
|
24941
24897
|
targetMatchableAttrs.push([name, ast.source]);
|
|
24942
24898
|
targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
24943
24899
|
}
|
|
24944
|
-
|
|
24900
|
+
_parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
24945
24901
|
if (name.length === 0) {
|
|
24946
24902
|
this._reportError("Animation trigger is missing", sourceSpan);
|
|
24947
24903
|
}
|
|
24948
24904
|
const ast = this.parseBinding(expression || "undefined", false, valueSpan || sourceSpan, absoluteOffset);
|
|
24949
24905
|
targetMatchableAttrs.push([name, ast.source]);
|
|
24950
|
-
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.
|
|
24906
|
+
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.LEGACY_ANIMATION, sourceSpan, keySpan, valueSpan));
|
|
24951
24907
|
}
|
|
24952
24908
|
parseBinding(value, isHostBinding2, sourceSpan, absoluteOffset) {
|
|
24953
|
-
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown)").toString();
|
|
24954
24909
|
try {
|
|
24955
|
-
const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value,
|
|
24956
|
-
if (ast)
|
|
24957
|
-
this.
|
|
24910
|
+
const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig);
|
|
24911
|
+
if (ast) {
|
|
24912
|
+
this.errors.push(...ast.errors);
|
|
24913
|
+
}
|
|
24958
24914
|
return ast;
|
|
24959
24915
|
} catch (e) {
|
|
24960
24916
|
this._reportError(`${e}`, sourceSpan);
|
|
24961
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24917
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24962
24918
|
}
|
|
24963
24919
|
}
|
|
24964
24920
|
createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
|
|
24965
|
-
if (boundProp.
|
|
24966
|
-
return new BoundElementProperty(boundProp.name, BindingType.
|
|
24921
|
+
if (boundProp.isLegacyAnimation) {
|
|
24922
|
+
return new BoundElementProperty(boundProp.name, BindingType.LegacyAnimation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
|
|
24967
24923
|
}
|
|
24968
24924
|
let unit = null;
|
|
24969
24925
|
let bindingType = void 0;
|
|
@@ -25011,12 +24967,12 @@ var BindingParser = class {
|
|
|
25011
24967
|
if (name.length === 0) {
|
|
25012
24968
|
this._reportError(`Event name is missing in binding`, sourceSpan);
|
|
25013
24969
|
}
|
|
25014
|
-
if (
|
|
24970
|
+
if (isLegacyAnimationLabel(name)) {
|
|
25015
24971
|
name = name.slice(1);
|
|
25016
24972
|
if (keySpan !== void 0) {
|
|
25017
24973
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
25018
24974
|
}
|
|
25019
|
-
this.
|
|
24975
|
+
this._parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
|
|
25020
24976
|
} else {
|
|
25021
24977
|
this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
|
|
25022
24978
|
}
|
|
@@ -25029,14 +24985,14 @@ var BindingParser = class {
|
|
|
25029
24985
|
const [target, eventName] = splitAtColon(rawName, [null, rawName]);
|
|
25030
24986
|
return { eventName, target };
|
|
25031
24987
|
}
|
|
25032
|
-
|
|
24988
|
+
parseLegacyAnimationEventName(rawName) {
|
|
25033
24989
|
const matches = splitAtPeriod(rawName, [rawName, null]);
|
|
25034
24990
|
return { eventName: matches[0], phase: matches[1] === null ? null : matches[1].toLowerCase() };
|
|
25035
24991
|
}
|
|
25036
|
-
|
|
25037
|
-
const { eventName, phase } = this.
|
|
24992
|
+
_parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
|
|
24993
|
+
const { eventName, phase } = this.parseLegacyAnimationEventName(name);
|
|
25038
24994
|
const ast = this._parseAction(expression, handlerSpan);
|
|
25039
|
-
targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.
|
|
24995
|
+
targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.LegacyAnimation, ast, sourceSpan, handlerSpan, keySpan));
|
|
25040
24996
|
if (eventName.length === 0) {
|
|
25041
24997
|
this._reportError(`Animation event name is missing in binding`, sourceSpan);
|
|
25042
24998
|
}
|
|
@@ -25060,30 +25016,24 @@ var BindingParser = class {
|
|
|
25060
25016
|
targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : ParsedEventType.Regular, ast, sourceSpan, handlerSpan, keySpan));
|
|
25061
25017
|
}
|
|
25062
25018
|
_parseAction(value, sourceSpan) {
|
|
25063
|
-
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
|
|
25064
25019
|
const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
|
|
25065
25020
|
try {
|
|
25066
|
-
const ast = this._exprParser.parseAction(value,
|
|
25021
|
+
const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset, this._interpolationConfig);
|
|
25067
25022
|
if (ast) {
|
|
25068
|
-
this.
|
|
25023
|
+
this.errors.push(...ast.errors);
|
|
25069
25024
|
}
|
|
25070
25025
|
if (!ast || ast.ast instanceof EmptyExpr$1) {
|
|
25071
25026
|
this._reportError(`Empty expressions are not allowed`, sourceSpan);
|
|
25072
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
25027
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
25073
25028
|
}
|
|
25074
25029
|
return ast;
|
|
25075
25030
|
} catch (e) {
|
|
25076
25031
|
this._reportError(`${e}`, sourceSpan);
|
|
25077
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
25032
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
25078
25033
|
}
|
|
25079
25034
|
}
|
|
25080
|
-
_reportError(message, sourceSpan, level = ParseErrorLevel.ERROR
|
|
25081
|
-
this.errors.push(new ParseError(sourceSpan, message, level
|
|
25082
|
-
}
|
|
25083
|
-
_reportExpressionParserErrors(errors, sourceSpan) {
|
|
25084
|
-
for (const error of errors) {
|
|
25085
|
-
this._reportError(error.message, sourceSpan, void 0, error);
|
|
25086
|
-
}
|
|
25035
|
+
_reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
25036
|
+
this.errors.push(new ParseError(sourceSpan, message, level));
|
|
25087
25037
|
}
|
|
25088
25038
|
/**
|
|
25089
25039
|
* @param propName the name of the property / attribute
|
|
@@ -25116,10 +25066,10 @@ var BindingParser = class {
|
|
|
25116
25066
|
return false;
|
|
25117
25067
|
}
|
|
25118
25068
|
};
|
|
25119
|
-
function
|
|
25069
|
+
function isLegacyAnimationLabel(name) {
|
|
25120
25070
|
return name[0] == "@";
|
|
25121
25071
|
}
|
|
25122
|
-
__name(
|
|
25072
|
+
__name(isLegacyAnimationLabel, "isLegacyAnimationLabel");
|
|
25123
25073
|
function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
|
|
25124
25074
|
let ctxs;
|
|
25125
25075
|
const nameToContext = /* @__PURE__ */ __name((elName) => registry.securityContext(elName, propName, isAttribute), "nameToContext");
|
|
@@ -26131,16 +26081,16 @@ var HtmlAstToIvyAst = class {
|
|
|
26131
26081
|
if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
|
|
26132
26082
|
const selector = preparsedElement.selectAttr;
|
|
26133
26083
|
const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
|
|
26134
|
-
parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26084
|
+
parsedElement = new Content(selector, attrs, children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26135
26085
|
this.ngContentSelectors.push(selector);
|
|
26136
26086
|
} else if (isTemplateElement) {
|
|
26137
26087
|
const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
|
|
26138
26088
|
parsedElement = new Template(element2.name, attributes, attrs.bound, boundEvents, directives, [
|
|
26139
26089
|
/* no template attributes */
|
|
26140
|
-
], children, references, variables, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26090
|
+
], children, references, variables, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26141
26091
|
} else {
|
|
26142
26092
|
const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
|
|
26143
|
-
parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26093
|
+
parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
26144
26094
|
}
|
|
26145
26095
|
if (elementHasInlineTemplate) {
|
|
26146
26096
|
parsedElement = this.wrapInTemplate(parsedElement, templateParsedProperties, templateVariables, i18nAttrsMeta, isTemplateElement, isI18nRootElement);
|
|
@@ -26216,7 +26166,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26216
26166
|
children = visitAll(this, component.children, component.children);
|
|
26217
26167
|
}
|
|
26218
26168
|
const attrs = this.categorizePropertyAttributes(component.tagName, parsedProperties, i18nAttrsMeta);
|
|
26219
|
-
let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
|
|
26169
|
+
let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.isSelfClosing, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
|
|
26220
26170
|
if (elementHasInlineTemplate) {
|
|
26221
26171
|
node = this.wrapInTemplate(node, templateParsedProperties, templateVariables, i18nAttrsMeta, false, isI18nRootElement);
|
|
26222
26172
|
}
|
|
@@ -26545,7 +26495,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26545
26495
|
// Do not copy over the directives.
|
|
26546
26496
|
], templateAttrs, [node], [
|
|
26547
26497
|
// Do not copy over the references.
|
|
26548
|
-
], templateVariables, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
|
|
26498
|
+
], templateVariables, false, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
|
|
26549
26499
|
}
|
|
26550
26500
|
_visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n2) {
|
|
26551
26501
|
const valueNoNgsp = replaceNgsp(value);
|
|
@@ -26626,9 +26576,11 @@ var NonBindableVisitor = class {
|
|
|
26626
26576
|
children,
|
|
26627
26577
|
/* references */
|
|
26628
26578
|
[],
|
|
26579
|
+
ast.isSelfClosing,
|
|
26629
26580
|
ast.sourceSpan,
|
|
26630
26581
|
ast.startSourceSpan,
|
|
26631
|
-
ast.endSourceSpan
|
|
26582
|
+
ast.endSourceSpan,
|
|
26583
|
+
ast.isVoid
|
|
26632
26584
|
);
|
|
26633
26585
|
}
|
|
26634
26586
|
visitComment(comment) {
|
|
@@ -26678,9 +26630,11 @@ var NonBindableVisitor = class {
|
|
|
26678
26630
|
children,
|
|
26679
26631
|
/* references */
|
|
26680
26632
|
[],
|
|
26633
|
+
ast.isSelfClosing,
|
|
26681
26634
|
ast.sourceSpan,
|
|
26682
26635
|
ast.startSourceSpan,
|
|
26683
|
-
ast.endSourceSpan
|
|
26636
|
+
ast.endSourceSpan,
|
|
26637
|
+
false
|
|
26684
26638
|
);
|
|
26685
26639
|
}
|
|
26686
26640
|
visitDirective(directive, context) {
|
|
@@ -26707,7 +26661,8 @@ __name(textContents, "textContents");
|
|
|
26707
26661
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
26708
26662
|
function parseTemplate(template2, templateUrl, options = {}) {
|
|
26709
26663
|
const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
|
|
26710
|
-
const
|
|
26664
|
+
const selectorlessEnabled = options.enableSelectorless ?? false;
|
|
26665
|
+
const bindingParser = makeBindingParser(interpolationConfig, selectorlessEnabled);
|
|
26711
26666
|
const htmlParser = new HtmlParser();
|
|
26712
26667
|
const parseResult = htmlParser.parse(template2, templateUrl, {
|
|
26713
26668
|
leadingTriviaChars: LEADING_TRIVIA_CHARS,
|
|
@@ -26715,7 +26670,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26715
26670
|
tokenizeExpansionForms: true,
|
|
26716
26671
|
tokenizeBlocks: options.enableBlockSyntax ?? true,
|
|
26717
26672
|
tokenizeLet: options.enableLetSyntax ?? true,
|
|
26718
|
-
selectorlessEnabled
|
|
26673
|
+
selectorlessEnabled
|
|
26719
26674
|
});
|
|
26720
26675
|
if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
|
|
26721
26676
|
const parsedTemplate2 = {
|
|
@@ -26803,8 +26758,8 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26803
26758
|
}
|
|
26804
26759
|
__name(parseTemplate, "parseTemplate");
|
|
26805
26760
|
var elementRegistry = new DomElementSchemaRegistry();
|
|
26806
|
-
function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
26807
|
-
return new BindingParser(new Parser2(new Lexer()), interpolationConfig, elementRegistry, []);
|
|
26761
|
+
function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, selectorlessEnabled = false) {
|
|
26762
|
+
return new BindingParser(new Parser2(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
|
|
26808
26763
|
}
|
|
26809
26764
|
__name(makeBindingParser, "makeBindingParser");
|
|
26810
26765
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
@@ -26900,7 +26855,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
26900
26855
|
constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
|
|
26901
26856
|
allDeferrableDepsFn = variable(fnName);
|
|
26902
26857
|
}
|
|
26903
|
-
const
|
|
26858
|
+
const compilationMode = meta.isStandalone && !meta.hasDirectiveDependencies ? TemplateCompilationMode.DomOnly : TemplateCompilationMode.Full;
|
|
26859
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
|
|
26904
26860
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
26905
26861
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
26906
26862
|
if (tpl.contentSelectors !== null) {
|
|
@@ -27232,6 +27188,127 @@ function compileDeferResolverFunction(meta) {
|
|
|
27232
27188
|
return arrowFn([], literalArr(depExpressions));
|
|
27233
27189
|
}
|
|
27234
27190
|
__name(compileDeferResolverFunction, "compileDeferResolverFunction");
|
|
27191
|
+
var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
27192
|
+
static {
|
|
27193
|
+
__name(this, "CombinedRecursiveAstVisitor");
|
|
27194
|
+
}
|
|
27195
|
+
visit(node) {
|
|
27196
|
+
if (node instanceof ASTWithSource) {
|
|
27197
|
+
this.visit(node.ast);
|
|
27198
|
+
} else {
|
|
27199
|
+
node.visit(this);
|
|
27200
|
+
}
|
|
27201
|
+
}
|
|
27202
|
+
visitElement(element2) {
|
|
27203
|
+
this.visitAllTemplateNodes(element2.attributes);
|
|
27204
|
+
this.visitAllTemplateNodes(element2.inputs);
|
|
27205
|
+
this.visitAllTemplateNodes(element2.outputs);
|
|
27206
|
+
this.visitAllTemplateNodes(element2.directives);
|
|
27207
|
+
this.visitAllTemplateNodes(element2.references);
|
|
27208
|
+
this.visitAllTemplateNodes(element2.children);
|
|
27209
|
+
}
|
|
27210
|
+
visitTemplate(template2) {
|
|
27211
|
+
this.visitAllTemplateNodes(template2.attributes);
|
|
27212
|
+
this.visitAllTemplateNodes(template2.inputs);
|
|
27213
|
+
this.visitAllTemplateNodes(template2.outputs);
|
|
27214
|
+
this.visitAllTemplateNodes(template2.directives);
|
|
27215
|
+
this.visitAllTemplateNodes(template2.templateAttrs);
|
|
27216
|
+
this.visitAllTemplateNodes(template2.variables);
|
|
27217
|
+
this.visitAllTemplateNodes(template2.references);
|
|
27218
|
+
this.visitAllTemplateNodes(template2.children);
|
|
27219
|
+
}
|
|
27220
|
+
visitContent(content) {
|
|
27221
|
+
this.visitAllTemplateNodes(content.children);
|
|
27222
|
+
}
|
|
27223
|
+
visitBoundAttribute(attribute2) {
|
|
27224
|
+
this.visit(attribute2.value);
|
|
27225
|
+
}
|
|
27226
|
+
visitBoundEvent(attribute2) {
|
|
27227
|
+
this.visit(attribute2.handler);
|
|
27228
|
+
}
|
|
27229
|
+
visitBoundText(text2) {
|
|
27230
|
+
this.visit(text2.value);
|
|
27231
|
+
}
|
|
27232
|
+
visitIcu(icu) {
|
|
27233
|
+
Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
|
|
27234
|
+
Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
|
|
27235
|
+
}
|
|
27236
|
+
visitDeferredBlock(deferred) {
|
|
27237
|
+
deferred.visitAll(this);
|
|
27238
|
+
}
|
|
27239
|
+
visitDeferredTrigger(trigger) {
|
|
27240
|
+
if (trigger instanceof BoundDeferredTrigger) {
|
|
27241
|
+
this.visit(trigger.value);
|
|
27242
|
+
}
|
|
27243
|
+
}
|
|
27244
|
+
visitDeferredBlockPlaceholder(block) {
|
|
27245
|
+
this.visitAllTemplateNodes(block.children);
|
|
27246
|
+
}
|
|
27247
|
+
visitDeferredBlockError(block) {
|
|
27248
|
+
this.visitAllTemplateNodes(block.children);
|
|
27249
|
+
}
|
|
27250
|
+
visitDeferredBlockLoading(block) {
|
|
27251
|
+
this.visitAllTemplateNodes(block.children);
|
|
27252
|
+
}
|
|
27253
|
+
visitSwitchBlock(block) {
|
|
27254
|
+
this.visit(block.expression);
|
|
27255
|
+
this.visitAllTemplateNodes(block.cases);
|
|
27256
|
+
}
|
|
27257
|
+
visitSwitchBlockCase(block) {
|
|
27258
|
+
block.expression && this.visit(block.expression);
|
|
27259
|
+
this.visitAllTemplateNodes(block.children);
|
|
27260
|
+
}
|
|
27261
|
+
visitForLoopBlock(block) {
|
|
27262
|
+
block.item.visit(this);
|
|
27263
|
+
this.visitAllTemplateNodes(block.contextVariables);
|
|
27264
|
+
this.visit(block.expression);
|
|
27265
|
+
this.visitAllTemplateNodes(block.children);
|
|
27266
|
+
block.empty?.visit(this);
|
|
27267
|
+
}
|
|
27268
|
+
visitForLoopBlockEmpty(block) {
|
|
27269
|
+
this.visitAllTemplateNodes(block.children);
|
|
27270
|
+
}
|
|
27271
|
+
visitIfBlock(block) {
|
|
27272
|
+
this.visitAllTemplateNodes(block.branches);
|
|
27273
|
+
}
|
|
27274
|
+
visitIfBlockBranch(block) {
|
|
27275
|
+
block.expression && this.visit(block.expression);
|
|
27276
|
+
block.expressionAlias?.visit(this);
|
|
27277
|
+
this.visitAllTemplateNodes(block.children);
|
|
27278
|
+
}
|
|
27279
|
+
visitLetDeclaration(decl) {
|
|
27280
|
+
this.visit(decl.value);
|
|
27281
|
+
}
|
|
27282
|
+
visitComponent(component) {
|
|
27283
|
+
this.visitAllTemplateNodes(component.attributes);
|
|
27284
|
+
this.visitAllTemplateNodes(component.inputs);
|
|
27285
|
+
this.visitAllTemplateNodes(component.outputs);
|
|
27286
|
+
this.visitAllTemplateNodes(component.directives);
|
|
27287
|
+
this.visitAllTemplateNodes(component.references);
|
|
27288
|
+
this.visitAllTemplateNodes(component.children);
|
|
27289
|
+
}
|
|
27290
|
+
visitDirective(directive) {
|
|
27291
|
+
this.visitAllTemplateNodes(directive.attributes);
|
|
27292
|
+
this.visitAllTemplateNodes(directive.inputs);
|
|
27293
|
+
this.visitAllTemplateNodes(directive.outputs);
|
|
27294
|
+
this.visitAllTemplateNodes(directive.references);
|
|
27295
|
+
}
|
|
27296
|
+
visitVariable(variable2) {
|
|
27297
|
+
}
|
|
27298
|
+
visitReference(reference2) {
|
|
27299
|
+
}
|
|
27300
|
+
visitTextAttribute(attribute2) {
|
|
27301
|
+
}
|
|
27302
|
+
visitText(text2) {
|
|
27303
|
+
}
|
|
27304
|
+
visitUnknownBlock(block) {
|
|
27305
|
+
}
|
|
27306
|
+
visitAllTemplateNodes(nodes) {
|
|
27307
|
+
for (const node of nodes) {
|
|
27308
|
+
this.visit(node);
|
|
27309
|
+
}
|
|
27310
|
+
}
|
|
27311
|
+
};
|
|
27235
27312
|
function diff(fullList, itemsToExclude) {
|
|
27236
27313
|
const exclude = new Set(itemsToExclude);
|
|
27237
27314
|
return fullList.filter((item) => !exclude.has(item));
|
|
@@ -27309,9 +27386,7 @@ var R3TargetBinder = class {
|
|
|
27309
27386
|
if (target.template) {
|
|
27310
27387
|
const scope = Scope2.apply(target.template);
|
|
27311
27388
|
extractScopedNodeEntities(scope, scopedNodeEntities);
|
|
27312
|
-
|
|
27313
|
-
DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
|
|
27314
|
-
}
|
|
27389
|
+
DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
|
|
27315
27390
|
TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
27316
27391
|
}
|
|
27317
27392
|
if (target.host) {
|
|
@@ -27615,6 +27690,12 @@ var DirectiveBinder = class _DirectiveBinder {
|
|
|
27615
27690
|
const cssSelector = createCssSelectorFromNode(node);
|
|
27616
27691
|
this.directiveMatcher.match(cssSelector, (_, results) => directives.push(...results));
|
|
27617
27692
|
this.trackSelectorBasedBindingsAndDirectives(node, directives);
|
|
27693
|
+
} else {
|
|
27694
|
+
node.references.forEach((ref) => {
|
|
27695
|
+
if (ref.value.trim() === "") {
|
|
27696
|
+
this.references.set(ref, node);
|
|
27697
|
+
}
|
|
27698
|
+
});
|
|
27618
27699
|
}
|
|
27619
27700
|
node.directives.forEach((directive) => directive.visit(this));
|
|
27620
27701
|
node.children.forEach((child) => child.visit(this));
|
|
@@ -27700,7 +27781,7 @@ var DirectiveBinder = class _DirectiveBinder {
|
|
|
27700
27781
|
visitLetDeclaration(decl) {
|
|
27701
27782
|
}
|
|
27702
27783
|
};
|
|
27703
|
-
var TemplateBinder = class _TemplateBinder extends
|
|
27784
|
+
var TemplateBinder = class _TemplateBinder extends CombinedRecursiveAstVisitor {
|
|
27704
27785
|
static {
|
|
27705
27786
|
__name(this, "TemplateBinder");
|
|
27706
27787
|
}
|
|
@@ -27713,7 +27794,7 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27713
27794
|
scope;
|
|
27714
27795
|
rootNode;
|
|
27715
27796
|
level;
|
|
27716
|
-
visitNode;
|
|
27797
|
+
visitNode = /* @__PURE__ */ __name((node) => node.visit(this), "visitNode");
|
|
27717
27798
|
constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
|
|
27718
27799
|
super();
|
|
27719
27800
|
this.bindings = bindings;
|
|
@@ -27725,17 +27806,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27725
27806
|
this.scope = scope;
|
|
27726
27807
|
this.rootNode = rootNode;
|
|
27727
27808
|
this.level = level;
|
|
27728
|
-
this.visitNode = (node) => node.visit(this);
|
|
27729
|
-
}
|
|
27730
|
-
// This method is defined to reconcile the type of TemplateBinder since both
|
|
27731
|
-
// RecursiveAstVisitor and Visitor define the visit() method in their
|
|
27732
|
-
// interfaces.
|
|
27733
|
-
visit(node, context) {
|
|
27734
|
-
if (node instanceof AST) {
|
|
27735
|
-
node.visit(this, context);
|
|
27736
|
-
} else {
|
|
27737
|
-
node.visit(this);
|
|
27738
|
-
}
|
|
27739
27809
|
}
|
|
27740
27810
|
/**
|
|
27741
27811
|
* Process a template and extract metadata about expressions and symbols within.
|
|
@@ -27787,13 +27857,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27787
27857
|
nodeOrNodes.forEach(this.visitNode);
|
|
27788
27858
|
}
|
|
27789
27859
|
}
|
|
27790
|
-
visitElement(element2) {
|
|
27791
|
-
element2.inputs.forEach(this.visitNode);
|
|
27792
|
-
element2.outputs.forEach(this.visitNode);
|
|
27793
|
-
element2.directives.forEach(this.visitNode);
|
|
27794
|
-
element2.children.forEach(this.visitNode);
|
|
27795
|
-
element2.references.forEach(this.visitNode);
|
|
27796
|
-
}
|
|
27797
27860
|
visitTemplate(template2) {
|
|
27798
27861
|
template2.inputs.forEach(this.visitNode);
|
|
27799
27862
|
template2.outputs.forEach(this.visitNode);
|
|
@@ -27812,38 +27875,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27812
27875
|
this.symbols.set(reference2, this.rootNode);
|
|
27813
27876
|
}
|
|
27814
27877
|
}
|
|
27815
|
-
visitComponent(component) {
|
|
27816
|
-
component.inputs.forEach(this.visitNode);
|
|
27817
|
-
component.outputs.forEach(this.visitNode);
|
|
27818
|
-
component.directives.forEach(this.visitNode);
|
|
27819
|
-
component.children.forEach(this.visitNode);
|
|
27820
|
-
component.references.forEach(this.visitNode);
|
|
27821
|
-
}
|
|
27822
|
-
visitDirective(directive) {
|
|
27823
|
-
directive.inputs.forEach(this.visitNode);
|
|
27824
|
-
directive.outputs.forEach(this.visitNode);
|
|
27825
|
-
directive.references.forEach(this.visitNode);
|
|
27826
|
-
}
|
|
27827
|
-
// Unused template visitors
|
|
27828
|
-
visitText(text2) {
|
|
27829
|
-
}
|
|
27830
|
-
visitTextAttribute(attribute2) {
|
|
27831
|
-
}
|
|
27832
|
-
visitUnknownBlock(block) {
|
|
27833
|
-
}
|
|
27834
|
-
visitDeferredTrigger() {
|
|
27835
|
-
}
|
|
27836
|
-
visitIcu(icu) {
|
|
27837
|
-
Object.keys(icu.vars).forEach((key) => icu.vars[key].visit(this));
|
|
27838
|
-
Object.keys(icu.placeholders).forEach((key) => icu.placeholders[key].visit(this));
|
|
27839
|
-
}
|
|
27840
|
-
// The remaining visitors are concerned with processing AST expressions within template bindings
|
|
27841
|
-
visitBoundAttribute(attribute2) {
|
|
27842
|
-
attribute2.value.visit(this);
|
|
27843
|
-
}
|
|
27844
|
-
visitBoundEvent(event) {
|
|
27845
|
-
event.handler.visit(this);
|
|
27846
|
-
}
|
|
27847
27878
|
visitDeferredBlock(deferred) {
|
|
27848
27879
|
this.ingestScopedNode(deferred);
|
|
27849
27880
|
deferred.triggers.when?.value.visit(this);
|
|
@@ -27863,10 +27894,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27863
27894
|
visitDeferredBlockLoading(block) {
|
|
27864
27895
|
this.ingestScopedNode(block);
|
|
27865
27896
|
}
|
|
27866
|
-
visitSwitchBlock(block) {
|
|
27867
|
-
block.expression.visit(this);
|
|
27868
|
-
block.cases.forEach(this.visitNode);
|
|
27869
|
-
}
|
|
27870
27897
|
visitSwitchBlockCase(block) {
|
|
27871
27898
|
block.expression?.visit(this);
|
|
27872
27899
|
this.ingestScopedNode(block);
|
|
@@ -27879,9 +27906,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27879
27906
|
visitForLoopBlockEmpty(block) {
|
|
27880
27907
|
this.ingestScopedNode(block);
|
|
27881
27908
|
}
|
|
27882
|
-
visitIfBlock(block) {
|
|
27883
|
-
block.branches.forEach((node) => node.visit(this));
|
|
27884
|
-
}
|
|
27885
27909
|
visitIfBlockBranch(block) {
|
|
27886
27910
|
block.expression?.visit(this);
|
|
27887
27911
|
this.ingestScopedNode(block);
|
|
@@ -27889,11 +27913,8 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27889
27913
|
visitContent(content) {
|
|
27890
27914
|
this.ingestScopedNode(content);
|
|
27891
27915
|
}
|
|
27892
|
-
visitBoundText(text2) {
|
|
27893
|
-
text2.value.visit(this);
|
|
27894
|
-
}
|
|
27895
27916
|
visitLetDeclaration(decl) {
|
|
27896
|
-
|
|
27917
|
+
super.visitLetDeclaration(decl);
|
|
27897
27918
|
if (this.rootNode !== null) {
|
|
27898
27919
|
this.symbols.set(decl, this.rootNode);
|
|
27899
27920
|
}
|
|
@@ -27915,10 +27936,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27915
27936
|
this.maybeMap(ast, ast.name);
|
|
27916
27937
|
return super.visitSafePropertyRead(ast, context);
|
|
27917
27938
|
}
|
|
27918
|
-
visitPropertyWrite(ast, context) {
|
|
27919
|
-
this.maybeMap(ast, ast.name);
|
|
27920
|
-
return super.visitPropertyWrite(ast, context);
|
|
27921
|
-
}
|
|
27922
27939
|
ingestScopedNode(node) {
|
|
27923
27940
|
const childScope = this.scope.getChildScope(node);
|
|
27924
27941
|
const binder = new _TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);
|
|
@@ -28504,6 +28521,7 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
28504
28521
|
decl.directives && declarations.push(...decl.directives.map((dir) => convertDirectiveDeclarationToMetadata(dir)));
|
|
28505
28522
|
decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
|
|
28506
28523
|
}
|
|
28524
|
+
const hasDirectiveDependencies = declarations.some(({ kind }) => kind === R3TemplateDependencyKind.Directive || kind === R3TemplateDependencyKind.NgModule);
|
|
28507
28525
|
return {
|
|
28508
28526
|
...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),
|
|
28509
28527
|
template: template2,
|
|
@@ -28518,7 +28536,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
28518
28536
|
declarationListEmitMode: 2,
|
|
28519
28537
|
relativeContextFilePath: "",
|
|
28520
28538
|
i18nUseExternalIds: true,
|
|
28521
|
-
relativeTemplatePath: null
|
|
28539
|
+
relativeTemplatePath: null,
|
|
28540
|
+
hasDirectiveDependencies
|
|
28522
28541
|
};
|
|
28523
28542
|
}
|
|
28524
28543
|
__name(convertDeclareComponentFacadeToMetadata, "convertDeclareComponentFacadeToMetadata");
|
|
@@ -28881,7 +28900,7 @@ var _Visitor3 = class {
|
|
|
28881
28900
|
merge(nodes, translations, interpolationConfig) {
|
|
28882
28901
|
this._init(_VisitorMode.Merge, interpolationConfig);
|
|
28883
28902
|
this._translations = translations;
|
|
28884
|
-
const wrapper = new Element2("wrapper", [], [], nodes, void 0, void 0, void 0);
|
|
28903
|
+
const wrapper = new Element2("wrapper", [], [], nodes, false, void 0, void 0, void 0, false);
|
|
28885
28904
|
const translatedNode = wrapper.visit(this, null);
|
|
28886
28905
|
if (this._inI18nBlock) {
|
|
28887
28906
|
this._reportError(nodes[nodes.length - 1], "Unclosed block");
|
|
@@ -29048,9 +29067,9 @@ var _Visitor3 = class {
|
|
|
29048
29067
|
this._inImplicitNode = wasInImplicitNode;
|
|
29049
29068
|
if (this._mode === _VisitorMode.Merge) {
|
|
29050
29069
|
if (node instanceof Element2) {
|
|
29051
|
-
return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
29070
|
+
return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.isVoid);
|
|
29052
29071
|
} else {
|
|
29053
|
-
return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
29072
|
+
return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
29054
29073
|
}
|
|
29055
29074
|
}
|
|
29056
29075
|
return null;
|
|
@@ -29250,7 +29269,7 @@ var _Visitor3 = class {
|
|
|
29250
29269
|
this._msgCountAtSectionStart = void 0;
|
|
29251
29270
|
}
|
|
29252
29271
|
_reportError(node, msg) {
|
|
29253
|
-
this._errors.push(new
|
|
29272
|
+
this._errors.push(new ParseError(node.sourceSpan, msg));
|
|
29254
29273
|
}
|
|
29255
29274
|
};
|
|
29256
29275
|
function _isOpeningComment(n) {
|
|
@@ -29552,7 +29571,7 @@ var XliffParser = class {
|
|
|
29552
29571
|
visitDirective(directive, context) {
|
|
29553
29572
|
}
|
|
29554
29573
|
_addError(node, message) {
|
|
29555
|
-
this._errors.push(new
|
|
29574
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29556
29575
|
}
|
|
29557
29576
|
};
|
|
29558
29577
|
var XmlToI18n$2 = class XmlToI18n {
|
|
@@ -29618,7 +29637,7 @@ var XmlToI18n$2 = class XmlToI18n {
|
|
|
29618
29637
|
this._addError(directive, "Unexpected node");
|
|
29619
29638
|
}
|
|
29620
29639
|
_addError(node, message) {
|
|
29621
|
-
this._errors.push(new
|
|
29640
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29622
29641
|
}
|
|
29623
29642
|
};
|
|
29624
29643
|
function getCtypeForTag(tag) {
|
|
@@ -29886,7 +29905,7 @@ var Xliff2Parser = class {
|
|
|
29886
29905
|
visitDirective(directive, context) {
|
|
29887
29906
|
}
|
|
29888
29907
|
_addError(node, message) {
|
|
29889
|
-
this._errors.push(new
|
|
29908
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29890
29909
|
}
|
|
29891
29910
|
};
|
|
29892
29911
|
var XmlToI18n$1 = class XmlToI18n2 {
|
|
@@ -29967,7 +29986,7 @@ var XmlToI18n$1 = class XmlToI18n2 {
|
|
|
29967
29986
|
this._addError(directive, "Unexpected node");
|
|
29968
29987
|
}
|
|
29969
29988
|
_addError(node, message) {
|
|
29970
|
-
this._errors.push(new
|
|
29989
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29971
29990
|
}
|
|
29972
29991
|
};
|
|
29973
29992
|
function getTypeForTag(tag) {
|
|
@@ -30119,7 +30138,7 @@ var XtbParser = class {
|
|
|
30119
30138
|
this._addError(directive, "Unexpected node");
|
|
30120
30139
|
}
|
|
30121
30140
|
_addError(node, message) {
|
|
30122
|
-
this._errors.push(new
|
|
30141
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
30123
30142
|
}
|
|
30124
30143
|
};
|
|
30125
30144
|
var XmlToI18n3 = class {
|
|
@@ -30182,7 +30201,7 @@ var XmlToI18n3 = class {
|
|
|
30182
30201
|
this._addError(directive, "Unexpected node");
|
|
30183
30202
|
}
|
|
30184
30203
|
_addError(node, message) {
|
|
30185
|
-
this._errors.push(new
|
|
30204
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
30186
30205
|
}
|
|
30187
30206
|
};
|
|
30188
30207
|
var TranslationBundle = class _TranslationBundle {
|
|
@@ -30330,7 +30349,7 @@ var I18nToHtmlVisitor = class {
|
|
|
30330
30349
|
return text2;
|
|
30331
30350
|
}
|
|
30332
30351
|
_addError(el, msg) {
|
|
30333
|
-
this._errors.push(new
|
|
30352
|
+
this._errors.push(new ParseError(el.sourceSpan, msg));
|
|
30334
30353
|
}
|
|
30335
30354
|
};
|
|
30336
30355
|
var I18NHtmlParser = class {
|
|
@@ -30523,7 +30542,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
30523
30542
|
function compileDeclareClassMetadata(metadata) {
|
|
30524
30543
|
const definitionMap = new DefinitionMap();
|
|
30525
30544
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
30526
|
-
definitionMap.set("version", literal("20.
|
|
30545
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
30527
30546
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30528
30547
|
definitionMap.set("type", metadata.type);
|
|
30529
30548
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30542,7 +30561,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
30542
30561
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
30543
30562
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
30544
30563
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
30545
|
-
definitionMap.set("version", literal("20.
|
|
30564
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
30546
30565
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30547
30566
|
definitionMap.set("type", metadata.type);
|
|
30548
30567
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -30611,7 +30630,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30611
30630
|
const definitionMap = new DefinitionMap();
|
|
30612
30631
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30613
30632
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30614
|
-
definitionMap.set("version", literal("20.
|
|
30633
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
30615
30634
|
definitionMap.set("type", meta.type.value);
|
|
30616
30635
|
if (meta.isStandalone !== void 0) {
|
|
30617
30636
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30938,7 +30957,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
30938
30957
|
function compileDeclareFactoryFunction(meta) {
|
|
30939
30958
|
const definitionMap = new DefinitionMap();
|
|
30940
30959
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
30941
|
-
definitionMap.set("version", literal("20.
|
|
30960
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
30942
30961
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30943
30962
|
definitionMap.set("type", meta.type.value);
|
|
30944
30963
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30961,7 +30980,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
30961
30980
|
function createInjectableDefinitionMap(meta) {
|
|
30962
30981
|
const definitionMap = new DefinitionMap();
|
|
30963
30982
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
30964
|
-
definitionMap.set("version", literal("20.
|
|
30983
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
30965
30984
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30966
30985
|
definitionMap.set("type", meta.type.value);
|
|
30967
30986
|
if (meta.providedIn !== void 0) {
|
|
@@ -30999,7 +31018,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
30999
31018
|
function createInjectorDefinitionMap(meta) {
|
|
31000
31019
|
const definitionMap = new DefinitionMap();
|
|
31001
31020
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31002
|
-
definitionMap.set("version", literal("20.
|
|
31021
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
31003
31022
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31004
31023
|
definitionMap.set("type", meta.type.value);
|
|
31005
31024
|
definitionMap.set("providers", meta.providers);
|
|
@@ -31023,7 +31042,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31023
31042
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
31024
31043
|
}
|
|
31025
31044
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31026
|
-
definitionMap.set("version", literal("20.
|
|
31045
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
31027
31046
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31028
31047
|
definitionMap.set("type", meta.type.value);
|
|
31029
31048
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31058,13 +31077,13 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31058
31077
|
function createPipeDefinitionMap(meta) {
|
|
31059
31078
|
const definitionMap = new DefinitionMap();
|
|
31060
31079
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31061
|
-
definitionMap.set("version", literal("20.
|
|
31080
|
+
definitionMap.set("version", literal("20.1.2"));
|
|
31062
31081
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31063
31082
|
definitionMap.set("type", meta.type.value);
|
|
31064
31083
|
if (meta.isStandalone !== void 0) {
|
|
31065
31084
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
31066
31085
|
}
|
|
31067
|
-
definitionMap.set("name", literal(meta.pipeName));
|
|
31086
|
+
definitionMap.set("name", literal(meta.pipeName ?? meta.name));
|
|
31068
31087
|
if (meta.pure === false) {
|
|
31069
31088
|
definitionMap.set("pure", literal(meta.pure));
|
|
31070
31089
|
}
|
|
@@ -31155,7 +31174,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31155
31174
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31156
31175
|
}
|
|
31157
31176
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31158
|
-
var VERSION = new Version("20.
|
|
31177
|
+
var VERSION = new Version("20.1.2");
|
|
31159
31178
|
publishFacade(_global);
|
|
31160
31179
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31161
31180
|
0 && (module.exports = {
|
|
@@ -31170,6 +31189,7 @@ publishFacade(_global);
|
|
|
31170
31189
|
BinaryOperator,
|
|
31171
31190
|
BinaryOperatorExpr,
|
|
31172
31191
|
BindingPipe,
|
|
31192
|
+
BindingPipeType,
|
|
31173
31193
|
BindingType,
|
|
31174
31194
|
Block,
|
|
31175
31195
|
BlockParameter,
|
|
@@ -31180,6 +31200,7 @@ publishFacade(_global);
|
|
|
31180
31200
|
Call,
|
|
31181
31201
|
Chain,
|
|
31182
31202
|
ChangeDetectionStrategy,
|
|
31203
|
+
CombinedRecursiveAstVisitor,
|
|
31183
31204
|
CommaExpr,
|
|
31184
31205
|
Comment,
|
|
31185
31206
|
CompilerConfig,
|
|
@@ -31223,7 +31244,6 @@ publishFacade(_global);
|
|
|
31223
31244
|
JSDocComment,
|
|
31224
31245
|
JitEvaluator,
|
|
31225
31246
|
KeyedRead,
|
|
31226
|
-
KeyedWrite,
|
|
31227
31247
|
LeadingComment,
|
|
31228
31248
|
LetDeclaration,
|
|
31229
31249
|
Lexer,
|
|
@@ -31256,10 +31276,8 @@ publishFacade(_global);
|
|
|
31256
31276
|
ParsedPropertyType,
|
|
31257
31277
|
ParsedVariable,
|
|
31258
31278
|
Parser,
|
|
31259
|
-
ParserError,
|
|
31260
31279
|
PrefixNot,
|
|
31261
31280
|
PropertyRead,
|
|
31262
|
-
PropertyWrite,
|
|
31263
31281
|
R3Identifiers,
|
|
31264
31282
|
R3NgModuleMetadataKind,
|
|
31265
31283
|
R3SelectorScopeMode,
|
|
@@ -31352,9 +31370,6 @@ publishFacade(_global);
|
|
|
31352
31370
|
VoidExpr,
|
|
31353
31371
|
VoidExpression,
|
|
31354
31372
|
WrappedNodeExpr,
|
|
31355
|
-
WriteKeyExpr,
|
|
31356
|
-
WritePropExpr,
|
|
31357
|
-
WriteVarExpr,
|
|
31358
31373
|
Xliff,
|
|
31359
31374
|
Xliff2,
|
|
31360
31375
|
Xmb,
|
|
@@ -31423,7 +31438,7 @@ publishFacade(_global);
|
|
|
31423
31438
|
|
|
31424
31439
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
31425
31440
|
(**
|
|
31426
|
-
* @license Angular v20.
|
|
31441
|
+
* @license Angular v20.1.2
|
|
31427
31442
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
31428
31443
|
* License: MIT
|
|
31429
31444
|
*)
|