@angular-eslint/bundled-angular-compiler 20.1.2-alpha.2 → 20.1.2-alpha.21
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 +763 -729
- 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.4/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
|
-
|
|
17542
|
-
|
|
17440
|
+
parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17441
|
+
const errors = [];
|
|
17442
|
+
this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
|
|
17443
|
+
const { stripped: 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
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
|
|
17569
|
-
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
17570
|
-
const sourceToLex = this._stripComments(input);
|
|
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));
|
|
17465
|
+
}
|
|
17466
|
+
return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17467
|
+
}
|
|
17468
|
+
_parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
|
|
17469
|
+
this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
|
|
17470
|
+
const { stripped: 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,52 @@ 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
|
-
const sourceToLex = this._stripComments(expressionText);
|
|
17518
|
+
const { stripped: sourceToLex, hasComments } = this._stripComments(expressionText);
|
|
17625
17519
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17626
|
-
|
|
17520
|
+
if (hasComments && sourceToLex.trim().length === 0 && tokens.length === 0) {
|
|
17521
|
+
errors.push(getParseError("Interpolation expression cannot only contain a comment", input, `at column ${expressions[i].start} in`, parseSourceSpan));
|
|
17522
|
+
continue;
|
|
17523
|
+
}
|
|
17524
|
+
const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
|
|
17627
17525
|
expressionNodes.push(ast);
|
|
17628
17526
|
}
|
|
17629
|
-
return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input,
|
|
17527
|
+
return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17630
17528
|
}
|
|
17631
17529
|
/**
|
|
17632
17530
|
* Similar to `parseInterpolation`, but treats the provided string as a single expression
|
|
17633
17531
|
* element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
|
|
17634
17532
|
* This is used for parsing the switch expression in ICUs.
|
|
17635
17533
|
*/
|
|
17636
|
-
parseInterpolationExpression(expression,
|
|
17637
|
-
const sourceToLex = this._stripComments(expression);
|
|
17534
|
+
parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
|
|
17535
|
+
const { stripped: sourceToLex } = this._stripComments(expression);
|
|
17638
17536
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
17639
|
-
const
|
|
17537
|
+
const errors = [];
|
|
17538
|
+
const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
|
|
17640
17539
|
const strings = ["", ""];
|
|
17641
|
-
return this.createInterpolationAst(strings, [ast], expression,
|
|
17540
|
+
return this.createInterpolationAst(strings, [ast], expression, getLocation(parseSourceSpan), absoluteOffset, errors);
|
|
17642
17541
|
}
|
|
17643
|
-
createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
|
|
17542
|
+
createInterpolationAst(strings, expressions, input, location, absoluteOffset, errors) {
|
|
17644
17543
|
const span = new ParseSpan(0, input.length);
|
|
17645
17544
|
const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);
|
|
17646
|
-
return new ASTWithSource(interpolation, input, location, absoluteOffset,
|
|
17545
|
+
return new ASTWithSource(interpolation, input, location, absoluteOffset, errors);
|
|
17647
17546
|
}
|
|
17648
17547
|
/**
|
|
17649
17548
|
* Splits a string of text into "raw" text segments and expressions present in interpolations in
|
|
@@ -17652,7 +17551,7 @@ var Parser2 = class {
|
|
|
17652
17551
|
* `SplitInterpolation` with splits that look like
|
|
17653
17552
|
* <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
|
|
17654
17553
|
*/
|
|
17655
|
-
splitInterpolation(input,
|
|
17554
|
+
splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17656
17555
|
const strings = [];
|
|
17657
17556
|
const expressions = [];
|
|
17658
17557
|
const offsets = [];
|
|
@@ -17683,7 +17582,7 @@ var Parser2 = class {
|
|
|
17683
17582
|
const fullEnd = exprEnd + interpEnd.length;
|
|
17684
17583
|
const text2 = input.substring(exprStart, exprEnd);
|
|
17685
17584
|
if (text2.trim().length === 0) {
|
|
17686
|
-
|
|
17585
|
+
errors.push(getParseError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, parseSourceSpan));
|
|
17687
17586
|
}
|
|
17688
17587
|
expressions.push({ text: text2, start: fullStart, end: fullEnd });
|
|
17689
17588
|
const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;
|
|
@@ -17704,13 +17603,13 @@ var Parser2 = class {
|
|
|
17704
17603
|
}
|
|
17705
17604
|
return new SplitInterpolation(strings, expressions, offsets);
|
|
17706
17605
|
}
|
|
17707
|
-
wrapLiteralPrimitive(input,
|
|
17606
|
+
wrapLiteralPrimitive(input, sourceSpanOrLocation, absoluteOffset) {
|
|
17708
17607
|
const span = new ParseSpan(0, input == null ? 0 : input.length);
|
|
17709
|
-
return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input,
|
|
17608
|
+
return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, typeof sourceSpanOrLocation === "string" ? sourceSpanOrLocation : getLocation(sourceSpanOrLocation), absoluteOffset, []);
|
|
17710
17609
|
}
|
|
17711
17610
|
_stripComments(input) {
|
|
17712
17611
|
const i = this._commentStart(input);
|
|
17713
|
-
return i != null ? input.substring(0, i) : input;
|
|
17612
|
+
return i != null ? { stripped: input.substring(0, i), hasComments: true } : { stripped: input, hasComments: false };
|
|
17714
17613
|
}
|
|
17715
17614
|
_commentStart(input) {
|
|
17716
17615
|
let outerQuote = null;
|
|
@@ -17727,7 +17626,7 @@ var Parser2 = class {
|
|
|
17727
17626
|
}
|
|
17728
17627
|
return null;
|
|
17729
17628
|
}
|
|
17730
|
-
_checkNoInterpolation(input,
|
|
17629
|
+
_checkNoInterpolation(errors, input, parseSourceSpan, { start, end }) {
|
|
17731
17630
|
let startIndex = -1;
|
|
17732
17631
|
let endIndex = -1;
|
|
17733
17632
|
for (const charIndex of this._forEachUnquotedChar(input, 0)) {
|
|
@@ -17743,7 +17642,7 @@ var Parser2 = class {
|
|
|
17743
17642
|
}
|
|
17744
17643
|
}
|
|
17745
17644
|
if (startIndex > -1 && endIndex > -1) {
|
|
17746
|
-
|
|
17645
|
+
errors.push(getParseError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
|
|
17747
17646
|
}
|
|
17748
17647
|
}
|
|
17749
17648
|
/**
|
|
@@ -17790,12 +17689,13 @@ var _ParseAST = class {
|
|
|
17790
17689
|
__name(this, "_ParseAST");
|
|
17791
17690
|
}
|
|
17792
17691
|
input;
|
|
17793
|
-
|
|
17692
|
+
parseSourceSpan;
|
|
17794
17693
|
absoluteOffset;
|
|
17795
17694
|
tokens;
|
|
17796
17695
|
parseFlags;
|
|
17797
17696
|
errors;
|
|
17798
17697
|
offset;
|
|
17698
|
+
supportsDirectPipeReferences;
|
|
17799
17699
|
rparensExpected = 0;
|
|
17800
17700
|
rbracketsExpected = 0;
|
|
17801
17701
|
rbracesExpected = 0;
|
|
@@ -17806,14 +17706,15 @@ var _ParseAST = class {
|
|
|
17806
17706
|
// and may change for subsequent expressions visited by the parser.
|
|
17807
17707
|
sourceSpanCache = /* @__PURE__ */ new Map();
|
|
17808
17708
|
index = 0;
|
|
17809
|
-
constructor(input,
|
|
17709
|
+
constructor(input, parseSourceSpan, absoluteOffset, tokens, parseFlags, errors, offset, supportsDirectPipeReferences) {
|
|
17810
17710
|
this.input = input;
|
|
17811
|
-
this.
|
|
17711
|
+
this.parseSourceSpan = parseSourceSpan;
|
|
17812
17712
|
this.absoluteOffset = absoluteOffset;
|
|
17813
17713
|
this.tokens = tokens;
|
|
17814
17714
|
this.parseFlags = parseFlags;
|
|
17815
17715
|
this.errors = errors;
|
|
17816
17716
|
this.offset = offset;
|
|
17717
|
+
this.supportsDirectPipeReferences = supportsDirectPipeReferences;
|
|
17817
17718
|
}
|
|
17818
17719
|
peek(offset) {
|
|
17819
17720
|
const i = this.index + offset;
|
|
@@ -17925,6 +17826,9 @@ var _ParseAST = class {
|
|
|
17925
17826
|
return false;
|
|
17926
17827
|
}
|
|
17927
17828
|
}
|
|
17829
|
+
isAssignmentOperator(token) {
|
|
17830
|
+
return token.type === TokenType.Operator && Binary.isAssignmentOperation(token.strValue);
|
|
17831
|
+
}
|
|
17928
17832
|
expectOperator(operator) {
|
|
17929
17833
|
if (this.consumeOptionalOperator(operator))
|
|
17930
17834
|
return;
|
|
@@ -18011,7 +17915,14 @@ var _ParseAST = class {
|
|
|
18011
17915
|
while (this.consumeOptionalCharacter($COLON)) {
|
|
18012
17916
|
args.push(this.parseExpression());
|
|
18013
17917
|
}
|
|
18014
|
-
|
|
17918
|
+
let type;
|
|
17919
|
+
if (this.supportsDirectPipeReferences) {
|
|
17920
|
+
const charCode = nameId.charCodeAt(0);
|
|
17921
|
+
type = charCode === $_ || charCode >= $A && charCode <= $Z ? BindingPipeType.ReferencedDirectly : BindingPipeType.ReferencedByName;
|
|
17922
|
+
} else {
|
|
17923
|
+
type = BindingPipeType.ReferencedByName;
|
|
17924
|
+
}
|
|
17925
|
+
result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, type, nameSpan);
|
|
18015
17926
|
} while (this.consumeOptionalOperator("|"));
|
|
18016
17927
|
}
|
|
18017
17928
|
return result;
|
|
@@ -18324,27 +18235,30 @@ var _ParseAST = class {
|
|
|
18324
18235
|
return id2;
|
|
18325
18236
|
});
|
|
18326
18237
|
const nameSpan = this.sourceSpan(nameStart);
|
|
18327
|
-
let receiver;
|
|
18328
18238
|
if (isSafe) {
|
|
18329
|
-
if (this.
|
|
18239
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18240
|
+
this.advance();
|
|
18330
18241
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
18331
|
-
|
|
18242
|
+
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
18332
18243
|
} else {
|
|
18333
|
-
|
|
18244
|
+
return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18334
18245
|
}
|
|
18335
18246
|
} else {
|
|
18336
|
-
if (this.
|
|
18247
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18248
|
+
const operation = this.next.strValue;
|
|
18337
18249
|
if (!(this.parseFlags & 1)) {
|
|
18250
|
+
this.advance();
|
|
18338
18251
|
this.error("Bindings cannot contain assignments");
|
|
18339
18252
|
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
18340
18253
|
}
|
|
18254
|
+
const receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18255
|
+
this.advance();
|
|
18341
18256
|
const value = this.parseConditional();
|
|
18342
|
-
|
|
18257
|
+
return new Binary(this.span(start), this.sourceSpan(start), operation, receiver, value);
|
|
18343
18258
|
} else {
|
|
18344
|
-
|
|
18259
|
+
return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
18345
18260
|
}
|
|
18346
18261
|
}
|
|
18347
|
-
return receiver;
|
|
18348
18262
|
}
|
|
18349
18263
|
parseCall(receiver, start, isSafe) {
|
|
18350
18264
|
const argumentStart = this.inputIndex;
|
|
@@ -18437,12 +18351,16 @@ var _ParseAST = class {
|
|
|
18437
18351
|
}
|
|
18438
18352
|
this.rbracketsExpected--;
|
|
18439
18353
|
this.expectCharacter($RBRACKET);
|
|
18440
|
-
if (this.
|
|
18354
|
+
if (this.isAssignmentOperator(this.next)) {
|
|
18355
|
+
const operation = this.next.strValue;
|
|
18441
18356
|
if (isSafe) {
|
|
18357
|
+
this.advance();
|
|
18442
18358
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
18443
18359
|
} else {
|
|
18360
|
+
const binaryReceiver = new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
|
|
18361
|
+
this.advance();
|
|
18444
18362
|
const value = this.parseConditional();
|
|
18445
|
-
return new
|
|
18363
|
+
return new Binary(this.span(start), this.sourceSpan(start), operation, binaryReceiver, value);
|
|
18446
18364
|
}
|
|
18447
18365
|
} else {
|
|
18448
18366
|
return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
|
|
@@ -18499,7 +18417,7 @@ var _ParseAST = class {
|
|
|
18499
18417
|
const ast = this.parsePipe();
|
|
18500
18418
|
const { start, end } = ast.span;
|
|
18501
18419
|
const value = this.input.substring(start, end);
|
|
18502
|
-
return new ASTWithSource(ast, value, this.
|
|
18420
|
+
return new ASTWithSource(ast, value, getLocation(this.parseSourceSpan), this.absoluteOffset + start, this.errors);
|
|
18503
18421
|
}
|
|
18504
18422
|
/**
|
|
18505
18423
|
* Return the binding for a variable declared using `as`. Note that the order
|
|
@@ -18600,13 +18518,11 @@ var _ParseAST = class {
|
|
|
18600
18518
|
* Records an error and skips over the token stream until reaching a recoverable point. See
|
|
18601
18519
|
* `this.skip` for more details on token skipping.
|
|
18602
18520
|
*/
|
|
18603
|
-
error(message, index =
|
|
18604
|
-
this.errors.push(
|
|
18521
|
+
error(message, index = this.index) {
|
|
18522
|
+
this.errors.push(getParseError(message, this.input, this.getErrorLocationText(index), this.parseSourceSpan));
|
|
18605
18523
|
this.skip();
|
|
18606
18524
|
}
|
|
18607
|
-
|
|
18608
|
-
if (index == null)
|
|
18609
|
-
index = this.index;
|
|
18525
|
+
getErrorLocationText(index) {
|
|
18610
18526
|
return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`;
|
|
18611
18527
|
}
|
|
18612
18528
|
/**
|
|
@@ -18638,7 +18554,7 @@ var _ParseAST = class {
|
|
|
18638
18554
|
* none of the calling productions are not expecting the closing token else we will never
|
|
18639
18555
|
* make progress in the case of an extraneous group closing symbol (such as a stray ')').
|
|
18640
18556
|
* That is, we skip a closing symbol if we are not in a grouping production.
|
|
18641
|
-
* -
|
|
18557
|
+
* - Assignment in a `Writable` context
|
|
18642
18558
|
* - In this context, we are able to recover after seeing the `=` operator, which
|
|
18643
18559
|
* signals the presence of an independent rvalue expression following the `=` operator.
|
|
18644
18560
|
*
|
|
@@ -18647,15 +18563,24 @@ var _ParseAST = class {
|
|
|
18647
18563
|
*/
|
|
18648
18564
|
skip() {
|
|
18649
18565
|
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) || !
|
|
18566
|
+
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
18567
|
if (this.next.isError()) {
|
|
18652
|
-
this.errors.push(
|
|
18568
|
+
this.errors.push(getParseError(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan));
|
|
18653
18569
|
}
|
|
18654
18570
|
this.advance();
|
|
18655
18571
|
n = this.next;
|
|
18656
18572
|
}
|
|
18657
18573
|
}
|
|
18658
18574
|
};
|
|
18575
|
+
function getParseError(message, input, locationText, parseSourceSpan) {
|
|
18576
|
+
if (locationText.length > 0) {
|
|
18577
|
+
locationText = ` ${locationText} `;
|
|
18578
|
+
}
|
|
18579
|
+
const location = getLocation(parseSourceSpan);
|
|
18580
|
+
const error = `Parser Error: ${message}${locationText}[${input}] in ${location}`;
|
|
18581
|
+
return new ParseError(parseSourceSpan, error);
|
|
18582
|
+
}
|
|
18583
|
+
__name(getParseError, "getParseError");
|
|
18659
18584
|
var SimpleExpressionChecker = class extends RecursiveAstVisitor2 {
|
|
18660
18585
|
static {
|
|
18661
18586
|
__name(this, "SimpleExpressionChecker");
|
|
@@ -18719,9 +18644,6 @@ var SerializeExpressionVisitor = class {
|
|
|
18719
18644
|
visitKeyedRead(ast, context) {
|
|
18720
18645
|
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}]`;
|
|
18721
18646
|
}
|
|
18722
|
-
visitKeyedWrite(ast, context) {
|
|
18723
|
-
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}] = ${ast.value.visit(this, context)}`;
|
|
18724
|
-
}
|
|
18725
18647
|
visitLiteralArray(ast, context) {
|
|
18726
18648
|
return `[${ast.expressions.map((e) => e.visit(this, context)).join(", ")}]`;
|
|
18727
18649
|
}
|
|
@@ -18759,13 +18681,6 @@ var SerializeExpressionVisitor = class {
|
|
|
18759
18681
|
return `${ast.receiver.visit(this, context)}.${ast.name}`;
|
|
18760
18682
|
}
|
|
18761
18683
|
}
|
|
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
18684
|
visitSafePropertyRead(ast, context) {
|
|
18770
18685
|
return `${ast.receiver.visit(this, context)}?.${ast.name}`;
|
|
18771
18686
|
}
|
|
@@ -19768,7 +19683,7 @@ var _I18nVisitor = class {
|
|
|
19768
19683
|
const expr = this._expressionParser.parseBinding(
|
|
19769
19684
|
expression,
|
|
19770
19685
|
/* location */
|
|
19771
|
-
token.sourceSpan
|
|
19686
|
+
token.sourceSpan,
|
|
19772
19687
|
/* absoluteOffset */
|
|
19773
19688
|
token.sourceSpan.start.offset,
|
|
19774
19689
|
this._interpolationConfig
|
|
@@ -19818,14 +19733,6 @@ function extractPlaceholderName(input) {
|
|
|
19818
19733
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
19819
19734
|
}
|
|
19820
19735
|
__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
19736
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
19830
19737
|
// NOTE: All strings in this set *must* be lowercase!
|
|
19831
19738
|
// TrustedHTML
|
|
@@ -20031,7 +19938,7 @@ var I18nMetaVisitor = class {
|
|
|
20031
19938
|
}
|
|
20032
19939
|
}
|
|
20033
19940
|
_reportError(node, msg) {
|
|
20034
|
-
this._errors.push(new
|
|
19941
|
+
this._errors.push(new ParseError(node.sourceSpan, msg));
|
|
20035
19942
|
}
|
|
20036
19943
|
};
|
|
20037
19944
|
var I18N_MEANING_SEPARATOR = "|";
|
|
@@ -20092,7 +19999,7 @@ function createGoogleGetMsgStatements(variable$1, message, closureVar, placehold
|
|
|
20092
19999
|
})))
|
|
20093
20000
|
}));
|
|
20094
20001
|
}
|
|
20095
|
-
const googGetMsgStmt = closureVar.
|
|
20002
|
+
const googGetMsgStmt = new DeclareVarStmt(closureVar.name, variable(GOOG_GET_MSG).callFn(args), INFERRED_TYPE, StmtModifier.Final);
|
|
20096
20003
|
googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));
|
|
20097
20004
|
const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
|
|
20098
20005
|
return [googGetMsgStmt, i18nAssignmentStmt];
|
|
@@ -20642,7 +20549,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20642
20549
|
switch (op.kind) {
|
|
20643
20550
|
case OpKind.Property:
|
|
20644
20551
|
case OpKind.DomProperty:
|
|
20645
|
-
if (op.
|
|
20552
|
+
if (op.isLegacyAnimationTrigger) {
|
|
20646
20553
|
op.name = "@" + op.name;
|
|
20647
20554
|
}
|
|
20648
20555
|
break;
|
|
@@ -20654,8 +20561,8 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20654
20561
|
throw new Error(`Expected a slot to be assigned`);
|
|
20655
20562
|
}
|
|
20656
20563
|
let animation = "";
|
|
20657
|
-
if (op.
|
|
20658
|
-
op.name = `@${op.name}.${op.
|
|
20564
|
+
if (op.isLegacyAnimationListener) {
|
|
20565
|
+
op.name = `@${op.name}.${op.legacyAnimationPhase}`;
|
|
20659
20566
|
animation = "animation";
|
|
20660
20567
|
}
|
|
20661
20568
|
if (op.hostListener) {
|
|
@@ -20879,7 +20786,7 @@ function kindWithInterpolationTest(kind, interpolation) {
|
|
|
20879
20786
|
}
|
|
20880
20787
|
__name(kindWithInterpolationTest, "kindWithInterpolationTest");
|
|
20881
20788
|
function basicListenerKindTest(op) {
|
|
20882
|
-
return op.kind === OpKind.Listener && !(op.hostListener && op.
|
|
20789
|
+
return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener;
|
|
20883
20790
|
}
|
|
20884
20791
|
__name(basicListenerKindTest, "basicListenerKindTest");
|
|
20885
20792
|
function nonInterpolationPropertyKindTest(op) {
|
|
@@ -20887,7 +20794,7 @@ function nonInterpolationPropertyKindTest(op) {
|
|
|
20887
20794
|
}
|
|
20888
20795
|
__name(nonInterpolationPropertyKindTest, "nonInterpolationPropertyKindTest");
|
|
20889
20796
|
var CREATE_ORDERING = [
|
|
20890
|
-
{ test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.
|
|
20797
|
+
{ test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isLegacyAnimationListener, "test") },
|
|
20891
20798
|
{ test: basicListenerKindTest }
|
|
20892
20799
|
];
|
|
20893
20800
|
var UPDATE_ORDERING = [
|
|
@@ -21234,6 +21141,38 @@ function elementOrContainerBase(instruction, slot, tag, constIndex, localRefInde
|
|
|
21234
21141
|
return call(instruction, args, sourceSpan);
|
|
21235
21142
|
}
|
|
21236
21143
|
__name(elementOrContainerBase, "elementOrContainerBase");
|
|
21144
|
+
function templateBase(instruction, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
21145
|
+
const args = [
|
|
21146
|
+
literal(slot),
|
|
21147
|
+
templateFnRef,
|
|
21148
|
+
literal(decls),
|
|
21149
|
+
literal(vars),
|
|
21150
|
+
literal(tag),
|
|
21151
|
+
literal(constIndex)
|
|
21152
|
+
];
|
|
21153
|
+
if (localRefs !== null) {
|
|
21154
|
+
args.push(literal(localRefs));
|
|
21155
|
+
args.push(importExpr(Identifiers.templateRefExtractor));
|
|
21156
|
+
}
|
|
21157
|
+
while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
|
|
21158
|
+
args.pop();
|
|
21159
|
+
}
|
|
21160
|
+
return call(instruction, args, sourceSpan);
|
|
21161
|
+
}
|
|
21162
|
+
__name(templateBase, "templateBase");
|
|
21163
|
+
function propertyBase(instruction, name, expression, sanitizer, sourceSpan) {
|
|
21164
|
+
const args = [literal(name)];
|
|
21165
|
+
if (expression instanceof Interpolation2) {
|
|
21166
|
+
args.push(interpolationToExpression(expression, sourceSpan));
|
|
21167
|
+
} else {
|
|
21168
|
+
args.push(expression);
|
|
21169
|
+
}
|
|
21170
|
+
if (sanitizer !== null) {
|
|
21171
|
+
args.push(sanitizer);
|
|
21172
|
+
}
|
|
21173
|
+
return call(instruction, args, sourceSpan);
|
|
21174
|
+
}
|
|
21175
|
+
__name(propertyBase, "propertyBase");
|
|
21237
21176
|
function elementEnd(sourceSpan) {
|
|
21238
21177
|
return call(Identifiers.elementEnd, [], sourceSpan);
|
|
21239
21178
|
}
|
|
@@ -21267,22 +21206,7 @@ function elementContainerEnd() {
|
|
|
21267
21206
|
}
|
|
21268
21207
|
__name(elementContainerEnd, "elementContainerEnd");
|
|
21269
21208
|
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);
|
|
21209
|
+
return templateBase(Identifiers.templateCreate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
|
|
21286
21210
|
}
|
|
21287
21211
|
__name(template, "template");
|
|
21288
21212
|
function disableBindings() {
|
|
@@ -21641,16 +21565,7 @@ function i18nAttributes(slot, i18nAttributesConfig) {
|
|
|
21641
21565
|
}
|
|
21642
21566
|
__name(i18nAttributes, "i18nAttributes");
|
|
21643
21567
|
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);
|
|
21568
|
+
return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
|
|
21654
21569
|
}
|
|
21655
21570
|
__name(property, "property");
|
|
21656
21571
|
function twoWayProperty(name, expression, sanitizer, sourceSpan) {
|
|
@@ -21704,6 +21619,58 @@ function classMap(expression, sourceSpan) {
|
|
|
21704
21619
|
return call(Identifiers.classMap, [value], sourceSpan);
|
|
21705
21620
|
}
|
|
21706
21621
|
__name(classMap, "classMap");
|
|
21622
|
+
function domElement(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
21623
|
+
return elementOrContainerBase(Identifiers.domElement, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
21624
|
+
}
|
|
21625
|
+
__name(domElement, "domElement");
|
|
21626
|
+
function domElementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
21627
|
+
return elementOrContainerBase(Identifiers.domElementStart, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
21628
|
+
}
|
|
21629
|
+
__name(domElementStart, "domElementStart");
|
|
21630
|
+
function domElementEnd(sourceSpan) {
|
|
21631
|
+
return call(Identifiers.domElementEnd, [], sourceSpan);
|
|
21632
|
+
}
|
|
21633
|
+
__name(domElementEnd, "domElementEnd");
|
|
21634
|
+
function domElementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {
|
|
21635
|
+
return elementOrContainerBase(
|
|
21636
|
+
Identifiers.domElementContainerStart,
|
|
21637
|
+
slot,
|
|
21638
|
+
/* tag */
|
|
21639
|
+
null,
|
|
21640
|
+
constIndex,
|
|
21641
|
+
localRefIndex,
|
|
21642
|
+
sourceSpan
|
|
21643
|
+
);
|
|
21644
|
+
}
|
|
21645
|
+
__name(domElementContainerStart, "domElementContainerStart");
|
|
21646
|
+
function domElementContainer(slot, constIndex, localRefIndex, sourceSpan) {
|
|
21647
|
+
return elementOrContainerBase(
|
|
21648
|
+
Identifiers.domElementContainer,
|
|
21649
|
+
slot,
|
|
21650
|
+
/* tag */
|
|
21651
|
+
null,
|
|
21652
|
+
constIndex,
|
|
21653
|
+
localRefIndex,
|
|
21654
|
+
sourceSpan
|
|
21655
|
+
);
|
|
21656
|
+
}
|
|
21657
|
+
__name(domElementContainer, "domElementContainer");
|
|
21658
|
+
function domElementContainerEnd() {
|
|
21659
|
+
return call(Identifiers.domElementContainerEnd, [], null);
|
|
21660
|
+
}
|
|
21661
|
+
__name(domElementContainerEnd, "domElementContainerEnd");
|
|
21662
|
+
function domListener(name, handlerFn, eventTargetResolver, sourceSpan) {
|
|
21663
|
+
const args = [literal(name), handlerFn];
|
|
21664
|
+
if (eventTargetResolver !== null) {
|
|
21665
|
+
args.push(importExpr(eventTargetResolver));
|
|
21666
|
+
}
|
|
21667
|
+
return call(Identifiers.domListener, args, sourceSpan);
|
|
21668
|
+
}
|
|
21669
|
+
__name(domListener, "domListener");
|
|
21670
|
+
function domTemplate(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
21671
|
+
return templateBase(Identifiers.domTemplate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
|
|
21672
|
+
}
|
|
21673
|
+
__name(domTemplate, "domTemplate");
|
|
21707
21674
|
var PIPE_BINDINGS = [
|
|
21708
21675
|
Identifiers.pipeBind1,
|
|
21709
21676
|
Identifiers.pipeBind2,
|
|
@@ -21736,11 +21703,7 @@ function i18nApply(slot, sourceSpan) {
|
|
|
21736
21703
|
}
|
|
21737
21704
|
__name(i18nApply, "i18nApply");
|
|
21738
21705
|
function domProperty(name, expression, sanitizer, sourceSpan) {
|
|
21739
|
-
|
|
21740
|
-
if (sanitizer !== null) {
|
|
21741
|
-
args.push(sanitizer);
|
|
21742
|
-
}
|
|
21743
|
-
return call(Identifiers.domProperty, args, sourceSpan);
|
|
21706
|
+
return propertyBase(Identifiers.domProperty, name, expression, sanitizer, sourceSpan);
|
|
21744
21707
|
}
|
|
21745
21708
|
__name(domProperty, "domProperty");
|
|
21746
21709
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
@@ -21869,6 +21832,14 @@ var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
|
21869
21832
|
["document", Identifiers.resolveDocument],
|
|
21870
21833
|
["body", Identifiers.resolveBody]
|
|
21871
21834
|
]);
|
|
21835
|
+
var DOM_PROPERTY_REMAPPING = /* @__PURE__ */ new Map([
|
|
21836
|
+
["class", "className"],
|
|
21837
|
+
["for", "htmlFor"],
|
|
21838
|
+
["formaction", "formAction"],
|
|
21839
|
+
["innerHtml", "innerHTML"],
|
|
21840
|
+
["readonly", "readOnly"],
|
|
21841
|
+
["tabindex", "tabIndex"]
|
|
21842
|
+
]);
|
|
21872
21843
|
function reify(job) {
|
|
21873
21844
|
for (const unit of job.units) {
|
|
21874
21845
|
reifyCreateOperations(unit, unit.create);
|
|
@@ -21884,22 +21855,22 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21884
21855
|
OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
|
|
21885
21856
|
break;
|
|
21886
21857
|
case OpKind.ElementStart:
|
|
21887
|
-
OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21858
|
+
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
21859
|
break;
|
|
21889
21860
|
case OpKind.Element:
|
|
21890
|
-
OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21861
|
+
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
21862
|
break;
|
|
21892
21863
|
case OpKind.ElementEnd:
|
|
21893
|
-
OpList.replace(op, elementEnd(op.sourceSpan));
|
|
21864
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementEnd(op.sourceSpan) : elementEnd(op.sourceSpan));
|
|
21894
21865
|
break;
|
|
21895
21866
|
case OpKind.ContainerStart:
|
|
21896
|
-
OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
|
|
21867
|
+
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
21868
|
break;
|
|
21898
21869
|
case OpKind.Container:
|
|
21899
|
-
OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
21870
|
+
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
21871
|
break;
|
|
21901
21872
|
case OpKind.ContainerEnd:
|
|
21902
|
-
OpList.replace(op, elementContainerEnd());
|
|
21873
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerEnd() : elementContainerEnd());
|
|
21903
21874
|
break;
|
|
21904
21875
|
case OpKind.I18nStart:
|
|
21905
21876
|
OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));
|
|
@@ -21924,7 +21895,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21924
21895
|
throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
|
|
21925
21896
|
}
|
|
21926
21897
|
const childView = unit.job.views.get(op.xref);
|
|
21927
|
-
OpList.replace(
|
|
21898
|
+
OpList.replace(
|
|
21899
|
+
op,
|
|
21900
|
+
// Block templates can't have directives so we can always generate them as DOM-only.
|
|
21901
|
+
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)
|
|
21902
|
+
);
|
|
21928
21903
|
break;
|
|
21929
21904
|
case OpKind.DisableBindings:
|
|
21930
21905
|
OpList.replace(op, disableBindings());
|
|
@@ -21944,7 +21919,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21944
21919
|
if (eventTargetResolver === void 0) {
|
|
21945
21920
|
throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
|
|
21946
21921
|
}
|
|
21947
|
-
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.
|
|
21922
|
+
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
21923
|
break;
|
|
21949
21924
|
case OpKind.TwoWayListener:
|
|
21950
21925
|
OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
|
|
@@ -22096,7 +22071,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
22096
22071
|
}
|
|
22097
22072
|
}
|
|
22098
22073
|
__name(reifyCreateOperations, "reifyCreateOperations");
|
|
22099
|
-
function reifyUpdateOperations(
|
|
22074
|
+
function reifyUpdateOperations(unit, ops) {
|
|
22100
22075
|
for (const op of ops) {
|
|
22101
22076
|
transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
|
|
22102
22077
|
switch (op.kind) {
|
|
@@ -22104,7 +22079,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
22104
22079
|
OpList.replace(op, advance(op.delta, op.sourceSpan));
|
|
22105
22080
|
break;
|
|
22106
22081
|
case OpKind.Property:
|
|
22107
|
-
OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22082
|
+
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
22083
|
break;
|
|
22109
22084
|
case OpKind.TwoWayProperty:
|
|
22110
22085
|
OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
@@ -22137,10 +22112,10 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
22137
22112
|
if (op.expression instanceof Interpolation2) {
|
|
22138
22113
|
throw new Error("not yet handled");
|
|
22139
22114
|
} else {
|
|
22140
|
-
if (op.
|
|
22115
|
+
if (op.isLegacyAnimationTrigger) {
|
|
22141
22116
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
22142
22117
|
} else {
|
|
22143
|
-
OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22118
|
+
OpList.replace(op, domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
22144
22119
|
}
|
|
22145
22120
|
}
|
|
22146
22121
|
break;
|
|
@@ -23763,22 +23738,22 @@ function isSingleI18nIcu(meta) {
|
|
|
23763
23738
|
return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu2;
|
|
23764
23739
|
}
|
|
23765
23740
|
__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);
|
|
23741
|
+
function ingestComponent(componentName, template2, constantPool, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
|
|
23742
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
|
|
23768
23743
|
ingestNodes(job.root, template2);
|
|
23769
23744
|
return job;
|
|
23770
23745
|
}
|
|
23771
23746
|
__name(ingestComponent, "ingestComponent");
|
|
23772
23747
|
function ingestHostBinding(input, bindingParser, constantPool) {
|
|
23773
|
-
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
|
|
23748
|
+
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode, TemplateCompilationMode.DomOnly);
|
|
23774
23749
|
for (const property2 of input.properties ?? []) {
|
|
23775
23750
|
let bindingKind = BindingKind.Property;
|
|
23776
23751
|
if (property2.name.startsWith("attr.")) {
|
|
23777
23752
|
property2.name = property2.name.substring("attr.".length);
|
|
23778
23753
|
bindingKind = BindingKind.Attribute;
|
|
23779
23754
|
}
|
|
23780
|
-
if (property2.
|
|
23781
|
-
bindingKind = BindingKind.
|
|
23755
|
+
if (property2.isLegacyAnimation) {
|
|
23756
|
+
bindingKind = BindingKind.LegacyAnimation;
|
|
23782
23757
|
}
|
|
23783
23758
|
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
23784
23759
|
ingestDomProperty(job, property2, bindingKind, securityContexts);
|
|
@@ -23839,7 +23814,7 @@ function ingestHostAttribute(job, name, value, securityContexts) {
|
|
|
23839
23814
|
}
|
|
23840
23815
|
__name(ingestHostAttribute, "ingestHostAttribute");
|
|
23841
23816
|
function ingestHostEvent(job, event) {
|
|
23842
|
-
const [phase, target] = event.type !== ParsedEventType.
|
|
23817
|
+
const [phase, target] = event.type !== ParsedEventType.LegacyAnimation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
23843
23818
|
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
23844
23819
|
job.root.create.push(eventBinding);
|
|
23845
23820
|
}
|
|
@@ -24259,20 +24234,6 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
24259
24234
|
} else {
|
|
24260
24235
|
return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
|
|
24261
24236
|
}
|
|
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
24237
|
} else if (ast instanceof Call) {
|
|
24277
24238
|
if (ast.receiver instanceof ImplicitReceiver) {
|
|
24278
24239
|
throw new Error(`Unexpected ImplicitReceiver`);
|
|
@@ -24368,7 +24329,7 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
|
24368
24329
|
[BindingType.Attribute, BindingKind.Attribute],
|
|
24369
24330
|
[BindingType.Class, BindingKind.ClassName],
|
|
24370
24331
|
[BindingType.Style, BindingKind.StyleProperty],
|
|
24371
|
-
[BindingType.
|
|
24332
|
+
[BindingType.LegacyAnimation, BindingKind.LegacyAnimation]
|
|
24372
24333
|
]);
|
|
24373
24334
|
function isPlainTemplate(tmpl) {
|
|
24374
24335
|
return splitNsName(tmpl.tagName ?? "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
@@ -24403,7 +24364,7 @@ function ingestElementBindings(unit, op, element2) {
|
|
|
24403
24364
|
unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
|
|
24404
24365
|
unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
|
|
24405
24366
|
for (const output of element2.outputs) {
|
|
24406
|
-
if (output.type === ParsedEventType.
|
|
24367
|
+
if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
|
|
24407
24368
|
throw Error("Animation listener should have a phase");
|
|
24408
24369
|
}
|
|
24409
24370
|
if (output.type === ParsedEventType.TwoWay) {
|
|
@@ -24437,7 +24398,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
24437
24398
|
unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
|
|
24438
24399
|
unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
|
|
24439
24400
|
for (const output of template2.outputs) {
|
|
24440
|
-
if (output.type === ParsedEventType.
|
|
24401
|
+
if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
|
|
24441
24402
|
throw Error("Animation listener should have a phase");
|
|
24442
24403
|
}
|
|
24443
24404
|
if (templateKind === TemplateKind.NgTemplate) {
|
|
@@ -24447,7 +24408,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
24447
24408
|
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
24409
|
}
|
|
24449
24410
|
}
|
|
24450
|
-
if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.
|
|
24411
|
+
if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.LegacyAnimation) {
|
|
24451
24412
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
24452
24413
|
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
|
|
24453
24414
|
}
|
|
@@ -24470,7 +24431,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
|
|
|
24470
24431
|
return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
|
|
24471
24432
|
}
|
|
24472
24433
|
}
|
|
24473
|
-
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.
|
|
24434
|
+
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation)) {
|
|
24474
24435
|
return null;
|
|
24475
24436
|
}
|
|
24476
24437
|
}
|
|
@@ -24566,7 +24527,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
24566
24527
|
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
24567
24528
|
}
|
|
24568
24529
|
for (const attr of root.inputs) {
|
|
24569
|
-
if (attr.type !== BindingType.
|
|
24530
|
+
if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Attribute) {
|
|
24570
24531
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
24571
24532
|
unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
|
|
24572
24533
|
}
|
|
@@ -24728,7 +24689,7 @@ var ATTRIBUTE_PREFIX = "attr";
|
|
|
24728
24689
|
var CLASS_PREFIX = "class";
|
|
24729
24690
|
var STYLE_PREFIX = "style";
|
|
24730
24691
|
var TEMPLATE_ATTR_PREFIX$1 = "*";
|
|
24731
|
-
var
|
|
24692
|
+
var LEGACY_ANIMATE_PROP_PREFIX = "animate-";
|
|
24732
24693
|
var BindingParser = class {
|
|
24733
24694
|
static {
|
|
24734
24695
|
__name(this, "BindingParser");
|
|
@@ -24798,16 +24759,16 @@ var BindingParser = class {
|
|
|
24798
24759
|
return targetEvents;
|
|
24799
24760
|
}
|
|
24800
24761
|
parseInterpolation(value, sourceSpan, interpolatedTokens) {
|
|
24801
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24802
24762
|
const absoluteOffset = sourceSpan.fullStart.offset;
|
|
24803
24763
|
try {
|
|
24804
|
-
const ast = this._exprParser.parseInterpolation(value,
|
|
24805
|
-
if (ast)
|
|
24806
|
-
this.
|
|
24764
|
+
const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens, this._interpolationConfig);
|
|
24765
|
+
if (ast) {
|
|
24766
|
+
this.errors.push(...ast.errors);
|
|
24767
|
+
}
|
|
24807
24768
|
return ast;
|
|
24808
24769
|
} catch (e) {
|
|
24809
24770
|
this._reportError(`${e}`, sourceSpan);
|
|
24810
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24771
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24811
24772
|
}
|
|
24812
24773
|
}
|
|
24813
24774
|
/**
|
|
@@ -24816,16 +24777,16 @@ var BindingParser = class {
|
|
|
24816
24777
|
* This is used for parsing the switch expression in ICUs.
|
|
24817
24778
|
*/
|
|
24818
24779
|
parseInterpolationExpression(expression, sourceSpan) {
|
|
24819
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24820
24780
|
const absoluteOffset = sourceSpan.start.offset;
|
|
24821
24781
|
try {
|
|
24822
|
-
const ast = this._exprParser.parseInterpolationExpression(expression,
|
|
24823
|
-
if (ast)
|
|
24824
|
-
this.
|
|
24782
|
+
const ast = this._exprParser.parseInterpolationExpression(expression, sourceSpan, absoluteOffset);
|
|
24783
|
+
if (ast) {
|
|
24784
|
+
this.errors.push(...ast.errors);
|
|
24785
|
+
}
|
|
24825
24786
|
return ast;
|
|
24826
24787
|
} catch (e) {
|
|
24827
24788
|
this._reportError(`${e}`, sourceSpan);
|
|
24828
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24789
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24829
24790
|
}
|
|
24830
24791
|
}
|
|
24831
24792
|
/**
|
|
@@ -24878,10 +24839,9 @@ var BindingParser = class {
|
|
|
24878
24839
|
* @param absoluteValueOffset start of the `tplValue`
|
|
24879
24840
|
*/
|
|
24880
24841
|
_parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {
|
|
24881
|
-
const sourceInfo = sourceSpan.start.toString();
|
|
24882
24842
|
try {
|
|
24883
|
-
const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue,
|
|
24884
|
-
|
|
24843
|
+
const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);
|
|
24844
|
+
bindingsResult.errors.forEach((e) => this.errors.push(e));
|
|
24885
24845
|
bindingsResult.warnings.forEach((warning) => {
|
|
24886
24846
|
this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);
|
|
24887
24847
|
});
|
|
@@ -24892,7 +24852,7 @@ var BindingParser = class {
|
|
|
24892
24852
|
}
|
|
24893
24853
|
}
|
|
24894
24854
|
parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
24895
|
-
if (
|
|
24855
|
+
if (isLegacyAnimationLabel(name)) {
|
|
24896
24856
|
name = name.substring(1);
|
|
24897
24857
|
if (keySpan !== void 0) {
|
|
24898
24858
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
@@ -24900,7 +24860,7 @@ var BindingParser = class {
|
|
|
24900
24860
|
if (value) {
|
|
24901
24861
|
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
24862
|
}
|
|
24903
|
-
this.
|
|
24863
|
+
this._parseLegacyAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24904
24864
|
} else {
|
|
24905
24865
|
targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
|
|
24906
24866
|
}
|
|
@@ -24909,22 +24869,22 @@ var BindingParser = class {
|
|
|
24909
24869
|
if (name.length === 0) {
|
|
24910
24870
|
this._reportError(`Property name is missing in binding`, sourceSpan);
|
|
24911
24871
|
}
|
|
24912
|
-
let
|
|
24913
|
-
if (name.startsWith(
|
|
24914
|
-
|
|
24915
|
-
name = name.substring(
|
|
24872
|
+
let isLegacyAnimationProp = false;
|
|
24873
|
+
if (name.startsWith(LEGACY_ANIMATE_PROP_PREFIX)) {
|
|
24874
|
+
isLegacyAnimationProp = true;
|
|
24875
|
+
name = name.substring(LEGACY_ANIMATE_PROP_PREFIX.length);
|
|
24916
24876
|
if (keySpan !== void 0) {
|
|
24917
|
-
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset +
|
|
24877
|
+
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + LEGACY_ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
|
|
24918
24878
|
}
|
|
24919
|
-
} else if (
|
|
24920
|
-
|
|
24879
|
+
} else if (isLegacyAnimationLabel(name)) {
|
|
24880
|
+
isLegacyAnimationProp = true;
|
|
24921
24881
|
name = name.substring(1);
|
|
24922
24882
|
if (keySpan !== void 0) {
|
|
24923
24883
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
24924
24884
|
}
|
|
24925
24885
|
}
|
|
24926
|
-
if (
|
|
24927
|
-
this.
|
|
24886
|
+
if (isLegacyAnimationProp) {
|
|
24887
|
+
this._parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24928
24888
|
} else {
|
|
24929
24889
|
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24930
24890
|
}
|
|
@@ -24941,29 +24901,29 @@ var BindingParser = class {
|
|
|
24941
24901
|
targetMatchableAttrs.push([name, ast.source]);
|
|
24942
24902
|
targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
24943
24903
|
}
|
|
24944
|
-
|
|
24904
|
+
_parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
24945
24905
|
if (name.length === 0) {
|
|
24946
24906
|
this._reportError("Animation trigger is missing", sourceSpan);
|
|
24947
24907
|
}
|
|
24948
24908
|
const ast = this.parseBinding(expression || "undefined", false, valueSpan || sourceSpan, absoluteOffset);
|
|
24949
24909
|
targetMatchableAttrs.push([name, ast.source]);
|
|
24950
|
-
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.
|
|
24910
|
+
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.LEGACY_ANIMATION, sourceSpan, keySpan, valueSpan));
|
|
24951
24911
|
}
|
|
24952
24912
|
parseBinding(value, isHostBinding2, sourceSpan, absoluteOffset) {
|
|
24953
|
-
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown)").toString();
|
|
24954
24913
|
try {
|
|
24955
|
-
const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value,
|
|
24956
|
-
if (ast)
|
|
24957
|
-
this.
|
|
24914
|
+
const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig);
|
|
24915
|
+
if (ast) {
|
|
24916
|
+
this.errors.push(...ast.errors);
|
|
24917
|
+
}
|
|
24958
24918
|
return ast;
|
|
24959
24919
|
} catch (e) {
|
|
24960
24920
|
this._reportError(`${e}`, sourceSpan);
|
|
24961
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
24921
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
24962
24922
|
}
|
|
24963
24923
|
}
|
|
24964
24924
|
createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
|
|
24965
|
-
if (boundProp.
|
|
24966
|
-
return new BoundElementProperty(boundProp.name, BindingType.
|
|
24925
|
+
if (boundProp.isLegacyAnimation) {
|
|
24926
|
+
return new BoundElementProperty(boundProp.name, BindingType.LegacyAnimation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
|
|
24967
24927
|
}
|
|
24968
24928
|
let unit = null;
|
|
24969
24929
|
let bindingType = void 0;
|
|
@@ -25011,12 +24971,12 @@ var BindingParser = class {
|
|
|
25011
24971
|
if (name.length === 0) {
|
|
25012
24972
|
this._reportError(`Event name is missing in binding`, sourceSpan);
|
|
25013
24973
|
}
|
|
25014
|
-
if (
|
|
24974
|
+
if (isLegacyAnimationLabel(name)) {
|
|
25015
24975
|
name = name.slice(1);
|
|
25016
24976
|
if (keySpan !== void 0) {
|
|
25017
24977
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
25018
24978
|
}
|
|
25019
|
-
this.
|
|
24979
|
+
this._parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
|
|
25020
24980
|
} else {
|
|
25021
24981
|
this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
|
|
25022
24982
|
}
|
|
@@ -25029,14 +24989,14 @@ var BindingParser = class {
|
|
|
25029
24989
|
const [target, eventName] = splitAtColon(rawName, [null, rawName]);
|
|
25030
24990
|
return { eventName, target };
|
|
25031
24991
|
}
|
|
25032
|
-
|
|
24992
|
+
parseLegacyAnimationEventName(rawName) {
|
|
25033
24993
|
const matches = splitAtPeriod(rawName, [rawName, null]);
|
|
25034
24994
|
return { eventName: matches[0], phase: matches[1] === null ? null : matches[1].toLowerCase() };
|
|
25035
24995
|
}
|
|
25036
|
-
|
|
25037
|
-
const { eventName, phase } = this.
|
|
24996
|
+
_parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
|
|
24997
|
+
const { eventName, phase } = this.parseLegacyAnimationEventName(name);
|
|
25038
24998
|
const ast = this._parseAction(expression, handlerSpan);
|
|
25039
|
-
targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.
|
|
24999
|
+
targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.LegacyAnimation, ast, sourceSpan, handlerSpan, keySpan));
|
|
25040
25000
|
if (eventName.length === 0) {
|
|
25041
25001
|
this._reportError(`Animation event name is missing in binding`, sourceSpan);
|
|
25042
25002
|
}
|
|
@@ -25060,30 +25020,24 @@ var BindingParser = class {
|
|
|
25060
25020
|
targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : ParsedEventType.Regular, ast, sourceSpan, handlerSpan, keySpan));
|
|
25061
25021
|
}
|
|
25062
25022
|
_parseAction(value, sourceSpan) {
|
|
25063
|
-
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
|
|
25064
25023
|
const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
|
|
25065
25024
|
try {
|
|
25066
|
-
const ast = this._exprParser.parseAction(value,
|
|
25025
|
+
const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset, this._interpolationConfig);
|
|
25067
25026
|
if (ast) {
|
|
25068
|
-
this.
|
|
25027
|
+
this.errors.push(...ast.errors);
|
|
25069
25028
|
}
|
|
25070
25029
|
if (!ast || ast.ast instanceof EmptyExpr$1) {
|
|
25071
25030
|
this._reportError(`Empty expressions are not allowed`, sourceSpan);
|
|
25072
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
25031
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
25073
25032
|
}
|
|
25074
25033
|
return ast;
|
|
25075
25034
|
} catch (e) {
|
|
25076
25035
|
this._reportError(`${e}`, sourceSpan);
|
|
25077
|
-
return this._exprParser.wrapLiteralPrimitive("ERROR",
|
|
25036
|
+
return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
|
|
25078
25037
|
}
|
|
25079
25038
|
}
|
|
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
|
-
}
|
|
25039
|
+
_reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
25040
|
+
this.errors.push(new ParseError(sourceSpan, message, level));
|
|
25087
25041
|
}
|
|
25088
25042
|
/**
|
|
25089
25043
|
* @param propName the name of the property / attribute
|
|
@@ -25111,15 +25065,30 @@ var BindingParser = class {
|
|
|
25111
25065
|
return this._isAllowedAssignmentEvent(ast.args[0]);
|
|
25112
25066
|
}
|
|
25113
25067
|
if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
|
|
25114
|
-
|
|
25068
|
+
if (!hasRecursiveSafeReceiver(ast)) {
|
|
25069
|
+
return true;
|
|
25070
|
+
}
|
|
25115
25071
|
}
|
|
25116
25072
|
return false;
|
|
25117
25073
|
}
|
|
25118
25074
|
};
|
|
25119
|
-
function
|
|
25075
|
+
function hasRecursiveSafeReceiver(ast) {
|
|
25076
|
+
if (ast instanceof SafePropertyRead || ast instanceof SafeKeyedRead) {
|
|
25077
|
+
return true;
|
|
25078
|
+
}
|
|
25079
|
+
if (ast instanceof ParenthesizedExpression) {
|
|
25080
|
+
return hasRecursiveSafeReceiver(ast.expression);
|
|
25081
|
+
}
|
|
25082
|
+
if (ast instanceof PropertyRead || ast instanceof KeyedRead || ast instanceof Call) {
|
|
25083
|
+
return hasRecursiveSafeReceiver(ast.receiver);
|
|
25084
|
+
}
|
|
25085
|
+
return false;
|
|
25086
|
+
}
|
|
25087
|
+
__name(hasRecursiveSafeReceiver, "hasRecursiveSafeReceiver");
|
|
25088
|
+
function isLegacyAnimationLabel(name) {
|
|
25120
25089
|
return name[0] == "@";
|
|
25121
25090
|
}
|
|
25122
|
-
__name(
|
|
25091
|
+
__name(isLegacyAnimationLabel, "isLegacyAnimationLabel");
|
|
25123
25092
|
function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
|
|
25124
25093
|
let ctxs;
|
|
25125
25094
|
const nameToContext = /* @__PURE__ */ __name((elName) => registry.securityContext(elName, propName, isAttribute), "nameToContext");
|
|
@@ -26131,16 +26100,16 @@ var HtmlAstToIvyAst = class {
|
|
|
26131
26100
|
if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
|
|
26132
26101
|
const selector = preparsedElement.selectAttr;
|
|
26133
26102
|
const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
|
|
26134
|
-
parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26103
|
+
parsedElement = new Content(selector, attrs, children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26135
26104
|
this.ngContentSelectors.push(selector);
|
|
26136
26105
|
} else if (isTemplateElement) {
|
|
26137
26106
|
const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
|
|
26138
26107
|
parsedElement = new Template(element2.name, attributes, attrs.bound, boundEvents, directives, [
|
|
26139
26108
|
/* no template attributes */
|
|
26140
|
-
], children, references, variables, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26109
|
+
], children, references, variables, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
26141
26110
|
} else {
|
|
26142
26111
|
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);
|
|
26112
|
+
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
26113
|
}
|
|
26145
26114
|
if (elementHasInlineTemplate) {
|
|
26146
26115
|
parsedElement = this.wrapInTemplate(parsedElement, templateParsedProperties, templateVariables, i18nAttrsMeta, isTemplateElement, isI18nRootElement);
|
|
@@ -26216,7 +26185,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26216
26185
|
children = visitAll(this, component.children, component.children);
|
|
26217
26186
|
}
|
|
26218
26187
|
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);
|
|
26188
|
+
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
26189
|
if (elementHasInlineTemplate) {
|
|
26221
26190
|
node = this.wrapInTemplate(node, templateParsedProperties, templateVariables, i18nAttrsMeta, false, isI18nRootElement);
|
|
26222
26191
|
}
|
|
@@ -26545,7 +26514,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26545
26514
|
// Do not copy over the directives.
|
|
26546
26515
|
], templateAttrs, [node], [
|
|
26547
26516
|
// Do not copy over the references.
|
|
26548
|
-
], templateVariables, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
|
|
26517
|
+
], templateVariables, false, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
|
|
26549
26518
|
}
|
|
26550
26519
|
_visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n2) {
|
|
26551
26520
|
const valueNoNgsp = replaceNgsp(value);
|
|
@@ -26626,9 +26595,11 @@ var NonBindableVisitor = class {
|
|
|
26626
26595
|
children,
|
|
26627
26596
|
/* references */
|
|
26628
26597
|
[],
|
|
26598
|
+
ast.isSelfClosing,
|
|
26629
26599
|
ast.sourceSpan,
|
|
26630
26600
|
ast.startSourceSpan,
|
|
26631
|
-
ast.endSourceSpan
|
|
26601
|
+
ast.endSourceSpan,
|
|
26602
|
+
ast.isVoid
|
|
26632
26603
|
);
|
|
26633
26604
|
}
|
|
26634
26605
|
visitComment(comment) {
|
|
@@ -26678,9 +26649,11 @@ var NonBindableVisitor = class {
|
|
|
26678
26649
|
children,
|
|
26679
26650
|
/* references */
|
|
26680
26651
|
[],
|
|
26652
|
+
ast.isSelfClosing,
|
|
26681
26653
|
ast.sourceSpan,
|
|
26682
26654
|
ast.startSourceSpan,
|
|
26683
|
-
ast.endSourceSpan
|
|
26655
|
+
ast.endSourceSpan,
|
|
26656
|
+
false
|
|
26684
26657
|
);
|
|
26685
26658
|
}
|
|
26686
26659
|
visitDirective(directive, context) {
|
|
@@ -26707,7 +26680,8 @@ __name(textContents, "textContents");
|
|
|
26707
26680
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
26708
26681
|
function parseTemplate(template2, templateUrl, options = {}) {
|
|
26709
26682
|
const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
|
|
26710
|
-
const
|
|
26683
|
+
const selectorlessEnabled = options.enableSelectorless ?? false;
|
|
26684
|
+
const bindingParser = makeBindingParser(interpolationConfig, selectorlessEnabled);
|
|
26711
26685
|
const htmlParser = new HtmlParser();
|
|
26712
26686
|
const parseResult = htmlParser.parse(template2, templateUrl, {
|
|
26713
26687
|
leadingTriviaChars: LEADING_TRIVIA_CHARS,
|
|
@@ -26715,7 +26689,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26715
26689
|
tokenizeExpansionForms: true,
|
|
26716
26690
|
tokenizeBlocks: options.enableBlockSyntax ?? true,
|
|
26717
26691
|
tokenizeLet: options.enableLetSyntax ?? true,
|
|
26718
|
-
selectorlessEnabled
|
|
26692
|
+
selectorlessEnabled
|
|
26719
26693
|
});
|
|
26720
26694
|
if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
|
|
26721
26695
|
const parsedTemplate2 = {
|
|
@@ -26803,8 +26777,8 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26803
26777
|
}
|
|
26804
26778
|
__name(parseTemplate, "parseTemplate");
|
|
26805
26779
|
var elementRegistry = new DomElementSchemaRegistry();
|
|
26806
|
-
function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
26807
|
-
return new BindingParser(new Parser2(new Lexer()), interpolationConfig, elementRegistry, []);
|
|
26780
|
+
function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, selectorlessEnabled = false) {
|
|
26781
|
+
return new BindingParser(new Parser2(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
|
|
26808
26782
|
}
|
|
26809
26783
|
__name(makeBindingParser, "makeBindingParser");
|
|
26810
26784
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
@@ -26900,7 +26874,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
26900
26874
|
constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
|
|
26901
26875
|
allDeferrableDepsFn = variable(fnName);
|
|
26902
26876
|
}
|
|
26903
|
-
const
|
|
26877
|
+
const compilationMode = meta.isStandalone && !meta.hasDirectiveDependencies ? TemplateCompilationMode.DomOnly : TemplateCompilationMode.Full;
|
|
26878
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
|
|
26904
26879
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
26905
26880
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
26906
26881
|
if (tpl.contentSelectors !== null) {
|
|
@@ -27232,6 +27207,127 @@ function compileDeferResolverFunction(meta) {
|
|
|
27232
27207
|
return arrowFn([], literalArr(depExpressions));
|
|
27233
27208
|
}
|
|
27234
27209
|
__name(compileDeferResolverFunction, "compileDeferResolverFunction");
|
|
27210
|
+
var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
27211
|
+
static {
|
|
27212
|
+
__name(this, "CombinedRecursiveAstVisitor");
|
|
27213
|
+
}
|
|
27214
|
+
visit(node) {
|
|
27215
|
+
if (node instanceof ASTWithSource) {
|
|
27216
|
+
this.visit(node.ast);
|
|
27217
|
+
} else {
|
|
27218
|
+
node.visit(this);
|
|
27219
|
+
}
|
|
27220
|
+
}
|
|
27221
|
+
visitElement(element2) {
|
|
27222
|
+
this.visitAllTemplateNodes(element2.attributes);
|
|
27223
|
+
this.visitAllTemplateNodes(element2.inputs);
|
|
27224
|
+
this.visitAllTemplateNodes(element2.outputs);
|
|
27225
|
+
this.visitAllTemplateNodes(element2.directives);
|
|
27226
|
+
this.visitAllTemplateNodes(element2.references);
|
|
27227
|
+
this.visitAllTemplateNodes(element2.children);
|
|
27228
|
+
}
|
|
27229
|
+
visitTemplate(template2) {
|
|
27230
|
+
this.visitAllTemplateNodes(template2.attributes);
|
|
27231
|
+
this.visitAllTemplateNodes(template2.inputs);
|
|
27232
|
+
this.visitAllTemplateNodes(template2.outputs);
|
|
27233
|
+
this.visitAllTemplateNodes(template2.directives);
|
|
27234
|
+
this.visitAllTemplateNodes(template2.templateAttrs);
|
|
27235
|
+
this.visitAllTemplateNodes(template2.variables);
|
|
27236
|
+
this.visitAllTemplateNodes(template2.references);
|
|
27237
|
+
this.visitAllTemplateNodes(template2.children);
|
|
27238
|
+
}
|
|
27239
|
+
visitContent(content) {
|
|
27240
|
+
this.visitAllTemplateNodes(content.children);
|
|
27241
|
+
}
|
|
27242
|
+
visitBoundAttribute(attribute2) {
|
|
27243
|
+
this.visit(attribute2.value);
|
|
27244
|
+
}
|
|
27245
|
+
visitBoundEvent(attribute2) {
|
|
27246
|
+
this.visit(attribute2.handler);
|
|
27247
|
+
}
|
|
27248
|
+
visitBoundText(text2) {
|
|
27249
|
+
this.visit(text2.value);
|
|
27250
|
+
}
|
|
27251
|
+
visitIcu(icu) {
|
|
27252
|
+
Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
|
|
27253
|
+
Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
|
|
27254
|
+
}
|
|
27255
|
+
visitDeferredBlock(deferred) {
|
|
27256
|
+
deferred.visitAll(this);
|
|
27257
|
+
}
|
|
27258
|
+
visitDeferredTrigger(trigger) {
|
|
27259
|
+
if (trigger instanceof BoundDeferredTrigger) {
|
|
27260
|
+
this.visit(trigger.value);
|
|
27261
|
+
}
|
|
27262
|
+
}
|
|
27263
|
+
visitDeferredBlockPlaceholder(block) {
|
|
27264
|
+
this.visitAllTemplateNodes(block.children);
|
|
27265
|
+
}
|
|
27266
|
+
visitDeferredBlockError(block) {
|
|
27267
|
+
this.visitAllTemplateNodes(block.children);
|
|
27268
|
+
}
|
|
27269
|
+
visitDeferredBlockLoading(block) {
|
|
27270
|
+
this.visitAllTemplateNodes(block.children);
|
|
27271
|
+
}
|
|
27272
|
+
visitSwitchBlock(block) {
|
|
27273
|
+
this.visit(block.expression);
|
|
27274
|
+
this.visitAllTemplateNodes(block.cases);
|
|
27275
|
+
}
|
|
27276
|
+
visitSwitchBlockCase(block) {
|
|
27277
|
+
block.expression && this.visit(block.expression);
|
|
27278
|
+
this.visitAllTemplateNodes(block.children);
|
|
27279
|
+
}
|
|
27280
|
+
visitForLoopBlock(block) {
|
|
27281
|
+
block.item.visit(this);
|
|
27282
|
+
this.visitAllTemplateNodes(block.contextVariables);
|
|
27283
|
+
this.visit(block.expression);
|
|
27284
|
+
this.visitAllTemplateNodes(block.children);
|
|
27285
|
+
block.empty?.visit(this);
|
|
27286
|
+
}
|
|
27287
|
+
visitForLoopBlockEmpty(block) {
|
|
27288
|
+
this.visitAllTemplateNodes(block.children);
|
|
27289
|
+
}
|
|
27290
|
+
visitIfBlock(block) {
|
|
27291
|
+
this.visitAllTemplateNodes(block.branches);
|
|
27292
|
+
}
|
|
27293
|
+
visitIfBlockBranch(block) {
|
|
27294
|
+
block.expression && this.visit(block.expression);
|
|
27295
|
+
block.expressionAlias?.visit(this);
|
|
27296
|
+
this.visitAllTemplateNodes(block.children);
|
|
27297
|
+
}
|
|
27298
|
+
visitLetDeclaration(decl) {
|
|
27299
|
+
this.visit(decl.value);
|
|
27300
|
+
}
|
|
27301
|
+
visitComponent(component) {
|
|
27302
|
+
this.visitAllTemplateNodes(component.attributes);
|
|
27303
|
+
this.visitAllTemplateNodes(component.inputs);
|
|
27304
|
+
this.visitAllTemplateNodes(component.outputs);
|
|
27305
|
+
this.visitAllTemplateNodes(component.directives);
|
|
27306
|
+
this.visitAllTemplateNodes(component.references);
|
|
27307
|
+
this.visitAllTemplateNodes(component.children);
|
|
27308
|
+
}
|
|
27309
|
+
visitDirective(directive) {
|
|
27310
|
+
this.visitAllTemplateNodes(directive.attributes);
|
|
27311
|
+
this.visitAllTemplateNodes(directive.inputs);
|
|
27312
|
+
this.visitAllTemplateNodes(directive.outputs);
|
|
27313
|
+
this.visitAllTemplateNodes(directive.references);
|
|
27314
|
+
}
|
|
27315
|
+
visitVariable(variable2) {
|
|
27316
|
+
}
|
|
27317
|
+
visitReference(reference2) {
|
|
27318
|
+
}
|
|
27319
|
+
visitTextAttribute(attribute2) {
|
|
27320
|
+
}
|
|
27321
|
+
visitText(text2) {
|
|
27322
|
+
}
|
|
27323
|
+
visitUnknownBlock(block) {
|
|
27324
|
+
}
|
|
27325
|
+
visitAllTemplateNodes(nodes) {
|
|
27326
|
+
for (const node of nodes) {
|
|
27327
|
+
this.visit(node);
|
|
27328
|
+
}
|
|
27329
|
+
}
|
|
27330
|
+
};
|
|
27235
27331
|
function diff(fullList, itemsToExclude) {
|
|
27236
27332
|
const exclude = new Set(itemsToExclude);
|
|
27237
27333
|
return fullList.filter((item) => !exclude.has(item));
|
|
@@ -27309,9 +27405,7 @@ var R3TargetBinder = class {
|
|
|
27309
27405
|
if (target.template) {
|
|
27310
27406
|
const scope = Scope2.apply(target.template);
|
|
27311
27407
|
extractScopedNodeEntities(scope, scopedNodeEntities);
|
|
27312
|
-
|
|
27313
|
-
DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
|
|
27314
|
-
}
|
|
27408
|
+
DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
|
|
27315
27409
|
TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
27316
27410
|
}
|
|
27317
27411
|
if (target.host) {
|
|
@@ -27615,6 +27709,12 @@ var DirectiveBinder = class _DirectiveBinder {
|
|
|
27615
27709
|
const cssSelector = createCssSelectorFromNode(node);
|
|
27616
27710
|
this.directiveMatcher.match(cssSelector, (_, results) => directives.push(...results));
|
|
27617
27711
|
this.trackSelectorBasedBindingsAndDirectives(node, directives);
|
|
27712
|
+
} else {
|
|
27713
|
+
node.references.forEach((ref) => {
|
|
27714
|
+
if (ref.value.trim() === "") {
|
|
27715
|
+
this.references.set(ref, node);
|
|
27716
|
+
}
|
|
27717
|
+
});
|
|
27618
27718
|
}
|
|
27619
27719
|
node.directives.forEach((directive) => directive.visit(this));
|
|
27620
27720
|
node.children.forEach((child) => child.visit(this));
|
|
@@ -27700,7 +27800,7 @@ var DirectiveBinder = class _DirectiveBinder {
|
|
|
27700
27800
|
visitLetDeclaration(decl) {
|
|
27701
27801
|
}
|
|
27702
27802
|
};
|
|
27703
|
-
var TemplateBinder = class _TemplateBinder extends
|
|
27803
|
+
var TemplateBinder = class _TemplateBinder extends CombinedRecursiveAstVisitor {
|
|
27704
27804
|
static {
|
|
27705
27805
|
__name(this, "TemplateBinder");
|
|
27706
27806
|
}
|
|
@@ -27713,7 +27813,7 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27713
27813
|
scope;
|
|
27714
27814
|
rootNode;
|
|
27715
27815
|
level;
|
|
27716
|
-
visitNode;
|
|
27816
|
+
visitNode = /* @__PURE__ */ __name((node) => node.visit(this), "visitNode");
|
|
27717
27817
|
constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
|
|
27718
27818
|
super();
|
|
27719
27819
|
this.bindings = bindings;
|
|
@@ -27725,17 +27825,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27725
27825
|
this.scope = scope;
|
|
27726
27826
|
this.rootNode = rootNode;
|
|
27727
27827
|
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
27828
|
}
|
|
27740
27829
|
/**
|
|
27741
27830
|
* Process a template and extract metadata about expressions and symbols within.
|
|
@@ -27787,13 +27876,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27787
27876
|
nodeOrNodes.forEach(this.visitNode);
|
|
27788
27877
|
}
|
|
27789
27878
|
}
|
|
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
27879
|
visitTemplate(template2) {
|
|
27798
27880
|
template2.inputs.forEach(this.visitNode);
|
|
27799
27881
|
template2.outputs.forEach(this.visitNode);
|
|
@@ -27812,38 +27894,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27812
27894
|
this.symbols.set(reference2, this.rootNode);
|
|
27813
27895
|
}
|
|
27814
27896
|
}
|
|
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
27897
|
visitDeferredBlock(deferred) {
|
|
27848
27898
|
this.ingestScopedNode(deferred);
|
|
27849
27899
|
deferred.triggers.when?.value.visit(this);
|
|
@@ -27863,10 +27913,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27863
27913
|
visitDeferredBlockLoading(block) {
|
|
27864
27914
|
this.ingestScopedNode(block);
|
|
27865
27915
|
}
|
|
27866
|
-
visitSwitchBlock(block) {
|
|
27867
|
-
block.expression.visit(this);
|
|
27868
|
-
block.cases.forEach(this.visitNode);
|
|
27869
|
-
}
|
|
27870
27916
|
visitSwitchBlockCase(block) {
|
|
27871
27917
|
block.expression?.visit(this);
|
|
27872
27918
|
this.ingestScopedNode(block);
|
|
@@ -27879,9 +27925,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27879
27925
|
visitForLoopBlockEmpty(block) {
|
|
27880
27926
|
this.ingestScopedNode(block);
|
|
27881
27927
|
}
|
|
27882
|
-
visitIfBlock(block) {
|
|
27883
|
-
block.branches.forEach((node) => node.visit(this));
|
|
27884
|
-
}
|
|
27885
27928
|
visitIfBlockBranch(block) {
|
|
27886
27929
|
block.expression?.visit(this);
|
|
27887
27930
|
this.ingestScopedNode(block);
|
|
@@ -27889,11 +27932,8 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27889
27932
|
visitContent(content) {
|
|
27890
27933
|
this.ingestScopedNode(content);
|
|
27891
27934
|
}
|
|
27892
|
-
visitBoundText(text2) {
|
|
27893
|
-
text2.value.visit(this);
|
|
27894
|
-
}
|
|
27895
27935
|
visitLetDeclaration(decl) {
|
|
27896
|
-
|
|
27936
|
+
super.visitLetDeclaration(decl);
|
|
27897
27937
|
if (this.rootNode !== null) {
|
|
27898
27938
|
this.symbols.set(decl, this.rootNode);
|
|
27899
27939
|
}
|
|
@@ -27915,10 +27955,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
|
|
|
27915
27955
|
this.maybeMap(ast, ast.name);
|
|
27916
27956
|
return super.visitSafePropertyRead(ast, context);
|
|
27917
27957
|
}
|
|
27918
|
-
visitPropertyWrite(ast, context) {
|
|
27919
|
-
this.maybeMap(ast, ast.name);
|
|
27920
|
-
return super.visitPropertyWrite(ast, context);
|
|
27921
|
-
}
|
|
27922
27958
|
ingestScopedNode(node) {
|
|
27923
27959
|
const childScope = this.scope.getChildScope(node);
|
|
27924
27960
|
const binder = new _TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);
|
|
@@ -28504,6 +28540,7 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
28504
28540
|
decl.directives && declarations.push(...decl.directives.map((dir) => convertDirectiveDeclarationToMetadata(dir)));
|
|
28505
28541
|
decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
|
|
28506
28542
|
}
|
|
28543
|
+
const hasDirectiveDependencies = declarations.some(({ kind }) => kind === R3TemplateDependencyKind.Directive || kind === R3TemplateDependencyKind.NgModule);
|
|
28507
28544
|
return {
|
|
28508
28545
|
...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),
|
|
28509
28546
|
template: template2,
|
|
@@ -28518,7 +28555,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
28518
28555
|
declarationListEmitMode: 2,
|
|
28519
28556
|
relativeContextFilePath: "",
|
|
28520
28557
|
i18nUseExternalIds: true,
|
|
28521
|
-
relativeTemplatePath: null
|
|
28558
|
+
relativeTemplatePath: null,
|
|
28559
|
+
hasDirectiveDependencies
|
|
28522
28560
|
};
|
|
28523
28561
|
}
|
|
28524
28562
|
__name(convertDeclareComponentFacadeToMetadata, "convertDeclareComponentFacadeToMetadata");
|
|
@@ -28881,7 +28919,7 @@ var _Visitor3 = class {
|
|
|
28881
28919
|
merge(nodes, translations, interpolationConfig) {
|
|
28882
28920
|
this._init(_VisitorMode.Merge, interpolationConfig);
|
|
28883
28921
|
this._translations = translations;
|
|
28884
|
-
const wrapper = new Element2("wrapper", [], [], nodes, void 0, void 0, void 0);
|
|
28922
|
+
const wrapper = new Element2("wrapper", [], [], nodes, false, void 0, void 0, void 0, false);
|
|
28885
28923
|
const translatedNode = wrapper.visit(this, null);
|
|
28886
28924
|
if (this._inI18nBlock) {
|
|
28887
28925
|
this._reportError(nodes[nodes.length - 1], "Unclosed block");
|
|
@@ -29048,9 +29086,9 @@ var _Visitor3 = class {
|
|
|
29048
29086
|
this._inImplicitNode = wasInImplicitNode;
|
|
29049
29087
|
if (this._mode === _VisitorMode.Merge) {
|
|
29050
29088
|
if (node instanceof Element2) {
|
|
29051
|
-
return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
29089
|
+
return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.isVoid);
|
|
29052
29090
|
} else {
|
|
29053
|
-
return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
29091
|
+
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
29092
|
}
|
|
29055
29093
|
}
|
|
29056
29094
|
return null;
|
|
@@ -29250,7 +29288,7 @@ var _Visitor3 = class {
|
|
|
29250
29288
|
this._msgCountAtSectionStart = void 0;
|
|
29251
29289
|
}
|
|
29252
29290
|
_reportError(node, msg) {
|
|
29253
|
-
this._errors.push(new
|
|
29291
|
+
this._errors.push(new ParseError(node.sourceSpan, msg));
|
|
29254
29292
|
}
|
|
29255
29293
|
};
|
|
29256
29294
|
function _isOpeningComment(n) {
|
|
@@ -29552,7 +29590,7 @@ var XliffParser = class {
|
|
|
29552
29590
|
visitDirective(directive, context) {
|
|
29553
29591
|
}
|
|
29554
29592
|
_addError(node, message) {
|
|
29555
|
-
this._errors.push(new
|
|
29593
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29556
29594
|
}
|
|
29557
29595
|
};
|
|
29558
29596
|
var XmlToI18n$2 = class XmlToI18n {
|
|
@@ -29618,7 +29656,7 @@ var XmlToI18n$2 = class XmlToI18n {
|
|
|
29618
29656
|
this._addError(directive, "Unexpected node");
|
|
29619
29657
|
}
|
|
29620
29658
|
_addError(node, message) {
|
|
29621
|
-
this._errors.push(new
|
|
29659
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29622
29660
|
}
|
|
29623
29661
|
};
|
|
29624
29662
|
function getCtypeForTag(tag) {
|
|
@@ -29886,7 +29924,7 @@ var Xliff2Parser = class {
|
|
|
29886
29924
|
visitDirective(directive, context) {
|
|
29887
29925
|
}
|
|
29888
29926
|
_addError(node, message) {
|
|
29889
|
-
this._errors.push(new
|
|
29927
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29890
29928
|
}
|
|
29891
29929
|
};
|
|
29892
29930
|
var XmlToI18n$1 = class XmlToI18n2 {
|
|
@@ -29967,7 +30005,7 @@ var XmlToI18n$1 = class XmlToI18n2 {
|
|
|
29967
30005
|
this._addError(directive, "Unexpected node");
|
|
29968
30006
|
}
|
|
29969
30007
|
_addError(node, message) {
|
|
29970
|
-
this._errors.push(new
|
|
30008
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
29971
30009
|
}
|
|
29972
30010
|
};
|
|
29973
30011
|
function getTypeForTag(tag) {
|
|
@@ -30119,7 +30157,7 @@ var XtbParser = class {
|
|
|
30119
30157
|
this._addError(directive, "Unexpected node");
|
|
30120
30158
|
}
|
|
30121
30159
|
_addError(node, message) {
|
|
30122
|
-
this._errors.push(new
|
|
30160
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
30123
30161
|
}
|
|
30124
30162
|
};
|
|
30125
30163
|
var XmlToI18n3 = class {
|
|
@@ -30182,7 +30220,7 @@ var XmlToI18n3 = class {
|
|
|
30182
30220
|
this._addError(directive, "Unexpected node");
|
|
30183
30221
|
}
|
|
30184
30222
|
_addError(node, message) {
|
|
30185
|
-
this._errors.push(new
|
|
30223
|
+
this._errors.push(new ParseError(node.sourceSpan, message));
|
|
30186
30224
|
}
|
|
30187
30225
|
};
|
|
30188
30226
|
var TranslationBundle = class _TranslationBundle {
|
|
@@ -30330,7 +30368,7 @@ var I18nToHtmlVisitor = class {
|
|
|
30330
30368
|
return text2;
|
|
30331
30369
|
}
|
|
30332
30370
|
_addError(el, msg) {
|
|
30333
|
-
this._errors.push(new
|
|
30371
|
+
this._errors.push(new ParseError(el.sourceSpan, msg));
|
|
30334
30372
|
}
|
|
30335
30373
|
};
|
|
30336
30374
|
var I18NHtmlParser = class {
|
|
@@ -30523,7 +30561,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
30523
30561
|
function compileDeclareClassMetadata(metadata) {
|
|
30524
30562
|
const definitionMap = new DefinitionMap();
|
|
30525
30563
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
30526
|
-
definitionMap.set("version", literal("20.
|
|
30564
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
30527
30565
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30528
30566
|
definitionMap.set("type", metadata.type);
|
|
30529
30567
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30542,7 +30580,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
30542
30580
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
30543
30581
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
30544
30582
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
30545
|
-
definitionMap.set("version", literal("20.
|
|
30583
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
30546
30584
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30547
30585
|
definitionMap.set("type", metadata.type);
|
|
30548
30586
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -30611,7 +30649,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30611
30649
|
const definitionMap = new DefinitionMap();
|
|
30612
30650
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30613
30651
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30614
|
-
definitionMap.set("version", literal("20.
|
|
30652
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
30615
30653
|
definitionMap.set("type", meta.type.value);
|
|
30616
30654
|
if (meta.isStandalone !== void 0) {
|
|
30617
30655
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30938,7 +30976,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
30938
30976
|
function compileDeclareFactoryFunction(meta) {
|
|
30939
30977
|
const definitionMap = new DefinitionMap();
|
|
30940
30978
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
30941
|
-
definitionMap.set("version", literal("20.
|
|
30979
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
30942
30980
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30943
30981
|
definitionMap.set("type", meta.type.value);
|
|
30944
30982
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30961,7 +30999,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
30961
30999
|
function createInjectableDefinitionMap(meta) {
|
|
30962
31000
|
const definitionMap = new DefinitionMap();
|
|
30963
31001
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
30964
|
-
definitionMap.set("version", literal("20.
|
|
31002
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
30965
31003
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30966
31004
|
definitionMap.set("type", meta.type.value);
|
|
30967
31005
|
if (meta.providedIn !== void 0) {
|
|
@@ -30999,7 +31037,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
30999
31037
|
function createInjectorDefinitionMap(meta) {
|
|
31000
31038
|
const definitionMap = new DefinitionMap();
|
|
31001
31039
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31002
|
-
definitionMap.set("version", literal("20.
|
|
31040
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
31003
31041
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31004
31042
|
definitionMap.set("type", meta.type.value);
|
|
31005
31043
|
definitionMap.set("providers", meta.providers);
|
|
@@ -31023,7 +31061,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31023
31061
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
31024
31062
|
}
|
|
31025
31063
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31026
|
-
definitionMap.set("version", literal("20.
|
|
31064
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
31027
31065
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31028
31066
|
definitionMap.set("type", meta.type.value);
|
|
31029
31067
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31058,13 +31096,13 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31058
31096
|
function createPipeDefinitionMap(meta) {
|
|
31059
31097
|
const definitionMap = new DefinitionMap();
|
|
31060
31098
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31061
|
-
definitionMap.set("version", literal("20.
|
|
31099
|
+
definitionMap.set("version", literal("20.1.4"));
|
|
31062
31100
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31063
31101
|
definitionMap.set("type", meta.type.value);
|
|
31064
31102
|
if (meta.isStandalone !== void 0) {
|
|
31065
31103
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
31066
31104
|
}
|
|
31067
|
-
definitionMap.set("name", literal(meta.pipeName));
|
|
31105
|
+
definitionMap.set("name", literal(meta.pipeName ?? meta.name));
|
|
31068
31106
|
if (meta.pure === false) {
|
|
31069
31107
|
definitionMap.set("pure", literal(meta.pure));
|
|
31070
31108
|
}
|
|
@@ -31155,7 +31193,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31155
31193
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31156
31194
|
}
|
|
31157
31195
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31158
|
-
var VERSION = new Version("20.
|
|
31196
|
+
var VERSION = new Version("20.1.4");
|
|
31159
31197
|
publishFacade(_global);
|
|
31160
31198
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31161
31199
|
0 && (module.exports = {
|
|
@@ -31170,6 +31208,7 @@ publishFacade(_global);
|
|
|
31170
31208
|
BinaryOperator,
|
|
31171
31209
|
BinaryOperatorExpr,
|
|
31172
31210
|
BindingPipe,
|
|
31211
|
+
BindingPipeType,
|
|
31173
31212
|
BindingType,
|
|
31174
31213
|
Block,
|
|
31175
31214
|
BlockParameter,
|
|
@@ -31180,6 +31219,7 @@ publishFacade(_global);
|
|
|
31180
31219
|
Call,
|
|
31181
31220
|
Chain,
|
|
31182
31221
|
ChangeDetectionStrategy,
|
|
31222
|
+
CombinedRecursiveAstVisitor,
|
|
31183
31223
|
CommaExpr,
|
|
31184
31224
|
Comment,
|
|
31185
31225
|
CompilerConfig,
|
|
@@ -31223,7 +31263,6 @@ publishFacade(_global);
|
|
|
31223
31263
|
JSDocComment,
|
|
31224
31264
|
JitEvaluator,
|
|
31225
31265
|
KeyedRead,
|
|
31226
|
-
KeyedWrite,
|
|
31227
31266
|
LeadingComment,
|
|
31228
31267
|
LetDeclaration,
|
|
31229
31268
|
Lexer,
|
|
@@ -31256,10 +31295,8 @@ publishFacade(_global);
|
|
|
31256
31295
|
ParsedPropertyType,
|
|
31257
31296
|
ParsedVariable,
|
|
31258
31297
|
Parser,
|
|
31259
|
-
ParserError,
|
|
31260
31298
|
PrefixNot,
|
|
31261
31299
|
PropertyRead,
|
|
31262
|
-
PropertyWrite,
|
|
31263
31300
|
R3Identifiers,
|
|
31264
31301
|
R3NgModuleMetadataKind,
|
|
31265
31302
|
R3SelectorScopeMode,
|
|
@@ -31352,9 +31389,6 @@ publishFacade(_global);
|
|
|
31352
31389
|
VoidExpr,
|
|
31353
31390
|
VoidExpression,
|
|
31354
31391
|
WrappedNodeExpr,
|
|
31355
|
-
WriteKeyExpr,
|
|
31356
|
-
WritePropExpr,
|
|
31357
|
-
WriteVarExpr,
|
|
31358
31392
|
Xliff,
|
|
31359
31393
|
Xliff2,
|
|
31360
31394
|
Xmb,
|
|
@@ -31423,7 +31457,7 @@ publishFacade(_global);
|
|
|
31423
31457
|
|
|
31424
31458
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
31425
31459
|
(**
|
|
31426
|
-
* @license Angular v20.
|
|
31460
|
+
* @license Angular v20.1.4
|
|
31427
31461
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
31428
31462
|
* License: MIT
|
|
31429
31463
|
*)
|