@angular/core 17.1.1 → 17.2.0-next.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/esm2022/src/authoring/queries.mjs +113 -0
- package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2022/src/core_render3_private_export.mjs +2 -2
- package/esm2022/src/metadata/di.mjs +7 -7
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/queries.mjs +16 -1
- package/esm2022/src/render3/jit/directive.mjs +2 -1
- package/esm2022/src/render3/jit/environment.mjs +4 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +29 -10
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +10 -3
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +602 -542
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/bundle.js +602 -542
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +1419 -1170
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -2539,6 +2539,15 @@ var Identifiers = _Identifiers;
|
|
|
2539
2539
|
(() => {
|
|
2540
2540
|
_Identifiers.contentQuery = { name: "\u0275\u0275contentQuery", moduleName: CORE };
|
|
2541
2541
|
})();
|
|
2542
|
+
(() => {
|
|
2543
|
+
_Identifiers.viewQuerySignal = { name: "\u0275\u0275viewQuerySignal", moduleName: CORE };
|
|
2544
|
+
})();
|
|
2545
|
+
(() => {
|
|
2546
|
+
_Identifiers.contentQuerySignal = { name: "\u0275\u0275contentQuerySignal", moduleName: CORE };
|
|
2547
|
+
})();
|
|
2548
|
+
(() => {
|
|
2549
|
+
_Identifiers.queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: CORE };
|
|
2550
|
+
})();
|
|
2542
2551
|
(() => {
|
|
2543
2552
|
_Identifiers.NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: CORE };
|
|
2544
2553
|
})();
|
|
@@ -4284,11 +4293,11 @@ var CHAINABLE_INSTRUCTIONS = /* @__PURE__ */ new Set([
|
|
|
4284
4293
|
function invokeInstruction(span, reference2, params) {
|
|
4285
4294
|
return importExpr(reference2, null, span).callFn(params, span);
|
|
4286
4295
|
}
|
|
4287
|
-
function temporaryAllocator(
|
|
4296
|
+
function temporaryAllocator(pushStatement, name) {
|
|
4288
4297
|
let temp = null;
|
|
4289
4298
|
return () => {
|
|
4290
4299
|
if (!temp) {
|
|
4291
|
-
|
|
4300
|
+
pushStatement(new DeclareVarStmt(TEMPORARY_NAME, void 0, DYNAMIC_TYPE));
|
|
4292
4301
|
temp = variable(name);
|
|
4293
4302
|
}
|
|
4294
4303
|
return temp;
|
|
@@ -4368,24 +4377,6 @@ function trimTrailingNulls(parameters) {
|
|
|
4368
4377
|
}
|
|
4369
4378
|
return parameters;
|
|
4370
4379
|
}
|
|
4371
|
-
function getQueryPredicate(query, constantPool) {
|
|
4372
|
-
if (Array.isArray(query.predicate)) {
|
|
4373
|
-
let predicate = [];
|
|
4374
|
-
query.predicate.forEach((selector) => {
|
|
4375
|
-
const selectors = selector.split(",").map((token) => literal(token.trim()));
|
|
4376
|
-
predicate.push(...selectors);
|
|
4377
|
-
});
|
|
4378
|
-
return constantPool.getConstLiteral(literalArr(predicate), true);
|
|
4379
|
-
} else {
|
|
4380
|
-
switch (query.predicate.forwardRef) {
|
|
4381
|
-
case 0:
|
|
4382
|
-
case 2:
|
|
4383
|
-
return query.predicate.expression;
|
|
4384
|
-
case 1:
|
|
4385
|
-
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
4386
|
-
}
|
|
4387
|
-
}
|
|
4388
|
-
}
|
|
4389
4380
|
var DefinitionMap = class {
|
|
4390
4381
|
constructor() {
|
|
4391
4382
|
this.values = [];
|
|
@@ -6650,6 +6641,7 @@ var animationKeywords = /* @__PURE__ */ new Set([
|
|
|
6650
6641
|
"jump-start",
|
|
6651
6642
|
"start"
|
|
6652
6643
|
]);
|
|
6644
|
+
var scopedAtRuleIdentifiers = ["@media", "@supports", "@document", "@layer", "@container", "@scope", "@starting-style"];
|
|
6653
6645
|
var ShadowCss = class {
|
|
6654
6646
|
constructor() {
|
|
6655
6647
|
this._animationDeclarationKeyframesRe = /(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
@@ -6784,7 +6776,7 @@ var ShadowCss = class {
|
|
|
6784
6776
|
let content = rule.content;
|
|
6785
6777
|
if (rule.selector[0] !== "@") {
|
|
6786
6778
|
selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);
|
|
6787
|
-
} else if (
|
|
6779
|
+
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
6788
6780
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
6789
6781
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
6790
6782
|
content = this._stripScopingSelectors(rule.content);
|
|
@@ -20057,465 +20049,132 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
20057
20049
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
20058
20050
|
var USE_TEMPLATE_PIPELINE = false;
|
|
20059
20051
|
|
|
20060
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/
|
|
20061
|
-
var
|
|
20062
|
-
|
|
20063
|
-
|
|
20064
|
-
constructor(_directiveExpr) {
|
|
20065
|
-
this._directiveExpr = _directiveExpr;
|
|
20066
|
-
this._hasInitialValues = false;
|
|
20067
|
-
this.hasBindings = false;
|
|
20068
|
-
this.hasBindingsWithPipes = false;
|
|
20069
|
-
this._classMapInput = null;
|
|
20070
|
-
this._styleMapInput = null;
|
|
20071
|
-
this._singleStyleInputs = null;
|
|
20072
|
-
this._singleClassInputs = null;
|
|
20073
|
-
this._lastStylingInput = null;
|
|
20074
|
-
this._firstStylingInput = null;
|
|
20075
|
-
this._stylesIndex = /* @__PURE__ */ new Map();
|
|
20076
|
-
this._classesIndex = /* @__PURE__ */ new Map();
|
|
20077
|
-
this._initialStyleValues = [];
|
|
20078
|
-
this._initialClassValues = [];
|
|
20052
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20053
|
+
var HtmlParser = class extends Parser2 {
|
|
20054
|
+
constructor() {
|
|
20055
|
+
super(getHtmlTagDefinition);
|
|
20079
20056
|
}
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
let name = input.name;
|
|
20083
|
-
switch (input.type) {
|
|
20084
|
-
case 0:
|
|
20085
|
-
binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
|
|
20086
|
-
break;
|
|
20087
|
-
case 3:
|
|
20088
|
-
binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
|
|
20089
|
-
break;
|
|
20090
|
-
case 2:
|
|
20091
|
-
binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
|
|
20092
|
-
break;
|
|
20093
|
-
}
|
|
20094
|
-
return binding ? true : false;
|
|
20057
|
+
parse(source, url, options) {
|
|
20058
|
+
return super.parse(source, url, options);
|
|
20095
20059
|
}
|
|
20096
|
-
|
|
20097
|
-
|
|
20098
|
-
|
|
20099
|
-
|
|
20100
|
-
|
|
20101
|
-
|
|
20102
|
-
|
|
20103
|
-
|
|
20104
|
-
|
|
20105
|
-
|
|
20106
|
-
|
|
20107
|
-
|
|
20108
|
-
|
|
20060
|
+
};
|
|
20061
|
+
|
|
20062
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20063
|
+
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20064
|
+
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20065
|
+
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
20066
|
+
var NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);
|
|
20067
|
+
var WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, "g");
|
|
20068
|
+
function hasPreserveWhitespacesAttr(attrs) {
|
|
20069
|
+
return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);
|
|
20070
|
+
}
|
|
20071
|
+
function replaceNgsp(value) {
|
|
20072
|
+
return value.replace(new RegExp(NGSP_UNICODE, "g"), " ");
|
|
20073
|
+
}
|
|
20074
|
+
var WhitespaceVisitor = class {
|
|
20075
|
+
visitElement(element2, context) {
|
|
20076
|
+
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
20077
|
+
return new Element2(element2.name, visitAll2(this, element2.attrs), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20109
20078
|
}
|
|
20110
|
-
return
|
|
20079
|
+
return new Element2(element2.name, element2.attrs, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20111
20080
|
}
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
return null;
|
|
20115
|
-
}
|
|
20116
|
-
if (!isCssCustomProperty2(name)) {
|
|
20117
|
-
name = hyphenate2(name);
|
|
20118
|
-
}
|
|
20119
|
-
const { property: property2, hasOverrideFlag, suffix: bindingSuffix } = parseProperty2(name);
|
|
20120
|
-
suffix = typeof suffix === "string" && suffix.length !== 0 ? suffix : bindingSuffix;
|
|
20121
|
-
const entry = { name: property2, suffix, value, sourceSpan, hasOverrideFlag };
|
|
20122
|
-
if (isMapBased) {
|
|
20123
|
-
this._styleMapInput = entry;
|
|
20124
|
-
} else {
|
|
20125
|
-
(this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
|
|
20126
|
-
registerIntoMap(this._stylesIndex, property2);
|
|
20127
|
-
}
|
|
20128
|
-
this._lastStylingInput = entry;
|
|
20129
|
-
this._firstStylingInput = this._firstStylingInput || entry;
|
|
20130
|
-
this._checkForPipes(value);
|
|
20131
|
-
this.hasBindings = true;
|
|
20132
|
-
return entry;
|
|
20081
|
+
visitAttribute(attribute2, context) {
|
|
20082
|
+
return attribute2.name !== PRESERVE_WS_ATTR_NAME ? attribute2 : null;
|
|
20133
20083
|
}
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
this._classMapInput = entry;
|
|
20142
|
-
} else {
|
|
20143
|
-
(this._singleClassInputs = this._singleClassInputs || []).push(entry);
|
|
20144
|
-
registerIntoMap(this._classesIndex, property2);
|
|
20084
|
+
visitText(text2, context) {
|
|
20085
|
+
const isNotBlank = text2.value.match(NO_WS_REGEXP);
|
|
20086
|
+
const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);
|
|
20087
|
+
if (isNotBlank || hasExpansionSibling) {
|
|
20088
|
+
const tokens = text2.tokens.map((token) => token.type === 5 ? createWhitespaceProcessedTextToken(token) : token);
|
|
20089
|
+
const value = processWhitespace(text2.value);
|
|
20090
|
+
return new Text4(value, text2.sourceSpan, tokens, text2.i18n);
|
|
20145
20091
|
}
|
|
20146
|
-
|
|
20147
|
-
this._firstStylingInput = this._firstStylingInput || entry;
|
|
20148
|
-
this._checkForPipes(value);
|
|
20149
|
-
this.hasBindings = true;
|
|
20150
|
-
return entry;
|
|
20092
|
+
return null;
|
|
20151
20093
|
}
|
|
20152
|
-
|
|
20153
|
-
|
|
20154
|
-
this.hasBindingsWithPipes = true;
|
|
20155
|
-
}
|
|
20094
|
+
visitComment(comment, context) {
|
|
20095
|
+
return comment;
|
|
20156
20096
|
}
|
|
20157
|
-
|
|
20158
|
-
|
|
20159
|
-
this._hasInitialValues = true;
|
|
20097
|
+
visitExpansion(expansion, context) {
|
|
20098
|
+
return expansion;
|
|
20160
20099
|
}
|
|
20161
|
-
|
|
20162
|
-
|
|
20163
|
-
this._hasInitialValues = true;
|
|
20100
|
+
visitExpansionCase(expansionCase, context) {
|
|
20101
|
+
return expansionCase;
|
|
20164
20102
|
}
|
|
20165
|
-
|
|
20166
|
-
|
|
20167
|
-
attrs.push(literal(1));
|
|
20168
|
-
for (let i = 0; i < this._initialClassValues.length; i++) {
|
|
20169
|
-
attrs.push(literal(this._initialClassValues[i]));
|
|
20170
|
-
}
|
|
20171
|
-
}
|
|
20172
|
-
if (this._initialStyleValues.length) {
|
|
20173
|
-
attrs.push(literal(2));
|
|
20174
|
-
for (let i = 0; i < this._initialStyleValues.length; i += 2) {
|
|
20175
|
-
attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
|
|
20176
|
-
}
|
|
20177
|
-
}
|
|
20103
|
+
visitBlock(block, context) {
|
|
20104
|
+
return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);
|
|
20178
20105
|
}
|
|
20179
|
-
|
|
20180
|
-
|
|
20181
|
-
|
|
20182
|
-
|
|
20106
|
+
visitBlockParameter(parameter, context) {
|
|
20107
|
+
return parameter;
|
|
20108
|
+
}
|
|
20109
|
+
};
|
|
20110
|
+
function createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {
|
|
20111
|
+
return { type, parts: [processWhitespace(parts[0])], sourceSpan };
|
|
20112
|
+
}
|
|
20113
|
+
function processWhitespace(text2) {
|
|
20114
|
+
return replaceNgsp(text2).replace(WS_REPLACE_REGEXP, " ");
|
|
20115
|
+
}
|
|
20116
|
+
function visitAllWithSiblings(visitor, nodes) {
|
|
20117
|
+
const result = [];
|
|
20118
|
+
nodes.forEach((ast, i) => {
|
|
20119
|
+
const context = { prev: nodes[i - 1], next: nodes[i + 1] };
|
|
20120
|
+
const astResult = ast.visit(visitor, context);
|
|
20121
|
+
if (astResult) {
|
|
20122
|
+
result.push(astResult);
|
|
20183
20123
|
}
|
|
20124
|
+
});
|
|
20125
|
+
return result;
|
|
20126
|
+
}
|
|
20127
|
+
|
|
20128
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20129
|
+
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20130
|
+
var ATTRIBUTE_PREFIX = "attr";
|
|
20131
|
+
var CLASS_PREFIX = "class";
|
|
20132
|
+
var STYLE_PREFIX = "style";
|
|
20133
|
+
var TEMPLATE_ATTR_PREFIX = "*";
|
|
20134
|
+
var ANIMATE_PROP_PREFIX = "animate-";
|
|
20135
|
+
var BindingParser = class {
|
|
20136
|
+
constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {
|
|
20137
|
+
this._exprParser = _exprParser;
|
|
20138
|
+
this._interpolationConfig = _interpolationConfig;
|
|
20139
|
+
this._schemaRegistry = _schemaRegistry;
|
|
20140
|
+
this.errors = errors;
|
|
20184
20141
|
}
|
|
20185
|
-
|
|
20186
|
-
|
|
20187
|
-
|
|
20142
|
+
get interpolationConfig() {
|
|
20143
|
+
return this._interpolationConfig;
|
|
20144
|
+
}
|
|
20145
|
+
createBoundHostProperties(properties, sourceSpan) {
|
|
20146
|
+
const boundProps = [];
|
|
20147
|
+
for (const propName of Object.keys(properties)) {
|
|
20148
|
+
const expression = properties[propName];
|
|
20149
|
+
if (typeof expression === "string") {
|
|
20150
|
+
this.parsePropertyBinding(
|
|
20151
|
+
propName,
|
|
20152
|
+
expression,
|
|
20153
|
+
true,
|
|
20154
|
+
sourceSpan,
|
|
20155
|
+
sourceSpan.start.offset,
|
|
20156
|
+
void 0,
|
|
20157
|
+
[],
|
|
20158
|
+
boundProps,
|
|
20159
|
+
sourceSpan
|
|
20160
|
+
);
|
|
20161
|
+
} else {
|
|
20162
|
+
this._reportError(`Value of the host property binding "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20163
|
+
}
|
|
20188
20164
|
}
|
|
20189
|
-
return
|
|
20165
|
+
return boundProps;
|
|
20190
20166
|
}
|
|
20191
|
-
|
|
20192
|
-
|
|
20193
|
-
|
|
20167
|
+
createDirectiveHostEventAsts(hostListeners, sourceSpan) {
|
|
20168
|
+
const targetEvents = [];
|
|
20169
|
+
for (const propName of Object.keys(hostListeners)) {
|
|
20170
|
+
const expression = hostListeners[propName];
|
|
20171
|
+
if (typeof expression === "string") {
|
|
20172
|
+
this.parseEvent(propName, expression, false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
|
|
20173
|
+
} else {
|
|
20174
|
+
this._reportError(`Value of the host listener "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20175
|
+
}
|
|
20194
20176
|
}
|
|
20195
|
-
return
|
|
20196
|
-
}
|
|
20197
|
-
_buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {
|
|
20198
|
-
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
20199
|
-
const mapValue = stylingInput.value.visit(valueConverter);
|
|
20200
|
-
let reference2;
|
|
20201
|
-
if (mapValue instanceof Interpolation) {
|
|
20202
|
-
totalBindingSlotsRequired += mapValue.expressions.length;
|
|
20203
|
-
reference2 = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);
|
|
20204
|
-
} else {
|
|
20205
|
-
reference2 = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
20206
|
-
}
|
|
20207
|
-
return {
|
|
20208
|
-
reference: reference2,
|
|
20209
|
-
calls: [{
|
|
20210
|
-
supportsInterpolation: true,
|
|
20211
|
-
sourceSpan: stylingInput.sourceSpan,
|
|
20212
|
-
allocateBindingSlots: totalBindingSlotsRequired,
|
|
20213
|
-
params: (convertFn) => {
|
|
20214
|
-
const convertResult = convertFn(mapValue);
|
|
20215
|
-
const params = Array.isArray(convertResult) ? convertResult : [convertResult];
|
|
20216
|
-
return params;
|
|
20217
|
-
}
|
|
20218
|
-
}]
|
|
20219
|
-
};
|
|
20220
|
-
}
|
|
20221
|
-
_buildSingleInputs(reference2, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {
|
|
20222
|
-
const instructions = [];
|
|
20223
|
-
inputs.forEach((input) => {
|
|
20224
|
-
const previousInstruction = instructions[instructions.length - 1];
|
|
20225
|
-
const value = input.value.visit(valueConverter);
|
|
20226
|
-
let referenceForCall = reference2;
|
|
20227
|
-
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
20228
|
-
if (value instanceof Interpolation) {
|
|
20229
|
-
totalBindingSlotsRequired += value.expressions.length;
|
|
20230
|
-
if (getInterpolationExpressionFn) {
|
|
20231
|
-
referenceForCall = getInterpolationExpressionFn(value);
|
|
20232
|
-
}
|
|
20233
|
-
}
|
|
20234
|
-
const call2 = {
|
|
20235
|
-
sourceSpan: input.sourceSpan,
|
|
20236
|
-
allocateBindingSlots: totalBindingSlotsRequired,
|
|
20237
|
-
supportsInterpolation: !!getInterpolationExpressionFn,
|
|
20238
|
-
params: (convertFn) => {
|
|
20239
|
-
const params = [];
|
|
20240
|
-
params.push(literal(input.name));
|
|
20241
|
-
const convertResult = convertFn(value);
|
|
20242
|
-
if (Array.isArray(convertResult)) {
|
|
20243
|
-
params.push(...convertResult);
|
|
20244
|
-
} else {
|
|
20245
|
-
params.push(convertResult);
|
|
20246
|
-
}
|
|
20247
|
-
if (!isClassBased && input.suffix !== null) {
|
|
20248
|
-
params.push(literal(input.suffix));
|
|
20249
|
-
}
|
|
20250
|
-
return params;
|
|
20251
|
-
}
|
|
20252
|
-
};
|
|
20253
|
-
if (previousInstruction && previousInstruction.reference === referenceForCall) {
|
|
20254
|
-
previousInstruction.calls.push(call2);
|
|
20255
|
-
} else {
|
|
20256
|
-
instructions.push({ reference: referenceForCall, calls: [call2] });
|
|
20257
|
-
}
|
|
20258
|
-
});
|
|
20259
|
-
return instructions;
|
|
20260
|
-
}
|
|
20261
|
-
_buildClassInputs(valueConverter) {
|
|
20262
|
-
if (this._singleClassInputs) {
|
|
20263
|
-
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
20264
|
-
}
|
|
20265
|
-
return [];
|
|
20266
|
-
}
|
|
20267
|
-
_buildStyleInputs(valueConverter) {
|
|
20268
|
-
if (this._singleStyleInputs) {
|
|
20269
|
-
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
20270
|
-
}
|
|
20271
|
-
return [];
|
|
20272
|
-
}
|
|
20273
|
-
buildUpdateLevelInstructions(valueConverter) {
|
|
20274
|
-
const instructions = [];
|
|
20275
|
-
if (this.hasBindings) {
|
|
20276
|
-
const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);
|
|
20277
|
-
if (styleMapInstruction) {
|
|
20278
|
-
instructions.push(styleMapInstruction);
|
|
20279
|
-
}
|
|
20280
|
-
const classMapInstruction = this.buildClassMapInstruction(valueConverter);
|
|
20281
|
-
if (classMapInstruction) {
|
|
20282
|
-
instructions.push(classMapInstruction);
|
|
20283
|
-
}
|
|
20284
|
-
instructions.push(...this._buildStyleInputs(valueConverter));
|
|
20285
|
-
instructions.push(...this._buildClassInputs(valueConverter));
|
|
20286
|
-
}
|
|
20287
|
-
return instructions;
|
|
20288
|
-
}
|
|
20289
|
-
};
|
|
20290
|
-
function registerIntoMap(map, key) {
|
|
20291
|
-
if (!map.has(key)) {
|
|
20292
|
-
map.set(key, map.size);
|
|
20293
|
-
}
|
|
20294
|
-
}
|
|
20295
|
-
function parseProperty2(name) {
|
|
20296
|
-
let hasOverrideFlag = false;
|
|
20297
|
-
const overrideIndex = name.indexOf(IMPORTANT_FLAG);
|
|
20298
|
-
if (overrideIndex !== -1) {
|
|
20299
|
-
name = overrideIndex > 0 ? name.substring(0, overrideIndex) : "";
|
|
20300
|
-
hasOverrideFlag = true;
|
|
20301
|
-
}
|
|
20302
|
-
let suffix = null;
|
|
20303
|
-
let property2 = name;
|
|
20304
|
-
const unitIndex = name.lastIndexOf(".");
|
|
20305
|
-
if (unitIndex > 0) {
|
|
20306
|
-
suffix = name.slice(unitIndex + 1);
|
|
20307
|
-
property2 = name.substring(0, unitIndex);
|
|
20308
|
-
}
|
|
20309
|
-
return { property: property2, suffix, hasOverrideFlag };
|
|
20310
|
-
}
|
|
20311
|
-
function getClassMapInterpolationExpression(interpolation) {
|
|
20312
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20313
|
-
case 1:
|
|
20314
|
-
return Identifiers.classMap;
|
|
20315
|
-
case 3:
|
|
20316
|
-
return Identifiers.classMapInterpolate1;
|
|
20317
|
-
case 5:
|
|
20318
|
-
return Identifiers.classMapInterpolate2;
|
|
20319
|
-
case 7:
|
|
20320
|
-
return Identifiers.classMapInterpolate3;
|
|
20321
|
-
case 9:
|
|
20322
|
-
return Identifiers.classMapInterpolate4;
|
|
20323
|
-
case 11:
|
|
20324
|
-
return Identifiers.classMapInterpolate5;
|
|
20325
|
-
case 13:
|
|
20326
|
-
return Identifiers.classMapInterpolate6;
|
|
20327
|
-
case 15:
|
|
20328
|
-
return Identifiers.classMapInterpolate7;
|
|
20329
|
-
case 17:
|
|
20330
|
-
return Identifiers.classMapInterpolate8;
|
|
20331
|
-
default:
|
|
20332
|
-
return Identifiers.classMapInterpolateV;
|
|
20333
|
-
}
|
|
20334
|
-
}
|
|
20335
|
-
function getStyleMapInterpolationExpression(interpolation) {
|
|
20336
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20337
|
-
case 1:
|
|
20338
|
-
return Identifiers.styleMap;
|
|
20339
|
-
case 3:
|
|
20340
|
-
return Identifiers.styleMapInterpolate1;
|
|
20341
|
-
case 5:
|
|
20342
|
-
return Identifiers.styleMapInterpolate2;
|
|
20343
|
-
case 7:
|
|
20344
|
-
return Identifiers.styleMapInterpolate3;
|
|
20345
|
-
case 9:
|
|
20346
|
-
return Identifiers.styleMapInterpolate4;
|
|
20347
|
-
case 11:
|
|
20348
|
-
return Identifiers.styleMapInterpolate5;
|
|
20349
|
-
case 13:
|
|
20350
|
-
return Identifiers.styleMapInterpolate6;
|
|
20351
|
-
case 15:
|
|
20352
|
-
return Identifiers.styleMapInterpolate7;
|
|
20353
|
-
case 17:
|
|
20354
|
-
return Identifiers.styleMapInterpolate8;
|
|
20355
|
-
default:
|
|
20356
|
-
return Identifiers.styleMapInterpolateV;
|
|
20357
|
-
}
|
|
20358
|
-
}
|
|
20359
|
-
function getStylePropInterpolationExpression(interpolation) {
|
|
20360
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20361
|
-
case 1:
|
|
20362
|
-
return Identifiers.styleProp;
|
|
20363
|
-
case 3:
|
|
20364
|
-
return Identifiers.stylePropInterpolate1;
|
|
20365
|
-
case 5:
|
|
20366
|
-
return Identifiers.stylePropInterpolate2;
|
|
20367
|
-
case 7:
|
|
20368
|
-
return Identifiers.stylePropInterpolate3;
|
|
20369
|
-
case 9:
|
|
20370
|
-
return Identifiers.stylePropInterpolate4;
|
|
20371
|
-
case 11:
|
|
20372
|
-
return Identifiers.stylePropInterpolate5;
|
|
20373
|
-
case 13:
|
|
20374
|
-
return Identifiers.stylePropInterpolate6;
|
|
20375
|
-
case 15:
|
|
20376
|
-
return Identifiers.stylePropInterpolate7;
|
|
20377
|
-
case 17:
|
|
20378
|
-
return Identifiers.stylePropInterpolate8;
|
|
20379
|
-
default:
|
|
20380
|
-
return Identifiers.stylePropInterpolateV;
|
|
20381
|
-
}
|
|
20382
|
-
}
|
|
20383
|
-
function isCssCustomProperty2(name) {
|
|
20384
|
-
return name.startsWith("--");
|
|
20385
|
-
}
|
|
20386
|
-
function isEmptyExpression(ast) {
|
|
20387
|
-
if (ast instanceof ASTWithSource) {
|
|
20388
|
-
ast = ast.ast;
|
|
20389
|
-
}
|
|
20390
|
-
return ast instanceof EmptyExpr;
|
|
20391
|
-
}
|
|
20392
|
-
|
|
20393
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20394
|
-
var HtmlParser = class extends Parser2 {
|
|
20395
|
-
constructor() {
|
|
20396
|
-
super(getHtmlTagDefinition);
|
|
20397
|
-
}
|
|
20398
|
-
parse(source, url, options) {
|
|
20399
|
-
return super.parse(source, url, options);
|
|
20400
|
-
}
|
|
20401
|
-
};
|
|
20402
|
-
|
|
20403
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20404
|
-
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20405
|
-
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20406
|
-
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
20407
|
-
var NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);
|
|
20408
|
-
var WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, "g");
|
|
20409
|
-
function hasPreserveWhitespacesAttr(attrs) {
|
|
20410
|
-
return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);
|
|
20411
|
-
}
|
|
20412
|
-
function replaceNgsp(value) {
|
|
20413
|
-
return value.replace(new RegExp(NGSP_UNICODE, "g"), " ");
|
|
20414
|
-
}
|
|
20415
|
-
var WhitespaceVisitor = class {
|
|
20416
|
-
visitElement(element2, context) {
|
|
20417
|
-
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
20418
|
-
return new Element2(element2.name, visitAll2(this, element2.attrs), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20419
|
-
}
|
|
20420
|
-
return new Element2(element2.name, element2.attrs, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20421
|
-
}
|
|
20422
|
-
visitAttribute(attribute2, context) {
|
|
20423
|
-
return attribute2.name !== PRESERVE_WS_ATTR_NAME ? attribute2 : null;
|
|
20424
|
-
}
|
|
20425
|
-
visitText(text2, context) {
|
|
20426
|
-
const isNotBlank = text2.value.match(NO_WS_REGEXP);
|
|
20427
|
-
const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);
|
|
20428
|
-
if (isNotBlank || hasExpansionSibling) {
|
|
20429
|
-
const tokens = text2.tokens.map((token) => token.type === 5 ? createWhitespaceProcessedTextToken(token) : token);
|
|
20430
|
-
const value = processWhitespace(text2.value);
|
|
20431
|
-
return new Text4(value, text2.sourceSpan, tokens, text2.i18n);
|
|
20432
|
-
}
|
|
20433
|
-
return null;
|
|
20434
|
-
}
|
|
20435
|
-
visitComment(comment, context) {
|
|
20436
|
-
return comment;
|
|
20437
|
-
}
|
|
20438
|
-
visitExpansion(expansion, context) {
|
|
20439
|
-
return expansion;
|
|
20440
|
-
}
|
|
20441
|
-
visitExpansionCase(expansionCase, context) {
|
|
20442
|
-
return expansionCase;
|
|
20443
|
-
}
|
|
20444
|
-
visitBlock(block, context) {
|
|
20445
|
-
return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);
|
|
20446
|
-
}
|
|
20447
|
-
visitBlockParameter(parameter, context) {
|
|
20448
|
-
return parameter;
|
|
20449
|
-
}
|
|
20450
|
-
};
|
|
20451
|
-
function createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {
|
|
20452
|
-
return { type, parts: [processWhitespace(parts[0])], sourceSpan };
|
|
20453
|
-
}
|
|
20454
|
-
function processWhitespace(text2) {
|
|
20455
|
-
return replaceNgsp(text2).replace(WS_REPLACE_REGEXP, " ");
|
|
20456
|
-
}
|
|
20457
|
-
function visitAllWithSiblings(visitor, nodes) {
|
|
20458
|
-
const result = [];
|
|
20459
|
-
nodes.forEach((ast, i) => {
|
|
20460
|
-
const context = { prev: nodes[i - 1], next: nodes[i + 1] };
|
|
20461
|
-
const astResult = ast.visit(visitor, context);
|
|
20462
|
-
if (astResult) {
|
|
20463
|
-
result.push(astResult);
|
|
20464
|
-
}
|
|
20465
|
-
});
|
|
20466
|
-
return result;
|
|
20467
|
-
}
|
|
20468
|
-
|
|
20469
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20470
|
-
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20471
|
-
var ATTRIBUTE_PREFIX = "attr";
|
|
20472
|
-
var CLASS_PREFIX = "class";
|
|
20473
|
-
var STYLE_PREFIX = "style";
|
|
20474
|
-
var TEMPLATE_ATTR_PREFIX = "*";
|
|
20475
|
-
var ANIMATE_PROP_PREFIX = "animate-";
|
|
20476
|
-
var BindingParser = class {
|
|
20477
|
-
constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {
|
|
20478
|
-
this._exprParser = _exprParser;
|
|
20479
|
-
this._interpolationConfig = _interpolationConfig;
|
|
20480
|
-
this._schemaRegistry = _schemaRegistry;
|
|
20481
|
-
this.errors = errors;
|
|
20482
|
-
}
|
|
20483
|
-
get interpolationConfig() {
|
|
20484
|
-
return this._interpolationConfig;
|
|
20485
|
-
}
|
|
20486
|
-
createBoundHostProperties(properties, sourceSpan) {
|
|
20487
|
-
const boundProps = [];
|
|
20488
|
-
for (const propName of Object.keys(properties)) {
|
|
20489
|
-
const expression = properties[propName];
|
|
20490
|
-
if (typeof expression === "string") {
|
|
20491
|
-
this.parsePropertyBinding(
|
|
20492
|
-
propName,
|
|
20493
|
-
expression,
|
|
20494
|
-
true,
|
|
20495
|
-
sourceSpan,
|
|
20496
|
-
sourceSpan.start.offset,
|
|
20497
|
-
void 0,
|
|
20498
|
-
[],
|
|
20499
|
-
boundProps,
|
|
20500
|
-
sourceSpan
|
|
20501
|
-
);
|
|
20502
|
-
} else {
|
|
20503
|
-
this._reportError(`Value of the host property binding "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20504
|
-
}
|
|
20505
|
-
}
|
|
20506
|
-
return boundProps;
|
|
20507
|
-
}
|
|
20508
|
-
createDirectiveHostEventAsts(hostListeners, sourceSpan) {
|
|
20509
|
-
const targetEvents = [];
|
|
20510
|
-
for (const propName of Object.keys(hostListeners)) {
|
|
20511
|
-
const expression = hostListeners[propName];
|
|
20512
|
-
if (typeof expression === "string") {
|
|
20513
|
-
this.parseEvent(propName, expression, false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
|
|
20514
|
-
} else {
|
|
20515
|
-
this._reportError(`Value of the host listener "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20516
|
-
}
|
|
20517
|
-
}
|
|
20518
|
-
return targetEvents;
|
|
20177
|
+
return targetEvents;
|
|
20519
20178
|
}
|
|
20520
20179
|
parseInterpolation(value, sourceSpan, interpolatedTokens) {
|
|
20521
20180
|
const sourceInfo = sourceSpan.start.toString();
|
|
@@ -22097,38 +21756,371 @@ var I18nContext = class {
|
|
|
22097
21756
|
} else {
|
|
22098
21757
|
phs.push(...values);
|
|
22099
21758
|
}
|
|
22100
|
-
this.placeholders.set(key, phs);
|
|
22101
|
-
});
|
|
22102
|
-
this._unresolvedCtxCount--;
|
|
21759
|
+
this.placeholders.set(key, phs);
|
|
21760
|
+
});
|
|
21761
|
+
this._unresolvedCtxCount--;
|
|
21762
|
+
}
|
|
21763
|
+
};
|
|
21764
|
+
function wrap(symbol, index, contextId, closed) {
|
|
21765
|
+
const state = closed ? "/" : "";
|
|
21766
|
+
return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);
|
|
21767
|
+
}
|
|
21768
|
+
function wrapTag(symbol, { index, ctx, isVoid }, closed) {
|
|
21769
|
+
return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) : wrap(symbol, index, ctx, closed);
|
|
21770
|
+
}
|
|
21771
|
+
function findTemplateFn(ctx, templateIndex) {
|
|
21772
|
+
return (token) => typeof token === "object" && token.type === TagType.TEMPLATE && token.index === templateIndex && token.ctx === ctx;
|
|
21773
|
+
}
|
|
21774
|
+
function serializePlaceholderValue(value) {
|
|
21775
|
+
const element2 = (data, closed) => wrapTag("#", data, closed);
|
|
21776
|
+
const template2 = (data, closed) => wrapTag("*", data, closed);
|
|
21777
|
+
switch (value.type) {
|
|
21778
|
+
case TagType.ELEMENT:
|
|
21779
|
+
if (value.closed) {
|
|
21780
|
+
return element2(value, true) + (value.tmpl ? template2(value.tmpl, true) : "");
|
|
21781
|
+
}
|
|
21782
|
+
if (value.tmpl) {
|
|
21783
|
+
return template2(value.tmpl) + element2(value) + (value.isVoid ? template2(value.tmpl, true) : "");
|
|
21784
|
+
}
|
|
21785
|
+
return element2(value);
|
|
21786
|
+
case TagType.TEMPLATE:
|
|
21787
|
+
return template2(value, value.closed);
|
|
21788
|
+
default:
|
|
21789
|
+
return value;
|
|
21790
|
+
}
|
|
21791
|
+
}
|
|
21792
|
+
|
|
21793
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
21794
|
+
var IMPORTANT_FLAG = "!important";
|
|
21795
|
+
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
21796
|
+
var StylingBuilder = class {
|
|
21797
|
+
constructor(_directiveExpr) {
|
|
21798
|
+
this._directiveExpr = _directiveExpr;
|
|
21799
|
+
this._hasInitialValues = false;
|
|
21800
|
+
this.hasBindings = false;
|
|
21801
|
+
this.hasBindingsWithPipes = false;
|
|
21802
|
+
this._classMapInput = null;
|
|
21803
|
+
this._styleMapInput = null;
|
|
21804
|
+
this._singleStyleInputs = null;
|
|
21805
|
+
this._singleClassInputs = null;
|
|
21806
|
+
this._lastStylingInput = null;
|
|
21807
|
+
this._firstStylingInput = null;
|
|
21808
|
+
this._stylesIndex = /* @__PURE__ */ new Map();
|
|
21809
|
+
this._classesIndex = /* @__PURE__ */ new Map();
|
|
21810
|
+
this._initialStyleValues = [];
|
|
21811
|
+
this._initialClassValues = [];
|
|
21812
|
+
}
|
|
21813
|
+
registerBoundInput(input) {
|
|
21814
|
+
let binding = null;
|
|
21815
|
+
let name = input.name;
|
|
21816
|
+
switch (input.type) {
|
|
21817
|
+
case 0:
|
|
21818
|
+
binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
|
|
21819
|
+
break;
|
|
21820
|
+
case 3:
|
|
21821
|
+
binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
|
|
21822
|
+
break;
|
|
21823
|
+
case 2:
|
|
21824
|
+
binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
|
|
21825
|
+
break;
|
|
21826
|
+
}
|
|
21827
|
+
return binding ? true : false;
|
|
21828
|
+
}
|
|
21829
|
+
registerInputBasedOnName(name, expression, sourceSpan) {
|
|
21830
|
+
let binding = null;
|
|
21831
|
+
const prefix = name.substring(0, 6);
|
|
21832
|
+
const isStyle = name === "style" || prefix === "style." || prefix === "style!";
|
|
21833
|
+
const isClass = !isStyle && (name === "class" || prefix === "class." || prefix === "class!");
|
|
21834
|
+
if (isStyle || isClass) {
|
|
21835
|
+
const isMapBased = name.charAt(5) !== ".";
|
|
21836
|
+
const property2 = name.slice(isMapBased ? 5 : 6);
|
|
21837
|
+
if (isStyle) {
|
|
21838
|
+
binding = this.registerStyleInput(property2, isMapBased, expression, sourceSpan);
|
|
21839
|
+
} else {
|
|
21840
|
+
binding = this.registerClassInput(property2, isMapBased, expression, sourceSpan);
|
|
21841
|
+
}
|
|
21842
|
+
}
|
|
21843
|
+
return binding;
|
|
21844
|
+
}
|
|
21845
|
+
registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {
|
|
21846
|
+
if (isEmptyExpression(value)) {
|
|
21847
|
+
return null;
|
|
21848
|
+
}
|
|
21849
|
+
if (!isCssCustomProperty2(name)) {
|
|
21850
|
+
name = hyphenate2(name);
|
|
21851
|
+
}
|
|
21852
|
+
const { property: property2, hasOverrideFlag, suffix: bindingSuffix } = parseProperty2(name);
|
|
21853
|
+
suffix = typeof suffix === "string" && suffix.length !== 0 ? suffix : bindingSuffix;
|
|
21854
|
+
const entry = { name: property2, suffix, value, sourceSpan, hasOverrideFlag };
|
|
21855
|
+
if (isMapBased) {
|
|
21856
|
+
this._styleMapInput = entry;
|
|
21857
|
+
} else {
|
|
21858
|
+
(this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
|
|
21859
|
+
registerIntoMap(this._stylesIndex, property2);
|
|
21860
|
+
}
|
|
21861
|
+
this._lastStylingInput = entry;
|
|
21862
|
+
this._firstStylingInput = this._firstStylingInput || entry;
|
|
21863
|
+
this._checkForPipes(value);
|
|
21864
|
+
this.hasBindings = true;
|
|
21865
|
+
return entry;
|
|
21866
|
+
}
|
|
21867
|
+
registerClassInput(name, isMapBased, value, sourceSpan) {
|
|
21868
|
+
if (isEmptyExpression(value)) {
|
|
21869
|
+
return null;
|
|
21870
|
+
}
|
|
21871
|
+
const { property: property2, hasOverrideFlag } = parseProperty2(name);
|
|
21872
|
+
const entry = { name: property2, value, sourceSpan, hasOverrideFlag, suffix: null };
|
|
21873
|
+
if (isMapBased) {
|
|
21874
|
+
this._classMapInput = entry;
|
|
21875
|
+
} else {
|
|
21876
|
+
(this._singleClassInputs = this._singleClassInputs || []).push(entry);
|
|
21877
|
+
registerIntoMap(this._classesIndex, property2);
|
|
21878
|
+
}
|
|
21879
|
+
this._lastStylingInput = entry;
|
|
21880
|
+
this._firstStylingInput = this._firstStylingInput || entry;
|
|
21881
|
+
this._checkForPipes(value);
|
|
21882
|
+
this.hasBindings = true;
|
|
21883
|
+
return entry;
|
|
21884
|
+
}
|
|
21885
|
+
_checkForPipes(value) {
|
|
21886
|
+
if (value instanceof ASTWithSource && value.ast instanceof BindingPipe) {
|
|
21887
|
+
this.hasBindingsWithPipes = true;
|
|
21888
|
+
}
|
|
21889
|
+
}
|
|
21890
|
+
registerStyleAttr(value) {
|
|
21891
|
+
this._initialStyleValues = parse(value);
|
|
21892
|
+
this._hasInitialValues = true;
|
|
21893
|
+
}
|
|
21894
|
+
registerClassAttr(value) {
|
|
21895
|
+
this._initialClassValues = value.trim().split(/\s+/g);
|
|
21896
|
+
this._hasInitialValues = true;
|
|
21897
|
+
}
|
|
21898
|
+
populateInitialStylingAttrs(attrs) {
|
|
21899
|
+
if (this._initialClassValues.length) {
|
|
21900
|
+
attrs.push(literal(1));
|
|
21901
|
+
for (let i = 0; i < this._initialClassValues.length; i++) {
|
|
21902
|
+
attrs.push(literal(this._initialClassValues[i]));
|
|
21903
|
+
}
|
|
21904
|
+
}
|
|
21905
|
+
if (this._initialStyleValues.length) {
|
|
21906
|
+
attrs.push(literal(2));
|
|
21907
|
+
for (let i = 0; i < this._initialStyleValues.length; i += 2) {
|
|
21908
|
+
attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
|
|
21909
|
+
}
|
|
21910
|
+
}
|
|
21911
|
+
}
|
|
21912
|
+
assignHostAttrs(attrs, definitionMap) {
|
|
21913
|
+
if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {
|
|
21914
|
+
this.populateInitialStylingAttrs(attrs);
|
|
21915
|
+
definitionMap.set("hostAttrs", literalArr(attrs));
|
|
21916
|
+
}
|
|
21917
|
+
}
|
|
21918
|
+
buildClassMapInstruction(valueConverter) {
|
|
21919
|
+
if (this._classMapInput) {
|
|
21920
|
+
return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);
|
|
21921
|
+
}
|
|
21922
|
+
return null;
|
|
21923
|
+
}
|
|
21924
|
+
buildStyleMapInstruction(valueConverter) {
|
|
21925
|
+
if (this._styleMapInput) {
|
|
21926
|
+
return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);
|
|
21927
|
+
}
|
|
21928
|
+
return null;
|
|
21929
|
+
}
|
|
21930
|
+
_buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {
|
|
21931
|
+
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
21932
|
+
const mapValue = stylingInput.value.visit(valueConverter);
|
|
21933
|
+
let reference2;
|
|
21934
|
+
if (mapValue instanceof Interpolation) {
|
|
21935
|
+
totalBindingSlotsRequired += mapValue.expressions.length;
|
|
21936
|
+
reference2 = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);
|
|
21937
|
+
} else {
|
|
21938
|
+
reference2 = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
21939
|
+
}
|
|
21940
|
+
return {
|
|
21941
|
+
reference: reference2,
|
|
21942
|
+
calls: [{
|
|
21943
|
+
supportsInterpolation: true,
|
|
21944
|
+
sourceSpan: stylingInput.sourceSpan,
|
|
21945
|
+
allocateBindingSlots: totalBindingSlotsRequired,
|
|
21946
|
+
params: (convertFn) => {
|
|
21947
|
+
const convertResult = convertFn(mapValue);
|
|
21948
|
+
const params = Array.isArray(convertResult) ? convertResult : [convertResult];
|
|
21949
|
+
return params;
|
|
21950
|
+
}
|
|
21951
|
+
}]
|
|
21952
|
+
};
|
|
21953
|
+
}
|
|
21954
|
+
_buildSingleInputs(reference2, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {
|
|
21955
|
+
const instructions = [];
|
|
21956
|
+
inputs.forEach((input) => {
|
|
21957
|
+
const previousInstruction = instructions[instructions.length - 1];
|
|
21958
|
+
const value = input.value.visit(valueConverter);
|
|
21959
|
+
let referenceForCall = reference2;
|
|
21960
|
+
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
21961
|
+
if (value instanceof Interpolation) {
|
|
21962
|
+
totalBindingSlotsRequired += value.expressions.length;
|
|
21963
|
+
if (getInterpolationExpressionFn) {
|
|
21964
|
+
referenceForCall = getInterpolationExpressionFn(value);
|
|
21965
|
+
}
|
|
21966
|
+
}
|
|
21967
|
+
const call2 = {
|
|
21968
|
+
sourceSpan: input.sourceSpan,
|
|
21969
|
+
allocateBindingSlots: totalBindingSlotsRequired,
|
|
21970
|
+
supportsInterpolation: !!getInterpolationExpressionFn,
|
|
21971
|
+
params: (convertFn) => {
|
|
21972
|
+
const params = [];
|
|
21973
|
+
params.push(literal(input.name));
|
|
21974
|
+
const convertResult = convertFn(value);
|
|
21975
|
+
if (Array.isArray(convertResult)) {
|
|
21976
|
+
params.push(...convertResult);
|
|
21977
|
+
} else {
|
|
21978
|
+
params.push(convertResult);
|
|
21979
|
+
}
|
|
21980
|
+
if (!isClassBased && input.suffix !== null) {
|
|
21981
|
+
params.push(literal(input.suffix));
|
|
21982
|
+
}
|
|
21983
|
+
return params;
|
|
21984
|
+
}
|
|
21985
|
+
};
|
|
21986
|
+
if (previousInstruction && previousInstruction.reference === referenceForCall) {
|
|
21987
|
+
previousInstruction.calls.push(call2);
|
|
21988
|
+
} else {
|
|
21989
|
+
instructions.push({ reference: referenceForCall, calls: [call2] });
|
|
21990
|
+
}
|
|
21991
|
+
});
|
|
21992
|
+
return instructions;
|
|
21993
|
+
}
|
|
21994
|
+
_buildClassInputs(valueConverter) {
|
|
21995
|
+
if (this._singleClassInputs) {
|
|
21996
|
+
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
21997
|
+
}
|
|
21998
|
+
return [];
|
|
21999
|
+
}
|
|
22000
|
+
_buildStyleInputs(valueConverter) {
|
|
22001
|
+
if (this._singleStyleInputs) {
|
|
22002
|
+
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
22003
|
+
}
|
|
22004
|
+
return [];
|
|
22005
|
+
}
|
|
22006
|
+
buildUpdateLevelInstructions(valueConverter) {
|
|
22007
|
+
const instructions = [];
|
|
22008
|
+
if (this.hasBindings) {
|
|
22009
|
+
const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);
|
|
22010
|
+
if (styleMapInstruction) {
|
|
22011
|
+
instructions.push(styleMapInstruction);
|
|
22012
|
+
}
|
|
22013
|
+
const classMapInstruction = this.buildClassMapInstruction(valueConverter);
|
|
22014
|
+
if (classMapInstruction) {
|
|
22015
|
+
instructions.push(classMapInstruction);
|
|
22016
|
+
}
|
|
22017
|
+
instructions.push(...this._buildStyleInputs(valueConverter));
|
|
22018
|
+
instructions.push(...this._buildClassInputs(valueConverter));
|
|
22019
|
+
}
|
|
22020
|
+
return instructions;
|
|
22103
22021
|
}
|
|
22104
22022
|
};
|
|
22105
|
-
function
|
|
22106
|
-
|
|
22107
|
-
|
|
22023
|
+
function registerIntoMap(map, key) {
|
|
22024
|
+
if (!map.has(key)) {
|
|
22025
|
+
map.set(key, map.size);
|
|
22026
|
+
}
|
|
22108
22027
|
}
|
|
22109
|
-
function
|
|
22110
|
-
|
|
22028
|
+
function parseProperty2(name) {
|
|
22029
|
+
let hasOverrideFlag = false;
|
|
22030
|
+
const overrideIndex = name.indexOf(IMPORTANT_FLAG);
|
|
22031
|
+
if (overrideIndex !== -1) {
|
|
22032
|
+
name = overrideIndex > 0 ? name.substring(0, overrideIndex) : "";
|
|
22033
|
+
hasOverrideFlag = true;
|
|
22034
|
+
}
|
|
22035
|
+
let suffix = null;
|
|
22036
|
+
let property2 = name;
|
|
22037
|
+
const unitIndex = name.lastIndexOf(".");
|
|
22038
|
+
if (unitIndex > 0) {
|
|
22039
|
+
suffix = name.slice(unitIndex + 1);
|
|
22040
|
+
property2 = name.substring(0, unitIndex);
|
|
22041
|
+
}
|
|
22042
|
+
return { property: property2, suffix, hasOverrideFlag };
|
|
22111
22043
|
}
|
|
22112
|
-
function
|
|
22113
|
-
|
|
22044
|
+
function getClassMapInterpolationExpression(interpolation) {
|
|
22045
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
22046
|
+
case 1:
|
|
22047
|
+
return Identifiers.classMap;
|
|
22048
|
+
case 3:
|
|
22049
|
+
return Identifiers.classMapInterpolate1;
|
|
22050
|
+
case 5:
|
|
22051
|
+
return Identifiers.classMapInterpolate2;
|
|
22052
|
+
case 7:
|
|
22053
|
+
return Identifiers.classMapInterpolate3;
|
|
22054
|
+
case 9:
|
|
22055
|
+
return Identifiers.classMapInterpolate4;
|
|
22056
|
+
case 11:
|
|
22057
|
+
return Identifiers.classMapInterpolate5;
|
|
22058
|
+
case 13:
|
|
22059
|
+
return Identifiers.classMapInterpolate6;
|
|
22060
|
+
case 15:
|
|
22061
|
+
return Identifiers.classMapInterpolate7;
|
|
22062
|
+
case 17:
|
|
22063
|
+
return Identifiers.classMapInterpolate8;
|
|
22064
|
+
default:
|
|
22065
|
+
return Identifiers.classMapInterpolateV;
|
|
22066
|
+
}
|
|
22114
22067
|
}
|
|
22115
|
-
function
|
|
22116
|
-
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
case
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
|
|
22123
|
-
|
|
22124
|
-
|
|
22125
|
-
|
|
22126
|
-
return
|
|
22127
|
-
case
|
|
22128
|
-
return
|
|
22068
|
+
function getStyleMapInterpolationExpression(interpolation) {
|
|
22069
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
22070
|
+
case 1:
|
|
22071
|
+
return Identifiers.styleMap;
|
|
22072
|
+
case 3:
|
|
22073
|
+
return Identifiers.styleMapInterpolate1;
|
|
22074
|
+
case 5:
|
|
22075
|
+
return Identifiers.styleMapInterpolate2;
|
|
22076
|
+
case 7:
|
|
22077
|
+
return Identifiers.styleMapInterpolate3;
|
|
22078
|
+
case 9:
|
|
22079
|
+
return Identifiers.styleMapInterpolate4;
|
|
22080
|
+
case 11:
|
|
22081
|
+
return Identifiers.styleMapInterpolate5;
|
|
22082
|
+
case 13:
|
|
22083
|
+
return Identifiers.styleMapInterpolate6;
|
|
22084
|
+
case 15:
|
|
22085
|
+
return Identifiers.styleMapInterpolate7;
|
|
22086
|
+
case 17:
|
|
22087
|
+
return Identifiers.styleMapInterpolate8;
|
|
22129
22088
|
default:
|
|
22130
|
-
return
|
|
22089
|
+
return Identifiers.styleMapInterpolateV;
|
|
22090
|
+
}
|
|
22091
|
+
}
|
|
22092
|
+
function getStylePropInterpolationExpression(interpolation) {
|
|
22093
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
22094
|
+
case 1:
|
|
22095
|
+
return Identifiers.styleProp;
|
|
22096
|
+
case 3:
|
|
22097
|
+
return Identifiers.stylePropInterpolate1;
|
|
22098
|
+
case 5:
|
|
22099
|
+
return Identifiers.stylePropInterpolate2;
|
|
22100
|
+
case 7:
|
|
22101
|
+
return Identifiers.stylePropInterpolate3;
|
|
22102
|
+
case 9:
|
|
22103
|
+
return Identifiers.stylePropInterpolate4;
|
|
22104
|
+
case 11:
|
|
22105
|
+
return Identifiers.stylePropInterpolate5;
|
|
22106
|
+
case 13:
|
|
22107
|
+
return Identifiers.stylePropInterpolate6;
|
|
22108
|
+
case 15:
|
|
22109
|
+
return Identifiers.stylePropInterpolate7;
|
|
22110
|
+
case 17:
|
|
22111
|
+
return Identifiers.stylePropInterpolate8;
|
|
22112
|
+
default:
|
|
22113
|
+
return Identifiers.stylePropInterpolateV;
|
|
22114
|
+
}
|
|
22115
|
+
}
|
|
22116
|
+
function isCssCustomProperty2(name) {
|
|
22117
|
+
return name.startsWith("--");
|
|
22118
|
+
}
|
|
22119
|
+
function isEmptyExpression(ast) {
|
|
22120
|
+
if (ast instanceof ASTWithSource) {
|
|
22121
|
+
ast = ast.ast;
|
|
22131
22122
|
}
|
|
22123
|
+
return ast instanceof EmptyExpr;
|
|
22132
22124
|
}
|
|
22133
22125
|
|
|
22134
22126
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
@@ -23818,6 +23810,123 @@ function createClosureModeGuard2() {
|
|
|
23818
23810
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23819
23811
|
}
|
|
23820
23812
|
|
|
23813
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
|
|
23814
|
+
function toQueryFlags(query) {
|
|
23815
|
+
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
23816
|
+
}
|
|
23817
|
+
function getQueryPredicate(query, constantPool) {
|
|
23818
|
+
if (Array.isArray(query.predicate)) {
|
|
23819
|
+
let predicate = [];
|
|
23820
|
+
query.predicate.forEach((selector) => {
|
|
23821
|
+
const selectors = selector.split(",").map((token) => literal(token.trim()));
|
|
23822
|
+
predicate.push(...selectors);
|
|
23823
|
+
});
|
|
23824
|
+
return constantPool.getConstLiteral(literalArr(predicate), true);
|
|
23825
|
+
} else {
|
|
23826
|
+
switch (query.predicate.forwardRef) {
|
|
23827
|
+
case 0:
|
|
23828
|
+
case 2:
|
|
23829
|
+
return query.predicate.expression;
|
|
23830
|
+
case 1:
|
|
23831
|
+
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
23832
|
+
}
|
|
23833
|
+
}
|
|
23834
|
+
}
|
|
23835
|
+
function createQueryCreateCall(query, constantPool, queryTypeFns, prependParams) {
|
|
23836
|
+
const parameters = [];
|
|
23837
|
+
if (prependParams !== void 0) {
|
|
23838
|
+
parameters.push(...prependParams);
|
|
23839
|
+
}
|
|
23840
|
+
if (query.isSignal) {
|
|
23841
|
+
parameters.push(new ReadPropExpr(variable(CONTEXT_NAME), query.propertyName));
|
|
23842
|
+
}
|
|
23843
|
+
parameters.push(getQueryPredicate(query, constantPool), literal(toQueryFlags(query)));
|
|
23844
|
+
if (query.read) {
|
|
23845
|
+
parameters.push(query.read);
|
|
23846
|
+
}
|
|
23847
|
+
const queryCreateFn = query.isSignal ? queryTypeFns.signalBased : queryTypeFns.nonSignal;
|
|
23848
|
+
return importExpr(queryCreateFn).callFn(parameters);
|
|
23849
|
+
}
|
|
23850
|
+
var queryAdvancePlaceholder = Symbol("queryAdvancePlaceholder");
|
|
23851
|
+
function collapseAdvanceStatements(statements) {
|
|
23852
|
+
const result = [];
|
|
23853
|
+
let advanceCollapseCount = 0;
|
|
23854
|
+
const flushAdvanceCount = () => {
|
|
23855
|
+
if (advanceCollapseCount > 0) {
|
|
23856
|
+
result.unshift(importExpr(Identifiers.queryAdvance).callFn(advanceCollapseCount === 1 ? [] : [literal(advanceCollapseCount)]).toStmt());
|
|
23857
|
+
advanceCollapseCount = 0;
|
|
23858
|
+
}
|
|
23859
|
+
};
|
|
23860
|
+
for (let i = statements.length - 1; i >= 0; i--) {
|
|
23861
|
+
const st = statements[i];
|
|
23862
|
+
if (st === queryAdvancePlaceholder) {
|
|
23863
|
+
advanceCollapseCount++;
|
|
23864
|
+
} else {
|
|
23865
|
+
flushAdvanceCount();
|
|
23866
|
+
result.unshift(st);
|
|
23867
|
+
}
|
|
23868
|
+
}
|
|
23869
|
+
flushAdvanceCount();
|
|
23870
|
+
return result;
|
|
23871
|
+
}
|
|
23872
|
+
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
23873
|
+
const createStatements = [];
|
|
23874
|
+
const updateStatements = [];
|
|
23875
|
+
const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);
|
|
23876
|
+
viewQueries.forEach((query) => {
|
|
23877
|
+
const queryDefinitionCall = createQueryCreateCall(query, constantPool, {
|
|
23878
|
+
signalBased: Identifiers.viewQuerySignal,
|
|
23879
|
+
nonSignal: Identifiers.viewQuery
|
|
23880
|
+
});
|
|
23881
|
+
createStatements.push(queryDefinitionCall.toStmt());
|
|
23882
|
+
if (query.isSignal) {
|
|
23883
|
+
updateStatements.push(queryAdvancePlaceholder);
|
|
23884
|
+
return;
|
|
23885
|
+
}
|
|
23886
|
+
const temporary = tempAllocator();
|
|
23887
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
23888
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
23889
|
+
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
23890
|
+
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
23891
|
+
});
|
|
23892
|
+
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
23893
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
|
|
23894
|
+
renderFlagCheckIfStmt(1, createStatements),
|
|
23895
|
+
renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))
|
|
23896
|
+
], INFERRED_TYPE, null, viewQueryFnName);
|
|
23897
|
+
}
|
|
23898
|
+
function createContentQueriesFunction(queries, constantPool, name) {
|
|
23899
|
+
const createStatements = [];
|
|
23900
|
+
const updateStatements = [];
|
|
23901
|
+
const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);
|
|
23902
|
+
for (const query of queries) {
|
|
23903
|
+
createStatements.push(createQueryCreateCall(
|
|
23904
|
+
query,
|
|
23905
|
+
constantPool,
|
|
23906
|
+
{ nonSignal: Identifiers.contentQuery, signalBased: Identifiers.contentQuerySignal },
|
|
23907
|
+
[variable("dirIndex")]
|
|
23908
|
+
).toStmt());
|
|
23909
|
+
if (query.isSignal) {
|
|
23910
|
+
updateStatements.push(queryAdvancePlaceholder);
|
|
23911
|
+
continue;
|
|
23912
|
+
}
|
|
23913
|
+
const temporary = tempAllocator();
|
|
23914
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
23915
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
23916
|
+
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
23917
|
+
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
23918
|
+
}
|
|
23919
|
+
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
23920
|
+
return fn([
|
|
23921
|
+
new FnParam(RENDER_FLAGS, NUMBER_TYPE),
|
|
23922
|
+
new FnParam(CONTEXT_NAME, null),
|
|
23923
|
+
new FnParam("dirIndex", null)
|
|
23924
|
+
], [
|
|
23925
|
+
renderFlagCheckIfStmt(1, createStatements),
|
|
23926
|
+
renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))
|
|
23927
|
+
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
23928
|
+
}
|
|
23929
|
+
|
|
23821
23930
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23822
23931
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23823
23932
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
@@ -24033,16 +24142,6 @@ function compileDeclarationList(list, mode) {
|
|
|
24033
24142
|
throw new Error(`Unsupported with an array of pre-resolved dependencies`);
|
|
24034
24143
|
}
|
|
24035
24144
|
}
|
|
24036
|
-
function prepareQueryParams(query, constantPool) {
|
|
24037
|
-
const parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];
|
|
24038
|
-
if (query.read) {
|
|
24039
|
-
parameters.push(query.read);
|
|
24040
|
-
}
|
|
24041
|
-
return parameters;
|
|
24042
|
-
}
|
|
24043
|
-
function toQueryFlags(query) {
|
|
24044
|
-
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
24045
|
-
}
|
|
24046
24145
|
function convertAttributesToExpressions(attributes) {
|
|
24047
24146
|
const values = [];
|
|
24048
24147
|
for (let key of Object.getOwnPropertyNames(attributes)) {
|
|
@@ -24051,28 +24150,6 @@ function convertAttributesToExpressions(attributes) {
|
|
|
24051
24150
|
}
|
|
24052
24151
|
return values;
|
|
24053
24152
|
}
|
|
24054
|
-
function createContentQueriesFunction(queries, constantPool, name) {
|
|
24055
|
-
const createStatements = [];
|
|
24056
|
-
const updateStatements = [];
|
|
24057
|
-
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
24058
|
-
for (const query of queries) {
|
|
24059
|
-
createStatements.push(importExpr(Identifiers.contentQuery).callFn([variable("dirIndex"), ...prepareQueryParams(query, constantPool)]).toStmt());
|
|
24060
|
-
const temporary = tempAllocator();
|
|
24061
|
-
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
24062
|
-
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
24063
|
-
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
24064
|
-
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
24065
|
-
}
|
|
24066
|
-
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
24067
|
-
return fn([
|
|
24068
|
-
new FnParam(RENDER_FLAGS, NUMBER_TYPE),
|
|
24069
|
-
new FnParam(CONTEXT_NAME, null),
|
|
24070
|
-
new FnParam("dirIndex", null)
|
|
24071
|
-
], [
|
|
24072
|
-
renderFlagCheckIfStmt(1, createStatements),
|
|
24073
|
-
renderFlagCheckIfStmt(2, updateStatements)
|
|
24074
|
-
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
24075
|
-
}
|
|
24076
24153
|
function stringAsType(str) {
|
|
24077
24154
|
return expressionType(literal(str));
|
|
24078
24155
|
}
|
|
@@ -24124,25 +24201,6 @@ function createDirectiveType(meta) {
|
|
|
24124
24201
|
}
|
|
24125
24202
|
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
24126
24203
|
}
|
|
24127
|
-
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
24128
|
-
const createStatements = [];
|
|
24129
|
-
const updateStatements = [];
|
|
24130
|
-
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
24131
|
-
viewQueries.forEach((query) => {
|
|
24132
|
-
const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));
|
|
24133
|
-
createStatements.push(queryDefinition.toStmt());
|
|
24134
|
-
const temporary = tempAllocator();
|
|
24135
|
-
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
24136
|
-
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
24137
|
-
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
24138
|
-
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
24139
|
-
});
|
|
24140
|
-
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
24141
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
|
|
24142
|
-
renderFlagCheckIfStmt(1, createStatements),
|
|
24143
|
-
renderFlagCheckIfStmt(2, updateStatements)
|
|
24144
|
-
], INFERRED_TYPE, null, viewQueryFnName);
|
|
24145
|
-
}
|
|
24146
24204
|
function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {
|
|
24147
24205
|
const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);
|
|
24148
24206
|
const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);
|
|
@@ -25253,6 +25311,7 @@ var CompilerFacadeImpl = class {
|
|
|
25253
25311
|
};
|
|
25254
25312
|
function convertToR3QueryMetadata(facade) {
|
|
25255
25313
|
return __spreadProps(__spreadValues({}, facade), {
|
|
25314
|
+
isSignal: facade.isSignal,
|
|
25256
25315
|
predicate: convertQueryPredicate(facade.predicate),
|
|
25257
25316
|
read: facade.read ? new WrappedNodeExpr(facade.read) : null,
|
|
25258
25317
|
static: facade.static,
|
|
@@ -25268,7 +25327,8 @@ function convertQueryDeclarationToMetadata(declaration) {
|
|
|
25268
25327
|
descendants: (_b2 = declaration.descendants) != null ? _b2 : false,
|
|
25269
25328
|
read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,
|
|
25270
25329
|
static: (_c2 = declaration.static) != null ? _c2 : false,
|
|
25271
|
-
emitDistinctChangesOnly: (_d2 = declaration.emitDistinctChangesOnly) != null ? _d2 : true
|
|
25330
|
+
emitDistinctChangesOnly: (_d2 = declaration.emitDistinctChangesOnly) != null ? _d2 : true,
|
|
25331
|
+
isSignal: !!declaration.isSignal
|
|
25272
25332
|
};
|
|
25273
25333
|
}
|
|
25274
25334
|
function convertQueryPredicate(predicate) {
|
|
@@ -25644,7 +25704,7 @@ function publishFacade(global) {
|
|
|
25644
25704
|
}
|
|
25645
25705
|
|
|
25646
25706
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25647
|
-
var VERSION2 = new Version("17.
|
|
25707
|
+
var VERSION2 = new Version("17.2.0-next.0");
|
|
25648
25708
|
|
|
25649
25709
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25650
25710
|
var _VisitorMode;
|