@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
|
@@ -2470,6 +2470,15 @@ var Identifiers = _Identifiers;
|
|
|
2470
2470
|
(() => {
|
|
2471
2471
|
_Identifiers.contentQuery = { name: "\u0275\u0275contentQuery", moduleName: CORE };
|
|
2472
2472
|
})();
|
|
2473
|
+
(() => {
|
|
2474
|
+
_Identifiers.viewQuerySignal = { name: "\u0275\u0275viewQuerySignal", moduleName: CORE };
|
|
2475
|
+
})();
|
|
2476
|
+
(() => {
|
|
2477
|
+
_Identifiers.contentQuerySignal = { name: "\u0275\u0275contentQuerySignal", moduleName: CORE };
|
|
2478
|
+
})();
|
|
2479
|
+
(() => {
|
|
2480
|
+
_Identifiers.queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: CORE };
|
|
2481
|
+
})();
|
|
2473
2482
|
(() => {
|
|
2474
2483
|
_Identifiers.NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: CORE };
|
|
2475
2484
|
})();
|
|
@@ -4215,11 +4224,11 @@ var CHAINABLE_INSTRUCTIONS = /* @__PURE__ */ new Set([
|
|
|
4215
4224
|
function invokeInstruction(span, reference2, params) {
|
|
4216
4225
|
return importExpr(reference2, null, span).callFn(params, span);
|
|
4217
4226
|
}
|
|
4218
|
-
function temporaryAllocator(
|
|
4227
|
+
function temporaryAllocator(pushStatement, name) {
|
|
4219
4228
|
let temp = null;
|
|
4220
4229
|
return () => {
|
|
4221
4230
|
if (!temp) {
|
|
4222
|
-
|
|
4231
|
+
pushStatement(new DeclareVarStmt(TEMPORARY_NAME, void 0, DYNAMIC_TYPE));
|
|
4223
4232
|
temp = variable(name);
|
|
4224
4233
|
}
|
|
4225
4234
|
return temp;
|
|
@@ -4299,24 +4308,6 @@ function trimTrailingNulls(parameters) {
|
|
|
4299
4308
|
}
|
|
4300
4309
|
return parameters;
|
|
4301
4310
|
}
|
|
4302
|
-
function getQueryPredicate(query, constantPool) {
|
|
4303
|
-
if (Array.isArray(query.predicate)) {
|
|
4304
|
-
let predicate = [];
|
|
4305
|
-
query.predicate.forEach((selector) => {
|
|
4306
|
-
const selectors = selector.split(",").map((token) => literal(token.trim()));
|
|
4307
|
-
predicate.push(...selectors);
|
|
4308
|
-
});
|
|
4309
|
-
return constantPool.getConstLiteral(literalArr(predicate), true);
|
|
4310
|
-
} else {
|
|
4311
|
-
switch (query.predicate.forwardRef) {
|
|
4312
|
-
case 0:
|
|
4313
|
-
case 2:
|
|
4314
|
-
return query.predicate.expression;
|
|
4315
|
-
case 1:
|
|
4316
|
-
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
4317
|
-
}
|
|
4318
|
-
}
|
|
4319
|
-
}
|
|
4320
4311
|
var DefinitionMap = class {
|
|
4321
4312
|
constructor() {
|
|
4322
4313
|
this.values = [];
|
|
@@ -6581,6 +6572,7 @@ var animationKeywords = /* @__PURE__ */ new Set([
|
|
|
6581
6572
|
"jump-start",
|
|
6582
6573
|
"start"
|
|
6583
6574
|
]);
|
|
6575
|
+
var scopedAtRuleIdentifiers = ["@media", "@supports", "@document", "@layer", "@container", "@scope", "@starting-style"];
|
|
6584
6576
|
var ShadowCss = class {
|
|
6585
6577
|
constructor() {
|
|
6586
6578
|
this._animationDeclarationKeyframesRe = /(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
@@ -6715,7 +6707,7 @@ var ShadowCss = class {
|
|
|
6715
6707
|
let content = rule.content;
|
|
6716
6708
|
if (rule.selector[0] !== "@") {
|
|
6717
6709
|
selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector);
|
|
6718
|
-
} else if (
|
|
6710
|
+
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
6719
6711
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
6720
6712
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
6721
6713
|
content = this._stripScopingSelectors(rule.content);
|
|
@@ -19988,465 +19980,132 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19988
19980
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19989
19981
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19990
19982
|
|
|
19991
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/
|
|
19992
|
-
var
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
constructor(_directiveExpr) {
|
|
19996
|
-
this._directiveExpr = _directiveExpr;
|
|
19997
|
-
this._hasInitialValues = false;
|
|
19998
|
-
this.hasBindings = false;
|
|
19999
|
-
this.hasBindingsWithPipes = false;
|
|
20000
|
-
this._classMapInput = null;
|
|
20001
|
-
this._styleMapInput = null;
|
|
20002
|
-
this._singleStyleInputs = null;
|
|
20003
|
-
this._singleClassInputs = null;
|
|
20004
|
-
this._lastStylingInput = null;
|
|
20005
|
-
this._firstStylingInput = null;
|
|
20006
|
-
this._stylesIndex = /* @__PURE__ */ new Map();
|
|
20007
|
-
this._classesIndex = /* @__PURE__ */ new Map();
|
|
20008
|
-
this._initialStyleValues = [];
|
|
20009
|
-
this._initialClassValues = [];
|
|
19983
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19984
|
+
var HtmlParser = class extends Parser2 {
|
|
19985
|
+
constructor() {
|
|
19986
|
+
super(getHtmlTagDefinition);
|
|
20010
19987
|
}
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
let name = input.name;
|
|
20014
|
-
switch (input.type) {
|
|
20015
|
-
case 0:
|
|
20016
|
-
binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
|
|
20017
|
-
break;
|
|
20018
|
-
case 3:
|
|
20019
|
-
binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
|
|
20020
|
-
break;
|
|
20021
|
-
case 2:
|
|
20022
|
-
binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
|
|
20023
|
-
break;
|
|
20024
|
-
}
|
|
20025
|
-
return binding ? true : false;
|
|
19988
|
+
parse(source, url, options) {
|
|
19989
|
+
return super.parse(source, url, options);
|
|
20026
19990
|
}
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
|
|
20039
|
-
|
|
19991
|
+
};
|
|
19992
|
+
|
|
19993
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19994
|
+
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19995
|
+
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19996
|
+
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
19997
|
+
var NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);
|
|
19998
|
+
var WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, "g");
|
|
19999
|
+
function hasPreserveWhitespacesAttr(attrs) {
|
|
20000
|
+
return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);
|
|
20001
|
+
}
|
|
20002
|
+
function replaceNgsp(value) {
|
|
20003
|
+
return value.replace(new RegExp(NGSP_UNICODE, "g"), " ");
|
|
20004
|
+
}
|
|
20005
|
+
var WhitespaceVisitor = class {
|
|
20006
|
+
visitElement(element2, context) {
|
|
20007
|
+
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
20008
|
+
return new Element2(element2.name, visitAll2(this, element2.attrs), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20040
20009
|
}
|
|
20041
|
-
return
|
|
20010
|
+
return new Element2(element2.name, element2.attrs, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20042
20011
|
}
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
return null;
|
|
20046
|
-
}
|
|
20047
|
-
if (!isCssCustomProperty2(name)) {
|
|
20048
|
-
name = hyphenate2(name);
|
|
20049
|
-
}
|
|
20050
|
-
const { property: property2, hasOverrideFlag, suffix: bindingSuffix } = parseProperty2(name);
|
|
20051
|
-
suffix = typeof suffix === "string" && suffix.length !== 0 ? suffix : bindingSuffix;
|
|
20052
|
-
const entry = { name: property2, suffix, value, sourceSpan, hasOverrideFlag };
|
|
20053
|
-
if (isMapBased) {
|
|
20054
|
-
this._styleMapInput = entry;
|
|
20055
|
-
} else {
|
|
20056
|
-
(this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
|
|
20057
|
-
registerIntoMap(this._stylesIndex, property2);
|
|
20058
|
-
}
|
|
20059
|
-
this._lastStylingInput = entry;
|
|
20060
|
-
this._firstStylingInput = this._firstStylingInput || entry;
|
|
20061
|
-
this._checkForPipes(value);
|
|
20062
|
-
this.hasBindings = true;
|
|
20063
|
-
return entry;
|
|
20012
|
+
visitAttribute(attribute2, context) {
|
|
20013
|
+
return attribute2.name !== PRESERVE_WS_ATTR_NAME ? attribute2 : null;
|
|
20064
20014
|
}
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
this._classMapInput = entry;
|
|
20073
|
-
} else {
|
|
20074
|
-
(this._singleClassInputs = this._singleClassInputs || []).push(entry);
|
|
20075
|
-
registerIntoMap(this._classesIndex, property2);
|
|
20015
|
+
visitText(text2, context) {
|
|
20016
|
+
const isNotBlank = text2.value.match(NO_WS_REGEXP);
|
|
20017
|
+
const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);
|
|
20018
|
+
if (isNotBlank || hasExpansionSibling) {
|
|
20019
|
+
const tokens = text2.tokens.map((token) => token.type === 5 ? createWhitespaceProcessedTextToken(token) : token);
|
|
20020
|
+
const value = processWhitespace(text2.value);
|
|
20021
|
+
return new Text4(value, text2.sourceSpan, tokens, text2.i18n);
|
|
20076
20022
|
}
|
|
20077
|
-
|
|
20078
|
-
this._firstStylingInput = this._firstStylingInput || entry;
|
|
20079
|
-
this._checkForPipes(value);
|
|
20080
|
-
this.hasBindings = true;
|
|
20081
|
-
return entry;
|
|
20023
|
+
return null;
|
|
20082
20024
|
}
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
this.hasBindingsWithPipes = true;
|
|
20086
|
-
}
|
|
20025
|
+
visitComment(comment, context) {
|
|
20026
|
+
return comment;
|
|
20087
20027
|
}
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
this._hasInitialValues = true;
|
|
20028
|
+
visitExpansion(expansion, context) {
|
|
20029
|
+
return expansion;
|
|
20091
20030
|
}
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
this._hasInitialValues = true;
|
|
20031
|
+
visitExpansionCase(expansionCase, context) {
|
|
20032
|
+
return expansionCase;
|
|
20095
20033
|
}
|
|
20096
|
-
|
|
20097
|
-
|
|
20098
|
-
attrs.push(literal(1));
|
|
20099
|
-
for (let i = 0; i < this._initialClassValues.length; i++) {
|
|
20100
|
-
attrs.push(literal(this._initialClassValues[i]));
|
|
20101
|
-
}
|
|
20102
|
-
}
|
|
20103
|
-
if (this._initialStyleValues.length) {
|
|
20104
|
-
attrs.push(literal(2));
|
|
20105
|
-
for (let i = 0; i < this._initialStyleValues.length; i += 2) {
|
|
20106
|
-
attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
|
|
20107
|
-
}
|
|
20108
|
-
}
|
|
20034
|
+
visitBlock(block, context) {
|
|
20035
|
+
return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);
|
|
20109
20036
|
}
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20037
|
+
visitBlockParameter(parameter, context) {
|
|
20038
|
+
return parameter;
|
|
20039
|
+
}
|
|
20040
|
+
};
|
|
20041
|
+
function createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {
|
|
20042
|
+
return { type, parts: [processWhitespace(parts[0])], sourceSpan };
|
|
20043
|
+
}
|
|
20044
|
+
function processWhitespace(text2) {
|
|
20045
|
+
return replaceNgsp(text2).replace(WS_REPLACE_REGEXP, " ");
|
|
20046
|
+
}
|
|
20047
|
+
function visitAllWithSiblings(visitor, nodes) {
|
|
20048
|
+
const result = [];
|
|
20049
|
+
nodes.forEach((ast, i) => {
|
|
20050
|
+
const context = { prev: nodes[i - 1], next: nodes[i + 1] };
|
|
20051
|
+
const astResult = ast.visit(visitor, context);
|
|
20052
|
+
if (astResult) {
|
|
20053
|
+
result.push(astResult);
|
|
20114
20054
|
}
|
|
20055
|
+
});
|
|
20056
|
+
return result;
|
|
20057
|
+
}
|
|
20058
|
+
|
|
20059
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20060
|
+
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20061
|
+
var ATTRIBUTE_PREFIX = "attr";
|
|
20062
|
+
var CLASS_PREFIX = "class";
|
|
20063
|
+
var STYLE_PREFIX = "style";
|
|
20064
|
+
var TEMPLATE_ATTR_PREFIX = "*";
|
|
20065
|
+
var ANIMATE_PROP_PREFIX = "animate-";
|
|
20066
|
+
var BindingParser = class {
|
|
20067
|
+
constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {
|
|
20068
|
+
this._exprParser = _exprParser;
|
|
20069
|
+
this._interpolationConfig = _interpolationConfig;
|
|
20070
|
+
this._schemaRegistry = _schemaRegistry;
|
|
20071
|
+
this.errors = errors;
|
|
20115
20072
|
}
|
|
20116
|
-
|
|
20117
|
-
|
|
20118
|
-
|
|
20073
|
+
get interpolationConfig() {
|
|
20074
|
+
return this._interpolationConfig;
|
|
20075
|
+
}
|
|
20076
|
+
createBoundHostProperties(properties, sourceSpan) {
|
|
20077
|
+
const boundProps = [];
|
|
20078
|
+
for (const propName of Object.keys(properties)) {
|
|
20079
|
+
const expression = properties[propName];
|
|
20080
|
+
if (typeof expression === "string") {
|
|
20081
|
+
this.parsePropertyBinding(
|
|
20082
|
+
propName,
|
|
20083
|
+
expression,
|
|
20084
|
+
true,
|
|
20085
|
+
sourceSpan,
|
|
20086
|
+
sourceSpan.start.offset,
|
|
20087
|
+
void 0,
|
|
20088
|
+
[],
|
|
20089
|
+
boundProps,
|
|
20090
|
+
sourceSpan
|
|
20091
|
+
);
|
|
20092
|
+
} else {
|
|
20093
|
+
this._reportError(`Value of the host property binding "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20094
|
+
}
|
|
20119
20095
|
}
|
|
20120
|
-
return
|
|
20096
|
+
return boundProps;
|
|
20121
20097
|
}
|
|
20122
|
-
|
|
20123
|
-
|
|
20124
|
-
|
|
20098
|
+
createDirectiveHostEventAsts(hostListeners, sourceSpan) {
|
|
20099
|
+
const targetEvents = [];
|
|
20100
|
+
for (const propName of Object.keys(hostListeners)) {
|
|
20101
|
+
const expression = hostListeners[propName];
|
|
20102
|
+
if (typeof expression === "string") {
|
|
20103
|
+
this.parseEvent(propName, expression, false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
|
|
20104
|
+
} else {
|
|
20105
|
+
this._reportError(`Value of the host listener "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20106
|
+
}
|
|
20125
20107
|
}
|
|
20126
|
-
return
|
|
20127
|
-
}
|
|
20128
|
-
_buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {
|
|
20129
|
-
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
20130
|
-
const mapValue = stylingInput.value.visit(valueConverter);
|
|
20131
|
-
let reference2;
|
|
20132
|
-
if (mapValue instanceof Interpolation) {
|
|
20133
|
-
totalBindingSlotsRequired += mapValue.expressions.length;
|
|
20134
|
-
reference2 = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);
|
|
20135
|
-
} else {
|
|
20136
|
-
reference2 = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
20137
|
-
}
|
|
20138
|
-
return {
|
|
20139
|
-
reference: reference2,
|
|
20140
|
-
calls: [{
|
|
20141
|
-
supportsInterpolation: true,
|
|
20142
|
-
sourceSpan: stylingInput.sourceSpan,
|
|
20143
|
-
allocateBindingSlots: totalBindingSlotsRequired,
|
|
20144
|
-
params: (convertFn) => {
|
|
20145
|
-
const convertResult = convertFn(mapValue);
|
|
20146
|
-
const params = Array.isArray(convertResult) ? convertResult : [convertResult];
|
|
20147
|
-
return params;
|
|
20148
|
-
}
|
|
20149
|
-
}]
|
|
20150
|
-
};
|
|
20151
|
-
}
|
|
20152
|
-
_buildSingleInputs(reference2, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {
|
|
20153
|
-
const instructions = [];
|
|
20154
|
-
inputs.forEach((input) => {
|
|
20155
|
-
const previousInstruction = instructions[instructions.length - 1];
|
|
20156
|
-
const value = input.value.visit(valueConverter);
|
|
20157
|
-
let referenceForCall = reference2;
|
|
20158
|
-
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
20159
|
-
if (value instanceof Interpolation) {
|
|
20160
|
-
totalBindingSlotsRequired += value.expressions.length;
|
|
20161
|
-
if (getInterpolationExpressionFn) {
|
|
20162
|
-
referenceForCall = getInterpolationExpressionFn(value);
|
|
20163
|
-
}
|
|
20164
|
-
}
|
|
20165
|
-
const call2 = {
|
|
20166
|
-
sourceSpan: input.sourceSpan,
|
|
20167
|
-
allocateBindingSlots: totalBindingSlotsRequired,
|
|
20168
|
-
supportsInterpolation: !!getInterpolationExpressionFn,
|
|
20169
|
-
params: (convertFn) => {
|
|
20170
|
-
const params = [];
|
|
20171
|
-
params.push(literal(input.name));
|
|
20172
|
-
const convertResult = convertFn(value);
|
|
20173
|
-
if (Array.isArray(convertResult)) {
|
|
20174
|
-
params.push(...convertResult);
|
|
20175
|
-
} else {
|
|
20176
|
-
params.push(convertResult);
|
|
20177
|
-
}
|
|
20178
|
-
if (!isClassBased && input.suffix !== null) {
|
|
20179
|
-
params.push(literal(input.suffix));
|
|
20180
|
-
}
|
|
20181
|
-
return params;
|
|
20182
|
-
}
|
|
20183
|
-
};
|
|
20184
|
-
if (previousInstruction && previousInstruction.reference === referenceForCall) {
|
|
20185
|
-
previousInstruction.calls.push(call2);
|
|
20186
|
-
} else {
|
|
20187
|
-
instructions.push({ reference: referenceForCall, calls: [call2] });
|
|
20188
|
-
}
|
|
20189
|
-
});
|
|
20190
|
-
return instructions;
|
|
20191
|
-
}
|
|
20192
|
-
_buildClassInputs(valueConverter) {
|
|
20193
|
-
if (this._singleClassInputs) {
|
|
20194
|
-
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
20195
|
-
}
|
|
20196
|
-
return [];
|
|
20197
|
-
}
|
|
20198
|
-
_buildStyleInputs(valueConverter) {
|
|
20199
|
-
if (this._singleStyleInputs) {
|
|
20200
|
-
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
20201
|
-
}
|
|
20202
|
-
return [];
|
|
20203
|
-
}
|
|
20204
|
-
buildUpdateLevelInstructions(valueConverter) {
|
|
20205
|
-
const instructions = [];
|
|
20206
|
-
if (this.hasBindings) {
|
|
20207
|
-
const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);
|
|
20208
|
-
if (styleMapInstruction) {
|
|
20209
|
-
instructions.push(styleMapInstruction);
|
|
20210
|
-
}
|
|
20211
|
-
const classMapInstruction = this.buildClassMapInstruction(valueConverter);
|
|
20212
|
-
if (classMapInstruction) {
|
|
20213
|
-
instructions.push(classMapInstruction);
|
|
20214
|
-
}
|
|
20215
|
-
instructions.push(...this._buildStyleInputs(valueConverter));
|
|
20216
|
-
instructions.push(...this._buildClassInputs(valueConverter));
|
|
20217
|
-
}
|
|
20218
|
-
return instructions;
|
|
20219
|
-
}
|
|
20220
|
-
};
|
|
20221
|
-
function registerIntoMap(map, key) {
|
|
20222
|
-
if (!map.has(key)) {
|
|
20223
|
-
map.set(key, map.size);
|
|
20224
|
-
}
|
|
20225
|
-
}
|
|
20226
|
-
function parseProperty2(name) {
|
|
20227
|
-
let hasOverrideFlag = false;
|
|
20228
|
-
const overrideIndex = name.indexOf(IMPORTANT_FLAG);
|
|
20229
|
-
if (overrideIndex !== -1) {
|
|
20230
|
-
name = overrideIndex > 0 ? name.substring(0, overrideIndex) : "";
|
|
20231
|
-
hasOverrideFlag = true;
|
|
20232
|
-
}
|
|
20233
|
-
let suffix = null;
|
|
20234
|
-
let property2 = name;
|
|
20235
|
-
const unitIndex = name.lastIndexOf(".");
|
|
20236
|
-
if (unitIndex > 0) {
|
|
20237
|
-
suffix = name.slice(unitIndex + 1);
|
|
20238
|
-
property2 = name.substring(0, unitIndex);
|
|
20239
|
-
}
|
|
20240
|
-
return { property: property2, suffix, hasOverrideFlag };
|
|
20241
|
-
}
|
|
20242
|
-
function getClassMapInterpolationExpression(interpolation) {
|
|
20243
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20244
|
-
case 1:
|
|
20245
|
-
return Identifiers.classMap;
|
|
20246
|
-
case 3:
|
|
20247
|
-
return Identifiers.classMapInterpolate1;
|
|
20248
|
-
case 5:
|
|
20249
|
-
return Identifiers.classMapInterpolate2;
|
|
20250
|
-
case 7:
|
|
20251
|
-
return Identifiers.classMapInterpolate3;
|
|
20252
|
-
case 9:
|
|
20253
|
-
return Identifiers.classMapInterpolate4;
|
|
20254
|
-
case 11:
|
|
20255
|
-
return Identifiers.classMapInterpolate5;
|
|
20256
|
-
case 13:
|
|
20257
|
-
return Identifiers.classMapInterpolate6;
|
|
20258
|
-
case 15:
|
|
20259
|
-
return Identifiers.classMapInterpolate7;
|
|
20260
|
-
case 17:
|
|
20261
|
-
return Identifiers.classMapInterpolate8;
|
|
20262
|
-
default:
|
|
20263
|
-
return Identifiers.classMapInterpolateV;
|
|
20264
|
-
}
|
|
20265
|
-
}
|
|
20266
|
-
function getStyleMapInterpolationExpression(interpolation) {
|
|
20267
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20268
|
-
case 1:
|
|
20269
|
-
return Identifiers.styleMap;
|
|
20270
|
-
case 3:
|
|
20271
|
-
return Identifiers.styleMapInterpolate1;
|
|
20272
|
-
case 5:
|
|
20273
|
-
return Identifiers.styleMapInterpolate2;
|
|
20274
|
-
case 7:
|
|
20275
|
-
return Identifiers.styleMapInterpolate3;
|
|
20276
|
-
case 9:
|
|
20277
|
-
return Identifiers.styleMapInterpolate4;
|
|
20278
|
-
case 11:
|
|
20279
|
-
return Identifiers.styleMapInterpolate5;
|
|
20280
|
-
case 13:
|
|
20281
|
-
return Identifiers.styleMapInterpolate6;
|
|
20282
|
-
case 15:
|
|
20283
|
-
return Identifiers.styleMapInterpolate7;
|
|
20284
|
-
case 17:
|
|
20285
|
-
return Identifiers.styleMapInterpolate8;
|
|
20286
|
-
default:
|
|
20287
|
-
return Identifiers.styleMapInterpolateV;
|
|
20288
|
-
}
|
|
20289
|
-
}
|
|
20290
|
-
function getStylePropInterpolationExpression(interpolation) {
|
|
20291
|
-
switch (getInterpolationArgsLength(interpolation)) {
|
|
20292
|
-
case 1:
|
|
20293
|
-
return Identifiers.styleProp;
|
|
20294
|
-
case 3:
|
|
20295
|
-
return Identifiers.stylePropInterpolate1;
|
|
20296
|
-
case 5:
|
|
20297
|
-
return Identifiers.stylePropInterpolate2;
|
|
20298
|
-
case 7:
|
|
20299
|
-
return Identifiers.stylePropInterpolate3;
|
|
20300
|
-
case 9:
|
|
20301
|
-
return Identifiers.stylePropInterpolate4;
|
|
20302
|
-
case 11:
|
|
20303
|
-
return Identifiers.stylePropInterpolate5;
|
|
20304
|
-
case 13:
|
|
20305
|
-
return Identifiers.stylePropInterpolate6;
|
|
20306
|
-
case 15:
|
|
20307
|
-
return Identifiers.stylePropInterpolate7;
|
|
20308
|
-
case 17:
|
|
20309
|
-
return Identifiers.stylePropInterpolate8;
|
|
20310
|
-
default:
|
|
20311
|
-
return Identifiers.stylePropInterpolateV;
|
|
20312
|
-
}
|
|
20313
|
-
}
|
|
20314
|
-
function isCssCustomProperty2(name) {
|
|
20315
|
-
return name.startsWith("--");
|
|
20316
|
-
}
|
|
20317
|
-
function isEmptyExpression(ast) {
|
|
20318
|
-
if (ast instanceof ASTWithSource) {
|
|
20319
|
-
ast = ast.ast;
|
|
20320
|
-
}
|
|
20321
|
-
return ast instanceof EmptyExpr;
|
|
20322
|
-
}
|
|
20323
|
-
|
|
20324
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20325
|
-
var HtmlParser = class extends Parser2 {
|
|
20326
|
-
constructor() {
|
|
20327
|
-
super(getHtmlTagDefinition);
|
|
20328
|
-
}
|
|
20329
|
-
parse(source, url, options) {
|
|
20330
|
-
return super.parse(source, url, options);
|
|
20331
|
-
}
|
|
20332
|
-
};
|
|
20333
|
-
|
|
20334
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20335
|
-
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20336
|
-
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20337
|
-
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
20338
|
-
var NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`);
|
|
20339
|
-
var WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, "g");
|
|
20340
|
-
function hasPreserveWhitespacesAttr(attrs) {
|
|
20341
|
-
return attrs.some((attr) => attr.name === PRESERVE_WS_ATTR_NAME);
|
|
20342
|
-
}
|
|
20343
|
-
function replaceNgsp(value) {
|
|
20344
|
-
return value.replace(new RegExp(NGSP_UNICODE, "g"), " ");
|
|
20345
|
-
}
|
|
20346
|
-
var WhitespaceVisitor = class {
|
|
20347
|
-
visitElement(element2, context) {
|
|
20348
|
-
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
20349
|
-
return new Element2(element2.name, visitAll2(this, element2.attrs), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20350
|
-
}
|
|
20351
|
-
return new Element2(element2.name, element2.attrs, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
|
|
20352
|
-
}
|
|
20353
|
-
visitAttribute(attribute2, context) {
|
|
20354
|
-
return attribute2.name !== PRESERVE_WS_ATTR_NAME ? attribute2 : null;
|
|
20355
|
-
}
|
|
20356
|
-
visitText(text2, context) {
|
|
20357
|
-
const isNotBlank = text2.value.match(NO_WS_REGEXP);
|
|
20358
|
-
const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);
|
|
20359
|
-
if (isNotBlank || hasExpansionSibling) {
|
|
20360
|
-
const tokens = text2.tokens.map((token) => token.type === 5 ? createWhitespaceProcessedTextToken(token) : token);
|
|
20361
|
-
const value = processWhitespace(text2.value);
|
|
20362
|
-
return new Text4(value, text2.sourceSpan, tokens, text2.i18n);
|
|
20363
|
-
}
|
|
20364
|
-
return null;
|
|
20365
|
-
}
|
|
20366
|
-
visitComment(comment, context) {
|
|
20367
|
-
return comment;
|
|
20368
|
-
}
|
|
20369
|
-
visitExpansion(expansion, context) {
|
|
20370
|
-
return expansion;
|
|
20371
|
-
}
|
|
20372
|
-
visitExpansionCase(expansionCase, context) {
|
|
20373
|
-
return expansionCase;
|
|
20374
|
-
}
|
|
20375
|
-
visitBlock(block, context) {
|
|
20376
|
-
return new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan);
|
|
20377
|
-
}
|
|
20378
|
-
visitBlockParameter(parameter, context) {
|
|
20379
|
-
return parameter;
|
|
20380
|
-
}
|
|
20381
|
-
};
|
|
20382
|
-
function createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {
|
|
20383
|
-
return { type, parts: [processWhitespace(parts[0])], sourceSpan };
|
|
20384
|
-
}
|
|
20385
|
-
function processWhitespace(text2) {
|
|
20386
|
-
return replaceNgsp(text2).replace(WS_REPLACE_REGEXP, " ");
|
|
20387
|
-
}
|
|
20388
|
-
function visitAllWithSiblings(visitor, nodes) {
|
|
20389
|
-
const result = [];
|
|
20390
|
-
nodes.forEach((ast, i) => {
|
|
20391
|
-
const context = { prev: nodes[i - 1], next: nodes[i + 1] };
|
|
20392
|
-
const astResult = ast.visit(visitor, context);
|
|
20393
|
-
if (astResult) {
|
|
20394
|
-
result.push(astResult);
|
|
20395
|
-
}
|
|
20396
|
-
});
|
|
20397
|
-
return result;
|
|
20398
|
-
}
|
|
20399
|
-
|
|
20400
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20401
|
-
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20402
|
-
var ATTRIBUTE_PREFIX = "attr";
|
|
20403
|
-
var CLASS_PREFIX = "class";
|
|
20404
|
-
var STYLE_PREFIX = "style";
|
|
20405
|
-
var TEMPLATE_ATTR_PREFIX = "*";
|
|
20406
|
-
var ANIMATE_PROP_PREFIX = "animate-";
|
|
20407
|
-
var BindingParser = class {
|
|
20408
|
-
constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {
|
|
20409
|
-
this._exprParser = _exprParser;
|
|
20410
|
-
this._interpolationConfig = _interpolationConfig;
|
|
20411
|
-
this._schemaRegistry = _schemaRegistry;
|
|
20412
|
-
this.errors = errors;
|
|
20413
|
-
}
|
|
20414
|
-
get interpolationConfig() {
|
|
20415
|
-
return this._interpolationConfig;
|
|
20416
|
-
}
|
|
20417
|
-
createBoundHostProperties(properties, sourceSpan) {
|
|
20418
|
-
const boundProps = [];
|
|
20419
|
-
for (const propName of Object.keys(properties)) {
|
|
20420
|
-
const expression = properties[propName];
|
|
20421
|
-
if (typeof expression === "string") {
|
|
20422
|
-
this.parsePropertyBinding(
|
|
20423
|
-
propName,
|
|
20424
|
-
expression,
|
|
20425
|
-
true,
|
|
20426
|
-
sourceSpan,
|
|
20427
|
-
sourceSpan.start.offset,
|
|
20428
|
-
void 0,
|
|
20429
|
-
[],
|
|
20430
|
-
boundProps,
|
|
20431
|
-
sourceSpan
|
|
20432
|
-
);
|
|
20433
|
-
} else {
|
|
20434
|
-
this._reportError(`Value of the host property binding "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20435
|
-
}
|
|
20436
|
-
}
|
|
20437
|
-
return boundProps;
|
|
20438
|
-
}
|
|
20439
|
-
createDirectiveHostEventAsts(hostListeners, sourceSpan) {
|
|
20440
|
-
const targetEvents = [];
|
|
20441
|
-
for (const propName of Object.keys(hostListeners)) {
|
|
20442
|
-
const expression = hostListeners[propName];
|
|
20443
|
-
if (typeof expression === "string") {
|
|
20444
|
-
this.parseEvent(propName, expression, false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
|
|
20445
|
-
} else {
|
|
20446
|
-
this._reportError(`Value of the host listener "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
|
|
20447
|
-
}
|
|
20448
|
-
}
|
|
20449
|
-
return targetEvents;
|
|
20108
|
+
return targetEvents;
|
|
20450
20109
|
}
|
|
20451
20110
|
parseInterpolation(value, sourceSpan, interpolatedTokens) {
|
|
20452
20111
|
const sourceInfo = sourceSpan.start.toString();
|
|
@@ -22028,38 +21687,371 @@ var I18nContext = class {
|
|
|
22028
21687
|
} else {
|
|
22029
21688
|
phs.push(...values);
|
|
22030
21689
|
}
|
|
22031
|
-
this.placeholders.set(key, phs);
|
|
22032
|
-
});
|
|
22033
|
-
this._unresolvedCtxCount--;
|
|
21690
|
+
this.placeholders.set(key, phs);
|
|
21691
|
+
});
|
|
21692
|
+
this._unresolvedCtxCount--;
|
|
21693
|
+
}
|
|
21694
|
+
};
|
|
21695
|
+
function wrap(symbol, index, contextId, closed) {
|
|
21696
|
+
const state = closed ? "/" : "";
|
|
21697
|
+
return wrapI18nPlaceholder(`${state}${symbol}${index}`, contextId);
|
|
21698
|
+
}
|
|
21699
|
+
function wrapTag(symbol, { index, ctx, isVoid }, closed) {
|
|
21700
|
+
return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) : wrap(symbol, index, ctx, closed);
|
|
21701
|
+
}
|
|
21702
|
+
function findTemplateFn(ctx, templateIndex) {
|
|
21703
|
+
return (token) => typeof token === "object" && token.type === TagType.TEMPLATE && token.index === templateIndex && token.ctx === ctx;
|
|
21704
|
+
}
|
|
21705
|
+
function serializePlaceholderValue(value) {
|
|
21706
|
+
const element2 = (data, closed) => wrapTag("#", data, closed);
|
|
21707
|
+
const template2 = (data, closed) => wrapTag("*", data, closed);
|
|
21708
|
+
switch (value.type) {
|
|
21709
|
+
case TagType.ELEMENT:
|
|
21710
|
+
if (value.closed) {
|
|
21711
|
+
return element2(value, true) + (value.tmpl ? template2(value.tmpl, true) : "");
|
|
21712
|
+
}
|
|
21713
|
+
if (value.tmpl) {
|
|
21714
|
+
return template2(value.tmpl) + element2(value) + (value.isVoid ? template2(value.tmpl, true) : "");
|
|
21715
|
+
}
|
|
21716
|
+
return element2(value);
|
|
21717
|
+
case TagType.TEMPLATE:
|
|
21718
|
+
return template2(value, value.closed);
|
|
21719
|
+
default:
|
|
21720
|
+
return value;
|
|
21721
|
+
}
|
|
21722
|
+
}
|
|
21723
|
+
|
|
21724
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
21725
|
+
var IMPORTANT_FLAG = "!important";
|
|
21726
|
+
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
21727
|
+
var StylingBuilder = class {
|
|
21728
|
+
constructor(_directiveExpr) {
|
|
21729
|
+
this._directiveExpr = _directiveExpr;
|
|
21730
|
+
this._hasInitialValues = false;
|
|
21731
|
+
this.hasBindings = false;
|
|
21732
|
+
this.hasBindingsWithPipes = false;
|
|
21733
|
+
this._classMapInput = null;
|
|
21734
|
+
this._styleMapInput = null;
|
|
21735
|
+
this._singleStyleInputs = null;
|
|
21736
|
+
this._singleClassInputs = null;
|
|
21737
|
+
this._lastStylingInput = null;
|
|
21738
|
+
this._firstStylingInput = null;
|
|
21739
|
+
this._stylesIndex = /* @__PURE__ */ new Map();
|
|
21740
|
+
this._classesIndex = /* @__PURE__ */ new Map();
|
|
21741
|
+
this._initialStyleValues = [];
|
|
21742
|
+
this._initialClassValues = [];
|
|
21743
|
+
}
|
|
21744
|
+
registerBoundInput(input) {
|
|
21745
|
+
let binding = null;
|
|
21746
|
+
let name = input.name;
|
|
21747
|
+
switch (input.type) {
|
|
21748
|
+
case 0:
|
|
21749
|
+
binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
|
|
21750
|
+
break;
|
|
21751
|
+
case 3:
|
|
21752
|
+
binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
|
|
21753
|
+
break;
|
|
21754
|
+
case 2:
|
|
21755
|
+
binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
|
|
21756
|
+
break;
|
|
21757
|
+
}
|
|
21758
|
+
return binding ? true : false;
|
|
21759
|
+
}
|
|
21760
|
+
registerInputBasedOnName(name, expression, sourceSpan) {
|
|
21761
|
+
let binding = null;
|
|
21762
|
+
const prefix = name.substring(0, 6);
|
|
21763
|
+
const isStyle = name === "style" || prefix === "style." || prefix === "style!";
|
|
21764
|
+
const isClass = !isStyle && (name === "class" || prefix === "class." || prefix === "class!");
|
|
21765
|
+
if (isStyle || isClass) {
|
|
21766
|
+
const isMapBased = name.charAt(5) !== ".";
|
|
21767
|
+
const property2 = name.slice(isMapBased ? 5 : 6);
|
|
21768
|
+
if (isStyle) {
|
|
21769
|
+
binding = this.registerStyleInput(property2, isMapBased, expression, sourceSpan);
|
|
21770
|
+
} else {
|
|
21771
|
+
binding = this.registerClassInput(property2, isMapBased, expression, sourceSpan);
|
|
21772
|
+
}
|
|
21773
|
+
}
|
|
21774
|
+
return binding;
|
|
21775
|
+
}
|
|
21776
|
+
registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {
|
|
21777
|
+
if (isEmptyExpression(value)) {
|
|
21778
|
+
return null;
|
|
21779
|
+
}
|
|
21780
|
+
if (!isCssCustomProperty2(name)) {
|
|
21781
|
+
name = hyphenate2(name);
|
|
21782
|
+
}
|
|
21783
|
+
const { property: property2, hasOverrideFlag, suffix: bindingSuffix } = parseProperty2(name);
|
|
21784
|
+
suffix = typeof suffix === "string" && suffix.length !== 0 ? suffix : bindingSuffix;
|
|
21785
|
+
const entry = { name: property2, suffix, value, sourceSpan, hasOverrideFlag };
|
|
21786
|
+
if (isMapBased) {
|
|
21787
|
+
this._styleMapInput = entry;
|
|
21788
|
+
} else {
|
|
21789
|
+
(this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
|
|
21790
|
+
registerIntoMap(this._stylesIndex, property2);
|
|
21791
|
+
}
|
|
21792
|
+
this._lastStylingInput = entry;
|
|
21793
|
+
this._firstStylingInput = this._firstStylingInput || entry;
|
|
21794
|
+
this._checkForPipes(value);
|
|
21795
|
+
this.hasBindings = true;
|
|
21796
|
+
return entry;
|
|
21797
|
+
}
|
|
21798
|
+
registerClassInput(name, isMapBased, value, sourceSpan) {
|
|
21799
|
+
if (isEmptyExpression(value)) {
|
|
21800
|
+
return null;
|
|
21801
|
+
}
|
|
21802
|
+
const { property: property2, hasOverrideFlag } = parseProperty2(name);
|
|
21803
|
+
const entry = { name: property2, value, sourceSpan, hasOverrideFlag, suffix: null };
|
|
21804
|
+
if (isMapBased) {
|
|
21805
|
+
this._classMapInput = entry;
|
|
21806
|
+
} else {
|
|
21807
|
+
(this._singleClassInputs = this._singleClassInputs || []).push(entry);
|
|
21808
|
+
registerIntoMap(this._classesIndex, property2);
|
|
21809
|
+
}
|
|
21810
|
+
this._lastStylingInput = entry;
|
|
21811
|
+
this._firstStylingInput = this._firstStylingInput || entry;
|
|
21812
|
+
this._checkForPipes(value);
|
|
21813
|
+
this.hasBindings = true;
|
|
21814
|
+
return entry;
|
|
21815
|
+
}
|
|
21816
|
+
_checkForPipes(value) {
|
|
21817
|
+
if (value instanceof ASTWithSource && value.ast instanceof BindingPipe) {
|
|
21818
|
+
this.hasBindingsWithPipes = true;
|
|
21819
|
+
}
|
|
21820
|
+
}
|
|
21821
|
+
registerStyleAttr(value) {
|
|
21822
|
+
this._initialStyleValues = parse(value);
|
|
21823
|
+
this._hasInitialValues = true;
|
|
21824
|
+
}
|
|
21825
|
+
registerClassAttr(value) {
|
|
21826
|
+
this._initialClassValues = value.trim().split(/\s+/g);
|
|
21827
|
+
this._hasInitialValues = true;
|
|
21828
|
+
}
|
|
21829
|
+
populateInitialStylingAttrs(attrs) {
|
|
21830
|
+
if (this._initialClassValues.length) {
|
|
21831
|
+
attrs.push(literal(1));
|
|
21832
|
+
for (let i = 0; i < this._initialClassValues.length; i++) {
|
|
21833
|
+
attrs.push(literal(this._initialClassValues[i]));
|
|
21834
|
+
}
|
|
21835
|
+
}
|
|
21836
|
+
if (this._initialStyleValues.length) {
|
|
21837
|
+
attrs.push(literal(2));
|
|
21838
|
+
for (let i = 0; i < this._initialStyleValues.length; i += 2) {
|
|
21839
|
+
attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
|
|
21840
|
+
}
|
|
21841
|
+
}
|
|
21842
|
+
}
|
|
21843
|
+
assignHostAttrs(attrs, definitionMap) {
|
|
21844
|
+
if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {
|
|
21845
|
+
this.populateInitialStylingAttrs(attrs);
|
|
21846
|
+
definitionMap.set("hostAttrs", literalArr(attrs));
|
|
21847
|
+
}
|
|
21848
|
+
}
|
|
21849
|
+
buildClassMapInstruction(valueConverter) {
|
|
21850
|
+
if (this._classMapInput) {
|
|
21851
|
+
return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);
|
|
21852
|
+
}
|
|
21853
|
+
return null;
|
|
21854
|
+
}
|
|
21855
|
+
buildStyleMapInstruction(valueConverter) {
|
|
21856
|
+
if (this._styleMapInput) {
|
|
21857
|
+
return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);
|
|
21858
|
+
}
|
|
21859
|
+
return null;
|
|
21860
|
+
}
|
|
21861
|
+
_buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {
|
|
21862
|
+
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
21863
|
+
const mapValue = stylingInput.value.visit(valueConverter);
|
|
21864
|
+
let reference2;
|
|
21865
|
+
if (mapValue instanceof Interpolation) {
|
|
21866
|
+
totalBindingSlotsRequired += mapValue.expressions.length;
|
|
21867
|
+
reference2 = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);
|
|
21868
|
+
} else {
|
|
21869
|
+
reference2 = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
21870
|
+
}
|
|
21871
|
+
return {
|
|
21872
|
+
reference: reference2,
|
|
21873
|
+
calls: [{
|
|
21874
|
+
supportsInterpolation: true,
|
|
21875
|
+
sourceSpan: stylingInput.sourceSpan,
|
|
21876
|
+
allocateBindingSlots: totalBindingSlotsRequired,
|
|
21877
|
+
params: (convertFn) => {
|
|
21878
|
+
const convertResult = convertFn(mapValue);
|
|
21879
|
+
const params = Array.isArray(convertResult) ? convertResult : [convertResult];
|
|
21880
|
+
return params;
|
|
21881
|
+
}
|
|
21882
|
+
}]
|
|
21883
|
+
};
|
|
21884
|
+
}
|
|
21885
|
+
_buildSingleInputs(reference2, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {
|
|
21886
|
+
const instructions = [];
|
|
21887
|
+
inputs.forEach((input) => {
|
|
21888
|
+
const previousInstruction = instructions[instructions.length - 1];
|
|
21889
|
+
const value = input.value.visit(valueConverter);
|
|
21890
|
+
let referenceForCall = reference2;
|
|
21891
|
+
let totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;
|
|
21892
|
+
if (value instanceof Interpolation) {
|
|
21893
|
+
totalBindingSlotsRequired += value.expressions.length;
|
|
21894
|
+
if (getInterpolationExpressionFn) {
|
|
21895
|
+
referenceForCall = getInterpolationExpressionFn(value);
|
|
21896
|
+
}
|
|
21897
|
+
}
|
|
21898
|
+
const call2 = {
|
|
21899
|
+
sourceSpan: input.sourceSpan,
|
|
21900
|
+
allocateBindingSlots: totalBindingSlotsRequired,
|
|
21901
|
+
supportsInterpolation: !!getInterpolationExpressionFn,
|
|
21902
|
+
params: (convertFn) => {
|
|
21903
|
+
const params = [];
|
|
21904
|
+
params.push(literal(input.name));
|
|
21905
|
+
const convertResult = convertFn(value);
|
|
21906
|
+
if (Array.isArray(convertResult)) {
|
|
21907
|
+
params.push(...convertResult);
|
|
21908
|
+
} else {
|
|
21909
|
+
params.push(convertResult);
|
|
21910
|
+
}
|
|
21911
|
+
if (!isClassBased && input.suffix !== null) {
|
|
21912
|
+
params.push(literal(input.suffix));
|
|
21913
|
+
}
|
|
21914
|
+
return params;
|
|
21915
|
+
}
|
|
21916
|
+
};
|
|
21917
|
+
if (previousInstruction && previousInstruction.reference === referenceForCall) {
|
|
21918
|
+
previousInstruction.calls.push(call2);
|
|
21919
|
+
} else {
|
|
21920
|
+
instructions.push({ reference: referenceForCall, calls: [call2] });
|
|
21921
|
+
}
|
|
21922
|
+
});
|
|
21923
|
+
return instructions;
|
|
21924
|
+
}
|
|
21925
|
+
_buildClassInputs(valueConverter) {
|
|
21926
|
+
if (this._singleClassInputs) {
|
|
21927
|
+
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
21928
|
+
}
|
|
21929
|
+
return [];
|
|
21930
|
+
}
|
|
21931
|
+
_buildStyleInputs(valueConverter) {
|
|
21932
|
+
if (this._singleStyleInputs) {
|
|
21933
|
+
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
21934
|
+
}
|
|
21935
|
+
return [];
|
|
21936
|
+
}
|
|
21937
|
+
buildUpdateLevelInstructions(valueConverter) {
|
|
21938
|
+
const instructions = [];
|
|
21939
|
+
if (this.hasBindings) {
|
|
21940
|
+
const styleMapInstruction = this.buildStyleMapInstruction(valueConverter);
|
|
21941
|
+
if (styleMapInstruction) {
|
|
21942
|
+
instructions.push(styleMapInstruction);
|
|
21943
|
+
}
|
|
21944
|
+
const classMapInstruction = this.buildClassMapInstruction(valueConverter);
|
|
21945
|
+
if (classMapInstruction) {
|
|
21946
|
+
instructions.push(classMapInstruction);
|
|
21947
|
+
}
|
|
21948
|
+
instructions.push(...this._buildStyleInputs(valueConverter));
|
|
21949
|
+
instructions.push(...this._buildClassInputs(valueConverter));
|
|
21950
|
+
}
|
|
21951
|
+
return instructions;
|
|
22034
21952
|
}
|
|
22035
21953
|
};
|
|
22036
|
-
function
|
|
22037
|
-
|
|
22038
|
-
|
|
21954
|
+
function registerIntoMap(map, key) {
|
|
21955
|
+
if (!map.has(key)) {
|
|
21956
|
+
map.set(key, map.size);
|
|
21957
|
+
}
|
|
22039
21958
|
}
|
|
22040
|
-
function
|
|
22041
|
-
|
|
21959
|
+
function parseProperty2(name) {
|
|
21960
|
+
let hasOverrideFlag = false;
|
|
21961
|
+
const overrideIndex = name.indexOf(IMPORTANT_FLAG);
|
|
21962
|
+
if (overrideIndex !== -1) {
|
|
21963
|
+
name = overrideIndex > 0 ? name.substring(0, overrideIndex) : "";
|
|
21964
|
+
hasOverrideFlag = true;
|
|
21965
|
+
}
|
|
21966
|
+
let suffix = null;
|
|
21967
|
+
let property2 = name;
|
|
21968
|
+
const unitIndex = name.lastIndexOf(".");
|
|
21969
|
+
if (unitIndex > 0) {
|
|
21970
|
+
suffix = name.slice(unitIndex + 1);
|
|
21971
|
+
property2 = name.substring(0, unitIndex);
|
|
21972
|
+
}
|
|
21973
|
+
return { property: property2, suffix, hasOverrideFlag };
|
|
22042
21974
|
}
|
|
22043
|
-
function
|
|
22044
|
-
|
|
21975
|
+
function getClassMapInterpolationExpression(interpolation) {
|
|
21976
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
21977
|
+
case 1:
|
|
21978
|
+
return Identifiers.classMap;
|
|
21979
|
+
case 3:
|
|
21980
|
+
return Identifiers.classMapInterpolate1;
|
|
21981
|
+
case 5:
|
|
21982
|
+
return Identifiers.classMapInterpolate2;
|
|
21983
|
+
case 7:
|
|
21984
|
+
return Identifiers.classMapInterpolate3;
|
|
21985
|
+
case 9:
|
|
21986
|
+
return Identifiers.classMapInterpolate4;
|
|
21987
|
+
case 11:
|
|
21988
|
+
return Identifiers.classMapInterpolate5;
|
|
21989
|
+
case 13:
|
|
21990
|
+
return Identifiers.classMapInterpolate6;
|
|
21991
|
+
case 15:
|
|
21992
|
+
return Identifiers.classMapInterpolate7;
|
|
21993
|
+
case 17:
|
|
21994
|
+
return Identifiers.classMapInterpolate8;
|
|
21995
|
+
default:
|
|
21996
|
+
return Identifiers.classMapInterpolateV;
|
|
21997
|
+
}
|
|
22045
21998
|
}
|
|
22046
|
-
function
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
|
|
22050
|
-
case
|
|
22051
|
-
|
|
22052
|
-
|
|
22053
|
-
|
|
22054
|
-
|
|
22055
|
-
|
|
22056
|
-
|
|
22057
|
-
return
|
|
22058
|
-
case
|
|
22059
|
-
return
|
|
21999
|
+
function getStyleMapInterpolationExpression(interpolation) {
|
|
22000
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
22001
|
+
case 1:
|
|
22002
|
+
return Identifiers.styleMap;
|
|
22003
|
+
case 3:
|
|
22004
|
+
return Identifiers.styleMapInterpolate1;
|
|
22005
|
+
case 5:
|
|
22006
|
+
return Identifiers.styleMapInterpolate2;
|
|
22007
|
+
case 7:
|
|
22008
|
+
return Identifiers.styleMapInterpolate3;
|
|
22009
|
+
case 9:
|
|
22010
|
+
return Identifiers.styleMapInterpolate4;
|
|
22011
|
+
case 11:
|
|
22012
|
+
return Identifiers.styleMapInterpolate5;
|
|
22013
|
+
case 13:
|
|
22014
|
+
return Identifiers.styleMapInterpolate6;
|
|
22015
|
+
case 15:
|
|
22016
|
+
return Identifiers.styleMapInterpolate7;
|
|
22017
|
+
case 17:
|
|
22018
|
+
return Identifiers.styleMapInterpolate8;
|
|
22060
22019
|
default:
|
|
22061
|
-
return
|
|
22020
|
+
return Identifiers.styleMapInterpolateV;
|
|
22021
|
+
}
|
|
22022
|
+
}
|
|
22023
|
+
function getStylePropInterpolationExpression(interpolation) {
|
|
22024
|
+
switch (getInterpolationArgsLength(interpolation)) {
|
|
22025
|
+
case 1:
|
|
22026
|
+
return Identifiers.styleProp;
|
|
22027
|
+
case 3:
|
|
22028
|
+
return Identifiers.stylePropInterpolate1;
|
|
22029
|
+
case 5:
|
|
22030
|
+
return Identifiers.stylePropInterpolate2;
|
|
22031
|
+
case 7:
|
|
22032
|
+
return Identifiers.stylePropInterpolate3;
|
|
22033
|
+
case 9:
|
|
22034
|
+
return Identifiers.stylePropInterpolate4;
|
|
22035
|
+
case 11:
|
|
22036
|
+
return Identifiers.stylePropInterpolate5;
|
|
22037
|
+
case 13:
|
|
22038
|
+
return Identifiers.stylePropInterpolate6;
|
|
22039
|
+
case 15:
|
|
22040
|
+
return Identifiers.stylePropInterpolate7;
|
|
22041
|
+
case 17:
|
|
22042
|
+
return Identifiers.stylePropInterpolate8;
|
|
22043
|
+
default:
|
|
22044
|
+
return Identifiers.stylePropInterpolateV;
|
|
22045
|
+
}
|
|
22046
|
+
}
|
|
22047
|
+
function isCssCustomProperty2(name) {
|
|
22048
|
+
return name.startsWith("--");
|
|
22049
|
+
}
|
|
22050
|
+
function isEmptyExpression(ast) {
|
|
22051
|
+
if (ast instanceof ASTWithSource) {
|
|
22052
|
+
ast = ast.ast;
|
|
22062
22053
|
}
|
|
22054
|
+
return ast instanceof EmptyExpr;
|
|
22063
22055
|
}
|
|
22064
22056
|
|
|
22065
22057
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
@@ -23749,6 +23741,123 @@ function createClosureModeGuard2() {
|
|
|
23749
23741
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23750
23742
|
}
|
|
23751
23743
|
|
|
23744
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
|
|
23745
|
+
function toQueryFlags(query) {
|
|
23746
|
+
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
23747
|
+
}
|
|
23748
|
+
function getQueryPredicate(query, constantPool) {
|
|
23749
|
+
if (Array.isArray(query.predicate)) {
|
|
23750
|
+
let predicate = [];
|
|
23751
|
+
query.predicate.forEach((selector) => {
|
|
23752
|
+
const selectors = selector.split(",").map((token) => literal(token.trim()));
|
|
23753
|
+
predicate.push(...selectors);
|
|
23754
|
+
});
|
|
23755
|
+
return constantPool.getConstLiteral(literalArr(predicate), true);
|
|
23756
|
+
} else {
|
|
23757
|
+
switch (query.predicate.forwardRef) {
|
|
23758
|
+
case 0:
|
|
23759
|
+
case 2:
|
|
23760
|
+
return query.predicate.expression;
|
|
23761
|
+
case 1:
|
|
23762
|
+
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
23763
|
+
}
|
|
23764
|
+
}
|
|
23765
|
+
}
|
|
23766
|
+
function createQueryCreateCall(query, constantPool, queryTypeFns, prependParams) {
|
|
23767
|
+
const parameters = [];
|
|
23768
|
+
if (prependParams !== void 0) {
|
|
23769
|
+
parameters.push(...prependParams);
|
|
23770
|
+
}
|
|
23771
|
+
if (query.isSignal) {
|
|
23772
|
+
parameters.push(new ReadPropExpr(variable(CONTEXT_NAME), query.propertyName));
|
|
23773
|
+
}
|
|
23774
|
+
parameters.push(getQueryPredicate(query, constantPool), literal(toQueryFlags(query)));
|
|
23775
|
+
if (query.read) {
|
|
23776
|
+
parameters.push(query.read);
|
|
23777
|
+
}
|
|
23778
|
+
const queryCreateFn = query.isSignal ? queryTypeFns.signalBased : queryTypeFns.nonSignal;
|
|
23779
|
+
return importExpr(queryCreateFn).callFn(parameters);
|
|
23780
|
+
}
|
|
23781
|
+
var queryAdvancePlaceholder = Symbol("queryAdvancePlaceholder");
|
|
23782
|
+
function collapseAdvanceStatements(statements) {
|
|
23783
|
+
const result = [];
|
|
23784
|
+
let advanceCollapseCount = 0;
|
|
23785
|
+
const flushAdvanceCount = () => {
|
|
23786
|
+
if (advanceCollapseCount > 0) {
|
|
23787
|
+
result.unshift(importExpr(Identifiers.queryAdvance).callFn(advanceCollapseCount === 1 ? [] : [literal(advanceCollapseCount)]).toStmt());
|
|
23788
|
+
advanceCollapseCount = 0;
|
|
23789
|
+
}
|
|
23790
|
+
};
|
|
23791
|
+
for (let i = statements.length - 1; i >= 0; i--) {
|
|
23792
|
+
const st = statements[i];
|
|
23793
|
+
if (st === queryAdvancePlaceholder) {
|
|
23794
|
+
advanceCollapseCount++;
|
|
23795
|
+
} else {
|
|
23796
|
+
flushAdvanceCount();
|
|
23797
|
+
result.unshift(st);
|
|
23798
|
+
}
|
|
23799
|
+
}
|
|
23800
|
+
flushAdvanceCount();
|
|
23801
|
+
return result;
|
|
23802
|
+
}
|
|
23803
|
+
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
23804
|
+
const createStatements = [];
|
|
23805
|
+
const updateStatements = [];
|
|
23806
|
+
const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);
|
|
23807
|
+
viewQueries.forEach((query) => {
|
|
23808
|
+
const queryDefinitionCall = createQueryCreateCall(query, constantPool, {
|
|
23809
|
+
signalBased: Identifiers.viewQuerySignal,
|
|
23810
|
+
nonSignal: Identifiers.viewQuery
|
|
23811
|
+
});
|
|
23812
|
+
createStatements.push(queryDefinitionCall.toStmt());
|
|
23813
|
+
if (query.isSignal) {
|
|
23814
|
+
updateStatements.push(queryAdvancePlaceholder);
|
|
23815
|
+
return;
|
|
23816
|
+
}
|
|
23817
|
+
const temporary = tempAllocator();
|
|
23818
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
23819
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
23820
|
+
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
23821
|
+
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
23822
|
+
});
|
|
23823
|
+
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
23824
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
|
|
23825
|
+
renderFlagCheckIfStmt(1, createStatements),
|
|
23826
|
+
renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))
|
|
23827
|
+
], INFERRED_TYPE, null, viewQueryFnName);
|
|
23828
|
+
}
|
|
23829
|
+
function createContentQueriesFunction(queries, constantPool, name) {
|
|
23830
|
+
const createStatements = [];
|
|
23831
|
+
const updateStatements = [];
|
|
23832
|
+
const tempAllocator = temporaryAllocator((st) => updateStatements.push(st), TEMPORARY_NAME);
|
|
23833
|
+
for (const query of queries) {
|
|
23834
|
+
createStatements.push(createQueryCreateCall(
|
|
23835
|
+
query,
|
|
23836
|
+
constantPool,
|
|
23837
|
+
{ nonSignal: Identifiers.contentQuery, signalBased: Identifiers.contentQuerySignal },
|
|
23838
|
+
[variable("dirIndex")]
|
|
23839
|
+
).toStmt());
|
|
23840
|
+
if (query.isSignal) {
|
|
23841
|
+
updateStatements.push(queryAdvancePlaceholder);
|
|
23842
|
+
continue;
|
|
23843
|
+
}
|
|
23844
|
+
const temporary = tempAllocator();
|
|
23845
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
23846
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
23847
|
+
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
23848
|
+
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
23849
|
+
}
|
|
23850
|
+
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
23851
|
+
return fn([
|
|
23852
|
+
new FnParam(RENDER_FLAGS, NUMBER_TYPE),
|
|
23853
|
+
new FnParam(CONTEXT_NAME, null),
|
|
23854
|
+
new FnParam("dirIndex", null)
|
|
23855
|
+
], [
|
|
23856
|
+
renderFlagCheckIfStmt(1, createStatements),
|
|
23857
|
+
renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))
|
|
23858
|
+
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
23859
|
+
}
|
|
23860
|
+
|
|
23752
23861
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23753
23862
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23754
23863
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
@@ -23964,16 +24073,6 @@ function compileDeclarationList(list, mode) {
|
|
|
23964
24073
|
throw new Error(`Unsupported with an array of pre-resolved dependencies`);
|
|
23965
24074
|
}
|
|
23966
24075
|
}
|
|
23967
|
-
function prepareQueryParams(query, constantPool) {
|
|
23968
|
-
const parameters = [getQueryPredicate(query, constantPool), literal(toQueryFlags(query))];
|
|
23969
|
-
if (query.read) {
|
|
23970
|
-
parameters.push(query.read);
|
|
23971
|
-
}
|
|
23972
|
-
return parameters;
|
|
23973
|
-
}
|
|
23974
|
-
function toQueryFlags(query) {
|
|
23975
|
-
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
23976
|
-
}
|
|
23977
24076
|
function convertAttributesToExpressions(attributes) {
|
|
23978
24077
|
const values = [];
|
|
23979
24078
|
for (let key of Object.getOwnPropertyNames(attributes)) {
|
|
@@ -23982,28 +24081,6 @@ function convertAttributesToExpressions(attributes) {
|
|
|
23982
24081
|
}
|
|
23983
24082
|
return values;
|
|
23984
24083
|
}
|
|
23985
|
-
function createContentQueriesFunction(queries, constantPool, name) {
|
|
23986
|
-
const createStatements = [];
|
|
23987
|
-
const updateStatements = [];
|
|
23988
|
-
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
23989
|
-
for (const query of queries) {
|
|
23990
|
-
createStatements.push(importExpr(Identifiers.contentQuery).callFn([variable("dirIndex"), ...prepareQueryParams(query, constantPool)]).toStmt());
|
|
23991
|
-
const temporary = tempAllocator();
|
|
23992
|
-
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
23993
|
-
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
23994
|
-
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
23995
|
-
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
23996
|
-
}
|
|
23997
|
-
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
23998
|
-
return fn([
|
|
23999
|
-
new FnParam(RENDER_FLAGS, NUMBER_TYPE),
|
|
24000
|
-
new FnParam(CONTEXT_NAME, null),
|
|
24001
|
-
new FnParam("dirIndex", null)
|
|
24002
|
-
], [
|
|
24003
|
-
renderFlagCheckIfStmt(1, createStatements),
|
|
24004
|
-
renderFlagCheckIfStmt(2, updateStatements)
|
|
24005
|
-
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
24006
|
-
}
|
|
24007
24084
|
function stringAsType(str) {
|
|
24008
24085
|
return expressionType(literal(str));
|
|
24009
24086
|
}
|
|
@@ -24055,25 +24132,6 @@ function createDirectiveType(meta) {
|
|
|
24055
24132
|
}
|
|
24056
24133
|
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
24057
24134
|
}
|
|
24058
|
-
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
24059
|
-
const createStatements = [];
|
|
24060
|
-
const updateStatements = [];
|
|
24061
|
-
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
24062
|
-
viewQueries.forEach((query) => {
|
|
24063
|
-
const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));
|
|
24064
|
-
createStatements.push(queryDefinition.toStmt());
|
|
24065
|
-
const temporary = tempAllocator();
|
|
24066
|
-
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
24067
|
-
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
24068
|
-
const updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop("first") : temporary);
|
|
24069
|
-
updateStatements.push(refresh.and(updateDirective).toStmt());
|
|
24070
|
-
});
|
|
24071
|
-
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
24072
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
|
|
24073
|
-
renderFlagCheckIfStmt(1, createStatements),
|
|
24074
|
-
renderFlagCheckIfStmt(2, updateStatements)
|
|
24075
|
-
], INFERRED_TYPE, null, viewQueryFnName);
|
|
24076
|
-
}
|
|
24077
24135
|
function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {
|
|
24078
24136
|
const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);
|
|
24079
24137
|
const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);
|
|
@@ -25184,6 +25242,7 @@ var CompilerFacadeImpl = class {
|
|
|
25184
25242
|
};
|
|
25185
25243
|
function convertToR3QueryMetadata(facade) {
|
|
25186
25244
|
return __spreadProps(__spreadValues({}, facade), {
|
|
25245
|
+
isSignal: facade.isSignal,
|
|
25187
25246
|
predicate: convertQueryPredicate(facade.predicate),
|
|
25188
25247
|
read: facade.read ? new WrappedNodeExpr(facade.read) : null,
|
|
25189
25248
|
static: facade.static,
|
|
@@ -25199,7 +25258,8 @@ function convertQueryDeclarationToMetadata(declaration) {
|
|
|
25199
25258
|
descendants: (_b2 = declaration.descendants) != null ? _b2 : false,
|
|
25200
25259
|
read: declaration.read ? new WrappedNodeExpr(declaration.read) : null,
|
|
25201
25260
|
static: (_c2 = declaration.static) != null ? _c2 : false,
|
|
25202
|
-
emitDistinctChangesOnly: (_d2 = declaration.emitDistinctChangesOnly) != null ? _d2 : true
|
|
25261
|
+
emitDistinctChangesOnly: (_d2 = declaration.emitDistinctChangesOnly) != null ? _d2 : true,
|
|
25262
|
+
isSignal: !!declaration.isSignal
|
|
25203
25263
|
};
|
|
25204
25264
|
}
|
|
25205
25265
|
function convertQueryPredicate(predicate) {
|
|
@@ -25575,7 +25635,7 @@ function publishFacade(global) {
|
|
|
25575
25635
|
}
|
|
25576
25636
|
|
|
25577
25637
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25578
|
-
var VERSION2 = new Version("17.
|
|
25638
|
+
var VERSION2 = new Version("17.2.0-next.0");
|
|
25579
25639
|
|
|
25580
25640
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25581
25641
|
var _VisitorMode;
|