@angular-eslint/bundled-angular-compiler 21.3.2-alpha.0 → 21.4.0
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 +141 -52
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
Call: () => Call,
|
|
46
46
|
Chain: () => Chain,
|
|
47
47
|
ChangeDetectionStrategy: () => ChangeDetectionStrategy,
|
|
48
|
+
ClassPropertyMapping: () => ClassPropertyMapping,
|
|
48
49
|
CombinedRecursiveAstVisitor: () => CombinedRecursiveAstVisitor,
|
|
49
50
|
CommaExpr: () => CommaExpr,
|
|
50
51
|
Comment: () => Comment2,
|
|
@@ -100,6 +101,7 @@ __export(index_exports, {
|
|
|
100
101
|
LiteralPrimitive: () => LiteralPrimitive,
|
|
101
102
|
LocalizedString: () => LocalizedString,
|
|
102
103
|
MapType: () => MapType,
|
|
104
|
+
MatchSource: () => MatchSource,
|
|
103
105
|
MessageBundle: () => MessageBundle,
|
|
104
106
|
NONE_TYPE: () => NONE_TYPE,
|
|
105
107
|
NO_ERRORS_SCHEMA: () => NO_ERRORS_SCHEMA,
|
|
@@ -289,7 +291,7 @@ __export(index_exports, {
|
|
|
289
291
|
});
|
|
290
292
|
module.exports = __toCommonJS(index_exports);
|
|
291
293
|
|
|
292
|
-
// ../../node_modules/.pnpm/@angular+compiler@21.2.
|
|
294
|
+
// ../../node_modules/.pnpm/@angular+compiler@21.2.11/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
293
295
|
var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
294
296
|
var CssSelector = class _CssSelector {
|
|
295
297
|
static {
|
|
@@ -7710,12 +7712,12 @@ function createNgModuleType(meta) {
|
|
|
7710
7712
|
const {
|
|
7711
7713
|
type: moduleType,
|
|
7712
7714
|
declarations,
|
|
7713
|
-
exports:
|
|
7715
|
+
exports: exports$1,
|
|
7714
7716
|
imports,
|
|
7715
7717
|
includeImportTypes,
|
|
7716
7718
|
publicDeclarationTypes
|
|
7717
7719
|
} = meta;
|
|
7718
|
-
return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [new ExpressionType(moduleType.type), publicDeclarationTypes === null ? tupleTypeOf(declarations) : tupleOfTypes(publicDeclarationTypes), includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE, tupleTypeOf(
|
|
7720
|
+
return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [new ExpressionType(moduleType.type), publicDeclarationTypes === null ? tupleTypeOf(declarations) : tupleOfTypes(publicDeclarationTypes), includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE, tupleTypeOf(exports$1)]));
|
|
7719
7721
|
}
|
|
7720
7722
|
__name(createNgModuleType, "createNgModuleType");
|
|
7721
7723
|
function generateSetNgModuleScopeCall(meta) {
|
|
@@ -7826,7 +7828,7 @@ var ShadowCss = class {
|
|
|
7826
7828
|
comments.push(m);
|
|
7827
7829
|
} else {
|
|
7828
7830
|
const newLinesMatches = m.match(_newLinesRe);
|
|
7829
|
-
comments.push(
|
|
7831
|
+
comments.push(newLinesMatches?.join("") ?? "");
|
|
7830
7832
|
}
|
|
7831
7833
|
return COMMENT_PLACEHOLDER;
|
|
7832
7834
|
});
|
|
@@ -8779,10 +8781,10 @@ var NEW_OP = {
|
|
|
8779
8781
|
prev: null,
|
|
8780
8782
|
next: null
|
|
8781
8783
|
};
|
|
8782
|
-
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
8783
|
-
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
8784
|
-
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
8785
|
-
var UsesVarOffset = Symbol("UsesVarOffset");
|
|
8784
|
+
var ConsumesSlot = /* @__PURE__ */ Symbol("ConsumesSlot");
|
|
8785
|
+
var DependsOnSlotContext = /* @__PURE__ */ Symbol("DependsOnSlotContext");
|
|
8786
|
+
var ConsumesVarsTrait = /* @__PURE__ */ Symbol("ConsumesVars");
|
|
8787
|
+
var UsesVarOffset = /* @__PURE__ */ Symbol("UsesVarOffset");
|
|
8786
8788
|
var TRAIT_CONSUMES_SLOT = {
|
|
8787
8789
|
[ConsumesSlot]: true,
|
|
8788
8790
|
numSlotsUsed: 1
|
|
@@ -15017,8 +15019,8 @@ var _Tokenizer = class {
|
|
|
15017
15019
|
const endChar = this._cursor.peek();
|
|
15018
15020
|
if (endChar === $SEMICOLON) {
|
|
15019
15021
|
this._beginToken(31);
|
|
15020
|
-
this._endToken([]);
|
|
15021
15022
|
this._cursor.advance();
|
|
15023
|
+
this._endToken([]);
|
|
15022
15024
|
} else {
|
|
15023
15025
|
startToken.type = 32;
|
|
15024
15026
|
startToken.sourceSpan = this._cursor.getSpan(start);
|
|
@@ -15724,7 +15726,7 @@ function isDigitEntityEnd(code) {
|
|
|
15724
15726
|
}
|
|
15725
15727
|
__name(isDigitEntityEnd, "isDigitEntityEnd");
|
|
15726
15728
|
function isNamedEntityEnd(code) {
|
|
15727
|
-
return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code);
|
|
15729
|
+
return code === $SEMICOLON || code === $EOF || !(isAsciiLetter(code) || isDigit(code));
|
|
15728
15730
|
}
|
|
15729
15731
|
__name(isNamedEntityEnd, "isNamedEntityEnd");
|
|
15730
15732
|
function isExpansionCaseStart(peek) {
|
|
@@ -16466,7 +16468,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16466
16468
|
} else {
|
|
16467
16469
|
endToken = this._advance();
|
|
16468
16470
|
}
|
|
16469
|
-
const end = endToken.sourceSpan.
|
|
16471
|
+
const end = endToken.sourceSpan.end;
|
|
16470
16472
|
const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
|
|
16471
16473
|
const startOffset = startToken.sourceSpan.toString().lastIndexOf(name);
|
|
16472
16474
|
const nameStart = startToken.sourceSpan.start.moveBy(startOffset);
|
|
@@ -18700,7 +18702,7 @@ function SECURITY_SCHEMA() {
|
|
|
18700
18702
|
registerContext(SecurityContext.STYLE, ["*|style"]);
|
|
18701
18703
|
registerContext(SecurityContext.URL, ["*|formAction", "area|href", "a|href", "a|xlink:href", "form|action", "annotation|href", "annotation|xlink:href", "annotation-xml|href", "annotation-xml|xlink:href", "maction|href", "maction|xlink:href", "malignmark|href", "malignmark|xlink:href", "math|href", "math|xlink:href", "mroot|href", "mroot|xlink:href", "msqrt|href", "msqrt|xlink:href", "merror|href", "merror|xlink:href", "mfrac|href", "mfrac|xlink:href", "mglyph|href", "mglyph|xlink:href", "msub|href", "msub|xlink:href", "msup|href", "msup|xlink:href", "msubsup|href", "msubsup|xlink:href", "mmultiscripts|href", "mmultiscripts|xlink:href", "mprescripts|href", "mprescripts|xlink:href", "mi|href", "mi|xlink:href", "mn|href", "mn|xlink:href", "mo|href", "mo|xlink:href", "mpadded|href", "mpadded|xlink:href", "mphantom|href", "mphantom|xlink:href", "mrow|href", "mrow|xlink:href", "ms|href", "ms|xlink:href", "mspace|href", "mspace|xlink:href", "mstyle|href", "mstyle|xlink:href", "mtable|href", "mtable|xlink:href", "mtd|href", "mtd|xlink:href", "mtr|href", "mtr|xlink:href", "mtext|href", "mtext|xlink:href", "mover|href", "mover|xlink:href", "munder|href", "munder|xlink:href", "munderover|href", "munderover|xlink:href", "semantics|href", "semantics|xlink:href", "none|href", "none|xlink:href", "img|src", "video|src"]);
|
|
18702
18704
|
registerContext(SecurityContext.RESOURCE_URL, ["base|href", "embed|src", "frame|src", "iframe|src", "link|href", "object|codebase", "object|data", "script|src", "script|href", "script|xlink:href"]);
|
|
18703
|
-
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, ["animate|attributeName", "set|attributeName", "animateMotion|attributeName", "animateTransform|attributeName", "unknown|attributeName", "iframe|sandbox", "iframe|allow", "iframe|allowFullscreen", "iframe|referrerPolicy", "iframe|csp", "iframe|fetchPriority", "unknown|sandbox", "unknown|allow", "unknown|allowFullscreen", "unknown|referrerPolicy", "unknown|csp", "unknown|fetchPriority"]);
|
|
18705
|
+
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, ["animate|attributeName", "animate|values", "animate|to", "animate|from", "set|to", "set|attributeName", "animateMotion|attributeName", "animateTransform|attributeName", "unknown|attributeName", "unknown|values", "unknown|to", "unknown|from", "iframe|sandbox", "iframe|allow", "iframe|allowFullscreen", "iframe|referrerPolicy", "iframe|csp", "iframe|fetchPriority", "unknown|sandbox", "unknown|allow", "unknown|allowFullscreen", "unknown|referrerPolicy", "unknown|csp", "unknown|fetchPriority"]);
|
|
18704
18706
|
}
|
|
18705
18707
|
return _SECURITY_SCHEMA;
|
|
18706
18708
|
}
|
|
@@ -19528,7 +19530,7 @@ function extractPlaceholderName(input) {
|
|
|
19528
19530
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
19529
19531
|
}
|
|
19530
19532
|
__name(extractPlaceholderName, "extractPlaceholderName");
|
|
19531
|
-
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set(["iframe|srcdoc", "*|innerhtml", "*|outerhtml", "embed|src", "object|codebase", "object|data"]);
|
|
19533
|
+
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set(["iframe|srcdoc", "*|innerhtml", "*|outerhtml", "embed|src", "iframe|src", "object|codebase", "object|data"]);
|
|
19532
19534
|
function isTrustedTypesSink(tagName, propName) {
|
|
19533
19535
|
tagName = tagName.toLowerCase();
|
|
19534
19536
|
propName = propName.toLowerCase();
|
|
@@ -20827,7 +20829,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
20827
20829
|
toSharedConstantDeclaration(declName, keyExpr) {
|
|
20828
20830
|
const fnParams = [];
|
|
20829
20831
|
for (let idx = 0; idx < this.numArgs; idx++) {
|
|
20830
|
-
fnParams.push(new FnParam("a" + idx));
|
|
20832
|
+
fnParams.push(new FnParam("a" + idx, DYNAMIC_TYPE));
|
|
20831
20833
|
}
|
|
20832
20834
|
const returnExpr = transformExpressionsInExpression(keyExpr, (expr) => {
|
|
20833
20835
|
if (!(expr instanceof PureFunctionParameterExpr)) {
|
|
@@ -21901,7 +21903,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
21901
21903
|
}
|
|
21902
21904
|
const params = [];
|
|
21903
21905
|
if (consumesDollarEvent) {
|
|
21904
|
-
params.push(new FnParam("$event"));
|
|
21906
|
+
params.push(new FnParam("$event", DYNAMIC_TYPE));
|
|
21905
21907
|
}
|
|
21906
21908
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
21907
21909
|
}
|
|
@@ -21910,7 +21912,7 @@ function reifyTrackBy(unit, op) {
|
|
|
21910
21912
|
if (op.trackByFn !== null) {
|
|
21911
21913
|
return op.trackByFn;
|
|
21912
21914
|
}
|
|
21913
|
-
const params = [new FnParam("$index"), new FnParam("$item")];
|
|
21915
|
+
const params = [new FnParam("$index", NUMBER_TYPE), new FnParam("$item", DYNAMIC_TYPE)];
|
|
21914
21916
|
let fn$1;
|
|
21915
21917
|
if (op.trackByOps === null) {
|
|
21916
21918
|
fn$1 = op.usesComponentInstance ? fn(params, [new ReturnStatement(op.track)]) : arrowFn(params, op.track);
|
|
@@ -21939,7 +21941,7 @@ function getArrowFunctionFactory(unit, expr) {
|
|
|
21939
21941
|
statements.push(op.statement);
|
|
21940
21942
|
}
|
|
21941
21943
|
const body = statements.length === 1 && statements[0] instanceof ReturnStatement ? statements[0].value : statements;
|
|
21942
|
-
return arrowFn([new FnParam(expr.contextName), new FnParam(expr.currentViewName)], arrowFn(expr.parameters, body));
|
|
21944
|
+
return arrowFn([new FnParam(expr.contextName, DYNAMIC_TYPE), new FnParam(expr.currentViewName, DYNAMIC_TYPE)], arrowFn(expr.parameters, body));
|
|
21943
21945
|
}
|
|
21944
21946
|
__name(getArrowFunctionFactory, "getArrowFunctionFactory");
|
|
21945
21947
|
function removeEmptyBindings(job) {
|
|
@@ -23641,7 +23643,7 @@ function emitView(view) {
|
|
|
23641
23643
|
}
|
|
23642
23644
|
const createCond = maybeGenerateRfBlock(1, createStatements);
|
|
23643
23645
|
const updateCond = maybeGenerateRfBlock(2, updateStatements);
|
|
23644
|
-
return fn([new FnParam(RENDER_FLAGS), new FnParam(CONTEXT_NAME)], [...createCond, ...updateCond], void 0, void 0, view.fnName);
|
|
23646
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond], void 0, void 0, view.fnName);
|
|
23645
23647
|
}
|
|
23646
23648
|
__name(emitView, "emitView");
|
|
23647
23649
|
function maybeGenerateRfBlock(flag, statements) {
|
|
@@ -23674,7 +23676,7 @@ function emitHostBindingFunction(job) {
|
|
|
23674
23676
|
}
|
|
23675
23677
|
const createCond = maybeGenerateRfBlock(1, createStatements);
|
|
23676
23678
|
const updateCond = maybeGenerateRfBlock(2, updateStatements);
|
|
23677
|
-
return fn([new FnParam(RENDER_FLAGS), new FnParam(CONTEXT_NAME)], [...createCond, ...updateCond], void 0, void 0, job.root.fnName);
|
|
23679
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond], void 0, void 0, job.root.fnName);
|
|
23678
23680
|
}
|
|
23679
23681
|
__name(emitHostBindingFunction, "emitHostBindingFunction");
|
|
23680
23682
|
var domSchema = new DomElementSchemaRegistry();
|
|
@@ -24243,7 +24245,7 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
24243
24245
|
} else if (ast instanceof SpreadElement) {
|
|
24244
24246
|
return new SpreadElementExpr(convertAst(ast.expression, job, baseSourceSpan));
|
|
24245
24247
|
} else if (ast instanceof ArrowFunction) {
|
|
24246
|
-
return updateParameterReferences(arrowFn(ast.parameters.map((arg) => new FnParam(arg.name)), convertAst(ast.body, job, baseSourceSpan)));
|
|
24248
|
+
return updateParameterReferences(arrowFn(ast.parameters.map((arg) => new FnParam(arg.name, DYNAMIC_TYPE)), convertAst(ast.body, job, baseSourceSpan)));
|
|
24247
24249
|
} else {
|
|
24248
24250
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
24249
24251
|
}
|
|
@@ -24547,7 +24549,7 @@ function getQueryCreateParameters(query, constantPool, prependParams) {
|
|
|
24547
24549
|
return parameters;
|
|
24548
24550
|
}
|
|
24549
24551
|
__name(getQueryCreateParameters, "getQueryCreateParameters");
|
|
24550
|
-
var queryAdvancePlaceholder = Symbol("queryAdvancePlaceholder");
|
|
24552
|
+
var queryAdvancePlaceholder = /* @__PURE__ */ Symbol("queryAdvancePlaceholder");
|
|
24551
24553
|
function collapseAdvanceStatements(statements) {
|
|
24552
24554
|
const result = [];
|
|
24553
24555
|
let advanceCollapseCount = 0;
|
|
@@ -24602,7 +24604,7 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
|
24602
24604
|
createStatements.push(new ExpressionStatement(viewQueryCall));
|
|
24603
24605
|
}
|
|
24604
24606
|
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
24605
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME,
|
|
24607
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))], INFERRED_TYPE, null, viewQueryFnName);
|
|
24606
24608
|
}
|
|
24607
24609
|
__name(createViewQueriesFunction, "createViewQueriesFunction");
|
|
24608
24610
|
function createContentQueriesFunction(queries, constantPool, name) {
|
|
@@ -24637,7 +24639,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
24637
24639
|
createStatements.push(new ExpressionStatement(contentQueryCall));
|
|
24638
24640
|
}
|
|
24639
24641
|
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
24640
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME,
|
|
24642
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE), new FnParam("dirIndex", NUMBER_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))], INFERRED_TYPE, null, contentQueriesFnName);
|
|
24641
24643
|
}
|
|
24642
24644
|
__name(createContentQueriesFunction, "createContentQueriesFunction");
|
|
24643
24645
|
var HtmlParser = class extends Parser$1 {
|
|
@@ -27040,7 +27042,6 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
27040
27042
|
return emitHostBindingFunction(hostJob);
|
|
27041
27043
|
}
|
|
27042
27044
|
__name(createHostBindingsFunction, "createHostBindingsFunction");
|
|
27043
|
-
var HOST_REG_EXP = /^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;
|
|
27044
27045
|
function parseHostBindings(host) {
|
|
27045
27046
|
const attributes = {};
|
|
27046
27047
|
const listeners = {};
|
|
@@ -27048,8 +27049,17 @@ function parseHostBindings(host) {
|
|
|
27048
27049
|
const specialAttributes = {};
|
|
27049
27050
|
for (const key of Object.keys(host)) {
|
|
27050
27051
|
const value = host[key];
|
|
27051
|
-
|
|
27052
|
-
|
|
27052
|
+
if (key.startsWith("(") && key.endsWith(")")) {
|
|
27053
|
+
if (typeof value !== "string") {
|
|
27054
|
+
throw new Error(`Event binding must be string`);
|
|
27055
|
+
}
|
|
27056
|
+
listeners[key.slice(1, -1)] = value;
|
|
27057
|
+
} else if (key.startsWith("[") && key.endsWith("]")) {
|
|
27058
|
+
if (typeof value !== "string") {
|
|
27059
|
+
throw new Error(`Property binding must be string`);
|
|
27060
|
+
}
|
|
27061
|
+
properties[key.slice(1, -1)] = value;
|
|
27062
|
+
} else {
|
|
27053
27063
|
switch (key) {
|
|
27054
27064
|
case "class":
|
|
27055
27065
|
if (typeof value !== "string") {
|
|
@@ -27070,16 +27080,6 @@ function parseHostBindings(host) {
|
|
|
27070
27080
|
attributes[key] = value;
|
|
27071
27081
|
}
|
|
27072
27082
|
}
|
|
27073
|
-
} else if (matches[1] != null) {
|
|
27074
|
-
if (typeof value !== "string") {
|
|
27075
|
-
throw new Error(`Property binding must be string`);
|
|
27076
|
-
}
|
|
27077
|
-
properties[matches[1]] = value;
|
|
27078
|
-
} else if (matches[2] != null) {
|
|
27079
|
-
if (typeof value !== "string") {
|
|
27080
|
-
throw new Error(`Event binding must be string`);
|
|
27081
|
-
}
|
|
27082
|
-
listeners[matches[2]] = value;
|
|
27083
27083
|
}
|
|
27084
27084
|
}
|
|
27085
27085
|
return {
|
|
@@ -28135,7 +28135,6 @@ var CompilerFacadeImpl = class {
|
|
|
28135
28135
|
name: facade.name,
|
|
28136
28136
|
type: wrapReference(facade.type),
|
|
28137
28137
|
typeArgumentCount: 0,
|
|
28138
|
-
deps: null,
|
|
28139
28138
|
pipeName: facade.pipeName,
|
|
28140
28139
|
pure: facade.pure,
|
|
28141
28140
|
isStandalone: facade.isStandalone
|
|
@@ -28184,7 +28183,6 @@ var CompilerFacadeImpl = class {
|
|
|
28184
28183
|
}
|
|
28185
28184
|
compileInjector(angularCoreEnv, sourceMapUrl, facade) {
|
|
28186
28185
|
const meta = {
|
|
28187
|
-
name: facade.name,
|
|
28188
28186
|
type: wrapReference(facade.type),
|
|
28189
28187
|
providers: facade.providers && facade.providers.length > 0 ? new WrappedNodeExpr(facade.providers) : null,
|
|
28190
28188
|
imports: facade.imports.map((i) => new WrappedNodeExpr(i))
|
|
@@ -30398,6 +30396,90 @@ var MapPlaceholderNames = class extends CloneVisitor {
|
|
|
30398
30396
|
return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
|
|
30399
30397
|
}
|
|
30400
30398
|
};
|
|
30399
|
+
var ClassPropertyMapping = class _ClassPropertyMapping {
|
|
30400
|
+
static {
|
|
30401
|
+
__name(this, "ClassPropertyMapping");
|
|
30402
|
+
}
|
|
30403
|
+
forwardMap;
|
|
30404
|
+
reverseMap;
|
|
30405
|
+
constructor(forwardMap) {
|
|
30406
|
+
this.forwardMap = forwardMap;
|
|
30407
|
+
this.reverseMap = reverseMapFromForwardMap(forwardMap);
|
|
30408
|
+
}
|
|
30409
|
+
static empty() {
|
|
30410
|
+
return new _ClassPropertyMapping(/* @__PURE__ */ new Map());
|
|
30411
|
+
}
|
|
30412
|
+
static fromMappedObject(obj) {
|
|
30413
|
+
const forwardMap = /* @__PURE__ */ new Map();
|
|
30414
|
+
for (const classPropertyName of Object.keys(obj)) {
|
|
30415
|
+
const value = obj[classPropertyName];
|
|
30416
|
+
let inputOrOutput;
|
|
30417
|
+
if (typeof value === "string") {
|
|
30418
|
+
inputOrOutput = {
|
|
30419
|
+
classPropertyName,
|
|
30420
|
+
bindingPropertyName: value,
|
|
30421
|
+
isSignal: false
|
|
30422
|
+
};
|
|
30423
|
+
} else {
|
|
30424
|
+
inputOrOutput = value;
|
|
30425
|
+
}
|
|
30426
|
+
forwardMap.set(classPropertyName, inputOrOutput);
|
|
30427
|
+
}
|
|
30428
|
+
return new _ClassPropertyMapping(forwardMap);
|
|
30429
|
+
}
|
|
30430
|
+
static merge(a, b) {
|
|
30431
|
+
const forwardMap = new Map(a.forwardMap.entries());
|
|
30432
|
+
for (const [classPropertyName, inputOrOutput] of b.forwardMap) {
|
|
30433
|
+
forwardMap.set(classPropertyName, inputOrOutput);
|
|
30434
|
+
}
|
|
30435
|
+
return new _ClassPropertyMapping(forwardMap);
|
|
30436
|
+
}
|
|
30437
|
+
get classPropertyNames() {
|
|
30438
|
+
return Array.from(this.forwardMap.keys());
|
|
30439
|
+
}
|
|
30440
|
+
get propertyNames() {
|
|
30441
|
+
return Array.from(this.reverseMap.keys());
|
|
30442
|
+
}
|
|
30443
|
+
hasBindingPropertyName(propertyName) {
|
|
30444
|
+
return this.reverseMap.has(propertyName);
|
|
30445
|
+
}
|
|
30446
|
+
getByBindingPropertyName(propertyName) {
|
|
30447
|
+
return this.reverseMap.has(propertyName) ? this.reverseMap.get(propertyName) : null;
|
|
30448
|
+
}
|
|
30449
|
+
getByClassPropertyName(classPropertyName) {
|
|
30450
|
+
return this.forwardMap.has(classPropertyName) ? this.forwardMap.get(classPropertyName) : null;
|
|
30451
|
+
}
|
|
30452
|
+
toDirectMappedObject() {
|
|
30453
|
+
const obj = {};
|
|
30454
|
+
for (const [classPropertyName, inputOrOutput] of this.forwardMap) {
|
|
30455
|
+
obj[classPropertyName] = inputOrOutput.bindingPropertyName;
|
|
30456
|
+
}
|
|
30457
|
+
return obj;
|
|
30458
|
+
}
|
|
30459
|
+
toJointMappedObject(transform2) {
|
|
30460
|
+
const obj = {};
|
|
30461
|
+
for (const [classPropertyName, inputOrOutput] of this.forwardMap) {
|
|
30462
|
+
obj[classPropertyName] = transform2(inputOrOutput);
|
|
30463
|
+
}
|
|
30464
|
+
return obj;
|
|
30465
|
+
}
|
|
30466
|
+
*[Symbol.iterator]() {
|
|
30467
|
+
for (const inputOrOutput of this.forwardMap.values()) {
|
|
30468
|
+
yield inputOrOutput;
|
|
30469
|
+
}
|
|
30470
|
+
}
|
|
30471
|
+
};
|
|
30472
|
+
function reverseMapFromForwardMap(forwardMap) {
|
|
30473
|
+
const reverseMap = /* @__PURE__ */ new Map();
|
|
30474
|
+
for (const [_, inputOrOutput] of forwardMap) {
|
|
30475
|
+
if (!reverseMap.has(inputOrOutput.bindingPropertyName)) {
|
|
30476
|
+
reverseMap.set(inputOrOutput.bindingPropertyName, []);
|
|
30477
|
+
}
|
|
30478
|
+
reverseMap.get(inputOrOutput.bindingPropertyName).push(inputOrOutput);
|
|
30479
|
+
}
|
|
30480
|
+
return reverseMap;
|
|
30481
|
+
}
|
|
30482
|
+
__name(reverseMapFromForwardMap, "reverseMapFromForwardMap");
|
|
30401
30483
|
function compileClassMetadata(metadata) {
|
|
30402
30484
|
const fnCall = internalCompileClassMetadata(metadata);
|
|
30403
30485
|
return arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()]).callFn([]);
|
|
@@ -30442,7 +30524,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
30442
30524
|
function compileDeclareClassMetadata(metadata) {
|
|
30443
30525
|
const definitionMap = new DefinitionMap();
|
|
30444
30526
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
30445
|
-
definitionMap.set("version", literal("21.2.
|
|
30527
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30446
30528
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30447
30529
|
definitionMap.set("type", metadata.type);
|
|
30448
30530
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30461,7 +30543,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
30461
30543
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
30462
30544
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
30463
30545
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
30464
|
-
definitionMap.set("version", literal("21.2.
|
|
30546
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30465
30547
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30466
30548
|
definitionMap.set("type", metadata.type);
|
|
30467
30549
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -30538,7 +30620,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30538
30620
|
const definitionMap = new DefinitionMap();
|
|
30539
30621
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30540
30622
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30541
|
-
definitionMap.set("version", literal("21.2.
|
|
30623
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30542
30624
|
definitionMap.set("type", meta.type.value);
|
|
30543
30625
|
if (meta.isStandalone !== void 0) {
|
|
30544
30626
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30894,7 +30976,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
30894
30976
|
function compileDeclareFactoryFunction(meta) {
|
|
30895
30977
|
const definitionMap = new DefinitionMap();
|
|
30896
30978
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
30897
|
-
definitionMap.set("version", literal("21.2.
|
|
30979
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30898
30980
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30899
30981
|
definitionMap.set("type", meta.type.value);
|
|
30900
30982
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30921,7 +31003,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
30921
31003
|
function createInjectableDefinitionMap(meta) {
|
|
30922
31004
|
const definitionMap = new DefinitionMap();
|
|
30923
31005
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
30924
|
-
definitionMap.set("version", literal("21.2.
|
|
31006
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30925
31007
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30926
31008
|
definitionMap.set("type", meta.type.value);
|
|
30927
31009
|
if (meta.providedIn !== void 0) {
|
|
@@ -30963,7 +31045,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
30963
31045
|
function createInjectorDefinitionMap(meta) {
|
|
30964
31046
|
const definitionMap = new DefinitionMap();
|
|
30965
31047
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
30966
|
-
definitionMap.set("version", literal("21.2.
|
|
31048
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30967
31049
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30968
31050
|
definitionMap.set("type", meta.type.value);
|
|
30969
31051
|
definitionMap.set("providers", meta.providers);
|
|
@@ -30991,7 +31073,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
30991
31073
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
30992
31074
|
}
|
|
30993
31075
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
30994
|
-
definitionMap.set("version", literal("21.2.
|
|
31076
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
30995
31077
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30996
31078
|
definitionMap.set("type", meta.type.value);
|
|
30997
31079
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31030,7 +31112,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31030
31112
|
function createPipeDefinitionMap(meta) {
|
|
31031
31113
|
const definitionMap = new DefinitionMap();
|
|
31032
31114
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31033
|
-
definitionMap.set("version", literal("21.2.
|
|
31115
|
+
definitionMap.set("version", literal("21.2.11"));
|
|
31034
31116
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31035
31117
|
definitionMap.set("type", meta.type.value);
|
|
31036
31118
|
if (meta.isStandalone !== void 0) {
|
|
@@ -31073,10 +31155,10 @@ function compileHmrInitializer(meta) {
|
|
|
31073
31155
|
});
|
|
31074
31156
|
const defaultRead = variable(moduleName).prop("default");
|
|
31075
31157
|
const replaceCall = importExpr(Identifiers.replaceMetadata).callFn([meta.type, defaultRead, literalArr(namespaces), literalArr(meta.localDependencies.map((l) => l.runtimeRepresentation)), variable("import").prop("meta"), variable(idName)]);
|
|
31076
|
-
const replaceCallback = arrowFn([new FnParam(moduleName)], defaultRead.and(replaceCall));
|
|
31158
|
+
const replaceCallback = arrowFn([new FnParam(moduleName, DYNAMIC_TYPE)], defaultRead.and(replaceCall));
|
|
31077
31159
|
const url = importExpr(Identifiers.getReplaceMetadataURL).callFn([variable(idName), variable(timestampName), variable("import").prop("meta").prop("url")]);
|
|
31078
|
-
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName)], [new DynamicImportExpr(url, null, "@vite-ignore").prop("then").callFn([replaceCallback]).toStmt()], null, StmtModifier.Final);
|
|
31079
|
-
const updateCallback = arrowFn([new FnParam(dataName)], variable(dataName).prop("id").identical(variable(idName)).and(variable(importCallbackName).callFn([variable(dataName).prop("timestamp")])));
|
|
31160
|
+
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName, DYNAMIC_TYPE)], [new DynamicImportExpr(url, null, "@vite-ignore").prop("then").callFn([replaceCallback]).toStmt()], null, StmtModifier.Final);
|
|
31161
|
+
const updateCallback = arrowFn([new FnParam(dataName, DYNAMIC_TYPE)], variable(dataName).prop("id").identical(variable(idName)).and(variable(importCallbackName).callFn([variable(dataName).prop("timestamp")])));
|
|
31080
31162
|
const initialCall = variable(importCallbackName).callFn([variable("Date").prop("now").callFn([])]);
|
|
31081
31163
|
const hotRead = variable("import").prop("meta").prop("hot");
|
|
31082
31164
|
const hotListener = hotRead.clone().prop("on").callFn([literal("angular:component-update"), updateCallback]);
|
|
@@ -31088,7 +31170,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31088
31170
|
const params = [meta.className, namespaces].map((name) => new FnParam(name, DYNAMIC_TYPE));
|
|
31089
31171
|
const body = [];
|
|
31090
31172
|
for (const local of meta.localDependencies) {
|
|
31091
|
-
params.push(new FnParam(local.name));
|
|
31173
|
+
params.push(new FnParam(local.name, DYNAMIC_TYPE));
|
|
31092
31174
|
}
|
|
31093
31175
|
for (let i = 0; i < meta.namespaceDependencies.length; i++) {
|
|
31094
31176
|
body.push(new DeclareVarStmt(meta.namespaceDependencies[i].assignedName, variable(namespaces).key(literal(i)), DYNAMIC_TYPE, StmtModifier.Final));
|
|
@@ -31105,7 +31187,12 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31105
31187
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31106
31188
|
}
|
|
31107
31189
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31108
|
-
var
|
|
31190
|
+
var MatchSource;
|
|
31191
|
+
(function(MatchSource2) {
|
|
31192
|
+
MatchSource2[MatchSource2["Selector"] = 0] = "Selector";
|
|
31193
|
+
MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
|
|
31194
|
+
})(MatchSource || (MatchSource = {}));
|
|
31195
|
+
var VERSION = new Version("21.2.11");
|
|
31109
31196
|
publishFacade(_global);
|
|
31110
31197
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31111
31198
|
0 && (module.exports = {
|
|
@@ -31133,6 +31220,7 @@ publishFacade(_global);
|
|
|
31133
31220
|
Call,
|
|
31134
31221
|
Chain,
|
|
31135
31222
|
ChangeDetectionStrategy,
|
|
31223
|
+
ClassPropertyMapping,
|
|
31136
31224
|
CombinedRecursiveAstVisitor,
|
|
31137
31225
|
CommaExpr,
|
|
31138
31226
|
Comment,
|
|
@@ -31188,6 +31276,7 @@ publishFacade(_global);
|
|
|
31188
31276
|
LiteralPrimitive,
|
|
31189
31277
|
LocalizedString,
|
|
31190
31278
|
MapType,
|
|
31279
|
+
MatchSource,
|
|
31191
31280
|
MessageBundle,
|
|
31192
31281
|
NONE_TYPE,
|
|
31193
31282
|
NO_ERRORS_SCHEMA,
|
|
@@ -31379,7 +31468,7 @@ publishFacade(_global);
|
|
|
31379
31468
|
|
|
31380
31469
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
31381
31470
|
(**
|
|
31382
|
-
* @license Angular v21.2.
|
|
31471
|
+
* @license Angular v21.2.11
|
|
31383
31472
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
31384
31473
|
* License: MIT
|
|
31385
31474
|
*)
|