@angular-eslint/bundled-angular-compiler 20.1.2-alpha.22 → 20.1.2-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +597 -193
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -279,7 +279,7 @@ __export(index_exports, {
|
|
|
279
279
|
});
|
|
280
280
|
module.exports = __toCommonJS(index_exports);
|
|
281
281
|
|
|
282
|
-
// ../../node_modules/.pnpm/@angular+compiler@20.
|
|
282
|
+
// ../../node_modules/.pnpm/@angular+compiler@20.2.0/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
283
283
|
var _SELECTOR_REGEXP = new RegExp(
|
|
284
284
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
285
285
|
// 8: ","
|
|
@@ -3061,7 +3061,18 @@ var Identifiers = class {
|
|
|
3061
3061
|
static pipeBind4 = { name: "\u0275\u0275pipeBind4", moduleName: CORE };
|
|
3062
3062
|
static pipeBindV = { name: "\u0275\u0275pipeBindV", moduleName: CORE };
|
|
3063
3063
|
static domProperty = { name: "\u0275\u0275domProperty", moduleName: CORE };
|
|
3064
|
+
static ariaProperty = { name: "\u0275\u0275ariaProperty", moduleName: CORE };
|
|
3064
3065
|
static property = { name: "\u0275\u0275property", moduleName: CORE };
|
|
3066
|
+
static animationEnterListener = {
|
|
3067
|
+
name: "\u0275\u0275animateEnterListener",
|
|
3068
|
+
moduleName: CORE
|
|
3069
|
+
};
|
|
3070
|
+
static animationLeaveListener = {
|
|
3071
|
+
name: "\u0275\u0275animateLeaveListener",
|
|
3072
|
+
moduleName: CORE
|
|
3073
|
+
};
|
|
3074
|
+
static animationEnter = { name: "\u0275\u0275animateEnter", moduleName: CORE };
|
|
3075
|
+
static animationLeave = { name: "\u0275\u0275animateLeave", moduleName: CORE };
|
|
3065
3076
|
static i18n = { name: "\u0275\u0275i18n", moduleName: CORE };
|
|
3066
3077
|
static i18nAttributes = { name: "\u0275\u0275i18nAttributes", moduleName: CORE };
|
|
3067
3078
|
static i18nExp = { name: "\u0275\u0275i18nExp", moduleName: CORE };
|
|
@@ -3205,6 +3216,10 @@ var Identifiers = class {
|
|
|
3205
3216
|
name: "\u0275\u0275ExternalStylesFeature",
|
|
3206
3217
|
moduleName: CORE
|
|
3207
3218
|
};
|
|
3219
|
+
static AnimationsFeature = {
|
|
3220
|
+
name: "\u0275\u0275AnimationsFeature",
|
|
3221
|
+
moduleName: CORE
|
|
3222
|
+
};
|
|
3208
3223
|
static listener = { name: "\u0275\u0275listener", moduleName: CORE };
|
|
3209
3224
|
static getInheritedFactory = {
|
|
3210
3225
|
name: "\u0275\u0275getInheritedFactory",
|
|
@@ -4789,6 +4804,7 @@ var ParsedProperty = class {
|
|
|
4789
4804
|
valueSpan;
|
|
4790
4805
|
isLiteral;
|
|
4791
4806
|
isLegacyAnimation;
|
|
4807
|
+
isAnimation;
|
|
4792
4808
|
constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {
|
|
4793
4809
|
this.name = name;
|
|
4794
4810
|
this.expression = expression;
|
|
@@ -4798,6 +4814,7 @@ var ParsedProperty = class {
|
|
|
4798
4814
|
this.valueSpan = valueSpan;
|
|
4799
4815
|
this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
|
|
4800
4816
|
this.isLegacyAnimation = this.type === ParsedPropertyType.LEGACY_ANIMATION;
|
|
4817
|
+
this.isAnimation = this.type === ParsedPropertyType.ANIMATION;
|
|
4801
4818
|
}
|
|
4802
4819
|
};
|
|
4803
4820
|
var ParsedPropertyType;
|
|
@@ -4806,12 +4823,14 @@ var ParsedPropertyType;
|
|
|
4806
4823
|
ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
|
|
4807
4824
|
ParsedPropertyType2[ParsedPropertyType2["LEGACY_ANIMATION"] = 2] = "LEGACY_ANIMATION";
|
|
4808
4825
|
ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
|
|
4826
|
+
ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 4] = "ANIMATION";
|
|
4809
4827
|
})(ParsedPropertyType || (ParsedPropertyType = {}));
|
|
4810
4828
|
var ParsedEventType;
|
|
4811
4829
|
(function(ParsedEventType2) {
|
|
4812
4830
|
ParsedEventType2[ParsedEventType2["Regular"] = 0] = "Regular";
|
|
4813
4831
|
ParsedEventType2[ParsedEventType2["LegacyAnimation"] = 1] = "LegacyAnimation";
|
|
4814
4832
|
ParsedEventType2[ParsedEventType2["TwoWay"] = 2] = "TwoWay";
|
|
4833
|
+
ParsedEventType2[ParsedEventType2["Animation"] = 3] = "Animation";
|
|
4815
4834
|
})(ParsedEventType || (ParsedEventType = {}));
|
|
4816
4835
|
var ParsedEvent = class {
|
|
4817
4836
|
static {
|
|
@@ -4859,6 +4878,7 @@ var BindingType;
|
|
|
4859
4878
|
BindingType2[BindingType2["Style"] = 3] = "Style";
|
|
4860
4879
|
BindingType2[BindingType2["LegacyAnimation"] = 4] = "LegacyAnimation";
|
|
4861
4880
|
BindingType2[BindingType2["TwoWay"] = 5] = "TwoWay";
|
|
4881
|
+
BindingType2[BindingType2["Animation"] = 6] = "Animation";
|
|
4862
4882
|
})(BindingType || (BindingType = {}));
|
|
4863
4883
|
var BoundElementProperty = class {
|
|
4864
4884
|
static {
|
|
@@ -8372,6 +8392,10 @@ var OpKind;
|
|
|
8372
8392
|
OpKind2[OpKind2["I18nContext"] = 50] = "I18nContext";
|
|
8373
8393
|
OpKind2[OpKind2["I18nAttributes"] = 51] = "I18nAttributes";
|
|
8374
8394
|
OpKind2[OpKind2["SourceLocation"] = 52] = "SourceLocation";
|
|
8395
|
+
OpKind2[OpKind2["Animation"] = 53] = "Animation";
|
|
8396
|
+
OpKind2[OpKind2["AnimationString"] = 54] = "AnimationString";
|
|
8397
|
+
OpKind2[OpKind2["AnimationBinding"] = 55] = "AnimationBinding";
|
|
8398
|
+
OpKind2[OpKind2["AnimationListener"] = 56] = "AnimationListener";
|
|
8375
8399
|
})(OpKind || (OpKind = {}));
|
|
8376
8400
|
var ExpressionKind;
|
|
8377
8401
|
(function(ExpressionKind2) {
|
|
@@ -8429,6 +8453,7 @@ var BindingKind;
|
|
|
8429
8453
|
BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
|
|
8430
8454
|
BindingKind2[BindingKind2["LegacyAnimation"] = 6] = "LegacyAnimation";
|
|
8431
8455
|
BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
|
|
8456
|
+
BindingKind2[BindingKind2["Animation"] = 8] = "Animation";
|
|
8432
8457
|
})(BindingKind || (BindingKind = {}));
|
|
8433
8458
|
var I18nParamResolutionTime;
|
|
8434
8459
|
(function(I18nParamResolutionTime2) {
|
|
@@ -8578,13 +8603,13 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
8578
8603
|
};
|
|
8579
8604
|
}
|
|
8580
8605
|
__name(createBindingOp, "createBindingOp");
|
|
8581
|
-
function createPropertyOp(target, name, expression,
|
|
8606
|
+
function createPropertyOp(target, name, expression, bindingKind, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
8582
8607
|
return {
|
|
8583
8608
|
kind: OpKind.Property,
|
|
8584
8609
|
target,
|
|
8585
8610
|
name,
|
|
8586
8611
|
expression,
|
|
8587
|
-
|
|
8612
|
+
bindingKind,
|
|
8588
8613
|
securityContext,
|
|
8589
8614
|
sanitizer: null,
|
|
8590
8615
|
isStructuralTemplateAttribute,
|
|
@@ -8725,6 +8750,22 @@ function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
|
8725
8750
|
};
|
|
8726
8751
|
}
|
|
8727
8752
|
__name(createRepeaterOp, "createRepeaterOp");
|
|
8753
|
+
function createAnimationBindingOp(name, target, animationKind, expression, securityContext, sourceSpan, animationBindingKind) {
|
|
8754
|
+
return {
|
|
8755
|
+
kind: OpKind.AnimationBinding,
|
|
8756
|
+
name,
|
|
8757
|
+
target,
|
|
8758
|
+
animationKind,
|
|
8759
|
+
expression,
|
|
8760
|
+
i18nMessage: null,
|
|
8761
|
+
securityContext,
|
|
8762
|
+
sanitizer: null,
|
|
8763
|
+
sourceSpan,
|
|
8764
|
+
animationBindingKind,
|
|
8765
|
+
...NEW_OP
|
|
8766
|
+
};
|
|
8767
|
+
}
|
|
8768
|
+
__name(createAnimationBindingOp, "createAnimationBindingOp");
|
|
8728
8769
|
function createDeferWhenOp(target, expr, modifier, sourceSpan) {
|
|
8729
8770
|
return {
|
|
8730
8771
|
kind: OpKind.DeferWhen,
|
|
@@ -9604,6 +9645,8 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
9604
9645
|
case OpKind.StyleMap:
|
|
9605
9646
|
case OpKind.ClassProp:
|
|
9606
9647
|
case OpKind.ClassMap:
|
|
9648
|
+
case OpKind.AnimationString:
|
|
9649
|
+
case OpKind.AnimationBinding:
|
|
9607
9650
|
case OpKind.Binding:
|
|
9608
9651
|
if (op.expression instanceof Interpolation2) {
|
|
9609
9652
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
@@ -9651,6 +9694,8 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
9651
9694
|
op.contextValue = transformExpressionsInExpression(op.contextValue, transform2, flags);
|
|
9652
9695
|
}
|
|
9653
9696
|
break;
|
|
9697
|
+
case OpKind.Animation:
|
|
9698
|
+
case OpKind.AnimationListener:
|
|
9654
9699
|
case OpKind.Listener:
|
|
9655
9700
|
case OpKind.TwoWayListener:
|
|
9656
9701
|
for (const innerOp of op.handlerOps) {
|
|
@@ -10236,6 +10281,39 @@ function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
|
|
|
10236
10281
|
};
|
|
10237
10282
|
}
|
|
10238
10283
|
__name(createTextOp, "createTextOp");
|
|
10284
|
+
function createAnimationStringOp(name, target, animationKind, expression, securityContext, sourceSpan) {
|
|
10285
|
+
return {
|
|
10286
|
+
kind: OpKind.AnimationString,
|
|
10287
|
+
name,
|
|
10288
|
+
target,
|
|
10289
|
+
animationKind,
|
|
10290
|
+
expression,
|
|
10291
|
+
i18nMessage: null,
|
|
10292
|
+
securityContext,
|
|
10293
|
+
sanitizer: null,
|
|
10294
|
+
sourceSpan,
|
|
10295
|
+
...NEW_OP
|
|
10296
|
+
};
|
|
10297
|
+
}
|
|
10298
|
+
__name(createAnimationStringOp, "createAnimationStringOp");
|
|
10299
|
+
function createAnimationOp(name, target, animationKind, callbackOps, securityContext, sourceSpan) {
|
|
10300
|
+
const handlerOps = new OpList();
|
|
10301
|
+
handlerOps.push(callbackOps);
|
|
10302
|
+
return {
|
|
10303
|
+
kind: OpKind.Animation,
|
|
10304
|
+
name,
|
|
10305
|
+
target,
|
|
10306
|
+
animationKind,
|
|
10307
|
+
handlerOps,
|
|
10308
|
+
handlerFnName: null,
|
|
10309
|
+
i18nMessage: null,
|
|
10310
|
+
securityContext,
|
|
10311
|
+
sanitizer: null,
|
|
10312
|
+
sourceSpan,
|
|
10313
|
+
...NEW_OP
|
|
10314
|
+
};
|
|
10315
|
+
}
|
|
10316
|
+
__name(createAnimationOp, "createAnimationOp");
|
|
10239
10317
|
function createListenerOp(target, targetSlot, name, tag, handlerOps, legacyAnimationPhase, eventTarget, hostListener, sourceSpan) {
|
|
10240
10318
|
const handlerList = new OpList();
|
|
10241
10319
|
handlerList.push(handlerOps);
|
|
@@ -10257,6 +10335,26 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, legacyAnima
|
|
|
10257
10335
|
};
|
|
10258
10336
|
}
|
|
10259
10337
|
__name(createListenerOp, "createListenerOp");
|
|
10338
|
+
function createAnimationListenerOp(target, targetSlot, name, tag, handlerOps, animationKind, eventTarget, hostListener, sourceSpan) {
|
|
10339
|
+
const handlerList = new OpList();
|
|
10340
|
+
handlerList.push(handlerOps);
|
|
10341
|
+
return {
|
|
10342
|
+
kind: OpKind.AnimationListener,
|
|
10343
|
+
target,
|
|
10344
|
+
targetSlot,
|
|
10345
|
+
tag,
|
|
10346
|
+
hostListener,
|
|
10347
|
+
name,
|
|
10348
|
+
animationKind,
|
|
10349
|
+
handlerOps: handlerList,
|
|
10350
|
+
handlerFnName: null,
|
|
10351
|
+
consumesDollarEvent: false,
|
|
10352
|
+
eventTarget,
|
|
10353
|
+
sourceSpan,
|
|
10354
|
+
...NEW_OP
|
|
10355
|
+
};
|
|
10356
|
+
}
|
|
10357
|
+
__name(createAnimationListenerOp, "createAnimationListenerOp");
|
|
10260
10358
|
function createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {
|
|
10261
10359
|
const handlerList = new OpList();
|
|
10262
10360
|
handlerList.push(handlerOps);
|
|
@@ -10495,12 +10593,12 @@ function createSourceLocationOp(templatePath, locations) {
|
|
|
10495
10593
|
};
|
|
10496
10594
|
}
|
|
10497
10595
|
__name(createSourceLocationOp, "createSourceLocationOp");
|
|
10498
|
-
function createDomPropertyOp(name, expression,
|
|
10596
|
+
function createDomPropertyOp(name, expression, bindingKind, i18nContext, securityContext, sourceSpan) {
|
|
10499
10597
|
return {
|
|
10500
10598
|
kind: OpKind.DomProperty,
|
|
10501
10599
|
name,
|
|
10502
10600
|
expression,
|
|
10503
|
-
|
|
10601
|
+
bindingKind,
|
|
10504
10602
|
i18nContext,
|
|
10505
10603
|
securityContext,
|
|
10506
10604
|
sanitizer: null,
|
|
@@ -10656,7 +10754,7 @@ var CompilationUnit = class {
|
|
|
10656
10754
|
*ops() {
|
|
10657
10755
|
for (const op of this.create) {
|
|
10658
10756
|
yield op;
|
|
10659
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
10757
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
|
|
10660
10758
|
for (const listenerOp of op.handlerOps) {
|
|
10661
10759
|
yield listenerOp;
|
|
10662
10760
|
}
|
|
@@ -10890,7 +10988,7 @@ function extractAttributes(job) {
|
|
|
10890
10988
|
extractAttributeOp(unit, op, elements);
|
|
10891
10989
|
break;
|
|
10892
10990
|
case OpKind.Property:
|
|
10893
|
-
if (
|
|
10991
|
+
if (op.bindingKind !== BindingKind.LegacyAnimation && op.bindingKind !== BindingKind.Animation) {
|
|
10894
10992
|
let bindingKind;
|
|
10895
10993
|
if (op.i18nMessage !== null && op.templateKind === null) {
|
|
10896
10994
|
bindingKind = BindingKind.I18n;
|
|
@@ -10914,7 +11012,7 @@ function extractAttributes(job) {
|
|
|
10914
11012
|
null,
|
|
10915
11013
|
op.securityContext
|
|
10916
11014
|
),
|
|
10917
|
-
lookupElement$
|
|
11015
|
+
lookupElement$3(elements, op.target)
|
|
10918
11016
|
);
|
|
10919
11017
|
}
|
|
10920
11018
|
break;
|
|
@@ -10931,7 +11029,7 @@ function extractAttributes(job) {
|
|
|
10931
11029
|
/* i18nMessage */
|
|
10932
11030
|
null,
|
|
10933
11031
|
op.securityContext
|
|
10934
|
-
), lookupElement$
|
|
11032
|
+
), lookupElement$3(elements, op.target));
|
|
10935
11033
|
break;
|
|
10936
11034
|
case OpKind.StyleProp:
|
|
10937
11035
|
case OpKind.ClassProp:
|
|
@@ -10948,7 +11046,7 @@ function extractAttributes(job) {
|
|
|
10948
11046
|
/* i18nMessage */
|
|
10949
11047
|
null,
|
|
10950
11048
|
SecurityContext.STYLE
|
|
10951
|
-
), lookupElement$
|
|
11049
|
+
), lookupElement$3(elements, op.target));
|
|
10952
11050
|
}
|
|
10953
11051
|
break;
|
|
10954
11052
|
case OpKind.Listener:
|
|
@@ -10972,7 +11070,7 @@ function extractAttributes(job) {
|
|
|
10972
11070
|
}
|
|
10973
11071
|
unit.create.push(extractedAttributeOp);
|
|
10974
11072
|
} else {
|
|
10975
|
-
OpList.insertBefore(extractedAttributeOp, lookupElement$
|
|
11073
|
+
OpList.insertBefore(extractedAttributeOp, lookupElement$3(elements, op.target));
|
|
10976
11074
|
}
|
|
10977
11075
|
}
|
|
10978
11076
|
break;
|
|
@@ -10991,7 +11089,7 @@ function extractAttributes(job) {
|
|
|
10991
11089
|
null,
|
|
10992
11090
|
SecurityContext.NONE
|
|
10993
11091
|
);
|
|
10994
|
-
OpList.insertBefore(extractedAttributeOp, lookupElement$
|
|
11092
|
+
OpList.insertBefore(extractedAttributeOp, lookupElement$3(elements, op.target));
|
|
10995
11093
|
}
|
|
10996
11094
|
break;
|
|
10997
11095
|
}
|
|
@@ -10999,14 +11097,14 @@ function extractAttributes(job) {
|
|
|
10999
11097
|
}
|
|
11000
11098
|
}
|
|
11001
11099
|
__name(extractAttributes, "extractAttributes");
|
|
11002
|
-
function lookupElement$
|
|
11100
|
+
function lookupElement$3(elements, xref) {
|
|
11003
11101
|
const el = elements.get(xref);
|
|
11004
11102
|
if (el === void 0) {
|
|
11005
11103
|
throw new Error("All attributes should have an element-like target.");
|
|
11006
11104
|
}
|
|
11007
11105
|
return el;
|
|
11008
11106
|
}
|
|
11009
|
-
__name(lookupElement$
|
|
11107
|
+
__name(lookupElement$3, "lookupElement$3");
|
|
11010
11108
|
function extractAttributeOp(unit, op, elements) {
|
|
11011
11109
|
if (op.expression instanceof Interpolation2) {
|
|
11012
11110
|
return;
|
|
@@ -11020,21 +11118,21 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
11020
11118
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
11021
11119
|
unit.create.push(extractedAttributeOp);
|
|
11022
11120
|
} else {
|
|
11023
|
-
const ownerOp = lookupElement$
|
|
11121
|
+
const ownerOp = lookupElement$3(elements, op.target);
|
|
11024
11122
|
OpList.insertBefore(extractedAttributeOp, ownerOp);
|
|
11025
11123
|
}
|
|
11026
11124
|
OpList.remove(op);
|
|
11027
11125
|
}
|
|
11028
11126
|
}
|
|
11029
11127
|
__name(extractAttributeOp, "extractAttributeOp");
|
|
11030
|
-
function lookupElement$
|
|
11128
|
+
function lookupElement$2(elements, xref) {
|
|
11031
11129
|
const el = elements.get(xref);
|
|
11032
11130
|
if (el === void 0) {
|
|
11033
11131
|
throw new Error("All attributes should have an element-like target.");
|
|
11034
11132
|
}
|
|
11035
11133
|
return el;
|
|
11036
11134
|
}
|
|
11037
|
-
__name(lookupElement$
|
|
11135
|
+
__name(lookupElement$2, "lookupElement$2");
|
|
11038
11136
|
function specializeBindings(job) {
|
|
11039
11137
|
const elements = /* @__PURE__ */ new Map();
|
|
11040
11138
|
for (const unit of job.units) {
|
|
@@ -11054,19 +11152,42 @@ function specializeBindings(job) {
|
|
|
11054
11152
|
case BindingKind.Attribute:
|
|
11055
11153
|
if (op.name === "ngNonBindable") {
|
|
11056
11154
|
OpList.remove(op);
|
|
11057
|
-
const target = lookupElement$
|
|
11155
|
+
const target = lookupElement$2(elements, op.target);
|
|
11058
11156
|
target.nonBindable = true;
|
|
11157
|
+
} else if (op.name.startsWith("animate.")) {
|
|
11158
|
+
OpList.replace(op, createAnimationBindingOp(
|
|
11159
|
+
op.name,
|
|
11160
|
+
op.target,
|
|
11161
|
+
op.name === "animate.enter" ? "enter" : "leave",
|
|
11162
|
+
op.expression,
|
|
11163
|
+
op.securityContext,
|
|
11164
|
+
op.sourceSpan,
|
|
11165
|
+
0
|
|
11166
|
+
/* ir.AnimationBindingKind.STRING */
|
|
11167
|
+
));
|
|
11059
11168
|
} else {
|
|
11060
11169
|
const [namespace, name] = splitNsName(op.name);
|
|
11061
11170
|
OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
11062
11171
|
}
|
|
11063
11172
|
break;
|
|
11173
|
+
case BindingKind.Animation:
|
|
11174
|
+
OpList.replace(op, createAnimationBindingOp(
|
|
11175
|
+
op.name,
|
|
11176
|
+
op.target,
|
|
11177
|
+
op.name === "animate.enter" ? "enter" : "leave",
|
|
11178
|
+
op.expression,
|
|
11179
|
+
op.securityContext,
|
|
11180
|
+
op.sourceSpan,
|
|
11181
|
+
1
|
|
11182
|
+
/* ir.AnimationBindingKind.VALUE */
|
|
11183
|
+
));
|
|
11184
|
+
break;
|
|
11064
11185
|
case BindingKind.Property:
|
|
11065
11186
|
case BindingKind.LegacyAnimation:
|
|
11066
11187
|
if (job.kind === CompilationJobKind.Host) {
|
|
11067
|
-
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind
|
|
11188
|
+
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
11068
11189
|
} else {
|
|
11069
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind
|
|
11190
|
+
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
11070
11191
|
}
|
|
11071
11192
|
break;
|
|
11072
11193
|
case BindingKind.TwoWayProperty:
|
|
@@ -11085,6 +11206,7 @@ function specializeBindings(job) {
|
|
|
11085
11206
|
}
|
|
11086
11207
|
__name(specializeBindings, "specializeBindings");
|
|
11087
11208
|
var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
|
|
11209
|
+
[Identifiers.ariaProperty, Identifiers.ariaProperty],
|
|
11088
11210
|
[Identifiers.attribute, Identifiers.attribute],
|
|
11089
11211
|
[Identifiers.classProp, Identifiers.classProp],
|
|
11090
11212
|
[Identifiers.element, Identifiers.element],
|
|
@@ -11114,7 +11236,11 @@ var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
|
|
|
11114
11236
|
[Identifiers.domElementContainerStart, Identifiers.domElementContainerStart],
|
|
11115
11237
|
[Identifiers.domElementContainerEnd, Identifiers.domElementContainerEnd],
|
|
11116
11238
|
[Identifiers.domListener, Identifiers.domListener],
|
|
11117
|
-
[Identifiers.domTemplate, Identifiers.domTemplate]
|
|
11239
|
+
[Identifiers.domTemplate, Identifiers.domTemplate],
|
|
11240
|
+
[Identifiers.animationEnter, Identifiers.animationEnter],
|
|
11241
|
+
[Identifiers.animationLeave, Identifiers.animationLeave],
|
|
11242
|
+
[Identifiers.animationEnterListener, Identifiers.animationEnterListener],
|
|
11243
|
+
[Identifiers.animationLeaveListener, Identifiers.animationLeaveListener]
|
|
11118
11244
|
]);
|
|
11119
11245
|
var MAX_CHAIN_LENGTH = 256;
|
|
11120
11246
|
function chain(job) {
|
|
@@ -11183,6 +11309,7 @@ function generateConditionalExpressions(job) {
|
|
|
11183
11309
|
test = literal(-1);
|
|
11184
11310
|
}
|
|
11185
11311
|
let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());
|
|
11312
|
+
let caseExpressionTemporaryXref = null;
|
|
11186
11313
|
for (let i = op.conditions.length - 1; i >= 0; i--) {
|
|
11187
11314
|
let conditionalCase = op.conditions[i];
|
|
11188
11315
|
if (conditionalCase.expr === null) {
|
|
@@ -11192,7 +11319,7 @@ function generateConditionalExpressions(job) {
|
|
|
11192
11319
|
const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);
|
|
11193
11320
|
conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);
|
|
11194
11321
|
} else if (conditionalCase.alias !== null) {
|
|
11195
|
-
|
|
11322
|
+
caseExpressionTemporaryXref ??= job.allocateXrefId();
|
|
11196
11323
|
conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);
|
|
11197
11324
|
op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);
|
|
11198
11325
|
}
|
|
@@ -11461,6 +11588,48 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
11461
11588
|
return literalArr(attrArray);
|
|
11462
11589
|
}
|
|
11463
11590
|
__name(serializeAttributes, "serializeAttributes");
|
|
11591
|
+
function lookupElement$1(elements, xref) {
|
|
11592
|
+
const el = elements.get(xref);
|
|
11593
|
+
if (el === void 0) {
|
|
11594
|
+
throw new Error("All attributes should have an element-like target.");
|
|
11595
|
+
}
|
|
11596
|
+
return el;
|
|
11597
|
+
}
|
|
11598
|
+
__name(lookupElement$1, "lookupElement$1");
|
|
11599
|
+
function convertAnimations(job) {
|
|
11600
|
+
const elements = /* @__PURE__ */ new Map();
|
|
11601
|
+
for (const unit of job.units) {
|
|
11602
|
+
for (const op of unit.create) {
|
|
11603
|
+
if (!isElementOrContainerOp(op)) {
|
|
11604
|
+
continue;
|
|
11605
|
+
}
|
|
11606
|
+
elements.set(op.xref, op);
|
|
11607
|
+
}
|
|
11608
|
+
}
|
|
11609
|
+
for (const unit of job.units) {
|
|
11610
|
+
for (const op of unit.ops()) {
|
|
11611
|
+
if (op.kind === OpKind.AnimationBinding) {
|
|
11612
|
+
const createAnimationOp2 = getAnimationOp(op);
|
|
11613
|
+
if (job.kind === CompilationJobKind.Host) {
|
|
11614
|
+
unit.create.push(createAnimationOp2);
|
|
11615
|
+
} else {
|
|
11616
|
+
OpList.insertAfter(createAnimationOp2, lookupElement$1(elements, op.target));
|
|
11617
|
+
}
|
|
11618
|
+
OpList.remove(op);
|
|
11619
|
+
}
|
|
11620
|
+
}
|
|
11621
|
+
}
|
|
11622
|
+
}
|
|
11623
|
+
__name(convertAnimations, "convertAnimations");
|
|
11624
|
+
function getAnimationOp(op) {
|
|
11625
|
+
if (op.animationBindingKind === 0) {
|
|
11626
|
+
return createAnimationStringOp(op.name, op.target, op.name === "animate.enter" ? "enter" : "leave", op.expression, op.securityContext, op.sourceSpan);
|
|
11627
|
+
} else {
|
|
11628
|
+
const expression = op.expression;
|
|
11629
|
+
return createAnimationOp(op.name, op.target, op.name === "animate.enter" ? "enter" : "leave", [createStatementOp(new ReturnStatement(expression, expression.sourceSpan))], op.securityContext, op.sourceSpan);
|
|
11630
|
+
}
|
|
11631
|
+
}
|
|
11632
|
+
__name(getAnimationOp, "getAnimationOp");
|
|
11464
11633
|
function convertI18nBindings(job) {
|
|
11465
11634
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
11466
11635
|
for (const unit of job.units) {
|
|
@@ -12135,6 +12304,8 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
12135
12304
|
op.trackByOps.prepend(generateVariablesInScopeForView(view, scope, false));
|
|
12136
12305
|
}
|
|
12137
12306
|
break;
|
|
12307
|
+
case OpKind.Animation:
|
|
12308
|
+
case OpKind.AnimationListener:
|
|
12138
12309
|
case OpKind.Listener:
|
|
12139
12310
|
case OpKind.TwoWayListener:
|
|
12140
12311
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope, true));
|
|
@@ -12207,7 +12378,7 @@ function getScopeForView(view, parent) {
|
|
|
12207
12378
|
return scope;
|
|
12208
12379
|
}
|
|
12209
12380
|
__name(getScopeForView, "getScopeForView");
|
|
12210
|
-
function generateVariablesInScopeForView(view, scope,
|
|
12381
|
+
function generateVariablesInScopeForView(view, scope, isCallback) {
|
|
12211
12382
|
const newOps = [];
|
|
12212
12383
|
if (scope.view !== view.xref) {
|
|
12213
12384
|
newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr(), VariableFlags.None));
|
|
@@ -12224,7 +12395,7 @@ function generateVariablesInScopeForView(view, scope, isListener) {
|
|
|
12224
12395
|
for (const ref of scope.references) {
|
|
12225
12396
|
newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.targetSlot, ref.offset), VariableFlags.None));
|
|
12226
12397
|
}
|
|
12227
|
-
if (scope.view !== view.xref ||
|
|
12398
|
+
if (scope.view !== view.xref || isCallback) {
|
|
12228
12399
|
for (const decl of scope.letDeclarations) {
|
|
12229
12400
|
newOps.push(createVariableOp(view.job.allocateXrefId(), decl.variable, new ContextLetReferenceExpr(decl.targetId, decl.targetSlot), VariableFlags.None));
|
|
12230
12401
|
}
|
|
@@ -15495,6 +15666,16 @@ var _Tokenizer = class {
|
|
|
15495
15666
|
}
|
|
15496
15667
|
return isNameEnd(code);
|
|
15497
15668
|
}, "nameEndPredicate");
|
|
15669
|
+
} else if (attrNameStart === $LBRACKET) {
|
|
15670
|
+
let openBrackets = 0;
|
|
15671
|
+
nameEndPredicate = /* @__PURE__ */ __name((code) => {
|
|
15672
|
+
if (code === $LBRACKET) {
|
|
15673
|
+
openBrackets++;
|
|
15674
|
+
} else if (code === $RBRACKET) {
|
|
15675
|
+
openBrackets--;
|
|
15676
|
+
}
|
|
15677
|
+
return openBrackets <= 0 ? isNameEnd(code) : isNewLine(code);
|
|
15678
|
+
}, "nameEndPredicate");
|
|
15498
15679
|
} else {
|
|
15499
15680
|
nameEndPredicate = isNameEnd;
|
|
15500
15681
|
}
|
|
@@ -19003,7 +19184,45 @@ var _ATTR_TO_PROP = new Map(Object.entries({
|
|
|
19003
19184
|
"formaction": "formAction",
|
|
19004
19185
|
"innerHtml": "innerHTML",
|
|
19005
19186
|
"readonly": "readOnly",
|
|
19006
|
-
"tabindex": "tabIndex"
|
|
19187
|
+
"tabindex": "tabIndex",
|
|
19188
|
+
// https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
|
|
19189
|
+
"aria-atomic": "ariaAtomic",
|
|
19190
|
+
"aria-autocomplete": "ariaAutoComplete",
|
|
19191
|
+
"aria-busy": "ariaBusy",
|
|
19192
|
+
"aria-checked": "ariaChecked",
|
|
19193
|
+
"aria-colcount": "ariaColCount",
|
|
19194
|
+
"aria-colindex": "ariaColIndex",
|
|
19195
|
+
"aria-colspan": "ariaColSpan",
|
|
19196
|
+
"aria-current": "ariaCurrent",
|
|
19197
|
+
"aria-disabled": "ariaDisabled",
|
|
19198
|
+
"aria-expanded": "ariaExpanded",
|
|
19199
|
+
"aria-haspopup": "ariaHasPopup",
|
|
19200
|
+
"aria-hidden": "ariaHidden",
|
|
19201
|
+
"aria-invalid": "ariaInvalid",
|
|
19202
|
+
"aria-keyshortcuts": "ariaKeyShortcuts",
|
|
19203
|
+
"aria-label": "ariaLabel",
|
|
19204
|
+
"aria-level": "ariaLevel",
|
|
19205
|
+
"aria-live": "ariaLive",
|
|
19206
|
+
"aria-modal": "ariaModal",
|
|
19207
|
+
"aria-multiline": "ariaMultiLine",
|
|
19208
|
+
"aria-multiselectable": "ariaMultiSelectable",
|
|
19209
|
+
"aria-orientation": "ariaOrientation",
|
|
19210
|
+
"aria-placeholder": "ariaPlaceholder",
|
|
19211
|
+
"aria-posinset": "ariaPosInSet",
|
|
19212
|
+
"aria-pressed": "ariaPressed",
|
|
19213
|
+
"aria-readonly": "ariaReadOnly",
|
|
19214
|
+
"aria-required": "ariaRequired",
|
|
19215
|
+
"aria-roledescription": "ariaRoleDescription",
|
|
19216
|
+
"aria-rowcount": "ariaRowCount",
|
|
19217
|
+
"aria-rowindex": "ariaRowIndex",
|
|
19218
|
+
"aria-rowspan": "ariaRowSpan",
|
|
19219
|
+
"aria-selected": "ariaSelected",
|
|
19220
|
+
"aria-setsize": "ariaSetSize",
|
|
19221
|
+
"aria-sort": "ariaSort",
|
|
19222
|
+
"aria-valuemax": "ariaValueMax",
|
|
19223
|
+
"aria-valuemin": "ariaValueMin",
|
|
19224
|
+
"aria-valuenow": "ariaValueNow",
|
|
19225
|
+
"aria-valuetext": "ariaValueText"
|
|
19007
19226
|
}));
|
|
19008
19227
|
var _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {
|
|
19009
19228
|
inverted.set(propertyName, attributeName);
|
|
@@ -20549,10 +20768,32 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20549
20768
|
switch (op.kind) {
|
|
20550
20769
|
case OpKind.Property:
|
|
20551
20770
|
case OpKind.DomProperty:
|
|
20552
|
-
if (op.
|
|
20771
|
+
if (op.bindingKind === BindingKind.LegacyAnimation) {
|
|
20553
20772
|
op.name = "@" + op.name;
|
|
20554
20773
|
}
|
|
20555
20774
|
break;
|
|
20775
|
+
case OpKind.Animation:
|
|
20776
|
+
if (op.handlerFnName === null) {
|
|
20777
|
+
const animationKind2 = op.name.replace(".", "");
|
|
20778
|
+
op.handlerFnName = `${unit.fnName}_${animationKind2}_cb`;
|
|
20779
|
+
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
20780
|
+
}
|
|
20781
|
+
break;
|
|
20782
|
+
case OpKind.AnimationListener:
|
|
20783
|
+
if (op.handlerFnName !== null) {
|
|
20784
|
+
break;
|
|
20785
|
+
}
|
|
20786
|
+
if (!op.hostListener && op.targetSlot.slot === null) {
|
|
20787
|
+
throw new Error(`Expected a slot to be assigned`);
|
|
20788
|
+
}
|
|
20789
|
+
const animationKind = op.name.replace(".", "");
|
|
20790
|
+
if (op.hostListener) {
|
|
20791
|
+
op.handlerFnName = `${baseName}_${animationKind}_HostBindingHandler`;
|
|
20792
|
+
} else {
|
|
20793
|
+
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animationKind}_${op.targetSlot.slot}_listener`;
|
|
20794
|
+
}
|
|
20795
|
+
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
20796
|
+
break;
|
|
20556
20797
|
case OpKind.Listener:
|
|
20557
20798
|
if (op.handlerFnName !== null) {
|
|
20558
20799
|
break;
|
|
@@ -20560,15 +20801,15 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20560
20801
|
if (!op.hostListener && op.targetSlot.slot === null) {
|
|
20561
20802
|
throw new Error(`Expected a slot to be assigned`);
|
|
20562
20803
|
}
|
|
20563
|
-
let
|
|
20804
|
+
let animation2 = "";
|
|
20564
20805
|
if (op.isLegacyAnimationListener) {
|
|
20565
20806
|
op.name = `@${op.name}.${op.legacyAnimationPhase}`;
|
|
20566
|
-
|
|
20807
|
+
animation2 = "animation";
|
|
20567
20808
|
}
|
|
20568
20809
|
if (op.hostListener) {
|
|
20569
|
-
op.handlerFnName = `${baseName}_${
|
|
20810
|
+
op.handlerFnName = `${baseName}_${animation2}${op.name}_HostBindingHandler`;
|
|
20570
20811
|
} else {
|
|
20571
|
-
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${
|
|
20812
|
+
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation2}${op.name}_${op.targetSlot.slot}_listener`;
|
|
20572
20813
|
}
|
|
20573
20814
|
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
20574
20815
|
break;
|
|
@@ -20685,7 +20926,7 @@ __name(stripImportant, "stripImportant");
|
|
|
20685
20926
|
function mergeNextContextExpressions(job) {
|
|
20686
20927
|
for (const unit of job.units) {
|
|
20687
20928
|
for (const op of unit.create) {
|
|
20688
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
20929
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
|
|
20689
20930
|
mergeNextContextsInOps(op.handlerOps);
|
|
20690
20931
|
}
|
|
20691
20932
|
}
|
|
@@ -20786,7 +21027,7 @@ function kindWithInterpolationTest(kind, interpolation) {
|
|
|
20786
21027
|
}
|
|
20787
21028
|
__name(kindWithInterpolationTest, "kindWithInterpolationTest");
|
|
20788
21029
|
function basicListenerKindTest(op) {
|
|
20789
|
-
return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener;
|
|
21030
|
+
return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener;
|
|
20790
21031
|
}
|
|
20791
21032
|
__name(basicListenerKindTest, "basicListenerKindTest");
|
|
20792
21033
|
function nonInterpolationPropertyKindTest(op) {
|
|
@@ -20819,6 +21060,7 @@ var UPDATE_HOST_ORDERING = [
|
|
|
20819
21060
|
var handledOpKinds = /* @__PURE__ */ new Set([
|
|
20820
21061
|
OpKind.Listener,
|
|
20821
21062
|
OpKind.TwoWayListener,
|
|
21063
|
+
OpKind.AnimationListener,
|
|
20822
21064
|
OpKind.StyleMap,
|
|
20823
21065
|
OpKind.ClassMap,
|
|
20824
21066
|
OpKind.StyleProp,
|
|
@@ -20826,7 +21068,8 @@ var handledOpKinds = /* @__PURE__ */ new Set([
|
|
|
20826
21068
|
OpKind.Property,
|
|
20827
21069
|
OpKind.TwoWayProperty,
|
|
20828
21070
|
OpKind.DomProperty,
|
|
20829
|
-
OpKind.Attribute
|
|
21071
|
+
OpKind.Attribute,
|
|
21072
|
+
OpKind.Animation
|
|
20830
21073
|
]);
|
|
20831
21074
|
function orderOps(job) {
|
|
20832
21075
|
for (const unit of job.units) {
|
|
@@ -20994,6 +21237,11 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
20994
21237
|
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
|
|
20995
21238
|
}
|
|
20996
21239
|
break;
|
|
21240
|
+
case OpKind.Projection:
|
|
21241
|
+
if (op.fallbackView !== null) {
|
|
21242
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.fallbackView), i18nBlock, op.fallbackViewI18nPlaceholder, subTemplateIndex);
|
|
21243
|
+
}
|
|
21244
|
+
break;
|
|
20997
21245
|
}
|
|
20998
21246
|
}
|
|
20999
21247
|
return subTemplateIndex;
|
|
@@ -21564,6 +21812,10 @@ function i18nAttributes(slot, i18nAttributesConfig) {
|
|
|
21564
21812
|
return call(Identifiers.i18nAttributes, args, null);
|
|
21565
21813
|
}
|
|
21566
21814
|
__name(i18nAttributes, "i18nAttributes");
|
|
21815
|
+
function ariaProperty(name, expression, sourceSpan) {
|
|
21816
|
+
return propertyBase(Identifiers.ariaProperty, name, expression, null, sourceSpan);
|
|
21817
|
+
}
|
|
21818
|
+
__name(ariaProperty, "ariaProperty");
|
|
21567
21819
|
function property(name, expression, sanitizer, sourceSpan) {
|
|
21568
21820
|
return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
|
|
21569
21821
|
}
|
|
@@ -21706,6 +21958,31 @@ function domProperty(name, expression, sanitizer, sourceSpan) {
|
|
|
21706
21958
|
return propertyBase(Identifiers.domProperty, name, expression, sanitizer, sourceSpan);
|
|
21707
21959
|
}
|
|
21708
21960
|
__name(domProperty, "domProperty");
|
|
21961
|
+
function animation(animationKind, handlerFn, sanitizer, sourceSpan) {
|
|
21962
|
+
const args = [handlerFn];
|
|
21963
|
+
if (sanitizer !== null) {
|
|
21964
|
+
args.push(sanitizer);
|
|
21965
|
+
}
|
|
21966
|
+
const identifier = animationKind === "enter" ? Identifiers.animationEnter : Identifiers.animationLeave;
|
|
21967
|
+
return call(identifier, args, sourceSpan);
|
|
21968
|
+
}
|
|
21969
|
+
__name(animation, "animation");
|
|
21970
|
+
function animationString(animationKind, expression, sanitizer, sourceSpan) {
|
|
21971
|
+
const value = expression instanceof Interpolation2 ? interpolationToExpression(expression, sourceSpan) : expression;
|
|
21972
|
+
const args = [value];
|
|
21973
|
+
if (sanitizer !== null) {
|
|
21974
|
+
args.push(sanitizer);
|
|
21975
|
+
}
|
|
21976
|
+
const identifier = animationKind === "enter" ? Identifiers.animationEnter : Identifiers.animationLeave;
|
|
21977
|
+
return call(identifier, args, sourceSpan);
|
|
21978
|
+
}
|
|
21979
|
+
__name(animationString, "animationString");
|
|
21980
|
+
function animationListener(animationKind, handlerFn, eventTargetResolver, sourceSpan) {
|
|
21981
|
+
const args = [handlerFn];
|
|
21982
|
+
const identifier = animationKind === "enter" ? Identifiers.animationEnterListener : Identifiers.animationLeaveListener;
|
|
21983
|
+
return call(identifier, args, sourceSpan);
|
|
21984
|
+
}
|
|
21985
|
+
__name(animationListener, "animationListener");
|
|
21709
21986
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
21710
21987
|
return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
|
|
21711
21988
|
}
|
|
@@ -21827,6 +22104,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
21827
22104
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
21828
22105
|
}
|
|
21829
22106
|
__name(callVariadicInstruction, "callVariadicInstruction");
|
|
22107
|
+
var ARIA_PREFIX = "aria";
|
|
21830
22108
|
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
21831
22109
|
["window", Identifiers.resolveWindow],
|
|
21832
22110
|
["document", Identifiers.resolveDocument],
|
|
@@ -21913,6 +22191,23 @@ function reifyCreateOperations(unit, ops) {
|
|
|
21913
22191
|
case OpKind.DeclareLet:
|
|
21914
22192
|
OpList.replace(op, declareLet(op.handle.slot, op.sourceSpan));
|
|
21915
22193
|
break;
|
|
22194
|
+
case OpKind.AnimationString:
|
|
22195
|
+
OpList.replace(op, animationString(op.animationKind, op.expression, op.sanitizer, op.sourceSpan));
|
|
22196
|
+
break;
|
|
22197
|
+
case OpKind.Animation:
|
|
22198
|
+
const animationCallbackFn = reifyListenerHandler(
|
|
22199
|
+
unit,
|
|
22200
|
+
op.handlerFnName,
|
|
22201
|
+
op.handlerOps,
|
|
22202
|
+
/* consumesDollarEvent */
|
|
22203
|
+
false
|
|
22204
|
+
);
|
|
22205
|
+
OpList.replace(op, animation(op.animationKind, animationCallbackFn, op.sanitizer, op.sourceSpan));
|
|
22206
|
+
break;
|
|
22207
|
+
case OpKind.AnimationListener:
|
|
22208
|
+
const animationListenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
22209
|
+
OpList.replace(op, animationListener(op.animationKind, animationListenerFn, null, op.sourceSpan));
|
|
22210
|
+
break;
|
|
21916
22211
|
case OpKind.Listener:
|
|
21917
22212
|
const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
21918
22213
|
const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
|
|
@@ -22079,7 +22374,7 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
22079
22374
|
OpList.replace(op, advance(op.delta, op.sourceSpan));
|
|
22080
22375
|
break;
|
|
22081
22376
|
case OpKind.Property:
|
|
22082
|
-
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly &&
|
|
22377
|
+
OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && op.bindingKind !== BindingKind.LegacyAnimation && op.bindingKind !== BindingKind.Animation ? reifyDomProperty(op) : reifyProperty(op));
|
|
22083
22378
|
break;
|
|
22084
22379
|
case OpKind.TwoWayProperty:
|
|
22085
22380
|
OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
@@ -22112,10 +22407,10 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
22112
22407
|
if (op.expression instanceof Interpolation2) {
|
|
22113
22408
|
throw new Error("not yet handled");
|
|
22114
22409
|
} else {
|
|
22115
|
-
if (op.
|
|
22410
|
+
if (op.bindingKind === BindingKind.LegacyAnimation || op.bindingKind === BindingKind.Animation) {
|
|
22116
22411
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
22117
22412
|
} else {
|
|
22118
|
-
OpList.replace(op,
|
|
22413
|
+
OpList.replace(op, reifyDomProperty(op));
|
|
22119
22414
|
}
|
|
22120
22415
|
}
|
|
22121
22416
|
break;
|
|
@@ -22147,6 +22442,22 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
22147
22442
|
}
|
|
22148
22443
|
}
|
|
22149
22444
|
__name(reifyUpdateOperations, "reifyUpdateOperations");
|
|
22445
|
+
function ariaAttrName(name) {
|
|
22446
|
+
return name.charAt(ARIA_PREFIX.length) !== "-" ? ARIA_PREFIX + "-" + name.slice(ARIA_PREFIX.length).toLowerCase() : name;
|
|
22447
|
+
}
|
|
22448
|
+
__name(ariaAttrName, "ariaAttrName");
|
|
22449
|
+
function isAriaProperty(name) {
|
|
22450
|
+
return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
|
|
22451
|
+
}
|
|
22452
|
+
__name(isAriaProperty, "isAriaProperty");
|
|
22453
|
+
function reifyDomProperty(op) {
|
|
22454
|
+
return isAriaProperty(op.name) ? attribute(ariaAttrName(op.name), op.expression, null, null, op.sourceSpan) : domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
|
|
22455
|
+
}
|
|
22456
|
+
__name(reifyDomProperty, "reifyDomProperty");
|
|
22457
|
+
function reifyProperty(op) {
|
|
22458
|
+
return isAriaProperty(op.name) ? ariaProperty(op.name, op.expression, op.sourceSpan) : property(op.name, op.expression, op.sanitizer, op.sourceSpan);
|
|
22459
|
+
}
|
|
22460
|
+
__name(reifyProperty, "reifyProperty");
|
|
22150
22461
|
function reifyIrExpression(expr) {
|
|
22151
22462
|
if (!isIrExpression(expr)) {
|
|
22152
22463
|
return expr;
|
|
@@ -22338,6 +22649,8 @@ function processLexicalScope$1(view, ops) {
|
|
|
22338
22649
|
break;
|
|
22339
22650
|
}
|
|
22340
22651
|
break;
|
|
22652
|
+
case OpKind.Animation:
|
|
22653
|
+
case OpKind.AnimationListener:
|
|
22341
22654
|
case OpKind.Listener:
|
|
22342
22655
|
case OpKind.TwoWayListener:
|
|
22343
22656
|
processLexicalScope$1(view, op.handlerOps);
|
|
@@ -22399,10 +22712,10 @@ function resolveDollarEvent(job) {
|
|
|
22399
22712
|
__name(resolveDollarEvent, "resolveDollarEvent");
|
|
22400
22713
|
function transformDollarEvent(ops) {
|
|
22401
22714
|
for (const op of ops) {
|
|
22402
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
22715
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener || op.kind === OpKind.AnimationListener) {
|
|
22403
22716
|
transformExpressionsInOp(op, (expr) => {
|
|
22404
22717
|
if (expr instanceof LexicalReadExpr && expr.name === "$event") {
|
|
22405
|
-
if (op.kind === OpKind.Listener) {
|
|
22718
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.AnimationListener) {
|
|
22406
22719
|
op.consumesDollarEvent = true;
|
|
22407
22720
|
}
|
|
22408
22721
|
return new ReadVarExpr(expr.name);
|
|
@@ -22476,6 +22789,20 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
|
|
|
22476
22789
|
recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
22477
22790
|
pendingStructuralDirective = void 0;
|
|
22478
22791
|
}
|
|
22792
|
+
if (op.fallbackView !== null) {
|
|
22793
|
+
const view2 = job.views.get(op.fallbackView);
|
|
22794
|
+
if (op.fallbackViewI18nPlaceholder === void 0) {
|
|
22795
|
+
resolvePlaceholdersForView(job, view2, i18nContexts, elements);
|
|
22796
|
+
} else {
|
|
22797
|
+
if (currentOps === null) {
|
|
22798
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
22799
|
+
}
|
|
22800
|
+
recordTemplateStart(job, view2, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
22801
|
+
resolvePlaceholdersForView(job, view2, i18nContexts, elements);
|
|
22802
|
+
recordTemplateClose(job, view2, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
22803
|
+
pendingStructuralDirective = void 0;
|
|
22804
|
+
}
|
|
22805
|
+
}
|
|
22479
22806
|
break;
|
|
22480
22807
|
case OpKind.ConditionalCreate:
|
|
22481
22808
|
case OpKind.ConditionalBranchCreate:
|
|
@@ -22690,6 +23017,8 @@ function processLexicalScope(unit, ops, savedView) {
|
|
|
22690
23017
|
break;
|
|
22691
23018
|
}
|
|
22692
23019
|
break;
|
|
23020
|
+
case OpKind.Animation:
|
|
23021
|
+
case OpKind.AnimationListener:
|
|
22693
23022
|
case OpKind.Listener:
|
|
22694
23023
|
case OpKind.TwoWayListener:
|
|
22695
23024
|
processLexicalScope(unit, op.handlerOps, savedView);
|
|
@@ -22702,7 +23031,7 @@ function processLexicalScope(unit, ops, savedView) {
|
|
|
22702
23031
|
}
|
|
22703
23032
|
}
|
|
22704
23033
|
for (const op of ops) {
|
|
22705
|
-
if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
23034
|
+
if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener) {
|
|
22706
23035
|
continue;
|
|
22707
23036
|
}
|
|
22708
23037
|
transformExpressionsInOp(op, (expr) => {
|
|
@@ -22813,7 +23142,7 @@ function saveAndRestoreView(job) {
|
|
|
22813
23142
|
}, new GetCurrentViewExpr(), VariableFlags.None)
|
|
22814
23143
|
]);
|
|
22815
23144
|
for (const op of unit.create) {
|
|
22816
|
-
if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {
|
|
23145
|
+
if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener && op.kind !== OpKind.Animation && op.kind !== OpKind.AnimationListener) {
|
|
22817
23146
|
continue;
|
|
22818
23147
|
}
|
|
22819
23148
|
let needsRestoreView = unit !== job.root;
|
|
@@ -23035,7 +23364,7 @@ function generateTemporaries(ops) {
|
|
|
23035
23364
|
});
|
|
23036
23365
|
generatedStatements.push(...Array.from(new Set(defs.values())).map((name) => createStatementOp(new DeclareVarStmt(name))));
|
|
23037
23366
|
opCount++;
|
|
23038
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
23367
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
|
|
23039
23368
|
op.handlerOps.prepend(generateTemporaries(op.handlerOps));
|
|
23040
23369
|
} else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
23041
23370
|
op.trackByOps.prepend(generateTemporaries(op.trackByOps));
|
|
@@ -23274,7 +23603,7 @@ function optimizeVariables(job) {
|
|
|
23274
23603
|
inlineAlwaysInlineVariables(unit.create);
|
|
23275
23604
|
inlineAlwaysInlineVariables(unit.update);
|
|
23276
23605
|
for (const op of unit.create) {
|
|
23277
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
23606
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
|
|
23278
23607
|
inlineAlwaysInlineVariables(op.handlerOps);
|
|
23279
23608
|
} else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
23280
23609
|
inlineAlwaysInlineVariables(op.trackByOps);
|
|
@@ -23283,7 +23612,7 @@ function optimizeVariables(job) {
|
|
|
23283
23612
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
23284
23613
|
optimizeVariablesInOpList(unit.update, job.compatibility);
|
|
23285
23614
|
for (const op of unit.create) {
|
|
23286
|
-
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
23615
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.Animation || op.kind === OpKind.AnimationListener || op.kind === OpKind.TwoWayListener) {
|
|
23287
23616
|
optimizeVariablesInOpList(op.handlerOps, job.compatibility);
|
|
23288
23617
|
} else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
23289
23618
|
optimizeVariablesInOpList(op.trackByOps, job.compatibility);
|
|
@@ -23571,6 +23900,7 @@ var phases = [
|
|
|
23571
23900
|
{ kind: CompilationJobKind.Both, fn: deduplicateTextBindings },
|
|
23572
23901
|
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
23573
23902
|
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
23903
|
+
{ kind: CompilationJobKind.Both, fn: convertAnimations },
|
|
23574
23904
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
23575
23905
|
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
23576
23906
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
@@ -23730,6 +24060,7 @@ __name(emitHostBindingFunction, "emitHostBindingFunction");
|
|
|
23730
24060
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
23731
24061
|
var domSchema = new DomElementSchemaRegistry();
|
|
23732
24062
|
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
24063
|
+
var ANIMATE_PREFIX$1 = "animate.";
|
|
23733
24064
|
function isI18nRootNode(meta) {
|
|
23734
24065
|
return meta instanceof Message;
|
|
23735
24066
|
}
|
|
@@ -23755,6 +24086,9 @@ function ingestHostBinding(input, bindingParser, constantPool) {
|
|
|
23755
24086
|
if (property2.isLegacyAnimation) {
|
|
23756
24087
|
bindingKind = BindingKind.LegacyAnimation;
|
|
23757
24088
|
}
|
|
24089
|
+
if (property2.isAnimation) {
|
|
24090
|
+
bindingKind = BindingKind.Animation;
|
|
24091
|
+
}
|
|
23758
24092
|
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
23759
24093
|
ingestDomProperty(job, property2, bindingKind, securityContexts);
|
|
23760
24094
|
}
|
|
@@ -23814,8 +24148,13 @@ function ingestHostAttribute(job, name, value, securityContexts) {
|
|
|
23814
24148
|
}
|
|
23815
24149
|
__name(ingestHostAttribute, "ingestHostAttribute");
|
|
23816
24150
|
function ingestHostEvent(job, event) {
|
|
23817
|
-
|
|
23818
|
-
|
|
24151
|
+
let eventBinding;
|
|
24152
|
+
if (event.type === ParsedEventType.Animation) {
|
|
24153
|
+
eventBinding = createAnimationListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), event.name.endsWith("enter") ? "enter" : "leave", event.targetOrPhase, true, event.sourceSpan);
|
|
24154
|
+
} else {
|
|
24155
|
+
const [phase, target] = event.type !== ParsedEventType.LegacyAnimation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
24156
|
+
eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
24157
|
+
}
|
|
23819
24158
|
job.root.create.push(eventBinding);
|
|
23820
24159
|
}
|
|
23821
24160
|
__name(ingestHostEvent, "ingestHostEvent");
|
|
@@ -24329,7 +24668,8 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
|
24329
24668
|
[BindingType.Attribute, BindingKind.Attribute],
|
|
24330
24669
|
[BindingType.Class, BindingKind.ClassName],
|
|
24331
24670
|
[BindingType.Style, BindingKind.StyleProperty],
|
|
24332
|
-
[BindingType.LegacyAnimation, BindingKind.LegacyAnimation]
|
|
24671
|
+
[BindingType.LegacyAnimation, BindingKind.LegacyAnimation],
|
|
24672
|
+
[BindingType.Animation, BindingKind.Animation]
|
|
24333
24673
|
]);
|
|
24334
24674
|
function isPlainTemplate(tmpl) {
|
|
24335
24675
|
return splitNsName(tmpl.tagName ?? "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
@@ -24369,6 +24709,8 @@ function ingestElementBindings(unit, op, element2) {
|
|
|
24369
24709
|
}
|
|
24370
24710
|
if (output.type === ParsedEventType.TwoWay) {
|
|
24371
24711
|
unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
|
|
24712
|
+
} else if (output.type === ParsedEventType.Animation) {
|
|
24713
|
+
unit.create.push(createAnimationListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.name.endsWith("enter") ? "enter" : "leave", output.target, false, output.sourceSpan));
|
|
24372
24714
|
} else {
|
|
24373
24715
|
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
24374
24716
|
}
|
|
@@ -24431,7 +24773,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
|
|
|
24431
24773
|
return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
|
|
24432
24774
|
}
|
|
24433
24775
|
}
|
|
24434
|
-
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation)) {
|
|
24776
|
+
if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation || type === BindingType.Animation)) {
|
|
24435
24777
|
return null;
|
|
24436
24778
|
}
|
|
24437
24779
|
}
|
|
@@ -24523,11 +24865,13 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
24523
24865
|
}
|
|
24524
24866
|
if (root !== null) {
|
|
24525
24867
|
for (const attr of root.attributes) {
|
|
24526
|
-
|
|
24527
|
-
|
|
24868
|
+
if (!attr.name.startsWith(ANIMATE_PREFIX$1)) {
|
|
24869
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
24870
|
+
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
24871
|
+
}
|
|
24528
24872
|
}
|
|
24529
24873
|
for (const attr of root.inputs) {
|
|
24530
|
-
if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Attribute) {
|
|
24874
|
+
if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {
|
|
24531
24875
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
24532
24876
|
unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
|
|
24533
24877
|
}
|
|
@@ -24686,6 +25030,7 @@ var HtmlParser = class extends Parser$1 {
|
|
|
24686
25030
|
};
|
|
24687
25031
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
24688
25032
|
var ATTRIBUTE_PREFIX = "attr";
|
|
25033
|
+
var ANIMATE_PREFIX = "animate";
|
|
24689
25034
|
var CLASS_PREFIX = "class";
|
|
24690
25035
|
var STYLE_PREFIX = "style";
|
|
24691
25036
|
var TEMPLATE_ATTR_PREFIX$1 = "*";
|
|
@@ -24885,6 +25230,8 @@ var BindingParser = class {
|
|
|
24885
25230
|
}
|
|
24886
25231
|
if (isLegacyAnimationProp) {
|
|
24887
25232
|
this._parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
25233
|
+
} else if (name.startsWith(ANIMATE_PREFIX)) {
|
|
25234
|
+
this._parseAnimation(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24888
25235
|
} else {
|
|
24889
25236
|
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
24890
25237
|
}
|
|
@@ -24901,6 +25248,10 @@ var BindingParser = class {
|
|
|
24901
25248
|
targetMatchableAttrs.push([name, ast.source]);
|
|
24902
25249
|
targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
24903
25250
|
}
|
|
25251
|
+
_parseAnimation(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
25252
|
+
targetMatchableAttrs.push([name, ast.source]);
|
|
25253
|
+
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));
|
|
25254
|
+
}
|
|
24904
25255
|
_parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
24905
25256
|
if (name.length === 0) {
|
|
24906
25257
|
this._reportError("Animation trigger is missing", sourceSpan);
|
|
@@ -24953,6 +25304,10 @@ var BindingParser = class {
|
|
|
24953
25304
|
boundPropertyName = parts[1];
|
|
24954
25305
|
bindingType = BindingType.Style;
|
|
24955
25306
|
securityContexts = [SecurityContext.STYLE];
|
|
25307
|
+
} else if (parts[0] == ANIMATE_PREFIX) {
|
|
25308
|
+
boundPropertyName = boundProp.name;
|
|
25309
|
+
bindingType = BindingType.Animation;
|
|
25310
|
+
securityContexts = [SecurityContext.NONE];
|
|
24956
25311
|
}
|
|
24957
25312
|
}
|
|
24958
25313
|
if (boundPropertyName === null) {
|
|
@@ -24966,7 +25321,6 @@ var BindingParser = class {
|
|
|
24966
25321
|
}
|
|
24967
25322
|
return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
|
|
24968
25323
|
}
|
|
24969
|
-
// TODO: keySpan should be required but was made optional to avoid changing VE parser.
|
|
24970
25324
|
parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
|
|
24971
25325
|
if (name.length === 0) {
|
|
24972
25326
|
this._reportError(`Event name is missing in binding`, sourceSpan);
|
|
@@ -25017,7 +25371,14 @@ var BindingParser = class {
|
|
|
25017
25371
|
if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {
|
|
25018
25372
|
this._reportError("Unsupported expression in a two-way binding", sourceSpan);
|
|
25019
25373
|
}
|
|
25020
|
-
|
|
25374
|
+
let eventType = ParsedEventType.Regular;
|
|
25375
|
+
if (isAssignmentEvent) {
|
|
25376
|
+
eventType = ParsedEventType.TwoWay;
|
|
25377
|
+
}
|
|
25378
|
+
if (name.startsWith(ANIMATE_PREFIX)) {
|
|
25379
|
+
eventType = ParsedEventType.Animation;
|
|
25380
|
+
}
|
|
25381
|
+
targetEvents.push(new ParsedEvent(eventName, target, eventType, ast, sourceSpan, handlerSpan, keySpan));
|
|
25021
25382
|
}
|
|
25022
25383
|
_parseAction(value, sourceSpan) {
|
|
25023
25384
|
const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
|
|
@@ -25479,8 +25840,8 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
|
25479
25840
|
const aliasMatch = param.expression.match(CONDITIONAL_ALIAS_PATTERN);
|
|
25480
25841
|
if (aliasMatch === null) {
|
|
25481
25842
|
errors.push(new ParseError(param.sourceSpan, `Unrecognized conditional parameter "${param.expression}"`));
|
|
25482
|
-
} else if (block.name !== "if") {
|
|
25483
|
-
errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on
|
|
25843
|
+
} else if (block.name !== "if" && !ELSE_IF_PATTERN.test(block.name)) {
|
|
25844
|
+
errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on `@if` and `@else if` blocks'));
|
|
25484
25845
|
} else if (expressionAlias !== null) {
|
|
25485
25846
|
errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one "as" expression'));
|
|
25486
25847
|
} else {
|
|
@@ -26312,11 +26673,11 @@ var HtmlAstToIvyAst = class {
|
|
|
26312
26673
|
const templateValue = attribute2.value;
|
|
26313
26674
|
const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);
|
|
26314
26675
|
const parsedVariables = [];
|
|
26315
|
-
const absoluteValueOffset = attribute2.valueSpan ? attribute2.valueSpan.
|
|
26676
|
+
const absoluteValueOffset = attribute2.valueSpan ? attribute2.valueSpan.fullStart.offset : (
|
|
26316
26677
|
// If there is no value span the attribute does not have a value, like `attr` in
|
|
26317
26678
|
//`<div attr></div>`. In this case, point to one character beyond the last character of
|
|
26318
26679
|
// the attribute name.
|
|
26319
|
-
attribute2.sourceSpan.
|
|
26680
|
+
attribute2.sourceSpan.fullStart.offset + attribute2.name.length
|
|
26320
26681
|
);
|
|
26321
26682
|
this.bindingParser.parseInlineTemplateBinding(
|
|
26322
26683
|
templateKey,
|
|
@@ -26353,7 +26714,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26353
26714
|
const name = normalizeAttributeName(attribute2.name);
|
|
26354
26715
|
const value = attribute2.value;
|
|
26355
26716
|
const srcSpan = attribute2.sourceSpan;
|
|
26356
|
-
const absoluteOffset = attribute2.valueSpan ? attribute2.valueSpan.
|
|
26717
|
+
const absoluteOffset = attribute2.valueSpan ? attribute2.valueSpan.fullStart.offset : srcSpan.fullStart.offset;
|
|
26357
26718
|
function createKeySpan(srcSpan2, prefix, identifier) {
|
|
26358
26719
|
const normalizationAdjustment = attribute2.name.length - name.length;
|
|
26359
26720
|
const keySpanStart = srcSpan2.start.moveBy(prefix.length + normalizationAdjustment);
|
|
@@ -26399,7 +26760,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26399
26760
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
26400
26761
|
const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);
|
|
26401
26762
|
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
26402
|
-
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
26763
|
+
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2, absoluteOffset);
|
|
26403
26764
|
} else if (bindParts[KW_AT_IDX]) {
|
|
26404
26765
|
const keySpan2 = createKeySpan(srcSpan, "", name);
|
|
26405
26766
|
this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
@@ -26423,7 +26784,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26423
26784
|
const keySpan2 = createKeySpan(srcSpan, delims.start, identifier);
|
|
26424
26785
|
if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {
|
|
26425
26786
|
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
26426
|
-
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
26787
|
+
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2, absoluteOffset);
|
|
26427
26788
|
} else if (delims.start === BINDING_DELIMS.PROPERTY.start) {
|
|
26428
26789
|
this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
26429
26790
|
} else {
|
|
@@ -26539,7 +26900,7 @@ var HtmlAstToIvyAst = class {
|
|
|
26539
26900
|
}
|
|
26540
26901
|
references.push(new Reference(identifier, value, sourceSpan, keySpan, valueSpan));
|
|
26541
26902
|
}
|
|
26542
|
-
parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {
|
|
26903
|
+
parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan, absoluteOffset) {
|
|
26543
26904
|
const events = [];
|
|
26544
26905
|
this.bindingParser.parseEvent(
|
|
26545
26906
|
`${name}Change`,
|
|
@@ -26781,9 +27142,162 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, s
|
|
|
26781
27142
|
return new BindingParser(new Parser2(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
|
|
26782
27143
|
}
|
|
26783
27144
|
__name(makeBindingParser, "makeBindingParser");
|
|
27145
|
+
var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
27146
|
+
static {
|
|
27147
|
+
__name(this, "CombinedRecursiveAstVisitor");
|
|
27148
|
+
}
|
|
27149
|
+
visit(node) {
|
|
27150
|
+
if (node instanceof ASTWithSource) {
|
|
27151
|
+
this.visit(node.ast);
|
|
27152
|
+
} else {
|
|
27153
|
+
node.visit(this);
|
|
27154
|
+
}
|
|
27155
|
+
}
|
|
27156
|
+
visitElement(element2) {
|
|
27157
|
+
this.visitAllTemplateNodes(element2.attributes);
|
|
27158
|
+
this.visitAllTemplateNodes(element2.inputs);
|
|
27159
|
+
this.visitAllTemplateNodes(element2.outputs);
|
|
27160
|
+
this.visitAllTemplateNodes(element2.directives);
|
|
27161
|
+
this.visitAllTemplateNodes(element2.references);
|
|
27162
|
+
this.visitAllTemplateNodes(element2.children);
|
|
27163
|
+
}
|
|
27164
|
+
visitTemplate(template2) {
|
|
27165
|
+
this.visitAllTemplateNodes(template2.attributes);
|
|
27166
|
+
this.visitAllTemplateNodes(template2.inputs);
|
|
27167
|
+
this.visitAllTemplateNodes(template2.outputs);
|
|
27168
|
+
this.visitAllTemplateNodes(template2.directives);
|
|
27169
|
+
this.visitAllTemplateNodes(template2.templateAttrs);
|
|
27170
|
+
this.visitAllTemplateNodes(template2.variables);
|
|
27171
|
+
this.visitAllTemplateNodes(template2.references);
|
|
27172
|
+
this.visitAllTemplateNodes(template2.children);
|
|
27173
|
+
}
|
|
27174
|
+
visitContent(content) {
|
|
27175
|
+
this.visitAllTemplateNodes(content.children);
|
|
27176
|
+
}
|
|
27177
|
+
visitBoundAttribute(attribute2) {
|
|
27178
|
+
this.visit(attribute2.value);
|
|
27179
|
+
}
|
|
27180
|
+
visitBoundEvent(attribute2) {
|
|
27181
|
+
this.visit(attribute2.handler);
|
|
27182
|
+
}
|
|
27183
|
+
visitBoundText(text2) {
|
|
27184
|
+
this.visit(text2.value);
|
|
27185
|
+
}
|
|
27186
|
+
visitIcu(icu) {
|
|
27187
|
+
Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
|
|
27188
|
+
Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
|
|
27189
|
+
}
|
|
27190
|
+
visitDeferredBlock(deferred) {
|
|
27191
|
+
deferred.visitAll(this);
|
|
27192
|
+
}
|
|
27193
|
+
visitDeferredTrigger(trigger) {
|
|
27194
|
+
if (trigger instanceof BoundDeferredTrigger) {
|
|
27195
|
+
this.visit(trigger.value);
|
|
27196
|
+
}
|
|
27197
|
+
}
|
|
27198
|
+
visitDeferredBlockPlaceholder(block) {
|
|
27199
|
+
this.visitAllTemplateNodes(block.children);
|
|
27200
|
+
}
|
|
27201
|
+
visitDeferredBlockError(block) {
|
|
27202
|
+
this.visitAllTemplateNodes(block.children);
|
|
27203
|
+
}
|
|
27204
|
+
visitDeferredBlockLoading(block) {
|
|
27205
|
+
this.visitAllTemplateNodes(block.children);
|
|
27206
|
+
}
|
|
27207
|
+
visitSwitchBlock(block) {
|
|
27208
|
+
this.visit(block.expression);
|
|
27209
|
+
this.visitAllTemplateNodes(block.cases);
|
|
27210
|
+
}
|
|
27211
|
+
visitSwitchBlockCase(block) {
|
|
27212
|
+
block.expression && this.visit(block.expression);
|
|
27213
|
+
this.visitAllTemplateNodes(block.children);
|
|
27214
|
+
}
|
|
27215
|
+
visitForLoopBlock(block) {
|
|
27216
|
+
block.item.visit(this);
|
|
27217
|
+
this.visitAllTemplateNodes(block.contextVariables);
|
|
27218
|
+
this.visit(block.expression);
|
|
27219
|
+
this.visitAllTemplateNodes(block.children);
|
|
27220
|
+
block.empty?.visit(this);
|
|
27221
|
+
}
|
|
27222
|
+
visitForLoopBlockEmpty(block) {
|
|
27223
|
+
this.visitAllTemplateNodes(block.children);
|
|
27224
|
+
}
|
|
27225
|
+
visitIfBlock(block) {
|
|
27226
|
+
this.visitAllTemplateNodes(block.branches);
|
|
27227
|
+
}
|
|
27228
|
+
visitIfBlockBranch(block) {
|
|
27229
|
+
block.expression && this.visit(block.expression);
|
|
27230
|
+
block.expressionAlias?.visit(this);
|
|
27231
|
+
this.visitAllTemplateNodes(block.children);
|
|
27232
|
+
}
|
|
27233
|
+
visitLetDeclaration(decl) {
|
|
27234
|
+
this.visit(decl.value);
|
|
27235
|
+
}
|
|
27236
|
+
visitComponent(component) {
|
|
27237
|
+
this.visitAllTemplateNodes(component.attributes);
|
|
27238
|
+
this.visitAllTemplateNodes(component.inputs);
|
|
27239
|
+
this.visitAllTemplateNodes(component.outputs);
|
|
27240
|
+
this.visitAllTemplateNodes(component.directives);
|
|
27241
|
+
this.visitAllTemplateNodes(component.references);
|
|
27242
|
+
this.visitAllTemplateNodes(component.children);
|
|
27243
|
+
}
|
|
27244
|
+
visitDirective(directive) {
|
|
27245
|
+
this.visitAllTemplateNodes(directive.attributes);
|
|
27246
|
+
this.visitAllTemplateNodes(directive.inputs);
|
|
27247
|
+
this.visitAllTemplateNodes(directive.outputs);
|
|
27248
|
+
this.visitAllTemplateNodes(directive.references);
|
|
27249
|
+
}
|
|
27250
|
+
visitVariable(variable2) {
|
|
27251
|
+
}
|
|
27252
|
+
visitReference(reference2) {
|
|
27253
|
+
}
|
|
27254
|
+
visitTextAttribute(attribute2) {
|
|
27255
|
+
}
|
|
27256
|
+
visitText(text2) {
|
|
27257
|
+
}
|
|
27258
|
+
visitUnknownBlock(block) {
|
|
27259
|
+
}
|
|
27260
|
+
visitAllTemplateNodes(nodes) {
|
|
27261
|
+
for (const node of nodes) {
|
|
27262
|
+
this.visit(node);
|
|
27263
|
+
}
|
|
27264
|
+
}
|
|
27265
|
+
};
|
|
27266
|
+
var ANIMATE_LEAVE$1 = `animate.leave`;
|
|
27267
|
+
function analyzeTemplateForAnimations(template2) {
|
|
27268
|
+
const analyzer = new AnimationsAnalyzer();
|
|
27269
|
+
visitAll$1(analyzer, template2);
|
|
27270
|
+
return analyzer.hasAnimations;
|
|
27271
|
+
}
|
|
27272
|
+
__name(analyzeTemplateForAnimations, "analyzeTemplateForAnimations");
|
|
27273
|
+
var AnimationsAnalyzer = class extends CombinedRecursiveAstVisitor {
|
|
27274
|
+
static {
|
|
27275
|
+
__name(this, "AnimationsAnalyzer");
|
|
27276
|
+
}
|
|
27277
|
+
hasAnimations = false;
|
|
27278
|
+
visitElement(element2) {
|
|
27279
|
+
for (const attr of element2.attributes) {
|
|
27280
|
+
if (attr.name === ANIMATE_LEAVE$1) {
|
|
27281
|
+
this.hasAnimations = true;
|
|
27282
|
+
}
|
|
27283
|
+
}
|
|
27284
|
+
for (const input of element2.inputs) {
|
|
27285
|
+
if (input.name === ANIMATE_LEAVE$1) {
|
|
27286
|
+
this.hasAnimations = true;
|
|
27287
|
+
}
|
|
27288
|
+
}
|
|
27289
|
+
for (const output of element2.outputs) {
|
|
27290
|
+
if (output.name === ANIMATE_LEAVE$1) {
|
|
27291
|
+
this.hasAnimations = true;
|
|
27292
|
+
}
|
|
27293
|
+
}
|
|
27294
|
+
super.visitElement(element2);
|
|
27295
|
+
}
|
|
27296
|
+
};
|
|
26784
27297
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
26785
27298
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
26786
27299
|
var CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
|
|
27300
|
+
var ANIMATE_LEAVE = `animate.leave`;
|
|
26787
27301
|
function baseDirectiveFields(meta, constantPool, bindingParser) {
|
|
26788
27302
|
const definitionMap = new DefinitionMap();
|
|
26789
27303
|
const selectors = parseSelectorToR3Selector(meta.selector);
|
|
@@ -26812,6 +27326,10 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
|
|
|
26812
27326
|
return definitionMap;
|
|
26813
27327
|
}
|
|
26814
27328
|
__name(baseDirectiveFields, "baseDirectiveFields");
|
|
27329
|
+
function hasAnimationHostBinding(meta) {
|
|
27330
|
+
return meta.host.attributes[ANIMATE_LEAVE] !== void 0 || meta.host.properties[ANIMATE_LEAVE] !== void 0 || meta.host.listeners[ANIMATE_LEAVE] !== void 0;
|
|
27331
|
+
}
|
|
27332
|
+
__name(hasAnimationHostBinding, "hasAnimationHostBinding");
|
|
26815
27333
|
function addFeatures(definitionMap, meta) {
|
|
26816
27334
|
const features = [];
|
|
26817
27335
|
const providers = meta.providers;
|
|
@@ -26839,6 +27357,12 @@ function addFeatures(definitionMap, meta) {
|
|
|
26839
27357
|
const externalStyleNodes = meta.externalStyles.map((externalStyle) => literal(externalStyle));
|
|
26840
27358
|
features.push(importExpr(Identifiers.ExternalStylesFeature).callFn([literalArr(externalStyleNodes)]));
|
|
26841
27359
|
}
|
|
27360
|
+
const template2 = meta.template;
|
|
27361
|
+
if (hasAnimationHostBinding(meta) || template2 && template2.nodes.length > 0) {
|
|
27362
|
+
if (hasAnimationHostBinding(meta) || analyzeTemplateForAnimations(template2.nodes)) {
|
|
27363
|
+
features.push(importExpr(Identifiers.AnimationsFeature).callFn([]));
|
|
27364
|
+
}
|
|
27365
|
+
}
|
|
26842
27366
|
if (features.length) {
|
|
26843
27367
|
definitionMap.set("features", literalArr(features));
|
|
26844
27368
|
}
|
|
@@ -27207,127 +27731,6 @@ function compileDeferResolverFunction(meta) {
|
|
|
27207
27731
|
return arrowFn([], literalArr(depExpressions));
|
|
27208
27732
|
}
|
|
27209
27733
|
__name(compileDeferResolverFunction, "compileDeferResolverFunction");
|
|
27210
|
-
var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
27211
|
-
static {
|
|
27212
|
-
__name(this, "CombinedRecursiveAstVisitor");
|
|
27213
|
-
}
|
|
27214
|
-
visit(node) {
|
|
27215
|
-
if (node instanceof ASTWithSource) {
|
|
27216
|
-
this.visit(node.ast);
|
|
27217
|
-
} else {
|
|
27218
|
-
node.visit(this);
|
|
27219
|
-
}
|
|
27220
|
-
}
|
|
27221
|
-
visitElement(element2) {
|
|
27222
|
-
this.visitAllTemplateNodes(element2.attributes);
|
|
27223
|
-
this.visitAllTemplateNodes(element2.inputs);
|
|
27224
|
-
this.visitAllTemplateNodes(element2.outputs);
|
|
27225
|
-
this.visitAllTemplateNodes(element2.directives);
|
|
27226
|
-
this.visitAllTemplateNodes(element2.references);
|
|
27227
|
-
this.visitAllTemplateNodes(element2.children);
|
|
27228
|
-
}
|
|
27229
|
-
visitTemplate(template2) {
|
|
27230
|
-
this.visitAllTemplateNodes(template2.attributes);
|
|
27231
|
-
this.visitAllTemplateNodes(template2.inputs);
|
|
27232
|
-
this.visitAllTemplateNodes(template2.outputs);
|
|
27233
|
-
this.visitAllTemplateNodes(template2.directives);
|
|
27234
|
-
this.visitAllTemplateNodes(template2.templateAttrs);
|
|
27235
|
-
this.visitAllTemplateNodes(template2.variables);
|
|
27236
|
-
this.visitAllTemplateNodes(template2.references);
|
|
27237
|
-
this.visitAllTemplateNodes(template2.children);
|
|
27238
|
-
}
|
|
27239
|
-
visitContent(content) {
|
|
27240
|
-
this.visitAllTemplateNodes(content.children);
|
|
27241
|
-
}
|
|
27242
|
-
visitBoundAttribute(attribute2) {
|
|
27243
|
-
this.visit(attribute2.value);
|
|
27244
|
-
}
|
|
27245
|
-
visitBoundEvent(attribute2) {
|
|
27246
|
-
this.visit(attribute2.handler);
|
|
27247
|
-
}
|
|
27248
|
-
visitBoundText(text2) {
|
|
27249
|
-
this.visit(text2.value);
|
|
27250
|
-
}
|
|
27251
|
-
visitIcu(icu) {
|
|
27252
|
-
Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
|
|
27253
|
-
Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
|
|
27254
|
-
}
|
|
27255
|
-
visitDeferredBlock(deferred) {
|
|
27256
|
-
deferred.visitAll(this);
|
|
27257
|
-
}
|
|
27258
|
-
visitDeferredTrigger(trigger) {
|
|
27259
|
-
if (trigger instanceof BoundDeferredTrigger) {
|
|
27260
|
-
this.visit(trigger.value);
|
|
27261
|
-
}
|
|
27262
|
-
}
|
|
27263
|
-
visitDeferredBlockPlaceholder(block) {
|
|
27264
|
-
this.visitAllTemplateNodes(block.children);
|
|
27265
|
-
}
|
|
27266
|
-
visitDeferredBlockError(block) {
|
|
27267
|
-
this.visitAllTemplateNodes(block.children);
|
|
27268
|
-
}
|
|
27269
|
-
visitDeferredBlockLoading(block) {
|
|
27270
|
-
this.visitAllTemplateNodes(block.children);
|
|
27271
|
-
}
|
|
27272
|
-
visitSwitchBlock(block) {
|
|
27273
|
-
this.visit(block.expression);
|
|
27274
|
-
this.visitAllTemplateNodes(block.cases);
|
|
27275
|
-
}
|
|
27276
|
-
visitSwitchBlockCase(block) {
|
|
27277
|
-
block.expression && this.visit(block.expression);
|
|
27278
|
-
this.visitAllTemplateNodes(block.children);
|
|
27279
|
-
}
|
|
27280
|
-
visitForLoopBlock(block) {
|
|
27281
|
-
block.item.visit(this);
|
|
27282
|
-
this.visitAllTemplateNodes(block.contextVariables);
|
|
27283
|
-
this.visit(block.expression);
|
|
27284
|
-
this.visitAllTemplateNodes(block.children);
|
|
27285
|
-
block.empty?.visit(this);
|
|
27286
|
-
}
|
|
27287
|
-
visitForLoopBlockEmpty(block) {
|
|
27288
|
-
this.visitAllTemplateNodes(block.children);
|
|
27289
|
-
}
|
|
27290
|
-
visitIfBlock(block) {
|
|
27291
|
-
this.visitAllTemplateNodes(block.branches);
|
|
27292
|
-
}
|
|
27293
|
-
visitIfBlockBranch(block) {
|
|
27294
|
-
block.expression && this.visit(block.expression);
|
|
27295
|
-
block.expressionAlias?.visit(this);
|
|
27296
|
-
this.visitAllTemplateNodes(block.children);
|
|
27297
|
-
}
|
|
27298
|
-
visitLetDeclaration(decl) {
|
|
27299
|
-
this.visit(decl.value);
|
|
27300
|
-
}
|
|
27301
|
-
visitComponent(component) {
|
|
27302
|
-
this.visitAllTemplateNodes(component.attributes);
|
|
27303
|
-
this.visitAllTemplateNodes(component.inputs);
|
|
27304
|
-
this.visitAllTemplateNodes(component.outputs);
|
|
27305
|
-
this.visitAllTemplateNodes(component.directives);
|
|
27306
|
-
this.visitAllTemplateNodes(component.references);
|
|
27307
|
-
this.visitAllTemplateNodes(component.children);
|
|
27308
|
-
}
|
|
27309
|
-
visitDirective(directive) {
|
|
27310
|
-
this.visitAllTemplateNodes(directive.attributes);
|
|
27311
|
-
this.visitAllTemplateNodes(directive.inputs);
|
|
27312
|
-
this.visitAllTemplateNodes(directive.outputs);
|
|
27313
|
-
this.visitAllTemplateNodes(directive.references);
|
|
27314
|
-
}
|
|
27315
|
-
visitVariable(variable2) {
|
|
27316
|
-
}
|
|
27317
|
-
visitReference(reference2) {
|
|
27318
|
-
}
|
|
27319
|
-
visitTextAttribute(attribute2) {
|
|
27320
|
-
}
|
|
27321
|
-
visitText(text2) {
|
|
27322
|
-
}
|
|
27323
|
-
visitUnknownBlock(block) {
|
|
27324
|
-
}
|
|
27325
|
-
visitAllTemplateNodes(nodes) {
|
|
27326
|
-
for (const node of nodes) {
|
|
27327
|
-
this.visit(node);
|
|
27328
|
-
}
|
|
27329
|
-
}
|
|
27330
|
-
};
|
|
27331
27734
|
function diff(fullList, itemsToExclude) {
|
|
27332
27735
|
const exclude = new Set(itemsToExclude);
|
|
27333
27736
|
return fullList.filter((item) => !exclude.has(item));
|
|
@@ -27409,7 +27812,8 @@ var R3TargetBinder = class {
|
|
|
27409
27812
|
TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
27410
27813
|
}
|
|
27411
27814
|
if (target.host) {
|
|
27412
|
-
|
|
27815
|
+
directives.set(target.host.node, target.host.directives);
|
|
27816
|
+
TemplateBinder.applyWithScope(target.host.node, Scope2.apply(target.host.node), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
|
|
27413
27817
|
}
|
|
27414
27818
|
return new R3BoundTarget(target, directives, eagerDirectives, missingDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
|
|
27415
27819
|
}
|
|
@@ -28121,7 +28525,7 @@ var R3BoundTarget = class {
|
|
|
28121
28525
|
if (target instanceof Element$1) {
|
|
28122
28526
|
return target;
|
|
28123
28527
|
}
|
|
28124
|
-
if (target instanceof Template || target.node instanceof Component$1 || target.node instanceof Directive$1) {
|
|
28528
|
+
if (target instanceof Template || target.node instanceof Component$1 || target.node instanceof Directive$1 || target.node instanceof HostElement) {
|
|
28125
28529
|
return null;
|
|
28126
28530
|
}
|
|
28127
28531
|
return this.referenceTargetToElement(target.node);
|
|
@@ -30561,7 +30965,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
30561
30965
|
function compileDeclareClassMetadata(metadata) {
|
|
30562
30966
|
const definitionMap = new DefinitionMap();
|
|
30563
30967
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
30564
|
-
definitionMap.set("version", literal("20.
|
|
30968
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
30565
30969
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30566
30970
|
definitionMap.set("type", metadata.type);
|
|
30567
30971
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30580,7 +30984,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
30580
30984
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
30581
30985
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
30582
30986
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
30583
|
-
definitionMap.set("version", literal("20.
|
|
30987
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
30584
30988
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30585
30989
|
definitionMap.set("type", metadata.type);
|
|
30586
30990
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -30649,7 +31053,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30649
31053
|
const definitionMap = new DefinitionMap();
|
|
30650
31054
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30651
31055
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30652
|
-
definitionMap.set("version", literal("20.
|
|
31056
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
30653
31057
|
definitionMap.set("type", meta.type.value);
|
|
30654
31058
|
if (meta.isStandalone !== void 0) {
|
|
30655
31059
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30976,7 +31380,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
30976
31380
|
function compileDeclareFactoryFunction(meta) {
|
|
30977
31381
|
const definitionMap = new DefinitionMap();
|
|
30978
31382
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
30979
|
-
definitionMap.set("version", literal("20.
|
|
31383
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
30980
31384
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30981
31385
|
definitionMap.set("type", meta.type.value);
|
|
30982
31386
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30999,7 +31403,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
30999
31403
|
function createInjectableDefinitionMap(meta) {
|
|
31000
31404
|
const definitionMap = new DefinitionMap();
|
|
31001
31405
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
31002
|
-
definitionMap.set("version", literal("20.
|
|
31406
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
31003
31407
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31004
31408
|
definitionMap.set("type", meta.type.value);
|
|
31005
31409
|
if (meta.providedIn !== void 0) {
|
|
@@ -31037,7 +31441,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
31037
31441
|
function createInjectorDefinitionMap(meta) {
|
|
31038
31442
|
const definitionMap = new DefinitionMap();
|
|
31039
31443
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31040
|
-
definitionMap.set("version", literal("20.
|
|
31444
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
31041
31445
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31042
31446
|
definitionMap.set("type", meta.type.value);
|
|
31043
31447
|
definitionMap.set("providers", meta.providers);
|
|
@@ -31061,7 +31465,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31061
31465
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
31062
31466
|
}
|
|
31063
31467
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31064
|
-
definitionMap.set("version", literal("20.
|
|
31468
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
31065
31469
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31066
31470
|
definitionMap.set("type", meta.type.value);
|
|
31067
31471
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31096,7 +31500,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31096
31500
|
function createPipeDefinitionMap(meta) {
|
|
31097
31501
|
const definitionMap = new DefinitionMap();
|
|
31098
31502
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31099
|
-
definitionMap.set("version", literal("20.
|
|
31503
|
+
definitionMap.set("version", literal("20.2.0"));
|
|
31100
31504
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31101
31505
|
definitionMap.set("type", meta.type.value);
|
|
31102
31506
|
if (meta.isStandalone !== void 0) {
|
|
@@ -31193,7 +31597,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31193
31597
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31194
31598
|
}
|
|
31195
31599
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31196
|
-
var VERSION = new Version("20.
|
|
31600
|
+
var VERSION = new Version("20.2.0");
|
|
31197
31601
|
publishFacade(_global);
|
|
31198
31602
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31199
31603
|
0 && (module.exports = {
|
|
@@ -31457,7 +31861,7 @@ publishFacade(_global);
|
|
|
31457
31861
|
|
|
31458
31862
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
31459
31863
|
(**
|
|
31460
|
-
* @license Angular v20.
|
|
31864
|
+
* @license Angular v20.2.0
|
|
31461
31865
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
31462
31866
|
* License: MIT
|
|
31463
31867
|
*)
|