@angular/compiler 20.1.0-rc.0 → 20.1.1
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 +98 -32
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +10 -4
- package/package.json +1 -1
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.1.
|
|
2
|
+
* @license Angular v20.1.1
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2987,6 +2987,7 @@ class Identifiers {
|
|
|
2987
2987
|
static InputSignalBrandWriteType = { name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE', moduleName: CORE };
|
|
2988
2988
|
static UnwrapDirectiveSignalInputs = { name: 'ɵUnwrapDirectiveSignalInputs', moduleName: CORE };
|
|
2989
2989
|
static unwrapWritableSignal = { name: 'ɵunwrapWritableSignal', moduleName: CORE };
|
|
2990
|
+
static assertType = { name: 'ɵassertType', moduleName: CORE };
|
|
2990
2991
|
}
|
|
2991
2992
|
|
|
2992
2993
|
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
@@ -4815,8 +4816,9 @@ let Element$1 = class Element {
|
|
|
4815
4816
|
sourceSpan;
|
|
4816
4817
|
startSourceSpan;
|
|
4817
4818
|
endSourceSpan;
|
|
4819
|
+
isVoid;
|
|
4818
4820
|
i18n;
|
|
4819
|
-
constructor(name, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
4821
|
+
constructor(name, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, isVoid, i18n) {
|
|
4820
4822
|
this.name = name;
|
|
4821
4823
|
this.attributes = attributes;
|
|
4822
4824
|
this.inputs = inputs;
|
|
@@ -4828,6 +4830,7 @@ let Element$1 = class Element {
|
|
|
4828
4830
|
this.sourceSpan = sourceSpan;
|
|
4829
4831
|
this.startSourceSpan = startSourceSpan;
|
|
4830
4832
|
this.endSourceSpan = endSourceSpan;
|
|
4833
|
+
this.isVoid = isVoid;
|
|
4831
4834
|
this.i18n = i18n;
|
|
4832
4835
|
}
|
|
4833
4836
|
visit(visitor) {
|
|
@@ -6625,7 +6628,7 @@ var ParseErrorLevel;
|
|
|
6625
6628
|
ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
|
|
6626
6629
|
ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
|
|
6627
6630
|
})(ParseErrorLevel || (ParseErrorLevel = {}));
|
|
6628
|
-
class ParseError {
|
|
6631
|
+
class ParseError extends Error {
|
|
6629
6632
|
span;
|
|
6630
6633
|
msg;
|
|
6631
6634
|
level;
|
|
@@ -6642,10 +6645,15 @@ class ParseError {
|
|
|
6642
6645
|
* couldn't be parsed. Not guaranteed to be defined, but can be used to provide more context.
|
|
6643
6646
|
*/
|
|
6644
6647
|
relatedError) {
|
|
6648
|
+
super(msg);
|
|
6645
6649
|
this.span = span;
|
|
6646
6650
|
this.msg = msg;
|
|
6647
6651
|
this.level = level;
|
|
6648
6652
|
this.relatedError = relatedError;
|
|
6653
|
+
// Extending `Error` ends up breaking some internal tests. This appears to be a known issue
|
|
6654
|
+
// when extending errors in TS and the workaround is to explicitly set the prototype.
|
|
6655
|
+
// https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
6656
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
6649
6657
|
}
|
|
6650
6658
|
contextualMessage() {
|
|
6651
6659
|
const ctx = this.span.start.getContext(100, 3);
|
|
@@ -10571,7 +10579,7 @@ class OpList {
|
|
|
10571
10579
|
oldOp.next = null;
|
|
10572
10580
|
let prev = oldPrev;
|
|
10573
10581
|
for (const newOp of newOps) {
|
|
10574
|
-
|
|
10582
|
+
OpList.assertIsUnowned(newOp);
|
|
10575
10583
|
newOp.debugListId = listId;
|
|
10576
10584
|
prev.next = newOp;
|
|
10577
10585
|
newOp.prev = prev;
|
|
@@ -10612,7 +10620,7 @@ class OpList {
|
|
|
10612
10620
|
static insertBefore(op, target) {
|
|
10613
10621
|
if (Array.isArray(op)) {
|
|
10614
10622
|
for (const o of op) {
|
|
10615
|
-
|
|
10623
|
+
OpList.insertBefore(o, target);
|
|
10616
10624
|
}
|
|
10617
10625
|
return;
|
|
10618
10626
|
}
|
|
@@ -13433,7 +13441,8 @@ class Element extends NodeWithI18n {
|
|
|
13433
13441
|
isSelfClosing;
|
|
13434
13442
|
startSourceSpan;
|
|
13435
13443
|
endSourceSpan;
|
|
13436
|
-
|
|
13444
|
+
isVoid;
|
|
13445
|
+
constructor(name, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, isVoid, i18n) {
|
|
13437
13446
|
super(sourceSpan, i18n);
|
|
13438
13447
|
this.name = name;
|
|
13439
13448
|
this.attrs = attrs;
|
|
@@ -13442,6 +13451,7 @@ class Element extends NodeWithI18n {
|
|
|
13442
13451
|
this.isSelfClosing = isSelfClosing;
|
|
13443
13452
|
this.startSourceSpan = startSourceSpan;
|
|
13444
13453
|
this.endSourceSpan = endSourceSpan;
|
|
13454
|
+
this.isVoid = isVoid;
|
|
13445
13455
|
}
|
|
13446
13456
|
visit(visitor, context) {
|
|
13447
13457
|
return visitor.visitElement(this, context);
|
|
@@ -15779,6 +15789,19 @@ var CharacterReferenceType;
|
|
|
15779
15789
|
CharacterReferenceType["HEX"] = "hexadecimal";
|
|
15780
15790
|
CharacterReferenceType["DEC"] = "decimal";
|
|
15781
15791
|
})(CharacterReferenceType || (CharacterReferenceType = {}));
|
|
15792
|
+
const SUPPORTED_BLOCKS = [
|
|
15793
|
+
'@if',
|
|
15794
|
+
'@else', // Covers `@else if` as well
|
|
15795
|
+
'@for',
|
|
15796
|
+
'@switch',
|
|
15797
|
+
'@case',
|
|
15798
|
+
'@default',
|
|
15799
|
+
'@empty',
|
|
15800
|
+
'@defer',
|
|
15801
|
+
'@placeholder',
|
|
15802
|
+
'@loading',
|
|
15803
|
+
'@error',
|
|
15804
|
+
];
|
|
15782
15805
|
// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents
|
|
15783
15806
|
class _Tokenizer {
|
|
15784
15807
|
_getTagDefinition;
|
|
@@ -15869,10 +15892,10 @@ class _Tokenizer {
|
|
|
15869
15892
|
// don't want to advance in case it's not `@let`.
|
|
15870
15893
|
this._cursor.peek() === $AT &&
|
|
15871
15894
|
!this._inInterpolation &&
|
|
15872
|
-
this.
|
|
15895
|
+
this._isLetStart()) {
|
|
15873
15896
|
this._consumeLetDeclaration(start);
|
|
15874
15897
|
}
|
|
15875
|
-
else if (this._tokenizeBlocks && this.
|
|
15898
|
+
else if (this._tokenizeBlocks && this._isBlockStart()) {
|
|
15876
15899
|
this._consumeBlockStart(start);
|
|
15877
15900
|
}
|
|
15878
15901
|
else if (this._tokenizeBlocks &&
|
|
@@ -15912,6 +15935,7 @@ class _Tokenizer {
|
|
|
15912
15935
|
return this._cursor.getChars(nameCursor).trim();
|
|
15913
15936
|
}
|
|
15914
15937
|
_consumeBlockStart(start) {
|
|
15938
|
+
this._requireCharCode($AT);
|
|
15915
15939
|
this._beginToken(24 /* TokenType.BLOCK_OPEN_START */, start);
|
|
15916
15940
|
const startToken = this._endToken([this._getBlockName()]);
|
|
15917
15941
|
if (this._cursor.peek() === $LPAREN) {
|
|
@@ -15984,6 +16008,7 @@ class _Tokenizer {
|
|
|
15984
16008
|
}
|
|
15985
16009
|
}
|
|
15986
16010
|
_consumeLetDeclaration(start) {
|
|
16011
|
+
this._requireStr('@let');
|
|
15987
16012
|
this._beginToken(29 /* TokenType.LET_START */, start);
|
|
15988
16013
|
// Require at least one white space after the `@let`.
|
|
15989
16014
|
if (isWhitespace(this._cursor.peek())) {
|
|
@@ -16197,6 +16222,27 @@ class _Tokenizer {
|
|
|
16197
16222
|
this._cursor.advance();
|
|
16198
16223
|
return char;
|
|
16199
16224
|
}
|
|
16225
|
+
_peekStr(chars) {
|
|
16226
|
+
const len = chars.length;
|
|
16227
|
+
if (this._cursor.charsLeft() < len) {
|
|
16228
|
+
return false;
|
|
16229
|
+
}
|
|
16230
|
+
const cursor = this._cursor.clone();
|
|
16231
|
+
for (let i = 0; i < len; i++) {
|
|
16232
|
+
if (cursor.peek() !== chars.charCodeAt(i)) {
|
|
16233
|
+
return false;
|
|
16234
|
+
}
|
|
16235
|
+
cursor.advance();
|
|
16236
|
+
}
|
|
16237
|
+
return true;
|
|
16238
|
+
}
|
|
16239
|
+
_isBlockStart() {
|
|
16240
|
+
return (this._cursor.peek() === $AT &&
|
|
16241
|
+
SUPPORTED_BLOCKS.some((blockName) => this._peekStr(blockName)));
|
|
16242
|
+
}
|
|
16243
|
+
_isLetStart() {
|
|
16244
|
+
return this._cursor.peek() === $AT && this._peekStr('@let');
|
|
16245
|
+
}
|
|
16200
16246
|
_consumeEntity(textTokenType) {
|
|
16201
16247
|
this._beginToken(9 /* TokenType.ENCODED_ENTITY */);
|
|
16202
16248
|
const start = this._cursor.clone();
|
|
@@ -16743,7 +16789,7 @@ class _Tokenizer {
|
|
|
16743
16789
|
if (this._tokenizeBlocks &&
|
|
16744
16790
|
!this._inInterpolation &&
|
|
16745
16791
|
!this._isInExpansion() &&
|
|
16746
|
-
(this.
|
|
16792
|
+
(this._isBlockStart() || this._isLetStart() || this._cursor.peek() === $RBRACE)) {
|
|
16747
16793
|
return true;
|
|
16748
16794
|
}
|
|
16749
16795
|
return false;
|
|
@@ -17102,12 +17148,16 @@ class EscapedCharacterCursor extends PlainCharacterCursor {
|
|
|
17102
17148
|
}
|
|
17103
17149
|
}
|
|
17104
17150
|
}
|
|
17105
|
-
class CursorError {
|
|
17151
|
+
class CursorError extends Error {
|
|
17106
17152
|
msg;
|
|
17107
17153
|
cursor;
|
|
17108
17154
|
constructor(msg, cursor) {
|
|
17155
|
+
super(msg);
|
|
17109
17156
|
this.msg = msg;
|
|
17110
17157
|
this.cursor = cursor;
|
|
17158
|
+
// Extending `Error` does not always work when code is transpiled. See:
|
|
17159
|
+
// https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
17160
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
17111
17161
|
}
|
|
17112
17162
|
}
|
|
17113
17163
|
|
|
@@ -17376,13 +17426,13 @@ class _TreeBuilder {
|
|
|
17376
17426
|
const directives = [];
|
|
17377
17427
|
this._consumeAttributesAndDirectives(attrs, directives);
|
|
17378
17428
|
const fullName = this._getElementFullName(startTagToken, this._getClosestElementLikeParent());
|
|
17429
|
+
const tagDef = this._getTagDefinition(fullName);
|
|
17379
17430
|
let selfClosing = false;
|
|
17380
17431
|
// Note: There could have been a tokenizer error
|
|
17381
17432
|
// so that we don't get a token for the end tag...
|
|
17382
17433
|
if (this._peek.type === 2 /* TokenType.TAG_OPEN_END_VOID */) {
|
|
17383
17434
|
this._advance();
|
|
17384
17435
|
selfClosing = true;
|
|
17385
|
-
const tagDef = this._getTagDefinition(fullName);
|
|
17386
17436
|
if (!(tagDef?.canSelfClose || getNsPrefix(fullName) !== null || tagDef?.isVoid)) {
|
|
17387
17437
|
this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed "${startTagToken.parts[1]}"`));
|
|
17388
17438
|
}
|
|
@@ -17395,7 +17445,7 @@ class _TreeBuilder {
|
|
|
17395
17445
|
const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
17396
17446
|
// Create a separate `startSpan` because `span` will be modified when there is an `end` span.
|
|
17397
17447
|
const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
17398
|
-
const el = new Element(fullName, attrs, directives, [], selfClosing, span, startSpan, undefined);
|
|
17448
|
+
const el = new Element(fullName, attrs, directives, [], selfClosing, span, startSpan, undefined, tagDef?.isVoid ?? false);
|
|
17399
17449
|
const parent = this._getContainer();
|
|
17400
17450
|
const isClosedByChild = parent !== null && !!this._getTagDefinition(parent)?.isClosedByChild(el.name);
|
|
17401
17451
|
this._pushContainer(el, isClosedByChild);
|
|
@@ -17838,11 +17888,11 @@ class WhitespaceVisitor {
|
|
|
17838
17888
|
if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {
|
|
17839
17889
|
// don't descent into elements where we need to preserve whitespaces
|
|
17840
17890
|
// but still visit all attributes to eliminate one used as a market to preserve WS
|
|
17841
|
-
const newElement = new Element(element.name, visitAllWithSiblings(this, element.attrs), visitAllWithSiblings(this, element.directives), element.children, element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
|
|
17891
|
+
const newElement = new Element(element.name, visitAllWithSiblings(this, element.attrs), visitAllWithSiblings(this, element.directives), element.children, element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.isVoid, element.i18n);
|
|
17842
17892
|
this.originalNodeMap?.set(newElement, element);
|
|
17843
17893
|
return newElement;
|
|
17844
17894
|
}
|
|
17845
|
-
const newElement = new Element(element.name, element.attrs, element.directives, visitAllWithSiblings(this, element.children), element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
|
|
17895
|
+
const newElement = new Element(element.name, element.attrs, element.directives, visitAllWithSiblings(this, element.children), element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.isVoid, element.i18n);
|
|
17846
17896
|
this.originalNodeMap?.set(newElement, element);
|
|
17847
17897
|
return newElement;
|
|
17848
17898
|
}
|
|
@@ -18094,9 +18144,11 @@ class Token {
|
|
|
18094
18144
|
return this.type === TokenType.Number ? this.numValue : -1;
|
|
18095
18145
|
}
|
|
18096
18146
|
isTemplateLiteralPart() {
|
|
18147
|
+
// Note: Explicit type is needed for Closure.
|
|
18097
18148
|
return this.isString() && this.kind === StringTokenKind.TemplateLiteralPart;
|
|
18098
18149
|
}
|
|
18099
18150
|
isTemplateLiteralEnd() {
|
|
18151
|
+
// Note: Explicit type is needed for Closure.
|
|
18100
18152
|
return this.isString() && this.kind === StringTokenKind.TemplateLiteralEnd;
|
|
18101
18153
|
}
|
|
18102
18154
|
isTemplateLiteralInterpolationStart() {
|
|
@@ -19487,12 +19539,13 @@ class _ParseAST {
|
|
|
19487
19539
|
else {
|
|
19488
19540
|
if (this.isAssignmentOperator(this.next)) {
|
|
19489
19541
|
const operation = this.next.strValue;
|
|
19490
|
-
this.advance();
|
|
19491
19542
|
if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {
|
|
19543
|
+
this.advance();
|
|
19492
19544
|
this.error('Bindings cannot contain assignments');
|
|
19493
19545
|
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
19494
19546
|
}
|
|
19495
19547
|
const receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
19548
|
+
this.advance();
|
|
19496
19549
|
const value = this.parseConditional();
|
|
19497
19550
|
return new Binary(this.span(start), this.sourceSpan(start), operation, receiver, value);
|
|
19498
19551
|
}
|
|
@@ -19611,12 +19664,13 @@ class _ParseAST {
|
|
|
19611
19664
|
this.expectCharacter($RBRACKET);
|
|
19612
19665
|
if (this.isAssignmentOperator(this.next)) {
|
|
19613
19666
|
const operation = this.next.strValue;
|
|
19614
|
-
this.advance();
|
|
19615
19667
|
if (isSafe) {
|
|
19668
|
+
this.advance();
|
|
19616
19669
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
19617
19670
|
}
|
|
19618
19671
|
else {
|
|
19619
19672
|
const binaryReceiver = new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
|
|
19673
|
+
this.advance();
|
|
19620
19674
|
const value = this.parseConditional();
|
|
19621
19675
|
return new Binary(this.span(start), this.sourceSpan(start), operation, binaryReceiver, value);
|
|
19622
19676
|
}
|
|
@@ -23606,6 +23660,18 @@ const GLOBAL_TARGET_RESOLVERS = new Map([
|
|
|
23606
23660
|
['document', Identifiers.resolveDocument],
|
|
23607
23661
|
['body', Identifiers.resolveBody],
|
|
23608
23662
|
]);
|
|
23663
|
+
/**
|
|
23664
|
+
* DOM properties that need to be remapped on the compiler side.
|
|
23665
|
+
* Note: this mapping has to be kept in sync with the equally named mapping in the runtime.
|
|
23666
|
+
*/
|
|
23667
|
+
const DOM_PROPERTY_REMAPPING = new Map([
|
|
23668
|
+
['class', 'className'],
|
|
23669
|
+
['for', 'htmlFor'],
|
|
23670
|
+
['formaction', 'formAction'],
|
|
23671
|
+
['innerHtml', 'innerHTML'],
|
|
23672
|
+
['readonly', 'readOnly'],
|
|
23673
|
+
['tabindex', 'tabIndex'],
|
|
23674
|
+
]);
|
|
23609
23675
|
/**
|
|
23610
23676
|
* Compiles semantic operations across all views and generates output `o.Statement`s with actual
|
|
23611
23677
|
* runtime calls in their place.
|
|
@@ -23878,7 +23944,7 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
23878
23944
|
break;
|
|
23879
23945
|
case OpKind.Property:
|
|
23880
23946
|
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.isLegacyAnimationTrigger
|
|
23881
|
-
? domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan)
|
|
23947
|
+
? domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan)
|
|
23882
23948
|
: property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
23883
23949
|
break;
|
|
23884
23950
|
case OpKind.TwoWayProperty:
|
|
@@ -23917,7 +23983,7 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
23917
23983
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
23918
23984
|
}
|
|
23919
23985
|
else {
|
|
23920
|
-
OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
23986
|
+
OpList.replace(op, domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
23921
23987
|
}
|
|
23922
23988
|
}
|
|
23923
23989
|
break;
|
|
@@ -28965,7 +29031,7 @@ class HtmlAstToIvyAst {
|
|
|
28965
29031
|
}
|
|
28966
29032
|
else {
|
|
28967
29033
|
const attrs = this.categorizePropertyAttributes(element.name, parsedProperties, i18nAttrsMeta);
|
|
28968
|
-
parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, directives, children, references, element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
|
|
29034
|
+
parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, directives, children, references, element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.isVoid, element.i18n);
|
|
28969
29035
|
}
|
|
28970
29036
|
if (elementHasInlineTemplate) {
|
|
28971
29037
|
// If this node is an inline-template (e.g. has *ngFor) then we need to create a template
|
|
@@ -29471,7 +29537,7 @@ class NonBindableVisitor {
|
|
|
29471
29537
|
/* inputs */ [],
|
|
29472
29538
|
/* outputs */ [],
|
|
29473
29539
|
/* directives */ [], children,
|
|
29474
|
-
/* references */ [], ast.isSelfClosing, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
29540
|
+
/* references */ [], ast.isSelfClosing, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.isVoid);
|
|
29475
29541
|
}
|
|
29476
29542
|
visitComment(comment) {
|
|
29477
29543
|
return null;
|
|
@@ -29512,7 +29578,7 @@ class NonBindableVisitor {
|
|
|
29512
29578
|
/* inputs */ [],
|
|
29513
29579
|
/* outputs */ [],
|
|
29514
29580
|
/* directives */ [], children,
|
|
29515
|
-
/* references */ [], ast.isSelfClosing, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
29581
|
+
/* references */ [], ast.isSelfClosing, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, false);
|
|
29516
29582
|
}
|
|
29517
29583
|
visitDirective(directive, context) {
|
|
29518
29584
|
return null;
|
|
@@ -32019,7 +32085,7 @@ class _Visitor {
|
|
|
32019
32085
|
this._init(_VisitorMode.Merge, interpolationConfig);
|
|
32020
32086
|
this._translations = translations;
|
|
32021
32087
|
// Construct a single fake root element
|
|
32022
|
-
const wrapper = new Element('wrapper', [], [], nodes, false, undefined, undefined, undefined);
|
|
32088
|
+
const wrapper = new Element('wrapper', [], [], nodes, false, undefined, undefined, undefined, false);
|
|
32023
32089
|
const translatedNode = wrapper.visit(this, null);
|
|
32024
32090
|
if (this._inI18nBlock) {
|
|
32025
32091
|
this._reportError(nodes[nodes.length - 1], 'Unclosed block');
|
|
@@ -32197,7 +32263,7 @@ class _Visitor {
|
|
|
32197
32263
|
this._inImplicitNode = wasInImplicitNode;
|
|
32198
32264
|
if (this._mode === _VisitorMode.Merge) {
|
|
32199
32265
|
if (node instanceof Element) {
|
|
32200
|
-
return new Element(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
32266
|
+
return new Element(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.isVoid);
|
|
32201
32267
|
}
|
|
32202
32268
|
else {
|
|
32203
32269
|
return new Component(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
@@ -33691,7 +33757,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
33691
33757
|
function compileDeclareClassMetadata(metadata) {
|
|
33692
33758
|
const definitionMap = new DefinitionMap();
|
|
33693
33759
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
33694
|
-
definitionMap.set('version', literal('20.1.
|
|
33760
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
33695
33761
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33696
33762
|
definitionMap.set('type', metadata.type);
|
|
33697
33763
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -33709,7 +33775,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
33709
33775
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
33710
33776
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
33711
33777
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
33712
|
-
definitionMap.set('version', literal('20.1.
|
|
33778
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
33713
33779
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33714
33780
|
definitionMap.set('type', metadata.type);
|
|
33715
33781
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -33804,7 +33870,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
33804
33870
|
const definitionMap = new DefinitionMap();
|
|
33805
33871
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
33806
33872
|
definitionMap.set('minVersion', literal(minVersion));
|
|
33807
|
-
definitionMap.set('version', literal('20.1.
|
|
33873
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
33808
33874
|
// e.g. `type: MyDirective`
|
|
33809
33875
|
definitionMap.set('type', meta.type.value);
|
|
33810
33876
|
if (meta.isStandalone !== undefined) {
|
|
@@ -34220,7 +34286,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
34220
34286
|
function compileDeclareFactoryFunction(meta) {
|
|
34221
34287
|
const definitionMap = new DefinitionMap();
|
|
34222
34288
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
34223
|
-
definitionMap.set('version', literal('20.1.
|
|
34289
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
34224
34290
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34225
34291
|
definitionMap.set('type', meta.type.value);
|
|
34226
34292
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -34255,7 +34321,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
34255
34321
|
function createInjectableDefinitionMap(meta) {
|
|
34256
34322
|
const definitionMap = new DefinitionMap();
|
|
34257
34323
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
34258
|
-
definitionMap.set('version', literal('20.1.
|
|
34324
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
34259
34325
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34260
34326
|
definitionMap.set('type', meta.type.value);
|
|
34261
34327
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -34306,7 +34372,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
34306
34372
|
function createInjectorDefinitionMap(meta) {
|
|
34307
34373
|
const definitionMap = new DefinitionMap();
|
|
34308
34374
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
34309
|
-
definitionMap.set('version', literal('20.1.
|
|
34375
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
34310
34376
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34311
34377
|
definitionMap.set('type', meta.type.value);
|
|
34312
34378
|
definitionMap.set('providers', meta.providers);
|
|
@@ -34339,7 +34405,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
34339
34405
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
34340
34406
|
}
|
|
34341
34407
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
34342
|
-
definitionMap.set('version', literal('20.1.
|
|
34408
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
34343
34409
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34344
34410
|
definitionMap.set('type', meta.type.value);
|
|
34345
34411
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -34390,7 +34456,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
34390
34456
|
function createPipeDefinitionMap(meta) {
|
|
34391
34457
|
const definitionMap = new DefinitionMap();
|
|
34392
34458
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
34393
|
-
definitionMap.set('version', literal('20.1.
|
|
34459
|
+
definitionMap.set('version', literal('20.1.1'));
|
|
34394
34460
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34395
34461
|
// e.g. `type: MyPipe`
|
|
34396
34462
|
definitionMap.set('type', meta.type.value);
|
|
@@ -34546,7 +34612,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
34546
34612
|
* @description
|
|
34547
34613
|
* Entry point for all public APIs of the compiler package.
|
|
34548
34614
|
*/
|
|
34549
|
-
const VERSION = new Version('20.1.
|
|
34615
|
+
const VERSION = new Version('20.1.1');
|
|
34550
34616
|
|
|
34551
34617
|
//////////////////////////////////////
|
|
34552
34618
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|