@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/ng-generate/control-flow-migration/index.mjs
|
|
67
67
|
var control_flow_migration_exports = {};
|
|
68
68
|
__export(control_flow_migration_exports, {
|
|
69
69
|
default: () => control_flow_migration_default
|
|
@@ -72,22 +72,22 @@ module.exports = __toCommonJS(control_flow_migration_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/change_tracker.mjs
|
|
76
76
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
77
77
|
|
|
78
|
-
// bazel-out/
|
|
78
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
79
79
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
80
80
|
|
|
81
|
-
// bazel-out/
|
|
81
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
82
82
|
function normalizePath(path2) {
|
|
83
83
|
return path2.replace(/\\/g, "/");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// bazel-out/
|
|
86
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
87
87
|
var import_path = require("path");
|
|
88
88
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
89
89
|
|
|
90
|
-
// bazel-out/
|
|
90
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
91
91
|
var path = __toESM(require("path"), 1);
|
|
92
92
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
93
93
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -104,7 +104,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
104
104
|
return import_typescript3.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// bazel-out/
|
|
107
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
108
108
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
109
109
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
110
110
|
return import_typescript4.default.createProgram(rootNames, options, host);
|
|
@@ -137,7 +137,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
137
137
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// bazel-out/
|
|
140
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
141
141
|
var _SELECTOR_REGEXP = new RegExp(
|
|
142
142
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
143
143
|
"g"
|
|
@@ -445,7 +445,7 @@ var SelectorContext = class {
|
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
// bazel-out/
|
|
448
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/core.mjs
|
|
449
449
|
var ViewEncapsulation;
|
|
450
450
|
(function(ViewEncapsulation2) {
|
|
451
451
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -513,7 +513,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
513
513
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
-
// bazel-out/
|
|
516
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
517
517
|
var textEncoder;
|
|
518
518
|
function computeDigest(message) {
|
|
519
519
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -753,7 +753,7 @@ function wordAt(bytes, index, endian) {
|
|
|
753
753
|
return word;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
// bazel-out/
|
|
756
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
757
757
|
var TypeModifier;
|
|
758
758
|
(function(TypeModifier2) {
|
|
759
759
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1712,7 +1712,7 @@ function serializeTags(tags) {
|
|
|
1712
1712
|
return out;
|
|
1713
1713
|
}
|
|
1714
1714
|
|
|
1715
|
-
// bazel-out/
|
|
1715
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1716
1716
|
var CONSTANT_PREFIX = "_c";
|
|
1717
1717
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1718
1718
|
var KEY_CONTEXT = {};
|
|
@@ -1752,6 +1752,7 @@ var ConstantPool = class {
|
|
|
1752
1752
|
this.literals = /* @__PURE__ */ new Map();
|
|
1753
1753
|
this.literalFactories = /* @__PURE__ */ new Map();
|
|
1754
1754
|
this.sharedConstants = /* @__PURE__ */ new Map();
|
|
1755
|
+
this._claimedNames = /* @__PURE__ */ new Map();
|
|
1755
1756
|
this.nextNameIndex = 0;
|
|
1756
1757
|
}
|
|
1757
1758
|
getConstLiteral(literal2, forceShared) {
|
|
@@ -1844,8 +1845,12 @@ var ConstantPool = class {
|
|
|
1844
1845
|
}
|
|
1845
1846
|
return { literalFactory, literalFactoryArguments };
|
|
1846
1847
|
}
|
|
1847
|
-
uniqueName(
|
|
1848
|
-
|
|
1848
|
+
uniqueName(name, alwaysIncludeSuffix = true) {
|
|
1849
|
+
var _a2;
|
|
1850
|
+
const count = (_a2 = this._claimedNames.get(name)) != null ? _a2 : 0;
|
|
1851
|
+
const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;
|
|
1852
|
+
this._claimedNames.set(name, count + 1);
|
|
1853
|
+
return result;
|
|
1849
1854
|
}
|
|
1850
1855
|
freshName() {
|
|
1851
1856
|
return this.uniqueName(CONSTANT_PREFIX);
|
|
@@ -1895,7 +1900,7 @@ function isLongStringLiteral(expr) {
|
|
|
1895
1900
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1896
1901
|
}
|
|
1897
1902
|
|
|
1898
|
-
// bazel-out/
|
|
1903
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1899
1904
|
var CORE = "@angular/core";
|
|
1900
1905
|
var _Identifiers = class {
|
|
1901
1906
|
};
|
|
@@ -2479,6 +2484,15 @@ var Identifiers = _Identifiers;
|
|
|
2479
2484
|
(() => {
|
|
2480
2485
|
_Identifiers.queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: CORE };
|
|
2481
2486
|
})();
|
|
2487
|
+
(() => {
|
|
2488
|
+
_Identifiers.twoWayProperty = { name: "\u0275\u0275twoWayProperty", moduleName: CORE };
|
|
2489
|
+
})();
|
|
2490
|
+
(() => {
|
|
2491
|
+
_Identifiers.twoWayBindingSet = { name: "\u0275\u0275twoWayBindingSet", moduleName: CORE };
|
|
2492
|
+
})();
|
|
2493
|
+
(() => {
|
|
2494
|
+
_Identifiers.twoWayListener = { name: "\u0275\u0275twoWayListener", moduleName: CORE };
|
|
2495
|
+
})();
|
|
2482
2496
|
(() => {
|
|
2483
2497
|
_Identifiers.NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: CORE };
|
|
2484
2498
|
})();
|
|
@@ -2548,8 +2562,11 @@ var Identifiers = _Identifiers;
|
|
|
2548
2562
|
(() => {
|
|
2549
2563
|
_Identifiers.UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
|
|
2550
2564
|
})();
|
|
2565
|
+
(() => {
|
|
2566
|
+
_Identifiers.unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
|
|
2567
|
+
})();
|
|
2551
2568
|
|
|
2552
|
-
// bazel-out/
|
|
2569
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2553
2570
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2554
2571
|
function dashCaseToCamelCase(input) {
|
|
2555
2572
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2637,7 +2654,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2637
2654
|
return [truthy, falsy];
|
|
2638
2655
|
}
|
|
2639
2656
|
|
|
2640
|
-
// bazel-out/
|
|
2657
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2641
2658
|
var VERSION = 3;
|
|
2642
2659
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2643
2660
|
var SourceMapGenerator = class {
|
|
@@ -2766,7 +2783,7 @@ function toBase64Digit(value) {
|
|
|
2766
2783
|
return B64_DIGITS[value];
|
|
2767
2784
|
}
|
|
2768
2785
|
|
|
2769
|
-
// bazel-out/
|
|
2786
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2770
2787
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2771
2788
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2772
2789
|
var _INDENT_WITH = " ";
|
|
@@ -3254,7 +3271,7 @@ function _createIndent(count) {
|
|
|
3254
3271
|
return res;
|
|
3255
3272
|
}
|
|
3256
3273
|
|
|
3257
|
-
// bazel-out/
|
|
3274
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3258
3275
|
function typeWithParameters(type, numParams) {
|
|
3259
3276
|
if (numParams === 0) {
|
|
3260
3277
|
return expressionType(type);
|
|
@@ -3319,7 +3336,7 @@ function generateForwardRef(expr) {
|
|
|
3319
3336
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3320
3337
|
}
|
|
3321
3338
|
|
|
3322
|
-
// bazel-out/
|
|
3339
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3323
3340
|
var R3FactoryDelegateType;
|
|
3324
3341
|
(function(R3FactoryDelegateType2) {
|
|
3325
3342
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3464,7 +3481,7 @@ function getInjectFn(target) {
|
|
|
3464
3481
|
}
|
|
3465
3482
|
}
|
|
3466
3483
|
|
|
3467
|
-
// bazel-out/
|
|
3484
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3468
3485
|
var TagContentType;
|
|
3469
3486
|
(function(TagContentType2) {
|
|
3470
3487
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -3501,7 +3518,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3501
3518
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3502
3519
|
}
|
|
3503
3520
|
|
|
3504
|
-
// bazel-out/
|
|
3521
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3505
3522
|
var Comment = class {
|
|
3506
3523
|
constructor(value, sourceSpan) {
|
|
3507
3524
|
this.value = value;
|
|
@@ -3882,7 +3899,7 @@ function visitAll(visitor, nodes) {
|
|
|
3882
3899
|
return result;
|
|
3883
3900
|
}
|
|
3884
3901
|
|
|
3885
|
-
// bazel-out/
|
|
3902
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3886
3903
|
var Message = class {
|
|
3887
3904
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3888
3905
|
this.nodes = nodes;
|
|
@@ -4020,7 +4037,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4020
4037
|
}
|
|
4021
4038
|
};
|
|
4022
4039
|
|
|
4023
|
-
// bazel-out/
|
|
4040
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4024
4041
|
var _Visitor = class {
|
|
4025
4042
|
visitTag(tag) {
|
|
4026
4043
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4048,12 +4065,12 @@ ${doctype.dtd}
|
|
|
4048
4065
|
};
|
|
4049
4066
|
var _visitor = new _Visitor();
|
|
4050
4067
|
|
|
4051
|
-
// bazel-out/
|
|
4068
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4052
4069
|
function toPublicName(internalName) {
|
|
4053
4070
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4054
4071
|
}
|
|
4055
4072
|
|
|
4056
|
-
// bazel-out/
|
|
4073
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4057
4074
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4058
4075
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4059
4076
|
var I18N_ATTR = "i18n";
|
|
@@ -4155,7 +4172,7 @@ function declareI18nVariable(variable2) {
|
|
|
4155
4172
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4156
4173
|
}
|
|
4157
4174
|
|
|
4158
|
-
// bazel-out/
|
|
4175
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4159
4176
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4160
4177
|
var TEMPORARY_NAME = "_t";
|
|
4161
4178
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4219,7 +4236,9 @@ var CHAINABLE_INSTRUCTIONS = /* @__PURE__ */ new Set([
|
|
|
4219
4236
|
Identifiers.textInterpolate7,
|
|
4220
4237
|
Identifiers.textInterpolate8,
|
|
4221
4238
|
Identifiers.textInterpolateV,
|
|
4222
|
-
Identifiers.templateCreate
|
|
4239
|
+
Identifiers.templateCreate,
|
|
4240
|
+
Identifiers.twoWayProperty,
|
|
4241
|
+
Identifiers.twoWayListener
|
|
4223
4242
|
]);
|
|
4224
4243
|
function invokeInstruction(span, reference2, params) {
|
|
4225
4244
|
return importExpr(reference2, null, span).callFn(params, span);
|
|
@@ -4354,7 +4373,7 @@ function getAttrsForDirectiveMatching(elOrTpl) {
|
|
|
4354
4373
|
}
|
|
4355
4374
|
});
|
|
4356
4375
|
elOrTpl.inputs.forEach((i) => {
|
|
4357
|
-
if (i.type === 0) {
|
|
4376
|
+
if (i.type === 0 || i.type === 5) {
|
|
4358
4377
|
attributesMap[i.name] = "";
|
|
4359
4378
|
}
|
|
4360
4379
|
});
|
|
@@ -4399,7 +4418,7 @@ function getInstructionStatements(instructions) {
|
|
|
4399
4418
|
return statements;
|
|
4400
4419
|
}
|
|
4401
4420
|
|
|
4402
|
-
// bazel-out/
|
|
4421
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4403
4422
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4404
4423
|
let result = null;
|
|
4405
4424
|
const factoryMeta = {
|
|
@@ -4484,7 +4503,7 @@ function createFactoryFunction(type) {
|
|
|
4484
4503
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4485
4504
|
}
|
|
4486
4505
|
|
|
4487
|
-
// bazel-out/
|
|
4506
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4488
4507
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4489
4508
|
/^\s*$/,
|
|
4490
4509
|
/[<>]/,
|
|
@@ -4506,7 +4525,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4506
4525
|
}
|
|
4507
4526
|
}
|
|
4508
4527
|
|
|
4509
|
-
// bazel-out/
|
|
4528
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4510
4529
|
var InterpolationConfig = class {
|
|
4511
4530
|
static fromArray(markers) {
|
|
4512
4531
|
if (!markers) {
|
|
@@ -4523,7 +4542,7 @@ var InterpolationConfig = class {
|
|
|
4523
4542
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4524
4543
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4525
4544
|
|
|
4526
|
-
// bazel-out/
|
|
4545
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4527
4546
|
var $EOF = 0;
|
|
4528
4547
|
var $BSPACE = 8;
|
|
4529
4548
|
var $TAB = 9;
|
|
@@ -4605,7 +4624,7 @@ function isQuote(code) {
|
|
|
4605
4624
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4606
4625
|
}
|
|
4607
4626
|
|
|
4608
|
-
// bazel-out/
|
|
4627
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4609
4628
|
var ParseLocation = class {
|
|
4610
4629
|
constructor(file, offset, line, col) {
|
|
4611
4630
|
this.file = file;
|
|
@@ -4752,7 +4771,7 @@ function sanitizeIdentifier(name) {
|
|
|
4752
4771
|
return name.replace(/\W/g, "_");
|
|
4753
4772
|
}
|
|
4754
4773
|
|
|
4755
|
-
// bazel-out/
|
|
4774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4756
4775
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4757
4776
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4758
4777
|
constructor() {
|
|
@@ -4845,7 +4864,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4845
4864
|
}
|
|
4846
4865
|
};
|
|
4847
4866
|
|
|
4848
|
-
// bazel-out/
|
|
4867
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4849
4868
|
var policy;
|
|
4850
4869
|
function getPolicy() {
|
|
4851
4870
|
if (policy === void 0) {
|
|
@@ -4883,7 +4902,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4883
4902
|
return fn2.bind(_global);
|
|
4884
4903
|
}
|
|
4885
4904
|
|
|
4886
|
-
// bazel-out/
|
|
4905
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4887
4906
|
var JitEvaluator = class {
|
|
4888
4907
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4889
4908
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4974,7 +4993,7 @@ function isUseStrictStatement(statement) {
|
|
|
4974
4993
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4975
4994
|
}
|
|
4976
4995
|
|
|
4977
|
-
// bazel-out/
|
|
4996
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4978
4997
|
function compileInjector(meta) {
|
|
4979
4998
|
const definitionMap = new DefinitionMap();
|
|
4980
4999
|
if (meta.providers !== null) {
|
|
@@ -4991,7 +5010,7 @@ function createInjectorType(meta) {
|
|
|
4991
5010
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4992
5011
|
}
|
|
4993
5012
|
|
|
4994
|
-
// bazel-out/
|
|
5013
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4995
5014
|
var R3JitReflector = class {
|
|
4996
5015
|
constructor(context) {
|
|
4997
5016
|
this.context = context;
|
|
@@ -5007,7 +5026,7 @@ var R3JitReflector = class {
|
|
|
5007
5026
|
}
|
|
5008
5027
|
};
|
|
5009
5028
|
|
|
5010
|
-
// bazel-out/
|
|
5029
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5011
5030
|
var R3SelectorScopeMode;
|
|
5012
5031
|
(function(R3SelectorScopeMode2) {
|
|
5013
5032
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5148,7 +5167,7 @@ function tupleOfTypes(types) {
|
|
|
5148
5167
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5149
5168
|
}
|
|
5150
5169
|
|
|
5151
|
-
// bazel-out/
|
|
5170
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5152
5171
|
function compilePipeFromMetadata(metadata) {
|
|
5153
5172
|
const definitionMapValues = [];
|
|
5154
5173
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5169,7 +5188,7 @@ function createPipeType(metadata) {
|
|
|
5169
5188
|
]));
|
|
5170
5189
|
}
|
|
5171
5190
|
|
|
5172
|
-
// bazel-out/
|
|
5191
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5173
5192
|
var R3TemplateDependencyKind;
|
|
5174
5193
|
(function(R3TemplateDependencyKind2) {
|
|
5175
5194
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5177,7 +5196,7 @@ var R3TemplateDependencyKind;
|
|
|
5177
5196
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5178
5197
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5179
5198
|
|
|
5180
|
-
// bazel-out/
|
|
5199
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5181
5200
|
var ParserError = class {
|
|
5182
5201
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5183
5202
|
this.input = input;
|
|
@@ -5809,6 +5828,7 @@ var ParsedPropertyType;
|
|
|
5809
5828
|
ParsedPropertyType2[ParsedPropertyType2["DEFAULT"] = 0] = "DEFAULT";
|
|
5810
5829
|
ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
|
|
5811
5830
|
ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 2] = "ANIMATION";
|
|
5831
|
+
ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
|
|
5812
5832
|
})(ParsedPropertyType || (ParsedPropertyType = {}));
|
|
5813
5833
|
var ParsedEvent = class {
|
|
5814
5834
|
constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {
|
|
@@ -5843,7 +5863,7 @@ var BoundElementProperty = class {
|
|
|
5843
5863
|
}
|
|
5844
5864
|
};
|
|
5845
5865
|
|
|
5846
|
-
// bazel-out/
|
|
5866
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5847
5867
|
var _EventHandlerVars = class {
|
|
5848
5868
|
};
|
|
5849
5869
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -5851,30 +5871,10 @@ var EventHandlerVars = _EventHandlerVars;
|
|
|
5851
5871
|
_EventHandlerVars.event = variable("$event");
|
|
5852
5872
|
})();
|
|
5853
5873
|
function convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
5854
|
-
|
|
5855
|
-
localResolver = new DefaultLocalResolver(globals);
|
|
5856
|
-
}
|
|
5857
|
-
const actionWithoutBuiltins = convertPropertyBindingBuiltins({
|
|
5858
|
-
createLiteralArrayConverter: (argCount) => {
|
|
5859
|
-
return (args) => literalArr(args);
|
|
5860
|
-
},
|
|
5861
|
-
createLiteralMapConverter: (keys) => {
|
|
5862
|
-
return (values) => {
|
|
5863
|
-
const entries = keys.map((k, i) => ({
|
|
5864
|
-
key: k.key,
|
|
5865
|
-
value: values[i],
|
|
5866
|
-
quoted: k.quoted
|
|
5867
|
-
}));
|
|
5868
|
-
return literalMap(entries);
|
|
5869
|
-
};
|
|
5870
|
-
},
|
|
5871
|
-
createPipeConverter: (name) => {
|
|
5872
|
-
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
5873
|
-
}
|
|
5874
|
-
}, action);
|
|
5874
|
+
localResolver != null ? localResolver : localResolver = new DefaultLocalResolver(globals);
|
|
5875
5875
|
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, false, baseSourceSpan, implicitReceiverAccesses);
|
|
5876
5876
|
const actionStmts = [];
|
|
5877
|
-
flattenStatements(
|
|
5877
|
+
flattenStatements(convertActionBuiltins(action).visit(visitor, _Mode.Statement), actionStmts);
|
|
5878
5878
|
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
5879
5879
|
if (visitor.usesImplicitReceiver) {
|
|
5880
5880
|
localResolver.notifyImplicitReceiverUse();
|
|
@@ -5888,6 +5888,55 @@ function convertActionBinding(localResolver, implicitReceiver, action, bindingId
|
|
|
5888
5888
|
}
|
|
5889
5889
|
return actionStmts;
|
|
5890
5890
|
}
|
|
5891
|
+
function convertAssignmentActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
5892
|
+
localResolver != null ? localResolver : localResolver = new DefaultLocalResolver(globals);
|
|
5893
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, false, baseSourceSpan, implicitReceiverAccesses);
|
|
5894
|
+
let convertedAction = convertActionBuiltins(action).visit(visitor, _Mode.Statement);
|
|
5895
|
+
if (!(convertedAction instanceof ExpressionStatement)) {
|
|
5896
|
+
throw new Error(`Illegal state: unsupported expression in two-way action binding.`);
|
|
5897
|
+
}
|
|
5898
|
+
convertedAction = wrapAssignmentAction(convertedAction.expr).toStmt();
|
|
5899
|
+
const actionStmts = [];
|
|
5900
|
+
flattenStatements(convertedAction, actionStmts);
|
|
5901
|
+
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
5902
|
+
actionStmts.push(new ReturnStatement(EventHandlerVars.event));
|
|
5903
|
+
implicitReceiverAccesses == null ? void 0 : implicitReceiverAccesses.add(EventHandlerVars.event.name);
|
|
5904
|
+
if (visitor.usesImplicitReceiver) {
|
|
5905
|
+
localResolver.notifyImplicitReceiverUse();
|
|
5906
|
+
}
|
|
5907
|
+
return actionStmts;
|
|
5908
|
+
}
|
|
5909
|
+
function wrapAssignmentReadExpression(ast) {
|
|
5910
|
+
return new ExternalExpr(Identifiers.twoWayBindingSet).callFn([ast, EventHandlerVars.event]).or(ast.set(EventHandlerVars.event));
|
|
5911
|
+
}
|
|
5912
|
+
function isReadExpression(value) {
|
|
5913
|
+
return value instanceof ReadPropExpr || value instanceof ReadKeyExpr;
|
|
5914
|
+
}
|
|
5915
|
+
function wrapAssignmentAction(ast) {
|
|
5916
|
+
if (isReadExpression(ast)) {
|
|
5917
|
+
return wrapAssignmentReadExpression(ast);
|
|
5918
|
+
}
|
|
5919
|
+
if (ast instanceof BinaryOperatorExpr && isReadExpression(ast.rhs)) {
|
|
5920
|
+
return new BinaryOperatorExpr(ast.operator, ast.lhs, wrapAssignmentReadExpression(ast.rhs));
|
|
5921
|
+
}
|
|
5922
|
+
if (ast instanceof ConditionalExpr && isReadExpression(ast.falseCase)) {
|
|
5923
|
+
return new ConditionalExpr(ast.condition, ast.trueCase, wrapAssignmentReadExpression(ast.falseCase));
|
|
5924
|
+
}
|
|
5925
|
+
if (ast instanceof NotExpr) {
|
|
5926
|
+
let expr = ast.condition;
|
|
5927
|
+
while (true) {
|
|
5928
|
+
if (expr instanceof NotExpr) {
|
|
5929
|
+
expr = expr.condition;
|
|
5930
|
+
} else {
|
|
5931
|
+
if (isReadExpression(expr)) {
|
|
5932
|
+
return wrapAssignmentReadExpression(expr);
|
|
5933
|
+
}
|
|
5934
|
+
break;
|
|
5935
|
+
}
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
throw new Error(`Illegal state: unsupported expression in two-way action binding.`);
|
|
5939
|
+
}
|
|
5891
5940
|
function convertPropertyBindingBuiltins(converterFactory, ast) {
|
|
5892
5941
|
return convertBuiltins(converterFactory, ast);
|
|
5893
5942
|
}
|
|
@@ -5949,6 +5998,27 @@ function convertBuiltins(converterFactory, ast) {
|
|
|
5949
5998
|
const visitor = new _BuiltinAstConverter(converterFactory);
|
|
5950
5999
|
return ast.visit(visitor);
|
|
5951
6000
|
}
|
|
6001
|
+
function convertActionBuiltins(action) {
|
|
6002
|
+
const converterFactory = {
|
|
6003
|
+
createLiteralArrayConverter: () => {
|
|
6004
|
+
return (args) => literalArr(args);
|
|
6005
|
+
},
|
|
6006
|
+
createLiteralMapConverter: (keys) => {
|
|
6007
|
+
return (values) => {
|
|
6008
|
+
const entries = keys.map((k, i) => ({
|
|
6009
|
+
key: k.key,
|
|
6010
|
+
value: values[i],
|
|
6011
|
+
quoted: k.quoted
|
|
6012
|
+
}));
|
|
6013
|
+
return literalMap(entries);
|
|
6014
|
+
};
|
|
6015
|
+
},
|
|
6016
|
+
createPipeConverter: (name) => {
|
|
6017
|
+
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
6018
|
+
}
|
|
6019
|
+
};
|
|
6020
|
+
return convertPropertyBindingBuiltins(converterFactory, action);
|
|
6021
|
+
}
|
|
5952
6022
|
function temporaryName(bindingId, temporaryNumber) {
|
|
5953
6023
|
return `tmp_${bindingId}_${temporaryNumber}`;
|
|
5954
6024
|
}
|
|
@@ -6484,7 +6554,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6484
6554
|
}
|
|
6485
6555
|
};
|
|
6486
6556
|
|
|
6487
|
-
// bazel-out/
|
|
6557
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6488
6558
|
var _SECURITY_SCHEMA;
|
|
6489
6559
|
function SECURITY_SCHEMA() {
|
|
6490
6560
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6542,7 +6612,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6542
6612
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6543
6613
|
}
|
|
6544
6614
|
|
|
6545
|
-
// bazel-out/
|
|
6615
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6546
6616
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6547
6617
|
"inherit",
|
|
6548
6618
|
"initial",
|
|
@@ -7014,7 +7084,7 @@ function repeatGroups(groups, multiples) {
|
|
|
7014
7084
|
}
|
|
7015
7085
|
}
|
|
7016
7086
|
|
|
7017
|
-
// bazel-out/
|
|
7087
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
7018
7088
|
var OpKind;
|
|
7019
7089
|
(function(OpKind2) {
|
|
7020
7090
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7053,16 +7123,18 @@ var OpKind;
|
|
|
7053
7123
|
OpKind2[OpKind2["Projection"] = 33] = "Projection";
|
|
7054
7124
|
OpKind2[OpKind2["RepeaterCreate"] = 34] = "RepeaterCreate";
|
|
7055
7125
|
OpKind2[OpKind2["Repeater"] = 35] = "Repeater";
|
|
7056
|
-
OpKind2[OpKind2["
|
|
7057
|
-
OpKind2[OpKind2["
|
|
7058
|
-
OpKind2[OpKind2["
|
|
7059
|
-
OpKind2[OpKind2["
|
|
7060
|
-
OpKind2[OpKind2["
|
|
7061
|
-
OpKind2[OpKind2["
|
|
7062
|
-
OpKind2[OpKind2["
|
|
7063
|
-
OpKind2[OpKind2["
|
|
7064
|
-
OpKind2[OpKind2["
|
|
7065
|
-
OpKind2[OpKind2["
|
|
7126
|
+
OpKind2[OpKind2["TwoWayProperty"] = 36] = "TwoWayProperty";
|
|
7127
|
+
OpKind2[OpKind2["TwoWayListener"] = 37] = "TwoWayListener";
|
|
7128
|
+
OpKind2[OpKind2["I18nStart"] = 38] = "I18nStart";
|
|
7129
|
+
OpKind2[OpKind2["I18n"] = 39] = "I18n";
|
|
7130
|
+
OpKind2[OpKind2["I18nEnd"] = 40] = "I18nEnd";
|
|
7131
|
+
OpKind2[OpKind2["I18nExpression"] = 41] = "I18nExpression";
|
|
7132
|
+
OpKind2[OpKind2["I18nApply"] = 42] = "I18nApply";
|
|
7133
|
+
OpKind2[OpKind2["IcuStart"] = 43] = "IcuStart";
|
|
7134
|
+
OpKind2[OpKind2["IcuEnd"] = 44] = "IcuEnd";
|
|
7135
|
+
OpKind2[OpKind2["IcuPlaceholder"] = 45] = "IcuPlaceholder";
|
|
7136
|
+
OpKind2[OpKind2["I18nContext"] = 46] = "I18nContext";
|
|
7137
|
+
OpKind2[OpKind2["I18nAttributes"] = 47] = "I18nAttributes";
|
|
7066
7138
|
})(OpKind || (OpKind = {}));
|
|
7067
7139
|
var ExpressionKind;
|
|
7068
7140
|
(function(ExpressionKind2) {
|
|
@@ -7092,6 +7164,7 @@ var ExpressionKind;
|
|
|
7092
7164
|
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
|
|
7093
7165
|
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
7094
7166
|
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
7167
|
+
ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 26] = "TwoWayBindingSet";
|
|
7095
7168
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7096
7169
|
var VariableFlags;
|
|
7097
7170
|
(function(VariableFlags2) {
|
|
@@ -7125,6 +7198,7 @@ var BindingKind;
|
|
|
7125
7198
|
BindingKind2[BindingKind2["Template"] = 4] = "Template";
|
|
7126
7199
|
BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
|
|
7127
7200
|
BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
|
|
7201
|
+
BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
|
|
7128
7202
|
})(BindingKind || (BindingKind = {}));
|
|
7129
7203
|
var I18nParamResolutionTime;
|
|
7130
7204
|
(function(I18nParamResolutionTime2) {
|
|
@@ -7173,7 +7247,7 @@ var TemplateKind;
|
|
|
7173
7247
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7174
7248
|
})(TemplateKind || (TemplateKind = {}));
|
|
7175
7249
|
|
|
7176
|
-
// bazel-out/
|
|
7250
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7177
7251
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7178
7252
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7179
7253
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7205,7 +7279,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7205
7279
|
return expr[UsesVarOffset] === true;
|
|
7206
7280
|
}
|
|
7207
7281
|
|
|
7208
|
-
// bazel-out/
|
|
7282
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7209
7283
|
function createStatementOp(statement) {
|
|
7210
7284
|
return __spreadValues({
|
|
7211
7285
|
kind: OpKind.Statement,
|
|
@@ -7227,7 +7301,7 @@ var NEW_OP = {
|
|
|
7227
7301
|
next: null
|
|
7228
7302
|
};
|
|
7229
7303
|
|
|
7230
|
-
// bazel-out/
|
|
7304
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7231
7305
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7232
7306
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7233
7307
|
kind: OpKind.InterpolateText,
|
|
@@ -7279,6 +7353,21 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7279
7353
|
sourceSpan
|
|
7280
7354
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7281
7355
|
}
|
|
7356
|
+
function createTwoWayPropertyOp(target, name, expression, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
7357
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
7358
|
+
kind: OpKind.TwoWayProperty,
|
|
7359
|
+
target,
|
|
7360
|
+
name,
|
|
7361
|
+
expression,
|
|
7362
|
+
securityContext,
|
|
7363
|
+
sanitizer: null,
|
|
7364
|
+
isStructuralTemplateAttribute,
|
|
7365
|
+
templateKind,
|
|
7366
|
+
i18nContext,
|
|
7367
|
+
i18nMessage,
|
|
7368
|
+
sourceSpan
|
|
7369
|
+
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7370
|
+
}
|
|
7282
7371
|
function createStylePropOp(xref, name, expression, unit, sourceSpan) {
|
|
7283
7372
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7284
7373
|
kind: OpKind.StyleProp,
|
|
@@ -7393,7 +7482,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
7393
7482
|
}, NEW_OP);
|
|
7394
7483
|
}
|
|
7395
7484
|
|
|
7396
|
-
// bazel-out/
|
|
7485
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7397
7486
|
var _a;
|
|
7398
7487
|
var _b;
|
|
7399
7488
|
var _c;
|
|
@@ -7586,6 +7675,31 @@ var ResetViewExpr = class extends ExpressionBase {
|
|
|
7586
7675
|
return new ResetViewExpr(this.expr.clone());
|
|
7587
7676
|
}
|
|
7588
7677
|
};
|
|
7678
|
+
var TwoWayBindingSetExpr = class extends ExpressionBase {
|
|
7679
|
+
constructor(target, value) {
|
|
7680
|
+
super();
|
|
7681
|
+
this.target = target;
|
|
7682
|
+
this.value = value;
|
|
7683
|
+
this.kind = ExpressionKind.TwoWayBindingSet;
|
|
7684
|
+
}
|
|
7685
|
+
visitExpression(visitor, context) {
|
|
7686
|
+
this.target.visitExpression(visitor, context);
|
|
7687
|
+
this.value.visitExpression(visitor, context);
|
|
7688
|
+
}
|
|
7689
|
+
isEquivalent(other) {
|
|
7690
|
+
return this.target.isEquivalent(other.target) && this.value.isEquivalent(other.value);
|
|
7691
|
+
}
|
|
7692
|
+
isConstant() {
|
|
7693
|
+
return false;
|
|
7694
|
+
}
|
|
7695
|
+
transformInternalExpressions(transform2, flags) {
|
|
7696
|
+
this.target = transformExpressionsInExpression(this.target, transform2, flags);
|
|
7697
|
+
this.value = transformExpressionsInExpression(this.value, transform2, flags);
|
|
7698
|
+
}
|
|
7699
|
+
clone() {
|
|
7700
|
+
return new TwoWayBindingSetExpr(this.target, this.value);
|
|
7701
|
+
}
|
|
7702
|
+
};
|
|
7589
7703
|
var ReadVariableExpr = class extends ExpressionBase {
|
|
7590
7704
|
constructor(xref) {
|
|
7591
7705
|
super();
|
|
@@ -8037,6 +8151,10 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8037
8151
|
}
|
|
8038
8152
|
op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform2, flags);
|
|
8039
8153
|
break;
|
|
8154
|
+
case OpKind.TwoWayProperty:
|
|
8155
|
+
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8156
|
+
op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform2, flags);
|
|
8157
|
+
break;
|
|
8040
8158
|
case OpKind.I18nExpression:
|
|
8041
8159
|
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8042
8160
|
break;
|
|
@@ -8064,6 +8182,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8064
8182
|
}
|
|
8065
8183
|
break;
|
|
8066
8184
|
case OpKind.Listener:
|
|
8185
|
+
case OpKind.TwoWayListener:
|
|
8067
8186
|
for (const innerOp of op.handlerOps) {
|
|
8068
8187
|
transformExpressionsInOp(innerOp, transform2, flags | VisitorContextFlag.InChildOperation);
|
|
8069
8188
|
}
|
|
@@ -8225,7 +8344,7 @@ function isStringLiteral(expr) {
|
|
|
8225
8344
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8226
8345
|
}
|
|
8227
8346
|
|
|
8228
|
-
// bazel-out/
|
|
8347
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8229
8348
|
var _OpList = class {
|
|
8230
8349
|
constructor() {
|
|
8231
8350
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8416,14 +8535,14 @@ var OpList = _OpList;
|
|
|
8416
8535
|
_OpList.nextListId = 0;
|
|
8417
8536
|
})();
|
|
8418
8537
|
|
|
8419
|
-
// bazel-out/
|
|
8538
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8420
8539
|
var SlotHandle = class {
|
|
8421
8540
|
constructor() {
|
|
8422
8541
|
this.slot = null;
|
|
8423
8542
|
}
|
|
8424
8543
|
};
|
|
8425
8544
|
|
|
8426
|
-
// bazel-out/
|
|
8545
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8427
8546
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8428
8547
|
OpKind.Element,
|
|
8429
8548
|
OpKind.ElementStart,
|
|
@@ -8545,6 +8664,20 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPh
|
|
|
8545
8664
|
sourceSpan
|
|
8546
8665
|
}, NEW_OP);
|
|
8547
8666
|
}
|
|
8667
|
+
function createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) {
|
|
8668
|
+
const handlerList = new OpList();
|
|
8669
|
+
handlerList.push(handlerOps);
|
|
8670
|
+
return __spreadValues({
|
|
8671
|
+
kind: OpKind.TwoWayListener,
|
|
8672
|
+
target,
|
|
8673
|
+
targetSlot,
|
|
8674
|
+
tag,
|
|
8675
|
+
name,
|
|
8676
|
+
handlerOps: handlerList,
|
|
8677
|
+
handlerFnName: null,
|
|
8678
|
+
sourceSpan
|
|
8679
|
+
}, NEW_OP);
|
|
8680
|
+
}
|
|
8548
8681
|
function createPipeOp(xref, slot, name) {
|
|
8549
8682
|
return __spreadValues(__spreadValues({
|
|
8550
8683
|
kind: OpKind.Pipe,
|
|
@@ -8592,7 +8725,7 @@ function createExtractedAttributeOp(target, bindingKind, namespace, name, expres
|
|
|
8592
8725
|
trustedValueFn: null
|
|
8593
8726
|
}, NEW_OP);
|
|
8594
8727
|
}
|
|
8595
|
-
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
8728
|
+
function createDeferOp(xref, main, mainSlot, metadata, resolverFn, sourceSpan) {
|
|
8596
8729
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8597
8730
|
kind: OpKind.Defer,
|
|
8598
8731
|
xref,
|
|
@@ -8611,7 +8744,7 @@ function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
|
8611
8744
|
errorView: null,
|
|
8612
8745
|
errorSlot: null,
|
|
8613
8746
|
metadata,
|
|
8614
|
-
resolverFn
|
|
8747
|
+
resolverFn,
|
|
8615
8748
|
sourceSpan
|
|
8616
8749
|
}, NEW_OP), TRAIT_CONSUMES_SLOT), {
|
|
8617
8750
|
numSlotsUsed: 2
|
|
@@ -8710,7 +8843,7 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
8710
8843
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8711
8844
|
}
|
|
8712
8845
|
|
|
8713
|
-
// bazel-out/
|
|
8846
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8714
8847
|
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
8715
8848
|
return __spreadValues(__spreadValues({
|
|
8716
8849
|
kind: OpKind.HostProperty,
|
|
@@ -8724,10 +8857,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext,
|
|
|
8724
8857
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8725
8858
|
}
|
|
8726
8859
|
|
|
8727
|
-
// bazel-out/
|
|
8860
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8728
8861
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8729
8862
|
|
|
8730
|
-
// bazel-out/
|
|
8863
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8731
8864
|
var CompilationJobKind;
|
|
8732
8865
|
(function(CompilationJobKind2) {
|
|
8733
8866
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8747,11 +8880,12 @@ var CompilationJob = class {
|
|
|
8747
8880
|
}
|
|
8748
8881
|
};
|
|
8749
8882
|
var ComponentCompilationJob = class extends CompilationJob {
|
|
8750
|
-
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
8883
|
+
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn) {
|
|
8751
8884
|
super(componentName, pool, compatibility);
|
|
8752
8885
|
this.relativeContextFilePath = relativeContextFilePath;
|
|
8753
8886
|
this.i18nUseExternalIds = i18nUseExternalIds;
|
|
8754
8887
|
this.deferBlocksMeta = deferBlocksMeta;
|
|
8888
|
+
this.allDeferrableDepsFn = allDeferrableDepsFn;
|
|
8755
8889
|
this.kind = CompilationJobKind.Tmpl;
|
|
8756
8890
|
this.fnSuffix = "Template";
|
|
8757
8891
|
this.views = /* @__PURE__ */ new Map();
|
|
@@ -8794,7 +8928,7 @@ var CompilationUnit = class {
|
|
|
8794
8928
|
*ops() {
|
|
8795
8929
|
for (const op of this.create) {
|
|
8796
8930
|
yield op;
|
|
8797
|
-
if (op.kind === OpKind.Listener) {
|
|
8931
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
8798
8932
|
for (const listenerOp of op.handlerOps) {
|
|
8799
8933
|
yield listenerOp;
|
|
8800
8934
|
}
|
|
@@ -8834,7 +8968,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8834
8968
|
}
|
|
8835
8969
|
};
|
|
8836
8970
|
|
|
8837
|
-
// bazel-out/
|
|
8971
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8838
8972
|
function deleteAnyCasts(job) {
|
|
8839
8973
|
for (const unit of job.units) {
|
|
8840
8974
|
for (const op of unit.ops()) {
|
|
@@ -8852,7 +8986,7 @@ function removeAnys(e) {
|
|
|
8852
8986
|
return e;
|
|
8853
8987
|
}
|
|
8854
8988
|
|
|
8855
|
-
// bazel-out/
|
|
8989
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8856
8990
|
function applyI18nExpressions(job) {
|
|
8857
8991
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8858
8992
|
for (const unit of job.units) {
|
|
@@ -8895,7 +9029,7 @@ function needsApplication(i18nContexts, op) {
|
|
|
8895
9029
|
return false;
|
|
8896
9030
|
}
|
|
8897
9031
|
|
|
8898
|
-
// bazel-out/
|
|
9032
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8899
9033
|
function assignI18nSlotDependencies(job) {
|
|
8900
9034
|
for (const unit of job.units) {
|
|
8901
9035
|
let updateOp = unit.update.head;
|
|
@@ -8940,7 +9074,7 @@ function assignI18nSlotDependencies(job) {
|
|
|
8940
9074
|
}
|
|
8941
9075
|
}
|
|
8942
9076
|
|
|
8943
|
-
// bazel-out/
|
|
9077
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8944
9078
|
function createOpXrefMap(unit) {
|
|
8945
9079
|
const map = /* @__PURE__ */ new Map();
|
|
8946
9080
|
for (const op of unit.create) {
|
|
@@ -8955,7 +9089,7 @@ function createOpXrefMap(unit) {
|
|
|
8955
9089
|
return map;
|
|
8956
9090
|
}
|
|
8957
9091
|
|
|
8958
|
-
// bazel-out/
|
|
9092
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8959
9093
|
function extractAttributes(job) {
|
|
8960
9094
|
for (const unit of job.units) {
|
|
8961
9095
|
const elements = createOpXrefMap(unit);
|
|
@@ -8989,6 +9123,18 @@ function extractAttributes(job) {
|
|
|
8989
9123
|
);
|
|
8990
9124
|
}
|
|
8991
9125
|
break;
|
|
9126
|
+
case OpKind.TwoWayProperty:
|
|
9127
|
+
OpList.insertBefore(createExtractedAttributeOp(
|
|
9128
|
+
op.target,
|
|
9129
|
+
BindingKind.TwoWayProperty,
|
|
9130
|
+
null,
|
|
9131
|
+
op.name,
|
|
9132
|
+
null,
|
|
9133
|
+
null,
|
|
9134
|
+
null,
|
|
9135
|
+
op.securityContext
|
|
9136
|
+
), lookupElement(elements, op.target));
|
|
9137
|
+
break;
|
|
8992
9138
|
case OpKind.StyleProp:
|
|
8993
9139
|
case OpKind.ClassProp:
|
|
8994
9140
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
@@ -9026,6 +9172,21 @@ function extractAttributes(job) {
|
|
|
9026
9172
|
}
|
|
9027
9173
|
}
|
|
9028
9174
|
break;
|
|
9175
|
+
case OpKind.TwoWayListener:
|
|
9176
|
+
if (job.kind !== CompilationJobKind.Host) {
|
|
9177
|
+
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9178
|
+
op.target,
|
|
9179
|
+
BindingKind.Property,
|
|
9180
|
+
null,
|
|
9181
|
+
op.name,
|
|
9182
|
+
null,
|
|
9183
|
+
null,
|
|
9184
|
+
null,
|
|
9185
|
+
SecurityContext.NONE
|
|
9186
|
+
);
|
|
9187
|
+
OpList.insertBefore(extractedAttributeOp, lookupElement(elements, op.target));
|
|
9188
|
+
}
|
|
9189
|
+
break;
|
|
9029
9190
|
}
|
|
9030
9191
|
}
|
|
9031
9192
|
}
|
|
@@ -9057,7 +9218,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9057
9218
|
}
|
|
9058
9219
|
}
|
|
9059
9220
|
|
|
9060
|
-
// bazel-out/
|
|
9221
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9061
9222
|
function lookupElement2(elements, xref) {
|
|
9062
9223
|
const el = elements.get(xref);
|
|
9063
9224
|
if (el === void 0) {
|
|
@@ -9099,6 +9260,12 @@ function specializeBindings(job) {
|
|
|
9099
9260
|
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));
|
|
9100
9261
|
}
|
|
9101
9262
|
break;
|
|
9263
|
+
case BindingKind.TwoWayProperty:
|
|
9264
|
+
if (!(op.expression instanceof Expression)) {
|
|
9265
|
+
throw new Error(`Expected value of two-way property binding "${op.name}" to be an expression`);
|
|
9266
|
+
}
|
|
9267
|
+
OpList.replace(op, createTwoWayPropertyOp(op.target, op.name, op.expression, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
9268
|
+
break;
|
|
9102
9269
|
case BindingKind.I18n:
|
|
9103
9270
|
case BindingKind.ClassName:
|
|
9104
9271
|
case BindingKind.StyleProperty:
|
|
@@ -9108,7 +9275,7 @@ function specializeBindings(job) {
|
|
|
9108
9275
|
}
|
|
9109
9276
|
}
|
|
9110
9277
|
|
|
9111
|
-
// bazel-out/
|
|
9278
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9112
9279
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9113
9280
|
Identifiers.attribute,
|
|
9114
9281
|
Identifiers.classProp,
|
|
@@ -9135,7 +9302,9 @@ var CHAINABLE = /* @__PURE__ */ new Set([
|
|
|
9135
9302
|
Identifiers.stylePropInterpolateV,
|
|
9136
9303
|
Identifiers.syntheticHostListener,
|
|
9137
9304
|
Identifiers.syntheticHostProperty,
|
|
9138
|
-
Identifiers.templateCreate
|
|
9305
|
+
Identifiers.templateCreate,
|
|
9306
|
+
Identifiers.twoWayProperty,
|
|
9307
|
+
Identifiers.twoWayListener
|
|
9139
9308
|
]);
|
|
9140
9309
|
function chain(job) {
|
|
9141
9310
|
for (const unit of job.units) {
|
|
@@ -9174,7 +9343,7 @@ function chainOperationsInList(opList) {
|
|
|
9174
9343
|
}
|
|
9175
9344
|
}
|
|
9176
9345
|
|
|
9177
|
-
// bazel-out/
|
|
9346
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9178
9347
|
function collapseSingletonInterpolations(job) {
|
|
9179
9348
|
for (const unit of job.units) {
|
|
9180
9349
|
for (const op of unit.update) {
|
|
@@ -9186,7 +9355,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9186
9355
|
}
|
|
9187
9356
|
}
|
|
9188
9357
|
|
|
9189
|
-
// bazel-out/
|
|
9358
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9190
9359
|
function generateConditionalExpressions(job) {
|
|
9191
9360
|
for (const unit of job.units) {
|
|
9192
9361
|
for (const op of unit.ops()) {
|
|
@@ -9223,7 +9392,7 @@ function generateConditionalExpressions(job) {
|
|
|
9223
9392
|
}
|
|
9224
9393
|
}
|
|
9225
9394
|
|
|
9226
|
-
// bazel-out/
|
|
9395
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9227
9396
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9228
9397
|
["&&", BinaryOperator.And],
|
|
9229
9398
|
[">", BinaryOperator.Bigger],
|
|
@@ -9274,7 +9443,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9274
9443
|
return literal(value);
|
|
9275
9444
|
}
|
|
9276
9445
|
|
|
9277
|
-
// bazel-out/
|
|
9446
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9278
9447
|
function collectElementConsts(job) {
|
|
9279
9448
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9280
9449
|
for (const unit of job.units) {
|
|
@@ -9344,7 +9513,7 @@ var ElementAttributes = class {
|
|
|
9344
9513
|
}
|
|
9345
9514
|
get bindings() {
|
|
9346
9515
|
var _a2;
|
|
9347
|
-
return (_a2 = this.
|
|
9516
|
+
return (_a2 = this.propertyBindings) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
9348
9517
|
}
|
|
9349
9518
|
get template() {
|
|
9350
9519
|
var _a2;
|
|
@@ -9358,6 +9527,7 @@ var ElementAttributes = class {
|
|
|
9358
9527
|
this.compatibility = compatibility;
|
|
9359
9528
|
this.known = /* @__PURE__ */ new Map();
|
|
9360
9529
|
this.byKind = /* @__PURE__ */ new Map();
|
|
9530
|
+
this.propertyBindings = null;
|
|
9361
9531
|
this.projectAs = null;
|
|
9362
9532
|
}
|
|
9363
9533
|
isKnown(kind, name, value) {
|
|
@@ -9399,10 +9569,16 @@ var ElementAttributes = class {
|
|
|
9399
9569
|
}
|
|
9400
9570
|
}
|
|
9401
9571
|
arrayFor(kind) {
|
|
9402
|
-
|
|
9403
|
-
|
|
9572
|
+
var _a2;
|
|
9573
|
+
if (kind === BindingKind.Property || kind === BindingKind.TwoWayProperty) {
|
|
9574
|
+
(_a2 = this.propertyBindings) != null ? _a2 : this.propertyBindings = [];
|
|
9575
|
+
return this.propertyBindings;
|
|
9576
|
+
} else {
|
|
9577
|
+
if (!this.byKind.has(kind)) {
|
|
9578
|
+
this.byKind.set(kind, []);
|
|
9579
|
+
}
|
|
9580
|
+
return this.byKind.get(kind);
|
|
9404
9581
|
}
|
|
9405
|
-
return this.byKind.get(kind);
|
|
9406
9582
|
}
|
|
9407
9583
|
};
|
|
9408
9584
|
function getAttributeNameLiterals(namespace, name) {
|
|
@@ -9436,7 +9612,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9436
9612
|
return literalArr(attrArray);
|
|
9437
9613
|
}
|
|
9438
9614
|
|
|
9439
|
-
// bazel-out/
|
|
9615
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9440
9616
|
function convertI18nBindings(job) {
|
|
9441
9617
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9442
9618
|
for (const unit of job.units) {
|
|
@@ -9477,18 +9653,25 @@ function convertI18nBindings(job) {
|
|
|
9477
9653
|
}
|
|
9478
9654
|
}
|
|
9479
9655
|
|
|
9480
|
-
// bazel-out/
|
|
9656
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9481
9657
|
function createDeferDepsFns(job) {
|
|
9658
|
+
var _a2;
|
|
9482
9659
|
for (const unit of job.units) {
|
|
9483
9660
|
for (const op of unit.create) {
|
|
9484
9661
|
if (op.kind === OpKind.Defer) {
|
|
9485
9662
|
if (op.metadata.deps.length === 0) {
|
|
9486
9663
|
continue;
|
|
9487
9664
|
}
|
|
9665
|
+
if (op.resolverFn !== null) {
|
|
9666
|
+
continue;
|
|
9667
|
+
}
|
|
9488
9668
|
const dependencies = [];
|
|
9489
9669
|
for (const dep of op.metadata.deps) {
|
|
9490
9670
|
if (dep.isDeferrable) {
|
|
9491
|
-
const innerFn = arrowFn(
|
|
9671
|
+
const innerFn = arrowFn(
|
|
9672
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
9673
|
+
variable("m").prop(dep.isDefaultImport ? "default" : dep.symbolName)
|
|
9674
|
+
);
|
|
9492
9675
|
const importExpr2 = new DynamicImportExpr(dep.importPath).prop("then").callFn([innerFn]);
|
|
9493
9676
|
dependencies.push(importExpr2);
|
|
9494
9677
|
} else {
|
|
@@ -9499,9 +9682,10 @@ function createDeferDepsFns(job) {
|
|
|
9499
9682
|
if (op.handle.slot === null) {
|
|
9500
9683
|
throw new Error("AssertionError: slot must be assigned bfore extracting defer deps functions");
|
|
9501
9684
|
}
|
|
9685
|
+
const fullPathName = (_a2 = unit.fnName) == null ? void 0 : _a2.replace(`_Template`, ``);
|
|
9502
9686
|
op.resolverFn = job.pool.getSharedFunctionReference(
|
|
9503
9687
|
depsFnExpr,
|
|
9504
|
-
`${
|
|
9688
|
+
`${fullPathName}_Defer_${op.handle.slot}_DepsFn`,
|
|
9505
9689
|
false
|
|
9506
9690
|
);
|
|
9507
9691
|
}
|
|
@@ -9509,7 +9693,7 @@ function createDeferDepsFns(job) {
|
|
|
9509
9693
|
}
|
|
9510
9694
|
}
|
|
9511
9695
|
|
|
9512
|
-
// bazel-out/
|
|
9696
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9513
9697
|
function createI18nContexts(job) {
|
|
9514
9698
|
const attrContextByMessage = /* @__PURE__ */ new Map();
|
|
9515
9699
|
for (const unit of job.units) {
|
|
@@ -9587,7 +9771,7 @@ function createI18nContexts(job) {
|
|
|
9587
9771
|
}
|
|
9588
9772
|
}
|
|
9589
9773
|
|
|
9590
|
-
// bazel-out/
|
|
9774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
|
|
9591
9775
|
function deduplicateTextBindings(job) {
|
|
9592
9776
|
const seen = /* @__PURE__ */ new Map();
|
|
9593
9777
|
for (const unit of job.units) {
|
|
@@ -9609,7 +9793,7 @@ function deduplicateTextBindings(job) {
|
|
|
9609
9793
|
}
|
|
9610
9794
|
}
|
|
9611
9795
|
|
|
9612
|
-
// bazel-out/
|
|
9796
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9613
9797
|
function configureDeferInstructions(job) {
|
|
9614
9798
|
for (const unit of job.units) {
|
|
9615
9799
|
for (const op of unit.create) {
|
|
@@ -9626,7 +9810,7 @@ function configureDeferInstructions(job) {
|
|
|
9626
9810
|
}
|
|
9627
9811
|
}
|
|
9628
9812
|
|
|
9629
|
-
// bazel-out/
|
|
9813
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9630
9814
|
function resolveDeferTargetNames(job) {
|
|
9631
9815
|
const scopes = /* @__PURE__ */ new Map();
|
|
9632
9816
|
function getScopeForView2(view) {
|
|
@@ -9720,7 +9904,7 @@ var Scope = class {
|
|
|
9720
9904
|
}
|
|
9721
9905
|
};
|
|
9722
9906
|
|
|
9723
|
-
// bazel-out/
|
|
9907
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9724
9908
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9725
9909
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9726
9910
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9747,7 +9931,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9747
9931
|
}
|
|
9748
9932
|
}
|
|
9749
9933
|
|
|
9750
|
-
// bazel-out/
|
|
9934
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9751
9935
|
function expandSafeReads(job) {
|
|
9752
9936
|
for (const unit of job.units) {
|
|
9753
9937
|
for (const op of unit.ops()) {
|
|
@@ -9883,7 +10067,7 @@ function ternaryTransform(e) {
|
|
|
9883
10067
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9884
10068
|
}
|
|
9885
10069
|
|
|
9886
|
-
// bazel-out/
|
|
10070
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9887
10071
|
var ESCAPE = "\uFFFD";
|
|
9888
10072
|
var ELEMENT_MARKER = "#";
|
|
9889
10073
|
var TEMPLATE_MARKER = "*";
|
|
@@ -10019,7 +10203,7 @@ function formatValue(value) {
|
|
|
10019
10203
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
10020
10204
|
}
|
|
10021
10205
|
|
|
10022
|
-
// bazel-out/
|
|
10206
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
10023
10207
|
function generateAdvance(job) {
|
|
10024
10208
|
for (const unit of job.units) {
|
|
10025
10209
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -10051,7 +10235,7 @@ function generateAdvance(job) {
|
|
|
10051
10235
|
}
|
|
10052
10236
|
}
|
|
10053
10237
|
|
|
10054
|
-
// bazel-out/
|
|
10238
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
10055
10239
|
function generateProjectionDefs(job) {
|
|
10056
10240
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
10057
10241
|
const selectors = [];
|
|
@@ -10075,7 +10259,7 @@ function generateProjectionDefs(job) {
|
|
|
10075
10259
|
}
|
|
10076
10260
|
}
|
|
10077
10261
|
|
|
10078
|
-
// bazel-out/
|
|
10262
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
10079
10263
|
function generateVariables(job) {
|
|
10080
10264
|
recursivelyProcessView(job.root, null);
|
|
10081
10265
|
}
|
|
@@ -10093,6 +10277,7 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
10093
10277
|
}
|
|
10094
10278
|
break;
|
|
10095
10279
|
case OpKind.Listener:
|
|
10280
|
+
case OpKind.TwoWayListener:
|
|
10096
10281
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
10097
10282
|
break;
|
|
10098
10283
|
}
|
|
@@ -10168,7 +10353,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
10168
10353
|
return newOps;
|
|
10169
10354
|
}
|
|
10170
10355
|
|
|
10171
|
-
// bazel-out/
|
|
10356
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
10172
10357
|
function collectConstExpressions(job) {
|
|
10173
10358
|
for (const unit of job.units) {
|
|
10174
10359
|
for (const op of unit.ops()) {
|
|
@@ -10182,7 +10367,7 @@ function collectConstExpressions(job) {
|
|
|
10182
10367
|
}
|
|
10183
10368
|
}
|
|
10184
10369
|
|
|
10185
|
-
// bazel-out/
|
|
10370
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
10186
10371
|
var STYLE_DOT = "style.";
|
|
10187
10372
|
var CLASS_DOT = "class.";
|
|
10188
10373
|
var STYLE_BANG = "style!";
|
|
@@ -10240,7 +10425,7 @@ function parseProperty(name) {
|
|
|
10240
10425
|
return { property: property2, suffix };
|
|
10241
10426
|
}
|
|
10242
10427
|
|
|
10243
|
-
// bazel-out/
|
|
10428
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10244
10429
|
function mapLiteral(obj, quoted = false) {
|
|
10245
10430
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10246
10431
|
key,
|
|
@@ -10249,7 +10434,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10249
10434
|
})));
|
|
10250
10435
|
}
|
|
10251
10436
|
|
|
10252
|
-
// bazel-out/
|
|
10437
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10253
10438
|
var IcuSerializerVisitor = class {
|
|
10254
10439
|
visitText(text2) {
|
|
10255
10440
|
return text2.value;
|
|
@@ -10283,7 +10468,7 @@ function serializeIcuNode(icu) {
|
|
|
10283
10468
|
return icu.visit(serializer);
|
|
10284
10469
|
}
|
|
10285
10470
|
|
|
10286
|
-
// bazel-out/
|
|
10471
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10287
10472
|
var TokenType;
|
|
10288
10473
|
(function(TokenType2) {
|
|
10289
10474
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10644,7 +10829,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10644
10829
|
return result;
|
|
10645
10830
|
}
|
|
10646
10831
|
|
|
10647
|
-
// bazel-out/
|
|
10832
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10648
10833
|
var SplitInterpolation = class {
|
|
10649
10834
|
constructor(strings, expressions, offsets) {
|
|
10650
10835
|
this.strings = strings;
|
|
@@ -10664,15 +10849,11 @@ var Parser = class {
|
|
|
10664
10849
|
this._lexer = _lexer;
|
|
10665
10850
|
this.errors = [];
|
|
10666
10851
|
}
|
|
10667
|
-
parseAction(input,
|
|
10852
|
+
parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
10668
10853
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
10669
10854
|
const sourceToLex = this._stripComments(input);
|
|
10670
10855
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
10671
|
-
|
|
10672
|
-
if (isAssignmentEvent) {
|
|
10673
|
-
flags |= 2;
|
|
10674
|
-
}
|
|
10675
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();
|
|
10856
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1, this.errors, 0).parseChain();
|
|
10676
10857
|
return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
|
|
10677
10858
|
}
|
|
10678
10859
|
parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
@@ -11025,7 +11206,7 @@ var _ParseAST = class {
|
|
|
11025
11206
|
let result = this.parseExpression();
|
|
11026
11207
|
if (this.consumeOptionalOperator("|")) {
|
|
11027
11208
|
if (this.parseFlags & 1) {
|
|
11028
|
-
this.error(
|
|
11209
|
+
this.error(`Cannot have a pipe in an action expression`);
|
|
11029
11210
|
}
|
|
11030
11211
|
do {
|
|
11031
11212
|
const nameStart = this.inputIndex;
|
|
@@ -11319,14 +11500,14 @@ var _ParseAST = class {
|
|
|
11319
11500
|
const nameSpan = this.sourceSpan(nameStart);
|
|
11320
11501
|
let receiver;
|
|
11321
11502
|
if (isSafe) {
|
|
11322
|
-
if (this.
|
|
11503
|
+
if (this.consumeOptionalOperator("=")) {
|
|
11323
11504
|
this.error("The '?.' operator cannot be used in the assignment");
|
|
11324
11505
|
receiver = new EmptyExpr(this.span(start), this.sourceSpan(start));
|
|
11325
11506
|
} else {
|
|
11326
11507
|
receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
|
|
11327
11508
|
}
|
|
11328
11509
|
} else {
|
|
11329
|
-
if (this.
|
|
11510
|
+
if (this.consumeOptionalOperator("=")) {
|
|
11330
11511
|
if (!(this.parseFlags & 1)) {
|
|
11331
11512
|
this.error("Bindings cannot contain assignments");
|
|
11332
11513
|
return new EmptyExpr(this.span(start), this.sourceSpan(start));
|
|
@@ -11350,14 +11531,6 @@ var _ParseAST = class {
|
|
|
11350
11531
|
const sourceSpan = this.sourceSpan(start);
|
|
11351
11532
|
return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) : new Call(span, sourceSpan, receiver, args, argumentSpan);
|
|
11352
11533
|
}
|
|
11353
|
-
consumeOptionalAssignment() {
|
|
11354
|
-
if (this.parseFlags & 2 && this.next.isOperator("!") && this.peek(1).isOperator("=")) {
|
|
11355
|
-
this.advance();
|
|
11356
|
-
this.advance();
|
|
11357
|
-
return true;
|
|
11358
|
-
}
|
|
11359
|
-
return this.consumeOptionalOperator("=");
|
|
11360
|
-
}
|
|
11361
11534
|
parseCallArguments() {
|
|
11362
11535
|
if (this.next.isCharacter($RPAREN))
|
|
11363
11536
|
return [];
|
|
@@ -11538,7 +11711,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11538
11711
|
return offsetMap;
|
|
11539
11712
|
}
|
|
11540
11713
|
|
|
11541
|
-
// bazel-out/
|
|
11714
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11542
11715
|
var NodeWithI18n = class {
|
|
11543
11716
|
constructor(sourceSpan, i18n2) {
|
|
11544
11717
|
this.sourceSpan = sourceSpan;
|
|
@@ -11690,11 +11863,11 @@ var RecursiveVisitor = class {
|
|
|
11690
11863
|
}
|
|
11691
11864
|
};
|
|
11692
11865
|
|
|
11693
|
-
// bazel-out/
|
|
11866
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11694
11867
|
var ElementSchemaRegistry = class {
|
|
11695
11868
|
};
|
|
11696
11869
|
|
|
11697
|
-
// bazel-out/
|
|
11870
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11698
11871
|
var BOOLEAN = "boolean";
|
|
11699
11872
|
var NUMBER = "number";
|
|
11700
11873
|
var STRING = "string";
|
|
@@ -12047,7 +12220,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
12047
12220
|
}
|
|
12048
12221
|
}
|
|
12049
12222
|
|
|
12050
|
-
// bazel-out/
|
|
12223
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
12051
12224
|
var HtmlTagDefinition = class {
|
|
12052
12225
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
12053
12226
|
this.closedByChildren = {};
|
|
@@ -12165,7 +12338,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
12165
12338
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
12166
12339
|
}
|
|
12167
12340
|
|
|
12168
|
-
// bazel-out/
|
|
12341
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
12169
12342
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
12170
12343
|
"A": "LINK",
|
|
12171
12344
|
"B": "BOLD_TEXT",
|
|
@@ -12287,7 +12460,7 @@ var PlaceholderRegistry = class {
|
|
|
12287
12460
|
}
|
|
12288
12461
|
};
|
|
12289
12462
|
|
|
12290
|
-
// bazel-out/
|
|
12463
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12291
12464
|
var _expParser = new Parser(new Lexer());
|
|
12292
12465
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12293
12466
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12466,14 +12639,14 @@ function extractPlaceholderName(input) {
|
|
|
12466
12639
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12467
12640
|
}
|
|
12468
12641
|
|
|
12469
|
-
// bazel-out/
|
|
12642
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12470
12643
|
var I18nError = class extends ParseError {
|
|
12471
12644
|
constructor(span, msg) {
|
|
12472
12645
|
super(span, msg);
|
|
12473
12646
|
}
|
|
12474
12647
|
};
|
|
12475
12648
|
|
|
12476
|
-
// bazel-out/
|
|
12649
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12477
12650
|
var NAMED_ENTITIES = {
|
|
12478
12651
|
"AElig": "\xC6",
|
|
12479
12652
|
"AMP": "&",
|
|
@@ -14604,7 +14777,7 @@ var NAMED_ENTITIES = {
|
|
|
14604
14777
|
var NGSP_UNICODE = "\uE500";
|
|
14605
14778
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14606
14779
|
|
|
14607
|
-
// bazel-out/
|
|
14780
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14608
14781
|
var TokenError = class extends ParseError {
|
|
14609
14782
|
constructor(errorMsg, tokenType, span) {
|
|
14610
14783
|
super(span, errorMsg);
|
|
@@ -15525,7 +15698,7 @@ var CursorError = class {
|
|
|
15525
15698
|
}
|
|
15526
15699
|
};
|
|
15527
15700
|
|
|
15528
|
-
// bazel-out/
|
|
15701
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15529
15702
|
var TreeError = class extends ParseError {
|
|
15530
15703
|
static create(elementName, span, msg) {
|
|
15531
15704
|
return new TreeError(elementName, span, msg);
|
|
@@ -15909,7 +16082,7 @@ function decodeEntity(match, entity) {
|
|
|
15909
16082
|
return match;
|
|
15910
16083
|
}
|
|
15911
16084
|
|
|
15912
|
-
// bazel-out/
|
|
16085
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15913
16086
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15914
16087
|
"iframe|srcdoc",
|
|
15915
16088
|
"*|innerhtml",
|
|
@@ -15924,7 +16097,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15924
16097
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15925
16098
|
}
|
|
15926
16099
|
|
|
15927
|
-
// bazel-out/
|
|
16100
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15928
16101
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15929
16102
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15930
16103
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -16081,7 +16254,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
16081
16254
|
return jsDocComment(tags);
|
|
16082
16255
|
}
|
|
16083
16256
|
|
|
16084
|
-
// bazel-out/
|
|
16257
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
16085
16258
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
16086
16259
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
16087
16260
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -16132,7 +16305,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
16132
16305
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
16133
16306
|
}
|
|
16134
16307
|
|
|
16135
|
-
// bazel-out/
|
|
16308
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
16136
16309
|
function createLocalizeStatements(variable2, message, params) {
|
|
16137
16310
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
16138
16311
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16221,7 +16394,7 @@ function createEmptyMessagePart(location) {
|
|
|
16221
16394
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16222
16395
|
}
|
|
16223
16396
|
|
|
16224
|
-
// bazel-out/
|
|
16397
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16225
16398
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16226
16399
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16227
16400
|
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
@@ -16382,7 +16555,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16382
16555
|
return variable(name);
|
|
16383
16556
|
}
|
|
16384
16557
|
|
|
16385
|
-
// bazel-out/
|
|
16558
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16386
16559
|
function convertI18nText(job) {
|
|
16387
16560
|
var _a2, _b2, _c2;
|
|
16388
16561
|
for (const unit of job.units) {
|
|
@@ -16452,7 +16625,7 @@ function convertI18nText(job) {
|
|
|
16452
16625
|
}
|
|
16453
16626
|
}
|
|
16454
16627
|
|
|
16455
|
-
// bazel-out/
|
|
16628
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16456
16629
|
function liftLocalRefs(job) {
|
|
16457
16630
|
for (const unit of job.units) {
|
|
16458
16631
|
for (const op of unit.create) {
|
|
@@ -16482,7 +16655,7 @@ function serializeLocalRefs(refs) {
|
|
|
16482
16655
|
return literalArr(constRefs);
|
|
16483
16656
|
}
|
|
16484
16657
|
|
|
16485
|
-
// bazel-out/
|
|
16658
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16486
16659
|
function emitNamespaceChanges(job) {
|
|
16487
16660
|
for (const unit of job.units) {
|
|
16488
16661
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16498,7 +16671,7 @@ function emitNamespaceChanges(job) {
|
|
|
16498
16671
|
}
|
|
16499
16672
|
}
|
|
16500
16673
|
|
|
16501
|
-
// bazel-out/
|
|
16674
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16502
16675
|
function parse(value) {
|
|
16503
16676
|
const styles = [];
|
|
16504
16677
|
let i = 0;
|
|
@@ -16559,13 +16732,13 @@ function hyphenate2(value) {
|
|
|
16559
16732
|
}).toLowerCase();
|
|
16560
16733
|
}
|
|
16561
16734
|
|
|
16562
|
-
// bazel-out/
|
|
16735
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16563
16736
|
function nameFunctionsAndVariables(job) {
|
|
16564
16737
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16565
16738
|
}
|
|
16566
16739
|
function addNamesToView(unit, baseName, state, compatibility) {
|
|
16567
16740
|
if (unit.fnName === null) {
|
|
16568
|
-
unit.fnName = sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`);
|
|
16741
|
+
unit.fnName = unit.job.pool.uniqueName(sanitizeIdentifier(`${baseName}_${unit.job.fnSuffix}`), false);
|
|
16569
16742
|
}
|
|
16570
16743
|
const varNames = /* @__PURE__ */ new Map();
|
|
16571
16744
|
for (const op of unit.ops()) {
|
|
@@ -16595,6 +16768,15 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
16595
16768
|
}
|
|
16596
16769
|
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
16597
16770
|
break;
|
|
16771
|
+
case OpKind.TwoWayListener:
|
|
16772
|
+
if (op.handlerFnName !== null) {
|
|
16773
|
+
break;
|
|
16774
|
+
}
|
|
16775
|
+
if (op.targetSlot.slot === null) {
|
|
16776
|
+
throw new Error(`Expected a slot to be assigned`);
|
|
16777
|
+
}
|
|
16778
|
+
op.handlerFnName = sanitizeIdentifier(`${unit.fnName}_${op.tag.replace("-", "_")}_${op.name}_${op.targetSlot.slot}_listener`);
|
|
16779
|
+
break;
|
|
16598
16780
|
case OpKind.Variable:
|
|
16599
16781
|
varNames.set(op.xref, getVariableName(unit, op.variable, state));
|
|
16600
16782
|
break;
|
|
@@ -16679,11 +16861,11 @@ function stripImportant(name) {
|
|
|
16679
16861
|
return name;
|
|
16680
16862
|
}
|
|
16681
16863
|
|
|
16682
|
-
// bazel-out/
|
|
16864
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16683
16865
|
function mergeNextContextExpressions(job) {
|
|
16684
16866
|
for (const unit of job.units) {
|
|
16685
16867
|
for (const op of unit.create) {
|
|
16686
|
-
if (op.kind === OpKind.Listener) {
|
|
16868
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
16687
16869
|
mergeNextContextsInOps(op.handlerOps);
|
|
16688
16870
|
}
|
|
16689
16871
|
}
|
|
@@ -16725,7 +16907,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16725
16907
|
}
|
|
16726
16908
|
}
|
|
16727
16909
|
|
|
16728
|
-
// bazel-out/
|
|
16910
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16729
16911
|
var CONTAINER_TAG = "ng-container";
|
|
16730
16912
|
function generateNgContainerOps(job) {
|
|
16731
16913
|
for (const unit of job.units) {
|
|
@@ -16742,7 +16924,7 @@ function generateNgContainerOps(job) {
|
|
|
16742
16924
|
}
|
|
16743
16925
|
}
|
|
16744
16926
|
|
|
16745
|
-
// bazel-out/
|
|
16927
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16746
16928
|
function lookupElement3(elements, xref) {
|
|
16747
16929
|
const el = elements.get(xref);
|
|
16748
16930
|
if (el === void 0) {
|
|
@@ -16772,7 +16954,7 @@ function disableBindings(job) {
|
|
|
16772
16954
|
}
|
|
16773
16955
|
}
|
|
16774
16956
|
|
|
16775
|
-
// bazel-out/
|
|
16957
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16776
16958
|
function generateNullishCoalesceExpressions(job) {
|
|
16777
16959
|
for (const unit of job.units) {
|
|
16778
16960
|
for (const op of unit.ops()) {
|
|
@@ -16788,7 +16970,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16788
16970
|
}
|
|
16789
16971
|
}
|
|
16790
16972
|
|
|
16791
|
-
// bazel-out/
|
|
16973
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16792
16974
|
function kindTest(kind) {
|
|
16793
16975
|
return (op) => op.kind === kind;
|
|
16794
16976
|
}
|
|
@@ -16797,9 +16979,15 @@ function kindWithInterpolationTest(kind, interpolation) {
|
|
|
16797
16979
|
return op.kind === kind && interpolation === op.expression instanceof Interpolation2;
|
|
16798
16980
|
};
|
|
16799
16981
|
}
|
|
16982
|
+
function basicListenerKindTest(op) {
|
|
16983
|
+
return op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) || op.kind === OpKind.TwoWayListener;
|
|
16984
|
+
}
|
|
16985
|
+
function nonInterpolationPropertyKindTest(op) {
|
|
16986
|
+
return (op.kind === OpKind.Property || op.kind === OpKind.TwoWayProperty) && !(op.expression instanceof Interpolation2);
|
|
16987
|
+
}
|
|
16800
16988
|
var CREATE_ORDERING = [
|
|
16801
16989
|
{ test: (op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener },
|
|
16802
|
-
{ test:
|
|
16990
|
+
{ test: basicListenerKindTest }
|
|
16803
16991
|
];
|
|
16804
16992
|
var UPDATE_ORDERING = [
|
|
16805
16993
|
{ test: kindTest(OpKind.StyleMap), transform: keepLast },
|
|
@@ -16808,7 +16996,7 @@ var UPDATE_ORDERING = [
|
|
|
16808
16996
|
{ test: kindTest(OpKind.ClassProp) },
|
|
16809
16997
|
{ test: kindWithInterpolationTest(OpKind.Attribute, true) },
|
|
16810
16998
|
{ test: kindWithInterpolationTest(OpKind.Property, true) },
|
|
16811
|
-
{ test:
|
|
16999
|
+
{ test: nonInterpolationPropertyKindTest },
|
|
16812
17000
|
{ test: kindWithInterpolationTest(OpKind.Attribute, false) }
|
|
16813
17001
|
];
|
|
16814
17002
|
var UPDATE_HOST_ORDERING = [
|
|
@@ -16822,11 +17010,13 @@ var UPDATE_HOST_ORDERING = [
|
|
|
16822
17010
|
];
|
|
16823
17011
|
var handledOpKinds = /* @__PURE__ */ new Set([
|
|
16824
17012
|
OpKind.Listener,
|
|
17013
|
+
OpKind.TwoWayListener,
|
|
16825
17014
|
OpKind.StyleMap,
|
|
16826
17015
|
OpKind.ClassMap,
|
|
16827
17016
|
OpKind.StyleProp,
|
|
16828
17017
|
OpKind.ClassProp,
|
|
16829
17018
|
OpKind.Property,
|
|
17019
|
+
OpKind.TwoWayProperty,
|
|
16830
17020
|
OpKind.HostProperty,
|
|
16831
17021
|
OpKind.Attribute
|
|
16832
17022
|
]);
|
|
@@ -16870,7 +17060,7 @@ function keepLast(ops) {
|
|
|
16870
17060
|
return ops.slice(ops.length - 1);
|
|
16871
17061
|
}
|
|
16872
17062
|
|
|
16873
|
-
// bazel-out/
|
|
17063
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16874
17064
|
function parseExtractedStyles(job) {
|
|
16875
17065
|
const elements = /* @__PURE__ */ new Map();
|
|
16876
17066
|
for (const unit of job.units) {
|
|
@@ -16905,7 +17095,7 @@ function parseExtractedStyles(job) {
|
|
|
16905
17095
|
}
|
|
16906
17096
|
}
|
|
16907
17097
|
|
|
16908
|
-
// bazel-out/
|
|
17098
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16909
17099
|
function removeContentSelectors(job) {
|
|
16910
17100
|
for (const unit of job.units) {
|
|
16911
17101
|
const elements = createOpXrefMap(unit);
|
|
@@ -16932,7 +17122,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16932
17122
|
return el;
|
|
16933
17123
|
}
|
|
16934
17124
|
|
|
16935
|
-
// bazel-out/
|
|
17125
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16936
17126
|
function createPipes(job) {
|
|
16937
17127
|
for (const unit of job.units) {
|
|
16938
17128
|
processPipeBindingsInView(unit);
|
|
@@ -16980,7 +17170,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16980
17170
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16981
17171
|
}
|
|
16982
17172
|
|
|
16983
|
-
// bazel-out/
|
|
17173
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16984
17174
|
function createVariadicPipes(job) {
|
|
16985
17175
|
for (const unit of job.units) {
|
|
16986
17176
|
for (const op of unit.update) {
|
|
@@ -16997,7 +17187,7 @@ function createVariadicPipes(job) {
|
|
|
16997
17187
|
}
|
|
16998
17188
|
}
|
|
16999
17189
|
|
|
17000
|
-
// bazel-out/
|
|
17190
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
17001
17191
|
function propagateI18nBlocks(job) {
|
|
17002
17192
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
17003
17193
|
}
|
|
@@ -17051,7 +17241,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
17051
17241
|
}
|
|
17052
17242
|
}
|
|
17053
17243
|
|
|
17054
|
-
// bazel-out/
|
|
17244
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
17055
17245
|
function extractPureFunctions(job) {
|
|
17056
17246
|
for (const view of job.units) {
|
|
17057
17247
|
for (const op of view.ops()) {
|
|
@@ -17093,7 +17283,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
17093
17283
|
}
|
|
17094
17284
|
};
|
|
17095
17285
|
|
|
17096
|
-
// bazel-out/
|
|
17286
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
17097
17287
|
function generatePureLiteralStructures(job) {
|
|
17098
17288
|
for (const unit of job.units) {
|
|
17099
17289
|
for (const op of unit.update) {
|
|
@@ -17140,7 +17330,7 @@ function transformLiteralMap(expr) {
|
|
|
17140
17330
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
17141
17331
|
}
|
|
17142
17332
|
|
|
17143
|
-
// bazel-out/
|
|
17333
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
17144
17334
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
17145
17335
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
17146
17336
|
}
|
|
@@ -17206,6 +17396,12 @@ function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpa
|
|
|
17206
17396
|
}
|
|
17207
17397
|
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
17208
17398
|
}
|
|
17399
|
+
function twoWayBindingSet(target, value) {
|
|
17400
|
+
return importExpr(Identifiers.twoWayBindingSet).callFn([target, value]);
|
|
17401
|
+
}
|
|
17402
|
+
function twoWayListener(name, handlerFn, sourceSpan) {
|
|
17403
|
+
return call(Identifiers.twoWayListener, [literal(name), handlerFn], sourceSpan);
|
|
17404
|
+
}
|
|
17209
17405
|
function pipe(slot, name) {
|
|
17210
17406
|
return call(Identifiers.pipe, [
|
|
17211
17407
|
literal(slot),
|
|
@@ -17366,6 +17562,13 @@ function property(name, expression, sanitizer, sourceSpan) {
|
|
|
17366
17562
|
}
|
|
17367
17563
|
return call(Identifiers.property, args, sourceSpan);
|
|
17368
17564
|
}
|
|
17565
|
+
function twoWayProperty(name, expression, sanitizer, sourceSpan) {
|
|
17566
|
+
const args = [literal(name), expression];
|
|
17567
|
+
if (sanitizer !== null) {
|
|
17568
|
+
args.push(sanitizer);
|
|
17569
|
+
}
|
|
17570
|
+
return call(Identifiers.twoWayProperty, args, sourceSpan);
|
|
17571
|
+
}
|
|
17369
17572
|
function attribute(name, expression, sanitizer, namespace) {
|
|
17370
17573
|
const args = [literal(name), expression];
|
|
17371
17574
|
if (sanitizer !== null || namespace !== null) {
|
|
@@ -17662,7 +17865,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17662
17865
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17663
17866
|
}
|
|
17664
17867
|
|
|
17665
|
-
// bazel-out/
|
|
17868
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17666
17869
|
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
17667
17870
|
["window", Identifiers.resolveWindow],
|
|
17668
17871
|
["document", Identifiers.resolveDocument],
|
|
@@ -17742,6 +17945,9 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17742
17945
|
}
|
|
17743
17946
|
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
|
|
17744
17947
|
break;
|
|
17948
|
+
case OpKind.TwoWayListener:
|
|
17949
|
+
OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
|
|
17950
|
+
break;
|
|
17745
17951
|
case OpKind.Variable:
|
|
17746
17952
|
if (op.variable.name === null) {
|
|
17747
17953
|
throw new Error(`AssertionError: unnamed variable ${op.xref}`);
|
|
@@ -17848,6 +18054,9 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17848
18054
|
OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
17849
18055
|
}
|
|
17850
18056
|
break;
|
|
18057
|
+
case OpKind.TwoWayProperty:
|
|
18058
|
+
OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
18059
|
+
break;
|
|
17851
18060
|
case OpKind.StyleProp:
|
|
17852
18061
|
if (op.expression instanceof Interpolation2) {
|
|
17853
18062
|
OpList.replace(op, stylePropInterpolate(op.name, op.expression.strings, op.expression.expressions, op.unit, op.sourceSpan));
|
|
@@ -17938,6 +18147,8 @@ function reifyIrExpression(expr) {
|
|
|
17938
18147
|
return reference(expr.targetSlot.slot + 1 + expr.offset);
|
|
17939
18148
|
case ExpressionKind.LexicalRead:
|
|
17940
18149
|
throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);
|
|
18150
|
+
case ExpressionKind.TwoWayBindingSet:
|
|
18151
|
+
throw new Error(`AssertionError: unresolved TwoWayBindingSet`);
|
|
17941
18152
|
case ExpressionKind.RestoreView:
|
|
17942
18153
|
if (typeof expr.view === "number") {
|
|
17943
18154
|
throw new Error(`AssertionError: unresolved RestoreView`);
|
|
@@ -17995,7 +18206,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17995
18206
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17996
18207
|
}
|
|
17997
18208
|
|
|
17998
|
-
// bazel-out/
|
|
18209
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17999
18210
|
function removeEmptyBindings(job) {
|
|
18000
18211
|
for (const unit of job.units) {
|
|
18001
18212
|
for (const op of unit.update) {
|
|
@@ -18016,7 +18227,7 @@ function removeEmptyBindings(job) {
|
|
|
18016
18227
|
}
|
|
18017
18228
|
}
|
|
18018
18229
|
|
|
18019
|
-
// bazel-out/
|
|
18230
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
18020
18231
|
function removeI18nContexts(job) {
|
|
18021
18232
|
for (const unit of job.units) {
|
|
18022
18233
|
for (const op of unit.create) {
|
|
@@ -18032,7 +18243,7 @@ function removeI18nContexts(job) {
|
|
|
18032
18243
|
}
|
|
18033
18244
|
}
|
|
18034
18245
|
|
|
18035
|
-
// bazel-out/
|
|
18246
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
18036
18247
|
function removeUnusedI18nAttributesOps(job) {
|
|
18037
18248
|
for (const unit of job.units) {
|
|
18038
18249
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -18054,7 +18265,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
18054
18265
|
}
|
|
18055
18266
|
}
|
|
18056
18267
|
|
|
18057
|
-
// bazel-out/
|
|
18268
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
18058
18269
|
function resolveContexts(job) {
|
|
18059
18270
|
for (const unit of job.units) {
|
|
18060
18271
|
processLexicalScope(unit, unit.create);
|
|
@@ -18074,6 +18285,7 @@ function processLexicalScope(view, ops) {
|
|
|
18074
18285
|
}
|
|
18075
18286
|
break;
|
|
18076
18287
|
case OpKind.Listener:
|
|
18288
|
+
case OpKind.TwoWayListener:
|
|
18077
18289
|
processLexicalScope(view, op.handlerOps);
|
|
18078
18290
|
break;
|
|
18079
18291
|
}
|
|
@@ -18095,7 +18307,7 @@ function processLexicalScope(view, ops) {
|
|
|
18095
18307
|
}
|
|
18096
18308
|
}
|
|
18097
18309
|
|
|
18098
|
-
// bazel-out/
|
|
18310
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
18099
18311
|
function resolveDollarEvent(job) {
|
|
18100
18312
|
for (const unit of job.units) {
|
|
18101
18313
|
transformDollarEvent(unit, unit.create);
|
|
@@ -18104,10 +18316,12 @@ function resolveDollarEvent(job) {
|
|
|
18104
18316
|
}
|
|
18105
18317
|
function transformDollarEvent(unit, ops) {
|
|
18106
18318
|
for (const op of ops) {
|
|
18107
|
-
if (op.kind === OpKind.Listener) {
|
|
18319
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18108
18320
|
transformExpressionsInOp(op, (expr) => {
|
|
18109
18321
|
if (expr instanceof LexicalReadExpr && expr.name === "$event") {
|
|
18110
|
-
op.
|
|
18322
|
+
if (op.kind === OpKind.Listener) {
|
|
18323
|
+
op.consumesDollarEvent = true;
|
|
18324
|
+
}
|
|
18111
18325
|
return new ReadVarExpr(expr.name);
|
|
18112
18326
|
}
|
|
18113
18327
|
return expr;
|
|
@@ -18116,7 +18330,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
18116
18330
|
}
|
|
18117
18331
|
}
|
|
18118
18332
|
|
|
18119
|
-
// bazel-out/
|
|
18333
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
18120
18334
|
function resolveI18nElementPlaceholders(job) {
|
|
18121
18335
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
18122
18336
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -18295,7 +18509,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
18295
18509
|
params.set(placeholder, values);
|
|
18296
18510
|
}
|
|
18297
18511
|
|
|
18298
|
-
// bazel-out/
|
|
18512
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
18299
18513
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18300
18514
|
var _a2;
|
|
18301
18515
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
@@ -18348,7 +18562,7 @@ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
|
|
|
18348
18562
|
}
|
|
18349
18563
|
}
|
|
18350
18564
|
|
|
18351
|
-
// bazel-out/
|
|
18565
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
18352
18566
|
function resolveNames(job) {
|
|
18353
18567
|
for (const unit of job.units) {
|
|
18354
18568
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18377,12 +18591,13 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18377
18591
|
}
|
|
18378
18592
|
break;
|
|
18379
18593
|
case OpKind.Listener:
|
|
18594
|
+
case OpKind.TwoWayListener:
|
|
18380
18595
|
processLexicalScope2(unit, op.handlerOps, savedView);
|
|
18381
18596
|
break;
|
|
18382
18597
|
}
|
|
18383
18598
|
}
|
|
18384
18599
|
for (const op of ops) {
|
|
18385
|
-
if (op.kind == OpKind.Listener) {
|
|
18600
|
+
if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18386
18601
|
continue;
|
|
18387
18602
|
}
|
|
18388
18603
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
@@ -18412,7 +18627,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18412
18627
|
}
|
|
18413
18628
|
}
|
|
18414
18629
|
|
|
18415
|
-
// bazel-out/
|
|
18630
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18416
18631
|
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
18417
18632
|
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
18418
18633
|
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
@@ -18482,7 +18697,54 @@ function getOnlySecurityContext(securityContext) {
|
|
|
18482
18697
|
return securityContext;
|
|
18483
18698
|
}
|
|
18484
18699
|
|
|
18485
|
-
// bazel-out/
|
|
18700
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/transform_two_way_binding_set.mjs
|
|
18701
|
+
function transformTwoWayBindingSet(job) {
|
|
18702
|
+
for (const unit of job.units) {
|
|
18703
|
+
for (const op of unit.create) {
|
|
18704
|
+
if (op.kind === OpKind.TwoWayListener) {
|
|
18705
|
+
transformExpressionsInOp(op, (expr) => {
|
|
18706
|
+
if (expr instanceof TwoWayBindingSetExpr) {
|
|
18707
|
+
return wrapAction(expr.target, expr.value);
|
|
18708
|
+
}
|
|
18709
|
+
return expr;
|
|
18710
|
+
}, VisitorContextFlag.InChildOperation);
|
|
18711
|
+
}
|
|
18712
|
+
}
|
|
18713
|
+
}
|
|
18714
|
+
}
|
|
18715
|
+
function wrapSetOperation(target, value) {
|
|
18716
|
+
return twoWayBindingSet(target, value).or(target.set(value));
|
|
18717
|
+
}
|
|
18718
|
+
function isReadExpression2(value) {
|
|
18719
|
+
return value instanceof ReadPropExpr || value instanceof ReadKeyExpr;
|
|
18720
|
+
}
|
|
18721
|
+
function wrapAction(target, value) {
|
|
18722
|
+
if (isReadExpression2(target)) {
|
|
18723
|
+
return wrapSetOperation(target, value);
|
|
18724
|
+
}
|
|
18725
|
+
if (target instanceof BinaryOperatorExpr && isReadExpression2(target.rhs)) {
|
|
18726
|
+
return new BinaryOperatorExpr(target.operator, target.lhs, wrapSetOperation(target.rhs, value));
|
|
18727
|
+
}
|
|
18728
|
+
if (target instanceof ConditionalExpr && isReadExpression2(target.falseCase)) {
|
|
18729
|
+
return new ConditionalExpr(target.condition, target.trueCase, wrapSetOperation(target.falseCase, value));
|
|
18730
|
+
}
|
|
18731
|
+
if (target instanceof NotExpr) {
|
|
18732
|
+
let expr = target.condition;
|
|
18733
|
+
while (true) {
|
|
18734
|
+
if (expr instanceof NotExpr) {
|
|
18735
|
+
expr = expr.condition;
|
|
18736
|
+
} else {
|
|
18737
|
+
if (isReadExpression2(expr)) {
|
|
18738
|
+
return wrapSetOperation(expr, value);
|
|
18739
|
+
}
|
|
18740
|
+
break;
|
|
18741
|
+
}
|
|
18742
|
+
}
|
|
18743
|
+
}
|
|
18744
|
+
throw new Error(`Unsupported expression in two-way action binding.`);
|
|
18745
|
+
}
|
|
18746
|
+
|
|
18747
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18486
18748
|
function saveAndRestoreView(job) {
|
|
18487
18749
|
for (const unit of job.units) {
|
|
18488
18750
|
unit.create.prepend([
|
|
@@ -18493,7 +18755,7 @@ function saveAndRestoreView(job) {
|
|
|
18493
18755
|
}, new GetCurrentViewExpr(), VariableFlags.None)
|
|
18494
18756
|
]);
|
|
18495
18757
|
for (const op of unit.create) {
|
|
18496
|
-
if (op.kind !== OpKind.Listener) {
|
|
18758
|
+
if (op.kind !== OpKind.Listener && op.kind !== OpKind.TwoWayListener) {
|
|
18497
18759
|
continue;
|
|
18498
18760
|
}
|
|
18499
18761
|
let needsRestoreView = unit !== job.root;
|
|
@@ -18527,7 +18789,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18527
18789
|
}
|
|
18528
18790
|
}
|
|
18529
18791
|
|
|
18530
|
-
// bazel-out/
|
|
18792
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18531
18793
|
function allocateSlots(job) {
|
|
18532
18794
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18533
18795
|
for (const unit of job.units) {
|
|
@@ -18552,7 +18814,7 @@ function allocateSlots(job) {
|
|
|
18552
18814
|
}
|
|
18553
18815
|
}
|
|
18554
18816
|
|
|
18555
|
-
// bazel-out/
|
|
18817
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18556
18818
|
function specializeStyleBindings(job) {
|
|
18557
18819
|
for (const unit of job.units) {
|
|
18558
18820
|
for (const op of unit.update) {
|
|
@@ -18582,7 +18844,7 @@ function specializeStyleBindings(job) {
|
|
|
18582
18844
|
}
|
|
18583
18845
|
}
|
|
18584
18846
|
|
|
18585
|
-
// bazel-out/
|
|
18847
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18586
18848
|
function generateTemporaryVariables(job) {
|
|
18587
18849
|
for (const unit of job.units) {
|
|
18588
18850
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18626,7 +18888,7 @@ function generateTemporaries(ops) {
|
|
|
18626
18888
|
});
|
|
18627
18889
|
generatedStatements.push(...Array.from(new Set(defs.values())).map((name) => createStatementOp(new DeclareVarStmt(name))));
|
|
18628
18890
|
opCount++;
|
|
18629
|
-
if (op.kind === OpKind.Listener) {
|
|
18891
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18630
18892
|
op.handlerOps.prepend(generateTemporaries(op.handlerOps));
|
|
18631
18893
|
}
|
|
18632
18894
|
}
|
|
@@ -18640,7 +18902,7 @@ function assignName(names, expr) {
|
|
|
18640
18902
|
expr.name = name;
|
|
18641
18903
|
}
|
|
18642
18904
|
|
|
18643
|
-
// bazel-out/
|
|
18905
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18644
18906
|
function generateTrackFns(job) {
|
|
18645
18907
|
for (const unit of job.units) {
|
|
18646
18908
|
for (const op of unit.create) {
|
|
@@ -18673,7 +18935,7 @@ function generateTrackFns(job) {
|
|
|
18673
18935
|
}
|
|
18674
18936
|
}
|
|
18675
18937
|
|
|
18676
|
-
// bazel-out/
|
|
18938
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18677
18939
|
function optimizeTrackFns(job) {
|
|
18678
18940
|
for (const unit of job.units) {
|
|
18679
18941
|
for (const op of unit.create) {
|
|
@@ -18720,7 +18982,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18720
18982
|
return true;
|
|
18721
18983
|
}
|
|
18722
18984
|
|
|
18723
|
-
// bazel-out/
|
|
18985
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18724
18986
|
function generateTrackVariables(job) {
|
|
18725
18987
|
for (const unit of job.units) {
|
|
18726
18988
|
for (const op of unit.create) {
|
|
@@ -18741,7 +19003,7 @@ function generateTrackVariables(job) {
|
|
|
18741
19003
|
}
|
|
18742
19004
|
}
|
|
18743
19005
|
|
|
18744
|
-
// bazel-out/
|
|
19006
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18745
19007
|
function countVariables(job) {
|
|
18746
19008
|
for (const unit of job.units) {
|
|
18747
19009
|
let varCount = 0;
|
|
@@ -18806,6 +19068,8 @@ function varsUsedByOp(op) {
|
|
|
18806
19068
|
slots += op.expression.expressions.length;
|
|
18807
19069
|
}
|
|
18808
19070
|
return slots;
|
|
19071
|
+
case OpKind.TwoWayProperty:
|
|
19072
|
+
return 1;
|
|
18809
19073
|
case OpKind.StyleProp:
|
|
18810
19074
|
case OpKind.ClassProp:
|
|
18811
19075
|
case OpKind.StyleMap:
|
|
@@ -18849,20 +19113,20 @@ function isSingletonInterpolation(expr) {
|
|
|
18849
19113
|
return true;
|
|
18850
19114
|
}
|
|
18851
19115
|
|
|
18852
|
-
// bazel-out/
|
|
19116
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18853
19117
|
function optimizeVariables(job) {
|
|
18854
19118
|
for (const unit of job.units) {
|
|
18855
19119
|
inlineAlwaysInlineVariables(unit.create);
|
|
18856
19120
|
inlineAlwaysInlineVariables(unit.update);
|
|
18857
19121
|
for (const op of unit.create) {
|
|
18858
|
-
if (op.kind === OpKind.Listener) {
|
|
19122
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18859
19123
|
inlineAlwaysInlineVariables(op.handlerOps);
|
|
18860
19124
|
}
|
|
18861
19125
|
}
|
|
18862
19126
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
18863
19127
|
optimizeVariablesInOpList(unit.update, job.compatibility);
|
|
18864
19128
|
for (const op of unit.create) {
|
|
18865
|
-
if (op.kind === OpKind.Listener) {
|
|
19129
|
+
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
18866
19130
|
optimizeVariablesInOpList(op.handlerOps, job.compatibility);
|
|
18867
19131
|
}
|
|
18868
19132
|
}
|
|
@@ -19099,7 +19363,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
19099
19363
|
}
|
|
19100
19364
|
}
|
|
19101
19365
|
|
|
19102
|
-
// bazel-out/
|
|
19366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
19103
19367
|
function wrapI18nIcus(job) {
|
|
19104
19368
|
for (const unit of job.units) {
|
|
19105
19369
|
let currentI18nOp = null;
|
|
@@ -19129,7 +19393,7 @@ function wrapI18nIcus(job) {
|
|
|
19129
19393
|
}
|
|
19130
19394
|
}
|
|
19131
19395
|
|
|
19132
|
-
// bazel-out/
|
|
19396
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
19133
19397
|
var phases = [
|
|
19134
19398
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
19135
19399
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -19163,6 +19427,7 @@ var phases = [
|
|
|
19163
19427
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
19164
19428
|
{ kind: CompilationJobKind.Both, fn: resolveNames },
|
|
19165
19429
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
19430
|
+
{ kind: CompilationJobKind.Tmpl, fn: transformTwoWayBindingSet },
|
|
19166
19431
|
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
19167
19432
|
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
19168
19433
|
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
@@ -19171,7 +19436,6 @@ var phases = [
|
|
|
19171
19436
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
19172
19437
|
{ kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
|
|
19173
19438
|
{ kind: CompilationJobKind.Tmpl, fn: allocateSlots },
|
|
19174
|
-
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
19175
19439
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
19176
19440
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
19177
19441
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
@@ -19184,6 +19448,7 @@ var phases = [
|
|
|
19184
19448
|
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
19185
19449
|
{ kind: CompilationJobKind.Both, fn: optimizeVariables },
|
|
19186
19450
|
{ kind: CompilationJobKind.Both, fn: nameFunctionsAndVariables },
|
|
19451
|
+
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
19187
19452
|
{ kind: CompilationJobKind.Tmpl, fn: mergeNextContextExpressions },
|
|
19188
19453
|
{ kind: CompilationJobKind.Tmpl, fn: generateNgContainerOps },
|
|
19189
19454
|
{ kind: CompilationJobKind.Tmpl, fn: collapseEmptyInstructions },
|
|
@@ -19294,12 +19559,12 @@ function emitHostBindingFunction(job) {
|
|
|
19294
19559
|
);
|
|
19295
19560
|
}
|
|
19296
19561
|
|
|
19297
|
-
// bazel-out/
|
|
19562
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
19298
19563
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
19299
19564
|
var domSchema = new DomElementSchemaRegistry();
|
|
19300
19565
|
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
19301
|
-
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
19302
|
-
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
19566
|
+
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn) {
|
|
19567
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta, allDeferrableDepsFn);
|
|
19303
19568
|
ingestNodes(job.root, template2);
|
|
19304
19569
|
return job;
|
|
19305
19570
|
}
|
|
@@ -19354,7 +19619,7 @@ function ingestHostAttribute(job, name, value, securityContexts) {
|
|
|
19354
19619
|
job.root.update.push(attrBinding);
|
|
19355
19620
|
}
|
|
19356
19621
|
function ingestHostEvent(job, event) {
|
|
19357
|
-
const [phase, target] = event.type
|
|
19622
|
+
const [phase, target] = event.type !== 1 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
19358
19623
|
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
19359
19624
|
job.root.create.push(eventBinding);
|
|
19360
19625
|
}
|
|
@@ -19563,7 +19828,7 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
19563
19828
|
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);
|
|
19564
19829
|
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);
|
|
19565
19830
|
const deferXref = unit.job.allocateXrefId();
|
|
19566
|
-
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
|
|
19831
|
+
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, unit.job.allDeferrableDepsFn, deferBlock.sourceSpan);
|
|
19567
19832
|
deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
|
|
19568
19833
|
deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
|
|
19569
19834
|
deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
|
|
@@ -19821,6 +20086,7 @@ function convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {
|
|
|
19821
20086
|
}
|
|
19822
20087
|
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19823
20088
|
[0, BindingKind.Property],
|
|
20089
|
+
[5, BindingKind.TwoWayProperty],
|
|
19824
20090
|
[1, BindingKind.Attribute],
|
|
19825
20091
|
[2, BindingKind.ClassName],
|
|
19826
20092
|
[3, BindingKind.StyleProperty],
|
|
@@ -19842,11 +20108,18 @@ function asMessage(i18nMeta) {
|
|
|
19842
20108
|
function ingestElementBindings(unit, op, element2) {
|
|
19843
20109
|
var _a2;
|
|
19844
20110
|
let bindings = new Array();
|
|
20111
|
+
let i18nAttributeBindingNames = /* @__PURE__ */ new Set();
|
|
19845
20112
|
for (const attr of element2.attributes) {
|
|
19846
20113
|
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19847
20114
|
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));
|
|
20115
|
+
if (attr.i18n) {
|
|
20116
|
+
i18nAttributeBindingNames.add(attr.name);
|
|
20117
|
+
}
|
|
19848
20118
|
}
|
|
19849
20119
|
for (const input of element2.inputs) {
|
|
20120
|
+
if (i18nAttributeBindingNames.has(input.name)) {
|
|
20121
|
+
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.`);
|
|
20122
|
+
}
|
|
19850
20123
|
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));
|
|
19851
20124
|
}
|
|
19852
20125
|
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
@@ -19855,7 +20128,11 @@ function ingestElementBindings(unit, op, element2) {
|
|
|
19855
20128
|
if (output.type === 1 && output.phase === null) {
|
|
19856
20129
|
throw Error("Animation listener should have a phase");
|
|
19857
20130
|
}
|
|
19858
|
-
|
|
20131
|
+
if (output.type === 2) {
|
|
20132
|
+
unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
|
|
20133
|
+
} else {
|
|
20134
|
+
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));
|
|
20135
|
+
}
|
|
19859
20136
|
}
|
|
19860
20137
|
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19861
20138
|
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
@@ -19885,7 +20162,11 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
19885
20162
|
throw Error("Animation listener should have a phase");
|
|
19886
20163
|
}
|
|
19887
20164
|
if (templateKind === TemplateKind.NgTemplate) {
|
|
19888
|
-
|
|
20165
|
+
if (output.type === 2) {
|
|
20166
|
+
unit.create.push(createTwoWayListenerOp(op.xref, op.handle, output.name, op.tag, makeTwoWayListenerHandlerOps(unit, output.handler, output.handlerSpan), output.sourceSpan));
|
|
20167
|
+
} else {
|
|
20168
|
+
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));
|
|
20169
|
+
}
|
|
19889
20170
|
}
|
|
19890
20171
|
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19891
20172
|
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
@@ -19899,8 +20180,15 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
|
19899
20180
|
function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
19900
20181
|
const isTextBinding = typeof value === "string";
|
|
19901
20182
|
if (templateKind === TemplateKind.Structural) {
|
|
19902
|
-
if (!isStructuralTemplateAttribute
|
|
19903
|
-
|
|
20183
|
+
if (!isStructuralTemplateAttribute) {
|
|
20184
|
+
switch (type) {
|
|
20185
|
+
case 0:
|
|
20186
|
+
case 2:
|
|
20187
|
+
case 3:
|
|
20188
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
|
|
20189
|
+
case 5:
|
|
20190
|
+
return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
|
|
20191
|
+
}
|
|
19904
20192
|
}
|
|
19905
20193
|
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19906
20194
|
return null;
|
|
@@ -19927,6 +20215,23 @@ function makeListenerHandlerOps(unit, handler, handlerSpan) {
|
|
|
19927
20215
|
handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19928
20216
|
return handlerOps;
|
|
19929
20217
|
}
|
|
20218
|
+
function makeTwoWayListenerHandlerOps(unit, handler, handlerSpan) {
|
|
20219
|
+
handler = astOf(handler);
|
|
20220
|
+
const handlerOps = new Array();
|
|
20221
|
+
if (handler instanceof Chain) {
|
|
20222
|
+
if (handler.expressions.length === 1) {
|
|
20223
|
+
handler = handler.expressions[0];
|
|
20224
|
+
} else {
|
|
20225
|
+
throw new Error("Expected two-way listener to have a single expression.");
|
|
20226
|
+
}
|
|
20227
|
+
}
|
|
20228
|
+
const handlerExpr = convertAst(handler, unit.job, handlerSpan);
|
|
20229
|
+
const eventReference = new LexicalReadExpr("$event");
|
|
20230
|
+
const twoWaySetExpr = new TwoWayBindingSetExpr(handlerExpr, eventReference);
|
|
20231
|
+
handlerOps.push(createStatementOp(new ExpressionStatement(twoWaySetExpr)));
|
|
20232
|
+
handlerOps.push(createStatementOp(new ReturnStatement(eventReference)));
|
|
20233
|
+
return handlerOps;
|
|
20234
|
+
}
|
|
19930
20235
|
function astOf(ast) {
|
|
19931
20236
|
return ast instanceof ASTWithSource ? ast.ast : ast;
|
|
19932
20237
|
}
|
|
@@ -19977,10 +20282,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19977
20282
|
return null;
|
|
19978
20283
|
}
|
|
19979
20284
|
|
|
19980
|
-
// bazel-out/
|
|
20285
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19981
20286
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19982
20287
|
|
|
19983
|
-
// bazel-out/
|
|
20288
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19984
20289
|
var HtmlParser = class extends Parser2 {
|
|
19985
20290
|
constructor() {
|
|
19986
20291
|
super(getHtmlTagDefinition);
|
|
@@ -19990,7 +20295,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19990
20295
|
}
|
|
19991
20296
|
};
|
|
19992
20297
|
|
|
19993
|
-
// bazel-out/
|
|
20298
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19994
20299
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19995
20300
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19996
20301
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -20056,7 +20361,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
20056
20361
|
return result;
|
|
20057
20362
|
}
|
|
20058
20363
|
|
|
20059
|
-
// bazel-out/
|
|
20364
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20060
20365
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20061
20366
|
var ATTRIBUTE_PREFIX = "attr";
|
|
20062
20367
|
var CLASS_PREFIX = "class";
|
|
@@ -20082,6 +20387,7 @@ var BindingParser = class {
|
|
|
20082
20387
|
propName,
|
|
20083
20388
|
expression,
|
|
20084
20389
|
true,
|
|
20390
|
+
false,
|
|
20085
20391
|
sourceSpan,
|
|
20086
20392
|
sourceSpan.start.offset,
|
|
20087
20393
|
void 0,
|
|
@@ -20147,7 +20453,7 @@ var BindingParser = class {
|
|
|
20147
20453
|
} else if (binding.value) {
|
|
20148
20454
|
const srcSpan = isIvyAst ? bindingSpan : sourceSpan;
|
|
20149
20455
|
const valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);
|
|
20150
|
-
this._parsePropertyAst(key, binding.value, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20456
|
+
this._parsePropertyAst(key, binding.value, false, srcSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20151
20457
|
} else {
|
|
20152
20458
|
targetMatchableAttrs.push([key, ""]);
|
|
20153
20459
|
this.parseLiteralAttr(key, null, keySpan, absoluteValueOffset, void 0, targetMatchableAttrs, targetProps, keySpan);
|
|
@@ -20182,7 +20488,7 @@ var BindingParser = class {
|
|
|
20182
20488
|
targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
|
|
20183
20489
|
}
|
|
20184
20490
|
}
|
|
20185
|
-
parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
20491
|
+
parsePropertyBinding(name, expression, isHost, isPartOfAssignmentBinding, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
|
|
20186
20492
|
if (name.length === 0) {
|
|
20187
20493
|
this._reportError(`Property name is missing in binding`, sourceSpan);
|
|
20188
20494
|
}
|
|
@@ -20203,20 +20509,20 @@ var BindingParser = class {
|
|
|
20203
20509
|
if (isAnimationProp) {
|
|
20204
20510
|
this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20205
20511
|
} else {
|
|
20206
|
-
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20512
|
+
this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20207
20513
|
}
|
|
20208
20514
|
}
|
|
20209
20515
|
parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {
|
|
20210
20516
|
const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);
|
|
20211
20517
|
if (expr) {
|
|
20212
|
-
this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20518
|
+
this._parsePropertyAst(name, expr, false, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
|
|
20213
20519
|
return true;
|
|
20214
20520
|
}
|
|
20215
20521
|
return false;
|
|
20216
20522
|
}
|
|
20217
|
-
_parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20523
|
+
_parsePropertyAst(name, ast, isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20218
20524
|
targetMatchableAttrs.push([name, ast.source]);
|
|
20219
|
-
targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
20525
|
+
targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
|
|
20220
20526
|
}
|
|
20221
20527
|
_parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
|
|
20222
20528
|
if (name.length === 0) {
|
|
@@ -20276,7 +20582,7 @@ var BindingParser = class {
|
|
|
20276
20582
|
const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);
|
|
20277
20583
|
boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;
|
|
20278
20584
|
securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);
|
|
20279
|
-
bindingType = 0;
|
|
20585
|
+
bindingType = boundProp.type === ParsedPropertyType.TWO_WAY ? 5 : 0;
|
|
20280
20586
|
if (!skipValidation) {
|
|
20281
20587
|
this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);
|
|
20282
20588
|
}
|
|
@@ -20292,7 +20598,7 @@ var BindingParser = class {
|
|
|
20292
20598
|
if (keySpan !== void 0) {
|
|
20293
20599
|
keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
|
|
20294
20600
|
}
|
|
20295
|
-
this._parseAnimationEvent(name, expression,
|
|
20601
|
+
this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
|
|
20296
20602
|
} else {
|
|
20297
20603
|
this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
|
|
20298
20604
|
}
|
|
@@ -20301,11 +20607,11 @@ var BindingParser = class {
|
|
|
20301
20607
|
const prop = this._schemaRegistry.getMappedPropName(propName);
|
|
20302
20608
|
return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);
|
|
20303
20609
|
}
|
|
20304
|
-
_parseAnimationEvent(name, expression,
|
|
20610
|
+
_parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
|
|
20305
20611
|
const matches = splitAtPeriod(name, [name, ""]);
|
|
20306
20612
|
const eventName = matches[0];
|
|
20307
20613
|
const phase = matches[1].toLowerCase();
|
|
20308
|
-
const ast = this._parseAction(expression,
|
|
20614
|
+
const ast = this._parseAction(expression, handlerSpan);
|
|
20309
20615
|
targetEvents.push(new ParsedEvent(eventName, phase, 1, ast, sourceSpan, handlerSpan, keySpan));
|
|
20310
20616
|
if (eventName.length === 0) {
|
|
20311
20617
|
this._reportError(`Animation event name is missing in binding`, sourceSpan);
|
|
@@ -20320,15 +20626,20 @@ var BindingParser = class {
|
|
|
20320
20626
|
}
|
|
20321
20627
|
_parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
|
|
20322
20628
|
const [target, eventName] = splitAtColon(name, [null, name]);
|
|
20323
|
-
const
|
|
20629
|
+
const prevErrorCount = this.errors.length;
|
|
20630
|
+
const ast = this._parseAction(expression, handlerSpan);
|
|
20631
|
+
const isValid = this.errors.length === prevErrorCount;
|
|
20324
20632
|
targetMatchableAttrs.push([name, ast.source]);
|
|
20325
|
-
|
|
20633
|
+
if (isAssignmentEvent && isValid && !this._isAllowedAssignmentEvent(ast)) {
|
|
20634
|
+
this._reportError("Unsupported expression in a two-way binding", sourceSpan);
|
|
20635
|
+
}
|
|
20636
|
+
targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? 2 : 0, ast, sourceSpan, handlerSpan, keySpan));
|
|
20326
20637
|
}
|
|
20327
|
-
_parseAction(value,
|
|
20638
|
+
_parseAction(value, sourceSpan) {
|
|
20328
20639
|
const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
|
|
20329
20640
|
const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
|
|
20330
20641
|
try {
|
|
20331
|
-
const ast = this._exprParser.parseAction(value,
|
|
20642
|
+
const ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);
|
|
20332
20643
|
if (ast) {
|
|
20333
20644
|
this._reportExpressionParserErrors(ast.errors, sourceSpan);
|
|
20334
20645
|
}
|
|
@@ -20356,6 +20667,21 @@ var BindingParser = class {
|
|
|
20356
20667
|
this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);
|
|
20357
20668
|
}
|
|
20358
20669
|
}
|
|
20670
|
+
_isAllowedAssignmentEvent(ast) {
|
|
20671
|
+
if (ast instanceof ASTWithSource) {
|
|
20672
|
+
return this._isAllowedAssignmentEvent(ast.ast);
|
|
20673
|
+
}
|
|
20674
|
+
if (ast instanceof NonNullAssert) {
|
|
20675
|
+
return this._isAllowedAssignmentEvent(ast.expression);
|
|
20676
|
+
}
|
|
20677
|
+
if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
|
|
20678
|
+
return true;
|
|
20679
|
+
}
|
|
20680
|
+
if (ast instanceof Binary) {
|
|
20681
|
+
return (ast.operation === "&&" || ast.operation === "||" || ast.operation === "??") && (ast.right instanceof PropertyRead || ast.right instanceof KeyedRead);
|
|
20682
|
+
}
|
|
20683
|
+
return ast instanceof Conditional || ast instanceof PrefixNot;
|
|
20684
|
+
}
|
|
20359
20685
|
};
|
|
20360
20686
|
function isAnimationLabel(name) {
|
|
20361
20687
|
return name[0] == "@";
|
|
@@ -20376,7 +20702,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20376
20702
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20377
20703
|
}
|
|
20378
20704
|
|
|
20379
|
-
// bazel-out/
|
|
20705
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20380
20706
|
function isStyleUrlResolvable(url) {
|
|
20381
20707
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20382
20708
|
return false;
|
|
@@ -20385,7 +20711,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20385
20711
|
}
|
|
20386
20712
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20387
20713
|
|
|
20388
|
-
// bazel-out/
|
|
20714
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20389
20715
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20390
20716
|
var LINK_ELEMENT = "link";
|
|
20391
20717
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20455,12 +20781,13 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20455
20781
|
return selectAttr;
|
|
20456
20782
|
}
|
|
20457
20783
|
|
|
20458
|
-
// bazel-out/
|
|
20784
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20459
20785
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20460
20786
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20461
|
-
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
20787
|
+
var CONDITIONAL_ALIAS_PATTERN = /^(as\s)+(.*)/;
|
|
20462
20788
|
var ELSE_IF_PATTERN = /^else[^\S\r\n]+if/;
|
|
20463
20789
|
var FOR_LOOP_LET_PATTERN = /^let\s+([\S\s]*)/;
|
|
20790
|
+
var CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN = /(\s*)(\S+)(\s*)/;
|
|
20464
20791
|
var ALLOWED_FOR_LOOP_LET_VARIABLES = /* @__PURE__ */ new Set(["$index", "$first", "$last", "$even", "$odd", "$count"]);
|
|
20465
20792
|
function isConnectedForLoopBlock(name) {
|
|
20466
20793
|
return name === "empty";
|
|
@@ -20572,8 +20899,10 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20572
20899
|
return null;
|
|
20573
20900
|
}
|
|
20574
20901
|
const [, itemName, rawExpression] = match;
|
|
20902
|
+
const variableName = expressionParam.expression.split(" ")[0];
|
|
20903
|
+
const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));
|
|
20575
20904
|
const result = {
|
|
20576
|
-
itemName: new Variable(itemName, "$implicit",
|
|
20905
|
+
itemName: new Variable(itemName, "$implicit", variableSpan, variableSpan),
|
|
20577
20906
|
trackBy: null,
|
|
20578
20907
|
expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),
|
|
20579
20908
|
context: {}
|
|
@@ -20581,7 +20910,8 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20581
20910
|
for (const param of secondaryParams) {
|
|
20582
20911
|
const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);
|
|
20583
20912
|
if (letMatch !== null) {
|
|
20584
|
-
|
|
20913
|
+
const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);
|
|
20914
|
+
parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, result.context, errors);
|
|
20585
20915
|
continue;
|
|
20586
20916
|
}
|
|
20587
20917
|
const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);
|
|
@@ -20597,16 +20927,18 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
20597
20927
|
}
|
|
20598
20928
|
errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater "${param.expression}"`));
|
|
20599
20929
|
}
|
|
20600
|
-
for (const
|
|
20601
|
-
if (!result.context.hasOwnProperty(
|
|
20930
|
+
for (const variableName2 of ALLOWED_FOR_LOOP_LET_VARIABLES) {
|
|
20931
|
+
if (!result.context.hasOwnProperty(variableName2)) {
|
|
20602
20932
|
const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
|
|
20603
|
-
result.context[
|
|
20933
|
+
result.context[variableName2] = new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
|
|
20604
20934
|
}
|
|
20605
20935
|
}
|
|
20606
20936
|
return result;
|
|
20607
20937
|
}
|
|
20608
20938
|
function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
20939
|
+
var _a2, _b2, _c2;
|
|
20609
20940
|
const parts = expression.split(",");
|
|
20941
|
+
let startSpan = span.start;
|
|
20610
20942
|
for (const part of parts) {
|
|
20611
20943
|
const expressionParts = part.split("=");
|
|
20612
20944
|
const name = expressionParts.length === 2 ? expressionParts[0].trim() : "";
|
|
@@ -20618,8 +20950,20 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
|
20618
20950
|
} else if (context.hasOwnProperty(variableName)) {
|
|
20619
20951
|
errors.push(new ParseError(sourceSpan, `Duplicate "let" parameter variable "${variableName}"`));
|
|
20620
20952
|
} else {
|
|
20621
|
-
|
|
20953
|
+
const [, keyLeadingWhitespace, keyName] = (_a2 = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _a2 : [];
|
|
20954
|
+
const keySpan = keyLeadingWhitespace !== void 0 && expressionParts.length === 2 ? new ParseSourceSpan(
|
|
20955
|
+
startSpan.moveBy(keyLeadingWhitespace.length),
|
|
20956
|
+
startSpan.moveBy(keyLeadingWhitespace.length + keyName.length)
|
|
20957
|
+
) : span;
|
|
20958
|
+
let valueSpan = void 0;
|
|
20959
|
+
if (expressionParts.length === 2) {
|
|
20960
|
+
const [, valueLeadingWhitespace, implicit] = (_b2 = expressionParts[1].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _b2 : [];
|
|
20961
|
+
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;
|
|
20962
|
+
}
|
|
20963
|
+
const sourceSpan2 = new ParseSourceSpan(keySpan.start, (_c2 = valueSpan == null ? void 0 : valueSpan.end) != null ? _c2 : keySpan.end);
|
|
20964
|
+
context[variableName] = new Variable(name, variableName, sourceSpan2, keySpan, valueSpan);
|
|
20622
20965
|
}
|
|
20966
|
+
startSpan = startSpan.moveBy(part.length + 1);
|
|
20623
20967
|
}
|
|
20624
20968
|
}
|
|
20625
20969
|
function validateIfConnectedBlocks(connectedBlocks) {
|
|
@@ -20699,8 +21043,10 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
|
20699
21043
|
} else if (expressionAlias !== null) {
|
|
20700
21044
|
errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one "as" expression'));
|
|
20701
21045
|
} else {
|
|
20702
|
-
const name = aliasMatch[
|
|
20703
|
-
|
|
21046
|
+
const name = aliasMatch[2].trim();
|
|
21047
|
+
const variableStart = param.sourceSpan.start.moveBy(aliasMatch[1].length);
|
|
21048
|
+
const variableSpan = new ParseSourceSpan(variableStart, variableStart.moveBy(name.length));
|
|
21049
|
+
expressionAlias = new Variable(name, name, variableSpan, variableSpan);
|
|
20704
21050
|
}
|
|
20705
21051
|
}
|
|
20706
21052
|
return { expression, expressionAlias };
|
|
@@ -20746,7 +21092,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20746
21092
|
return expression.slice(start, end);
|
|
20747
21093
|
}
|
|
20748
21094
|
|
|
20749
|
-
// bazel-out/
|
|
21095
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20750
21096
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20751
21097
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20752
21098
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -21010,7 +21356,7 @@ function parseDeferredTime(value) {
|
|
|
21010
21356
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
21011
21357
|
}
|
|
21012
21358
|
|
|
21013
|
-
// bazel-out/
|
|
21359
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
21014
21360
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
21015
21361
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
21016
21362
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -21145,7 +21491,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
21145
21491
|
return { triggers, prefetchTriggers };
|
|
21146
21492
|
}
|
|
21147
21493
|
|
|
21148
|
-
// bazel-out/
|
|
21494
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
21149
21495
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
21150
21496
|
var KW_BIND_IDX = 1;
|
|
21151
21497
|
var KW_LET_IDX = 2;
|
|
@@ -21418,7 +21764,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21418
21764
|
if (bindParts[KW_BIND_IDX] != null) {
|
|
21419
21765
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
21420
21766
|
const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BIND_IDX], identifier);
|
|
21421
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21767
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21422
21768
|
} else if (bindParts[KW_LET_IDX]) {
|
|
21423
21769
|
if (isTemplateElement) {
|
|
21424
21770
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
@@ -21440,7 +21786,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21440
21786
|
} else if (bindParts[KW_BINDON_IDX]) {
|
|
21441
21787
|
const identifier = bindParts[IDENT_KW_IDX];
|
|
21442
21788
|
const keySpan2 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX], identifier);
|
|
21443
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21789
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21444
21790
|
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
21445
21791
|
} else if (bindParts[KW_AT_IDX]) {
|
|
21446
21792
|
const keySpan2 = createKeySpan(srcSpan, "", name);
|
|
@@ -21460,10 +21806,10 @@ var HtmlAstToIvyAst = class {
|
|
|
21460
21806
|
const identifier = name.substring(delims.start.length, name.length - delims.end.length);
|
|
21461
21807
|
const keySpan2 = createKeySpan(srcSpan, delims.start, identifier);
|
|
21462
21808
|
if (delims.start === BINDING_DELIMS.BANANA_BOX.start) {
|
|
21463
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21809
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, true, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21464
21810
|
this.parseAssignmentEvent(identifier, value, srcSpan, attribute2.valueSpan, matchableAttributes, boundEvents, keySpan2);
|
|
21465
21811
|
} else if (delims.start === BINDING_DELIMS.PROPERTY.start) {
|
|
21466
|
-
this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21812
|
+
this.bindingParser.parsePropertyBinding(identifier, value, false, false, srcSpan, absoluteOffset, attribute2.valueSpan, matchableAttributes, parsedProperties, keySpan2);
|
|
21467
21813
|
} else {
|
|
21468
21814
|
const events = [];
|
|
21469
21815
|
this.bindingParser.parseEvent(identifier, value, false, srcSpan, attribute2.valueSpan || srcSpan, matchableAttributes, events, keySpan2);
|
|
@@ -21500,7 +21846,7 @@ var HtmlAstToIvyAst = class {
|
|
|
21500
21846
|
}
|
|
21501
21847
|
parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {
|
|
21502
21848
|
const events = [];
|
|
21503
|
-
this.bindingParser.parseEvent(`${name}Change`,
|
|
21849
|
+
this.bindingParser.parseEvent(`${name}Change`, expression, true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
|
|
21504
21850
|
addEvents(events, boundEvents);
|
|
21505
21851
|
}
|
|
21506
21852
|
reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
@@ -21576,7 +21922,7 @@ function textContents(node) {
|
|
|
21576
21922
|
}
|
|
21577
21923
|
}
|
|
21578
21924
|
|
|
21579
|
-
// bazel-out/
|
|
21925
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21580
21926
|
var TagType;
|
|
21581
21927
|
(function(TagType2) {
|
|
21582
21928
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21721,7 +22067,7 @@ function serializePlaceholderValue(value) {
|
|
|
21721
22067
|
}
|
|
21722
22068
|
}
|
|
21723
22069
|
|
|
21724
|
-
// bazel-out/
|
|
22070
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
21725
22071
|
var IMPORTANT_FLAG = "!important";
|
|
21726
22072
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
21727
22073
|
var StylingBuilder = class {
|
|
@@ -22054,7 +22400,7 @@ function isEmptyExpression(ast) {
|
|
|
22054
22400
|
return ast instanceof EmptyExpr;
|
|
22055
22401
|
}
|
|
22056
22402
|
|
|
22057
|
-
// bazel-out/
|
|
22403
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
22058
22404
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
22059
22405
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
22060
22406
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -22073,7 +22419,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
22073
22419
|
const eventArgumentName = "$event";
|
|
22074
22420
|
const implicitReceiverAccesses = /* @__PURE__ */ new Set();
|
|
22075
22421
|
const implicitReceiverExpr = scope === null || scope.bindingLevel === 0 ? variable(CONTEXT_NAME) : scope.getOrCreateSharedContextVar(0);
|
|
22076
|
-
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, "b", eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
|
|
22422
|
+
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);
|
|
22077
22423
|
const statements = [];
|
|
22078
22424
|
const variableDeclarations = scope == null ? void 0 : scope.variableDeclarations();
|
|
22079
22425
|
const restoreViewStatement = scope == null ? void 0 : scope.restoreViewStatement();
|
|
@@ -22465,7 +22811,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22465
22811
|
element2.inputs.forEach((input) => {
|
|
22466
22812
|
const stylingInputWasSet = stylingBuilder.registerBoundInput(input);
|
|
22467
22813
|
if (!stylingInputWasSet) {
|
|
22468
|
-
if (input.type === 0 && input.i18n) {
|
|
22814
|
+
if ((input.type === 0 || input.type === 5) && input.i18n) {
|
|
22469
22815
|
boundI18nAttrs.push(input);
|
|
22470
22816
|
} else {
|
|
22471
22817
|
allOtherInputs.push(input);
|
|
@@ -22499,7 +22845,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22499
22845
|
}
|
|
22500
22846
|
if (element2.outputs.length > 0) {
|
|
22501
22847
|
for (const outputAst of element2.outputs) {
|
|
22502
|
-
this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element2.name, outputAst, elementIndex));
|
|
22848
|
+
this.creationInstruction(outputAst.sourceSpan, outputAst.type === 2 ? Identifiers.twoWayListener : Identifiers.listener, this.prepareListenerParameter(element2.name, outputAst, elementIndex));
|
|
22503
22849
|
}
|
|
22504
22850
|
}
|
|
22505
22851
|
if (isI18nRootElement) {
|
|
@@ -22523,6 +22869,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22523
22869
|
this.allocateBindingSlots(value);
|
|
22524
22870
|
propertyBindings.push({
|
|
22525
22871
|
span: input.sourceSpan,
|
|
22872
|
+
reference: Identifiers.property,
|
|
22526
22873
|
paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))
|
|
22527
22874
|
});
|
|
22528
22875
|
} else {
|
|
@@ -22551,12 +22898,13 @@ var TemplateDefinitionBuilder = class {
|
|
|
22551
22898
|
}
|
|
22552
22899
|
}
|
|
22553
22900
|
this.allocateBindingSlots(value);
|
|
22554
|
-
if (inputType === 0) {
|
|
22901
|
+
if (inputType === 0 || inputType === 5) {
|
|
22555
22902
|
if (value instanceof Interpolation) {
|
|
22556
22903
|
this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);
|
|
22557
22904
|
} else {
|
|
22558
22905
|
propertyBindings.push({
|
|
22559
22906
|
span: input.sourceSpan,
|
|
22907
|
+
reference: inputType === 5 ? Identifiers.twoWayProperty : Identifiers.property,
|
|
22560
22908
|
paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)
|
|
22561
22909
|
});
|
|
22562
22910
|
}
|
|
@@ -22584,7 +22932,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22584
22932
|
}
|
|
22585
22933
|
});
|
|
22586
22934
|
for (const propertyBinding of propertyBindings) {
|
|
22587
|
-
this.updateInstructionWithAdvance(elementIndex, propertyBinding.span,
|
|
22935
|
+
this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, propertyBinding.reference, propertyBinding.paramsOrFn);
|
|
22588
22936
|
}
|
|
22589
22937
|
for (const attributeBinding of attributeBindings) {
|
|
22590
22938
|
this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);
|
|
@@ -22614,7 +22962,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22614
22962
|
}
|
|
22615
22963
|
}
|
|
22616
22964
|
const contextName = `${this.contextName}${contextNameSuffix}_${index}`;
|
|
22617
|
-
const name = `${contextName}_Template
|
|
22965
|
+
const name = this.constantPool.uniqueName(`${contextName}_Template`, false);
|
|
22618
22966
|
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);
|
|
22619
22967
|
this._nestedTemplateFns.push(() => {
|
|
22620
22968
|
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
@@ -22660,7 +23008,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22660
23008
|
this.templatePropertyBindings(templateIndex, inputs);
|
|
22661
23009
|
}
|
|
22662
23010
|
for (const outputAst of template2.outputs) {
|
|
22663
|
-
this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter("ng_template", outputAst, templateIndex));
|
|
23011
|
+
this.creationInstruction(outputAst.sourceSpan, outputAst.type === 2 ? Identifiers.twoWayListener : Identifiers.listener, this.prepareListenerParameter("ng_template", outputAst, templateIndex));
|
|
22664
23012
|
}
|
|
22665
23013
|
}
|
|
22666
23014
|
}
|
|
@@ -22823,7 +23171,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22823
23171
|
const dependencyExp = [];
|
|
22824
23172
|
for (const deferredDep of metadata.deps) {
|
|
22825
23173
|
if (deferredDep.isDeferrable) {
|
|
22826
|
-
const innerFn = arrowFn(
|
|
23174
|
+
const innerFn = arrowFn(
|
|
23175
|
+
[new FnParam("m", DYNAMIC_TYPE)],
|
|
23176
|
+
variable("m").prop(deferredDep.isDefaultImport ? "default" : deferredDep.symbolName)
|
|
23177
|
+
);
|
|
22827
23178
|
const importExpr2 = new DynamicImportExpr(deferredDep.importPath).prop("then").callFn([innerFn]);
|
|
22828
23179
|
dependencyExp.push(importExpr2);
|
|
22829
23180
|
} else {
|
|
@@ -23741,7 +24092,7 @@ function createClosureModeGuard2() {
|
|
|
23741
24092
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23742
24093
|
}
|
|
23743
24094
|
|
|
23744
|
-
// bazel-out/
|
|
24095
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
|
|
23745
24096
|
function toQueryFlags(query) {
|
|
23746
24097
|
return (query.descendants ? 1 : 0) | (query.static ? 2 : 0) | (query.emitDistinctChangesOnly ? 4 : 0);
|
|
23747
24098
|
}
|
|
@@ -23858,7 +24209,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
23858
24209
|
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
23859
24210
|
}
|
|
23860
24211
|
|
|
23861
|
-
// bazel-out/
|
|
24212
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23862
24213
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23863
24214
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23864
24215
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23937,8 +24288,8 @@ function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
|
|
|
23937
24288
|
}
|
|
23938
24289
|
function createDeferredDepsFunction(constantPool, name, deps) {
|
|
23939
24290
|
const dependencyExp = [];
|
|
23940
|
-
for (const [symbolName, importPath] of deps) {
|
|
23941
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(symbolName));
|
|
24291
|
+
for (const [symbolName, { importPath, isDefaultImport }] of deps) {
|
|
24292
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName));
|
|
23942
24293
|
const importExpr2 = new DynamicImportExpr(importPath).prop("then").callFn([innerFn]);
|
|
23943
24294
|
dependencyExp.push(importExpr2);
|
|
23944
24295
|
}
|
|
@@ -23962,12 +24313,12 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
23962
24313
|
}
|
|
23963
24314
|
const templateTypeName = meta.name;
|
|
23964
24315
|
const templateName = templateTypeName ? `${templateTypeName}_Template` : null;
|
|
23965
|
-
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
24316
|
+
let allDeferrableDepsFn = null;
|
|
24317
|
+
if (meta.deferBlocks.size > 0 && meta.deferrableTypes.size > 0 && meta.deferBlockDepsEmitMode === 1) {
|
|
24318
|
+
const fnName = `${templateTypeName}_DeferFn`;
|
|
24319
|
+
allDeferrableDepsFn = createDeferredDepsFunction(constantPool, fnName, meta.deferrableTypes);
|
|
24320
|
+
}
|
|
24321
|
+
if (!USE_TEMPLATE_PIPELINE && !meta.useTemplatePipeline) {
|
|
23971
24322
|
const template2 = meta.template;
|
|
23972
24323
|
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks, /* @__PURE__ */ new Map(), allDeferrableDepsFn);
|
|
23973
24324
|
const templateFunctionExpression = templateBuilder.buildTemplateFunction(template2.nodes, []);
|
|
@@ -23987,7 +24338,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
23987
24338
|
}
|
|
23988
24339
|
definitionMap.set("template", templateFunctionExpression);
|
|
23989
24340
|
} else {
|
|
23990
|
-
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks);
|
|
24341
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks, allDeferrableDepsFn);
|
|
23991
24342
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
23992
24343
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
23993
24344
|
if (tpl.contentSelectors !== null) {
|
|
@@ -24135,7 +24486,7 @@ function createDirectiveType(meta) {
|
|
|
24135
24486
|
function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {
|
|
24136
24487
|
const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, typeSourceSpan);
|
|
24137
24488
|
const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);
|
|
24138
|
-
if (USE_TEMPLATE_PIPELINE) {
|
|
24489
|
+
if (USE_TEMPLATE_PIPELINE || hostBindingsMetadata.useTemplatePipeline) {
|
|
24139
24490
|
if (hostBindingsMetadata.specialAttributes.styleAttr) {
|
|
24140
24491
|
hostBindingsMetadata.attributes["style"] = literal(hostBindingsMetadata.specialAttributes.styleAttr);
|
|
24141
24492
|
}
|
|
@@ -24438,7 +24789,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
24438
24789
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
24439
24790
|
}
|
|
24440
24791
|
|
|
24441
|
-
// bazel-out/
|
|
24792
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
24442
24793
|
var R3TargetBinder = class {
|
|
24443
24794
|
constructor(directiveMatcher) {
|
|
24444
24795
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -25055,11 +25406,12 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
25055
25406
|
return templateEntities;
|
|
25056
25407
|
}
|
|
25057
25408
|
|
|
25058
|
-
// bazel-out/
|
|
25409
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
25059
25410
|
var ResourceLoader = class {
|
|
25060
25411
|
};
|
|
25061
25412
|
|
|
25062
|
-
// bazel-out/
|
|
25413
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
25414
|
+
var SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT = false;
|
|
25063
25415
|
var CompilerFacadeImpl = class {
|
|
25064
25416
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
25065
25417
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -25192,7 +25544,8 @@ var CompilerFacadeImpl = class {
|
|
|
25192
25544
|
animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,
|
|
25193
25545
|
viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,
|
|
25194
25546
|
relativeContextFilePath: "",
|
|
25195
|
-
i18nUseExternalIds: true
|
|
25547
|
+
i18nUseExternalIds: true,
|
|
25548
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25196
25549
|
});
|
|
25197
25550
|
const jitExpressionSourceMap = `ng:///${facade.name}.js`;
|
|
25198
25551
|
return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
|
|
@@ -25293,7 +25646,9 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
25293
25646
|
typeSourceSpan: facade.typeSourceSpan,
|
|
25294
25647
|
type: wrapReference(facade.type),
|
|
25295
25648
|
deps: null,
|
|
25296
|
-
host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),
|
|
25649
|
+
host: __spreadProps(__spreadValues({}, extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host)), {
|
|
25650
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25651
|
+
}),
|
|
25297
25652
|
inputs: __spreadValues(__spreadValues({}, inputsFromMetadata), inputsFromType),
|
|
25298
25653
|
outputs: __spreadValues(__spreadValues({}, outputsFromMetadata), outputsFromType),
|
|
25299
25654
|
queries: facade.queries.map(convertToR3QueryMetadata),
|
|
@@ -25336,7 +25691,8 @@ function convertHostDeclarationToMetadata(host = {}) {
|
|
|
25336
25691
|
specialAttributes: {
|
|
25337
25692
|
classAttr: host.classAttribute,
|
|
25338
25693
|
styleAttr: host.styleAttribute
|
|
25339
|
-
}
|
|
25694
|
+
},
|
|
25695
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25340
25696
|
};
|
|
25341
25697
|
}
|
|
25342
25698
|
function convertHostDirectivesToMetadata(metadata) {
|
|
@@ -25401,7 +25757,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
25401
25757
|
interpolation,
|
|
25402
25758
|
declarationListEmitMode: 2,
|
|
25403
25759
|
relativeContextFilePath: "",
|
|
25404
|
-
i18nUseExternalIds: true
|
|
25760
|
+
i18nUseExternalIds: true,
|
|
25761
|
+
useTemplatePipeline: SHOULD_USE_TEMPLATE_PIPELINE_FOR_JIT
|
|
25405
25762
|
});
|
|
25406
25763
|
}
|
|
25407
25764
|
function convertDeclarationFacadeToMetadata(declaration) {
|
|
@@ -25634,17 +25991,17 @@ function publishFacade(global) {
|
|
|
25634
25991
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
25635
25992
|
}
|
|
25636
25993
|
|
|
25637
|
-
// bazel-out/
|
|
25638
|
-
var VERSION2 = new Version("17.2.0-
|
|
25994
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25995
|
+
var VERSION2 = new Version("17.2.0-rc.0");
|
|
25639
25996
|
|
|
25640
|
-
// bazel-out/
|
|
25997
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25641
25998
|
var _VisitorMode;
|
|
25642
25999
|
(function(_VisitorMode2) {
|
|
25643
26000
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
25644
26001
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
25645
26002
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
25646
26003
|
|
|
25647
|
-
// bazel-out/
|
|
26004
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
25648
26005
|
var XmlTagDefinition = class {
|
|
25649
26006
|
constructor() {
|
|
25650
26007
|
this.closedByParent = false;
|
|
@@ -25666,7 +26023,7 @@ var XmlTagDefinition = class {
|
|
|
25666
26023
|
};
|
|
25667
26024
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25668
26025
|
|
|
25669
|
-
// bazel-out/
|
|
26026
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25670
26027
|
var FactoryTarget2;
|
|
25671
26028
|
(function(FactoryTarget3) {
|
|
25672
26029
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25676,10 +26033,10 @@ var FactoryTarget2;
|
|
|
25676
26033
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25677
26034
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25678
26035
|
|
|
25679
|
-
// bazel-out/
|
|
26036
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25680
26037
|
publishFacade(_global);
|
|
25681
26038
|
|
|
25682
|
-
// bazel-out/
|
|
26039
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/identifier-lookup.mjs
|
|
25683
26040
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
25684
26041
|
function lookupIdentifiersInSourceFile(sourceFile, names) {
|
|
25685
26042
|
const results = /* @__PURE__ */ new Set();
|
|
@@ -25693,7 +26050,7 @@ function lookupIdentifiersInSourceFile(sourceFile, names) {
|
|
|
25693
26050
|
return results;
|
|
25694
26051
|
}
|
|
25695
26052
|
|
|
25696
|
-
// bazel-out/
|
|
26053
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
25697
26054
|
var ngtemplate = "ng-template";
|
|
25698
26055
|
var boundngifelse = "[ngIfElse]";
|
|
25699
26056
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
@@ -26026,7 +26383,7 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
26026
26383
|
}
|
|
26027
26384
|
};
|
|
26028
26385
|
|
|
26029
|
-
// bazel-out/
|
|
26386
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
26030
26387
|
var import_path2 = require("path");
|
|
26031
26388
|
var import_typescript6 = __toESM(require("typescript"), 1);
|
|
26032
26389
|
var startMarkerRegex = new RegExp(startMarker, "gm");
|
|
@@ -26526,7 +26883,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
26526
26883
|
});
|
|
26527
26884
|
}
|
|
26528
26885
|
|
|
26529
|
-
// bazel-out/
|
|
26886
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
26530
26887
|
var boundcase = "[ngSwitchCase]";
|
|
26531
26888
|
var switchcase = "*ngSwitchCase";
|
|
26532
26889
|
var nakedcase = "ngSwitchCase";
|
|
@@ -26604,7 +26961,7 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
26604
26961
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
26605
26962
|
}
|
|
26606
26963
|
|
|
26607
|
-
// bazel-out/
|
|
26964
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
26608
26965
|
var ngfor = "*ngFor";
|
|
26609
26966
|
var nakedngfor2 = "ngFor";
|
|
26610
26967
|
var fors = [
|
|
@@ -26778,7 +27135,7 @@ function getNgForParts(expression) {
|
|
|
26778
27135
|
return parts;
|
|
26779
27136
|
}
|
|
26780
27137
|
|
|
26781
|
-
// bazel-out/
|
|
27138
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
26782
27139
|
var ngif = "*ngIf";
|
|
26783
27140
|
var boundngif = "[ngIf]";
|
|
26784
27141
|
var nakedngif = "ngIf";
|
|
@@ -26931,7 +27288,7 @@ function buildIfThenBlock(etm, tmpl, condition, thenPlaceholder, offset) {
|
|
|
26931
27288
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
26932
27289
|
}
|
|
26933
27290
|
|
|
26934
|
-
// bazel-out/
|
|
27291
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
26935
27292
|
var ngswitch = "[ngSwitch]";
|
|
26936
27293
|
var switches = [
|
|
26937
27294
|
ngswitch
|
|
@@ -26999,7 +27356,7 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
26999
27356
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
27000
27357
|
}
|
|
27001
27358
|
|
|
27002
|
-
// bazel-out/
|
|
27359
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
27003
27360
|
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
27004
27361
|
let errors = [];
|
|
27005
27362
|
let migrated = template2;
|
|
@@ -27050,7 +27407,7 @@ function migrateTemplate(template2, templateType, node, file, format = true, ana
|
|
|
27050
27407
|
return { migrated, errors };
|
|
27051
27408
|
}
|
|
27052
27409
|
|
|
27053
|
-
// bazel-out/
|
|
27410
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
27054
27411
|
function control_flow_migration_default(options) {
|
|
27055
27412
|
return (tree, context) => __async(this, null, function* () {
|
|
27056
27413
|
const basePath = process.cwd();
|
|
@@ -27069,7 +27426,7 @@ function control_flow_migration_default(options) {
|
|
|
27069
27426
|
errors = [...errors, ...migrateErrors];
|
|
27070
27427
|
}
|
|
27071
27428
|
if (errors.length > 0) {
|
|
27072
|
-
context.logger.warn(`WARNING: ${errors.length} errors
|
|
27429
|
+
context.logger.warn(`WARNING: ${errors.length} errors occurred during your migration:
|
|
27073
27430
|
`);
|
|
27074
27431
|
errors.forEach((err) => {
|
|
27075
27432
|
context.logger.warn(err);
|