@angular/core 17.2.0-next.0 → 17.2.0-rc.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/primitives/signals/index.mjs +3 -3
- package/esm2022/src/application/application_init.mjs +2 -2
- package/esm2022/src/application/application_ngmodule_factory_compiler.mjs +61 -0
- package/esm2022/src/application/application_ref.mjs +56 -70
- package/esm2022/src/application/application_tokens.mjs +10 -9
- package/esm2022/src/authoring/input/input.mjs +48 -0
- package/esm2022/src/authoring/input/input_signal.mjs +40 -0
- package/esm2022/src/authoring/input/input_signal_node.mjs +22 -0
- package/esm2022/src/authoring/input/input_type_checking.mjs +9 -0
- package/esm2022/src/authoring/model/model.mjs +50 -0
- package/esm2022/src/authoring/model/model_signal.mjs +68 -0
- package/esm2022/src/authoring/model/model_signal_node.mjs +21 -0
- package/esm2022/src/authoring/output.mjs +33 -0
- package/esm2022/src/authoring/queries.mjs +8 -7
- package/esm2022/src/authoring.mjs +3 -2
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +51 -18
- package/esm2022/src/core.mjs +7 -5
- package/esm2022/src/core_private_export.mjs +2 -2
- package/esm2022/src/core_reactivity_export_internal.mjs +2 -2
- package/esm2022/src/core_render3_private_export.mjs +5 -4
- package/esm2022/src/defer/instructions.mjs +16 -7
- package/esm2022/src/di/create_injector.mjs +1 -1
- package/esm2022/src/di/forward_ref.mjs +1 -1
- package/esm2022/src/di/initializer_token.mjs +2 -2
- package/esm2022/src/di/injector.mjs +4 -4
- package/esm2022/src/di/injector_compatibility.mjs +1 -1
- package/esm2022/src/di/injector_token.mjs +2 -2
- package/esm2022/src/di/internal_tokens.mjs +2 -2
- package/esm2022/src/di/null_injector.mjs +1 -1
- package/esm2022/src/di/r3_injector.mjs +1 -1
- package/esm2022/src/di/scope.mjs +2 -2
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/error_handling.mjs +17 -6
- package/esm2022/src/hydration/utils.mjs +54 -8
- package/esm2022/src/i18n/tokens.mjs +5 -5
- package/esm2022/src/linker/compiler.mjs +2 -2
- package/esm2022/src/linker/query_list.mjs +7 -1
- package/esm2022/src/metadata/di.mjs +1 -1
- package/esm2022/src/platform/platform.mjs +2 -2
- package/esm2022/src/platform/platform_ref.mjs +4 -3
- package/esm2022/src/render3/after_render_hooks.mjs +2 -6
- package/esm2022/src/render3/apply_value_input_field.mjs +1 -1
- package/esm2022/src/render3/component_ref.mjs +2 -2
- package/esm2022/src/render3/definition.mjs +2 -2
- package/esm2022/src/render3/di.mjs +1 -1
- package/esm2022/src/render3/errors_di.mjs +2 -2
- package/esm2022/src/render3/features/ng_onchanges_feature.mjs +1 -1
- package/esm2022/src/render3/i18n/i18n_locale_id.mjs +2 -2
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/all.mjs +3 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +6 -6
- package/esm2022/src/render3/instructions/element.mjs +3 -3
- package/esm2022/src/render3/instructions/listener.mjs +13 -4
- package/esm2022/src/render3/instructions/queries.mjs +7 -43
- package/esm2022/src/render3/instructions/queries_signals.mjs +54 -0
- package/esm2022/src/render3/instructions/render.mjs +5 -2
- package/esm2022/src/render3/instructions/shared.mjs +2 -2
- package/esm2022/src/render3/instructions/styling.mjs +1 -1
- package/esm2022/src/render3/instructions/two_way.mjs +70 -0
- package/esm2022/src/render3/instructions/write_to_directive_input.mjs +2 -2
- package/esm2022/src/render3/interfaces/attribute_marker.mjs +9 -0
- package/esm2022/src/render3/interfaces/definition.mjs +2 -8
- package/esm2022/src/render3/interfaces/input_flags.mjs +15 -0
- package/esm2022/src/render3/interfaces/node.mjs +1 -1
- package/esm2022/src/render3/interfaces/query.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/environment.mjs +5 -2
- package/esm2022/src/render3/node_selector_matcher.mjs +1 -1
- package/esm2022/src/render3/query.mjs +62 -9
- package/esm2022/src/render3/query_reactive.mjs +86 -0
- package/esm2022/src/render3/reactivity/computed.mjs +4 -1
- package/esm2022/src/render3/reactivity/signal.mjs +24 -1
- package/esm2022/src/render3/styling/static_styling.mjs +1 -1
- package/esm2022/src/render3/util/attrs_utils.mjs +1 -1
- package/esm2022/src/render3/util/discovery_utils.mjs +1 -1
- package/esm2022/src/render3/util/view_utils.mjs +3 -3
- package/esm2022/src/render3/view_ref.mjs +1 -1
- package/esm2022/src/util/ng_dev_mode.mjs +11 -3
- package/esm2022/src/util/stringify.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +127 -92
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +11 -6
- package/esm2022/testing/src/test_bed_common.mjs +9 -2
- package/esm2022/testing/src/test_bed_compiler.mjs +5 -4
- package/esm2022/testing/src/testing.mjs +2 -2
- package/fesm2022/core.mjs +15622 -14998
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +142 -95
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +477 -27
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +4 -2
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +652 -295
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +662 -305
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +7001 -6270
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +6 -17
- package/esm2022/src/authoring/input.mjs +0 -48
- package/esm2022/src/authoring/input_signal.mjs +0 -37
- package/esm2022/src/authoring/input_signal_node.mjs +0 -22
- package/esm2022/src/authoring/input_type_checking.mjs +0 -9
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
67
67
|
var block_template_entities_exports = {};
|
|
68
68
|
__export(block_template_entities_exports, {
|
|
69
69
|
default: () => block_template_entities_default
|
|
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
76
76
|
var import_core = require("@angular-devkit/core");
|
|
77
77
|
function getProjectTsConfigPaths(tree) {
|
|
78
78
|
return __async(this, null, function* () {
|
|
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
// bazel-out/
|
|
155
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
156
156
|
var import_path = require("path");
|
|
157
157
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
158
158
|
|
|
159
|
-
// bazel-out/
|
|
159
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
160
160
|
var path = __toESM(require("path"), 1);
|
|
161
161
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
162
162
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
173
173
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// bazel-out/
|
|
176
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
177
177
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
178
178
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
179
179
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
206
206
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
210
210
|
var _SELECTOR_REGEXP = new RegExp(
|
|
211
211
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
212
212
|
"g"
|
|
@@ -514,7 +514,7 @@ var SelectorContext = class {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
-
// bazel-out/
|
|
517
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/core.mjs
|
|
518
518
|
var ViewEncapsulation;
|
|
519
519
|
(function(ViewEncapsulation2) {
|
|
520
520
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -582,7 +582,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
582
582
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
// bazel-out/
|
|
585
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
586
586
|
var textEncoder;
|
|
587
587
|
function computeDigest(message) {
|
|
588
588
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -822,7 +822,7 @@ function wordAt(bytes, index, endian) {
|
|
|
822
822
|
return word;
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
// bazel-out/
|
|
825
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
826
826
|
var TypeModifier;
|
|
827
827
|
(function(TypeModifier2) {
|
|
828
828
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1781,7 +1781,7 @@ function serializeTags(tags) {
|
|
|
1781
1781
|
return out;
|
|
1782
1782
|
}
|
|
1783
1783
|
|
|
1784
|
-
// bazel-out/
|
|
1784
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1785
1785
|
var CONSTANT_PREFIX = "_c";
|
|
1786
1786
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1787
1787
|
var KEY_CONTEXT = {};
|
|
@@ -1821,6 +1821,7 @@ var ConstantPool = class {
|
|
|
1821
1821
|
this.literals = /* @__PURE__ */ new Map();
|
|
1822
1822
|
this.literalFactories = /* @__PURE__ */ new Map();
|
|
1823
1823
|
this.sharedConstants = /* @__PURE__ */ new Map();
|
|
1824
|
+
this._claimedNames = /* @__PURE__ */ new Map();
|
|
1824
1825
|
this.nextNameIndex = 0;
|
|
1825
1826
|
}
|
|
1826
1827
|
getConstLiteral(literal2, forceShared) {
|
|
@@ -1913,8 +1914,12 @@ var ConstantPool = class {
|
|
|
1913
1914
|
}
|
|
1914
1915
|
return { literalFactory, literalFactoryArguments };
|
|
1915
1916
|
}
|
|
1916
|
-
uniqueName(
|
|
1917
|
-
|
|
1917
|
+
uniqueName(name, alwaysIncludeSuffix = true) {
|
|
1918
|
+
var _a2;
|
|
1919
|
+
const count = (_a2 = this._claimedNames.get(name)) != null ? _a2 : 0;
|
|
1920
|
+
const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;
|
|
1921
|
+
this._claimedNames.set(name, count + 1);
|
|
1922
|
+
return result;
|
|
1918
1923
|
}
|
|
1919
1924
|
freshName() {
|
|
1920
1925
|
return this.uniqueName(CONSTANT_PREFIX);
|
|
@@ -1964,7 +1969,7 @@ function isLongStringLiteral(expr) {
|
|
|
1964
1969
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1965
1970
|
}
|
|
1966
1971
|
|
|
1967
|
-
// bazel-out/
|
|
1972
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1968
1973
|
var CORE = "@angular/core";
|
|
1969
1974
|
var _Identifiers = class {
|
|
1970
1975
|
};
|
|
@@ -2548,6 +2553,15 @@ var Identifiers = _Identifiers;
|
|
|
2548
2553
|
(() => {
|
|
2549
2554
|
_Identifiers.queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: CORE };
|
|
2550
2555
|
})();
|
|
2556
|
+
(() => {
|
|
2557
|
+
_Identifiers.twoWayProperty = { name: "\u0275\u0275twoWayProperty", moduleName: CORE };
|
|
2558
|
+
})();
|
|
2559
|
+
(() => {
|
|
2560
|
+
_Identifiers.twoWayBindingSet = { name: "\u0275\u0275twoWayBindingSet", moduleName: CORE };
|
|
2561
|
+
})();
|
|
2562
|
+
(() => {
|
|
2563
|
+
_Identifiers.twoWayListener = { name: "\u0275\u0275twoWayListener", moduleName: CORE };
|
|
2564
|
+
})();
|
|
2551
2565
|
(() => {
|
|
2552
2566
|
_Identifiers.NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: CORE };
|
|
2553
2567
|
})();
|
|
@@ -2617,8 +2631,11 @@ var Identifiers = _Identifiers;
|
|
|
2617
2631
|
(() => {
|
|
2618
2632
|
_Identifiers.UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
|
|
2619
2633
|
})();
|
|
2634
|
+
(() => {
|
|
2635
|
+
_Identifiers.unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
|
|
2636
|
+
})();
|
|
2620
2637
|
|
|
2621
|
-
// bazel-out/
|
|
2638
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2622
2639
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2623
2640
|
function dashCaseToCamelCase(input) {
|
|
2624
2641
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2706,7 +2723,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2706
2723
|
return [truthy, falsy];
|
|
2707
2724
|
}
|
|
2708
2725
|
|
|
2709
|
-
// bazel-out/
|
|
2726
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2710
2727
|
var VERSION = 3;
|
|
2711
2728
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2712
2729
|
var SourceMapGenerator = class {
|
|
@@ -2835,7 +2852,7 @@ function toBase64Digit(value) {
|
|
|
2835
2852
|
return B64_DIGITS[value];
|
|
2836
2853
|
}
|
|
2837
2854
|
|
|
2838
|
-
// bazel-out/
|
|
2855
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2839
2856
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2840
2857
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2841
2858
|
var _INDENT_WITH = " ";
|
|
@@ -3323,7 +3340,7 @@ function _createIndent(count) {
|
|
|
3323
3340
|
return res;
|
|
3324
3341
|
}
|
|
3325
3342
|
|
|
3326
|
-
// bazel-out/
|
|
3343
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3327
3344
|
function typeWithParameters(type, numParams) {
|
|
3328
3345
|
if (numParams === 0) {
|
|
3329
3346
|
return expressionType(type);
|
|
@@ -3388,7 +3405,7 @@ function generateForwardRef(expr) {
|
|
|
3388
3405
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3389
3406
|
}
|
|
3390
3407
|
|
|
3391
|
-
// bazel-out/
|
|
3408
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3392
3409
|
var R3FactoryDelegateType;
|
|
3393
3410
|
(function(R3FactoryDelegateType2) {
|
|
3394
3411
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3533,7 +3550,7 @@ function getInjectFn(target) {
|
|
|
3533
3550
|
}
|
|
3534
3551
|
}
|
|
3535
3552
|
|
|
3536
|
-
// bazel-out/
|
|
3553
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3537
3554
|
var TagContentType;
|
|
3538
3555
|
(function(TagContentType2) {
|
|
3539
3556
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -3570,7 +3587,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3570
3587
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3571
3588
|
}
|
|
3572
3589
|
|
|
3573
|
-
// bazel-out/
|
|
3590
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3574
3591
|
var Comment = class {
|
|
3575
3592
|
constructor(value, sourceSpan) {
|
|
3576
3593
|
this.value = value;
|
|
@@ -3951,7 +3968,7 @@ function visitAll(visitor, nodes) {
|
|
|
3951
3968
|
return result;
|
|
3952
3969
|
}
|
|
3953
3970
|
|
|
3954
|
-
// bazel-out/
|
|
3971
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3955
3972
|
var Message = class {
|
|
3956
3973
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3957
3974
|
this.nodes = nodes;
|
|
@@ -4089,7 +4106,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4089
4106
|
}
|
|
4090
4107
|
};
|
|
4091
4108
|
|
|
4092
|
-
// bazel-out/
|
|
4109
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4093
4110
|
var _Visitor = class {
|
|
4094
4111
|
visitTag(tag) {
|
|
4095
4112
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4117,12 +4134,12 @@ ${doctype.dtd}
|
|
|
4117
4134
|
};
|
|
4118
4135
|
var _visitor = new _Visitor();
|
|
4119
4136
|
|
|
4120
|
-
// bazel-out/
|
|
4137
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4121
4138
|
function toPublicName(internalName) {
|
|
4122
4139
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4123
4140
|
}
|
|
4124
4141
|
|
|
4125
|
-
// bazel-out/
|
|
4142
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4126
4143
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4127
4144
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4128
4145
|
var I18N_ATTR = "i18n";
|
|
@@ -4224,7 +4241,7 @@ function declareI18nVariable(variable2) {
|
|
|
4224
4241
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4225
4242
|
}
|
|
4226
4243
|
|
|
4227
|
-
// bazel-out/
|
|
4244
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4228
4245
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4229
4246
|
var TEMPORARY_NAME = "_t";
|
|
4230
4247
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4288,7 +4305,9 @@ var CHAINABLE_INSTRUCTIONS = /* @__PURE__ */ new Set([
|
|
|
4288
4305
|
Identifiers.textInterpolate7,
|
|
4289
4306
|
Identifiers.textInterpolate8,
|
|
4290
4307
|
Identifiers.textInterpolateV,
|
|
4291
|
-
Identifiers.templateCreate
|
|
4308
|
+
Identifiers.templateCreate,
|
|
4309
|
+
Identifiers.twoWayProperty,
|
|
4310
|
+
Identifiers.twoWayListener
|
|
4292
4311
|
]);
|
|
4293
4312
|
function invokeInstruction(span, reference2, params) {
|
|
4294
4313
|
return importExpr(reference2, null, span).callFn(params, span);
|
|
@@ -4423,7 +4442,7 @@ function getAttrsForDirectiveMatching(elOrTpl) {
|
|
|
4423
4442
|
}
|
|
4424
4443
|
});
|
|
4425
4444
|
elOrTpl.inputs.forEach((i) => {
|
|
4426
|
-
if (i.type === 0) {
|
|
4445
|
+
if (i.type === 0 || i.type === 5) {
|
|
4427
4446
|
attributesMap[i.name] = "";
|
|
4428
4447
|
}
|
|
4429
4448
|
});
|
|
@@ -4468,7 +4487,7 @@ function getInstructionStatements(instructions) {
|
|
|
4468
4487
|
return statements;
|
|
4469
4488
|
}
|
|
4470
4489
|
|
|
4471
|
-
// bazel-out/
|
|
4490
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4472
4491
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4473
4492
|
let result = null;
|
|
4474
4493
|
const factoryMeta = {
|
|
@@ -4553,7 +4572,7 @@ function createFactoryFunction(type) {
|
|
|
4553
4572
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4554
4573
|
}
|
|
4555
4574
|
|
|
4556
|
-
// bazel-out/
|
|
4575
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4557
4576
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4558
4577
|
/^\s*$/,
|
|
4559
4578
|
/[<>]/,
|
|
@@ -4575,7 +4594,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4575
4594
|
}
|
|
4576
4595
|
}
|
|
4577
4596
|
|
|
4578
|
-
// bazel-out/
|
|
4597
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4579
4598
|
var InterpolationConfig = class {
|
|
4580
4599
|
static fromArray(markers) {
|
|
4581
4600
|
if (!markers) {
|
|
@@ -4592,7 +4611,7 @@ var InterpolationConfig = class {
|
|
|
4592
4611
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4593
4612
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4594
4613
|
|
|
4595
|
-
// bazel-out/
|
|
4614
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4596
4615
|
var $EOF = 0;
|
|
4597
4616
|
var $BSPACE = 8;
|
|
4598
4617
|
var $TAB = 9;
|
|
@@ -4674,7 +4693,7 @@ function isQuote(code) {
|
|
|
4674
4693
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4675
4694
|
}
|
|
4676
4695
|
|
|
4677
|
-
// bazel-out/
|
|
4696
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4678
4697
|
var ParseLocation = class {
|
|
4679
4698
|
constructor(file, offset, line, col) {
|
|
4680
4699
|
this.file = file;
|
|
@@ -4821,7 +4840,7 @@ function sanitizeIdentifier(name) {
|
|
|
4821
4840
|
return name.replace(/\W/g, "_");
|
|
4822
4841
|
}
|
|
4823
4842
|
|
|
4824
|
-
// bazel-out/
|
|
4843
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4825
4844
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4826
4845
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4827
4846
|
constructor() {
|
|
@@ -4914,7 +4933,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4914
4933
|
}
|
|
4915
4934
|
};
|
|
4916
4935
|
|
|
4917
|
-
// bazel-out/
|
|
4936
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4918
4937
|
var policy;
|
|
4919
4938
|
function getPolicy() {
|
|
4920
4939
|
if (policy === void 0) {
|
|
@@ -4952,7 +4971,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4952
4971
|
return fn2.bind(_global);
|
|
4953
4972
|
}
|
|
4954
4973
|
|
|
4955
|
-
// bazel-out/
|
|
4974
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4956
4975
|
var JitEvaluator = class {
|
|
4957
4976
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4958
4977
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -5043,7 +5062,7 @@ function isUseStrictStatement(statement) {
|
|
|
5043
5062
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
5044
5063
|
}
|
|
5045
5064
|
|
|
5046
|
-
// bazel-out/
|
|
5065
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
5047
5066
|
function compileInjector(meta) {
|
|
5048
5067
|
const definitionMap = new DefinitionMap();
|
|
5049
5068
|
if (meta.providers !== null) {
|
|
@@ -5060,7 +5079,7 @@ function createInjectorType(meta) {
|
|
|
5060
5079
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5061
5080
|
}
|
|
5062
5081
|
|
|
5063
|
-
// bazel-out/
|
|
5082
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
5064
5083
|
var R3JitReflector = class {
|
|
5065
5084
|
constructor(context) {
|
|
5066
5085
|
this.context = context;
|
|
@@ -5076,7 +5095,7 @@ var R3JitReflector = class {
|
|
|
5076
5095
|
}
|
|
5077
5096
|
};
|
|
5078
5097
|
|
|
5079
|
-
// bazel-out/
|
|
5098
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5080
5099
|
var R3SelectorScopeMode;
|
|
5081
5100
|
(function(R3SelectorScopeMode2) {
|
|
5082
5101
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5217,7 +5236,7 @@ function tupleOfTypes(types) {
|
|
|
5217
5236
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5218
5237
|
}
|
|
5219
5238
|
|
|
5220
|
-
// bazel-out/
|
|
5239
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5221
5240
|
function compilePipeFromMetadata(metadata) {
|
|
5222
5241
|
const definitionMapValues = [];
|
|
5223
5242
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5238,7 +5257,7 @@ function createPipeType(metadata) {
|
|
|
5238
5257
|
]));
|
|
5239
5258
|
}
|
|
5240
5259
|
|
|
5241
|
-
// bazel-out/
|
|
5260
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5242
5261
|
var R3TemplateDependencyKind;
|
|
5243
5262
|
(function(R3TemplateDependencyKind2) {
|
|
5244
5263
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5246,7 +5265,7 @@ var R3TemplateDependencyKind;
|
|
|
5246
5265
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5247
5266
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5248
5267
|
|
|
5249
|
-
// bazel-out/
|
|
5268
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5250
5269
|
var ParserError = class {
|
|
5251
5270
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5252
5271
|
this.input = input;
|
|
@@ -5878,6 +5897,7 @@ var ParsedPropertyType;
|
|
|
5878
5897
|
ParsedPropertyType2[ParsedPropertyType2["DEFAULT"] = 0] = "DEFAULT";
|
|
5879
5898
|
ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
|
|
5880
5899
|
ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 2] = "ANIMATION";
|
|
5900
|
+
ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
|
|
5881
5901
|
})(ParsedPropertyType || (ParsedPropertyType = {}));
|
|
5882
5902
|
var ParsedEvent = class {
|
|
5883
5903
|
constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {
|
|
@@ -5912,7 +5932,7 @@ var BoundElementProperty = class {
|
|
|
5912
5932
|
}
|
|
5913
5933
|
};
|
|
5914
5934
|
|
|
5915
|
-
// bazel-out/
|
|
5935
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5916
5936
|
var _EventHandlerVars = class {
|
|
5917
5937
|
};
|
|
5918
5938
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -5920,30 +5940,10 @@ var EventHandlerVars = _EventHandlerVars;
|
|
|
5920
5940
|
_EventHandlerVars.event = variable("$event");
|
|
5921
5941
|
})();
|
|
5922
5942
|
function convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
5923
|
-
|
|
5924
|
-
localResolver = new DefaultLocalResolver(globals);
|
|
5925
|
-
}
|
|
5926
|
-
const actionWithoutBuiltins = convertPropertyBindingBuiltins({
|
|
5927
|
-
createLiteralArrayConverter: (argCount) => {
|
|
5928
|
-
return (args) => literalArr(args);
|
|
5929
|
-
},
|
|
5930
|
-
createLiteralMapConverter: (keys) => {
|
|
5931
|
-
return (values) => {
|
|
5932
|
-
const entries = keys.map((k, i) => ({
|
|
5933
|
-
key: k.key,
|
|
5934
|
-
value: values[i],
|
|
5935
|
-
quoted: k.quoted
|
|
5936
|
-
}));
|
|
5937
|
-
return literalMap(entries);
|
|
5938
|
-
};
|
|
5939
|
-
},
|
|
5940
|
-
createPipeConverter: (name) => {
|
|
5941
|
-
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
5942
|
-
}
|
|
5943
|
-
}, action);
|
|
5943
|
+
localResolver != null ? localResolver : localResolver = new DefaultLocalResolver(globals);
|
|
5944
5944
|
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, false, baseSourceSpan, implicitReceiverAccesses);
|
|
5945
5945
|
const actionStmts = [];
|
|
5946
|
-
flattenStatements(
|
|
5946
|
+
flattenStatements(convertActionBuiltins(action).visit(visitor, _Mode.Statement), actionStmts);
|
|
5947
5947
|
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
5948
5948
|
if (visitor.usesImplicitReceiver) {
|
|
5949
5949
|
localResolver.notifyImplicitReceiverUse();
|
|
@@ -5957,6 +5957,55 @@ function convertActionBinding(localResolver, implicitReceiver, action, bindingId
|
|
|
5957
5957
|
}
|
|
5958
5958
|
return actionStmts;
|
|
5959
5959
|
}
|
|
5960
|
+
function convertAssignmentActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
5961
|
+
localResolver != null ? localResolver : localResolver = new DefaultLocalResolver(globals);
|
|
5962
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, false, baseSourceSpan, implicitReceiverAccesses);
|
|
5963
|
+
let convertedAction = convertActionBuiltins(action).visit(visitor, _Mode.Statement);
|
|
5964
|
+
if (!(convertedAction instanceof ExpressionStatement)) {
|
|
5965
|
+
throw new Error(`Illegal state: unsupported expression in two-way action binding.`);
|
|
5966
|
+
}
|
|
5967
|
+
convertedAction = wrapAssignmentAction(convertedAction.expr).toStmt();
|
|
5968
|
+
const actionStmts = [];
|
|
5969
|
+
flattenStatements(convertedAction, actionStmts);
|
|
5970
|
+
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
5971
|
+
actionStmts.push(new ReturnStatement(EventHandlerVars.event));
|
|
5972
|
+
implicitReceiverAccesses == null ? void 0 : implicitReceiverAccesses.add(EventHandlerVars.event.name);
|
|
5973
|
+
if (visitor.usesImplicitReceiver) {
|
|
5974
|
+
localResolver.notifyImplicitReceiverUse();
|
|
5975
|
+
}
|
|
5976
|
+
return actionStmts;
|
|
5977
|
+
}
|
|
5978
|
+
function wrapAssignmentReadExpression(ast) {
|
|
5979
|
+
return new ExternalExpr(Identifiers.twoWayBindingSet).callFn([ast, EventHandlerVars.event]).or(ast.set(EventHandlerVars.event));
|
|
5980
|
+
}
|
|
5981
|
+
function isReadExpression(value) {
|
|
5982
|
+
return value instanceof ReadPropExpr || value instanceof ReadKeyExpr;
|
|
5983
|
+
}
|
|
5984
|
+
function wrapAssignmentAction(ast) {
|
|
5985
|
+
if (isReadExpression(ast)) {
|
|
5986
|
+
return wrapAssignmentReadExpression(ast);
|
|
5987
|
+
}
|
|
5988
|
+
if (ast instanceof BinaryOperatorExpr && isReadExpression(ast.rhs)) {
|
|
5989
|
+
return new BinaryOperatorExpr(ast.operator, ast.lhs, wrapAssignmentReadExpression(ast.rhs));
|
|
5990
|
+
}
|
|
5991
|
+
if (ast instanceof ConditionalExpr && isReadExpression(ast.falseCase)) {
|
|
5992
|
+
return new ConditionalExpr(ast.condition, ast.trueCase, wrapAssignmentReadExpression(ast.falseCase));
|
|
5993
|
+
}
|
|
5994
|
+
if (ast instanceof NotExpr) {
|
|
5995
|
+
let expr = ast.condition;
|
|
5996
|
+
while (true) {
|
|
5997
|
+
if (expr instanceof NotExpr) {
|
|
5998
|
+
expr = expr.condition;
|
|
5999
|
+
} else {
|
|
6000
|
+
if (isReadExpression(expr)) {
|
|
6001
|
+
return wrapAssignmentReadExpression(expr);
|
|
6002
|
+
}
|
|
6003
|
+
break;
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
}
|
|
6007
|
+
throw new Error(`Illegal state: unsupported expression in two-way action binding.`);
|
|
6008
|
+
}
|
|
5960
6009
|
function convertPropertyBindingBuiltins(converterFactory, ast) {
|
|
5961
6010
|
return convertBuiltins(converterFactory, ast);
|
|
5962
6011
|
}
|
|
@@ -6018,6 +6067,27 @@ function convertBuiltins(converterFactory, ast) {
|
|
|
6018
6067
|
const visitor = new _BuiltinAstConverter(converterFactory);
|
|
6019
6068
|
return ast.visit(visitor);
|
|
6020
6069
|
}
|
|
6070
|
+
function convertActionBuiltins(action) {
|
|
6071
|
+
const converterFactory = {
|
|
6072
|
+
createLiteralArrayConverter: () => {
|
|
6073
|
+
return (args) => literalArr(args);
|
|
6074
|
+
},
|
|
6075
|
+
createLiteralMapConverter: (keys) => {
|
|
6076
|
+
return (values) => {
|
|
6077
|
+
const entries = keys.map((k, i) => ({
|
|
6078
|
+
key: k.key,
|
|
6079
|
+
value: values[i],
|
|
6080
|
+
quoted: k.quoted
|
|
6081
|
+
}));
|
|
6082
|
+
return literalMap(entries);
|
|
6083
|
+
};
|
|
6084
|
+
},
|
|
6085
|
+
createPipeConverter: (name) => {
|
|
6086
|
+
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
6087
|
+
}
|
|
6088
|
+
};
|
|
6089
|
+
return convertPropertyBindingBuiltins(converterFactory, action);
|
|
6090
|
+
}
|
|
6021
6091
|
function temporaryName(bindingId, temporaryNumber) {
|
|
6022
6092
|
return `tmp_${bindingId}_${temporaryNumber}`;
|
|
6023
6093
|
}
|
|
@@ -6553,7 +6623,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6553
6623
|
}
|
|
6554
6624
|
};
|
|
6555
6625
|
|
|
6556
|
-
// bazel-out/
|
|
6626
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6557
6627
|
var _SECURITY_SCHEMA;
|
|
6558
6628
|
function SECURITY_SCHEMA() {
|
|
6559
6629
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6611,7 +6681,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6611
6681
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6612
6682
|
}
|
|
6613
6683
|
|
|
6614
|
-
// bazel-out/
|
|
6684
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6615
6685
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6616
6686
|
"inherit",
|
|
6617
6687
|
"initial",
|
|
@@ -7083,7 +7153,7 @@ function repeatGroups(groups, multiples) {
|
|
|
7083
7153
|
}
|
|
7084
7154
|
}
|
|
7085
7155
|
|
|
7086
|
-
// bazel-out/
|
|
7156
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
7087
7157
|
var OpKind;
|
|
7088
7158
|
(function(OpKind2) {
|
|
7089
7159
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7122,16 +7192,18 @@ var OpKind;
|
|
|
7122
7192
|
OpKind2[OpKind2["Projection"] = 33] = "Projection";
|
|
7123
7193
|
OpKind2[OpKind2["RepeaterCreate"] = 34] = "RepeaterCreate";
|
|
7124
7194
|
OpKind2[OpKind2["Repeater"] = 35] = "Repeater";
|
|
7125
|
-
OpKind2[OpKind2["
|
|
7126
|
-
OpKind2[OpKind2["
|
|
7127
|
-
OpKind2[OpKind2["
|
|
7128
|
-
OpKind2[OpKind2["
|
|
7129
|
-
OpKind2[OpKind2["
|
|
7130
|
-
OpKind2[OpKind2["
|
|
7131
|
-
OpKind2[OpKind2["
|
|
7132
|
-
OpKind2[OpKind2["
|
|
7133
|
-
OpKind2[OpKind2["
|
|
7134
|
-
OpKind2[OpKind2["
|
|
7195
|
+
OpKind2[OpKind2["TwoWayProperty"] = 36] = "TwoWayProperty";
|
|
7196
|
+
OpKind2[OpKind2["TwoWayListener"] = 37] = "TwoWayListener";
|
|
7197
|
+
OpKind2[OpKind2["I18nStart"] = 38] = "I18nStart";
|
|
7198
|
+
OpKind2[OpKind2["I18n"] = 39] = "I18n";
|
|
7199
|
+
OpKind2[OpKind2["I18nEnd"] = 40] = "I18nEnd";
|
|
7200
|
+
OpKind2[OpKind2["I18nExpression"] = 41] = "I18nExpression";
|
|
7201
|
+
OpKind2[OpKind2["I18nApply"] = 42] = "I18nApply";
|
|
7202
|
+
OpKind2[OpKind2["IcuStart"] = 43] = "IcuStart";
|
|
7203
|
+
OpKind2[OpKind2["IcuEnd"] = 44] = "IcuEnd";
|
|
7204
|
+
OpKind2[OpKind2["IcuPlaceholder"] = 45] = "IcuPlaceholder";
|
|
7205
|
+
OpKind2[OpKind2["I18nContext"] = 46] = "I18nContext";
|
|
7206
|
+
OpKind2[OpKind2["I18nAttributes"] = 47] = "I18nAttributes";
|
|
7135
7207
|
})(OpKind || (OpKind = {}));
|
|
7136
7208
|
var ExpressionKind;
|
|
7137
7209
|
(function(ExpressionKind2) {
|
|
@@ -7161,6 +7233,7 @@ var ExpressionKind;
|
|
|
7161
7233
|
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
|
|
7162
7234
|
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
7163
7235
|
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
7236
|
+
ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 26] = "TwoWayBindingSet";
|
|
7164
7237
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7165
7238
|
var VariableFlags;
|
|
7166
7239
|
(function(VariableFlags2) {
|
|
@@ -7194,6 +7267,7 @@ var BindingKind;
|
|
|
7194
7267
|
BindingKind2[BindingKind2["Template"] = 4] = "Template";
|
|
7195
7268
|
BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
|
|
7196
7269
|
BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
|
|
7270
|
+
BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
|
|
7197
7271
|
})(BindingKind || (BindingKind = {}));
|
|
7198
7272
|
var I18nParamResolutionTime;
|
|
7199
7273
|
(function(I18nParamResolutionTime2) {
|
|
@@ -7242,7 +7316,7 @@ var TemplateKind;
|
|
|
7242
7316
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7243
7317
|
})(TemplateKind || (TemplateKind = {}));
|
|
7244
7318
|
|
|
7245
|
-
// bazel-out/
|
|
7319
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7246
7320
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7247
7321
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7248
7322
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7274,7 +7348,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7274
7348
|
return expr[UsesVarOffset] === true;
|
|
7275
7349
|
}
|
|
7276
7350
|
|
|
7277
|
-
// bazel-out/
|
|
7351
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7278
7352
|
function createStatementOp(statement) {
|
|
7279
7353
|
return __spreadValues({
|
|
7280
7354
|
kind: OpKind.Statement,
|
|
@@ -7296,7 +7370,7 @@ var NEW_OP = {
|
|
|
7296
7370
|
next: null
|
|
7297
7371
|
};
|
|
7298
7372
|
|
|
7299
|
-
// bazel-out/
|
|
7373
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7300
7374
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7301
7375
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7302
7376
|
kind: OpKind.InterpolateText,
|
|
@@ -7348,6 +7422,21 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7348
7422
|
sourceSpan
|
|
7349
7423
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7350
7424
|
}
|
|
7425
|
+
function createTwoWayPropertyOp(target, name, expression, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
7426
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
7427
|
+
kind: OpKind.TwoWayProperty,
|
|
7428
|
+
target,
|
|
7429
|
+
name,
|
|
7430
|
+
expression,
|
|
7431
|
+
securityContext,
|
|
7432
|
+
sanitizer: null,
|
|
7433
|
+
isStructuralTemplateAttribute,
|
|
7434
|
+
templateKind,
|
|
7435
|
+
i18nContext,
|
|
7436
|
+
i18nMessage,
|
|
7437
|
+
sourceSpan
|
|
7438
|
+
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7439
|
+
}
|
|
7351
7440
|
function createStylePropOp(xref, name, expression, unit, sourceSpan) {
|
|
7352
7441
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7353
7442
|
kind: OpKind.StyleProp,
|
|
@@ -7462,7 +7551,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
7462
7551
|
}, NEW_OP);
|
|
7463
7552
|
}
|
|
7464
7553
|
|
|
7465
|
-
// bazel-out/
|
|
7554
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7466
7555
|
var _a;
|
|
7467
7556
|
var _b;
|
|
7468
7557
|
var _c;
|
|
@@ -7655,6 +7744,31 @@ var ResetViewExpr = class extends ExpressionBase {
|
|
|
7655
7744
|
return new ResetViewExpr(this.expr.clone());
|
|
7656
7745
|
}
|
|
7657
7746
|
};
|
|
7747
|
+
var TwoWayBindingSetExpr = class extends ExpressionBase {
|
|
7748
|
+
constructor(target, value) {
|
|
7749
|
+
super();
|
|
7750
|
+
this.target = target;
|
|
7751
|
+
this.value = value;
|
|
7752
|
+
this.kind = ExpressionKind.TwoWayBindingSet;
|
|
7753
|
+
}
|
|
7754
|
+
visitExpression(visitor, context) {
|
|
7755
|
+
this.target.visitExpression(visitor, context);
|
|
7756
|
+
this.value.visitExpression(visitor, context);
|
|
7757
|
+
}
|
|
7758
|
+
isEquivalent(other) {
|
|
7759
|
+
return this.target.isEquivalent(other.target) && this.value.isEquivalent(other.value);
|
|
7760
|
+
}
|
|
7761
|
+
isConstant() {
|
|
7762
|
+
return false;
|
|
7763
|
+
}
|
|
7764
|
+
transformInternalExpressions(transform2, flags) {
|
|
7765
|
+
this.target = transformExpressionsInExpression(this.target, transform2, flags);
|
|
7766
|
+
this.value = transformExpressionsInExpression(this.value, transform2, flags);
|
|
7767
|
+
}
|
|
7768
|
+
clone() {
|
|
7769
|
+
return new TwoWayBindingSetExpr(this.target, this.value);
|
|
7770
|
+
}
|
|
7771
|
+
};
|
|
7658
7772
|
var ReadVariableExpr = class extends ExpressionBase {
|
|
7659
7773
|
constructor(xref) {
|
|
7660
7774
|
super();
|
|
@@ -8106,6 +8220,10 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8106
8220
|
}
|
|
8107
8221
|
op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform2, flags);
|
|
8108
8222
|
break;
|
|
8223
|
+
case OpKind.TwoWayProperty:
|
|
8224
|
+
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8225
|
+
op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform2, flags);
|
|
8226
|
+
break;
|
|
8109
8227
|
case OpKind.I18nExpression:
|
|
8110
8228
|
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8111
8229
|
break;
|
|
@@ -8133,6 +8251,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8133
8251
|
}
|
|
8134
8252
|
break;
|
|
8135
8253
|
case OpKind.Listener:
|
|
8254
|
+
case OpKind.TwoWayListener:
|
|
8136
8255
|
for (const innerOp of op.handlerOps) {
|
|
8137
8256
|
transformExpressionsInOp(innerOp, transform2, flags | VisitorContextFlag.InChildOperation);
|
|
8138
8257
|
}
|
|
@@ -8294,7 +8413,7 @@ function isStringLiteral(expr) {
|
|
|
8294
8413
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8295
8414
|
}
|
|
8296
8415
|
|
|
8297
|
-
// bazel-out/
|
|
8416
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8298
8417
|
var _OpList = class {
|
|
8299
8418
|
constructor() {
|
|
8300
8419
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8485,14 +8604,14 @@ var OpList = _OpList;
|
|
|
8485
8604
|
_OpList.nextListId = 0;
|
|
8486
8605
|
})();
|
|
8487
8606
|
|
|
8488
|
-
// bazel-out/
|
|
8607
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8489
8608
|
var SlotHandle = class {
|
|
8490
8609
|
constructor() {
|
|
8491
8610
|
this.slot = null;
|
|
8492
8611
|
}
|
|
8493
8612
|
};
|
|
8494
8613
|
|
|
8495
|
-
// bazel-out/
|
|
8614
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8496
8615
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8497
8616
|
OpKind.Element,
|
|
8498
8617
|
OpKind.ElementStart,
|
|
@@ -8614,6 +8733,20 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPh
|
|
|
8614
8733
|
sourceSpan
|
|
8615
8734
|
}, NEW_OP);
|
|
8616
8735
|
}
|
|
8736
|
+
function createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {
|
|
8737
|
+
const handlerList = new OpList();
|
|
8738
|
+
handlerList.push(handlerOps);
|
|
8739
|
+
return __spreadValues({
|
|
8740
|
+
kind: OpKind.TwoWayListener,
|
|
8741
|
+
target,
|
|
8742
|
+
targetSlot,
|
|
8743
|
+
tag,
|
|
8744
|
+
name,
|
|
8745
|
+
handlerOps: handlerList,
|
|
8746
|
+
handlerFnName: null,
|
|
8747
|
+
sourceSpan
|
|
8748
|
+
}, NEW_OP);
|
|
8749
|
+
}
|
|
8617
8750
|
function createPipeOp(xref, slot, name) {
|
|
8618
8751
|
return __spreadValues(__spreadValues({
|
|
8619
8752
|
kind: OpKind.Pipe,
|
|
@@ -8661,7 +8794,7 @@ function createExtractedAttributeOp(target, bindingKind, namespace, name, expres
|
|
|
8661
8794
|
trustedValueFn: null
|
|
8662
8795
|
}, NEW_OP);
|
|
8663
8796
|
}
|
|
8664
|
-
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
8797
|
+
function createDeferOp(xref, main, mainSlot, metadata, resolverFn, sourceSpan) {
|
|
8665
8798
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8666
8799
|
kind: OpKind.Defer,
|
|
8667
8800
|
xref,
|
|
@@ -8680,7 +8813,7 @@ function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
|
8680
8813
|
errorView: null,
|
|
8681
8814
|
errorSlot: null,
|
|
8682
8815
|
metadata,
|
|
8683
|
-
resolverFn
|
|
8816
|
+
resolverFn,
|
|
8684
8817
|
sourceSpan
|
|
8685
8818
|
}, NEW_OP), TRAIT_CONSUMES_SLOT), {
|
|
8686
8819
|
numSlotsUsed: 2
|
|
@@ -8779,7 +8912,7 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
8779
8912
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8780
8913
|
}
|
|
8781
8914
|
|
|
8782
|
-
// bazel-out/
|
|
8915
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8783
8916
|
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
8784
8917
|
return __spreadValues(__spreadValues({
|
|
8785
8918
|
kind: OpKind.HostProperty,
|
|
@@ -8793,10 +8926,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext,
|
|
|
8793
8926
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8794
8927
|
}
|
|
8795
8928
|
|
|
8796
|
-
// bazel-out/
|
|
8929
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8797
8930
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8798
8931
|
|
|
8799
|
-
// bazel-out/
|
|
8932
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8800
8933
|
var CompilationJobKind;
|
|
8801
8934
|
(function(CompilationJobKind2) {
|
|
8802
8935
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8816,11 +8949,12 @@ var CompilationJob = class {
|
|
|
8816
8949
|
}
|
|
8817
8950
|
};
|
|
8818
8951
|
var ComponentCompilationJob = class extends CompilationJob {
|
|
8819
|
-
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
8952
|
+
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn) {
|
|
8820
8953
|
super(componentName, pool, compatibility);
|
|
8821
8954
|
this.relativeContextFilePath = relativeContextFilePath;
|
|
8822
8955
|
this.i18nUseExternalIds = i18nUseExternalIds;
|
|
8823
8956
|
this.deferBlocksMeta = deferBlocksMeta;
|
|
8957
|
+
this.allDeferrableDepsFn = allDeferrableDepsFn;
|
|
8824
8958
|
this.kind = CompilationJobKind.Tmpl;
|
|
8825
8959
|
this.fnSuffix = "Template";
|
|
8826
8960
|
this.views = /* @__PURE__ */ new Map();
|
|
@@ -8863,7 +8997,7 @@ var CompilationUnit = class {
|
|
|
8863
8997
|
*ops() {
|
|
8864
8998
|
for (const op of this.create) {
|
|
8865
8999
|
yield op;
|
|
8866
|
-
if (op.kind === OpKind.Listener) {
|
|
9000
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
8867
9001
|
for (const listenerOp of op.handlerOps) {
|
|
8868
9002
|
yield listenerOp;
|
|
8869
9003
|
}
|
|
@@ -8903,7 +9037,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8903
9037
|
}
|
|
8904
9038
|
};
|
|
8905
9039
|
|
|
8906
|
-
// bazel-out/
|
|
9040
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8907
9041
|
function deleteAnyCasts(job) {
|
|
8908
9042
|
for (const unit of job.units) {
|
|
8909
9043
|
for (const op of unit.ops()) {
|
|
@@ -8921,7 +9055,7 @@ function removeAnys(e) {
|
|
|
8921
9055
|
return e;
|
|
8922
9056
|
}
|
|
8923
9057
|
|
|
8924
|
-
// bazel-out/
|
|
9058
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8925
9059
|
function applyI18nExpressions(job) {
|
|
8926
9060
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8927
9061
|
for (const unit of job.units) {
|
|
@@ -8964,7 +9098,7 @@ function needsApplication(i18nContexts, op) {
|
|
|
8964
9098
|
return false;
|
|
8965
9099
|
}
|
|
8966
9100
|
|
|
8967
|
-
// bazel-out/
|
|
9101
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8968
9102
|
function assignI18nSlotDependencies(job) {
|
|
8969
9103
|
for (const unit of job.units) {
|
|
8970
9104
|
let updateOp = unit.update.head;
|
|
@@ -9009,7 +9143,7 @@ function assignI18nSlotDependencies(job) {
|
|
|
9009
9143
|
}
|
|
9010
9144
|
}
|
|
9011
9145
|
|
|
9012
|
-
// bazel-out/
|
|
9146
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
9013
9147
|
function createOpXrefMap(unit) {
|
|
9014
9148
|
const map = /* @__PURE__ */ new Map();
|
|
9015
9149
|
for (const op of unit.create) {
|
|
@@ -9024,7 +9158,7 @@ function createOpXrefMap(unit) {
|
|
|
9024
9158
|
return map;
|
|
9025
9159
|
}
|
|
9026
9160
|
|
|
9027
|
-
// bazel-out/
|
|
9161
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
9028
9162
|
function extractAttributes(job) {
|
|
9029
9163
|
for (const unit of job.units) {
|
|
9030
9164
|
const elements = createOpXrefMap(unit);
|
|
@@ -9058,6 +9192,18 @@ function extractAttributes(job) {
|
|
|
9058
9192
|
);
|
|
9059
9193
|
}
|
|
9060
9194
|
break;
|
|
9195
|
+
case OpKind.TwoWayProperty:
|
|
9196
|
+
OpList.insertBefore(createExtractedAttributeOp(
|
|
9197
|
+
op.target,
|
|
9198
|
+
BindingKind.TwoWayProperty,
|
|
9199
|
+
null,
|
|
9200
|
+
op.name,
|
|
9201
|
+
null,
|
|
9202
|
+
null,
|
|
9203
|
+
null,
|
|
9204
|
+
op.securityContext
|
|
9205
|
+
), lookupElement(elements, op.target));
|
|
9206
|
+
break;
|
|
9061
9207
|
case OpKind.StyleProp:
|
|
9062
9208
|
case OpKind.ClassProp:
|
|
9063
9209
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
@@ -9095,6 +9241,21 @@ function extractAttributes(job) {
|
|
|
9095
9241
|
}
|
|
9096
9242
|
}
|
|
9097
9243
|
break;
|
|
9244
|
+
case OpKind.TwoWayListener:
|
|
9245
|
+
if (job.kind !== CompilationJobKind.Host) {
|
|
9246
|
+
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9247
|
+
op.target,
|
|
9248
|
+
BindingKind.Property,
|
|
9249
|
+
null,
|
|
9250
|
+
op.name,
|
|
9251
|
+
null,
|
|
9252
|
+
null,
|
|
9253
|
+
null,
|
|
9254
|
+
SecurityContext.NONE
|
|
9255
|
+
);
|
|
9256
|
+
OpList.insertBefore(extractedAttributeOp, lookupElement(elements, op.target));
|
|
9257
|
+
}
|
|
9258
|
+
break;
|
|
9098
9259
|
}
|
|
9099
9260
|
}
|
|
9100
9261
|
}
|
|
@@ -9126,7 +9287,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9126
9287
|
}
|
|
9127
9288
|
}
|
|
9128
9289
|
|
|
9129
|
-
// bazel-out/
|
|
9290
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9130
9291
|
function lookupElement2(elements, xref) {
|
|
9131
9292
|
const el = elements.get(xref);
|
|
9132
9293
|
if (el === void 0) {
|
|
@@ -9168,6 +9329,12 @@ function specializeBindings(job) {
|
|
|
9168
9329
|
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
9169
9330
|
}
|
|
9170
9331
|
break;
|
|
9332
|
+
case BindingKind.TwoWayProperty:
|
|
9333
|
+
if (!(op.expression instanceof Expression)) {
|
|
9334
|
+
throw new Error(`Expected value of two-way property binding "${op.name}" to be an expression`);
|
|
9335
|
+
}
|
|
9336
|
+
OpList.replace(op, createTwoWayPropertyOp(op.target, op.name, op.expression, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
9337
|
+
break;
|
|
9171
9338
|
case BindingKind.I18n:
|
|
9172
9339
|
case BindingKind.ClassName:
|
|
9173
9340
|
case BindingKind.StyleProperty:
|
|
@@ -9177,7 +9344,7 @@ function specializeBindings(job) {
|
|
|
9177
9344
|
}
|
|
9178
9345
|
}
|
|
9179
9346
|
|
|
9180
|
-
// bazel-out/
|
|
9347
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9181
9348
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9182
9349
|
Identifiers.attribute,
|
|
9183
9350
|
Identifiers.classProp,
|
|
@@ -9204,7 +9371,9 @@ var CHAINABLE = /* @__PURE__ */ new Set([
|
|
|
9204
9371
|
Identifiers.stylePropInterpolateV,
|
|
9205
9372
|
Identifiers.syntheticHostListener,
|
|
9206
9373
|
Identifiers.syntheticHostProperty,
|
|
9207
|
-
Identifiers.templateCreate
|
|
9374
|
+
Identifiers.templateCreate,
|
|
9375
|
+
Identifiers.twoWayProperty,
|
|
9376
|
+
Identifiers.twoWayListener
|
|
9208
9377
|
]);
|
|
9209
9378
|
function chain(job) {
|
|
9210
9379
|
for (const unit of job.units) {
|
|
@@ -9243,7 +9412,7 @@ function chainOperationsInList(opList) {
|
|
|
9243
9412
|
}
|
|
9244
9413
|
}
|
|
9245
9414
|
|
|
9246
|
-
// bazel-out/
|
|
9415
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9247
9416
|
function collapseSingletonInterpolations(job) {
|
|
9248
9417
|
for (const unit of job.units) {
|
|
9249
9418
|
for (const op of unit.update) {
|
|
@@ -9255,7 +9424,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9255
9424
|
}
|
|
9256
9425
|
}
|
|
9257
9426
|
|
|
9258
|
-
// bazel-out/
|
|
9427
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9259
9428
|
function generateConditionalExpressions(job) {
|
|
9260
9429
|
for (const unit of job.units) {
|
|
9261
9430
|
for (const op of unit.ops()) {
|
|
@@ -9292,7 +9461,7 @@ function generateConditionalExpressions(job) {
|
|
|
9292
9461
|
}
|
|
9293
9462
|
}
|
|
9294
9463
|
|
|
9295
|
-
// bazel-out/
|
|
9464
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9296
9465
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9297
9466
|
["&&", BinaryOperator.And],
|
|
9298
9467
|
[">", BinaryOperator.Bigger],
|
|
@@ -9343,7 +9512,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9343
9512
|
return literal(value);
|
|
9344
9513
|
}
|
|
9345
9514
|
|
|
9346
|
-
// bazel-out/
|
|
9515
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9347
9516
|
function collectElementConsts(job) {
|
|
9348
9517
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9349
9518
|
for (const unit of job.units) {
|
|
@@ -9413,7 +9582,7 @@ var ElementAttributes = class {
|
|
|
9413
9582
|
}
|
|
9414
9583
|
get bindings() {
|
|
9415
9584
|
var _a2;
|
|
9416
|
-
return (_a2 = this.
|
|
9585
|
+
return (_a2 = this.propertyBindings) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
9417
9586
|
}
|
|
9418
9587
|
get template() {
|
|
9419
9588
|
var _a2;
|
|
@@ -9427,6 +9596,7 @@ var ElementAttributes = class {
|
|
|
9427
9596
|
this.compatibility = compatibility;
|
|
9428
9597
|
this.known = /* @__PURE__ */ new Map();
|
|
9429
9598
|
this.byKind = /* @__PURE__ */ new Map();
|
|
9599
|
+
this.propertyBindings = null;
|
|
9430
9600
|
this.projectAs = null;
|
|
9431
9601
|
}
|
|
9432
9602
|
isKnown(kind, name, value) {
|
|
@@ -9468,10 +9638,16 @@ var ElementAttributes = class {
|
|
|
9468
9638
|
}
|
|
9469
9639
|
}
|
|
9470
9640
|
arrayFor(kind) {
|
|
9471
|
-
|
|
9472
|
-
|
|
9641
|
+
var _a2;
|
|
9642
|
+
if (kind === BindingKind.Property || kind === BindingKind.TwoWayProperty) {
|
|
9643
|
+
(_a2 = this.propertyBindings) != null ? _a2 : this.propertyBindings = [];
|
|
9644
|
+
return this.propertyBindings;
|
|
9645
|
+
} else {
|
|
9646
|
+
if (!this.byKind.has(kind)) {
|
|
9647
|
+
this.byKind.set(kind, []);
|
|
9648
|
+
}
|
|
9649
|
+
return this.byKind.get(kind);
|
|
9473
9650
|
}
|
|
9474
|
-
return this.byKind.get(kind);
|
|
9475
9651
|
}
|
|
9476
9652
|
};
|
|
9477
9653
|
function getAttributeNameLiterals(namespace, name) {
|
|
@@ -9505,7 +9681,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9505
9681
|
return literalArr(attrArray);
|
|
9506
9682
|
}
|
|
9507
9683
|
|
|
9508
|
-
// bazel-out/
|
|
9684
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9509
9685
|
function convertI18nBindings(job) {
|
|
9510
9686
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9511
9687
|
for (const unit of job.units) {
|
|
@@ -9546,18 +9722,25 @@ function convertI18nBindings(job) {
|
|
|
9546
9722
|
}
|
|
9547
9723
|
}
|
|
9548
9724
|
|
|
9549
|
-
// bazel-out/
|
|
9725
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9550
9726
|
function createDeferDepsFns(job) {
|
|
9727
|
+
var _a2;
|
|
9551
9728
|
for (const unit of job.units) {
|
|
9552
9729
|
for (const op of unit.create) {
|
|
9553
9730
|
if (op.kind === OpKind.Defer) {
|
|
9554
9731
|
if (op.metadata.deps.length === 0) {
|
|
9555
9732
|
continue;
|
|
9556
9733
|
}
|
|
9734
|
+
if (op.resolverFn !== null) {
|
|
9735
|
+
continue;
|
|
9736
|
+
}
|
|
9557
9737
|
const dependencies = [];
|
|
9558
9738
|
for (const dep of op.metadata.deps) {
|
|
9559
9739
|
if (dep.isDeferrable) {
|
|
9560
|
-
const innerFn = arrowFn(
|
|
9740
|
+
const innerFn = arrowFn(
|
|
9741
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
9742
|
+
variable("m").prop(dep.isDefaultImport ? "default" : dep.symbolName)
|
|
9743
|
+
);
|
|
9561
9744
|
const importExpr2 = new DynamicImportExpr(dep.importPath).prop("then").callFn([innerFn]);
|
|
9562
9745
|
dependencies.push(importExpr2);
|
|
9563
9746
|
} else {
|
|
@@ -9568,9 +9751,10 @@ function createDeferDepsFns(job) {
|
|
|
9568
9751
|
if (op.handle.slot === null) {
|
|
9569
9752
|
throw new Error("AssertionError: slot must be assigned bfore extracting defer deps functions");
|
|
9570
9753
|
}
|
|
9754
|
+
const fullPathName = (_a2 = unit.fnName) == null ? void 0 : _a2.replace(`_Template`, ``);
|
|
9571
9755
|
op.resolverFn = job.pool.getSharedFunctionReference(
|
|
9572
9756
|
depsFnExpr,
|
|
9573
|
-
`${
|
|
9757
|
+
`${fullPathName}_Defer_${op.handle.slot}_DepsFn`,
|
|
9574
9758
|
false
|
|
9575
9759
|
);
|
|
9576
9760
|
}
|
|
@@ -9578,7 +9762,7 @@ function createDeferDepsFns(job) {
|
|
|
9578
9762
|
}
|
|
9579
9763
|
}
|
|
9580
9764
|
|
|
9581
|
-
// bazel-out/
|
|
9765
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9582
9766
|
function createI18nContexts(job) {
|
|
9583
9767
|
const attrContextByMessage = /* @__PURE__ */ new Map();
|
|
9584
9768
|
for (const unit of job.units) {
|
|
@@ -9656,7 +9840,7 @@ function createI18nContexts(job) {
|
|
|
9656
9840
|
}
|
|
9657
9841
|
}
|
|
9658
9842
|
|
|
9659
|
-
// bazel-out/
|
|
9843
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
|
|
9660
9844
|
function deduplicateTextBindings(job) {
|
|
9661
9845
|
const seen = /* @__PURE__ */ new Map();
|
|
9662
9846
|
for (const unit of job.units) {
|
|
@@ -9678,7 +9862,7 @@ function deduplicateTextBindings(job) {
|
|
|
9678
9862
|
}
|
|
9679
9863
|
}
|
|
9680
9864
|
|
|
9681
|
-
// bazel-out/
|
|
9865
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9682
9866
|
function configureDeferInstructions(job) {
|
|
9683
9867
|
for (const unit of job.units) {
|
|
9684
9868
|
for (const op of unit.create) {
|
|
@@ -9695,7 +9879,7 @@ function configureDeferInstructions(job) {
|
|
|
9695
9879
|
}
|
|
9696
9880
|
}
|
|
9697
9881
|
|
|
9698
|
-
// bazel-out/
|
|
9882
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9699
9883
|
function resolveDeferTargetNames(job) {
|
|
9700
9884
|
const scopes = /* @__PURE__ */ new Map();
|
|
9701
9885
|
function getScopeForView2(view) {
|
|
@@ -9789,7 +9973,7 @@ var Scope = class {
|
|
|
9789
9973
|
}
|
|
9790
9974
|
};
|
|
9791
9975
|
|
|
9792
|
-
// bazel-out/
|
|
9976
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9793
9977
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9794
9978
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9795
9979
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9816,7 +10000,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9816
10000
|
}
|
|
9817
10001
|
}
|
|
9818
10002
|
|
|
9819
|
-
// bazel-out/
|
|
10003
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9820
10004
|
function expandSafeReads(job) {
|
|
9821
10005
|
for (const unit of job.units) {
|
|
9822
10006
|
for (const op of unit.ops()) {
|
|
@@ -9952,7 +10136,7 @@ function ternaryTransform(e) {
|
|
|
9952
10136
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9953
10137
|
}
|
|
9954
10138
|
|
|
9955
|
-
// bazel-out/
|
|
10139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9956
10140
|
var ESCAPE = "\uFFFD";
|
|
9957
10141
|
var ELEMENT_MARKER = "#";
|
|
9958
10142
|
var TEMPLATE_MARKER = "*";
|
|
@@ -10088,7 +10272,7 @@ function formatValue(value) {
|
|
|
10088
10272
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
10089
10273
|
}
|
|
10090
10274
|
|
|
10091
|
-
// bazel-out/
|
|
10275
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
10092
10276
|
function generateAdvance(job) {
|
|
10093
10277
|
for (const unit of job.units) {
|
|
10094
10278
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -10120,7 +10304,7 @@ function generateAdvance(job) {
|
|
|
10120
10304
|
}
|
|
10121
10305
|
}
|
|
10122
10306
|
|
|
10123
|
-
// bazel-out/
|
|
10307
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
10124
10308
|
function generateProjectionDefs(job) {
|
|
10125
10309
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
10126
10310
|
const selectors = [];
|
|
@@ -10144,7 +10328,7 @@ function generateProjectionDefs(job) {
|
|
|
10144
10328
|
}
|
|
10145
10329
|
}
|
|
10146
10330
|
|
|
10147
|
-
// bazel-out/
|
|
10331
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
10148
10332
|
function generateVariables(job) {
|
|
10149
10333
|
recursivelyProcessView(job.root, null);
|
|
10150
10334
|
}
|
|
@@ -10162,6 +10346,7 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
10162
10346
|
}
|
|
10163
10347
|
break;
|
|
10164
10348
|
case OpKind.Listener:
|
|
10349
|
+
case OpKind.TwoWayListener:
|
|
10165
10350
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
10166
10351
|
break;
|
|
10167
10352
|
}
|
|
@@ -10237,7 +10422,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
10237
10422
|
return newOps;
|
|
10238
10423
|
}
|
|
10239
10424
|
|
|
10240
|
-
// bazel-out/
|
|
10425
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
10241
10426
|
function collectConstExpressions(job) {
|
|
10242
10427
|
for (const unit of job.units) {
|
|
10243
10428
|
for (const op of unit.ops()) {
|
|
@@ -10251,7 +10436,7 @@ function collectConstExpressions(job) {
|
|
|
10251
10436
|
}
|
|
10252
10437
|
}
|
|
10253
10438
|
|
|
10254
|
-
// bazel-out/
|
|
10439
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
10255
10440
|
var STYLE_DOT = "style.";
|
|
10256
10441
|
var CLASS_DOT = "class.";
|
|
10257
10442
|
var STYLE_BANG = "style!";
|
|
@@ -10309,7 +10494,7 @@ function parseProperty(name) {
|
|
|
10309
10494
|
return { property: property2, suffix };
|
|
10310
10495
|
}
|
|
10311
10496
|
|
|
10312
|
-
// bazel-out/
|
|
10497
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10313
10498
|
function mapLiteral(obj, quoted = false) {
|
|
10314
10499
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10315
10500
|
key,
|
|
@@ -10318,7 +10503,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10318
10503
|
})));
|
|
10319
10504
|
}
|
|
10320
10505
|
|
|
10321
|
-
// bazel-out/
|
|
10506
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10322
10507
|
var IcuSerializerVisitor = class {
|
|
10323
10508
|
visitText(text2) {
|
|
10324
10509
|
return text2.value;
|
|
@@ -10352,7 +10537,7 @@ function serializeIcuNode(icu) {
|
|
|
10352
10537
|
return icu.visit(serializer);
|
|
10353
10538
|
}
|
|
10354
10539
|
|
|
10355
|
-
// bazel-out/
|
|
10540
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10356
10541
|
var TokenType;
|
|
10357
10542
|
(function(TokenType2) {
|
|
10358
10543
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10713,7 +10898,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10713
10898
|
return result;
|
|
10714
10899
|
}
|
|
10715
10900
|
|
|
10716
|
-
// bazel-out/
|
|
10901
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10717
10902
|
var SplitInterpolation = class {
|
|
10718
10903
|
constructor(strings, expressions, offsets) {
|
|
10719
10904
|
this.strings = strings;
|
|
@@ -10733,15 +10918,11 @@ var Parser = class {
|
|
|
10733
10918
|
this._lexer = _lexer;
|
|
10734
10919
|
this.errors = [];
|
|
10735
10920
|
}
|
|
10736
|
-
parseAction(input,
|
|
10921
|
+
parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
10737
10922
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
10738
10923
|
const sourceToLex = this._stripComments(input);
|
|
10739
10924
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
10740
|
-
|
|
10741
|
-
if (isAssignmentEvent) {
|
|
10742
|
-
flags |= 2;
|
|
10743
|
-
}
|
|
10744
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();
|
|
10925
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1, this.errors, 0).parseChain();
|
|
10745
10926
|
return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
|
|
10746
10927
|
}
|
|
10747
10928
|
parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
@@ -11094,7 +11275,7 @@ var _ParseAST = class {
|
|
|
11094
11275
|
let result = this.parseExpression();
|
|
11095
11276
|
if (this.consumeOptionalOperator("|")) {
|
|
11096
11277
|
if (this.parseFlags & 1) {
|
|
11097
|
-
this.error(
|
|
11278
|
+
this.error(`Cannot have a pipe in an action expression`);
|
|
11098
11279
|
}
|
|
11099
11280
|
do {
|
|
11100
11281
|
const nameStart = this.inputIndex;
|
|
@@ -11388,14 +11569,14 @@ var _ParseAST = class {
|
|
|
11388
11569
|
const nameSpan = this.sourceSpan(nameStart);
|
|
11389
11570
|
let receiver;
|
|
11390
11571
|
if (isSafe) {
|
|
11391
|
-
if (this.
|
|
11572
|
+
if (this.consumeOptionalOperator("=")) {
|
|
11392
11573
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
11393
11574
|
receiver = new EmptyExpr(this.span(start), this.sourceSpan(start));
|
|
11394
11575
|
} else {
|
|
11395
11576
|
receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
11396
11577
|
}
|
|
11397
11578
|
} else {
|
|
11398
|
-
if (this.
|
|
11579
|
+
if (this.consumeOptionalOperator("=")) {
|
|
11399
11580
|
if (!(this.parseFlags & 1)) {
|
|
11400
11581
|
this.error("Bindings cannot contain assignments");
|
|
11401
11582
|
return new EmptyExpr(this.span(start), this.sourceSpan(start));
|
|
@@ -11419,14 +11600,6 @@ var _ParseAST = class {
|
|
|
11419
11600
|
const sourceSpan = this.sourceSpan(start);
|
|
11420
11601
|
return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) : new Call(span, sourceSpan, receiver, args, argumentSpan);
|
|
11421
11602
|
}
|
|
11422
|
-
consumeOptionalAssignment() {
|
|
11423
|
-
if (this.parseFlags & 2 && this.next.isOperator("!") && this.peek(1).isOperator("=")) {
|
|
11424
|
-
this.advance();
|
|
11425
|
-
this.advance();
|
|
11426
|
-
return true;
|
|
11427
|
-
}
|
|
11428
|
-
return this.consumeOptionalOperator("=");
|
|
11429
|
-
}
|
|
11430
11603
|
parseCallArguments() {
|
|
11431
11604
|
if (this.next.isCharacter($RPAREN))
|
|
11432
11605
|
return [];
|
|
@@ -11607,7 +11780,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11607
11780
|
return offsetMap;
|
|
11608
11781
|
}
|
|
11609
11782
|
|
|
11610
|
-
// bazel-out/
|
|
11783
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11611
11784
|
var NodeWithI18n = class {
|
|
11612
11785
|
constructor(sourceSpan, i18n2) {
|
|
11613
11786
|
this.sourceSpan = sourceSpan;
|
|
@@ -11759,11 +11932,11 @@ var RecursiveVisitor = class {
|
|
|
11759
11932
|
}
|
|
11760
11933
|
};
|
|
11761
11934
|
|
|
11762
|
-
// bazel-out/
|
|
11935
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11763
11936
|
var ElementSchemaRegistry = class {
|
|
11764
11937
|
};
|
|
11765
11938
|
|
|
11766
|
-
// bazel-out/
|
|
11939
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11767
11940
|
var BOOLEAN = "boolean";
|
|
11768
11941
|
var NUMBER = "number";
|
|
11769
11942
|
var STRING = "string";
|
|
@@ -12116,7 +12289,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
12116
12289
|
}
|
|
12117
12290
|
}
|
|
12118
12291
|
|
|
12119
|
-
// bazel-out/
|
|
12292
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
12120
12293
|
var HtmlTagDefinition = class {
|
|
12121
12294
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
12122
12295
|
this.closedByChildren = {};
|
|
@@ -12234,7 +12407,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
12234
12407
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
12235
12408
|
}
|
|
12236
12409
|
|
|
12237
|
-
// bazel-out/
|
|
12410
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
12238
12411
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
12239
12412
|
"A": "LINK",
|
|
12240
12413
|
"B": "BOLD_TEXT",
|
|
@@ -12356,7 +12529,7 @@ var PlaceholderRegistry = class {
|
|
|
12356
12529
|
}
|
|
12357
12530
|
};
|
|
12358
12531
|
|
|
12359
|
-
// bazel-out/
|
|
12532
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12360
12533
|
var _expParser = new Parser(new Lexer());
|
|
12361
12534
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12362
12535
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12535,14 +12708,14 @@ function extractPlaceholderName(input) {
|
|
|
12535
12708
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12536
12709
|
}
|
|
12537
12710
|
|
|
12538
|
-
// bazel-out/
|
|
12711
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12539
12712
|
var I18nError = class extends ParseError {
|
|
12540
12713
|
constructor(span, msg) {
|
|
12541
12714
|
super(span, msg);
|
|
12542
12715
|
}
|
|
12543
12716
|
};
|
|
12544
12717
|
|
|
12545
|
-
// bazel-out/
|
|
12718
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12546
12719
|
var NAMED_ENTITIES = {
|
|
12547
12720
|
"AElig": "\xC6",
|
|
12548
12721
|
"AMP": "&",
|
|
@@ -14673,7 +14846,7 @@ var NAMED_ENTITIES = {
|
|
|
14673
14846
|
var NGSP_UNICODE = "\uE500";
|
|
14674
14847
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14675
14848
|
|
|
14676
|
-
// bazel-out/
|
|
14849
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14677
14850
|
var TokenError = class extends ParseError {
|
|
14678
14851
|
constructor(errorMsg, tokenType, span) {
|
|
14679
14852
|
super(span, errorMsg);
|
|
@@ -15594,7 +15767,7 @@ var CursorError = class {
|
|
|
15594
15767
|
}
|
|
15595
15768
|
};
|
|
15596
15769
|
|
|
15597
|
-
// bazel-out/
|
|
15770
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15598
15771
|
var TreeError = class extends ParseError {
|
|
15599
15772
|
static create(elementName, span, msg) {
|
|
15600
15773
|
return new TreeError(elementName, span, msg);
|
|
@@ -15978,7 +16151,7 @@ function decodeEntity(match, entity) {
|
|
|
15978
16151
|
return match;
|
|
15979
16152
|
}
|
|
15980
16153
|
|
|
15981
|
-
// bazel-out/
|
|
16154
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15982
16155
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15983
16156
|
"iframe|srcdoc",
|
|
15984
16157
|
"*|innerhtml",
|
|
@@ -15993,7 +16166,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15993
16166
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15994
16167
|
}
|
|
15995
16168
|
|
|
15996
|
-
// bazel-out/
|
|
16169
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15997
16170
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15998
16171
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15999
16172
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -16150,7 +16323,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
16150
16323
|
return jsDocComment(tags);
|
|
16151
16324
|
}
|
|
16152
16325
|
|
|
16153
|
-
// bazel-out/
|
|
16326
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
16154
16327
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
16155
16328
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
16156
16329
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -16201,7 +16374,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
16201
16374
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
16202
16375
|
}
|
|
16203
16376
|
|
|
16204
|
-
// bazel-out/
|
|
16377
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
16205
16378
|
function createLocalizeStatements(variable2, message, params) {
|
|
16206
16379
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
16207
16380
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16290,7 +16463,7 @@ function createEmptyMessagePart(location) {
|
|
|
16290
16463
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16291
16464
|
}
|
|
16292
16465
|
|
|
16293
|
-
// bazel-out/
|
|
16466
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16294
16467
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16295
16468
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16296
16469
|
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
@@ -16451,7 +16624,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16451
16624
|
return variable(name);
|
|
16452
16625
|
}
|
|
16453
16626
|
|
|
16454
|
-
// bazel-out/
|
|
16627
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16455
16628
|
function convertI18nText(job) {
|
|
16456
16629
|
var _a2, _b2, _c2;
|
|
16457
16630
|
for (const unit of job.units) {
|
|
@@ -16521,7 +16694,7 @@ function convertI18nText(job) {
|
|
|
16521
16694
|
}
|
|
16522
16695
|
}
|
|
16523
16696
|
|
|
16524
|
-
// bazel-out/
|
|
16697
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16525
16698
|
function liftLocalRefs(job) {
|
|
16526
16699
|
for (const unit of job.units) {
|
|
16527
16700
|
for (const op of unit.create) {
|
|
@@ -16551,7 +16724,7 @@ function serializeLocalRefs(refs) {
|
|
|
16551
16724
|
return literalArr(constRefs);
|
|
16552
16725
|
}
|
|
16553
16726
|
|
|
16554
|
-
// bazel-out/
|
|
16727
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16555
16728
|
function emitNamespaceChanges(job) {
|
|
16556
16729
|
for (const unit of job.units) {
|
|
16557
16730
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16567,7 +16740,7 @@ function emitNamespaceChanges(job) {
|
|
|
16567
16740
|
}
|
|
16568
16741
|
}
|
|
16569
16742
|
|
|
16570
|
-
// bazel-out/
|
|
16743
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16571
16744
|
function parse(value) {
|
|
16572
16745
|
const styles = [];
|
|
16573
16746
|
let i = 0;
|
|
@@ -16628,13 +16801,13 @@ function hyphenate2(value) {
|
|
|
16628
16801
|
}).toLowerCase();
|
|
16629
16802
|
}
|
|
16630
16803
|
|
|
16631
|
-
// bazel-out/
|
|
16804
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16632
16805
|
function nameFunctionsAndVariables(job) {
|
|
16633
16806
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16634
16807
|
}
|
|
16635
16808
|
function addNamesToView(unit, baseName, state, compatibility) {
|
|
16636
16809
|
if (unit.fnName === null) {
|
|
16637
|
-
unit.fnName = sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`);
|
|
16810
|
+
unit.fnName = unit.job.pool.uniqueName(sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`), false);
|
|
16638
16811
|
}
|
|
16639
16812
|
const varNames = /* @__PURE__ */ new Map();
|
|
16640
16813
|
for (const op of unit.ops()) {
|
|
@@ -16664,6 +16837,15 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
16664
16837
|
}
|
|
16665
16838
|
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
16666
16839
|
break;
|
|
16840
|
+
case OpKind.TwoWayListener:
|
|
16841
|
+
if (op.handlerFnName !== null) {
|
|
16842
|
+
break;
|
|
16843
|
+
}
|
|
16844
|
+
if (op.targetSlot.slot === null) {
|
|
16845
|
+
throw new Error(`Expected a slot to be assigned`);
|
|
16846
|
+
}
|
|
16847
|
+
op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${op.tag.replace("-", "_")}_${op.name}_${op.targetSlot.slot}_listener`);
|
|
16848
|
+
break;
|
|
16667
16849
|
case OpKind.Variable:
|
|
16668
16850
|
varNames.set(op.xref, getVariableName(unit, op.variable, state));
|
|
16669
16851
|
break;
|
|
@@ -16748,11 +16930,11 @@ function stripImportant(name) {
|
|
|
16748
16930
|
return name;
|
|
16749
16931
|
}
|
|
16750
16932
|
|
|
16751
|
-
// bazel-out/
|
|
16933
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16752
16934
|
function mergeNextContextExpressions(job) {
|
|
16753
16935
|
for (const unit of job.units) {
|
|
16754
16936
|
for (const op of unit.create) {
|
|
16755
|
-
if (op.kind === OpKind.Listener) {
|
|
16937
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
16756
16938
|
mergeNextContextsInOps(op.handlerOps);
|
|
16757
16939
|
}
|
|
16758
16940
|
}
|
|
@@ -16794,7 +16976,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16794
16976
|
}
|
|
16795
16977
|
}
|
|
16796
16978
|
|
|
16797
|
-
// bazel-out/
|
|
16979
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16798
16980
|
var CONTAINER_TAG = "ng-container";
|
|
16799
16981
|
function generateNgContainerOps(job) {
|
|
16800
16982
|
for (const unit of job.units) {
|
|
@@ -16811,7 +16993,7 @@ function generateNgContainerOps(job) {
|
|
|
16811
16993
|
}
|
|
16812
16994
|
}
|
|
16813
16995
|
|
|
16814
|
-
// bazel-out/
|
|
16996
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16815
16997
|
function lookupElement3(elements, xref) {
|
|
16816
16998
|
const el = elements.get(xref);
|
|
16817
16999
|
if (el === void 0) {
|
|
@@ -16841,7 +17023,7 @@ function disableBindings(job) {
|
|
|
16841
17023
|
}
|
|
16842
17024
|
}
|
|
16843
17025
|
|
|
16844
|
-
// bazel-out/
|
|
17026
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16845
17027
|
function generateNullishCoalesceExpressions(job) {
|
|
16846
17028
|
for (const unit of job.units) {
|
|
16847
17029
|
for (const op of unit.ops()) {
|
|
@@ -16857,7 +17039,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16857
17039
|
}
|
|
16858
17040
|
}
|
|
16859
17041
|
|
|
16860
|
-
// bazel-out/
|
|
17042
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16861
17043
|
function kindTest(kind) {
|
|
16862
17044
|
return (op) => op.kind === kind;
|
|
16863
17045
|
}
|
|
@@ -16866,9 +17048,15 @@ function kindWithInterpolationTest(kind, interpolation) {
|
|
|
16866
17048
|
return op.kind === kind && interpolation === op.expression instanceof Interpolation2;
|
|
16867
17049
|
};
|
|
16868
17050
|
}
|
|
17051
|
+
function basicListenerKindTest(op) {
|
|
17052
|
+
return op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) || op.kind === OpKind.TwoWayListener;
|
|
17053
|
+
}
|
|
17054
|
+
function nonInterpolationPropertyKindTest(op) {
|
|
17055
|
+
return (op.kind === OpKind.Property || op.kind === OpKind.TwoWayProperty) && !(op.expression instanceof Interpolation2);
|
|
17056
|
+
}
|
|
16869
17057
|
var CREATE_ORDERING = [
|
|
16870
17058
|
{ test: (op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener },
|
|
16871
|
-
{ test:
|
|
17059
|
+
{ test: basicListenerKindTest }
|
|
16872
17060
|
];
|
|
16873
17061
|
var UPDATE_ORDERING = [
|
|
16874
17062
|
{ test: kindTest(OpKind.StyleMap), transform: keepLast },
|
|
@@ -16877,7 +17065,7 @@ var UPDATE_ORDERING = [
|
|
|
16877
17065
|
{ test: kindTest(OpKind.ClassProp) },
|
|
16878
17066
|
{ test: kindWithInterpolationTest(OpKind.Attribute, true) },
|
|
16879
17067
|
{ test: kindWithInterpolationTest(OpKind.Property, true) },
|
|
16880
|
-
{ test:
|
|
17068
|
+
{ test: nonInterpolationPropertyKindTest },
|
|
16881
17069
|
{ test: kindWithInterpolationTest(OpKind.Attribute, false) }
|
|
16882
17070
|
];
|
|
16883
17071
|
var UPDATE_HOST_ORDERING = [
|
|
@@ -16891,11 +17079,13 @@ var UPDATE_HOST_ORDERING = [
|
|
|
16891
17079
|
];
|
|
16892
17080
|
var handledOpKinds = /* @__PURE__ */ new Set([
|
|
16893
17081
|
OpKind.Listener,
|
|
17082
|
+
OpKind.TwoWayListener,
|
|
16894
17083
|
OpKind.StyleMap,
|
|
16895
17084
|
OpKind.ClassMap,
|
|
16896
17085
|
OpKind.StyleProp,
|
|
16897
17086
|
OpKind.ClassProp,
|
|
16898
17087
|
OpKind.Property,
|
|
17088
|
+
OpKind.TwoWayProperty,
|
|
16899
17089
|
OpKind.HostProperty,
|
|
16900
17090
|
OpKind.Attribute
|
|
16901
17091
|
]);
|
|
@@ -16939,7 +17129,7 @@ function keepLast(ops) {
|
|
|
16939
17129
|
return ops.slice(ops.length - 1);
|
|
16940
17130
|
}
|
|
16941
17131
|
|
|
16942
|
-
// bazel-out/
|
|
17132
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16943
17133
|
function parseExtractedStyles(job) {
|
|
16944
17134
|
const elements = /* @__PURE__ */ new Map();
|
|
16945
17135
|
for (const unit of job.units) {
|
|
@@ -16974,7 +17164,7 @@ function parseExtractedStyles(job) {
|
|
|
16974
17164
|
}
|
|
16975
17165
|
}
|
|
16976
17166
|
|
|
16977
|
-
// bazel-out/
|
|
17167
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16978
17168
|
function removeContentSelectors(job) {
|
|
16979
17169
|
for (const unit of job.units) {
|
|
16980
17170
|
const elements = createOpXrefMap(unit);
|
|
@@ -17001,7 +17191,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
17001
17191
|
return el;
|
|
17002
17192
|
}
|
|
17003
17193
|
|
|
17004
|
-
// bazel-out/
|
|
17194
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
17005
17195
|
function createPipes(job) {
|
|
17006
17196
|
for (const unit of job.units) {
|
|
17007
17197
|
processPipeBindingsInView(unit);
|
|
@@ -17049,7 +17239,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
17049
17239
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
17050
17240
|
}
|
|
17051
17241
|
|
|
17052
|
-
// bazel-out/
|
|
17242
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
17053
17243
|
function createVariadicPipes(job) {
|
|
17054
17244
|
for (const unit of job.units) {
|
|
17055
17245
|
for (const op of unit.update) {
|
|
@@ -17066,7 +17256,7 @@ function createVariadicPipes(job) {
|
|
|
17066
17256
|
}
|
|
17067
17257
|
}
|
|
17068
17258
|
|
|
17069
|
-
// bazel-out/
|
|
17259
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
17070
17260
|
function propagateI18nBlocks(job) {
|
|
17071
17261
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
17072
17262
|
}
|
|
@@ -17120,7 +17310,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
17120
17310
|
}
|
|
17121
17311
|
}
|
|
17122
17312
|
|
|
17123
|
-
// bazel-out/
|
|
17313
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
17124
17314
|
function extractPureFunctions(job) {
|
|
17125
17315
|
for (const view of job.units) {
|
|
17126
17316
|
for (const op of view.ops()) {
|
|
@@ -17162,7 +17352,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
17162
17352
|
}
|
|
17163
17353
|
};
|
|
17164
17354
|
|
|
17165
|
-
// bazel-out/
|
|
17355
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
17166
17356
|
function generatePureLiteralStructures(job) {
|
|
17167
17357
|
for (const unit of job.units) {
|
|
17168
17358
|
for (const op of unit.update) {
|
|
@@ -17209,7 +17399,7 @@ function transformLiteralMap(expr) {
|
|
|
17209
17399
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
17210
17400
|
}
|
|
17211
17401
|
|
|
17212
|
-
// bazel-out/
|
|
17402
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
17213
17403
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
17214
17404
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
17215
17405
|
}
|
|
@@ -17275,6 +17465,12 @@ function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpa
|
|
|
17275
17465
|
}
|
|
17276
17466
|
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
17277
17467
|
}
|
|
17468
|
+
function twoWayBindingSet(target, value) {
|
|
17469
|
+
return importExpr(Identifiers.twoWayBindingSet).callFn([target, value]);
|
|
17470
|
+
}
|
|
17471
|
+
function twoWayListener(name, handlerFn, sourceSpan) {
|
|
17472
|
+
return call(Identifiers.twoWayListener, [literal(name), handlerFn], sourceSpan);
|
|
17473
|
+
}
|
|
17278
17474
|
function pipe(slot, name) {
|
|
17279
17475
|
return call(Identifiers.pipe, [
|
|
17280
17476
|
literal(slot),
|
|
@@ -17435,6 +17631,13 @@ function property(name, expression, sanitizer, sourceSpan) {
|
|
|
17435
17631
|
}
|
|
17436
17632
|
return call(Identifiers.property, args, sourceSpan);
|
|
17437
17633
|
}
|
|
17634
|
+
function twoWayProperty(name, expression, sanitizer, sourceSpan) {
|
|
17635
|
+
const args = [literal(name), expression];
|
|
17636
|
+
if (sanitizer !== null) {
|
|
17637
|
+
args.push(sanitizer);
|
|
17638
|
+
}
|
|
17639
|
+
return call(Identifiers.twoWayProperty, args, sourceSpan);
|
|
17640
|
+
}
|
|
17438
17641
|
function attribute(name, expression, sanitizer, namespace) {
|
|
17439
17642
|
const args = [literal(name), expression];
|
|
17440
17643
|
if (sanitizer !== null || namespace !== null) {
|
|
@@ -17731,7 +17934,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17731
17934
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17732
17935
|
}
|
|
17733
17936
|
|
|
17734
|
-
// bazel-out/
|
|
17937
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17735
17938
|
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
17736
17939
|
["window", Identifiers.resolveWindow],
|
|
17737
17940
|
["document", Identifiers.resolveDocument],
|
|
@@ -17811,6 +18014,9 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17811
18014
|
}
|
|
17812
18015
|
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
|
|
17813
18016
|
break;
|
|
18017
|
+
case OpKind.TwoWayListener:
|
|
18018
|
+
OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
|
|
18019
|
+
break;
|
|
17814
18020
|
case OpKind.Variable:
|
|
17815
18021
|
if (op.variable.name === null) {
|
|
17816
18022
|
throw new Error(`AssertionError: unnamed variable ${op.xref}`);
|
|
@@ -17917,6 +18123,9 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17917
18123
|
OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
17918
18124
|
}
|
|
17919
18125
|
break;
|
|
18126
|
+
case OpKind.TwoWayProperty:
|
|
18127
|
+
OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
18128
|
+
break;
|
|
17920
18129
|
case OpKind.StyleProp:
|
|
17921
18130
|
if (op.expression instanceof Interpolation2) {
|
|
17922
18131
|
OpList.replace(op, stylePropInterpolate(op.name, op.expression.strings, op.expression.expressions, op.unit, op.sourceSpan));
|
|
@@ -18007,6 +18216,8 @@ function reifyIrExpression(expr) {
|
|
|
18007
18216
|
return reference(expr.targetSlot.slot + 1 + expr.offset);
|
|
18008
18217
|
case ExpressionKind.LexicalRead:
|
|
18009
18218
|
throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);
|
|
18219
|
+
case ExpressionKind.TwoWayBindingSet:
|
|
18220
|
+
throw new Error(`AssertionError: unresolved TwoWayBindingSet`);
|
|
18010
18221
|
case ExpressionKind.RestoreView:
|
|
18011
18222
|
if (typeof expr.view === "number") {
|
|
18012
18223
|
throw new Error(`AssertionError: unresolved RestoreView`);
|
|
@@ -18064,7 +18275,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
18064
18275
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
18065
18276
|
}
|
|
18066
18277
|
|
|
18067
|
-
// bazel-out/
|
|
18278
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
18068
18279
|
function removeEmptyBindings(job) {
|
|
18069
18280
|
for (const unit of job.units) {
|
|
18070
18281
|
for (const op of unit.update) {
|
|
@@ -18085,7 +18296,7 @@ function removeEmptyBindings(job) {
|
|
|
18085
18296
|
}
|
|
18086
18297
|
}
|
|
18087
18298
|
|
|
18088
|
-
// bazel-out/
|
|
18299
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
18089
18300
|
function removeI18nContexts(job) {
|
|
18090
18301
|
for (const unit of job.units) {
|
|
18091
18302
|
for (const op of unit.create) {
|
|
@@ -18101,7 +18312,7 @@ function removeI18nContexts(job) {
|
|
|
18101
18312
|
}
|
|
18102
18313
|
}
|
|
18103
18314
|
|
|
18104
|
-
// bazel-out/
|
|
18315
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
18105
18316
|
function removeUnusedI18nAttributesOps(job) {
|
|
18106
18317
|
for (const unit of job.units) {
|
|
18107
18318
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -18123,7 +18334,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
18123
18334
|
}
|
|
18124
18335
|
}
|
|
18125
18336
|
|
|
18126
|
-
// bazel-out/
|
|
18337
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
18127
18338
|
function resolveContexts(job) {
|
|
18128
18339
|
for (const unit of job.units) {
|
|
18129
18340
|
processLexicalScope(unit, unit.create);
|
|
@@ -18143,6 +18354,7 @@ function processLexicalScope(view, ops) {
|
|
|
18143
18354
|
}
|
|
18144
18355
|
break;
|
|
18145
18356
|
case OpKind.Listener:
|
|
18357
|
+
case OpKind.TwoWayListener:
|
|
18146
18358
|
processLexicalScope(view, op.handlerOps);
|
|
18147
18359
|
break;
|
|
18148
18360
|
}
|
|
@@ -18164,7 +18376,7 @@ function processLexicalScope(view, ops) {
|
|
|
18164
18376
|
}
|
|
18165
18377
|
}
|
|
18166
18378
|
|
|
18167
|
-
// bazel-out/
|
|
18379
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
18168
18380
|
function resolveDollarEvent(job) {
|
|
18169
18381
|
for (const unit of job.units) {
|
|
18170
18382
|
transformDollarEvent(unit, unit.create);
|
|
@@ -18173,10 +18385,12 @@ function resolveDollarEvent(job) {
|
|
|
18173
18385
|
}
|
|
18174
18386
|
function transformDollarEvent(unit, ops) {
|
|
18175
18387
|
for (const op of ops) {
|
|
18176
|
-
if (op.kind === OpKind.Listener) {
|
|
18388
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18177
18389
|
transformExpressionsInOp(op, (expr) => {
|
|
18178
18390
|
if (expr instanceof LexicalReadExpr && expr.name === "$event") {
|
|
18179
|
-
op.
|
|
18391
|
+
if (op.kind === OpKind.Listener) {
|
|
18392
|
+
op.consumesDollarEvent = true;
|
|
18393
|
+
}
|
|
18180
18394
|
return new ReadVarExpr(expr.name);
|
|
18181
18395
|
}
|
|
18182
18396
|
return expr;
|
|
@@ -18185,7 +18399,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
18185
18399
|
}
|
|
18186
18400
|
}
|
|
18187
18401
|
|
|
18188
|
-
// bazel-out/
|
|
18402
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
18189
18403
|
function resolveI18nElementPlaceholders(job) {
|
|
18190
18404
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
18191
18405
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -18364,7 +18578,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
18364
18578
|
params.set(placeholder, values);
|
|
18365
18579
|
}
|
|
18366
18580
|
|
|
18367
|
-
// bazel-out/
|
|
18581
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
18368
18582
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18369
18583
|
var _a2;
|
|
18370
18584
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
@@ -18417,7 +18631,7 @@ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
|
|
|
18417
18631
|
}
|
|
18418
18632
|
}
|
|
18419
18633
|
|
|
18420
|
-
// bazel-out/
|
|
18634
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
18421
18635
|
function resolveNames(job) {
|
|
18422
18636
|
for (const unit of job.units) {
|
|
18423
18637
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18446,12 +18660,13 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18446
18660
|
}
|
|
18447
18661
|
break;
|
|
18448
18662
|
case OpKind.Listener:
|
|
18663
|
+
case OpKind.TwoWayListener:
|
|
18449
18664
|
processLexicalScope2(unit, op.handlerOps, savedView);
|
|
18450
18665
|
break;
|
|
18451
18666
|
}
|
|
18452
18667
|
}
|
|
18453
18668
|
for (const op of ops) {
|
|
18454
|
-
if (op.kind == OpKind.Listener) {
|
|
18669
|
+
if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18455
18670
|
continue;
|
|
18456
18671
|
}
|
|
18457
18672
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
@@ -18481,7 +18696,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18481
18696
|
}
|
|
18482
18697
|
}
|
|
18483
18698
|
|
|
18484
|
-
// bazel-out/
|
|
18699
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18485
18700
|
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
18486
18701
|
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
18487
18702
|
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
@@ -18551,7 +18766,54 @@ function getOnlySecurityContext(securityContext) {
|
|
|
18551
18766
|
return securityContext;
|
|
18552
18767
|
}
|
|
18553
18768
|
|
|
18554
|
-
// bazel-out/
|
|
18769
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/transform_two_way_binding_set.mjs
|
|
18770
|
+
function transformTwoWayBindingSet(job) {
|
|
18771
|
+
for (const unit of job.units) {
|
|
18772
|
+
for (const op of unit.create) {
|
|
18773
|
+
if (op.kind === OpKind.TwoWayListener) {
|
|
18774
|
+
transformExpressionsInOp(op, (expr) => {
|
|
18775
|
+
if (expr instanceof TwoWayBindingSetExpr) {
|
|
18776
|
+
return wrapAction(expr.target, expr.value);
|
|
18777
|
+
}
|
|
18778
|
+
return expr;
|
|
18779
|
+
}, VisitorContextFlag.InChildOperation);
|
|
18780
|
+
}
|
|
18781
|
+
}
|
|
18782
|
+
}
|
|
18783
|
+
}
|
|
18784
|
+
function wrapSetOperation(target, value) {
|
|
18785
|
+
return twoWayBindingSet(target, value).or(target.set(value));
|
|
18786
|
+
}
|
|
18787
|
+
function isReadExpression2(value) {
|
|
18788
|
+
return value instanceof ReadPropExpr || value instanceof ReadKeyExpr;
|
|
18789
|
+
}
|
|
18790
|
+
function wrapAction(target, value) {
|
|
18791
|
+
if (isReadExpression2(target)) {
|
|
18792
|
+
return wrapSetOperation(target, value);
|
|
18793
|
+
}
|
|
18794
|
+
if (target instanceof BinaryOperatorExpr && isReadExpression2(target.rhs)) {
|
|
18795
|
+
return new BinaryOperatorExpr(target.operator, target.lhs, wrapSetOperation(target.rhs, value));
|
|
18796
|
+
}
|
|
18797
|
+
if (target instanceof ConditionalExpr && isReadExpression2(target.falseCase)) {
|
|
18798
|
+
return new ConditionalExpr(target.condition, target.trueCase, wrapSetOperation(target.falseCase, value));
|
|
18799
|
+
}
|
|
18800
|
+
if (target instanceof NotExpr) {
|
|
18801
|
+
let expr = target.condition;
|
|
18802
|
+
while (true) {
|
|
18803
|
+
if (expr instanceof NotExpr) {
|
|
18804
|
+
expr = expr.condition;
|
|
18805
|
+
} else {
|
|
18806
|
+
if (isReadExpression2(expr)) {
|
|
18807
|
+
return wrapSetOperation(expr, value);
|
|
18808
|
+
}
|
|
18809
|
+
break;
|
|
18810
|
+
}
|
|
18811
|
+
}
|
|
18812
|
+
}
|
|
18813
|
+
throw new Error(`Unsupported expression in two-way action binding.`);
|
|
18814
|
+
}
|
|
18815
|
+
|
|
18816
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18555
18817
|
function saveAndRestoreView(job) {
|
|
18556
18818
|
for (const unit of job.units) {
|
|
18557
18819
|
unit.create.prepend([
|
|
@@ -18562,7 +18824,7 @@ function saveAndRestoreView(job) {
|
|
|
18562
18824
|
}, new GetCurrentViewExpr(), VariableFlags.None)
|
|
18563
18825
|
]);
|
|
18564
18826
|
for (const op of unit.create) {
|
|
18565
|
-
if (op.kind !== OpKind.Listener) {
|
|
18827
|
+
if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {
|
|
18566
18828
|
continue;
|
|
18567
18829
|
}
|
|
18568
18830
|
let needsRestoreView = unit !== job.root;
|
|
@@ -18596,7 +18858,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18596
18858
|
}
|
|
18597
18859
|
}
|
|
18598
18860
|
|
|
18599
|
-
// bazel-out/
|
|
18861
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18600
18862
|
function allocateSlots(job) {
|
|
18601
18863
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18602
18864
|
for (const unit of job.units) {
|
|
@@ -18621,7 +18883,7 @@ function allocateSlots(job) {
|
|
|
18621
18883
|
}
|
|
18622
18884
|
}
|
|
18623
18885
|
|
|
18624
|
-
// bazel-out/
|
|
18886
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18625
18887
|
function specializeStyleBindings(job) {
|
|
18626
18888
|
for (const unit of job.units) {
|
|
18627
18889
|
for (const op of unit.update) {
|
|
@@ -18651,7 +18913,7 @@ function specializeStyleBindings(job) {
|
|
|
18651
18913
|
}
|
|
18652
18914
|
}
|
|
18653
18915
|
|
|
18654
|
-
// bazel-out/
|
|
18916
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18655
18917
|
function generateTemporaryVariables(job) {
|
|
18656
18918
|
for (const unit of job.units) {
|
|
18657
18919
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18695,7 +18957,7 @@ function generateTemporaries(ops) {
|
|
|
18695
18957
|
});
|
|
18696
18958
|
generatedStatements.push(...Array.from(new Set(defs.values())).map((name) => createStatementOp(new DeclareVarStmt(name))));
|
|
18697
18959
|
opCount++;
|
|
18698
|
-
if (op.kind === OpKind.Listener) {
|
|
18960
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18699
18961
|
op.handlerOps.prepend(generateTemporaries(op.handlerOps));
|
|
18700
18962
|
}
|
|
18701
18963
|
}
|
|
@@ -18709,7 +18971,7 @@ function assignName(names, expr) {
|
|
|
18709
18971
|
expr.name = name;
|
|
18710
18972
|
}
|
|
18711
18973
|
|
|
18712
|
-
// bazel-out/
|
|
18974
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18713
18975
|
function generateTrackFns(job) {
|
|
18714
18976
|
for (const unit of job.units) {
|
|
18715
18977
|
for (const op of unit.create) {
|
|
@@ -18742,7 +19004,7 @@ function generateTrackFns(job) {
|
|
|
18742
19004
|
}
|
|
18743
19005
|
}
|
|
18744
19006
|
|
|
18745
|
-
// bazel-out/
|
|
19007
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18746
19008
|
function optimizeTrackFns(job) {
|
|
18747
19009
|
for (const unit of job.units) {
|
|
18748
19010
|
for (const op of unit.create) {
|
|
@@ -18789,7 +19051,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18789
19051
|
return true;
|
|
18790
19052
|
}
|
|
18791
19053
|
|
|
18792
|
-
// bazel-out/
|
|
19054
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18793
19055
|
function generateTrackVariables(job) {
|
|
18794
19056
|
for (const unit of job.units) {
|
|
18795
19057
|
for (const op of unit.create) {
|
|
@@ -18810,7 +19072,7 @@ function generateTrackVariables(job) {
|
|
|
18810
19072
|
}
|
|
18811
19073
|
}
|
|
18812
19074
|
|
|
18813
|
-
// bazel-out/
|
|
19075
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18814
19076
|
function countVariables(job) {
|
|
18815
19077
|
for (const unit of job.units) {
|
|
18816
19078
|
let varCount = 0;
|
|
@@ -18875,6 +19137,8 @@ function varsUsedByOp(op) {
|
|
|
18875
19137
|
slots += op.expression.expressions.length;
|
|
18876
19138
|
}
|
|
18877
19139
|
return slots;
|
|
19140
|
+
case OpKind.TwoWayProperty:
|
|
19141
|
+
return 1;
|
|
18878
19142
|
case OpKind.StyleProp:
|
|
18879
19143
|
case OpKind.ClassProp:
|
|
18880
19144
|
case OpKind.StyleMap:
|
|
@@ -18918,20 +19182,20 @@ function isSingletonInterpolation(expr) {
|
|
|
18918
19182
|
return true;
|
|
18919
19183
|
}
|
|
18920
19184
|
|
|
18921
|
-
// bazel-out/
|
|
19185
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18922
19186
|
function optimizeVariables(job) {
|
|
18923
19187
|
for (const unit of job.units) {
|
|
18924
19188
|
inlineAlwaysInlineVariables(unit.create);
|
|
18925
19189
|
inlineAlwaysInlineVariables(unit.update);
|
|
18926
19190
|
for (const op of unit.create) {
|
|
18927
|
-
if (op.kind === OpKind.Listener) {
|
|
19191
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18928
19192
|
inlineAlwaysInlineVariables(op.handlerOps);
|
|
18929
19193
|
}
|
|
18930
19194
|
}
|
|
18931
19195
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
18932
19196
|
optimizeVariablesInOpList(unit.update, job.compatibility);
|
|
18933
19197
|
for (const op of unit.create) {
|
|
18934
|
-
if (op.kind === OpKind.Listener) {
|
|
19198
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18935
19199
|
optimizeVariablesInOpList(op.handlerOps, job.compatibility);
|
|
18936
19200
|
}
|
|
18937
19201
|
}
|
|
@@ -19168,7 +19432,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
19168
19432
|
}
|
|
19169
19433
|
}
|
|
19170
19434
|
|
|
19171
|
-
// bazel-out/
|
|
19435
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
19172
19436
|
function wrapI18nIcus(job) {
|
|
19173
19437
|
for (const unit of job.units) {
|
|
19174
19438
|
let currentI18nOp = null;
|
|
@@ -19198,7 +19462,7 @@ function wrapI18nIcus(job) {
|
|
|
19198
19462
|
}
|
|
19199
19463
|
}
|
|
19200
19464
|
|
|
19201
|
-
// bazel-out/
|
|
19465
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
19202
19466
|
var phases = [
|
|
19203
19467
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
19204
19468
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -19232,6 +19496,7 @@ var phases = [
|
|
|
19232
19496
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
19233
19497
|
{ kind: CompilationJobKind.Both, fn: resolveNames },
|
|
19234
19498
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
19499
|
+
{ kind: CompilationJobKind.Tmpl, fn: transformTwoWayBindingSet },
|
|
19235
19500
|
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
19236
19501
|
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
19237
19502
|
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
@@ -19240,7 +19505,6 @@ var phases = [
|
|
|
19240
19505
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
19241
19506
|
{ kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
|
|
19242
19507
|
{ kind: CompilationJobKind.Tmpl, fn: allocateSlots },
|
|
19243
|
-
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
19244
19508
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
19245
19509
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
19246
19510
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
@@ -19253,6 +19517,7 @@ var phases = [
|
|
|
19253
19517
|
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
19254
19518
|
{ kind: CompilationJobKind.Both, fn: optimizeVariables },
|
|
19255
19519
|
{ kind: CompilationJobKind.Both, fn: nameFunctionsAndVariables },
|
|
19520
|
+
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
19256
19521
|
{ kind: CompilationJobKind.Tmpl, fn: mergeNextContextExpressions },
|
|
19257
19522
|
{ kind: CompilationJobKind.Tmpl, fn: generateNgContainerOps },
|
|
19258
19523
|
{ kind: CompilationJobKind.Tmpl, fn: collapseEmptyInstructions },
|
|
@@ -19363,12 +19628,12 @@ function emitHostBindingFunction(job) {
|
|
|
19363
19628
|
);
|
|
19364
19629
|
}
|
|
19365
19630
|
|
|
19366
|
-
// bazel-out/
|
|
19631
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
19367
19632
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
19368
19633
|
var domSchema = new DomElementSchemaRegistry();
|
|
19369
19634
|
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
19370
|
-
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
19371
|
-
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
19635
|
+
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn) {
|
|
19636
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn);
|
|
19372
19637
|
ingestNodes(job.root, template2);
|
|
19373
19638
|
return job;
|
|
19374
19639
|
}
|
|
@@ -19423,7 +19688,7 @@ function ingestHostAttribute(job, name, value, securityContexts) {
|
|
|
19423
19688
|
job.root.update.push(attrBinding);
|
|
19424
19689
|
}
|
|
19425
19690
|
function ingestHostEvent(job, event) {
|
|
19426
|
-
const [phase, target] = event.type
|
|
19691
|
+
const [phase, target] = event.type !== 1 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
19427
19692
|
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
19428
19693
|
job.root.create.push(eventBinding);
|
|
19429
19694
|
}
|
|
@@ -19632,7 +19897,7 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
19632
19897
|
const placeholder = ingestDeferView(unit, "Placeholder", (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.i18n, (_e2 = deferBlock.placeholder) == null ? void 0 : _e2.children, (_f2 = deferBlock.placeholder) == null ? void 0 : _f2.sourceSpan);
|
|
19633
19898
|
const error2 = ingestDeferView(unit, "Error", (_g = deferBlock.error) == null ? void 0 : _g.i18n, (_h = deferBlock.error) == null ? void 0 : _h.children, (_i = deferBlock.error) == null ? void 0 : _i.sourceSpan);
|
|
19634
19899
|
const deferXref = unit.job.allocateXrefId();
|
|
19635
|
-
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
|
|
19900
|
+
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, unit.job.allDeferrableDepsFn, deferBlock.sourceSpan);
|
|
19636
19901
|
deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
|
|
19637
19902
|
deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
|
|
19638
19903
|
deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
|
|
@@ -19890,6 +20155,7 @@ function convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {
|
|
|
19890
20155
|
}
|
|
19891
20156
|
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19892
20157
|
[0, BindingKind.Property],
|
|
20158
|
+
[5, BindingKind.TwoWayProperty],
|
|
19893
20159
|
[1, BindingKind.Attribute],
|
|
19894
20160
|
[2, BindingKind.ClassName],
|
|
19895
20161
|
[3, BindingKind.StyleProperty],
|
|
@@ -19911,11 +20177,18 @@ function asMessage(i18nMeta) {
|
|
|
19911
20177
|
function ingestElementBindings(unit, op, element2) {
|
|
19912
20178
|
var _a2;
|
|
19913
20179
|
let bindings = new Array();
|
|
20180
|
+
let i18nAttributeBindingNames = /* @__PURE__ */ new Set();
|
|
19914
20181
|
for (const attr of element2.attributes) {
|
|
19915
20182
|
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19916
20183
|
bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
20184
|
+
if (attr.i18n) {
|
|
20185
|
+
i18nAttributeBindingNames.add(attr.name);
|
|
20186
|
+
}
|
|
19917
20187
|
}
|
|
19918
20188
|
for (const input of element2.inputs) {
|
|
20189
|
+
if (i18nAttributeBindingNames.has(input.name)) {
|
|
20190
|
+
console.error(`On component ${unit.job.componentName}, the binding ${input.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`);
|
|
20191
|
+
}
|
|
19919
20192
|
bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, (_a2 = asMessage(input.i18n)) != null ? _a2 : null, input.sourceSpan));
|
|
19920
20193
|
}
|
|
19921
20194
|
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
@@ -19924,7 +20197,11 @@ function ingestElementBindings(unit, op, element2) {
|
|
|
19924
20197
|
if (output.type === 1 && output.phase === null) {
|
|
19925
20198
|
throw Error("Animation listener should have a phase");
|
|
19926
20199
|
}
|
|
19927
|
-
|
|
20200
|
+
if (output.type === 2) {
|
|
20201
|
+
unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
|
|
20202
|
+
} else {
|
|
20203
|
+
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
20204
|
+
}
|
|
19928
20205
|
}
|
|
19929
20206
|
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19930
20207
|
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
@@ -19954,7 +20231,11 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
19954
20231
|
throw Error("Animation listener should have a phase");
|
|
19955
20232
|
}
|
|
19956
20233
|
if (templateKind === TemplateKind.NgTemplate) {
|
|
19957
|
-
|
|
20234
|
+
if (output.type === 2) {
|
|
20235
|
+
unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
|
|
20236
|
+
} else {
|
|
20237
|
+
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
20238
|
+
}
|
|
19958
20239
|
}
|
|
19959
20240
|
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19960
20241
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
@@ -19968,8 +20249,15 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
19968
20249
|
function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
19969
20250
|
const isTextBinding = typeof value === "string";
|
|
19970
20251
|
if (templateKind === TemplateKind.Structural) {
|
|
19971
|
-
if (!isStructuralTemplateAttribute
|
|
19972
|
-
|
|
20252
|
+
if (!isStructuralTemplateAttribute) {
|
|
20253
|
+
switch (type) {
|
|
20254
|
+
case 0:
|
|
20255
|
+
case 2:
|
|
20256
|
+
case 3:
|
|
20257
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
|
|
20258
|
+
case 5:
|
|
20259
|
+
return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
|
|
20260
|
+
}
|
|
19973
20261
|
}
|
|
19974
20262
|
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19975
20263
|
return null;
|
|
@@ -19996,6 +20284,23 @@ function makeListenerHandlerOps(unit, handler, handlerSpan) {
|
|
|
19996
20284
|
handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19997
20285
|
return handlerOps;
|
|
19998
20286
|
}
|
|
20287
|
+
function makeTwoWayListenerHandlerOps(unit, handler, handlerSpan) {
|
|
20288
|
+
handler = astOf(handler);
|
|
20289
|
+
const handlerOps = new Array();
|
|
20290
|
+
if (handler instanceof Chain) {
|
|
20291
|
+
if (handler.expressions.length === 1) {
|
|
20292
|
+
handler = handler.expressions[0];
|
|
20293
|
+
} else {
|
|
20294
|
+
throw new Error("Expected two-way listener to have a single expression.");
|
|
20295
|
+
}
|
|
20296
|
+
}
|
|
20297
|
+
const handlerExpr = convertAst(handler, unit.job, handlerSpan);
|
|
20298
|
+
const eventReference = new LexicalReadExpr("$event");
|
|
20299
|
+
const twoWaySetExpr = new TwoWayBindingSetExpr(handlerExpr, eventReference);
|
|
20300
|
+
handlerOps.push(createStatementOp(new ExpressionStatement(twoWaySetExpr)));
|
|
20301
|
+
handlerOps.push(createStatementOp(new ReturnStatement(eventReference)));
|
|
20302
|
+
return handlerOps;
|
|
20303
|
+
}
|
|
19999
20304
|
function astOf(ast) {
|
|
20000
20305
|
return ast instanceof ASTWithSource ? ast.ast : ast;
|
|
20001
20306
|
}
|
|
@@ -20046,10 +20351,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
20046
20351
|
return null;
|
|
20047
20352
|
}
|
|
20048
20353
|
|
|
20049
|
-
// bazel-out/
|
|
20354
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
20050
20355
|
var USE_TEMPLATE_PIPELINE = false;
|
|
20051
20356
|
|
|
20052
|
-
// bazel-out/
|
|
20357
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20053
20358
|
var HtmlParser = class extends Parser2 {
|
|
20054
20359
|
constructor() {
|
|
20055
20360
|
super(getHtmlTagDefinition);
|
|
@@ -20059,7 +20364,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
20059
20364
|
}
|
|
20060
20365
|
};
|
|
20061
20366
|
|
|
20062
|
-
// bazel-out/
|
|
20367
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20063
20368
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20064
20369
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20065
20370
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -20125,7 +20430,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
20125
20430
|
return result;
|
|
20126
20431
|
}
|
|
20127
20432
|
|
|
20128
|
-
// bazel-out/
|
|
20433
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20129
20434
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20130
20435
|
var ATTRIBUTE_PREFIX = "attr";
|
|
20131
20436
|
var CLASS_PREFIX = "class";
|
|
@@ -20151,6 +20456,7 @@ var BindingParser = class {
|
|
|
20151
20456
|
propName,
|
|
20152
20457
|
expression,
|
|
20153
20458
|
true,
|
|
20459
|
+
false,
|
|
20154
20460
|
sourceSpan,
|
|
20155
20461
|
sourceSpan.start.offset,
|
|
20156
20462
|
void 0,
|
|
@@ -20216,7 +20522,7 @@ var BindingParser = class {
|
|
|
20216
20522
|
} else if (binding.value) {
|
|
20217
20523
|
const srcSpan = isIvyAst ? bindingSpan : sourceSpan;
|
|
20218
20524
|
const valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);
|
|
20219
|
-
this._parsePropertyAst(key, binding.value, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20525
|
+
this._parsePropertyAst(key, binding.value, false, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20220
20526
|
} else {
|
|
20221
20527
|
targetMatchableAttrs.push([key, ""]);
|
|
20222
20528
|
this.parseLiteralAttr(key, null, keySpan, absoluteValueOffset, void 0, targetMatchableAttrs, targetProps, keySpan);
|
|
@@ -20251,7 +20557,7 @@ var BindingParser = class {
|
|
|
20251
20557
|
targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
|
|
20252
20558
|
}
|
|
20253
20559
|
}
|
|
20254
|
-
parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
20560
|
+
parsePropertyBinding(name, expression, isHost, isPartOfAssignmentBinding, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
20255
20561
|
if (name.length === 0) {
|
|
20256
20562
|
this._reportError(`Property name is missing in binding`, sourceSpan);
|
|
20257
20563
|
}
|
|
@@ -20272,20 +20578,20 @@ var BindingParser = class {
|
|
|
20272
20578
|
if (isAnimationProp) {
|
|
20273
20579
|
this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20274
20580
|
} else {
|
|
20275
|
-
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20581
|
+
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20276
20582
|
}
|
|
20277
20583
|
}
|
|
20278
20584
|
parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {
|
|
20279
20585
|
const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);
|
|
20280
20586
|
if (expr) {
|
|
20281
|
-
this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20587
|
+
this._parsePropertyAst(name, expr, false, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20282
20588
|
return true;
|
|
20283
20589
|
}
|
|
20284
20590
|
return false;
|
|
20285
20591
|
}
|
|
20286
|
-
_parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20592
|
+
_parsePropertyAst(name, ast, isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20287
20593
|
targetMatchableAttrs.push([name, ast.source]);
|
|
20288
|
-
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
20594
|
+
targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
20289
20595
|
}
|
|
20290
20596
|
_parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20291
20597
|
if (name.length === 0) {
|
|
@@ -20345,7 +20651,7 @@ var BindingParser = class {
|
|
|
20345
20651
|
const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);
|
|
20346
20652
|
boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;
|
|
20347
20653
|
securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);
|
|
20348
|
-
bindingType = 0;
|
|
20654
|
+
bindingType = boundProp.type === ParsedPropertyType.TWO_WAY ? 5 : 0;
|
|
20349
20655
|
if (!skipValidation) {
|
|
20350
20656
|
this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);
|
|
20351
20657
|
}
|
|
@@ -20361,7 +20667,7 @@ var BindingParser = class {
|
|
|
20361
20667
|
if (keySpan !== void 0) {
|
|
20362
20668
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
20363
20669
|
}
|
|
20364
|
-
this._parseAnimationEvent(name, expression,
|
|
20670
|
+
this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
|
|
20365
20671
|
} else {
|
|
20366
20672
|
this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
|
|
20367
20673
|
}
|
|
@@ -20370,11 +20676,11 @@ var BindingParser = class {
|
|
|
20370
20676
|
const prop = this._schemaRegistry.getMappedPropName(propName);
|
|
20371
20677
|
return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);
|
|
20372
20678
|
}
|
|
20373
|
-
_parseAnimationEvent(name, expression,
|
|
20679
|
+
_parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
|
|
20374
20680
|
const matches = splitAtPeriod(name, [name, ""]);
|
|
20375
20681
|
const eventName = matches[0];
|
|
20376
20682
|
const phase = matches[1].toLowerCase();
|
|
20377
|
-
const ast = this._parseAction(expression,
|
|
20683
|
+
const ast = this._parseAction(expression, handlerSpan);
|
|
20378
20684
|
targetEvents.push(new ParsedEvent(eventName, phase, 1, ast, sourceSpan, handlerSpan, keySpan));
|
|
20379
20685
|
if (eventName.length === 0) {
|
|
20380
20686
|
this._reportError(`Animation event name is missing in binding`, sourceSpan);
|
|
@@ -20389,15 +20695,20 @@ var BindingParser = class {
|
|
|
20389
20695
|
}
|
|
20390
20696
|
_parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
|
|
20391
20697
|
const [target, eventName] = splitAtColon(name, [null, name]);
|
|
20392
|
-
const
|
|
20698
|
+
const prevErrorCount = this.errors.length;
|
|
20699
|
+
const ast = this._parseAction(expression, handlerSpan);
|
|
20700
|
+
const isValid = this.errors.length === prevErrorCount;
|
|
20393
20701
|
targetMatchableAttrs.push([name, ast.source]);
|
|
20394
|
-
|
|
20702
|
+
if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {
|
|
20703
|
+
this._reportError("Unsupported expression in a two-way binding", sourceSpan);
|
|
20704
|
+
}
|
|
20705
|
+
targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? 2 : 0, ast, sourceSpan, handlerSpan, keySpan));
|
|
20395
20706
|
}
|
|
20396
|
-
_parseAction(value,
|
|
20707
|
+
_parseAction(value, sourceSpan) {
|
|
20397
20708
|
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
|
|
20398
20709
|
const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
|
|
20399
20710
|
try {
|
|
20400
|
-
const ast = this._exprParser.parseAction(value,
|
|
20711
|
+
const ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);
|
|
20401
20712
|
if (ast) {
|
|
20402
20713
|
this._reportExpressionParserErrors(ast.errors, sourceSpan);
|
|
20403
20714
|
}
|
|
@@ -20425,6 +20736,21 @@ var BindingParser = class {
|
|
|
20425
20736
|
this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);
|
|
20426
20737
|
}
|
|
20427
20738
|
}
|
|
20739
|
+
_isAllowedAssignmentEvent(ast) {
|
|
20740
|
+
if (ast instanceof ASTWithSource) {
|
|
20741
|
+
return this._isAllowedAssignmentEvent(ast.ast);
|
|
20742
|
+
}
|
|
20743
|
+
if (ast instanceof NonNullAssert) {
|
|
20744
|
+
return this._isAllowedAssignmentEvent(ast.expression);
|
|
20745
|
+
}
|
|
20746
|
+
if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
|
|
20747
|
+
return true;
|
|
20748
|
+
}
|
|
20749
|
+
if (ast instanceof Binary) {
|
|
20750
|
+
return (ast.operation === "&&" || ast.operation === "||" || ast.operation === "??") && (ast.right instanceof PropertyRead || ast.right instanceof KeyedRead);
|
|
20751
|
+
}
|
|
20752
|
+
return ast instanceof Conditional || ast instanceof PrefixNot;
|
|
20753
|
+
}
|
|
20428
20754
|
};
|
|
20429
20755
|
function isAnimationLabel(name) {
|
|
20430
20756
|
return name[0] == "@";
|
|
@@ -20445,7 +20771,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20445
20771
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20446
20772
|
}
|
|
20447
20773
|
|
|
20448
|
-
// bazel-out/
|
|
20774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20449
20775
|
function isStyleUrlResolvable(url) {
|
|
20450
20776
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20451
20777
|
return false;
|
|
@@ -20454,7 +20780,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20454
20780
|
}
|
|
20455
20781
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20456
20782
|
|
|
20457
|
-
// bazel-out/
|
|
20783
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20458
20784
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20459
20785
|
var LINK_ELEMENT = "link";
|
|
20460
20786
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20524,12 +20850,13 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20524
20850
|
return selectAttr;
|
|
20525
20851
|
}
|
|
20526
20852
|
|
|
20527
|
-
// bazel-out/
|
|
20853
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20528
20854
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20529
20855
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20530
|
-
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
20856
|
+
var CONDITIONAL_ALIAS_PATTERN = /^(as\s)+(.*)/;
|
|
20531
20857
|
var ELSE_IF_PATTERN = /^else[^\S\r\n]+if/;
|
|
20532
20858
|
var FOR_LOOP_LET_PATTERN = /^let\s+([\S\s]*)/;
|
|
20859
|
+
var CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN = /(\s*)(\S+)(\s*)/;
|
|
20533
20860
|
var ALLOWED_FOR_LOOP_LET_VARIABLES = /* @__PURE__ */ new Set(["$index", "$first", "$last", "$even", "$odd", "$count"]);
|
|
20534
20861
|
function isConnectedForLoopBlock(name) {
|
|
20535
20862
|
return name === "empty";
|
|
@@ -20641,8 +20968,10 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20641
20968
|
return null;
|
|
20642
20969
|
}
|
|
20643
20970
|
const [, itemName, rawExpression] = match;
|
|
20971
|
+
const variableName = expressionParam.expression.split(" ")[0];
|
|
20972
|
+
const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));
|
|
20644
20973
|
const result = {
|
|
20645
|
-
itemName: new Variable(itemName, "$implicit",
|
|
20974
|
+
itemName: new Variable(itemName, "$implicit", variableSpan, variableSpan),
|
|
20646
20975
|
trackBy: null,
|
|
20647
20976
|
expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),
|
|
20648
20977
|
context: {}
|
|
@@ -20650,7 +20979,8 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20650
20979
|
for (const param of secondaryParams) {
|
|
20651
20980
|
const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);
|
|
20652
20981
|
if (letMatch !== null) {
|
|
20653
|
-
|
|
20982
|
+
const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);
|
|
20983
|
+
parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, result.context, errors);
|
|
20654
20984
|
continue;
|
|
20655
20985
|
}
|
|
20656
20986
|
const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);
|
|
@@ -20666,16 +20996,18 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20666
20996
|
}
|
|
20667
20997
|
errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater "${param.expression}"`));
|
|
20668
20998
|
}
|
|
20669
|
-
for (const
|
|
20670
|
-
if (!result.context.hasOwnProperty(
|
|
20999
|
+
for (const variableName2 of ALLOWED_FOR_LOOP_LET_VARIABLES) {
|
|
21000
|
+
if (!result.context.hasOwnProperty(variableName2)) {
|
|
20671
21001
|
const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
|
|
20672
|
-
result.context[
|
|
21002
|
+
result.context[variableName2] = new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
|
|
20673
21003
|
}
|
|
20674
21004
|
}
|
|
20675
21005
|
return result;
|
|
20676
21006
|
}
|
|
20677
21007
|
function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
21008
|
+
var _a2, _b2, _c2;
|
|
20678
21009
|
const parts = expression.split(",");
|
|
21010
|
+
let startSpan = span.start;
|
|
20679
21011
|
for (const part of parts) {
|
|
20680
21012
|
const expressionParts = part.split("=");
|
|
20681
21013
|
const name = expressionParts.length === 2 ? expressionParts[0].trim() : "";
|
|
@@ -20687,8 +21019,20 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
|
20687
21019
|
} else if (context.hasOwnProperty(variableName)) {
|
|
20688
21020
|
errors.push(new ParseError(sourceSpan, `Duplicate "let" parameter variable "${variableName}"`));
|
|
20689
21021
|
} else {
|
|
20690
|
-
|
|
21022
|
+
const [, keyLeadingWhitespace, keyName] = (_a2 = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _a2 : [];
|
|
21023
|
+
const keySpan = keyLeadingWhitespace !== void 0 && expressionParts.length === 2 ? new ParseSourceSpan(
|
|
21024
|
+
startSpan.moveBy(keyLeadingWhitespace.length),
|
|
21025
|
+
startSpan.moveBy(keyLeadingWhitespace.length + keyName.length)
|
|
21026
|
+
) : span;
|
|
21027
|
+
let valueSpan = void 0;
|
|
21028
|
+
if (expressionParts.length === 2) {
|
|
21029
|
+
const [, valueLeadingWhitespace, implicit] = (_b2 = expressionParts[1].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _b2 : [];
|
|
21030
|
+
valueSpan = valueLeadingWhitespace !== void 0 ? new ParseSourceSpan(startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length), startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length + implicit.length)) : void 0;
|
|
21031
|
+
}
|
|
21032
|
+
const sourceSpan2 = new ParseSourceSpan(keySpan.start, (_c2 = valueSpan == null ? void 0 : valueSpan.end) != null ? _c2 : keySpan.end);
|
|
21033
|
+
context[variableName] = new Variable(name, variableName, sourceSpan2, keySpan, valueSpan);
|
|
20691
21034
|
}
|
|
21035
|
+
startSpan = startSpan.moveBy(part.length + 1);
|
|
20692
21036
|
}
|
|
20693
21037
|
}
|
|
20694
21038
|
function validateIfConnectedBlocks(connectedBlocks) {
|
|
@@ -20768,8 +21112,10 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
|
20768
21112
|
} else if (expressionAlias !== null) {
|
|
20769
21113
|
errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one "as" expression'));
|
|
20770
21114
|
} else {
|
|
20771
|
-
const name = aliasMatch[
|
|
20772
|
-
|
|
21115
|
+
const name = aliasMatch[2].trim();
|
|
21116
|
+
const variableStart = param.sourceSpan.start.moveBy(aliasMatch[1].length);
|
|
21117
|
+
const variableSpan = new ParseSourceSpan(variableStart, variableStart.moveBy(name.length));
|
|
21118
|
+
expressionAlias = new Variable(name, name, variableSpan, variableSpan);
|
|
20773
21119
|
}
|
|
20774
21120
|
}
|
|
20775
21121
|
return { expression, expressionAlias };
|
|
@@ -20815,7 +21161,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20815
21161
|
return expression.slice(start, end);
|
|
20816
21162
|
}
|
|
20817
21163
|
|
|
20818
|
-
// bazel-out/
|
|
21164
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20819
21165
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20820
21166
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20821
21167
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -21079,7 +21425,7 @@ function parseDeferredTime(value) {
|
|
|
21079
21425
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
21080
21426
|
}
|
|
21081
21427
|
|
|
21082
|
-
// bazel-out/
|
|
21428
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
21083
21429
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
21084
21430
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
21085
21431
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -21214,7 +21560,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
21214
21560
|
return { triggers, prefetchTriggers };
|
|
21215
21561
|
}
|
|
21216
21562
|
|
|
21217
|
-
// bazel-out/
|
|
21563
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
21218
21564
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
21219
21565
|
var KW_BIND_IDX = 1;
|
|
21220
21566
|
var KW_LET_IDX = 2;
|
|
@@ -21487,7 +21833,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21487
21833
|
if (bindParts[KW_BIND_IDX] != null) {
|
|
21488
21834
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
21489
21835
|
const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BIND_IDX], identifier);
|
|
21490
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21836
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21491
21837
|
} else if (bindParts[KW_LET_IDX]) {
|
|
21492
21838
|
if (isTemplateElement) {
|
|
21493
21839
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
@@ -21509,7 +21855,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21509
21855
|
} else if (bindParts[KW_BINDON_IDX]) {
|
|
21510
21856
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
21511
21857
|
const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);
|
|
21512
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21858
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21513
21859
|
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
21514
21860
|
} else if (bindParts[KW_AT_IDX]) {
|
|
21515
21861
|
const keySpan2 = createKeySpan(srcSpan, "", name);
|
|
@@ -21529,10 +21875,10 @@ var HtmlAstToIvyAst = class {
|
|
|
21529
21875
|
const identifier = name.substring(delims.start.length, name.length - delims.end.length);
|
|
21530
21876
|
const keySpan2 = createKeySpan(srcSpan, delims.start, identifier);
|
|
21531
21877
|
if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {
|
|
21532
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21878
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21533
21879
|
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
21534
21880
|
} else if (delims.start === BINDING_DELIMS.PROPERTY.start) {
|
|
21535
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21881
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21536
21882
|
} else {
|
|
21537
21883
|
const events = [];
|
|
21538
21884
|
this.bindingParser.parseEvent(identifier, value, false, srcSpan, attribute2.valueSpan || srcSpan, matchableAttributes, events, keySpan2);
|
|
@@ -21569,7 +21915,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21569
21915
|
}
|
|
21570
21916
|
parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {
|
|
21571
21917
|
const events = [];
|
|
21572
|
-
this.bindingParser.parseEvent(`${name}Change`,
|
|
21918
|
+
this.bindingParser.parseEvent(`${name}Change`, expression, true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
|
|
21573
21919
|
addEvents(events, boundEvents);
|
|
21574
21920
|
}
|
|
21575
21921
|
reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
@@ -21645,7 +21991,7 @@ function textContents(node) {
|
|
|
21645
21991
|
}
|
|
21646
21992
|
}
|
|
21647
21993
|
|
|
21648
|
-
// bazel-out/
|
|
21994
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21649
21995
|
var TagType;
|
|
21650
21996
|
(function(TagType2) {
|
|
21651
21997
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21790,7 +22136,7 @@ function serializePlaceholderValue(value) {
|
|
|
21790
22136
|
}
|
|
21791
22137
|
}
|
|
21792
22138
|
|
|
21793
|
-
// bazel-out/
|
|
22139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
21794
22140
|
var IMPORTANT_FLAG = "!important";
|
|
21795
22141
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
21796
22142
|
var StylingBuilder = class {
|
|
@@ -22123,7 +22469,7 @@ function isEmptyExpression(ast) {
|
|
|
22123
22469
|
return ast instanceof EmptyExpr;
|
|
22124
22470
|
}
|
|
22125
22471
|
|
|
22126
|
-
// bazel-out/
|
|
22472
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
22127
22473
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
22128
22474
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
22129
22475
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -22142,7 +22488,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
22142
22488
|
const eventArgumentName = "$event";
|
|
22143
22489
|
const implicitReceiverAccesses = /* @__PURE__ */ new Set();
|
|
22144
22490
|
const implicitReceiverExpr = scope === null || scope.bindingLevel === 0 ? variable(CONTEXT_NAME) : scope.getOrCreateSharedContextVar(0);
|
|
22145
|
-
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, "b", eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
|
|
22491
|
+
const bindingStatements = eventAst.type === 2 ? convertAssignmentActionBinding(scope, implicitReceiverExpr, handler, "b", eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS) : convertActionBinding(scope, implicitReceiverExpr, handler, "b", eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
|
|
22146
22492
|
const statements = [];
|
|
22147
22493
|
const variableDeclarations = scope == null ? void 0 : scope.variableDeclarations();
|
|
22148
22494
|
const restoreViewStatement = scope == null ? void 0 : scope.restoreViewStatement();
|
|
@@ -22534,7 +22880,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22534
22880
|
element2.inputs.forEach((input) => {
|
|
22535
22881
|
const stylingInputWasSet = stylingBuilder.registerBoundInput(input);
|
|
22536
22882
|
if (!stylingInputWasSet) {
|
|
22537
|
-
if (input.type === 0 && input.i18n) {
|
|
22883
|
+
if ((input.type === 0 || input.type === 5) && input.i18n) {
|
|
22538
22884
|
boundI18nAttrs.push(input);
|
|
22539
22885
|
} else {
|
|
22540
22886
|
allOtherInputs.push(input);
|
|
@@ -22568,7 +22914,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22568
22914
|
}
|
|
22569
22915
|
if (element2.outputs.length > 0) {
|
|
22570
22916
|
for (const outputAst of element2.outputs) {
|
|
22571
|
-
this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element2.name, outputAst, elementIndex));
|
|
22917
|
+
this.creationInstruction(outputAst.sourceSpan, outputAst.type === 2 ? Identifiers.twoWayListener : Identifiers.listener, this.prepareListenerParameter(element2.name, outputAst, elementIndex));
|
|
22572
22918
|
}
|
|
22573
22919
|
}
|
|
22574
22920
|
if (isI18nRootElement) {
|
|
@@ -22592,6 +22938,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22592
22938
|
this.allocateBindingSlots(value);
|
|
22593
22939
|
propertyBindings.push({
|
|
22594
22940
|
span: input.sourceSpan,
|
|
22941
|
+
reference: Identifiers.property,
|
|
22595
22942
|
paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))
|
|
22596
22943
|
});
|
|
22597
22944
|
} else {
|
|
@@ -22620,12 +22967,13 @@ var TemplateDefinitionBuilder = class {
|
|
|
22620
22967
|
}
|
|
22621
22968
|
}
|
|
22622
22969
|
this.allocateBindingSlots(value);
|
|
22623
|
-
if (inputType === 0) {
|
|
22970
|
+
if (inputType === 0 || inputType === 5) {
|
|
22624
22971
|
if (value instanceof Interpolation) {
|
|
22625
22972
|
this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);
|
|
22626
22973
|
} else {
|
|
22627
22974
|
propertyBindings.push({
|
|
22628
22975
|
span: input.sourceSpan,
|
|
22976
|
+
reference: inputType === 5 ? Identifiers.twoWayProperty : Identifiers.property,
|
|
22629
22977
|
paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)
|
|
22630
22978
|
});
|
|
22631
22979
|
}
|
|
@@ -22653,7 +23001,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22653
23001
|
}
|
|
22654
23002
|
});
|
|
22655
23003
|
for (const propertyBinding of propertyBindings) {
|
|
22656
|
-
this.updateInstructionWithAdvance(elementIndex, propertyBinding.span,
|
|
23004
|
+
this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, propertyBinding.reference, propertyBinding.paramsOrFn);
|
|
22657
23005
|
}
|
|
22658
23006
|
for (const attributeBinding of attributeBindings) {
|
|
22659
23007
|
this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);
|
|
@@ -22683,7 +23031,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22683
23031
|
}
|
|
22684
23032
|
}
|
|
22685
23033
|
const contextName = `${this.contextName}${contextNameSuffix}_${index}`;
|
|
22686
|
-
const name = `${contextName}_Template
|
|
23034
|
+
const name = this.constantPool.uniqueName(`${contextName}_Template`, false);
|
|
22687
23035
|
const visitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, index, name, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this.elementLocations, this.allDeferrableDepsFn, this._constants);
|
|
22688
23036
|
this._nestedTemplateFns.push(() => {
|
|
22689
23037
|
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
@@ -22729,7 +23077,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22729
23077
|
this.templatePropertyBindings(templateIndex, inputs);
|
|
22730
23078
|
}
|
|
22731
23079
|
for (const outputAst of template2.outputs) {
|
|
22732
|
-
this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter("ng_template", outputAst, templateIndex));
|
|
23080
|
+
this.creationInstruction(outputAst.sourceSpan, outputAst.type === 2 ? Identifiers.twoWayListener : Identifiers.listener, this.prepareListenerParameter("ng_template", outputAst, templateIndex));
|
|
22733
23081
|
}
|
|
22734
23082
|
}
|
|
22735
23083
|
}
|
|
@@ -22892,7 +23240,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22892
23240
|
const dependencyExp = [];
|
|
22893
23241
|
for (const deferredDep of metadata.deps) {
|
|
22894
23242
|
if (deferredDep.isDeferrable) {
|
|
22895
|
-
const innerFn = arrowFn(
|
|
23243
|
+
const innerFn = arrowFn(
|
|
23244
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
23245
|
+
variable("m").prop(deferredDep.isDefaultImport ? "default" : deferredDep.symbolName)
|
|
23246
|
+
);
|
|
22896
23247
|
const importExpr2 = new DynamicImportExpr(deferredDep.importPath).prop("then").callFn([innerFn]);
|
|
22897
23248
|
dependencyExp.push(importExpr2);
|
|
22898
23249
|
} else {
|
|
@@ -23810,7 +24161,7 @@ function createClosureModeGuard2() {
|
|
|
23810
24161
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23811
24162
|
}
|
|
23812
24163
|
|
|
23813
|
-
// bazel-out/
|
|
24164
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
|
|
23814
24165
|
function toQueryFlags(query) {
|
|
23815
24166
|
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
23816
24167
|
}
|
|
@@ -23927,7 +24278,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
23927
24278
|
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
23928
24279
|
}
|
|
23929
24280
|
|
|
23930
|
-
// bazel-out/
|
|
24281
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23931
24282
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23932
24283
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23933
24284
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -24006,8 +24357,8 @@ function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
|
|
|
24006
24357
|
}
|
|
24007
24358
|
function createDeferredDepsFunction(constantPool, name, deps) {
|
|
24008
24359
|
const dependencyExp = [];
|
|
24009
|
-
for (const [symbolName, importPath] of deps) {
|
|
24010
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(symbolName));
|
|
24360
|
+
for (const [symbolName, { importPath, isDefaultImport }] of deps) {
|
|
24361
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName));
|
|
24011
24362
|
const importExpr2 = new DynamicImportExpr(importPath).prop("then").callFn([innerFn]);
|
|
24012
24363
|
dependencyExp.push(importExpr2);
|
|
24013
24364
|
}
|
|
@@ -24031,12 +24382,12 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
24031
24382
|
}
|
|
24032
24383
|
const templateTypeName = meta.name;
|
|
24033
24384
|
const templateName = templateTypeName ? `${templateTypeName}_Template` : null;
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24385
|
+
let allDeferrableDepsFn = null;
|
|
24386
|
+
if (meta.deferBlocks.size > 0 && meta.deferrableTypes.size > 0 && meta.deferBlockDepsEmitMode === 1) {
|
|
24387
|
+
const fnName = `${templateTypeName}_DeferFn`;
|
|
24388
|
+
allDeferrableDepsFn = createDeferredDepsFunction(constantPool, fnName, meta.deferrableTypes);
|
|
24389
|
+
}
|
|
24390
|
+
if (!USE_TEMPLATE_PIPELINE && !meta.useTemplatePipeline) {
|
|
24040
24391
|
const template2 = meta.template;
|
|
24041
24392
|
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks, /* @__PURE__ */ new Map(), allDeferrableDepsFn);
|
|
24042
24393
|
const templateFunctionExpression = templateBuilder.buildTemplateFunction(template2.nodes, []);
|
|
@@ -24056,7 +24407,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
24056
24407
|
}
|
|
24057
24408
|
definitionMap.set("template", templateFunctionExpression);
|
|
24058
24409
|
} else {
|
|
24059
|
-
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks);
|
|
24410
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks, allDeferrableDepsFn);
|
|
24060
24411
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
24061
24412
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
24062
24413
|
if (tpl.contentSelectors !== null) {
|
|
@@ -24204,7 +24555,7 @@ function createDirectiveType(meta) {
|
|
|
24204
24555
|
function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {
|
|
24205
24556
|
const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);
|
|
24206
24557
|
const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);
|
|
24207
|
-
if (USE_TEMPLATE_PIPELINE) {
|
|
24558
|
+
if (USE_TEMPLATE_PIPELINE || hostBindingsMetadata.useTemplatePipeline) {
|
|
24208
24559
|
if (hostBindingsMetadata.specialAttributes.styleAttr) {
|
|
24209
24560
|
hostBindingsMetadata.attributes["style"] = literal(hostBindingsMetadata.specialAttributes.styleAttr);
|
|
24210
24561
|
}
|
|
@@ -24507,7 +24858,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
24507
24858
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
24508
24859
|
}
|
|
24509
24860
|
|
|
24510
|
-
// bazel-out/
|
|
24861
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
24511
24862
|
var R3TargetBinder = class {
|
|
24512
24863
|
constructor(directiveMatcher) {
|
|
24513
24864
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -25124,11 +25475,12 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
25124
25475
|
return templateEntities;
|
|
25125
25476
|
}
|
|
25126
25477
|
|
|
25127
|
-
// bazel-out/
|
|
25478
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
25128
25479
|
var ResourceLoader = class {
|
|
25129
25480
|
};
|
|
25130
25481
|
|
|
25131
|
-
// bazel-out/
|
|
25482
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
25483
|
+
var SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT = false;
|
|
25132
25484
|
var CompilerFacadeImpl = class {
|
|
25133
25485
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
25134
25486
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -25261,7 +25613,8 @@ var CompilerFacadeImpl = class {
|
|
|
25261
25613
|
animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,
|
|
25262
25614
|
viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,
|
|
25263
25615
|
relativeContextFilePath: "",
|
|
25264
|
-
i18nUseExternalIds: true
|
|
25616
|
+
i18nUseExternalIds: true,
|
|
25617
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25265
25618
|
});
|
|
25266
25619
|
const jitExpressionSourceMap = `ng:///${facade.name}.js`;
|
|
25267
25620
|
return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
|
|
@@ -25362,7 +25715,9 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
25362
25715
|
typeSourceSpan: facade.typeSourceSpan,
|
|
25363
25716
|
type: wrapReference(facade.type),
|
|
25364
25717
|
deps: null,
|
|
25365
|
-
host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),
|
|
25718
|
+
host: __spreadProps(__spreadValues({}, extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host)), {
|
|
25719
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25720
|
+
}),
|
|
25366
25721
|
inputs: __spreadValues(__spreadValues({}, inputsFromMetadata), inputsFromType),
|
|
25367
25722
|
outputs: __spreadValues(__spreadValues({}, outputsFromMetadata), outputsFromType),
|
|
25368
25723
|
queries: facade.queries.map(convertToR3QueryMetadata),
|
|
@@ -25405,7 +25760,8 @@ function convertHostDeclarationToMetadata(host = {}) {
|
|
|
25405
25760
|
specialAttributes: {
|
|
25406
25761
|
classAttr: host.classAttribute,
|
|
25407
25762
|
styleAttr: host.styleAttribute
|
|
25408
|
-
}
|
|
25763
|
+
},
|
|
25764
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25409
25765
|
};
|
|
25410
25766
|
}
|
|
25411
25767
|
function convertHostDirectivesToMetadata(metadata) {
|
|
@@ -25470,7 +25826,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
25470
25826
|
interpolation,
|
|
25471
25827
|
declarationListEmitMode: 2,
|
|
25472
25828
|
relativeContextFilePath: "",
|
|
25473
|
-
i18nUseExternalIds: true
|
|
25829
|
+
i18nUseExternalIds: true,
|
|
25830
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25474
25831
|
});
|
|
25475
25832
|
}
|
|
25476
25833
|
function convertDeclarationFacadeToMetadata(declaration) {
|
|
@@ -25703,17 +26060,17 @@ function publishFacade(global) {
|
|
|
25703
26060
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
25704
26061
|
}
|
|
25705
26062
|
|
|
25706
|
-
// bazel-out/
|
|
25707
|
-
var VERSION2 = new Version("17.2.0-
|
|
26063
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
26064
|
+
var VERSION2 = new Version("17.2.0-rc.0");
|
|
25708
26065
|
|
|
25709
|
-
// bazel-out/
|
|
26066
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25710
26067
|
var _VisitorMode;
|
|
25711
26068
|
(function(_VisitorMode2) {
|
|
25712
26069
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
25713
26070
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
25714
26071
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
25715
26072
|
|
|
25716
|
-
// bazel-out/
|
|
26073
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
25717
26074
|
var XmlTagDefinition = class {
|
|
25718
26075
|
constructor() {
|
|
25719
26076
|
this.closedByParent = false;
|
|
@@ -25735,7 +26092,7 @@ var XmlTagDefinition = class {
|
|
|
25735
26092
|
};
|
|
25736
26093
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25737
26094
|
|
|
25738
|
-
// bazel-out/
|
|
26095
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25739
26096
|
var FactoryTarget2;
|
|
25740
26097
|
(function(FactoryTarget3) {
|
|
25741
26098
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25745,10 +26102,10 @@ var FactoryTarget2;
|
|
|
25745
26102
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25746
26103
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25747
26104
|
|
|
25748
|
-
// bazel-out/
|
|
26105
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25749
26106
|
publishFacade(_global);
|
|
25750
26107
|
|
|
25751
|
-
// bazel-out/
|
|
26108
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
25752
26109
|
var import_path2 = require("path");
|
|
25753
26110
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
25754
26111
|
var REPLACEMENTS2 = {
|
|
@@ -25856,7 +26213,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25856
26213
|
});
|
|
25857
26214
|
}
|
|
25858
26215
|
|
|
25859
|
-
// bazel-out/
|
|
26216
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
25860
26217
|
function block_template_entities_default() {
|
|
25861
26218
|
return (tree) => __async(this, null, function* () {
|
|
25862
26219
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|