@angular/compiler 20.0.0-next.1 → 20.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/compiler.mjs +330 -365
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +4222 -4728
- package/package.json +4 -10
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.0-next.
|
|
2
|
+
* @license Angular v20.0.0-next.3
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -399,6 +399,10 @@ class SelectorContext {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
// Attention:
|
|
402
|
+
// This file duplicates types and values from @angular/core
|
|
403
|
+
// so that we are able to make @angular/compiler independent of @angular/core.
|
|
404
|
+
// This is important to prevent a build cycle, as @angular/core needs to
|
|
405
|
+
// be compiled with the compiler.
|
|
402
406
|
// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not
|
|
403
407
|
// explicitly set.
|
|
404
408
|
const emitDistinctChangesOnlyDefaultValue = true;
|
|
@@ -484,15 +488,15 @@ function parseSelectorToR3Selector(selector) {
|
|
|
484
488
|
|
|
485
489
|
var core = /*#__PURE__*/Object.freeze({
|
|
486
490
|
__proto__: null,
|
|
487
|
-
|
|
488
|
-
get ViewEncapsulation () { return ViewEncapsulation; },
|
|
491
|
+
CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,
|
|
489
492
|
get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },
|
|
490
493
|
get InputFlags () { return InputFlags; },
|
|
491
|
-
|
|
494
|
+
get MissingTranslationStrategy () { return MissingTranslationStrategy; },
|
|
492
495
|
NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,
|
|
493
|
-
Type: Type$1,
|
|
494
496
|
get SecurityContext () { return SecurityContext; },
|
|
495
|
-
|
|
497
|
+
Type: Type$1,
|
|
498
|
+
get ViewEncapsulation () { return ViewEncapsulation; },
|
|
499
|
+
emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue,
|
|
496
500
|
parseSelectorToR3Selector: parseSelectorToR3Selector
|
|
497
501
|
});
|
|
498
502
|
|
|
@@ -663,7 +667,7 @@ function fingerprint(str) {
|
|
|
663
667
|
let lo = hash32(view, utf8.length, 102072);
|
|
664
668
|
if (hi == 0 && (lo == 0 || lo == 1)) {
|
|
665
669
|
hi = hi ^ 0x130f9bef;
|
|
666
|
-
lo = lo ^ -
|
|
670
|
+
lo = lo ^ -1801410264;
|
|
667
671
|
}
|
|
668
672
|
return (BigInt.asUintN(32, BigInt(hi)) << BigInt(32)) | BigInt.asUintN(32, BigInt(lo));
|
|
669
673
|
}
|
|
@@ -1993,7 +1997,7 @@ class IfStmt extends Statement {
|
|
|
1993
1997
|
return visitor.visitIfStmt(this, context);
|
|
1994
1998
|
}
|
|
1995
1999
|
}
|
|
1996
|
-
|
|
2000
|
+
let RecursiveAstVisitor$1 = class RecursiveAstVisitor {
|
|
1997
2001
|
visitType(ast, context) {
|
|
1998
2002
|
return ast;
|
|
1999
2003
|
}
|
|
@@ -2184,7 +2188,7 @@ class RecursiveAstVisitor$1 {
|
|
|
2184
2188
|
visitAllStatements(stmts, context) {
|
|
2185
2189
|
stmts.forEach((stmt) => stmt.visitStatement(this, context));
|
|
2186
2190
|
}
|
|
2187
|
-
}
|
|
2191
|
+
};
|
|
2188
2192
|
function leadingComment(text, multiline = false, trailingNewline = true) {
|
|
2189
2193
|
return new LeadingComment(text, multiline, trailingNewline);
|
|
2190
2194
|
}
|
|
@@ -2279,91 +2283,91 @@ function serializeTags(tags) {
|
|
|
2279
2283
|
|
|
2280
2284
|
var output_ast = /*#__PURE__*/Object.freeze({
|
|
2281
2285
|
__proto__: null,
|
|
2282
|
-
get TypeModifier () { return TypeModifier; },
|
|
2283
|
-
Type: Type,
|
|
2284
|
-
get BuiltinTypeName () { return BuiltinTypeName; },
|
|
2285
|
-
BuiltinType: BuiltinType,
|
|
2286
|
-
ExpressionType: ExpressionType,
|
|
2287
2286
|
ArrayType: ArrayType,
|
|
2288
|
-
|
|
2289
|
-
TransplantedType: TransplantedType,
|
|
2290
|
-
DYNAMIC_TYPE: DYNAMIC_TYPE,
|
|
2291
|
-
INFERRED_TYPE: INFERRED_TYPE,
|
|
2287
|
+
ArrowFunctionExpr: ArrowFunctionExpr,
|
|
2292
2288
|
BOOL_TYPE: BOOL_TYPE,
|
|
2293
|
-
INT_TYPE: INT_TYPE,
|
|
2294
|
-
NUMBER_TYPE: NUMBER_TYPE,
|
|
2295
|
-
STRING_TYPE: STRING_TYPE,
|
|
2296
|
-
FUNCTION_TYPE: FUNCTION_TYPE,
|
|
2297
|
-
NONE_TYPE: NONE_TYPE,
|
|
2298
|
-
get UnaryOperator () { return UnaryOperator; },
|
|
2299
2289
|
get BinaryOperator () { return BinaryOperator; },
|
|
2300
|
-
|
|
2301
|
-
|
|
2290
|
+
BinaryOperatorExpr: BinaryOperatorExpr,
|
|
2291
|
+
BuiltinType: BuiltinType,
|
|
2292
|
+
get BuiltinTypeName () { return BuiltinTypeName; },
|
|
2293
|
+
CommaExpr: CommaExpr,
|
|
2294
|
+
ConditionalExpr: ConditionalExpr,
|
|
2295
|
+
DYNAMIC_TYPE: DYNAMIC_TYPE,
|
|
2296
|
+
DeclareFunctionStmt: DeclareFunctionStmt,
|
|
2297
|
+
DeclareVarStmt: DeclareVarStmt,
|
|
2298
|
+
DynamicImportExpr: DynamicImportExpr,
|
|
2302
2299
|
Expression: Expression,
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
VoidExpr: VoidExpr,
|
|
2306
|
-
WrappedNodeExpr: WrappedNodeExpr,
|
|
2307
|
-
WriteVarExpr: WriteVarExpr,
|
|
2308
|
-
WriteKeyExpr: WriteKeyExpr,
|
|
2309
|
-
WritePropExpr: WritePropExpr,
|
|
2310
|
-
InvokeFunctionExpr: InvokeFunctionExpr,
|
|
2311
|
-
TaggedTemplateLiteralExpr: TaggedTemplateLiteralExpr,
|
|
2312
|
-
InstantiateExpr: InstantiateExpr,
|
|
2313
|
-
LiteralExpr: LiteralExpr,
|
|
2314
|
-
TemplateLiteralExpr: TemplateLiteralExpr,
|
|
2315
|
-
TemplateLiteralElementExpr: TemplateLiteralElementExpr,
|
|
2316
|
-
LiteralPiece: LiteralPiece,
|
|
2317
|
-
PlaceholderPiece: PlaceholderPiece,
|
|
2318
|
-
LocalizedString: LocalizedString,
|
|
2300
|
+
ExpressionStatement: ExpressionStatement,
|
|
2301
|
+
ExpressionType: ExpressionType,
|
|
2319
2302
|
ExternalExpr: ExternalExpr,
|
|
2320
2303
|
ExternalReference: ExternalReference,
|
|
2321
|
-
|
|
2322
|
-
DynamicImportExpr: DynamicImportExpr,
|
|
2323
|
-
NotExpr: NotExpr,
|
|
2304
|
+
FUNCTION_TYPE: FUNCTION_TYPE,
|
|
2324
2305
|
FnParam: FnParam,
|
|
2325
2306
|
FunctionExpr: FunctionExpr,
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2307
|
+
INFERRED_TYPE: INFERRED_TYPE,
|
|
2308
|
+
INT_TYPE: INT_TYPE,
|
|
2309
|
+
IfStmt: IfStmt,
|
|
2310
|
+
InstantiateExpr: InstantiateExpr,
|
|
2311
|
+
InvokeFunctionExpr: InvokeFunctionExpr,
|
|
2312
|
+
JSDocComment: JSDocComment,
|
|
2313
|
+
LeadingComment: LeadingComment,
|
|
2332
2314
|
LiteralArrayExpr: LiteralArrayExpr,
|
|
2315
|
+
LiteralExpr: LiteralExpr,
|
|
2333
2316
|
LiteralMapEntry: LiteralMapEntry,
|
|
2334
2317
|
LiteralMapExpr: LiteralMapExpr,
|
|
2335
|
-
|
|
2318
|
+
LiteralPiece: LiteralPiece,
|
|
2319
|
+
LocalizedString: LocalizedString,
|
|
2320
|
+
MapType: MapType,
|
|
2321
|
+
NONE_TYPE: NONE_TYPE,
|
|
2336
2322
|
NULL_EXPR: NULL_EXPR,
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
ExpressionStatement: ExpressionStatement,
|
|
2345
|
-
ReturnStatement: ReturnStatement,
|
|
2346
|
-
IfStmt: IfStmt,
|
|
2323
|
+
NUMBER_TYPE: NUMBER_TYPE,
|
|
2324
|
+
NotExpr: NotExpr,
|
|
2325
|
+
ParenthesizedExpr: ParenthesizedExpr,
|
|
2326
|
+
PlaceholderPiece: PlaceholderPiece,
|
|
2327
|
+
ReadKeyExpr: ReadKeyExpr,
|
|
2328
|
+
ReadPropExpr: ReadPropExpr,
|
|
2329
|
+
ReadVarExpr: ReadVarExpr,
|
|
2347
2330
|
RecursiveAstVisitor: RecursiveAstVisitor$1,
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2331
|
+
ReturnStatement: ReturnStatement,
|
|
2332
|
+
STRING_TYPE: STRING_TYPE,
|
|
2333
|
+
Statement: Statement,
|
|
2334
|
+
get StmtModifier () { return StmtModifier; },
|
|
2335
|
+
TYPED_NULL_EXPR: TYPED_NULL_EXPR,
|
|
2336
|
+
TaggedTemplateLiteralExpr: TaggedTemplateLiteralExpr,
|
|
2337
|
+
TemplateLiteralElementExpr: TemplateLiteralElementExpr,
|
|
2338
|
+
TemplateLiteralExpr: TemplateLiteralExpr,
|
|
2339
|
+
TransplantedType: TransplantedType,
|
|
2340
|
+
Type: Type,
|
|
2341
|
+
get TypeModifier () { return TypeModifier; },
|
|
2342
|
+
TypeofExpr: TypeofExpr,
|
|
2343
|
+
get UnaryOperator () { return UnaryOperator; },
|
|
2344
|
+
UnaryOperatorExpr: UnaryOperatorExpr,
|
|
2345
|
+
VoidExpr: VoidExpr,
|
|
2346
|
+
WrappedNodeExpr: WrappedNodeExpr,
|
|
2347
|
+
WriteKeyExpr: WriteKeyExpr,
|
|
2348
|
+
WritePropExpr: WritePropExpr,
|
|
2349
|
+
WriteVarExpr: WriteVarExpr,
|
|
2350
|
+
areAllEquivalent: areAllEquivalent,
|
|
2351
|
+
arrowFn: arrowFn,
|
|
2352
|
+
expressionType: expressionType,
|
|
2353
|
+
fn: fn,
|
|
2354
|
+
ifStmt: ifStmt,
|
|
2351
2355
|
importExpr: importExpr,
|
|
2352
2356
|
importType: importType,
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2357
|
+
isNull: isNull,
|
|
2358
|
+
jsDocComment: jsDocComment,
|
|
2359
|
+
leadingComment: leadingComment,
|
|
2360
|
+
literal: literal,
|
|
2356
2361
|
literalArr: literalArr,
|
|
2357
2362
|
literalMap: literalMap,
|
|
2358
|
-
|
|
2363
|
+
localizedString: localizedString,
|
|
2359
2364
|
not: not,
|
|
2360
|
-
|
|
2361
|
-
arrowFn: arrowFn,
|
|
2362
|
-
ifStmt: ifStmt,
|
|
2365
|
+
nullSafeIsEquivalent: nullSafeIsEquivalent,
|
|
2363
2366
|
taggedTemplate: taggedTemplate,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
+
transplantedType: transplantedType,
|
|
2368
|
+
typeofExpr: typeofExpr,
|
|
2369
|
+
unary: unary,
|
|
2370
|
+
variable: variable
|
|
2367
2371
|
});
|
|
2368
2372
|
|
|
2369
2373
|
const CONSTANT_PREFIX = '_c';
|
|
@@ -3167,13 +3171,6 @@ function _splitAt(input, character, defaultValues) {
|
|
|
3167
3171
|
function noUndefined(val) {
|
|
3168
3172
|
return val === undefined ? null : val;
|
|
3169
3173
|
}
|
|
3170
|
-
function error(msg) {
|
|
3171
|
-
throw new Error(`Internal Error: ${msg}`);
|
|
3172
|
-
}
|
|
3173
|
-
// Escape characters that have a special meaning in Regular Expressions
|
|
3174
|
-
function escapeRegExp(s) {
|
|
3175
|
-
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
|
3176
|
-
}
|
|
3177
3174
|
function utf8Encode(str) {
|
|
3178
3175
|
let encoded = [];
|
|
3179
3176
|
for (let index = 0; index < str.length; index++) {
|
|
@@ -3244,29 +3241,6 @@ class Version {
|
|
|
3244
3241
|
}
|
|
3245
3242
|
}
|
|
3246
3243
|
const _global = globalThis;
|
|
3247
|
-
function newArray(size, value) {
|
|
3248
|
-
const list = [];
|
|
3249
|
-
for (let i = 0; i < size; i++) {
|
|
3250
|
-
list.push(value);
|
|
3251
|
-
}
|
|
3252
|
-
return list;
|
|
3253
|
-
}
|
|
3254
|
-
/**
|
|
3255
|
-
* Partitions a given array into 2 arrays, based on a boolean value returned by the condition
|
|
3256
|
-
* function.
|
|
3257
|
-
*
|
|
3258
|
-
* @param arr Input array that should be partitioned
|
|
3259
|
-
* @param conditionFn Condition function that is called for each item in a given array and returns a
|
|
3260
|
-
* boolean value.
|
|
3261
|
-
*/
|
|
3262
|
-
function partitionArray(arr, conditionFn) {
|
|
3263
|
-
const truthy = [];
|
|
3264
|
-
const falsy = [];
|
|
3265
|
-
for (const item of arr) {
|
|
3266
|
-
(conditionFn(item) ? truthy : falsy).push(item);
|
|
3267
|
-
}
|
|
3268
|
-
return [truthy, falsy];
|
|
3269
|
-
}
|
|
3270
3244
|
const V1_TO_18 = /^([1-9]|1[0-8])\./;
|
|
3271
3245
|
function getJitStandaloneDefaultForVersion(version) {
|
|
3272
3246
|
if (version.startsWith('0.')) {
|
|
@@ -3981,20 +3955,10 @@ function typeWithParameters(type, numParams) {
|
|
|
3981
3955
|
}
|
|
3982
3956
|
return expressionType(type, undefined, params);
|
|
3983
3957
|
}
|
|
3984
|
-
const ANIMATE_SYMBOL_PREFIX = '@';
|
|
3985
|
-
function prepareSyntheticPropertyName(name) {
|
|
3986
|
-
return `${ANIMATE_SYMBOL_PREFIX}${name}`;
|
|
3987
|
-
}
|
|
3988
|
-
function prepareSyntheticListenerName(name, phase) {
|
|
3989
|
-
return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`;
|
|
3990
|
-
}
|
|
3991
3958
|
function getSafePropertyAccessString(accessor, name) {
|
|
3992
3959
|
const escapedName = escapeIdentifier(name, false, false);
|
|
3993
3960
|
return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`;
|
|
3994
3961
|
}
|
|
3995
|
-
function prepareSyntheticListenerFunctionName(name, phase) {
|
|
3996
|
-
return `animation_${name}_${phase}`;
|
|
3997
|
-
}
|
|
3998
3962
|
function jitOnlyGuardedExpression(expr) {
|
|
3999
3963
|
return guardedExpression('ngJitMode', expr);
|
|
4000
3964
|
}
|
|
@@ -4292,11 +4256,11 @@ class ASTWithName extends AST {
|
|
|
4292
4256
|
this.nameSpan = nameSpan;
|
|
4293
4257
|
}
|
|
4294
4258
|
}
|
|
4295
|
-
|
|
4259
|
+
let EmptyExpr$1 = class EmptyExpr extends AST {
|
|
4296
4260
|
visit(visitor, context = null) {
|
|
4297
4261
|
// do nothing
|
|
4298
4262
|
}
|
|
4299
|
-
}
|
|
4263
|
+
};
|
|
4300
4264
|
class ImplicitReceiver extends AST {
|
|
4301
4265
|
visit(visitor, context = null) {
|
|
4302
4266
|
return visitor.visitImplicitReceiver(this, context);
|
|
@@ -4464,7 +4428,7 @@ class LiteralMap extends AST {
|
|
|
4464
4428
|
return visitor.visitLiteralMap(this, context);
|
|
4465
4429
|
}
|
|
4466
4430
|
}
|
|
4467
|
-
|
|
4431
|
+
let Interpolation$1 = class Interpolation extends AST {
|
|
4468
4432
|
strings;
|
|
4469
4433
|
expressions;
|
|
4470
4434
|
constructor(span, sourceSpan, strings, expressions) {
|
|
@@ -4475,7 +4439,7 @@ class Interpolation$1 extends AST {
|
|
|
4475
4439
|
visit(visitor, context = null) {
|
|
4476
4440
|
return visitor.visitInterpolation(this, context);
|
|
4477
4441
|
}
|
|
4478
|
-
}
|
|
4442
|
+
};
|
|
4479
4443
|
class Binary extends AST {
|
|
4480
4444
|
operation;
|
|
4481
4445
|
left;
|
|
@@ -4633,6 +4597,16 @@ class TemplateLiteralElement extends AST {
|
|
|
4633
4597
|
return visitor.visitTemplateLiteralElement(this, context);
|
|
4634
4598
|
}
|
|
4635
4599
|
}
|
|
4600
|
+
class ParenthesizedExpression extends AST {
|
|
4601
|
+
expression;
|
|
4602
|
+
constructor(span, sourceSpan, expression) {
|
|
4603
|
+
super(span, sourceSpan);
|
|
4604
|
+
this.expression = expression;
|
|
4605
|
+
}
|
|
4606
|
+
visit(visitor, context) {
|
|
4607
|
+
return visitor.visitParenthesizedExpression(this, context);
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4636
4610
|
/**
|
|
4637
4611
|
* Records the absolute position of a text span in a source file, where `start` and `end` are the
|
|
4638
4612
|
* starting and ending byte offsets, respectively, of the text span in a source file.
|
|
@@ -4799,6 +4773,9 @@ class RecursiveAstVisitor {
|
|
|
4799
4773
|
this.visit(ast.tag, context);
|
|
4800
4774
|
this.visit(ast.template, context);
|
|
4801
4775
|
}
|
|
4776
|
+
visitParenthesizedExpression(ast, context) {
|
|
4777
|
+
this.visit(ast.expression, context);
|
|
4778
|
+
}
|
|
4802
4779
|
// This is not part of the AstVisitor interface, just a helper method
|
|
4803
4780
|
visitAll(asts, context) {
|
|
4804
4781
|
for (const ast of asts) {
|
|
@@ -4960,7 +4937,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
4960
4937
|
* the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']`
|
|
4961
4938
|
* is true.
|
|
4962
4939
|
*/
|
|
4963
|
-
|
|
4940
|
+
let Comment$1 = class Comment {
|
|
4964
4941
|
value;
|
|
4965
4942
|
sourceSpan;
|
|
4966
4943
|
constructor(value, sourceSpan) {
|
|
@@ -4970,8 +4947,8 @@ class Comment$1 {
|
|
|
4970
4947
|
visit(_visitor) {
|
|
4971
4948
|
throw new Error('visit() not implemented for Comment');
|
|
4972
4949
|
}
|
|
4973
|
-
}
|
|
4974
|
-
|
|
4950
|
+
};
|
|
4951
|
+
let Text$3 = class Text {
|
|
4975
4952
|
value;
|
|
4976
4953
|
sourceSpan;
|
|
4977
4954
|
constructor(value, sourceSpan) {
|
|
@@ -4981,7 +4958,7 @@ class Text$3 {
|
|
|
4981
4958
|
visit(visitor) {
|
|
4982
4959
|
return visitor.visitText(this);
|
|
4983
4960
|
}
|
|
4984
|
-
}
|
|
4961
|
+
};
|
|
4985
4962
|
class BoundText {
|
|
4986
4963
|
value;
|
|
4987
4964
|
sourceSpan;
|
|
@@ -5082,7 +5059,7 @@ class BoundEvent {
|
|
|
5082
5059
|
return visitor.visitBoundEvent(this);
|
|
5083
5060
|
}
|
|
5084
5061
|
}
|
|
5085
|
-
|
|
5062
|
+
let Element$1 = class Element {
|
|
5086
5063
|
name;
|
|
5087
5064
|
attributes;
|
|
5088
5065
|
inputs;
|
|
@@ -5108,7 +5085,7 @@ class Element$1 {
|
|
|
5108
5085
|
visit(visitor) {
|
|
5109
5086
|
return visitor.visitElement(this);
|
|
5110
5087
|
}
|
|
5111
|
-
}
|
|
5088
|
+
};
|
|
5112
5089
|
class DeferredTrigger {
|
|
5113
5090
|
nameSpan;
|
|
5114
5091
|
sourceSpan;
|
|
@@ -5379,7 +5356,7 @@ class UnknownBlock {
|
|
|
5379
5356
|
return visitor.visitUnknownBlock(this);
|
|
5380
5357
|
}
|
|
5381
5358
|
}
|
|
5382
|
-
|
|
5359
|
+
let LetDeclaration$1 = class LetDeclaration {
|
|
5383
5360
|
name;
|
|
5384
5361
|
value;
|
|
5385
5362
|
sourceSpan;
|
|
@@ -5395,7 +5372,7 @@ class LetDeclaration$1 {
|
|
|
5395
5372
|
visit(visitor) {
|
|
5396
5373
|
return visitor.visitLetDeclaration(this);
|
|
5397
5374
|
}
|
|
5398
|
-
}
|
|
5375
|
+
};
|
|
5399
5376
|
class Template {
|
|
5400
5377
|
tagName;
|
|
5401
5378
|
attributes;
|
|
@@ -5484,7 +5461,7 @@ class Reference {
|
|
|
5484
5461
|
return visitor.visitReference(this);
|
|
5485
5462
|
}
|
|
5486
5463
|
}
|
|
5487
|
-
|
|
5464
|
+
let Icu$1 = class Icu {
|
|
5488
5465
|
vars;
|
|
5489
5466
|
placeholders;
|
|
5490
5467
|
sourceSpan;
|
|
@@ -5498,8 +5475,30 @@ class Icu$1 {
|
|
|
5498
5475
|
visit(visitor) {
|
|
5499
5476
|
return visitor.visitIcu(this);
|
|
5500
5477
|
}
|
|
5478
|
+
};
|
|
5479
|
+
/**
|
|
5480
|
+
* AST node that represents the host element of a directive.
|
|
5481
|
+
* This node is used only for type checking purposes and cannot be produced from a user's template.
|
|
5482
|
+
*/
|
|
5483
|
+
class HostElement {
|
|
5484
|
+
tagNames;
|
|
5485
|
+
bindings;
|
|
5486
|
+
listeners;
|
|
5487
|
+
sourceSpan;
|
|
5488
|
+
constructor(tagNames, bindings, listeners, sourceSpan) {
|
|
5489
|
+
this.tagNames = tagNames;
|
|
5490
|
+
this.bindings = bindings;
|
|
5491
|
+
this.listeners = listeners;
|
|
5492
|
+
this.sourceSpan = sourceSpan;
|
|
5493
|
+
if (tagNames.length === 0) {
|
|
5494
|
+
throw new Error('HostElement must have at least one tag name.');
|
|
5495
|
+
}
|
|
5496
|
+
}
|
|
5497
|
+
visit() {
|
|
5498
|
+
throw new Error(`HostElement cannot be visited`);
|
|
5499
|
+
}
|
|
5501
5500
|
}
|
|
5502
|
-
|
|
5501
|
+
let RecursiveVisitor$1 = class RecursiveVisitor {
|
|
5503
5502
|
visitElement(element) {
|
|
5504
5503
|
visitAll$1(this, element.attributes);
|
|
5505
5504
|
visitAll$1(this, element.inputs);
|
|
@@ -5563,7 +5562,7 @@ class RecursiveVisitor$1 {
|
|
|
5563
5562
|
visitDeferredTrigger(trigger) { }
|
|
5564
5563
|
visitUnknownBlock(block) { }
|
|
5565
5564
|
visitLetDeclaration(decl) { }
|
|
5566
|
-
}
|
|
5565
|
+
};
|
|
5567
5566
|
function visitAll$1(visitor, nodes) {
|
|
5568
5567
|
const result = [];
|
|
5569
5568
|
if (visitor.visit) {
|
|
@@ -5627,7 +5626,7 @@ class Message {
|
|
|
5627
5626
|
}
|
|
5628
5627
|
}
|
|
5629
5628
|
}
|
|
5630
|
-
|
|
5629
|
+
let Text$2 = class Text {
|
|
5631
5630
|
value;
|
|
5632
5631
|
sourceSpan;
|
|
5633
5632
|
constructor(value, sourceSpan) {
|
|
@@ -5637,7 +5636,7 @@ class Text$2 {
|
|
|
5637
5636
|
visit(visitor, context) {
|
|
5638
5637
|
return visitor.visitText(this, context);
|
|
5639
5638
|
}
|
|
5640
|
-
}
|
|
5639
|
+
};
|
|
5641
5640
|
// TODO(vicb): do we really need this node (vs an array) ?
|
|
5642
5641
|
class Container {
|
|
5643
5642
|
children;
|
|
@@ -5900,7 +5899,7 @@ class SimplePlaceholderMapper extends RecurseVisitor {
|
|
|
5900
5899
|
}
|
|
5901
5900
|
}
|
|
5902
5901
|
|
|
5903
|
-
|
|
5902
|
+
let _Visitor$2 = class _Visitor {
|
|
5904
5903
|
visitTag(tag) {
|
|
5905
5904
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
5906
5905
|
if (tag.children.length == 0) {
|
|
@@ -5924,7 +5923,7 @@ class _Visitor$2 {
|
|
|
5924
5923
|
visitDoctype(doctype) {
|
|
5925
5924
|
return `<!DOCTYPE ${doctype.rootTag} [\n${doctype.dtd}\n]>`;
|
|
5926
5925
|
}
|
|
5927
|
-
}
|
|
5926
|
+
};
|
|
5928
5927
|
const _visitor = new _Visitor$2();
|
|
5929
5928
|
function serialize$1(nodes) {
|
|
5930
5929
|
return nodes.map((node) => node.visit(_visitor)).join('');
|
|
@@ -5966,7 +5965,7 @@ class Tag {
|
|
|
5966
5965
|
return visitor.visitTag(this);
|
|
5967
5966
|
}
|
|
5968
5967
|
}
|
|
5969
|
-
|
|
5968
|
+
let Text$1 = class Text {
|
|
5970
5969
|
value;
|
|
5971
5970
|
constructor(unescapedValue) {
|
|
5972
5971
|
this.value = escapeXml(unescapedValue);
|
|
@@ -5974,7 +5973,7 @@ class Text$1 {
|
|
|
5974
5973
|
visit(visitor) {
|
|
5975
5974
|
return visitor.visitText(this);
|
|
5976
5975
|
}
|
|
5977
|
-
}
|
|
5976
|
+
};
|
|
5978
5977
|
class CR extends Text$1 {
|
|
5979
5978
|
constructor(ws = 0) {
|
|
5980
5979
|
super(`\n${new Array(ws + 1).join(' ')}`);
|
|
@@ -6066,7 +6065,7 @@ class Xmb extends Serializer {
|
|
|
6066
6065
|
return new SimplePlaceholderMapper(message, toPublicName);
|
|
6067
6066
|
}
|
|
6068
6067
|
}
|
|
6069
|
-
|
|
6068
|
+
let _Visitor$1 = class _Visitor {
|
|
6070
6069
|
visitText(text, context) {
|
|
6071
6070
|
return [new Text$1(text.value)];
|
|
6072
6071
|
}
|
|
@@ -6140,7 +6139,7 @@ class _Visitor$1 {
|
|
|
6140
6139
|
serialize(nodes) {
|
|
6141
6140
|
return [].concat(...nodes.map((node) => node.visit(this)));
|
|
6142
6141
|
}
|
|
6143
|
-
}
|
|
6142
|
+
};
|
|
6144
6143
|
function digest(message) {
|
|
6145
6144
|
return decimalDigest(message);
|
|
6146
6145
|
}
|
|
@@ -6184,13 +6183,6 @@ function hasI18nAttrs(element) {
|
|
|
6184
6183
|
function icuFromI18nMessage(message) {
|
|
6185
6184
|
return message.nodes[0];
|
|
6186
6185
|
}
|
|
6187
|
-
function placeholdersToParams(placeholders) {
|
|
6188
|
-
const params = {};
|
|
6189
|
-
placeholders.forEach((values, key) => {
|
|
6190
|
-
params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]);
|
|
6191
|
-
});
|
|
6192
|
-
return params;
|
|
6193
|
-
}
|
|
6194
6186
|
/**
|
|
6195
6187
|
* Format the placeholder names in a map of placeholders to expressions.
|
|
6196
6188
|
*
|
|
@@ -6268,9 +6260,6 @@ function temporaryAllocator(pushStatement, name) {
|
|
|
6268
6260
|
return temp;
|
|
6269
6261
|
};
|
|
6270
6262
|
}
|
|
6271
|
-
function invalid(arg) {
|
|
6272
|
-
throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`);
|
|
6273
|
-
}
|
|
6274
6263
|
function asLiteral(value) {
|
|
6275
6264
|
if (Array.isArray(value)) {
|
|
6276
6265
|
return literalArr(value.map(asLiteral));
|
|
@@ -6638,8 +6627,6 @@ const $LBRACE = 123;
|
|
|
6638
6627
|
const $BAR = 124;
|
|
6639
6628
|
const $RBRACE = 125;
|
|
6640
6629
|
const $NBSP = 160;
|
|
6641
|
-
const $PIPE = 124;
|
|
6642
|
-
const $TILDA = 126;
|
|
6643
6630
|
const $AT = 64;
|
|
6644
6631
|
const $BT = 96;
|
|
6645
6632
|
function isWhitespace(code) {
|
|
@@ -7352,9 +7339,7 @@ function compileNgModule(meta) {
|
|
|
7352
7339
|
statements.push(setNgModuleScopeCall);
|
|
7353
7340
|
}
|
|
7354
7341
|
}
|
|
7355
|
-
else
|
|
7356
|
-
// Selector scope emit was not requested, so skip it.
|
|
7357
|
-
}
|
|
7342
|
+
else ;
|
|
7358
7343
|
if (meta.schemas !== null && meta.schemas.length > 0) {
|
|
7359
7344
|
definitionMap.set('schemas', literalArr(meta.schemas.map((ref) => ref.value)));
|
|
7360
7345
|
}
|
|
@@ -10547,9 +10532,7 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
10547
10532
|
expr.body = transformExpressionsInExpression(expr.body, transform, flags);
|
|
10548
10533
|
}
|
|
10549
10534
|
}
|
|
10550
|
-
else if (expr instanceof WrappedNodeExpr)
|
|
10551
|
-
// TODO: Do we need to transform any TS nodes nested inside of this expression?
|
|
10552
|
-
}
|
|
10535
|
+
else if (expr instanceof WrappedNodeExpr) ;
|
|
10553
10536
|
else if (expr instanceof TemplateLiteralExpr) {
|
|
10554
10537
|
for (let i = 0; i < expr.expressions.length; i++) {
|
|
10555
10538
|
expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform, flags);
|
|
@@ -10560,9 +10543,7 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
10560
10543
|
}
|
|
10561
10544
|
else if (expr instanceof ReadVarExpr ||
|
|
10562
10545
|
expr instanceof ExternalExpr ||
|
|
10563
|
-
expr instanceof LiteralExpr)
|
|
10564
|
-
// No action for these types.
|
|
10565
|
-
}
|
|
10546
|
+
expr instanceof LiteralExpr) ;
|
|
10566
10547
|
else {
|
|
10567
10548
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
10568
10549
|
}
|
|
@@ -12465,11 +12446,6 @@ function deduplicateTextBindings(job) {
|
|
|
12465
12446
|
OpList.remove(op);
|
|
12466
12447
|
}
|
|
12467
12448
|
}
|
|
12468
|
-
else {
|
|
12469
|
-
// TODO: Determine the correct behavior. It would probably make sense to merge multiple
|
|
12470
|
-
// style and class attributes. Alternatively we could just throw an error, as HTML
|
|
12471
|
-
// doesn't permit duplicate attributes.
|
|
12472
|
-
}
|
|
12473
12449
|
}
|
|
12474
12450
|
seenForElement.add(op.name);
|
|
12475
12451
|
seen.set(op.target, seenForElement);
|
|
@@ -12600,9 +12576,9 @@ function resolveDeferTargetNames(job) {
|
|
|
12600
12576
|
}
|
|
12601
12577
|
}
|
|
12602
12578
|
}
|
|
12603
|
-
|
|
12579
|
+
let Scope$1 = class Scope {
|
|
12604
12580
|
targets = new Map();
|
|
12605
|
-
}
|
|
12581
|
+
};
|
|
12606
12582
|
|
|
12607
12583
|
const REPLACEMENTS = new Map([
|
|
12608
12584
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
@@ -12658,14 +12634,6 @@ function expandSafeReads(job) {
|
|
|
12658
12634
|
}
|
|
12659
12635
|
}
|
|
12660
12636
|
}
|
|
12661
|
-
// A lookup set of all the expression kinds that require a temporary variable to be generated.
|
|
12662
|
-
const requiresTemporary = [
|
|
12663
|
-
InvokeFunctionExpr,
|
|
12664
|
-
LiteralArrayExpr,
|
|
12665
|
-
LiteralMapExpr,
|
|
12666
|
-
SafeInvokeFunctionExpr,
|
|
12667
|
-
PipeBindingExpr,
|
|
12668
|
-
].map((e) => e.constructor.name);
|
|
12669
12637
|
function needsTemporaryInSafeAccess(e) {
|
|
12670
12638
|
// TODO: We probably want to use an expression visitor to recursively visit all descendents.
|
|
12671
12639
|
// However, that would potentially do a lot of extra work (because it cannot short circuit), so we
|
|
@@ -12693,6 +12661,9 @@ function needsTemporaryInSafeAccess(e) {
|
|
|
12693
12661
|
else if (e instanceof ReadKeyExpr) {
|
|
12694
12662
|
return needsTemporaryInSafeAccess(e.receiver) || needsTemporaryInSafeAccess(e.index);
|
|
12695
12663
|
}
|
|
12664
|
+
else if (e instanceof ParenthesizedExpr) {
|
|
12665
|
+
return needsTemporaryInSafeAccess(e.expr);
|
|
12666
|
+
}
|
|
12696
12667
|
// TODO: Switch to a method which is exhaustive of newly added expression subtypes.
|
|
12697
12668
|
return (e instanceof InvokeFunctionExpr ||
|
|
12698
12669
|
e instanceof LiteralArrayExpr ||
|
|
@@ -12823,7 +12794,7 @@ function ternaryTransform(e) {
|
|
|
12823
12794
|
if (!(e instanceof SafeTernaryExpr)) {
|
|
12824
12795
|
return e;
|
|
12825
12796
|
}
|
|
12826
|
-
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
12797
|
+
return new ParenthesizedExpr(new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr));
|
|
12827
12798
|
}
|
|
12828
12799
|
|
|
12829
12800
|
/**
|
|
@@ -12937,7 +12908,7 @@ function createI18nMessage(job, context, messagePlaceholder) {
|
|
|
12937
12908
|
let formattedParams = formatParams(context.params);
|
|
12938
12909
|
const formattedPostprocessingParams = formatParams(context.postprocessingParams);
|
|
12939
12910
|
let needsPostprocessing = [...context.params.values()].some((v) => v.length > 1);
|
|
12940
|
-
return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message,
|
|
12911
|
+
return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
12941
12912
|
}
|
|
12942
12913
|
/**
|
|
12943
12914
|
* Formats an ICU placeholder into a single string with expression placeholders.
|
|
@@ -13409,9 +13380,6 @@ function parseProperty(name) {
|
|
|
13409
13380
|
return { property, suffix };
|
|
13410
13381
|
}
|
|
13411
13382
|
|
|
13412
|
-
function mapEntry(key, value) {
|
|
13413
|
-
return { key, value, quoted: false };
|
|
13414
|
-
}
|
|
13415
13383
|
function mapLiteral(obj, quoted = false) {
|
|
13416
13384
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
13417
13385
|
key,
|
|
@@ -17031,7 +16999,7 @@ class ParseTreeResult {
|
|
|
17031
16999
|
this.errors = errors;
|
|
17032
17000
|
}
|
|
17033
17001
|
}
|
|
17034
|
-
|
|
17002
|
+
let Parser$1 = class Parser {
|
|
17035
17003
|
getTagDefinition;
|
|
17036
17004
|
constructor(getTagDefinition) {
|
|
17037
17005
|
this.getTagDefinition = getTagDefinition;
|
|
@@ -17042,7 +17010,7 @@ class Parser$1 {
|
|
|
17042
17010
|
parser.build();
|
|
17043
17011
|
return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));
|
|
17044
17012
|
}
|
|
17045
|
-
}
|
|
17013
|
+
};
|
|
17046
17014
|
class _TreeBuilder {
|
|
17047
17015
|
tokens;
|
|
17048
17016
|
getTagDefinition;
|
|
@@ -17723,9 +17691,6 @@ function transformTextToken({ type, parts, sourceSpan }, transform) {
|
|
|
17723
17691
|
function processWhitespace(text) {
|
|
17724
17692
|
return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' ');
|
|
17725
17693
|
}
|
|
17726
|
-
function removeWhitespaces(htmlAstWithErrors, preserveSignificantWhitespace) {
|
|
17727
|
-
return new ParseTreeResult(visitAllWithSiblings(new WhitespaceVisitor(preserveSignificantWhitespace), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);
|
|
17728
|
-
}
|
|
17729
17694
|
function visitAllWithSiblings(visitor, nodes) {
|
|
17730
17695
|
const result = [];
|
|
17731
17696
|
nodes.forEach((ast, i) => {
|
|
@@ -18078,9 +18043,7 @@ class _Scanner {
|
|
|
18078
18043
|
let hasSeparators = false;
|
|
18079
18044
|
this.advance(); // Skip initial digit.
|
|
18080
18045
|
while (true) {
|
|
18081
|
-
if (isDigit(this.peek))
|
|
18082
|
-
// Do nothing.
|
|
18083
|
-
}
|
|
18046
|
+
if (isDigit(this.peek)) ;
|
|
18084
18047
|
else if (this.peek === $_) {
|
|
18085
18048
|
// Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is
|
|
18086
18049
|
// valid while `_101` and `101_` are not. The separator can't be next to the decimal
|
|
@@ -18554,7 +18517,6 @@ class _ParseAST {
|
|
|
18554
18517
|
parseFlags;
|
|
18555
18518
|
errors;
|
|
18556
18519
|
offset;
|
|
18557
|
-
lastUnary = null;
|
|
18558
18520
|
rparensExpected = 0;
|
|
18559
18521
|
rbracketsExpected = 0;
|
|
18560
18522
|
rbracesExpected = 0;
|
|
@@ -18945,7 +18907,10 @@ class _ParseAST {
|
|
|
18945
18907
|
// This aligns with Javascript semantics which require any unary operator preceeding the
|
|
18946
18908
|
// exponentiation operation to be explicitly grouped as either applying to the base or result
|
|
18947
18909
|
// of the exponentiation operation.
|
|
18948
|
-
if (result
|
|
18910
|
+
if (result instanceof Unary ||
|
|
18911
|
+
result instanceof PrefixNot ||
|
|
18912
|
+
result instanceof TypeofExpression ||
|
|
18913
|
+
result instanceof VoidExpression) {
|
|
18949
18914
|
this.error('Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence');
|
|
18950
18915
|
}
|
|
18951
18916
|
this.advance();
|
|
@@ -18963,28 +18928,28 @@ class _ParseAST {
|
|
|
18963
18928
|
case '+':
|
|
18964
18929
|
this.advance();
|
|
18965
18930
|
result = this.parsePrefix();
|
|
18966
|
-
return
|
|
18931
|
+
return Unary.createPlus(this.span(start), this.sourceSpan(start), result);
|
|
18967
18932
|
case '-':
|
|
18968
18933
|
this.advance();
|
|
18969
18934
|
result = this.parsePrefix();
|
|
18970
|
-
return
|
|
18935
|
+
return Unary.createMinus(this.span(start), this.sourceSpan(start), result);
|
|
18971
18936
|
case '!':
|
|
18972
18937
|
this.advance();
|
|
18973
18938
|
result = this.parsePrefix();
|
|
18974
|
-
return
|
|
18939
|
+
return new PrefixNot(this.span(start), this.sourceSpan(start), result);
|
|
18975
18940
|
}
|
|
18976
18941
|
}
|
|
18977
18942
|
else if (this.next.isKeywordTypeof()) {
|
|
18978
18943
|
this.advance();
|
|
18979
18944
|
const start = this.inputIndex;
|
|
18980
18945
|
let result = this.parsePrefix();
|
|
18981
|
-
return
|
|
18946
|
+
return new TypeofExpression(this.span(start), this.sourceSpan(start), result);
|
|
18982
18947
|
}
|
|
18983
18948
|
else if (this.next.isKeywordVoid()) {
|
|
18984
18949
|
this.advance();
|
|
18985
18950
|
const start = this.inputIndex;
|
|
18986
18951
|
let result = this.parsePrefix();
|
|
18987
|
-
return
|
|
18952
|
+
return new VoidExpression(this.span(start), this.sourceSpan(start), result);
|
|
18988
18953
|
}
|
|
18989
18954
|
return this.parseCallChain();
|
|
18990
18955
|
}
|
|
@@ -19031,9 +18996,8 @@ class _ParseAST {
|
|
|
19031
18996
|
this.rparensExpected++;
|
|
19032
18997
|
const result = this.parsePipe();
|
|
19033
18998
|
this.rparensExpected--;
|
|
19034
|
-
this.lastUnary = null;
|
|
19035
18999
|
this.expectCharacter($RPAREN);
|
|
19036
|
-
return result;
|
|
19000
|
+
return new ParenthesizedExpression(this.span(start), this.sourceSpan(start), result);
|
|
19037
19001
|
}
|
|
19038
19002
|
else if (this.next.isKeywordNull()) {
|
|
19039
19003
|
this.advance();
|
|
@@ -19410,9 +19374,10 @@ class _ParseAST {
|
|
|
19410
19374
|
}
|
|
19411
19375
|
parseNoInterpolationTemplateLiteral() {
|
|
19412
19376
|
const text = this.next.strValue;
|
|
19377
|
+
const start = this.inputIndex;
|
|
19413
19378
|
this.advance();
|
|
19414
|
-
const span = this.span(
|
|
19415
|
-
const sourceSpan = this.sourceSpan(
|
|
19379
|
+
const span = this.span(start);
|
|
19380
|
+
const sourceSpan = this.sourceSpan(start);
|
|
19416
19381
|
return new TemplateLiteral(span, sourceSpan, [new TemplateLiteralElement(span, sourceSpan, text)], []);
|
|
19417
19382
|
}
|
|
19418
19383
|
parseTaggedTemplateLiteral(tag, start) {
|
|
@@ -19426,8 +19391,9 @@ class _ParseAST {
|
|
|
19426
19391
|
while (this.next !== EOF) {
|
|
19427
19392
|
const token = this.next;
|
|
19428
19393
|
if (token.isTemplateLiteralPart() || token.isTemplateLiteralEnd()) {
|
|
19429
|
-
|
|
19394
|
+
const partStart = this.inputIndex;
|
|
19430
19395
|
this.advance();
|
|
19396
|
+
elements.push(new TemplateLiteralElement(this.span(partStart), this.sourceSpan(partStart), token.strValue));
|
|
19431
19397
|
if (token.isTemplateLiteralEnd()) {
|
|
19432
19398
|
break;
|
|
19433
19399
|
}
|
|
@@ -19686,6 +19652,9 @@ class SerializeExpressionVisitor {
|
|
|
19686
19652
|
visitTaggedTemplateLiteral(ast, context) {
|
|
19687
19653
|
return ast.tag.visit(this, context) + ast.template.visit(this, context);
|
|
19688
19654
|
}
|
|
19655
|
+
visitParenthesizedExpression(ast, context) {
|
|
19656
|
+
return '(' + ast.expression.visit(this, context) + ')';
|
|
19657
|
+
}
|
|
19689
19658
|
}
|
|
19690
19659
|
/** Zips the two input arrays into a single array of pairs of elements at the same index. */
|
|
19691
19660
|
function zip(left, right) {
|
|
@@ -22718,7 +22687,6 @@ function enableBindings() {
|
|
|
22718
22687
|
function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {
|
|
22719
22688
|
const args = [literal(name), handlerFn];
|
|
22720
22689
|
if (eventTargetResolver !== null) {
|
|
22721
|
-
args.push(literal(false)); // `useCapture` flag, defaults to `false`
|
|
22722
22690
|
args.push(importExpr(eventTargetResolver));
|
|
22723
22691
|
}
|
|
22724
22692
|
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
@@ -23237,7 +23205,17 @@ const PURE_FUNCTION_CONFIG = {
|
|
|
23237
23205
|
mapping: (n) => n,
|
|
23238
23206
|
};
|
|
23239
23207
|
function callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {
|
|
23208
|
+
// mapping need to be done before potentially dropping the last interpolation argument
|
|
23240
23209
|
const n = config.mapping(interpolationArgs.length);
|
|
23210
|
+
// In the case the interpolation instruction ends with a empty string we drop it
|
|
23211
|
+
// And the runtime will take care of it.
|
|
23212
|
+
const lastInterpolationArg = interpolationArgs.at(-1);
|
|
23213
|
+
if (extraArgs.length === 0 &&
|
|
23214
|
+
interpolationArgs.length > 1 &&
|
|
23215
|
+
lastInterpolationArg instanceof LiteralExpr &&
|
|
23216
|
+
lastInterpolationArg.value === '') {
|
|
23217
|
+
interpolationArgs.pop();
|
|
23218
|
+
}
|
|
23241
23219
|
if (n < config.constant.length) {
|
|
23242
23220
|
// Constant calling pattern.
|
|
23243
23221
|
return importExpr(config.constant[n])
|
|
@@ -23278,31 +23256,6 @@ function reify(job) {
|
|
|
23278
23256
|
reifyUpdateOperations(unit, unit.update);
|
|
23279
23257
|
}
|
|
23280
23258
|
}
|
|
23281
|
-
/**
|
|
23282
|
-
* This function can be used a sanity check -- it walks every expression in the const pool, and
|
|
23283
|
-
* every expression reachable from an op, and makes sure that there are no IR expressions
|
|
23284
|
-
* left. This is nice to use for debugging mysterious failures where an IR expression cannot be
|
|
23285
|
-
* output from the output AST code.
|
|
23286
|
-
*/
|
|
23287
|
-
function ensureNoIrForDebug(job) {
|
|
23288
|
-
for (const stmt of job.pool.statements) {
|
|
23289
|
-
transformExpressionsInStatement(stmt, (expr) => {
|
|
23290
|
-
if (isIrExpression(expr)) {
|
|
23291
|
-
throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);
|
|
23292
|
-
}
|
|
23293
|
-
return expr;
|
|
23294
|
-
}, VisitorContextFlag.None);
|
|
23295
|
-
}
|
|
23296
|
-
for (const unit of job.units) {
|
|
23297
|
-
for (const op of unit.ops()) {
|
|
23298
|
-
visitExpressionsInOp(op, (expr) => {
|
|
23299
|
-
if (isIrExpression(expr)) {
|
|
23300
|
-
throw new Error(`AssertionError: IR expression found during reify: ${ExpressionKind[expr.kind]}`);
|
|
23301
|
-
}
|
|
23302
|
-
});
|
|
23303
|
-
}
|
|
23304
|
-
}
|
|
23305
|
-
}
|
|
23306
23259
|
function reifyCreateOperations(unit, ops) {
|
|
23307
23260
|
for (const op of ops) {
|
|
23308
23261
|
transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
|
|
@@ -23830,57 +23783,6 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
23830
23783
|
}
|
|
23831
23784
|
}
|
|
23832
23785
|
|
|
23833
|
-
// TODO: create AST for parentheses when parsing, then we can remove the unnecessary ones instead of
|
|
23834
|
-
// adding them out of thin air. This should simplify the parsing and give us valid spans for the
|
|
23835
|
-
// parentheses.
|
|
23836
|
-
/**
|
|
23837
|
-
* In some cases we need to add parentheses to expressions for them to be considered valid
|
|
23838
|
-
* JavaScript. This phase adds parentheses to cover such cases. Currently these cases are:
|
|
23839
|
-
*
|
|
23840
|
-
* 1. Unary operators in the base of an exponentiation expression. For example, `-2 ** 3` is not
|
|
23841
|
-
* valid JavaScript, but `(-2) ** 3` is.
|
|
23842
|
-
* 2. When mixing nullish coalescing (`??`) and logical and/or operators (`&&`, `||`), we need to
|
|
23843
|
-
* add parentheses. For example, `a ?? b && c` is not valid JavaScript, but `a ?? (b && c)` is.
|
|
23844
|
-
* 3. Safe property access that has been down-leveled into a ternary expression needs parentheses
|
|
23845
|
-
* when used with nullish coalescing.
|
|
23846
|
-
*/
|
|
23847
|
-
function requiredParentheses(job) {
|
|
23848
|
-
for (const unit of job.units) {
|
|
23849
|
-
for (const op of unit.ops()) {
|
|
23850
|
-
transformExpressionsInOp(op, (expr) => {
|
|
23851
|
-
if (expr instanceof BinaryOperatorExpr) {
|
|
23852
|
-
switch (expr.operator) {
|
|
23853
|
-
case BinaryOperator.Exponentiation:
|
|
23854
|
-
parenthesizeExponentiation(expr);
|
|
23855
|
-
break;
|
|
23856
|
-
case BinaryOperator.NullishCoalesce:
|
|
23857
|
-
parenthesizeNullishCoalescing(expr);
|
|
23858
|
-
break;
|
|
23859
|
-
}
|
|
23860
|
-
}
|
|
23861
|
-
return expr;
|
|
23862
|
-
}, VisitorContextFlag.None);
|
|
23863
|
-
}
|
|
23864
|
-
}
|
|
23865
|
-
}
|
|
23866
|
-
function parenthesizeExponentiation(expr) {
|
|
23867
|
-
if (expr.lhs instanceof UnaryOperatorExpr) {
|
|
23868
|
-
expr.lhs = new ParenthesizedExpr(expr.lhs);
|
|
23869
|
-
}
|
|
23870
|
-
}
|
|
23871
|
-
function parenthesizeNullishCoalescing(expr) {
|
|
23872
|
-
if (isLogicalAndOr(expr.lhs) || expr.lhs instanceof ConditionalExpr) {
|
|
23873
|
-
expr.lhs = new ParenthesizedExpr(expr.lhs);
|
|
23874
|
-
}
|
|
23875
|
-
if (isLogicalAndOr(expr.rhs) || expr.rhs instanceof ConditionalExpr) {
|
|
23876
|
-
expr.rhs = new ParenthesizedExpr(expr.rhs);
|
|
23877
|
-
}
|
|
23878
|
-
}
|
|
23879
|
-
function isLogicalAndOr(expr) {
|
|
23880
|
-
return (expr instanceof BinaryOperatorExpr &&
|
|
23881
|
-
(expr.operator === BinaryOperator.And || expr.operator === BinaryOperator.Or));
|
|
23882
|
-
}
|
|
23883
|
-
|
|
23884
23786
|
/**
|
|
23885
23787
|
* Resolves `ir.ContextExpr` expressions (which represent embedded view or component contexts) to
|
|
23886
23788
|
* either the `ctx` parameter to component functions (for the current view context) or to variables
|
|
@@ -24679,6 +24581,73 @@ function optimizeStoreLet(job) {
|
|
|
24679
24581
|
}
|
|
24680
24582
|
}
|
|
24681
24583
|
|
|
24584
|
+
/**
|
|
24585
|
+
* In most cases we can drop user added parentheses from expressions. However, in some cases
|
|
24586
|
+
* parentheses are needed for the expression to be considered valid JavaScript or for Typescript to
|
|
24587
|
+
* generate the correct output. This phases strips all parentheses except in the following
|
|
24588
|
+
* siturations where they are required:
|
|
24589
|
+
*
|
|
24590
|
+
* 1. Unary operators in the base of an exponentiation expression. For example, `-2 ** 3` is not
|
|
24591
|
+
* valid JavaScript, but `(-2) ** 3` is.
|
|
24592
|
+
* 2. When mixing nullish coalescing (`??`) and logical and/or operators (`&&`, `||`), we need
|
|
24593
|
+
* parentheses. For example, `a ?? b && c` is not valid JavaScript, but `a ?? (b && c)` is.
|
|
24594
|
+
* 3. Ternary expression used as an operand for nullish coalescing. Typescript generates incorrect
|
|
24595
|
+
* code if the parentheses are missing. For example when `(a ? b : c) ?? d` is translated to
|
|
24596
|
+
* typescript AST, the parentheses node is removed, and then the remaining AST is printed, it
|
|
24597
|
+
* incorrectly prints `a ? b : c ?? d`. This is different from how it handles the same situation
|
|
24598
|
+
* with `||` and `&&` where it prints the parentheses even if they are not present in the AST.
|
|
24599
|
+
*/
|
|
24600
|
+
function stripNonrequiredParentheses(job) {
|
|
24601
|
+
// Check which parentheses are required.
|
|
24602
|
+
const requiredParens = new Set();
|
|
24603
|
+
for (const unit of job.units) {
|
|
24604
|
+
for (const op of unit.ops()) {
|
|
24605
|
+
visitExpressionsInOp(op, (expr) => {
|
|
24606
|
+
if (expr instanceof BinaryOperatorExpr) {
|
|
24607
|
+
switch (expr.operator) {
|
|
24608
|
+
case BinaryOperator.Exponentiation:
|
|
24609
|
+
checkExponentiationParens(expr, requiredParens);
|
|
24610
|
+
break;
|
|
24611
|
+
case BinaryOperator.NullishCoalesce:
|
|
24612
|
+
checkNullishCoalescingParens(expr, requiredParens);
|
|
24613
|
+
break;
|
|
24614
|
+
}
|
|
24615
|
+
}
|
|
24616
|
+
});
|
|
24617
|
+
}
|
|
24618
|
+
}
|
|
24619
|
+
// Remove any non-required parentheses.
|
|
24620
|
+
for (const unit of job.units) {
|
|
24621
|
+
for (const op of unit.ops()) {
|
|
24622
|
+
transformExpressionsInOp(op, (expr) => {
|
|
24623
|
+
if (expr instanceof ParenthesizedExpr) {
|
|
24624
|
+
return requiredParens.has(expr) ? expr : expr.expr;
|
|
24625
|
+
}
|
|
24626
|
+
return expr;
|
|
24627
|
+
}, VisitorContextFlag.None);
|
|
24628
|
+
}
|
|
24629
|
+
}
|
|
24630
|
+
}
|
|
24631
|
+
function checkExponentiationParens(expr, requiredParens) {
|
|
24632
|
+
if (expr.lhs instanceof ParenthesizedExpr && expr.lhs.expr instanceof UnaryOperatorExpr) {
|
|
24633
|
+
requiredParens.add(expr.lhs);
|
|
24634
|
+
}
|
|
24635
|
+
}
|
|
24636
|
+
function checkNullishCoalescingParens(expr, requiredParens) {
|
|
24637
|
+
if (expr.lhs instanceof ParenthesizedExpr &&
|
|
24638
|
+
(isLogicalAndOr(expr.lhs.expr) || expr.lhs.expr instanceof ConditionalExpr)) {
|
|
24639
|
+
requiredParens.add(expr.lhs);
|
|
24640
|
+
}
|
|
24641
|
+
if (expr.rhs instanceof ParenthesizedExpr &&
|
|
24642
|
+
(isLogicalAndOr(expr.rhs.expr) || expr.rhs.expr instanceof ConditionalExpr)) {
|
|
24643
|
+
requiredParens.add(expr.rhs);
|
|
24644
|
+
}
|
|
24645
|
+
}
|
|
24646
|
+
function isLogicalAndOr(expr) {
|
|
24647
|
+
return (expr instanceof BinaryOperatorExpr &&
|
|
24648
|
+
(expr.operator === BinaryOperator.And || expr.operator === BinaryOperator.Or));
|
|
24649
|
+
}
|
|
24650
|
+
|
|
24682
24651
|
/**
|
|
24683
24652
|
* Transforms special-case bindings with 'style' or 'class' in their names. Must run before the
|
|
24684
24653
|
* main binding specialization pass.
|
|
@@ -25587,7 +25556,7 @@ const phases = [
|
|
|
25587
25556
|
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
25588
25557
|
{ kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
|
|
25589
25558
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
25590
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
25559
|
+
{ kind: CompilationJobKind.Both, fn: stripNonrequiredParentheses },
|
|
25591
25560
|
{ kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
|
|
25592
25561
|
{ kind: CompilationJobKind.Both, fn: optimizeVariables },
|
|
25593
25562
|
{ kind: CompilationJobKind.Both, fn: optimizeStoreLet },
|
|
@@ -26386,6 +26355,9 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
26386
26355
|
else if (ast instanceof TaggedTemplateLiteral) {
|
|
26387
26356
|
return new TaggedTemplateLiteralExpr(convertAst(ast.tag, job, baseSourceSpan), convertTemplateLiteral(ast.template, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
|
|
26388
26357
|
}
|
|
26358
|
+
else if (ast instanceof ParenthesizedExpression) {
|
|
26359
|
+
return new ParenthesizedExpr(convertAst(ast.expression, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
|
|
26360
|
+
}
|
|
26389
26361
|
else {
|
|
26390
26362
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
26391
26363
|
}
|
|
@@ -26398,10 +26370,10 @@ function convertTemplateLiteral(ast, job, baseSourceSpan) {
|
|
|
26398
26370
|
function convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {
|
|
26399
26371
|
let expression;
|
|
26400
26372
|
if (value instanceof Interpolation$1) {
|
|
26401
|
-
expression = new Interpolation(value.strings, value.expressions.map((e) => convertAst(e, job,
|
|
26373
|
+
expression = new Interpolation(value.strings, value.expressions.map((e) => convertAst(e, job, null)), Object.keys(asMessage(i18nMeta)?.placeholders ?? {}));
|
|
26402
26374
|
}
|
|
26403
26375
|
else if (value instanceof AST) {
|
|
26404
|
-
expression = convertAst(value, job,
|
|
26376
|
+
expression = convertAst(value, job, null);
|
|
26405
26377
|
}
|
|
26406
26378
|
else {
|
|
26407
26379
|
expression = literal(value);
|
|
@@ -26779,12 +26751,6 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
26779
26751
|
* internal tooling as well.
|
|
26780
26752
|
*/
|
|
26781
26753
|
let ENABLE_TEMPLATE_SOURCE_LOCATIONS = false;
|
|
26782
|
-
/**
|
|
26783
|
-
* Utility function to enable source locations. Intended to be used **only** inside unit tests.
|
|
26784
|
-
*/
|
|
26785
|
-
function setEnableTemplateSourceLocations(value) {
|
|
26786
|
-
ENABLE_TEMPLATE_SOURCE_LOCATIONS = value;
|
|
26787
|
-
}
|
|
26788
26754
|
/** Gets whether template source locations are enabled. */
|
|
26789
26755
|
function getTemplateSourceLocationsEnabled() {
|
|
26790
26756
|
return ENABLE_TEMPLATE_SOURCE_LOCATIONS;
|
|
@@ -27381,15 +27347,6 @@ class BindingParser {
|
|
|
27381
27347
|
return false;
|
|
27382
27348
|
}
|
|
27383
27349
|
}
|
|
27384
|
-
class PipeCollector extends RecursiveAstVisitor {
|
|
27385
|
-
pipes = new Map();
|
|
27386
|
-
visitPipe(ast, context) {
|
|
27387
|
-
this.pipes.set(ast.name, ast);
|
|
27388
|
-
ast.exp.visit(this);
|
|
27389
|
-
this.visitAll(ast.args, context);
|
|
27390
|
-
return null;
|
|
27391
|
-
}
|
|
27392
|
-
}
|
|
27393
27350
|
function isAnimationLabel(name) {
|
|
27394
27351
|
return name[0] == '@';
|
|
27395
27352
|
}
|
|
@@ -29725,24 +29682,41 @@ class R3TargetBinder {
|
|
|
29725
29682
|
* metadata about the types referenced in the template.
|
|
29726
29683
|
*/
|
|
29727
29684
|
bind(target) {
|
|
29728
|
-
if (!target.template) {
|
|
29729
|
-
|
|
29730
|
-
|
|
29731
|
-
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
const
|
|
29735
|
-
|
|
29736
|
-
const
|
|
29737
|
-
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29685
|
+
if (!target.template && !target.host) {
|
|
29686
|
+
throw new Error('Empty bound targets are not supported');
|
|
29687
|
+
}
|
|
29688
|
+
const directives = new Map();
|
|
29689
|
+
const eagerDirectives = [];
|
|
29690
|
+
const bindings = new Map();
|
|
29691
|
+
const references = new Map();
|
|
29692
|
+
const scopedNodeEntities = new Map();
|
|
29693
|
+
const expressions = new Map();
|
|
29694
|
+
const symbols = new Map();
|
|
29695
|
+
const nestingLevel = new Map();
|
|
29696
|
+
const usedPipes = new Set();
|
|
29697
|
+
const eagerPipes = new Set();
|
|
29698
|
+
const deferBlocks = [];
|
|
29699
|
+
if (target.template) {
|
|
29700
|
+
// First, parse the template into a `Scope` structure. This operation captures the syntactic
|
|
29701
|
+
// scopes in the template and makes them available for later use.
|
|
29702
|
+
const scope = Scope.apply(target.template);
|
|
29703
|
+
// Use the `Scope` to extract the entities present at every level of the template.
|
|
29704
|
+
extractScopedNodeEntities(scope, scopedNodeEntities);
|
|
29705
|
+
// Next, perform directive matching on the template using the `DirectiveBinder`. This returns:
|
|
29706
|
+
// - directives: Map of nodes (elements & ng-templates) to the directives on them.
|
|
29707
|
+
// - bindings: Map of inputs, outputs, and attributes to the directive/element that claims
|
|
29708
|
+
// them. TODO(alxhub): handle multiple directives claiming an input/output/etc.
|
|
29709
|
+
// - references: Map of #references to their targets.
|
|
29710
|
+
DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, bindings, references);
|
|
29711
|
+
// Finally, run the TemplateBinder to bind references, variables, and other entities within the
|
|
29712
|
+
// template. This extracts all the metadata that doesn't depend on directive matching.
|
|
29713
|
+
TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
29714
|
+
}
|
|
29715
|
+
// Bind the host element in a separate scope. Note that it only uses the
|
|
29716
|
+
// `TemplateBinder` since directives don't apply inside a host context.
|
|
29717
|
+
if (target.host) {
|
|
29718
|
+
TemplateBinder.applyWithScope(target.host, Scope.apply(target.host), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
29719
|
+
}
|
|
29746
29720
|
return new R3BoundTarget(target, directives, eagerDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
|
|
29747
29721
|
}
|
|
29748
29722
|
}
|
|
@@ -29818,7 +29792,7 @@ class Scope {
|
|
|
29818
29792
|
nodeOrNodes instanceof Content) {
|
|
29819
29793
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
29820
29794
|
}
|
|
29821
|
-
else {
|
|
29795
|
+
else if (!(nodeOrNodes instanceof HostElement)) {
|
|
29822
29796
|
// No overarching `Template` instance, so process the nodes directly.
|
|
29823
29797
|
nodeOrNodes.forEach((node) => node.visit(this));
|
|
29824
29798
|
}
|
|
@@ -29969,14 +29943,9 @@ class DirectiveBinder {
|
|
|
29969
29943
|
* map which resolves #references (`Reference`s) within the template to the named directive or
|
|
29970
29944
|
* template node.
|
|
29971
29945
|
*/
|
|
29972
|
-
static apply(template, selectorMatcher) {
|
|
29973
|
-
const directives = new Map();
|
|
29974
|
-
const bindings = new Map();
|
|
29975
|
-
const references = new Map();
|
|
29976
|
-
const eagerDirectives = [];
|
|
29946
|
+
static apply(template, selectorMatcher, directives, eagerDirectives, bindings, references) {
|
|
29977
29947
|
const matcher = new DirectiveBinder(selectorMatcher, directives, eagerDirectives, bindings, references);
|
|
29978
29948
|
matcher.ingest(template);
|
|
29979
|
-
return { directives, eagerDirectives, bindings, references };
|
|
29980
29949
|
}
|
|
29981
29950
|
ingest(template) {
|
|
29982
29951
|
template.forEach((node) => node.visit(this));
|
|
@@ -30152,7 +30121,7 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
30152
30121
|
/**
|
|
30153
30122
|
* Process a template and extract metadata about expressions and symbols within.
|
|
30154
30123
|
*
|
|
30155
|
-
* @param
|
|
30124
|
+
* @param nodeOrNodes the nodes of the template to process
|
|
30156
30125
|
* @param scope the `Scope` of the template being processed.
|
|
30157
30126
|
* @returns three maps which contain metadata about the template: `expressions` which interprets
|
|
30158
30127
|
* special `AST` nodes in expressions as pointing to references or variables declared within the
|
|
@@ -30161,18 +30130,11 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
30161
30130
|
* nesting level (how many levels deep within the template structure the `Template` is), starting
|
|
30162
30131
|
* at 1.
|
|
30163
30132
|
*/
|
|
30164
|
-
static applyWithScope(
|
|
30165
|
-
const
|
|
30166
|
-
const symbols = new Map();
|
|
30167
|
-
const nestingLevel = new Map();
|
|
30168
|
-
const usedPipes = new Set();
|
|
30169
|
-
const eagerPipes = new Set();
|
|
30170
|
-
const template = nodes instanceof Template ? nodes : null;
|
|
30171
|
-
const deferBlocks = [];
|
|
30133
|
+
static applyWithScope(nodeOrNodes, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks) {
|
|
30134
|
+
const template = nodeOrNodes instanceof Template ? nodeOrNodes : null;
|
|
30172
30135
|
// The top-level template has nesting level 0.
|
|
30173
30136
|
const binder = new TemplateBinder(expressions, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template, 0);
|
|
30174
|
-
binder.ingest(
|
|
30175
|
-
return { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks };
|
|
30137
|
+
binder.ingest(nodeOrNodes);
|
|
30176
30138
|
}
|
|
30177
30139
|
ingest(nodeOrNodes) {
|
|
30178
30140
|
if (nodeOrNodes instanceof Template) {
|
|
@@ -30214,6 +30176,10 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
30214
30176
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
30215
30177
|
this.nestingLevel.set(nodeOrNodes, this.level);
|
|
30216
30178
|
}
|
|
30179
|
+
else if (nodeOrNodes instanceof HostElement) {
|
|
30180
|
+
// Host elements are always at the top level.
|
|
30181
|
+
this.nestingLevel.set(nodeOrNodes, 0);
|
|
30182
|
+
}
|
|
30217
30183
|
else {
|
|
30218
30184
|
// Visit each node from the top-level template.
|
|
30219
30185
|
nodeOrNodes.forEach(this.visitNode);
|
|
@@ -30522,7 +30488,7 @@ class R3BoundTarget {
|
|
|
30522
30488
|
return this.referenceTargetToElement(target.node);
|
|
30523
30489
|
}
|
|
30524
30490
|
}
|
|
30525
|
-
function extractScopedNodeEntities(rootScope) {
|
|
30491
|
+
function extractScopedNodeEntities(rootScope, templateEntities) {
|
|
30526
30492
|
const entityMap = new Map();
|
|
30527
30493
|
function extractScopeEntities(scope) {
|
|
30528
30494
|
if (entityMap.has(scope.rootNode)) {
|
|
@@ -30547,11 +30513,9 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
30547
30513
|
}
|
|
30548
30514
|
extractScopeEntities(scope);
|
|
30549
30515
|
}
|
|
30550
|
-
const templateEntities = new Map();
|
|
30551
30516
|
for (const [template, entities] of entityMap) {
|
|
30552
30517
|
templateEntities.set(template, new Set(entities.values()));
|
|
30553
30518
|
}
|
|
30554
|
-
return templateEntities;
|
|
30555
30519
|
}
|
|
30556
30520
|
|
|
30557
30521
|
/**
|
|
@@ -30574,10 +30538,8 @@ class CompilerFacadeImpl {
|
|
|
30574
30538
|
}
|
|
30575
30539
|
compilePipe(angularCoreEnv, sourceMapUrl, facade) {
|
|
30576
30540
|
const metadata = {
|
|
30577
|
-
name: facade.name,
|
|
30578
30541
|
type: wrapReference(facade.type),
|
|
30579
30542
|
typeArgumentCount: 0,
|
|
30580
|
-
deps: null,
|
|
30581
30543
|
pipeName: facade.pipeName,
|
|
30582
30544
|
pure: facade.pure,
|
|
30583
30545
|
isStandalone: facade.isStandalone,
|
|
@@ -30622,7 +30584,6 @@ class CompilerFacadeImpl {
|
|
|
30622
30584
|
}
|
|
30623
30585
|
compileInjector(angularCoreEnv, sourceMapUrl, facade) {
|
|
30624
30586
|
const meta = {
|
|
30625
|
-
name: facade.name,
|
|
30626
30587
|
type: wrapReference(facade.type),
|
|
30627
30588
|
providers: facade.providers && facade.providers.length > 0
|
|
30628
30589
|
? new WrappedNodeExpr(facade.providers)
|
|
@@ -31821,7 +31782,7 @@ class Xliff extends Serializer {
|
|
|
31821
31782
|
return digest$1(message);
|
|
31822
31783
|
}
|
|
31823
31784
|
}
|
|
31824
|
-
|
|
31785
|
+
let _WriteVisitor$1 = class _WriteVisitor {
|
|
31825
31786
|
visitText(text, context) {
|
|
31826
31787
|
return [new Text$1(text.value)];
|
|
31827
31788
|
}
|
|
@@ -31880,7 +31841,7 @@ class _WriteVisitor$1 {
|
|
|
31880
31841
|
serialize(nodes) {
|
|
31881
31842
|
return [].concat(...nodes.map((node) => node.visit(this)));
|
|
31882
31843
|
}
|
|
31883
|
-
}
|
|
31844
|
+
};
|
|
31884
31845
|
// TODO(vicb): add error management (structure)
|
|
31885
31846
|
// Extract messages as xml nodes from the xliff file
|
|
31886
31847
|
class XliffParser {
|
|
@@ -31963,7 +31924,7 @@ class XliffParser {
|
|
|
31963
31924
|
}
|
|
31964
31925
|
}
|
|
31965
31926
|
// Convert ml nodes (xliff syntax) to i18n nodes
|
|
31966
|
-
|
|
31927
|
+
let XmlToI18n$2 = class XmlToI18n {
|
|
31967
31928
|
// using non-null assertion because it's re(set) by convert()
|
|
31968
31929
|
_errors;
|
|
31969
31930
|
convert(message, url) {
|
|
@@ -32016,7 +31977,7 @@ class XmlToI18n$2 {
|
|
|
32016
31977
|
_addError(node, message) {
|
|
32017
31978
|
this._errors.push(new I18nError(node.sourceSpan, message));
|
|
32018
31979
|
}
|
|
32019
|
-
}
|
|
31980
|
+
};
|
|
32020
31981
|
function getCtypeForTag(tag) {
|
|
32021
31982
|
switch (tag.toLowerCase()) {
|
|
32022
31983
|
case 'br':
|
|
@@ -32278,7 +32239,7 @@ class Xliff2Parser {
|
|
|
32278
32239
|
}
|
|
32279
32240
|
}
|
|
32280
32241
|
// Convert ml nodes (xliff syntax) to i18n nodes
|
|
32281
|
-
|
|
32242
|
+
let XmlToI18n$1 = class XmlToI18n {
|
|
32282
32243
|
// using non-null assertion because re(set) by convert()
|
|
32283
32244
|
_errors;
|
|
32284
32245
|
convert(message, url) {
|
|
@@ -32348,7 +32309,7 @@ class XmlToI18n$1 {
|
|
|
32348
32309
|
_addError(node, message) {
|
|
32349
32310
|
this._errors.push(new I18nError(node.sourceSpan, message));
|
|
32350
32311
|
}
|
|
32351
|
-
}
|
|
32312
|
+
};
|
|
32352
32313
|
function getTypeForTag(tag) {
|
|
32353
32314
|
switch (tag.toLowerCase()) {
|
|
32354
32315
|
case 'br':
|
|
@@ -32950,7 +32911,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
32950
32911
|
function compileDeclareClassMetadata(metadata) {
|
|
32951
32912
|
const definitionMap = new DefinitionMap();
|
|
32952
32913
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
32953
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
32914
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
32954
32915
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32955
32916
|
definitionMap.set('type', metadata.type);
|
|
32956
32917
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -32968,7 +32929,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
32968
32929
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
32969
32930
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
32970
32931
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
32971
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
32932
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
32972
32933
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32973
32934
|
definitionMap.set('type', metadata.type);
|
|
32974
32935
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -33063,7 +33024,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
33063
33024
|
const definitionMap = new DefinitionMap();
|
|
33064
33025
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
33065
33026
|
definitionMap.set('minVersion', literal(minVersion));
|
|
33066
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33027
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33067
33028
|
// e.g. `type: MyDirective`
|
|
33068
33029
|
definitionMap.set('type', meta.type.value);
|
|
33069
33030
|
if (meta.isStandalone !== undefined) {
|
|
@@ -33164,9 +33125,6 @@ function compileQuery(query) {
|
|
|
33164
33125
|
// Therefore we explicitly emit the field, and explicitly place it only when it's `false`.
|
|
33165
33126
|
meta.set('emitDistinctChangesOnly', literal(false));
|
|
33166
33127
|
}
|
|
33167
|
-
else {
|
|
33168
|
-
// The linker will assume that an absent `emitDistinctChangesOnly` flag is by default `true`.
|
|
33169
|
-
}
|
|
33170
33128
|
if (query.descendants) {
|
|
33171
33129
|
meta.set('descendants', literal(true));
|
|
33172
33130
|
}
|
|
@@ -33482,7 +33440,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
33482
33440
|
function compileDeclareFactoryFunction(meta) {
|
|
33483
33441
|
const definitionMap = new DefinitionMap();
|
|
33484
33442
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
33485
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33443
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33486
33444
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33487
33445
|
definitionMap.set('type', meta.type.value);
|
|
33488
33446
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -33517,7 +33475,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
33517
33475
|
function createInjectableDefinitionMap(meta) {
|
|
33518
33476
|
const definitionMap = new DefinitionMap();
|
|
33519
33477
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
33520
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33478
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33521
33479
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33522
33480
|
definitionMap.set('type', meta.type.value);
|
|
33523
33481
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -33568,7 +33526,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
33568
33526
|
function createInjectorDefinitionMap(meta) {
|
|
33569
33527
|
const definitionMap = new DefinitionMap();
|
|
33570
33528
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
33571
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33529
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33572
33530
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33573
33531
|
definitionMap.set('type', meta.type.value);
|
|
33574
33532
|
definitionMap.set('providers', meta.providers);
|
|
@@ -33601,7 +33559,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
33601
33559
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
33602
33560
|
}
|
|
33603
33561
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
33604
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33562
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33605
33563
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33606
33564
|
definitionMap.set('type', meta.type.value);
|
|
33607
33565
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -33652,7 +33610,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
33652
33610
|
function createPipeDefinitionMap(meta) {
|
|
33653
33611
|
const definitionMap = new DefinitionMap();
|
|
33654
33612
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
33655
|
-
definitionMap.set('version', literal('20.0.0-next.
|
|
33613
|
+
definitionMap.set('version', literal('20.0.0-next.3'));
|
|
33656
33614
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33657
33615
|
// e.g. `type: MyPipe`
|
|
33658
33616
|
definitionMap.set('type', meta.type.value);
|
|
@@ -33810,24 +33768,31 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
33810
33768
|
* @description
|
|
33811
33769
|
* Entry point for all public APIs of the compiler package.
|
|
33812
33770
|
*/
|
|
33813
|
-
const VERSION = new Version('20.0.0-next.
|
|
33771
|
+
const VERSION = new Version('20.0.0-next.3');
|
|
33814
33772
|
|
|
33815
33773
|
//////////////////////////////////////
|
|
33816
|
-
//
|
|
33817
|
-
//
|
|
33818
|
-
|
|
33819
|
-
publishFacade(_global);
|
|
33820
|
-
|
|
33774
|
+
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
33775
|
+
// (see bottom of file) //
|
|
33776
|
+
//////////////////////////////////////
|
|
33821
33777
|
/**
|
|
33822
33778
|
* @module
|
|
33823
33779
|
* @description
|
|
33824
|
-
* Entry point for all
|
|
33780
|
+
* Entry point for all APIs of the compiler package.
|
|
33781
|
+
*
|
|
33782
|
+
* <div class="callout is-critical">
|
|
33783
|
+
* <header>Unstable APIs</header>
|
|
33784
|
+
* <p>
|
|
33785
|
+
* All compiler apis are currently considered experimental and private!
|
|
33786
|
+
* </p>
|
|
33787
|
+
* <p>
|
|
33788
|
+
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
|
33789
|
+
* </p>
|
|
33790
|
+
* </div>
|
|
33825
33791
|
*/
|
|
33826
33792
|
// This file only reexports content of the `src` folder. Keep it that way.
|
|
33793
|
+
// This function call has a global side effects and publishes the compiler into global namespace for
|
|
33794
|
+
// the late binding of the Compiler to the @angular/core for jit compilation.
|
|
33795
|
+
publishFacade(_global);
|
|
33827
33796
|
|
|
33828
|
-
|
|
33829
|
-
|
|
33830
|
-
// This file is not used to build this module. It is only used during editing
|
|
33831
|
-
|
|
33832
|
-
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
|
|
33797
|
+
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParenthesizedExpression, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HostElement as TmplAstHostElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
|
|
33833
33798
|
//# sourceMappingURL=compiler.mjs.map
|