@magmonium/cli 0.8.21 → 0.8.23
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/codegen/index.js +771 -494
- package/package.json +1 -1
package/codegen/index.js
CHANGED
|
@@ -225,6 +225,7 @@ __export(index_exports, {
|
|
|
225
225
|
ONE_CONFIG_SOURCE: () => ONE_CONFIG_SOURCE,
|
|
226
226
|
ONE_FUNCTIONS: () => ONE_FUNCTIONS,
|
|
227
227
|
ONE_FUNCTION_CATALOG: () => ONE_FUNCTION_CATALOG,
|
|
228
|
+
ONE_FUNCTION_DATA_PARAM: () => ONE_FUNCTION_DATA_PARAM,
|
|
228
229
|
ONE_FUNCTION_ID_PARAM: () => ONE_FUNCTION_ID_PARAM,
|
|
229
230
|
ONE_FUNCTION_MAP_PARAM: () => ONE_FUNCTION_MAP_PARAM,
|
|
230
231
|
ONE_FUNCTION_PREFIX: () => ONE_FUNCTION_PREFIX,
|
|
@@ -334,6 +335,7 @@ __export(index_exports, {
|
|
|
334
335
|
USER_VALUE_LABEL: () => USER_VALUE_LABEL,
|
|
335
336
|
USER_VALUE_SLOTS: () => USER_VALUE_SLOTS,
|
|
336
337
|
VALUE_SLOT_LABEL: () => VALUE_SLOT_LABEL,
|
|
338
|
+
VALUE_SOURCE: () => VALUE_SOURCE,
|
|
337
339
|
VARIANT_JOINS: () => VARIANT_JOINS,
|
|
338
340
|
VARIANT_KINDS: () => VARIANT_KINDS,
|
|
339
341
|
WC_CONFIG_STORAGE_KEY: () => WC_CONFIG_STORAGE_KEY,
|
|
@@ -834,6 +836,7 @@ __export(index_exports, {
|
|
|
834
836
|
hasScreenVariableActionEnumConflict: () => hasScreenVariableActionEnumConflict,
|
|
835
837
|
hasStore: () => hasStore,
|
|
836
838
|
hasTextSource: () => hasTextSource,
|
|
839
|
+
hasValueSource: () => hasValueSource,
|
|
837
840
|
hasVariableDrift: () => hasVariableDrift,
|
|
838
841
|
heldFieldIds: () => heldFieldIds,
|
|
839
842
|
heldProperties: () => heldProperties,
|
|
@@ -921,6 +924,7 @@ __export(index_exports, {
|
|
|
921
924
|
isMessageSlot: () => isMessageSlot,
|
|
922
925
|
isMethodInUse: () => isMethodInUse,
|
|
923
926
|
isMountable: () => isMountable,
|
|
927
|
+
isMovingScreenEmit: () => isMovingScreenEmit,
|
|
924
928
|
isNavAtOrBelow: () => isNavAtOrBelow,
|
|
925
929
|
isNavInstanceFunction: () => isNavInstanceFunction,
|
|
926
930
|
isNavRowShape: () => isNavRowShape,
|
|
@@ -1002,6 +1006,7 @@ __export(index_exports, {
|
|
|
1002
1006
|
isValidTimerName: () => isValidTimerName,
|
|
1003
1007
|
isValidTranslationKey: () => isValidTranslationKey,
|
|
1004
1008
|
isValidVariantName: () => isValidVariantName,
|
|
1009
|
+
isValueSource: () => isValueSource,
|
|
1005
1010
|
isVariantJoin: () => isVariantJoin,
|
|
1006
1011
|
isVariantKind: () => isVariantKind,
|
|
1007
1012
|
jsNativesInGroup: () => jsNativesInGroup,
|
|
@@ -1092,7 +1097,6 @@ __export(index_exports, {
|
|
|
1092
1097
|
mintMenuActionSlot: () => mintMenuActionSlot,
|
|
1093
1098
|
mintOutputArm: () => mintOutputArm,
|
|
1094
1099
|
mintOutputCall: () => mintOutputCall,
|
|
1095
|
-
mintScreenOutputCall: () => mintScreenOutputCall,
|
|
1096
1100
|
mistypedScreenArgs: () => mistypedScreenArgs,
|
|
1097
1101
|
mistypedStateArgs: () => mistypedStateArgs,
|
|
1098
1102
|
moduleTest: () => moduleTest,
|
|
@@ -1217,7 +1221,9 @@ __export(index_exports, {
|
|
|
1217
1221
|
outcomeReport: () => outcomeReport,
|
|
1218
1222
|
outcomeTransformError: () => outcomeTransformError,
|
|
1219
1223
|
outcomeTransformFailure: () => outcomeTransformFailure,
|
|
1224
|
+
outcomeTransformFunction: () => outcomeTransformFunction,
|
|
1220
1225
|
outcomeTransformFunctionIds: () => outcomeTransformFunctionIds,
|
|
1226
|
+
outcomeTransformOneFunction: () => outcomeTransformOneFunction,
|
|
1221
1227
|
outerCall: () => outerCall,
|
|
1222
1228
|
outputArgRows: () => outputArgRows,
|
|
1223
1229
|
outputArm: () => outputArm,
|
|
@@ -1353,6 +1359,7 @@ __export(index_exports, {
|
|
|
1353
1359
|
reconcileFormModels: () => reconcileFormModels,
|
|
1354
1360
|
redirectRouteLiteral: () => redirectRouteLiteral,
|
|
1355
1361
|
referencedShapeIds: () => referencedShapeIds,
|
|
1362
|
+
rekeyIds: () => rekeyIds,
|
|
1356
1363
|
relationshipParent: () => relationshipParent,
|
|
1357
1364
|
releaseBlocker: () => releaseBlocker,
|
|
1358
1365
|
remapControlMapNavs: () => remapControlMapNavs,
|
|
@@ -1380,7 +1387,6 @@ __export(index_exports, {
|
|
|
1380
1387
|
removeOutputArmKeepingBlocks: () => removeOutputArmKeepingBlocks,
|
|
1381
1388
|
removeOutputCall: () => removeOutputCall,
|
|
1382
1389
|
removeRuleNode: () => removeRuleNode,
|
|
1383
|
-
removeScreenOutputCall: () => removeScreenOutputCall,
|
|
1384
1390
|
renameComputedOptionSets: () => renameComputedOptionSets,
|
|
1385
1391
|
renameControlOptionSets: () => renameControlOptionSets,
|
|
1386
1392
|
renameFormEventMember: () => renameFormEventMember,
|
|
@@ -1507,8 +1513,6 @@ __export(index_exports, {
|
|
|
1507
1513
|
screenMethodPayload: () => screenMethodPayload,
|
|
1508
1514
|
screenMethodSignature: () => screenMethodSignature,
|
|
1509
1515
|
screenNameKey: () => screenNameKey,
|
|
1510
|
-
screenOutputCallIds: () => screenOutputCallIds,
|
|
1511
|
-
screenOutputCallKeys: () => screenOutputCallKeys,
|
|
1512
1516
|
screenPropertiesWithComputeds: () => screenPropertiesWithComputeds,
|
|
1513
1517
|
screenTest: () => screenTest,
|
|
1514
1518
|
screenVariableActionEnumIds: () => screenVariableActionEnumIds,
|
|
@@ -1571,6 +1575,7 @@ __export(index_exports, {
|
|
|
1571
1575
|
shapeIdOf: () => shapeIdOf,
|
|
1572
1576
|
shapeImportPath: () => shapeImportPath,
|
|
1573
1577
|
shapeInterfaceName: () => shapeInterfaceName,
|
|
1578
|
+
shapeKeyIdMap: () => shapeKeyIdMap,
|
|
1574
1579
|
shapeKeyOf: () => shapeKeyOf,
|
|
1575
1580
|
shapeTwinAtOrigin: () => shapeTwinAtOrigin,
|
|
1576
1581
|
shapesInReach: () => shapesInReach,
|
|
@@ -1721,6 +1726,7 @@ __export(index_exports, {
|
|
|
1721
1726
|
validationFileName: () => validationFileName,
|
|
1722
1727
|
validationMemberName: () => validationMemberName,
|
|
1723
1728
|
validationTest: () => validationTest,
|
|
1729
|
+
valueSourceOf: () => valueSourceOf,
|
|
1724
1730
|
variableDrift: () => variableDrift,
|
|
1725
1731
|
variantCheckError: () => variantCheckError,
|
|
1726
1732
|
variantCheckId: () => variantCheckId,
|
|
@@ -1806,6 +1812,9 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
1806
1812
|
ControlType2["HEAT_SWATCH"] = "heat_swatch";
|
|
1807
1813
|
ControlType2["SCORE_SET"] = "score_set";
|
|
1808
1814
|
ControlType2["SCORE_SET_ITEM"] = "score_set_item";
|
|
1815
|
+
ControlType2["PRICE_LADDER"] = "price_ladder";
|
|
1816
|
+
ControlType2["PRICE_LADDER_MARK"] = "price_ladder_mark";
|
|
1817
|
+
ControlType2["PRICE_LADDER_SIGNAL"] = "price_ladder_signal";
|
|
1809
1818
|
ControlType2["FORM"] = "form";
|
|
1810
1819
|
ControlType2["FIELD"] = "field";
|
|
1811
1820
|
ControlType2["SECTION_BUTTON_GROUP"] = "section_button_group";
|
|
@@ -1849,12 +1858,14 @@ var LEGACY_VARIANT_JOIN = "or";
|
|
|
1849
1858
|
var isLinkedVariable = (variable) => variable.kind === "linked" && !!variable.source;
|
|
1850
1859
|
var isLinkedKeySource = (source) => source.source === "input" || source.source === "computed" || source.source === "path";
|
|
1851
1860
|
var isLinkedFormModel = (model) => Object.values(model.keys).some(isLinkedKeySource);
|
|
1852
|
-
var screenAutoCallWhen = (call) => call.when ?? (call.args.some((row) => row.source === "input") ? "on-change" : "once");
|
|
1861
|
+
var screenAutoCallWhen = (call) => call.when ?? (call.args.some((row) => row.source === "input") || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? "on-change" : "once");
|
|
1862
|
+
var isMovingScreenEmit = (emit) => emit.value?.kind === "input" || emit.value?.kind === "binding";
|
|
1853
1863
|
var screenAutoCallError = (call) => {
|
|
1864
|
+
if (!call.methodId && !call.emits?.length) return "auto-call-empty";
|
|
1854
1865
|
if (screenAutoCallWhen(call) !== "on-change") return void 0;
|
|
1855
1866
|
return call.args.some(
|
|
1856
1867
|
(row) => row.source === "input" || row.source === "binding"
|
|
1857
|
-
) ? void 0 : "auto-call-never-fires";
|
|
1868
|
+
) || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? void 0 : "auto-call-never-fires";
|
|
1858
1869
|
};
|
|
1859
1870
|
var MENU_ACTION_MEMBERS = [
|
|
1860
1871
|
"id",
|
|
@@ -2521,6 +2532,44 @@ var shapeClosure = (shapes, shapeId) => {
|
|
|
2521
2532
|
};
|
|
2522
2533
|
var remapDataType = (dataType, fromId, toId) => dataType.type === "shape" && dataType.shapeId === fromId ? { ...dataType, shapeId: toId } : dataType;
|
|
2523
2534
|
var keyIdKeeper = (heldKeys, mintId) => (name3) => heldKeys.find((key2) => key2.name === name3)?.id ?? mintId();
|
|
2535
|
+
var shapeKeyIdMap = (from, to) => {
|
|
2536
|
+
const byName = new Map(
|
|
2537
|
+
to.keys.map((key2) => [key2.name, key2])
|
|
2538
|
+
);
|
|
2539
|
+
return new Map(
|
|
2540
|
+
from.keys.flatMap((key2) => {
|
|
2541
|
+
const next = byName.get(key2.name);
|
|
2542
|
+
return next && next.id !== key2.id ? [[key2.id, next.id]] : [];
|
|
2543
|
+
})
|
|
2544
|
+
);
|
|
2545
|
+
};
|
|
2546
|
+
function rekeyIds(value, ids) {
|
|
2547
|
+
if (!ids.size) return value;
|
|
2548
|
+
if (typeof value === "string") {
|
|
2549
|
+
return ids.get(value) ?? value;
|
|
2550
|
+
}
|
|
2551
|
+
if (Array.isArray(value)) {
|
|
2552
|
+
let changed = false;
|
|
2553
|
+
const next2 = value.map((entry2) => {
|
|
2554
|
+
const rekeyed = rekeyIds(entry2, ids);
|
|
2555
|
+
if (rekeyed !== entry2) changed = true;
|
|
2556
|
+
return rekeyed;
|
|
2557
|
+
});
|
|
2558
|
+
return changed ? next2 : value;
|
|
2559
|
+
}
|
|
2560
|
+
if (!value || typeof value !== "object") return value;
|
|
2561
|
+
const record = value;
|
|
2562
|
+
let next;
|
|
2563
|
+
for (const [key2, entry2] of Object.entries(record)) {
|
|
2564
|
+
const rekeyed = rekeyIds(entry2, ids);
|
|
2565
|
+
const nextKey = ids.get(key2) ?? key2;
|
|
2566
|
+
if (rekeyed === entry2 && nextKey === key2) continue;
|
|
2567
|
+
next ??= { ...record };
|
|
2568
|
+
if (nextKey !== key2) delete next[key2];
|
|
2569
|
+
next[nextKey] = rekeyed;
|
|
2570
|
+
}
|
|
2571
|
+
return next ?? value;
|
|
2572
|
+
}
|
|
2524
2573
|
function shapeHolderCount(feature, screens, shapeId) {
|
|
2525
2574
|
const properties = Object.values(feature.properties).filter(
|
|
2526
2575
|
(property) => shapeIdOf(property.dataType) === shapeId
|
|
@@ -3359,6 +3408,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3359
3408
|
"stat" /* STAT */,
|
|
3360
3409
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3361
3410
|
"score_set" /* SCORE_SET */,
|
|
3411
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3362
3412
|
"flex" /* FLEX */,
|
|
3363
3413
|
"card" /* CARD */,
|
|
3364
3414
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
@@ -3424,6 +3474,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3424
3474
|
"stat" /* STAT */,
|
|
3425
3475
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3426
3476
|
"score_set" /* SCORE_SET */,
|
|
3477
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3427
3478
|
"flex" /* FLEX */,
|
|
3428
3479
|
"card" /* CARD */,
|
|
3429
3480
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
@@ -3450,6 +3501,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3450
3501
|
"stat" /* STAT */,
|
|
3451
3502
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3452
3503
|
"score_set" /* SCORE_SET */,
|
|
3504
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3453
3505
|
"flex" /* FLEX */,
|
|
3454
3506
|
"card" /* CARD */,
|
|
3455
3507
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
@@ -3484,6 +3536,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3484
3536
|
"stat" /* STAT */,
|
|
3485
3537
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3486
3538
|
"score_set" /* SCORE_SET */,
|
|
3539
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3487
3540
|
"flex" /* FLEX */,
|
|
3488
3541
|
"card" /* CARD */,
|
|
3489
3542
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
@@ -3522,6 +3575,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3522
3575
|
"stat" /* STAT */,
|
|
3523
3576
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3524
3577
|
"score_set" /* SCORE_SET */,
|
|
3578
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3525
3579
|
"card" /* CARD */,
|
|
3526
3580
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3527
3581
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
@@ -3556,6 +3610,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3556
3610
|
"stat" /* STAT */,
|
|
3557
3611
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3558
3612
|
"score_set" /* SCORE_SET */,
|
|
3613
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3559
3614
|
"card" /* CARD */,
|
|
3560
3615
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3561
3616
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
@@ -3622,6 +3677,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3622
3677
|
"user" /* USER */,
|
|
3623
3678
|
"heat_swatch" /* HEAT_SWATCH */,
|
|
3624
3679
|
"score_set" /* SCORE_SET */,
|
|
3680
|
+
"price_ladder" /* PRICE_LADDER */,
|
|
3625
3681
|
"button" /* BUTTON */,
|
|
3626
3682
|
"context_menu" /* CONTEXT_MENU */,
|
|
3627
3683
|
"audience_picker" /* AUDIENCE_PICKER */,
|
|
@@ -3707,6 +3763,16 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3707
3763
|
["score_set" /* SCORE_SET */]: ["score_set_item" /* SCORE_SET_ITEM */],
|
|
3708
3764
|
// A leaf: an item renders nothing of its own.
|
|
3709
3765
|
["score_set_item" /* SCORE_SET_ITEM */]: [],
|
|
3766
|
+
// Its levels and chips and nothing else — every other setting is an
|
|
3767
|
+
// attribute (libs/one GLOSSARY.md PriceLadder). Dropped empty; the Canvas
|
|
3768
|
+
// lists each child as a row so it can be named and picked.
|
|
3769
|
+
["price_ladder" /* PRICE_LADDER */]: [
|
|
3770
|
+
"price_ladder_mark" /* PRICE_LADDER_MARK */,
|
|
3771
|
+
"price_ladder_signal" /* PRICE_LADDER_SIGNAL */
|
|
3772
|
+
],
|
|
3773
|
+
// Leaves: the ladder draws both.
|
|
3774
|
+
["price_ladder_mark" /* PRICE_LADDER_MARK */]: [],
|
|
3775
|
+
["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: [],
|
|
3710
3776
|
// Content like a Logo, but the one content Control that is not a leaf: what
|
|
3711
3777
|
// `m-user` projects beneath the name is a ContentControl, the same single
|
|
3712
3778
|
// child a card Field takes and gated the same way, through `contentSlotOf`.
|
|
@@ -3950,6 +4016,9 @@ var OWN_DIRECTIVES = {
|
|
|
3950
4016
|
["heat_swatch" /* HEAT_SWATCH */]: ["routerLink"],
|
|
3951
4017
|
["score_set" /* SCORE_SET */]: [],
|
|
3952
4018
|
["score_set_item" /* SCORE_SET_ITEM */]: [],
|
|
4019
|
+
["price_ladder" /* PRICE_LADDER */]: [],
|
|
4020
|
+
["price_ladder_mark" /* PRICE_LADDER_MARK */]: [],
|
|
4021
|
+
["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: [],
|
|
3953
4022
|
["form" /* FORM */]: ["routerLink"],
|
|
3954
4023
|
["field" /* FIELD */]: ["mOptions", "routerLink"],
|
|
3955
4024
|
// Nothing to attach: a ContentControl emits an `ng-template` — where a
|
|
@@ -4121,6 +4190,9 @@ var CONTROL_LABEL = {
|
|
|
4121
4190
|
["heat_swatch" /* HEAT_SWATCH */]: "heat-swatch",
|
|
4122
4191
|
["score_set" /* SCORE_SET */]: "score-set-control",
|
|
4123
4192
|
["score_set_item" /* SCORE_SET_ITEM */]: "score-set-item-control",
|
|
4193
|
+
["price_ladder" /* PRICE_LADDER */]: "price-ladder-control",
|
|
4194
|
+
["price_ladder_mark" /* PRICE_LADDER_MARK */]: "price-ladder-mark-control",
|
|
4195
|
+
["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: "price-ladder-signal-control",
|
|
4124
4196
|
["nav_header" /* NAV_HEADER */]: "nav-header",
|
|
4125
4197
|
["form" /* FORM */]: "form",
|
|
4126
4198
|
["field" /* FIELD */]: "field",
|
|
@@ -4193,6 +4265,10 @@ var CONTROL_ICON = {
|
|
|
4193
4265
|
// Reuse the Stat glyph until score artwork joins the shared set.
|
|
4194
4266
|
["score_set" /* SCORE_SET */]: "control_stat",
|
|
4195
4267
|
["score_set_item" /* SCORE_SET_ITEM */]: "control_stat_value",
|
|
4268
|
+
// Reuse the Stat glyphs until ladder artwork joins the shared set.
|
|
4269
|
+
["price_ladder" /* PRICE_LADDER */]: "control_stat",
|
|
4270
|
+
["price_ladder_mark" /* PRICE_LADDER_MARK */]: "control_stat_value",
|
|
4271
|
+
["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: "control_stat_corner",
|
|
4196
4272
|
["nav_header" /* NAV_HEADER */]: "control_nav_header",
|
|
4197
4273
|
["form" /* FORM */]: "control_form",
|
|
4198
4274
|
["field" /* FIELD */]: "control_field",
|
|
@@ -4469,6 +4545,19 @@ var CONTROL_CODEGEN = {
|
|
|
4469
4545
|
tag: "m-score-set-item",
|
|
4470
4546
|
component: "ScoreSetItemComponent"
|
|
4471
4547
|
},
|
|
4548
|
+
// Folderless for the ScoreSet's reason (libs/one GLOSSARY.md PriceLadder).
|
|
4549
|
+
["price_ladder" /* PRICE_LADDER */]: {
|
|
4550
|
+
tag: "m-price-ladder",
|
|
4551
|
+
component: "PriceLadderComponent"
|
|
4552
|
+
},
|
|
4553
|
+
["price_ladder_mark" /* PRICE_LADDER_MARK */]: {
|
|
4554
|
+
tag: "m-price-ladder-mark",
|
|
4555
|
+
component: "PriceLadderMarkComponent"
|
|
4556
|
+
},
|
|
4557
|
+
["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: {
|
|
4558
|
+
tag: "m-price-ladder-signal",
|
|
4559
|
+
component: "PriceLadderSignalComponent"
|
|
4560
|
+
},
|
|
4472
4561
|
// Navigation header with back button and breadcrumb trail.
|
|
4473
4562
|
// Folderless as it uses NavStore internally and takes no config.
|
|
4474
4563
|
["nav_header" /* NAV_HEADER */]: {
|
|
@@ -4851,6 +4940,7 @@ var screenMethodCalls = (method) => method ? [
|
|
|
4851
4940
|
// libs/codegen/src/model/one-function-catalog.ts
|
|
4852
4941
|
var ONE_FUNCTION_ID_PARAM = "id";
|
|
4853
4942
|
var ONE_FUNCTION_MAP_PARAM = "map";
|
|
4943
|
+
var ONE_FUNCTION_DATA_PARAM = "data";
|
|
4854
4944
|
var ONE_FUNCTION_PREFIX = "one:";
|
|
4855
4945
|
var ONE_FUNCTIONS = [
|
|
4856
4946
|
{
|
|
@@ -4957,6 +5047,50 @@ var ONE_FUNCTIONS = [
|
|
|
4957
5047
|
returnType: { type: "boolean" },
|
|
4958
5048
|
returnCardinality: "one"
|
|
4959
5049
|
})
|
|
5050
|
+
},
|
|
5051
|
+
{
|
|
5052
|
+
// `setInMap<T>(id, data: T, map: Record<string, T>): Record<string, T>` —
|
|
5053
|
+
// the map with `data` held under `id`, every other entry kept (ADR 0205).
|
|
5054
|
+
// `loadCoin(id)` answers one coin and `coinsById[id]` is where it lands.
|
|
5055
|
+
// Offered on an OutcomeTransform alone, where the landing names `T`.
|
|
5056
|
+
name: "setInMap",
|
|
5057
|
+
importFrom: ONE_IMPORT_MODULE,
|
|
5058
|
+
reach: ["outcome-transform"],
|
|
5059
|
+
returnsRow: true,
|
|
5060
|
+
params: [
|
|
5061
|
+
{ id: ONE_FUNCTION_ID_PARAM, name: "id", rule: "string-one" },
|
|
5062
|
+
{ id: ONE_FUNCTION_DATA_PARAM, name: "data", rule: "row-one" },
|
|
5063
|
+
{ id: ONE_FUNCTION_MAP_PARAM, name: "map", rule: "map-path" }
|
|
5064
|
+
],
|
|
5065
|
+
rowParamId: ONE_FUNCTION_DATA_PARAM,
|
|
5066
|
+
rowCardinality: "one",
|
|
5067
|
+
signature: (row) => ({
|
|
5068
|
+
params: [
|
|
5069
|
+
{
|
|
5070
|
+
id: ONE_FUNCTION_ID_PARAM,
|
|
5071
|
+
name: "id",
|
|
5072
|
+
dataType: { type: "string" },
|
|
5073
|
+
cardinality: "one",
|
|
5074
|
+
acceptsUndefined: true
|
|
5075
|
+
},
|
|
5076
|
+
{
|
|
5077
|
+
id: ONE_FUNCTION_DATA_PARAM,
|
|
5078
|
+
name: "data",
|
|
5079
|
+
dataType: row,
|
|
5080
|
+
cardinality: "one",
|
|
5081
|
+
acceptsUndefined: true
|
|
5082
|
+
},
|
|
5083
|
+
{
|
|
5084
|
+
id: ONE_FUNCTION_MAP_PARAM,
|
|
5085
|
+
name: "map",
|
|
5086
|
+
dataType: row,
|
|
5087
|
+
cardinality: "map",
|
|
5088
|
+
acceptsUndefined: true
|
|
5089
|
+
}
|
|
5090
|
+
],
|
|
5091
|
+
returnType: row,
|
|
5092
|
+
returnCardinality: "map"
|
|
5093
|
+
})
|
|
4960
5094
|
}
|
|
4961
5095
|
];
|
|
4962
5096
|
var ONE_FUNCTION_CATALOG = Object.fromEntries(ONE_FUNCTIONS.map((entry2) => [entry2.name, entry2]));
|
|
@@ -4970,10 +5104,22 @@ function oneFunctionArgFits(param, held, fromPath) {
|
|
|
4970
5104
|
if (!held) return false;
|
|
4971
5105
|
if (param.rule === "string-one")
|
|
4972
5106
|
return held.dataType.type === "string" && held.cardinality === "one";
|
|
4973
|
-
|
|
5107
|
+
if (param.rule === "row-one") return held.cardinality === "one";
|
|
5108
|
+
return fromPath && isKeyedCardinality(held.cardinality);
|
|
4974
5109
|
}
|
|
4975
|
-
|
|
4976
|
-
|
|
5110
|
+
var isKeyedCardinality = (cardinality) => cardinality === "map" || cardinality === "map-many";
|
|
5111
|
+
function listedSignature(entry2, signature) {
|
|
5112
|
+
return {
|
|
5113
|
+
...signature,
|
|
5114
|
+
params: signature.params.map(
|
|
5115
|
+
(param, index) => param.cardinality === "map" ? { ...param, cardinality: "map-many" } : entry2.params[index]?.rule === "row-one" ? { ...param, cardinality: "many" } : param
|
|
5116
|
+
),
|
|
5117
|
+
returnCardinality: !entry2.returnsRow ? signature.returnCardinality : signature.returnCardinality === "map" ? "map-many" : "many"
|
|
5118
|
+
};
|
|
5119
|
+
}
|
|
5120
|
+
var isListed = (entry2, cardinality) => entry2.returnsRow && (cardinality === "many" || cardinality === "map-many");
|
|
5121
|
+
function oneFunctionReturns(entry2, row, mapCardinality = "map") {
|
|
5122
|
+
const signature = mapCardinality === "map-many" ? listedSignature(entry2, entry2.signature(row)) : entry2.signature(row);
|
|
4977
5123
|
return {
|
|
4978
5124
|
dataType: signature.returnType,
|
|
4979
5125
|
cardinality: signature.returnCardinality,
|
|
@@ -4981,13 +5127,14 @@ function oneFunctionReturns(entry2, row) {
|
|
|
4981
5127
|
};
|
|
4982
5128
|
}
|
|
4983
5129
|
function oneFunctionSignature(entry2, returns) {
|
|
5130
|
+
const signature = entry2.signature(returns.dataType);
|
|
4984
5131
|
return {
|
|
4985
5132
|
id: "",
|
|
4986
5133
|
name: entry2.name,
|
|
4987
5134
|
// An entry answering a fixed type stores that type, not the row: its
|
|
4988
5135
|
// `map` is spelled `Record<string, unknown>` by the library, so the stand-in
|
|
4989
5136
|
// over the stored type reads the same at every reader.
|
|
4990
|
-
...entry2
|
|
5137
|
+
...isListed(entry2, returns.cardinality) ? listedSignature(entry2, signature) : signature,
|
|
4991
5138
|
body: ""
|
|
4992
5139
|
};
|
|
4993
5140
|
}
|
|
@@ -4995,9 +5142,10 @@ function oneFunctionSignatureText(entry2, rowLabel) {
|
|
|
4995
5142
|
const generic = entry2.returnsRow && !rowLabel;
|
|
4996
5143
|
const t = entry2.returnsRow ? rowLabel ?? "T" : "unknown";
|
|
4997
5144
|
const params = entry2.params.map(
|
|
4998
|
-
(param) => param.rule === "string-one" ? `${param.name}: string` : `${param.name}: Record<string, ${t}>`
|
|
5145
|
+
(param) => param.rule === "string-one" ? `${param.name}: string` : param.rule === "row-one" ? `${param.name}: ${t}` : `${param.name}: Record<string, ${t}>`
|
|
4999
5146
|
).join(", ");
|
|
5000
|
-
const
|
|
5147
|
+
const signature = entry2.signature({ type: "string" });
|
|
5148
|
+
const returns = !entry2.returnsRow ? "boolean" : signature.returnCardinality === "map" ? `Record<string, ${t}>` : `${t} | undefined`;
|
|
5001
5149
|
return `${entry2.name}${generic ? "<T>" : ""}(${params}): ${returns}`;
|
|
5002
5150
|
}
|
|
5003
5151
|
|
|
@@ -6289,6 +6437,20 @@ var BINDING_TRANSFORM_LEAVES = [
|
|
|
6289
6437
|
];
|
|
6290
6438
|
|
|
6291
6439
|
// libs/codegen/src/lib/outcome-transform-helper.ts
|
|
6440
|
+
var outcomeTransformOneFunction = (transform) => {
|
|
6441
|
+
const entry2 = oneFunctionOf(transform?.oneFunction);
|
|
6442
|
+
return entry2?.reach.includes("outcome-transform") ? entry2 : void 0;
|
|
6443
|
+
};
|
|
6444
|
+
function outcomeTransformFunction(transform, landing, functions) {
|
|
6445
|
+
if (!transform) return void 0;
|
|
6446
|
+
if (!transform.oneFunction) return functions[transform.functionId];
|
|
6447
|
+
const entry2 = outcomeTransformOneFunction(transform);
|
|
6448
|
+
if (!entry2 || !landing) return void 0;
|
|
6449
|
+
return oneFunctionSignature(entry2, {
|
|
6450
|
+
dataType: landing.dataType,
|
|
6451
|
+
cardinality: landing.cardinality
|
|
6452
|
+
});
|
|
6453
|
+
}
|
|
6292
6454
|
var statePathValue = (path, roots, shapes) => {
|
|
6293
6455
|
const [propertyId, ...keys] = path;
|
|
6294
6456
|
const property = roots[propertyId];
|
|
@@ -6360,7 +6522,8 @@ function outcomeTransformFailure(mapping, method, op, properties, shapes, functi
|
|
|
6360
6522
|
};
|
|
6361
6523
|
}
|
|
6362
6524
|
const property = properties[mapping.propertyId];
|
|
6363
|
-
const fn = functions
|
|
6525
|
+
const fn = outcomeTransformFunction(transform, property, functions);
|
|
6526
|
+
const one = outcomeTransformOneFunction(transform);
|
|
6364
6527
|
if (!property || !fn) {
|
|
6365
6528
|
return {
|
|
6366
6529
|
error: "emit-gap-outcome-transform-function",
|
|
@@ -6417,6 +6580,13 @@ function outcomeTransformFailure(mapping, method, op, properties, shapes, functi
|
|
|
6417
6580
|
}
|
|
6418
6581
|
continue;
|
|
6419
6582
|
}
|
|
6583
|
+
if (one?.params[index]?.rule === "map-path" && binding?.source !== "state") {
|
|
6584
|
+
return {
|
|
6585
|
+
error: "emit-gap-outcome-transform-source",
|
|
6586
|
+
paramIndex: index,
|
|
6587
|
+
detail: `${label} \u2014 bind a map the store holds`
|
|
6588
|
+
};
|
|
6589
|
+
}
|
|
6420
6590
|
const source = argValue(
|
|
6421
6591
|
binding,
|
|
6422
6592
|
mapping,
|
|
@@ -7119,7 +7289,11 @@ var BINDING_SLOT = {
|
|
|
7119
7289
|
// A [ScoreSet]'s Score Date, named for the `m-score-set` input it lands on.
|
|
7120
7290
|
// Content by the `total` test: whether the set reads stale *is* the datum's
|
|
7121
7291
|
// age, read off the same record its Scores are.
|
|
7122
|
-
scoreDate: "scoreDate"
|
|
7292
|
+
scoreDate: "scoreDate",
|
|
7293
|
+
// A [PriceLadder]'s forward estimate, named for the `m-price-ladder` input it
|
|
7294
|
+
// lands on. Content by the `total` test: the forecast *is* the datum. The
|
|
7295
|
+
// ladder's current price and a mark's level ride `value`.
|
|
7296
|
+
target: "target"
|
|
7123
7297
|
};
|
|
7124
7298
|
var USER_VALUE_SLOTS = [
|
|
7125
7299
|
BINDING_SLOT.id,
|
|
@@ -9771,248 +9945,6 @@ var parseCallArgEventKey = (raw) => {
|
|
|
9771
9945
|
return text2.startsWith("event.") ? text2.slice("event.".length).split(".").filter(Boolean) : text2.split(".").filter(Boolean);
|
|
9772
9946
|
};
|
|
9773
9947
|
|
|
9774
|
-
// libs/codegen/src/lib/output-call-helper.ts
|
|
9775
|
-
var OUTPUT_CALL_SEPARATOR = "|call:";
|
|
9776
|
-
var CALL_MAPS = [
|
|
9777
|
-
"outputs",
|
|
9778
|
-
"outputScreenMethods",
|
|
9779
|
-
"outputArgs",
|
|
9780
|
-
"outputOutcomes"
|
|
9781
|
-
];
|
|
9782
|
-
var outputCallKey = (group, callId) => `${group}${OUTPUT_CALL_SEPARATOR}${callId.trim()}`;
|
|
9783
|
-
var isOutputCallKey = (key2) => {
|
|
9784
|
-
const at = key2.indexOf(OUTPUT_CALL_SEPARATOR);
|
|
9785
|
-
return at > 0 && key2.length > at + OUTPUT_CALL_SEPARATOR.length;
|
|
9786
|
-
};
|
|
9787
|
-
var outputCallGroupKey = (key2) => isOutputCallKey(key2) ? key2.slice(0, key2.indexOf(OUTPUT_CALL_SEPARATOR)) : key2;
|
|
9788
|
-
var outputCallIdOf = (key2) => isOutputCallKey(key2) ? key2.slice(
|
|
9789
|
-
key2.indexOf(OUTPUT_CALL_SEPARATOR) + OUTPUT_CALL_SEPARATOR.length
|
|
9790
|
-
) : "";
|
|
9791
|
-
var wiredCallIds = (site, group) => {
|
|
9792
|
-
if (!site) return [];
|
|
9793
|
-
const ids = /* @__PURE__ */ new Set();
|
|
9794
|
-
CALL_MAPS.forEach(
|
|
9795
|
-
(map) => Object.keys(site[map] ?? {}).forEach((key2) => {
|
|
9796
|
-
if (isOutputCallKey(key2) && outputCallGroupKey(key2) === group)
|
|
9797
|
-
ids.add(outputCallIdOf(key2));
|
|
9798
|
-
})
|
|
9799
|
-
);
|
|
9800
|
-
return [...ids];
|
|
9801
|
-
};
|
|
9802
|
-
function outputCallIds(site, group) {
|
|
9803
|
-
const stored = site?.outputCalls?.[group] ?? [];
|
|
9804
|
-
const named = new Set(stored);
|
|
9805
|
-
const orphans = wiredCallIds(site, group).filter((id) => !named.has(id)).sort();
|
|
9806
|
-
return [...stored, ...orphans];
|
|
9807
|
-
}
|
|
9808
|
-
var outputCallKeys = (site, group) => [
|
|
9809
|
-
group,
|
|
9810
|
-
...outputCallIds(site, group).map((id) => outputCallKey(group, id))
|
|
9811
|
-
];
|
|
9812
|
-
var isOutputCallBound = (site, key2) => !!site?.outputs?.[key2] || !!site?.outputScreenMethods?.[key2];
|
|
9813
|
-
var outputCallLabel = (site, key2) => {
|
|
9814
|
-
if (!isOutputCallKey(key2)) return key2;
|
|
9815
|
-
const group = outputCallGroupKey(key2);
|
|
9816
|
-
const index = outputCallKeys(site, group).indexOf(key2);
|
|
9817
|
-
return `${group} \xB7 call ${index < 0 ? "?" : index + 1}`;
|
|
9818
|
-
};
|
|
9819
|
-
var outputCallGroups = (keys) => [
|
|
9820
|
-
...new Set([...keys].map(outputCallGroupKey))
|
|
9821
|
-
];
|
|
9822
|
-
var withCallIds = (control, group, ids) => {
|
|
9823
|
-
const { [group]: _dropped, ...rest } = control.outputCalls ?? {};
|
|
9824
|
-
const next = ids.length ? { ...rest, [group]: ids } : rest;
|
|
9825
|
-
return {
|
|
9826
|
-
...control,
|
|
9827
|
-
outputCalls: Object.keys(next).length ? next : void 0
|
|
9828
|
-
};
|
|
9829
|
-
};
|
|
9830
|
-
var callRowsAt = (control, key2) => {
|
|
9831
|
-
const held = {};
|
|
9832
|
-
CALL_MAPS.forEach((map) => {
|
|
9833
|
-
const rows = control[map];
|
|
9834
|
-
if (rows && key2 in rows) held[map] = rows[key2];
|
|
9835
|
-
});
|
|
9836
|
-
return held;
|
|
9837
|
-
};
|
|
9838
|
-
var writeCallRows = (control, bags) => {
|
|
9839
|
-
const next = { ...control };
|
|
9840
|
-
CALL_MAPS.forEach((map) => {
|
|
9841
|
-
const rows = { ...control[map] ?? {} };
|
|
9842
|
-
let touched = false;
|
|
9843
|
-
for (const [key2, bag] of bags) {
|
|
9844
|
-
if (key2 in rows) {
|
|
9845
|
-
delete rows[key2];
|
|
9846
|
-
touched = true;
|
|
9847
|
-
}
|
|
9848
|
-
if (bag && map in bag) {
|
|
9849
|
-
rows[key2] = bag[map];
|
|
9850
|
-
touched = true;
|
|
9851
|
-
}
|
|
9852
|
-
}
|
|
9853
|
-
if (!touched) return;
|
|
9854
|
-
next[map] = Object.keys(rows).length ? rows : void 0;
|
|
9855
|
-
});
|
|
9856
|
-
return next;
|
|
9857
|
-
};
|
|
9858
|
-
function mintOutputCall(control, group) {
|
|
9859
|
-
const callId = genId();
|
|
9860
|
-
return {
|
|
9861
|
-
control: withCallIds(control, group, [
|
|
9862
|
-
...outputCallIds(control, group),
|
|
9863
|
-
callId
|
|
9864
|
-
]),
|
|
9865
|
-
key: outputCallKey(group, callId)
|
|
9866
|
-
};
|
|
9867
|
-
}
|
|
9868
|
-
function removeOutputCall(control, key2) {
|
|
9869
|
-
const group = outputCallGroupKey(key2);
|
|
9870
|
-
const ids = outputCallIds(control, group);
|
|
9871
|
-
if (isOutputCallKey(key2)) {
|
|
9872
|
-
const callId = outputCallIdOf(key2);
|
|
9873
|
-
return withCallIds(
|
|
9874
|
-
writeCallRows(control, [[key2, void 0]]),
|
|
9875
|
-
group,
|
|
9876
|
-
ids.filter((id) => id !== callId)
|
|
9877
|
-
);
|
|
9878
|
-
}
|
|
9879
|
-
const [next, ...rest] = ids;
|
|
9880
|
-
if (!next) return writeCallRows(control, [[group, void 0]]);
|
|
9881
|
-
const promoted = outputCallKey(group, next);
|
|
9882
|
-
return withCallIds(
|
|
9883
|
-
writeCallRows(control, [
|
|
9884
|
-
[group, callRowsAt(control, promoted)],
|
|
9885
|
-
[promoted, void 0]
|
|
9886
|
-
]),
|
|
9887
|
-
group,
|
|
9888
|
-
rest
|
|
9889
|
-
);
|
|
9890
|
-
}
|
|
9891
|
-
function moveOutputCall(control, key2, delta) {
|
|
9892
|
-
const group = outputCallGroupKey(key2);
|
|
9893
|
-
const keys = outputCallKeys(control, group);
|
|
9894
|
-
const from = keys.indexOf(key2);
|
|
9895
|
-
if (from < 0) return control;
|
|
9896
|
-
const to = Math.min(Math.max(from + delta, 0), keys.length - 1);
|
|
9897
|
-
if (to === from) return control;
|
|
9898
|
-
const bags = keys.map((one) => callRowsAt(control, one));
|
|
9899
|
-
const [moved] = bags.splice(from, 1);
|
|
9900
|
-
bags.splice(to, 0, moved);
|
|
9901
|
-
return writeCallRows(
|
|
9902
|
-
control,
|
|
9903
|
-
keys.map((one, index) => [
|
|
9904
|
-
one,
|
|
9905
|
-
bags[index]
|
|
9906
|
-
])
|
|
9907
|
-
);
|
|
9908
|
-
}
|
|
9909
|
-
function moveOutputCallTo(control, key2, toGroup) {
|
|
9910
|
-
if (outputCallGroupKey(key2) === toGroup) return { control, key: key2 };
|
|
9911
|
-
const bag = callRowsAt(control, key2);
|
|
9912
|
-
const left = removeOutputCall(control, key2);
|
|
9913
|
-
const opensGroup = !isOutputCallBound(left, toGroup) && !Object.keys(callRowsAt(left, toGroup)).length && !outputCallIds(left, toGroup).length;
|
|
9914
|
-
if (opensGroup) {
|
|
9915
|
-
return { control: writeCallRows(left, [[toGroup, bag]]), key: toGroup };
|
|
9916
|
-
}
|
|
9917
|
-
const minted = mintOutputCall(left, toGroup);
|
|
9918
|
-
return {
|
|
9919
|
-
control: writeCallRows(minted.control, [[minted.key, bag]]),
|
|
9920
|
-
key: minted.key
|
|
9921
|
-
};
|
|
9922
|
-
}
|
|
9923
|
-
function moveOutputCallRows(control, from, to) {
|
|
9924
|
-
const ids = outputCallIds(control, from);
|
|
9925
|
-
if (!ids.length) return control;
|
|
9926
|
-
const moved = writeCallRows(
|
|
9927
|
-
control,
|
|
9928
|
-
ids.flatMap(
|
|
9929
|
-
(id) => [
|
|
9930
|
-
[outputCallKey(from, id), void 0],
|
|
9931
|
-
[outputCallKey(to, id), callRowsAt(control, outputCallKey(from, id))]
|
|
9932
|
-
]
|
|
9933
|
-
)
|
|
9934
|
-
);
|
|
9935
|
-
return withCallIds(withCallIds(moved, from, []), to, ids);
|
|
9936
|
-
}
|
|
9937
|
-
function clearOutputCallRows(control, group) {
|
|
9938
|
-
const ids = outputCallIds(control, group);
|
|
9939
|
-
if (!ids.length && !control.outputCalls?.[group]) return control;
|
|
9940
|
-
return withCallIds(
|
|
9941
|
-
writeCallRows(
|
|
9942
|
-
control,
|
|
9943
|
-
ids.map((id) => [
|
|
9944
|
-
outputCallKey(group, id),
|
|
9945
|
-
void 0
|
|
9946
|
-
])
|
|
9947
|
-
),
|
|
9948
|
-
group,
|
|
9949
|
-
[]
|
|
9950
|
-
);
|
|
9951
|
-
}
|
|
9952
|
-
function pruneOutputCalls(control) {
|
|
9953
|
-
const calls = control.outputCalls;
|
|
9954
|
-
if (!calls) return control;
|
|
9955
|
-
const next = {};
|
|
9956
|
-
for (const [group, ids] of Object.entries(calls)) {
|
|
9957
|
-
const kept = ids.filter(
|
|
9958
|
-
(id) => Object.keys(callRowsAt(control, outputCallKey(group, id))).length
|
|
9959
|
-
);
|
|
9960
|
-
if (kept.length) next[group] = kept;
|
|
9961
|
-
}
|
|
9962
|
-
return {
|
|
9963
|
-
...control,
|
|
9964
|
-
outputCalls: Object.keys(next).length ? next : void 0
|
|
9965
|
-
};
|
|
9966
|
-
}
|
|
9967
|
-
function screenOutputCallIds(site, outputId) {
|
|
9968
|
-
const stored = site?.screenOutputCalls?.[outputId] ?? [];
|
|
9969
|
-
const named = new Set(stored);
|
|
9970
|
-
const orphans = Object.keys(site?.screenOutputs ?? {}).filter(
|
|
9971
|
-
(key2) => isOutputCallKey(key2) && outputCallGroupKey(key2) === outputId
|
|
9972
|
-
).map(outputCallIdOf).filter((id) => !named.has(id)).sort();
|
|
9973
|
-
return [...stored, ...orphans];
|
|
9974
|
-
}
|
|
9975
|
-
var screenOutputCallKeys = (site, outputId) => [
|
|
9976
|
-
outputId,
|
|
9977
|
-
...screenOutputCallIds(site, outputId).map(
|
|
9978
|
-
(id) => outputCallKey(outputId, id)
|
|
9979
|
-
)
|
|
9980
|
-
];
|
|
9981
|
-
var withScreenOutputCallIds = (control, outputId, ids) => {
|
|
9982
|
-
const { [outputId]: _dropped, ...rest } = control.screenOutputCalls ?? {};
|
|
9983
|
-
const next = ids.length ? { ...rest, [outputId]: ids } : rest;
|
|
9984
|
-
return {
|
|
9985
|
-
...control,
|
|
9986
|
-
screenOutputCalls: Object.keys(next).length ? next : void 0
|
|
9987
|
-
};
|
|
9988
|
-
};
|
|
9989
|
-
function mintScreenOutputCall(control, outputId) {
|
|
9990
|
-
const callId = genId();
|
|
9991
|
-
return {
|
|
9992
|
-
control: withScreenOutputCallIds(control, outputId, [
|
|
9993
|
-
...screenOutputCallIds(control, outputId),
|
|
9994
|
-
callId
|
|
9995
|
-
]),
|
|
9996
|
-
key: outputCallKey(outputId, callId)
|
|
9997
|
-
};
|
|
9998
|
-
}
|
|
9999
|
-
function removeScreenOutputCall(control, key2) {
|
|
10000
|
-
if (!isOutputCallKey(key2)) return control;
|
|
10001
|
-
const outputId = outputCallGroupKey(key2);
|
|
10002
|
-
const callId = outputCallIdOf(key2);
|
|
10003
|
-
const { [key2]: _binding, ...outputs } = control.screenOutputs ?? {};
|
|
10004
|
-
const { [key2]: _outcome, ...outcomes } = control.screenOutputOutcomes ?? {};
|
|
10005
|
-
return withScreenOutputCallIds(
|
|
10006
|
-
{
|
|
10007
|
-
...control,
|
|
10008
|
-
screenOutputs: Object.keys(outputs).length ? outputs : void 0,
|
|
10009
|
-
screenOutputOutcomes: Object.keys(outcomes).length ? outcomes : void 0
|
|
10010
|
-
},
|
|
10011
|
-
outputId,
|
|
10012
|
-
screenOutputCallIds(control, outputId).filter((id) => id !== callId)
|
|
10013
|
-
);
|
|
10014
|
-
}
|
|
10015
|
-
|
|
10016
9948
|
// libs/codegen/src/lib/screen-codegen.ts
|
|
10017
9949
|
var embeddedRefOf = (node, ctx) => {
|
|
10018
9950
|
if (node.handRef) return ctx.handRef?.(node.handRef);
|
|
@@ -10205,7 +10137,7 @@ function screenControlInputGuards(node, ctx, renderBinding = () => void 0, bindi
|
|
|
10205
10137
|
}
|
|
10206
10138
|
return [...guards.values()];
|
|
10207
10139
|
}
|
|
10208
|
-
function screenControlAttrs(node, ctx, wires,
|
|
10140
|
+
function screenControlAttrs(node, ctx, wires, renderBinding = () => void 0, inputAliases = /* @__PURE__ */ new Map(), readSource = () => ({
|
|
10209
10141
|
cardinality: void 0,
|
|
10210
10142
|
present: true
|
|
10211
10143
|
})) {
|
|
@@ -10228,49 +10160,6 @@ function screenControlAttrs(node, ctx, wires, renderMethodCall, renderStateWrite
|
|
|
10228
10160
|
const push = (outputName, statement) => {
|
|
10229
10161
|
handlers.set(outputName, [...handlers.get(outputName) ?? [], statement]);
|
|
10230
10162
|
};
|
|
10231
|
-
const writtenOutputs = /* @__PURE__ */ new Set([
|
|
10232
|
-
...Object.keys(node.screenOutputScreenWrites ?? {}),
|
|
10233
|
-
...Object.keys(node.screenOutputWrites ?? {}),
|
|
10234
|
-
...Object.keys(node.screenOutputEmits ?? {})
|
|
10235
|
-
]);
|
|
10236
|
-
for (const outputId of writtenOutputs) {
|
|
10237
|
-
const output = ref.outputs[outputId];
|
|
10238
|
-
if (!output) continue;
|
|
10239
|
-
const payload = output.payload ? output.payload.dataType : "void";
|
|
10240
|
-
for (const statement of renderScreenWrites(node, outputId, payload)) {
|
|
10241
|
-
push(output.name, statement);
|
|
10242
|
-
}
|
|
10243
|
-
for (const statement of renderScreenEmits(node, outputId, payload)) {
|
|
10244
|
-
push(output.name, statement);
|
|
10245
|
-
}
|
|
10246
|
-
const patch = renderStateWrite(node, outputId, payload);
|
|
10247
|
-
if (patch) push(output.name, patch);
|
|
10248
|
-
}
|
|
10249
|
-
for (const outputId of outputCallGroups(
|
|
10250
|
-
Object.keys(node.screenOutputs ?? {})
|
|
10251
|
-
)) {
|
|
10252
|
-
const output = ref.outputs[outputId];
|
|
10253
|
-
if (!output) continue;
|
|
10254
|
-
for (const key2 of screenOutputCallKeys(node, outputId)) {
|
|
10255
|
-
const binding = node.screenOutputs?.[key2];
|
|
10256
|
-
if (!binding) continue;
|
|
10257
|
-
if (binding.kind === "output") {
|
|
10258
|
-
const own = (ctx.outputs ?? {})[binding.outputId];
|
|
10259
|
-
if (own)
|
|
10260
|
-
push(
|
|
10261
|
-
output.name,
|
|
10262
|
-
`${own.name}.emit(${output.payload ? "$event" : ""})`
|
|
10263
|
-
);
|
|
10264
|
-
continue;
|
|
10265
|
-
}
|
|
10266
|
-
const call = renderMethodCall(
|
|
10267
|
-
binding.methodId,
|
|
10268
|
-
output.name,
|
|
10269
|
-
binding.args
|
|
10270
|
-
);
|
|
10271
|
-
if (call) push(output.name, call);
|
|
10272
|
-
}
|
|
10273
|
-
}
|
|
10274
10163
|
for (const wire of wires.values()) {
|
|
10275
10164
|
if (wire.controlId !== node.id) continue;
|
|
10276
10165
|
const output = ref.outputs[wire.outputId];
|
|
@@ -10656,15 +10545,13 @@ function everyScreenWrite(control) {
|
|
|
10656
10545
|
const from = (map) => Object.keys(map ?? {}).flatMap((key2) => screenWriteRows(map, key2));
|
|
10657
10546
|
return [
|
|
10658
10547
|
...from(control.outputScreenWrites),
|
|
10659
|
-
...from(control.screenOutputScreenWrites),
|
|
10660
10548
|
...armScreenWrites(control)
|
|
10661
10549
|
];
|
|
10662
10550
|
}
|
|
10663
10551
|
function armScreenWrites(control) {
|
|
10664
10552
|
return [
|
|
10665
10553
|
...[
|
|
10666
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
10667
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
10554
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
10668
10555
|
].flatMap((outcome) => [
|
|
10669
10556
|
...outcome.success?.screenWrites ?? [],
|
|
10670
10557
|
...outcome.denied?.screenWrites ?? [],
|
|
@@ -10980,15 +10867,13 @@ function everyStateWrite(control) {
|
|
|
10980
10867
|
const from = (map) => Object.keys(map ?? {}).flatMap((key2) => stateWriteRows(map, key2));
|
|
10981
10868
|
return [
|
|
10982
10869
|
...from(control.outputWrites),
|
|
10983
|
-
...from(control.screenOutputWrites),
|
|
10984
10870
|
...armStateWrites(control)
|
|
10985
10871
|
];
|
|
10986
10872
|
}
|
|
10987
10873
|
function armStateWrites(control) {
|
|
10988
10874
|
return [
|
|
10989
10875
|
...[
|
|
10990
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
10991
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
10876
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
10992
10877
|
].flatMap((outcome) => [
|
|
10993
10878
|
...outcome.success?.writes ?? [],
|
|
10994
10879
|
...outcome.denied?.writes ?? [],
|
|
@@ -11049,6 +10934,200 @@ function stampStatePropertyEnums(properties, controlMaps) {
|
|
|
11049
10934
|
return changed ? next : properties;
|
|
11050
10935
|
}
|
|
11051
10936
|
|
|
10937
|
+
// libs/codegen/src/lib/output-call-helper.ts
|
|
10938
|
+
var OUTPUT_CALL_SEPARATOR = "|call:";
|
|
10939
|
+
var CALL_MAPS = [
|
|
10940
|
+
"outputs",
|
|
10941
|
+
"outputScreenMethods",
|
|
10942
|
+
"outputArgs",
|
|
10943
|
+
"outputOutcomes"
|
|
10944
|
+
];
|
|
10945
|
+
var outputCallKey = (group, callId) => `${group}${OUTPUT_CALL_SEPARATOR}${callId.trim()}`;
|
|
10946
|
+
var isOutputCallKey = (key2) => {
|
|
10947
|
+
const at = key2.indexOf(OUTPUT_CALL_SEPARATOR);
|
|
10948
|
+
return at > 0 && key2.length > at + OUTPUT_CALL_SEPARATOR.length;
|
|
10949
|
+
};
|
|
10950
|
+
var outputCallGroupKey = (key2) => isOutputCallKey(key2) ? key2.slice(0, key2.indexOf(OUTPUT_CALL_SEPARATOR)) : key2;
|
|
10951
|
+
var outputCallIdOf = (key2) => isOutputCallKey(key2) ? key2.slice(
|
|
10952
|
+
key2.indexOf(OUTPUT_CALL_SEPARATOR) + OUTPUT_CALL_SEPARATOR.length
|
|
10953
|
+
) : "";
|
|
10954
|
+
var wiredCallIds = (site, group) => {
|
|
10955
|
+
if (!site) return [];
|
|
10956
|
+
const ids = /* @__PURE__ */ new Set();
|
|
10957
|
+
CALL_MAPS.forEach(
|
|
10958
|
+
(map) => Object.keys(site[map] ?? {}).forEach((key2) => {
|
|
10959
|
+
if (isOutputCallKey(key2) && outputCallGroupKey(key2) === group)
|
|
10960
|
+
ids.add(outputCallIdOf(key2));
|
|
10961
|
+
})
|
|
10962
|
+
);
|
|
10963
|
+
return [...ids];
|
|
10964
|
+
};
|
|
10965
|
+
function outputCallIds(site, group) {
|
|
10966
|
+
const stored = site?.outputCalls?.[group] ?? [];
|
|
10967
|
+
const named = new Set(stored);
|
|
10968
|
+
const orphans = wiredCallIds(site, group).filter((id) => !named.has(id)).sort();
|
|
10969
|
+
return [...stored, ...orphans];
|
|
10970
|
+
}
|
|
10971
|
+
var outputCallKeys = (site, group) => [
|
|
10972
|
+
group,
|
|
10973
|
+
...outputCallIds(site, group).map((id) => outputCallKey(group, id))
|
|
10974
|
+
];
|
|
10975
|
+
var isOutputCallBound = (site, key2) => !!site?.outputs?.[key2] || !!site?.outputScreenMethods?.[key2];
|
|
10976
|
+
var outputCallLabel = (site, key2) => {
|
|
10977
|
+
if (!isOutputCallKey(key2)) return key2;
|
|
10978
|
+
const group = outputCallGroupKey(key2);
|
|
10979
|
+
const index = outputCallKeys(site, group).indexOf(key2);
|
|
10980
|
+
return `${group} \xB7 call ${index < 0 ? "?" : index + 1}`;
|
|
10981
|
+
};
|
|
10982
|
+
var outputCallGroups = (keys) => [
|
|
10983
|
+
...new Set([...keys].map(outputCallGroupKey))
|
|
10984
|
+
];
|
|
10985
|
+
var withCallIds = (control, group, ids) => {
|
|
10986
|
+
const { [group]: _dropped, ...rest } = control.outputCalls ?? {};
|
|
10987
|
+
const next = ids.length ? { ...rest, [group]: ids } : rest;
|
|
10988
|
+
return {
|
|
10989
|
+
...control,
|
|
10990
|
+
outputCalls: Object.keys(next).length ? next : void 0
|
|
10991
|
+
};
|
|
10992
|
+
};
|
|
10993
|
+
var callRowsAt = (control, key2) => {
|
|
10994
|
+
const held = {};
|
|
10995
|
+
CALL_MAPS.forEach((map) => {
|
|
10996
|
+
const rows = control[map];
|
|
10997
|
+
if (rows && key2 in rows) held[map] = rows[key2];
|
|
10998
|
+
});
|
|
10999
|
+
return held;
|
|
11000
|
+
};
|
|
11001
|
+
var writeCallRows = (control, bags) => {
|
|
11002
|
+
const next = { ...control };
|
|
11003
|
+
CALL_MAPS.forEach((map) => {
|
|
11004
|
+
const rows = { ...control[map] ?? {} };
|
|
11005
|
+
let touched = false;
|
|
11006
|
+
for (const [key2, bag] of bags) {
|
|
11007
|
+
if (key2 in rows) {
|
|
11008
|
+
delete rows[key2];
|
|
11009
|
+
touched = true;
|
|
11010
|
+
}
|
|
11011
|
+
if (bag && map in bag) {
|
|
11012
|
+
rows[key2] = bag[map];
|
|
11013
|
+
touched = true;
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
if (!touched) return;
|
|
11017
|
+
next[map] = Object.keys(rows).length ? rows : void 0;
|
|
11018
|
+
});
|
|
11019
|
+
return next;
|
|
11020
|
+
};
|
|
11021
|
+
function mintOutputCall(control, group) {
|
|
11022
|
+
const callId = genId();
|
|
11023
|
+
return {
|
|
11024
|
+
control: withCallIds(control, group, [
|
|
11025
|
+
...outputCallIds(control, group),
|
|
11026
|
+
callId
|
|
11027
|
+
]),
|
|
11028
|
+
key: outputCallKey(group, callId)
|
|
11029
|
+
};
|
|
11030
|
+
}
|
|
11031
|
+
function removeOutputCall(control, key2) {
|
|
11032
|
+
const group = outputCallGroupKey(key2);
|
|
11033
|
+
const ids = outputCallIds(control, group);
|
|
11034
|
+
if (isOutputCallKey(key2)) {
|
|
11035
|
+
const callId = outputCallIdOf(key2);
|
|
11036
|
+
return withCallIds(
|
|
11037
|
+
writeCallRows(control, [[key2, void 0]]),
|
|
11038
|
+
group,
|
|
11039
|
+
ids.filter((id) => id !== callId)
|
|
11040
|
+
);
|
|
11041
|
+
}
|
|
11042
|
+
const [next, ...rest] = ids;
|
|
11043
|
+
if (!next) return writeCallRows(control, [[group, void 0]]);
|
|
11044
|
+
const promoted = outputCallKey(group, next);
|
|
11045
|
+
return withCallIds(
|
|
11046
|
+
writeCallRows(control, [
|
|
11047
|
+
[group, callRowsAt(control, promoted)],
|
|
11048
|
+
[promoted, void 0]
|
|
11049
|
+
]),
|
|
11050
|
+
group,
|
|
11051
|
+
rest
|
|
11052
|
+
);
|
|
11053
|
+
}
|
|
11054
|
+
function moveOutputCall(control, key2, delta) {
|
|
11055
|
+
const group = outputCallGroupKey(key2);
|
|
11056
|
+
const keys = outputCallKeys(control, group);
|
|
11057
|
+
const from = keys.indexOf(key2);
|
|
11058
|
+
if (from < 0) return control;
|
|
11059
|
+
const to = Math.min(Math.max(from + delta, 0), keys.length - 1);
|
|
11060
|
+
if (to === from) return control;
|
|
11061
|
+
const bags = keys.map((one) => callRowsAt(control, one));
|
|
11062
|
+
const [moved] = bags.splice(from, 1);
|
|
11063
|
+
bags.splice(to, 0, moved);
|
|
11064
|
+
return writeCallRows(
|
|
11065
|
+
control,
|
|
11066
|
+
keys.map((one, index) => [
|
|
11067
|
+
one,
|
|
11068
|
+
bags[index]
|
|
11069
|
+
])
|
|
11070
|
+
);
|
|
11071
|
+
}
|
|
11072
|
+
function moveOutputCallTo(control, key2, toGroup) {
|
|
11073
|
+
if (outputCallGroupKey(key2) === toGroup) return { control, key: key2 };
|
|
11074
|
+
const bag = callRowsAt(control, key2);
|
|
11075
|
+
const left = removeOutputCall(control, key2);
|
|
11076
|
+
const opensGroup = !isOutputCallBound(left, toGroup) && !Object.keys(callRowsAt(left, toGroup)).length && !outputCallIds(left, toGroup).length;
|
|
11077
|
+
if (opensGroup) {
|
|
11078
|
+
return { control: writeCallRows(left, [[toGroup, bag]]), key: toGroup };
|
|
11079
|
+
}
|
|
11080
|
+
const minted = mintOutputCall(left, toGroup);
|
|
11081
|
+
return {
|
|
11082
|
+
control: writeCallRows(minted.control, [[minted.key, bag]]),
|
|
11083
|
+
key: minted.key
|
|
11084
|
+
};
|
|
11085
|
+
}
|
|
11086
|
+
function moveOutputCallRows(control, from, to) {
|
|
11087
|
+
const ids = outputCallIds(control, from);
|
|
11088
|
+
if (!ids.length) return control;
|
|
11089
|
+
const moved = writeCallRows(
|
|
11090
|
+
control,
|
|
11091
|
+
ids.flatMap(
|
|
11092
|
+
(id) => [
|
|
11093
|
+
[outputCallKey(from, id), void 0],
|
|
11094
|
+
[outputCallKey(to, id), callRowsAt(control, outputCallKey(from, id))]
|
|
11095
|
+
]
|
|
11096
|
+
)
|
|
11097
|
+
);
|
|
11098
|
+
return withCallIds(withCallIds(moved, from, []), to, ids);
|
|
11099
|
+
}
|
|
11100
|
+
function clearOutputCallRows(control, group) {
|
|
11101
|
+
const ids = outputCallIds(control, group);
|
|
11102
|
+
if (!ids.length && !control.outputCalls?.[group]) return control;
|
|
11103
|
+
return withCallIds(
|
|
11104
|
+
writeCallRows(
|
|
11105
|
+
control,
|
|
11106
|
+
ids.map((id) => [
|
|
11107
|
+
outputCallKey(group, id),
|
|
11108
|
+
void 0
|
|
11109
|
+
])
|
|
11110
|
+
),
|
|
11111
|
+
group,
|
|
11112
|
+
[]
|
|
11113
|
+
);
|
|
11114
|
+
}
|
|
11115
|
+
function pruneOutputCalls(control) {
|
|
11116
|
+
const calls = control.outputCalls;
|
|
11117
|
+
if (!calls) return control;
|
|
11118
|
+
const next = {};
|
|
11119
|
+
for (const [group, ids] of Object.entries(calls)) {
|
|
11120
|
+
const kept = ids.filter(
|
|
11121
|
+
(id) => Object.keys(callRowsAt(control, outputCallKey(group, id))).length
|
|
11122
|
+
);
|
|
11123
|
+
if (kept.length) next[group] = kept;
|
|
11124
|
+
}
|
|
11125
|
+
return {
|
|
11126
|
+
...control,
|
|
11127
|
+
outputCalls: Object.keys(next).length ? next : void 0
|
|
11128
|
+
};
|
|
11129
|
+
}
|
|
11130
|
+
|
|
11052
11131
|
// libs/codegen/src/lib/output-arm-helper.ts
|
|
11053
11132
|
var OUTPUT_ARM_SEPARATOR = "|arm:";
|
|
11054
11133
|
var outputArmKey = (output, armId) => `${output}${OUTPUT_ARM_SEPARATOR}${armId.trim()}`;
|
|
@@ -13142,7 +13221,7 @@ function responsePathAt(response, source) {
|
|
|
13142
13221
|
const key2 = source.join(".");
|
|
13143
13222
|
return responsePaths(response).find((p2) => p2.label === key2);
|
|
13144
13223
|
}
|
|
13145
|
-
function importShapes(dataType, from, existing, mintId, overwriteExisting = false, reachable = {}) {
|
|
13224
|
+
function importShapes(dataType, from, existing, mintId, overwriteExisting = false, reachable = {}, heldShapeId) {
|
|
13146
13225
|
const shapes = { ...existing };
|
|
13147
13226
|
const byName = new Map(
|
|
13148
13227
|
[...Object.values(reachable), ...Object.values(shapes)].map((shape) => [
|
|
@@ -13151,7 +13230,7 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
|
|
|
13151
13230
|
])
|
|
13152
13231
|
);
|
|
13153
13232
|
const pool = () => ({ ...reachable, ...shapes });
|
|
13154
|
-
const importOne = (shapeId) => {
|
|
13233
|
+
const importOne = (shapeId, held) => {
|
|
13155
13234
|
if (reachable[shapeId] && from[shapeId] === reachable[shapeId]) {
|
|
13156
13235
|
return shapeId;
|
|
13157
13236
|
}
|
|
@@ -13183,7 +13262,8 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
|
|
|
13183
13262
|
from
|
|
13184
13263
|
)
|
|
13185
13264
|
)?.id;
|
|
13186
|
-
const
|
|
13265
|
+
const kept = overwriteExisting && held && candidates[held] ? held : void 0;
|
|
13266
|
+
const reused = byOrigin ?? kept ?? structural ?? named;
|
|
13187
13267
|
if (reused && (!overwriteExisting || reachable[reused])) return reused;
|
|
13188
13268
|
const id2 = reused ?? mintId();
|
|
13189
13269
|
const heldKeys = shapes[id2]?.keys ?? [];
|
|
@@ -13203,7 +13283,11 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
|
|
|
13203
13283
|
shape.keys.push({ ...key2, id: heldId(key2.name) });
|
|
13204
13284
|
continue;
|
|
13205
13285
|
}
|
|
13206
|
-
const
|
|
13286
|
+
const heldKey = heldKeys.find((k) => k.name === key2.name);
|
|
13287
|
+
const nested = importOne(
|
|
13288
|
+
key2.dataType.shapeId,
|
|
13289
|
+
heldKey?.dataType.type === "shape" ? heldKey.dataType.shapeId : void 0
|
|
13290
|
+
);
|
|
13207
13291
|
if (!nested) continue;
|
|
13208
13292
|
shape.keys.push({
|
|
13209
13293
|
id: heldId(key2.name),
|
|
@@ -13215,7 +13299,7 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
|
|
|
13215
13299
|
return id2;
|
|
13216
13300
|
};
|
|
13217
13301
|
if (dataType?.type !== "shape") return { dataType, shapes };
|
|
13218
|
-
const id = importOne(dataType.shapeId);
|
|
13302
|
+
const id = importOne(dataType.shapeId, heldShapeId);
|
|
13219
13303
|
return {
|
|
13220
13304
|
dataType: id ? { type: "shape", shapeId: id } : void 0,
|
|
13221
13305
|
shapes
|
|
@@ -15349,8 +15433,7 @@ function setArmDialog(arm, dialog) {
|
|
|
15349
15433
|
}
|
|
15350
15434
|
function denialTranslationKeys(controls) {
|
|
15351
15435
|
return Object.values(controls).flatMap((control) => [
|
|
15352
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
15353
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
15436
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
15354
15437
|
]).flatMap((outcome) => {
|
|
15355
15438
|
const dialog = outcome?.denied?.dialog;
|
|
15356
15439
|
return dialog ? [dialog.header, dialog.body, dialog.confirmLabel] : [];
|
|
@@ -15358,8 +15441,7 @@ function denialTranslationKeys(controls) {
|
|
|
15358
15441
|
}
|
|
15359
15442
|
function controlDrawsDenial(control) {
|
|
15360
15443
|
return [
|
|
15361
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
15362
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
15444
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
15363
15445
|
].some((outcome) => armHasRows(outcome?.denied));
|
|
15364
15446
|
}
|
|
15365
15447
|
function isOutcomeReportDrawn(report) {
|
|
@@ -15386,8 +15468,7 @@ function armClosesOverlay(outcomes, key2, arm) {
|
|
|
15386
15468
|
}
|
|
15387
15469
|
function controlUsesOverlayRef(control) {
|
|
15388
15470
|
const outcomes = [
|
|
15389
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
15390
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
15471
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
15391
15472
|
];
|
|
15392
15473
|
return outcomes.some(
|
|
15393
15474
|
(outcome) => OUTCOME_ARMS.some(
|
|
@@ -15438,8 +15519,7 @@ function validateFormResets(controls, rows, models = {}) {
|
|
|
15438
15519
|
}
|
|
15439
15520
|
function everyFormReset(control) {
|
|
15440
15521
|
return [
|
|
15441
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
15442
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
15522
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
15443
15523
|
].flatMap(
|
|
15444
15524
|
(outcome) => OUTCOME_ARMS.flatMap((arm) => outcome[arm]?.formResets ?? [])
|
|
15445
15525
|
);
|
|
@@ -15502,15 +15582,6 @@ function methodArms(controlMaps) {
|
|
|
15502
15582
|
)) {
|
|
15503
15583
|
mark(control.outputs?.[output], outcome);
|
|
15504
15584
|
}
|
|
15505
|
-
for (const [outputId, outcome] of Object.entries(
|
|
15506
|
-
control.screenOutputOutcomes ?? {}
|
|
15507
|
-
)) {
|
|
15508
|
-
const binding = control.screenOutputs?.[outputId];
|
|
15509
|
-
mark(
|
|
15510
|
-
binding?.kind === "method" ? binding.methodId : void 0,
|
|
15511
|
-
outcome
|
|
15512
|
-
);
|
|
15513
|
-
}
|
|
15514
15585
|
}
|
|
15515
15586
|
}
|
|
15516
15587
|
return arms;
|
|
@@ -16051,7 +16122,7 @@ function landingGate(method, op, codes, subject, cast, roots, shapes, functions,
|
|
|
16051
16122
|
}
|
|
16052
16123
|
};
|
|
16053
16124
|
}
|
|
16054
|
-
function patchLiteral(mappings, properties, shapes, functions, subject, cast = false, roots = properties, taken = /* @__PURE__ */ new Set(), receiverOf = OWN_STORE, gate = NO_GATE, stateType) {
|
|
16125
|
+
function patchLiteral(mappings, properties, shapes, functions, subject, cast = false, roots = properties, taken = /* @__PURE__ */ new Set(), receiverOf = OWN_STORE, gate = NO_GATE, stateType, oneFunctionNames = /* @__PURE__ */ new Set()) {
|
|
16055
16126
|
const declarations = [];
|
|
16056
16127
|
if (gate.declaration) declarations.push(gate.declaration);
|
|
16057
16128
|
const hoisted = /* @__PURE__ */ new Map();
|
|
@@ -16060,8 +16131,18 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
|
|
|
16060
16131
|
if (!property) return void 0;
|
|
16061
16132
|
const receiver = receiverOf(mapping.propertyId);
|
|
16062
16133
|
if (mapping.transform) {
|
|
16063
|
-
const fn =
|
|
16134
|
+
const fn = outcomeTransformFunction(
|
|
16135
|
+
mapping.transform,
|
|
16136
|
+
property,
|
|
16137
|
+
functions
|
|
16138
|
+
);
|
|
16064
16139
|
if (!fn) return void 0;
|
|
16140
|
+
const typeArgs = mapping.transform.oneFunction ? `<${tsTypeExpression(
|
|
16141
|
+
shapes,
|
|
16142
|
+
property.dataType,
|
|
16143
|
+
property.cardinality === "map-many" ? "many" : "one"
|
|
16144
|
+
)}>` : "";
|
|
16145
|
+
if (mapping.transform.oneFunction) oneFunctionNames.add(fn.name);
|
|
16065
16146
|
const args = mapping.transform.args.map((binding, index) => {
|
|
16066
16147
|
if (binding.source === "response") {
|
|
16067
16148
|
return binding.path.length ? {
|
|
@@ -16120,7 +16201,7 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
|
|
|
16120
16201
|
}
|
|
16121
16202
|
locals.set(index, local);
|
|
16122
16203
|
});
|
|
16123
|
-
const call = `${fn.name}(${args.map((arg, index) => locals.get(index) ?? arg.expression).join(", ")})`;
|
|
16204
|
+
const call = `${fn.name}${typeArgs}(${args.map((arg, index) => locals.get(index) ?? arg.expression).join(", ")})`;
|
|
16124
16205
|
if (!locals.size) return { receiver, key: property.name, value: call };
|
|
16125
16206
|
const guard = [...new Set(locals.values())].map((local) => `${local} === undefined`).join(" || ");
|
|
16126
16207
|
const passTerms = [...new Set(locals.values())].map(
|
|
@@ -16661,7 +16742,8 @@ function generateStoreMethods(methods, operationOf, properties, shapes, function
|
|
|
16661
16742
|
taken,
|
|
16662
16743
|
receiverOf,
|
|
16663
16744
|
okGate,
|
|
16664
|
-
stateType
|
|
16745
|
+
stateType,
|
|
16746
|
+
oneFunctionNames
|
|
16665
16747
|
);
|
|
16666
16748
|
const beforePersists = persistStatements(
|
|
16667
16749
|
method,
|
|
@@ -16724,7 +16806,8 @@ function generateStoreMethods(methods, operationOf, properties, shapes, function
|
|
|
16724
16806
|
taken,
|
|
16725
16807
|
receiverOf,
|
|
16726
16808
|
gate,
|
|
16727
|
-
stateType
|
|
16809
|
+
stateType,
|
|
16810
|
+
oneFunctionNames
|
|
16728
16811
|
);
|
|
16729
16812
|
if (!patch.statements.length) continue;
|
|
16730
16813
|
const { type, shapeId } = errorBodyType(
|
|
@@ -17544,8 +17627,7 @@ function outcomeReadsArgs(outcome) {
|
|
|
17544
17627
|
var within = (navId, root) => !!navId && (navId === root || navId.startsWith(`${root}${NAV_ID_SEP2}`));
|
|
17545
17628
|
function controlNavReferences(control) {
|
|
17546
17629
|
const outcomes = [
|
|
17547
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
17548
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
17630
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
17549
17631
|
];
|
|
17550
17632
|
const navs = [
|
|
17551
17633
|
...outcomes.flatMap(
|
|
@@ -17574,8 +17656,7 @@ function controlNavReferences(control) {
|
|
|
17574
17656
|
function remapControlNavs(control, remap) {
|
|
17575
17657
|
const navs = [
|
|
17576
17658
|
...[
|
|
17577
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
17578
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
17659
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
17579
17660
|
].flatMap((outcome2) => OUTCOME_ARMS.map((arm) => outcome2?.[arm]?.nav)),
|
|
17580
17661
|
...Object.values(control.outputNavs ?? {})
|
|
17581
17662
|
];
|
|
@@ -17611,7 +17692,6 @@ function remapControlNavs(control, remap) {
|
|
|
17611
17692
|
return {
|
|
17612
17693
|
...control,
|
|
17613
17694
|
...control.outputOutcomes ? { outputOutcomes: each(control.outputOutcomes, outcome) } : {},
|
|
17614
|
-
...control.screenOutputOutcomes ? { screenOutputOutcomes: each(control.screenOutputOutcomes, outcome) } : {},
|
|
17615
17695
|
...control.outputNavs ? { outputNavs: each(control.outputNavs, nav) } : {},
|
|
17616
17696
|
...control.outputNewTabs ? {
|
|
17617
17697
|
outputNewTabs: each(
|
|
@@ -17907,11 +17987,6 @@ function buildTree(controlMap, rootControlIds, selection) {
|
|
|
17907
17987
|
// Carried for `screenId`'s reason: the Canvas draws the embed's box at
|
|
17908
17988
|
// it and codegen emits it on the tag.
|
|
17909
17989
|
...ctrl.maxWidth ? { maxWidth: ctrl.maxWidth } : {},
|
|
17910
|
-
...ctrl.screenOutputs && Object.keys(ctrl.screenOutputs).length ? { screenOutputs: ctrl.screenOutputs } : {},
|
|
17911
|
-
...ctrl.screenOutputCalls && Object.keys(ctrl.screenOutputCalls).length ? { screenOutputCalls: ctrl.screenOutputCalls } : {},
|
|
17912
|
-
...ctrl.screenOutputWrites && Object.keys(ctrl.screenOutputWrites).length ? { screenOutputWrites: ctrl.screenOutputWrites } : {},
|
|
17913
|
-
...ctrl.screenOutputEmits && Object.keys(ctrl.screenOutputEmits).length ? { screenOutputEmits: ctrl.screenOutputEmits } : {},
|
|
17914
|
-
...ctrl.screenOutputScreenWrites && Object.keys(ctrl.screenOutputScreenWrites).length ? { screenOutputScreenWrites: ctrl.screenOutputScreenWrites } : {},
|
|
17915
17990
|
...ctrl.checks?.length ? { checks: ctrl.checks } : {},
|
|
17916
17991
|
...ctrl.formatPipes?.length ? { formatPipes: ctrl.formatPipes } : {},
|
|
17917
17992
|
...ctrl.cards ? { cards: ctrl.cards } : {},
|
|
@@ -19354,15 +19429,13 @@ function everyScreenEmit(control) {
|
|
|
19354
19429
|
const from = (map) => Object.keys(map ?? {}).flatMap((key2) => screenEmitRows(map, key2));
|
|
19355
19430
|
return [
|
|
19356
19431
|
...from(control.outputEmits),
|
|
19357
|
-
...from(control.screenOutputEmits),
|
|
19358
19432
|
...armScreenEmits(control)
|
|
19359
19433
|
];
|
|
19360
19434
|
}
|
|
19361
19435
|
function armScreenEmits(control) {
|
|
19362
19436
|
return [
|
|
19363
19437
|
...[
|
|
19364
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
19365
|
-
...Object.values(control.screenOutputOutcomes ?? {})
|
|
19438
|
+
...Object.values(control.outputOutcomes ?? {})
|
|
19366
19439
|
].flatMap((outcome) => [
|
|
19367
19440
|
...outcome.success?.emits ?? [],
|
|
19368
19441
|
...outcome.denied?.emits ?? [],
|
|
@@ -19391,9 +19464,6 @@ function countScreenOutputReferences(controls, outputId) {
|
|
|
19391
19464
|
count += everyScreenEmit(control).filter(
|
|
19392
19465
|
(row) => row.outputId === outputId
|
|
19393
19466
|
).length;
|
|
19394
|
-
for (const binding of Object.values(control.screenOutputs ?? {})) {
|
|
19395
|
-
if (binding.kind === "output" && binding.outputId === outputId) count++;
|
|
19396
|
-
}
|
|
19397
19467
|
}
|
|
19398
19468
|
return count;
|
|
19399
19469
|
}
|
|
@@ -20906,6 +20976,20 @@ var SCORE_SET_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
|
|
|
20906
20976
|
...NUMBER_ONLY_KEYS,
|
|
20907
20977
|
"staleAfterDays"
|
|
20908
20978
|
]);
|
|
20979
|
+
var PRICE_LADDER_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
|
|
20980
|
+
...NUMBER_ONLY_KEYS,
|
|
20981
|
+
"value",
|
|
20982
|
+
"target",
|
|
20983
|
+
"targetLow",
|
|
20984
|
+
"targetHigh",
|
|
20985
|
+
"maxSpanPct"
|
|
20986
|
+
]);
|
|
20987
|
+
var PRICE_LADDER_MARK_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
|
|
20988
|
+
...NUMBER_ONLY_KEYS,
|
|
20989
|
+
"value",
|
|
20990
|
+
"rank"
|
|
20991
|
+
]);
|
|
20992
|
+
var PRICE_LADDER_SLOTS = [BINDING_SLOT.value, BINDING_SLOT.target];
|
|
20909
20993
|
var SECTION_TABLE_INPUTS = /* @__PURE__ */ new Set([
|
|
20910
20994
|
"sticky",
|
|
20911
20995
|
"margin",
|
|
@@ -21228,6 +21312,9 @@ var numberOnlyKeysOf = (type) => {
|
|
|
21228
21312
|
if (type === "section_filter" /* SECTION_FILTER */) return FILTER_NUMBER_ONLY_KEYS;
|
|
21229
21313
|
if (type === "score_set_item" /* SCORE_SET_ITEM */) return SCORE_ITEM_NUMBER_ONLY_KEYS;
|
|
21230
21314
|
if (type === "score_set" /* SCORE_SET */) return SCORE_SET_NUMBER_ONLY_KEYS;
|
|
21315
|
+
if (type === "price_ladder" /* PRICE_LADDER */) return PRICE_LADDER_NUMBER_ONLY_KEYS;
|
|
21316
|
+
if (type === "price_ladder_mark" /* PRICE_LADDER_MARK */)
|
|
21317
|
+
return PRICE_LADDER_MARK_NUMBER_ONLY_KEYS;
|
|
21231
21318
|
return NUMBER_ONLY_KEYS;
|
|
21232
21319
|
};
|
|
21233
21320
|
function wrapInGuard(markup, guard, pad2) {
|
|
@@ -21483,6 +21570,8 @@ var attrBindingSlots = (type) => {
|
|
|
21483
21570
|
if (type === "heat_swatch" /* HEAT_SWATCH */) return [BINDING_SLOT.value];
|
|
21484
21571
|
if (type === "score_set_item" /* SCORE_SET_ITEM */) return [BINDING_SLOT.value];
|
|
21485
21572
|
if (type === "score_set" /* SCORE_SET */) return [BINDING_SLOT.scoreDate];
|
|
21573
|
+
if (type === "price_ladder" /* PRICE_LADDER */) return PRICE_LADDER_SLOTS;
|
|
21574
|
+
if (type === "price_ladder_mark" /* PRICE_LADDER_MARK */) return [BINDING_SLOT.value];
|
|
21486
21575
|
if (type === "section_chart_series" /* SECTION_CHART_SERIES */)
|
|
21487
21576
|
return [BINDING_SLOT.data, BINDING_SLOT.label];
|
|
21488
21577
|
return hasTextSource(type) ? [BINDING_SLOT.label] : [];
|
|
@@ -21767,6 +21856,12 @@ function boundAttrs(node, ctx, storeProp) {
|
|
|
21767
21856
|
const expr = bindingExpression(bindings[BINDING_SLOT.scoreDate], scope);
|
|
21768
21857
|
if (expr) parts.push(` [scoreDate]="${expr}"`);
|
|
21769
21858
|
}
|
|
21859
|
+
const ladderSlots = node.type === "price_ladder" /* PRICE_LADDER */ ? PRICE_LADDER_SLOTS : node.type === "price_ladder_mark" /* PRICE_LADDER_MARK */ ? [BINDING_SLOT.value] : [];
|
|
21860
|
+
for (const slot of ladderSlots) {
|
|
21861
|
+
if (!bindings?.[slot]) continue;
|
|
21862
|
+
const expr = bindingExpression(bindings[slot], scope);
|
|
21863
|
+
if (expr) parts.push(` [${slot}]="${expr}"`);
|
|
21864
|
+
}
|
|
21770
21865
|
if (node.type === "section_chart_series" /* SECTION_CHART_SERIES */ && bindings?.[BINDING_SLOT.data]) {
|
|
21771
21866
|
const expr = bindingExpression(bindings[BINDING_SLOT.data], scope);
|
|
21772
21867
|
if (expr) parts.push(` [data]="${expr}"`);
|
|
@@ -21944,6 +22039,15 @@ function tagAttrs(node, ctx, storeProp) {
|
|
|
21944
22039
|
delete configs2[scoreSlot];
|
|
21945
22040
|
return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
|
|
21946
22041
|
}
|
|
22042
|
+
if (node.type === "price_ladder" /* PRICE_LADDER */ || node.type === "price_ladder_mark" /* PRICE_LADDER_MARK */) {
|
|
22043
|
+
const bound = ctx.controlMap?.[node.id]?.bindings ?? {};
|
|
22044
|
+
const slots = attrBindingSlots(node.type).filter((s) => bound[s]);
|
|
22045
|
+
if (slots.length) {
|
|
22046
|
+
const configs2 = { ...node.configs ?? {} };
|
|
22047
|
+
for (const s of slots) delete configs2[s];
|
|
22048
|
+
return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
|
|
22049
|
+
}
|
|
22050
|
+
}
|
|
21947
22051
|
if (node.type === "section_filter" /* SECTION_FILTER */) {
|
|
21948
22052
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
21949
22053
|
const configs2 = { ...node.configs ?? {} };
|
|
@@ -22069,7 +22173,8 @@ function globalMethodCall(node, output, ctx, storeProp, receiverPrefix) {
|
|
|
22069
22173
|
receiverPrefix ? { controlId: node.id, memberPrefix: receiverPrefix } : { controlId: node.id }
|
|
22070
22174
|
),
|
|
22071
22175
|
filterGroupEventMember(node),
|
|
22072
|
-
node.configs
|
|
22176
|
+
node.configs,
|
|
22177
|
+
screenPayloadOf(node, output, ctx)
|
|
22073
22178
|
);
|
|
22074
22179
|
if (args === void 0) return void 0;
|
|
22075
22180
|
return `${receiverPrefix}${GLOBAL_METHOD_STORES[method.store].prop}.${method.member}(${args})`;
|
|
@@ -22091,7 +22196,8 @@ function screenMethodCall(node, output, ctx, storeProp, receiverPrefix) {
|
|
|
22091
22196
|
receiverPrefix ? { controlId: node.id, memberPrefix: receiverPrefix } : { controlId: node.id }
|
|
22092
22197
|
),
|
|
22093
22198
|
filterGroupEventMember(node),
|
|
22094
|
-
node.configs
|
|
22199
|
+
node.configs,
|
|
22200
|
+
screenPayloadOf(node, output, ctx)
|
|
22095
22201
|
);
|
|
22096
22202
|
if (args === void 0) return void 0;
|
|
22097
22203
|
return `${receiverPrefix}${method.name}(${args})`;
|
|
@@ -22107,6 +22213,22 @@ function callsGlobalStore(controlMap, screenMethods, store) {
|
|
|
22107
22213
|
)
|
|
22108
22214
|
);
|
|
22109
22215
|
}
|
|
22216
|
+
function embeddedOutputOf(node, output, ctx) {
|
|
22217
|
+
if (node.type !== "screen" /* SCREEN */) return void 0;
|
|
22218
|
+
return embeddedRefOf(node, ctx)?.outputs[baseOutputName(output)];
|
|
22219
|
+
}
|
|
22220
|
+
function nodePayloadShape(node, output, ctx) {
|
|
22221
|
+
if (node.type !== "screen" /* SCREEN */) {
|
|
22222
|
+
return payloadShape(output, node.type, node.configs);
|
|
22223
|
+
}
|
|
22224
|
+
return embeddedOutputOf(node, output, ctx)?.payload?.dataType ?? "void";
|
|
22225
|
+
}
|
|
22226
|
+
function screenPayloadOf(node, output, ctx) {
|
|
22227
|
+
return node.type === "screen" /* SCREEN */ && ctx ? nodePayloadShape(node, output, ctx) : void 0;
|
|
22228
|
+
}
|
|
22229
|
+
function nodePayloadEventRoot(node, output) {
|
|
22230
|
+
return node.type === "screen" /* SCREEN */ ? "$event" : payloadEventRoot(output, node.type, node.configs);
|
|
22231
|
+
}
|
|
22110
22232
|
function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
22111
22233
|
if (hasRouterLink(node.directives?.["routerLink"]?.configs)) return "";
|
|
22112
22234
|
if (node.type === "context_menu" /* CONTEXT_MENU */) {
|
|
@@ -22130,7 +22252,7 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
|
22130
22252
|
);
|
|
22131
22253
|
const armed = dispatched.map((output) => {
|
|
22132
22254
|
const params = [
|
|
22133
|
-
...
|
|
22255
|
+
...nodePayloadShape(node, output, ctx) !== "void" ? ["$event"] : [],
|
|
22134
22256
|
...dispatcherFormRefs(
|
|
22135
22257
|
node,
|
|
22136
22258
|
output,
|
|
@@ -22183,20 +22305,20 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
|
22183
22305
|
...screenWritesFor(
|
|
22184
22306
|
node,
|
|
22185
22307
|
output,
|
|
22186
|
-
|
|
22308
|
+
nodePayloadShape(node, output, ctx),
|
|
22187
22309
|
ctx,
|
|
22188
22310
|
node.outputScreenWrites,
|
|
22189
|
-
|
|
22311
|
+
nodePayloadEventRoot(node, output)
|
|
22190
22312
|
)
|
|
22191
22313
|
);
|
|
22192
22314
|
statements.push(
|
|
22193
22315
|
...screenEmitsFor(
|
|
22194
22316
|
node,
|
|
22195
22317
|
output,
|
|
22196
|
-
|
|
22318
|
+
nodePayloadShape(node, output, ctx),
|
|
22197
22319
|
ctx,
|
|
22198
22320
|
node.outputEmits,
|
|
22199
|
-
|
|
22321
|
+
nodePayloadEventRoot(node, output),
|
|
22200
22322
|
"template",
|
|
22201
22323
|
storeProp
|
|
22202
22324
|
)
|
|
@@ -22204,11 +22326,11 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
|
22204
22326
|
const patch = statePatchFor(
|
|
22205
22327
|
node,
|
|
22206
22328
|
output,
|
|
22207
|
-
|
|
22329
|
+
nodePayloadShape(node, output, ctx),
|
|
22208
22330
|
storeProp,
|
|
22209
22331
|
ctx,
|
|
22210
22332
|
node.outputWrites,
|
|
22211
|
-
|
|
22333
|
+
nodePayloadEventRoot(node, output)
|
|
22212
22334
|
);
|
|
22213
22335
|
if (patch) statements.push(patch);
|
|
22214
22336
|
const open = outputOpenCall(
|
|
@@ -22231,7 +22353,7 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
|
|
|
22231
22353
|
).map(
|
|
22232
22354
|
(formId) => formRefName((ctx.controlMap ?? {})[formId])
|
|
22233
22355
|
);
|
|
22234
|
-
const takesEvent =
|
|
22356
|
+
const takesEvent = nodePayloadShape(node, output, ctx) !== "void";
|
|
22235
22357
|
const params = [...takesEvent ? ["$event"] : [], ...refs];
|
|
22236
22358
|
return ` (${output})="${outcomeHandlerName(
|
|
22237
22359
|
node.id,
|
|
@@ -22273,7 +22395,8 @@ function inlineCallStatement(node, key2, methods, operationOf, storeProp, ctx) {
|
|
|
22273
22395
|
node.type,
|
|
22274
22396
|
callArgBindings(ctx, storeProp, { controlId: node.id }),
|
|
22275
22397
|
filterGroupEventMember(node),
|
|
22276
|
-
node.configs
|
|
22398
|
+
node.configs,
|
|
22399
|
+
screenPayloadOf(node, key2, ctx)
|
|
22277
22400
|
);
|
|
22278
22401
|
return args === void 0 ? void 0 : `${methodReceiver(method, storeProp, ctx)}.${method.name}(${args})`;
|
|
22279
22402
|
}
|
|
@@ -22435,7 +22558,8 @@ function collectPayloadProps(tree, methods, operationOf, shapes = {}, constants
|
|
|
22435
22558
|
node.type,
|
|
22436
22559
|
ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
|
|
22437
22560
|
void 0,
|
|
22438
|
-
node.configs
|
|
22561
|
+
node.configs,
|
|
22562
|
+
screenPayloadOf(node, output, ctx)
|
|
22439
22563
|
) === void 0) {
|
|
22440
22564
|
continue;
|
|
22441
22565
|
}
|
|
@@ -22507,47 +22631,6 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
|
|
|
22507
22631
|
node,
|
|
22508
22632
|
ctx,
|
|
22509
22633
|
wires,
|
|
22510
|
-
(methodId, output, args) => {
|
|
22511
|
-
const method = methods[methodId];
|
|
22512
|
-
if (!method) return void 0;
|
|
22513
|
-
const call = callArguments(
|
|
22514
|
-
method,
|
|
22515
|
-
operationOf,
|
|
22516
|
-
output,
|
|
22517
|
-
args ?? [],
|
|
22518
|
-
ctx.constants ?? {},
|
|
22519
|
-
ctx.functions ?? {},
|
|
22520
|
-
ctx.properties ?? {},
|
|
22521
|
-
void 0,
|
|
22522
|
-
callArgBindings(ctx, storeProp, { controlId: node.id })
|
|
22523
|
-
);
|
|
22524
|
-
return call === void 0 ? void 0 : `${methodReceiver(method, storeProp, ctx)}.${method.name}(${call})`;
|
|
22525
|
-
},
|
|
22526
|
-
(screenNode, outputId, payload) => statePatchFor(
|
|
22527
|
-
screenNode,
|
|
22528
|
-
outputId,
|
|
22529
|
-
payload,
|
|
22530
|
-
storeProp,
|
|
22531
|
-
ctx,
|
|
22532
|
-
screenNode.screenOutputWrites
|
|
22533
|
-
),
|
|
22534
|
-
(screenNode, outputId, payload) => screenWritesFor(
|
|
22535
|
-
screenNode,
|
|
22536
|
-
outputId,
|
|
22537
|
-
payload,
|
|
22538
|
-
ctx,
|
|
22539
|
-
screenNode.screenOutputScreenWrites
|
|
22540
|
-
),
|
|
22541
|
-
(screenNode, outputId, payload) => screenEmitsFor(
|
|
22542
|
-
screenNode,
|
|
22543
|
-
outputId,
|
|
22544
|
-
payload,
|
|
22545
|
-
ctx,
|
|
22546
|
-
screenNode.screenOutputEmits,
|
|
22547
|
-
"$event",
|
|
22548
|
-
"template",
|
|
22549
|
-
storeProp
|
|
22550
|
-
),
|
|
22551
22634
|
// A bound ScreenInput reading a path — a row of the Repeat this embed
|
|
22552
22635
|
// sits in, a StateProperty — emits through the same walk every other
|
|
22553
22636
|
// bound slot does (GLOSSARY.md DataBinding).
|
|
@@ -22573,7 +22656,12 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
|
|
|
22573
22656
|
const spacing = STYLE_DIRECTIVE_NAMES.map(
|
|
22574
22657
|
(name3) => styleDirectiveAttrs(name3, filterConfigs(node.directives?.[name3]?.configs))
|
|
22575
22658
|
).join("");
|
|
22576
|
-
const
|
|
22659
|
+
const attrs2 = screenOutputHandlers(
|
|
22660
|
+
bound,
|
|
22661
|
+
outputAttrs(node, methods, operationOf, storeProp, ctx),
|
|
22662
|
+
ref
|
|
22663
|
+
);
|
|
22664
|
+
const tag2 = `${pad3}<${ref.tag}${attrs2}${style}${spacing} />`;
|
|
22577
22665
|
return guards.reduceRight(
|
|
22578
22666
|
(markup, guard, index) => `${" ".repeat(indent2 + index)}@if (${guard.expression}; as ${guard.alias}) {
|
|
22579
22667
|
${markup}
|
|
@@ -22658,6 +22746,20 @@ var pluginFacts = (tree) => {
|
|
|
22658
22746
|
return facts;
|
|
22659
22747
|
};
|
|
22660
22748
|
var OUTPUT_ATTR = / \(([^)]+)\)="([^"]*)"/g;
|
|
22749
|
+
function screenOutputHandlers(bound, own, ref) {
|
|
22750
|
+
const handlers = /* @__PURE__ */ new Map();
|
|
22751
|
+
const push = (name3, statement) => {
|
|
22752
|
+
handlers.set(name3, [...handlers.get(name3) ?? [], statement]);
|
|
22753
|
+
};
|
|
22754
|
+
for (const [, key2, statement] of own.matchAll(OUTPUT_ATTR)) {
|
|
22755
|
+
const name3 = ref.outputs[key2]?.name;
|
|
22756
|
+
if (name3) push(name3, statement);
|
|
22757
|
+
}
|
|
22758
|
+
for (const [, name3, statement] of bound.matchAll(OUTPUT_ATTR)) {
|
|
22759
|
+
push(name3, statement);
|
|
22760
|
+
}
|
|
22761
|
+
return `${bound.replace(OUTPUT_ATTR, "")}${[...handlers.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name3, statements]) => ` (${name3})="${statements.join("; ")}"`).join("")}`;
|
|
22762
|
+
}
|
|
22661
22763
|
function renderPluginTag(node, pad2, tag, methods, operationOf, storeProp, ctx) {
|
|
22662
22764
|
const attrs = `${tagAttrs(node, ctx, storeProp)}${directiveAttrs(
|
|
22663
22765
|
node,
|
|
@@ -22770,7 +22872,8 @@ function hasOutputBinding(tree, methods, operationOf, constants = {}, functions
|
|
|
22770
22872
|
node.type,
|
|
22771
22873
|
ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
|
|
22772
22874
|
void 0,
|
|
22773
|
-
node.configs
|
|
22875
|
+
node.configs,
|
|
22876
|
+
screenPayloadOf(node, output, ctx)
|
|
22774
22877
|
) !== void 0;
|
|
22775
22878
|
}) || // A call a wire makes is a call this Screen makes: the rows live inline
|
|
22776
22879
|
// on the [OutputOpen] rather than in `node.outputs`, so they are asked
|
|
@@ -22872,25 +22975,13 @@ function hasStateWrite(tree, ctx) {
|
|
|
22872
22975
|
(output) => statePatchFor(
|
|
22873
22976
|
node,
|
|
22874
22977
|
output,
|
|
22875
|
-
|
|
22978
|
+
nodePayloadShape(node, output, ctx),
|
|
22876
22979
|
"store",
|
|
22877
22980
|
ctx,
|
|
22878
22981
|
node.outputWrites,
|
|
22879
|
-
|
|
22982
|
+
nodePayloadEventRoot(node, output)
|
|
22880
22983
|
) !== void 0
|
|
22881
|
-
) ||
|
|
22882
|
-
const ref = embeddedRefOf(node, ctx);
|
|
22883
|
-
const output = ref?.outputs[outputId];
|
|
22884
|
-
if (!output) return false;
|
|
22885
|
-
return statePatchFor(
|
|
22886
|
-
node,
|
|
22887
|
-
outputId,
|
|
22888
|
-
output.payload ? output.payload.dataType : "void",
|
|
22889
|
-
"store",
|
|
22890
|
-
ctx,
|
|
22891
|
-
node.screenOutputWrites
|
|
22892
|
-
) !== void 0;
|
|
22893
|
-
}) || hasStateWrite(node.childrens, ctx)
|
|
22984
|
+
) || hasStateWrite(node.childrens, ctx)
|
|
22894
22985
|
);
|
|
22895
22986
|
}
|
|
22896
22987
|
function collectScreenInputs(tree, methods, operationOf, properties = {}) {
|
|
@@ -22935,7 +23026,8 @@ function collectTemplateTransforms(tree, methods, operationOf, constants = {}, f
|
|
|
22935
23026
|
node.type,
|
|
22936
23027
|
ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
|
|
22937
23028
|
void 0,
|
|
22938
|
-
node.configs
|
|
23029
|
+
node.configs,
|
|
23030
|
+
screenPayloadOf(node, output, ctx)
|
|
22939
23031
|
) === void 0) {
|
|
22940
23032
|
continue;
|
|
22941
23033
|
}
|
|
@@ -23152,13 +23244,6 @@ var variableDeclsBlock = (variables, scope) => {
|
|
|
23152
23244
|
`;
|
|
23153
23245
|
}).join("");
|
|
23154
23246
|
};
|
|
23155
|
-
function hasScreenMethodBinding(tree) {
|
|
23156
|
-
return tree.some(
|
|
23157
|
-
(node) => Object.values(node.screenOutputs ?? {}).some(
|
|
23158
|
-
(binding) => binding.kind === "method"
|
|
23159
|
-
) || hasScreenMethodBinding(node.childrens)
|
|
23160
|
-
);
|
|
23161
|
-
}
|
|
23162
23247
|
var outputDeclsBlock = (outputs) => {
|
|
23163
23248
|
if (!outputs.length) return "";
|
|
23164
23249
|
return "\n" + outputs.map(
|
|
@@ -23361,14 +23446,14 @@ function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods
|
|
|
23361
23446
|
const filled = new Set(outputOpenInputs(open).map((row) => row.inputId));
|
|
23362
23447
|
if (ref.inputs.some((input) => input.required && !filled.has(input.id)))
|
|
23363
23448
|
return void 0;
|
|
23364
|
-
const payload =
|
|
23449
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
23365
23450
|
const entries = outputOpenInputEntries(
|
|
23366
23451
|
open,
|
|
23367
23452
|
ref.inputs,
|
|
23368
23453
|
payload,
|
|
23369
23454
|
ctx.inputs ?? {},
|
|
23370
23455
|
ctx.constants ?? {},
|
|
23371
|
-
|
|
23456
|
+
nodePayloadEventRoot(node, output),
|
|
23372
23457
|
"this.",
|
|
23373
23458
|
filterGroupEventMember(node),
|
|
23374
23459
|
// A `screen` row reads what the embedding class already declares, or walks
|
|
@@ -23593,7 +23678,7 @@ function outputOpenMembersBlock(tree, ctx, payloads, storeProp, methods, operati
|
|
|
23593
23678
|
operationOf
|
|
23594
23679
|
);
|
|
23595
23680
|
if (!emit) continue;
|
|
23596
|
-
const payload =
|
|
23681
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
23597
23682
|
const param = emit.readsEvent ? `$event: ${payloads.get(node.id)?.type ?? handlerEventType(payload, node.type, output)}` : "";
|
|
23598
23683
|
emitted.push(`
|
|
23599
23684
|
protected readonly ${emit.member} = (${param}): void => {
|
|
@@ -23675,7 +23760,7 @@ function handlerFacts(tree, methods, operationOf, storeProp, ctx) {
|
|
|
23675
23760
|
const controls = ctx.controlMap ?? {};
|
|
23676
23761
|
const handlers = [];
|
|
23677
23762
|
const record = (node, output, name3, formRefs, pressed = []) => {
|
|
23678
|
-
const payload =
|
|
23763
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
23679
23764
|
if (payload === "void" && !formRefs) return;
|
|
23680
23765
|
const formShape = payload === "record" ? buildFormShape(controls, node.id) : void 0;
|
|
23681
23766
|
handlers.push({
|
|
@@ -23762,8 +23847,8 @@ function outcomeHandlersBlock(tree, methods, operationOf, storeProp, ctx, payloa
|
|
|
23762
23847
|
).sort()) {
|
|
23763
23848
|
if (isOutputArmKey(output)) continue;
|
|
23764
23849
|
if (!groupDrawsOutcome(node, output, methods)) continue;
|
|
23765
|
-
const payload =
|
|
23766
|
-
const eventRoot =
|
|
23850
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
23851
|
+
const eventRoot = nodePayloadEventRoot(node, output);
|
|
23767
23852
|
const statements = [
|
|
23768
23853
|
...screenWritesFor(
|
|
23769
23854
|
node,
|
|
@@ -24215,8 +24300,8 @@ function armExpr(arm, node, ctx, storeProp, payload, eventRoot) {
|
|
|
24215
24300
|
function emittableArms(node, output, ctx, storeProp) {
|
|
24216
24301
|
const control = node;
|
|
24217
24302
|
if (!offersOutputArms(control)) return [];
|
|
24218
|
-
const payload =
|
|
24219
|
-
const eventRoot =
|
|
24303
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
24304
|
+
const eventRoot = nodePayloadEventRoot(node, output);
|
|
24220
24305
|
const emitted = [];
|
|
24221
24306
|
let pendingBreak = false;
|
|
24222
24307
|
for (const arm of scannedOutputArms(control, output)) {
|
|
@@ -24336,8 +24421,8 @@ function outputArmHandlersBlock(tree, methods, operationOf, storeProp, ctx, payl
|
|
|
24336
24421
|
ctx
|
|
24337
24422
|
)) {
|
|
24338
24423
|
const wired = emittableArms(node, output, ctx, storeProp);
|
|
24339
|
-
const payload =
|
|
24340
|
-
const eventRoot =
|
|
24424
|
+
const payload = nodePayloadShape(node, output, ctx);
|
|
24425
|
+
const eventRoot = nodePayloadEventRoot(node, output);
|
|
24341
24426
|
const control = node;
|
|
24342
24427
|
const format = (statements, indent2) => statements.map((line) => {
|
|
24343
24428
|
const statement = line.endsWith(";") ? line : `${line};`;
|
|
@@ -24467,7 +24552,8 @@ function classCallStatements(node, key2, payload, eventRoot, methods, operationO
|
|
|
24467
24552
|
memberPrefix: "this."
|
|
24468
24553
|
}),
|
|
24469
24554
|
filterGroupEventMember(node),
|
|
24470
|
-
node.configs
|
|
24555
|
+
node.configs,
|
|
24556
|
+
screenPayloadOf(node, key2, ctx)
|
|
24471
24557
|
) : void 0;
|
|
24472
24558
|
if (!method || args === void 0) return [];
|
|
24473
24559
|
const statements = [];
|
|
@@ -24684,21 +24770,36 @@ function methodArgsOf(method, operationOf, ctx) {
|
|
|
24684
24770
|
}
|
|
24685
24771
|
return op ? methodArgs(method, op) : authoredArgs(method);
|
|
24686
24772
|
}
|
|
24687
|
-
function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf) {
|
|
24773
|
+
function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf, outputs = {}) {
|
|
24688
24774
|
const byName = new Map(
|
|
24689
24775
|
Object.values(inputs).map((input) => [input.id, input.name])
|
|
24690
24776
|
);
|
|
24777
|
+
const given = bindings.bindingScope ?? {};
|
|
24778
|
+
const givenPropOf = given.storePropOf;
|
|
24779
|
+
const classScope = {
|
|
24780
|
+
...given,
|
|
24781
|
+
...given.storeProp ? { storeProp: `this.${given.storeProp}` } : {},
|
|
24782
|
+
...givenPropOf ? {
|
|
24783
|
+
storePropOf: (id) => {
|
|
24784
|
+
const prop = givenPropOf(id);
|
|
24785
|
+
return prop ? `this.${prop}` : void 0;
|
|
24786
|
+
}
|
|
24787
|
+
} : {}
|
|
24788
|
+
};
|
|
24789
|
+
bindings = { ...bindings, bindingScope: classScope };
|
|
24790
|
+
const members = /* @__PURE__ */ new Set();
|
|
24691
24791
|
const emitted = calls.map((call) => {
|
|
24692
|
-
const method = methods[call.methodId];
|
|
24693
|
-
if (!method) return "";
|
|
24694
24792
|
if (screenAutoCallError(call)) return "";
|
|
24695
|
-
const
|
|
24696
|
-
if (!
|
|
24793
|
+
const method = call.methodId ? methods[call.methodId] : void 0;
|
|
24794
|
+
if (call.methodId && !method) return "";
|
|
24795
|
+
const op = method ? operationOf(method) : void 0;
|
|
24796
|
+
if (method && !op) return "";
|
|
24697
24797
|
const taken = new Set(Object.values(functions).map((fn) => fn.name));
|
|
24698
24798
|
const localByInput = /* @__PURE__ */ new Map();
|
|
24699
24799
|
const locals = /* @__PURE__ */ new Map();
|
|
24700
24800
|
const guarded = /* @__PURE__ */ new Set();
|
|
24701
|
-
|
|
24801
|
+
const callRows = method ? call.args : [];
|
|
24802
|
+
for (const row of callRows) {
|
|
24702
24803
|
if (row.source !== "input" || !row.input) continue;
|
|
24703
24804
|
const name3 = byName.get(row.input) ?? row.input;
|
|
24704
24805
|
let local = localByInput.get(name3);
|
|
@@ -24710,40 +24811,107 @@ function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constant
|
|
|
24710
24811
|
if (!row.optional) guarded.add(local);
|
|
24711
24812
|
}
|
|
24712
24813
|
const bound = hoistedBindingLocals(
|
|
24713
|
-
|
|
24814
|
+
callRows,
|
|
24714
24815
|
bindings.bindingScope ?? {},
|
|
24715
24816
|
functions,
|
|
24716
24817
|
taken
|
|
24717
24818
|
);
|
|
24718
24819
|
for (const [row, local] of bound.locals) locals.set(row, local);
|
|
24719
24820
|
for (const local of bound.guarded) guarded.add(local);
|
|
24720
|
-
const args = callArgumentsExpression(
|
|
24721
|
-
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
|
|
24725
|
-
|
|
24821
|
+
const args = method && op ? callArgumentsExpression(methodArgs(method, op), call.args, "void", {
|
|
24822
|
+
constants,
|
|
24823
|
+
scope: "class",
|
|
24824
|
+
functions,
|
|
24825
|
+
...bindings,
|
|
24826
|
+
locals
|
|
24827
|
+
}) : "";
|
|
24726
24828
|
if (args === void 0) return "";
|
|
24727
|
-
const read = [
|
|
24829
|
+
const read = new Map([
|
|
24728
24830
|
...[...localByInput.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name3, local]) => [`this.${name3}()`, local]),
|
|
24729
24831
|
...bound.reads
|
|
24730
|
-
];
|
|
24731
|
-
const
|
|
24732
|
-
|
|
24733
|
-
|
|
24832
|
+
]);
|
|
24833
|
+
const emitRows = call.emits ?? [];
|
|
24834
|
+
let emits = emitRows.length ? screenEmitStatements(
|
|
24835
|
+
outputs,
|
|
24836
|
+
emitRows,
|
|
24837
|
+
"void",
|
|
24838
|
+
[],
|
|
24839
|
+
inputs,
|
|
24840
|
+
constants,
|
|
24841
|
+
"$event",
|
|
24842
|
+
"class",
|
|
24843
|
+
void 0,
|
|
24844
|
+
{ scope: bindings.bindingScope ?? {} }
|
|
24845
|
+
) : [];
|
|
24846
|
+
if (emitRows.length && !emits.length) return "";
|
|
24847
|
+
for (const row of emitRows) {
|
|
24848
|
+
const value = row.value;
|
|
24849
|
+
let expr;
|
|
24850
|
+
let base2 = "value";
|
|
24851
|
+
let waits = true;
|
|
24852
|
+
if (value?.kind === "input") {
|
|
24853
|
+
const input = inputs[value.inputId];
|
|
24854
|
+
if (!input) continue;
|
|
24855
|
+
expr = `this.${input.name}()`;
|
|
24856
|
+
base2 = input.name;
|
|
24857
|
+
waits = !input.required;
|
|
24858
|
+
} else if (value?.kind === "binding") {
|
|
24859
|
+
expr = bindingExpression(
|
|
24860
|
+
value.binding,
|
|
24861
|
+
bindings.bindingScope ?? {}
|
|
24862
|
+
);
|
|
24863
|
+
base2 = localBase2(value.binding, bindings.bindingScope ?? {});
|
|
24864
|
+
}
|
|
24865
|
+
if (!expr) continue;
|
|
24866
|
+
let local = read.get(expr);
|
|
24867
|
+
if (!local) {
|
|
24868
|
+
local = mintLocal2(base2, taken);
|
|
24869
|
+
read.set(expr, local);
|
|
24870
|
+
}
|
|
24871
|
+
if (waits) guarded.add(local);
|
|
24872
|
+
const spelled = `.emit(${expr})`;
|
|
24873
|
+
const hoisted = `.emit(${local})`;
|
|
24874
|
+
emits = emits.map(
|
|
24875
|
+
(line) => line.endsWith(spelled) ? line.replace(spelled, hoisted) : line
|
|
24876
|
+
);
|
|
24877
|
+
}
|
|
24878
|
+
for (const binding of call.reads ?? []) {
|
|
24879
|
+
if (binding.root.kind === "alias") return "";
|
|
24880
|
+
const expr = bindingExpression(binding, classScope);
|
|
24881
|
+
if (!expr) return "";
|
|
24882
|
+
let local = read.get(expr);
|
|
24883
|
+
if (!local) {
|
|
24884
|
+
local = mintLocal2(localBase2(binding, classScope), taken);
|
|
24885
|
+
read.set(expr, local);
|
|
24886
|
+
}
|
|
24887
|
+
guarded.add(local);
|
|
24888
|
+
}
|
|
24889
|
+
const reads = [...read.entries()];
|
|
24890
|
+
const hoists = reads.length ? `
|
|
24891
|
+
${reads.map(([expr, local]) => ` const ${local} = ${expr};`).join("\n")}` : "";
|
|
24892
|
+
const tested = reads.filter(([, local]) => guarded.has(local));
|
|
24734
24893
|
const guard = tested.length ? `
|
|
24735
24894
|
if (${tested.map(([, local]) => `${local} === undefined`).join(" || ")}) return;` : "";
|
|
24895
|
+
const base = method ? `${method.name}Call` : `${[...emitRows].map((row) => outputs[row.outputId]?.name ?? "").filter(Boolean).sort()[0] ?? "auto"}Emit`;
|
|
24896
|
+
let member = base;
|
|
24897
|
+
for (let n = 2; members.has(member); n++) member = `${base}${n}`;
|
|
24898
|
+
members.add(member);
|
|
24736
24899
|
const once = screenAutoCallWhen(call) === "once";
|
|
24737
|
-
const flag = `${
|
|
24900
|
+
const flag = `${member}Fired`;
|
|
24738
24901
|
const latch = once ? `
|
|
24739
24902
|
if (this.${flag}) return;
|
|
24740
24903
|
this.${flag} = true;` : "";
|
|
24741
24904
|
const flagDecl = once ? `
|
|
24742
24905
|
private ${flag} = false;
|
|
24743
24906
|
` : "";
|
|
24907
|
+
const emitBlock = emits.length ? `
|
|
24908
|
+
untracked(() => {
|
|
24909
|
+
${emits.map((line) => ` ${line};`).join("\n")}
|
|
24910
|
+
});` : "";
|
|
24911
|
+
const callLine = method ? `
|
|
24912
|
+
this.${storePropOf?.(method.id) ?? storeProp}.${method.name}(${args});` : "";
|
|
24744
24913
|
return `${flagDecl}
|
|
24745
|
-
private readonly ${
|
|
24746
|
-
this.${storePropOf?.(method.id) ?? storeProp}.${method.name}(${args});
|
|
24914
|
+
private readonly ${member} = effect(() => {${hoists}${guard}${latch}${emitBlock}${callLine}
|
|
24747
24915
|
});
|
|
24748
24916
|
`;
|
|
24749
24917
|
}).filter(Boolean);
|
|
@@ -25472,7 +25640,9 @@ function screenTouchedSubStores(ctx, tree, methods, operationOf, constants, clas
|
|
|
25472
25640
|
(id) => boundRoots.has(id) || countStateWriteReferences(controlMap, id)
|
|
25473
25641
|
) || Object.keys(sub.computeds).some((id) => boundRoots.has(id)) || // A ScreenAutoCall and a ScreenMethod fire from the class rather than
|
|
25474
25642
|
// from a Control, so the Tree walk below never sees them.
|
|
25475
|
-
(ctx.autoCalls ?? []).some(
|
|
25643
|
+
(ctx.autoCalls ?? []).some(
|
|
25644
|
+
(call) => !!call.methodId && !!sub.methods[call.methodId]
|
|
25645
|
+
) || Object.values(ctx.screenMethods ?? {}).some(
|
|
25476
25646
|
(handler) => screenMethodCalls(handler).some(
|
|
25477
25647
|
(one) => !!one.methodId && !!sub.methods[one.methodId]
|
|
25478
25648
|
)
|
|
@@ -25578,7 +25748,7 @@ function generateTs(tree, naming, featureName, variants = {}, methods = {}, oper
|
|
|
25578
25748
|
featureStoreProp(featureName)
|
|
25579
25749
|
);
|
|
25580
25750
|
const autoCalls = (ctx.autoCalls ?? []).filter(
|
|
25581
|
-
(call) => !!methods[call.methodId]
|
|
25751
|
+
(call) => call.methodId ? !!methods[call.methodId] : !!call.emits?.length
|
|
25582
25752
|
);
|
|
25583
25753
|
const storeProp = featureStoreProp(featureName);
|
|
25584
25754
|
const transformRefs = templateTransformRefs(
|
|
@@ -25670,6 +25840,12 @@ ${tables.map(
|
|
|
25670
25840
|
const mainMethods = ctx.storePropOf ? Object.fromEntries(
|
|
25671
25841
|
Object.entries(methods).filter(([id]) => !ctx.storePropOf?.(id))
|
|
25672
25842
|
) : methods;
|
|
25843
|
+
const readsStoreRoot = (binding) => binding.root.kind === "property" || binding.root.kind === "computed";
|
|
25844
|
+
const autoCallEmitsReadState = ctx.hasStore !== false && autoCalls.some(
|
|
25845
|
+
(call) => (call.emits ?? []).some(
|
|
25846
|
+
(row) => row.value?.kind === "binding" && readsStoreRoot(row.value.binding)
|
|
25847
|
+
) || (call.reads ?? []).some(readsStoreRoot)
|
|
25848
|
+
);
|
|
25673
25849
|
const callsStore = hasOutputBinding(
|
|
25674
25850
|
tree,
|
|
25675
25851
|
mainMethods,
|
|
@@ -25679,7 +25855,9 @@ ${tables.map(
|
|
|
25679
25855
|
ctx.properties ?? {},
|
|
25680
25856
|
ctx,
|
|
25681
25857
|
storeProp
|
|
25682
|
-
) || autoCalls.some(
|
|
25858
|
+
) || autoCalls.some(
|
|
25859
|
+
(call) => !!call.methodId && !!mainMethods[call.methodId]
|
|
25860
|
+
) || hasStateWrite(tree, ctx) || computedReadsState || checksReadState || screenVariantsReadState || menuRulesReadState || autoCallEmitsReadState;
|
|
25683
25861
|
const lookup = emissionShapeLookup(methods, operationOf, shapes);
|
|
25684
25862
|
const screenUsesBusy = controlMapUsesBusy(ctx.controlMap ?? {});
|
|
25685
25863
|
const hasStore2 = ctx.hasStore ?? (variantList.length > 0 || callsStore);
|
|
@@ -25883,11 +26061,24 @@ ${tables.map(
|
|
|
25883
26061
|
const classReadsNavRef = `${screenVariantsBody}${screenComputedsBody}`.includes(
|
|
25884
26062
|
`${NAV_REF_MEMBER}?.`
|
|
25885
26063
|
);
|
|
26064
|
+
const autoCallsBody = autoCallsBlock(
|
|
26065
|
+
autoCalls,
|
|
26066
|
+
methods,
|
|
26067
|
+
operationOf,
|
|
26068
|
+
storeProp,
|
|
26069
|
+
ctx.inputs ?? {},
|
|
26070
|
+
constants,
|
|
26071
|
+
ctx.functions ?? {},
|
|
26072
|
+
callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
|
|
26073
|
+
ctx.storePropOf,
|
|
26074
|
+
ctx.outputs ?? {}
|
|
26075
|
+
);
|
|
25886
26076
|
const angularCore = [
|
|
25887
26077
|
"ChangeDetectionStrategy",
|
|
25888
26078
|
"Component",
|
|
25889
26079
|
...screenComputedsBody || screenVariantsBody || cardsBody || messageParamsBody ? ["computed"] : [],
|
|
25890
26080
|
...autoCalls.length ? ["effect"] : [],
|
|
26081
|
+
...autoCallsBody.includes("untracked(") ? ["untracked"] : [],
|
|
25891
26082
|
...needsStore || usesAuth || injectedGlobalStores.length > 0 || usesModal || drawsOverlayClose || drawsOutcomeNav || classReadsNavRef || `${outputLinkBody}${menuActionHandlersBody}${outputArmHandlersBody}`.includes(
|
|
25892
26083
|
`${NAV_REF_MEMBER}?.`
|
|
25893
26084
|
) ? ["inject"] : [],
|
|
@@ -26040,17 +26231,6 @@ ${tables.map(
|
|
|
26040
26231
|
});
|
|
26041
26232
|
const outputsBody = outputDeclsBlock(outputs);
|
|
26042
26233
|
const wiresBody = wireDeclsBlock(wires);
|
|
26043
|
-
const autoCallsBody = autoCallsBlock(
|
|
26044
|
-
autoCalls,
|
|
26045
|
-
methods,
|
|
26046
|
-
operationOf,
|
|
26047
|
-
storeProp,
|
|
26048
|
-
ctx.inputs ?? {},
|
|
26049
|
-
constants,
|
|
26050
|
-
ctx.functions ?? {},
|
|
26051
|
-
callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
|
|
26052
|
-
ctx.storePropOf
|
|
26053
|
-
);
|
|
26054
26234
|
const outcomeHandlersBody = outcomeHandlersBlock(
|
|
26055
26235
|
tree,
|
|
26056
26236
|
methods,
|
|
@@ -26494,7 +26674,7 @@ __export(package_exports, {
|
|
|
26494
26674
|
version: () => version
|
|
26495
26675
|
});
|
|
26496
26676
|
var name = "@magmonium/one";
|
|
26497
|
-
var version = "0.4.
|
|
26677
|
+
var version = "0.4.82";
|
|
26498
26678
|
var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
|
|
26499
26679
|
var author = "magmonium";
|
|
26500
26680
|
var license = "MIT";
|
|
@@ -26562,7 +26742,7 @@ __export(package_exports2, {
|
|
|
26562
26742
|
version: () => version2
|
|
26563
26743
|
});
|
|
26564
26744
|
var name2 = "@magmonium/cli";
|
|
26565
|
-
var version2 = "0.8.
|
|
26745
|
+
var version2 = "0.8.23";
|
|
26566
26746
|
var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
|
|
26567
26747
|
var bin = {
|
|
26568
26748
|
"mag-cli": "bin/cli.js"
|
|
@@ -28134,7 +28314,7 @@ var caseEquals = (actual, expected) => {
|
|
|
28134
28314
|
};
|
|
28135
28315
|
|
|
28136
28316
|
// libs/codegen/src/lib/workspace-codec.ts
|
|
28137
|
-
var WORKSPACE_SCHEMA_VERSION =
|
|
28317
|
+
var WORKSPACE_SCHEMA_VERSION = 30;
|
|
28138
28318
|
var MIGRATION_FLOOR = 18;
|
|
28139
28319
|
var DEPLOY_TOKEN_METHOD_IDS = {
|
|
28140
28320
|
"@UserStore.ensureDeployToken": "@AuthStore.ensureDeployToken",
|
|
@@ -28230,6 +28410,49 @@ var mapBlobControls = (blob, step) => {
|
|
|
28230
28410
|
}
|
|
28231
28411
|
return next;
|
|
28232
28412
|
};
|
|
28413
|
+
var SCREEN_OUTPUT_SIBLINGS = [
|
|
28414
|
+
["screenOutputCalls", "outputCalls"],
|
|
28415
|
+
["screenOutputWrites", "outputWrites"],
|
|
28416
|
+
["screenOutputScreenWrites", "outputScreenWrites"],
|
|
28417
|
+
["screenOutputOutcomes", "outputOutcomes"]
|
|
28418
|
+
];
|
|
28419
|
+
var recordOf = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
28420
|
+
var migrateScreenOutputMaps = (control) => {
|
|
28421
|
+
if (!Object.keys(control).some((key2) => key2.startsWith("screenOutput"))) {
|
|
28422
|
+
return control;
|
|
28423
|
+
}
|
|
28424
|
+
const next = { ...control };
|
|
28425
|
+
const merge = (field, key2, value) => {
|
|
28426
|
+
next[field] = { ...recordOf(next[field]) ?? {}, [key2]: value };
|
|
28427
|
+
};
|
|
28428
|
+
for (const [from, to] of SCREEN_OUTPUT_SIBLINGS) {
|
|
28429
|
+
for (const [key2, value] of Object.entries(recordOf(control[from]) ?? {})) {
|
|
28430
|
+
merge(to, key2, value);
|
|
28431
|
+
}
|
|
28432
|
+
delete next[from];
|
|
28433
|
+
}
|
|
28434
|
+
const emits = recordOf(control["screenOutputEmits"]) ?? {};
|
|
28435
|
+
for (const [key2, rows] of Object.entries(emits)) {
|
|
28436
|
+
merge("outputEmits", key2, rows);
|
|
28437
|
+
}
|
|
28438
|
+
delete next["screenOutputEmits"];
|
|
28439
|
+
const bindings = recordOf(control["screenOutputs"]) ?? {};
|
|
28440
|
+
for (const [key2, raw] of Object.entries(bindings)) {
|
|
28441
|
+
const binding = raw;
|
|
28442
|
+
if (binding?.kind === "method") {
|
|
28443
|
+
merge("outputs", key2, binding.methodId);
|
|
28444
|
+
if (binding.args?.length) merge("outputArgs", key2, binding.args);
|
|
28445
|
+
} else if (binding?.kind === "output") {
|
|
28446
|
+
const drawn = recordOf(next["outputEmits"])?.[key2];
|
|
28447
|
+
merge("outputEmits", key2, [
|
|
28448
|
+
...Array.isArray(drawn) ? drawn : [],
|
|
28449
|
+
{ id: `reemit-${key2}`, outputId: binding.outputId, value: { kind: "event" } }
|
|
28450
|
+
]);
|
|
28451
|
+
}
|
|
28452
|
+
}
|
|
28453
|
+
delete next["screenOutputs"];
|
|
28454
|
+
return next;
|
|
28455
|
+
};
|
|
28233
28456
|
var compactStoredControl = (control) => {
|
|
28234
28457
|
const configs = control["configs"];
|
|
28235
28458
|
if (!configs || typeof configs !== "object" || Array.isArray(configs)) {
|
|
@@ -28327,6 +28550,9 @@ var screenOnly = (step) => ({
|
|
|
28327
28550
|
step
|
|
28328
28551
|
});
|
|
28329
28552
|
var MIGRATIONS = {
|
|
28553
|
+
// 29 → 30: a ScreenControl's ScreenOutputs move onto the standard output
|
|
28554
|
+
// maps, in a Screen's ControlMap and in every ControlGroup (ADR 0207).
|
|
28555
|
+
29: everyKind((blob) => mapBlobControls(blob, migrateScreenOutputMaps)),
|
|
28330
28556
|
// 28 → 29: a Control writes only what it says, in a Screen's ControlMap and
|
|
28331
28557
|
// in every ControlGroup — and a `var:` binding on one carrying no message
|
|
28332
28558
|
// goes. No translations reach a step, so a slot under a key is kept: it may
|
|
@@ -28804,18 +29030,22 @@ function sanitizeOutcomeTransform(value, functions) {
|
|
|
28804
29030
|
if (!value || typeof value !== "object") return void 0;
|
|
28805
29031
|
const transform = value;
|
|
28806
29032
|
if (!transform || typeof transform.functionId !== "string") return void 0;
|
|
28807
|
-
|
|
28808
|
-
|
|
28809
|
-
|
|
29033
|
+
const oneFunction = typeof transform.oneFunction === "string" && transform.oneFunction ? transform.oneFunction : void 0;
|
|
29034
|
+
const known = oneFunction ? !!oneFunctionOf(oneFunction)?.reach.includes("outcome-transform") : !!functions[transform.functionId];
|
|
29035
|
+
if (!known || !Array.isArray(transform.args)) return void 0;
|
|
28810
29036
|
const args = transform.args.filter((arg) => {
|
|
28811
29037
|
if (!arg || typeof arg !== "object") return false;
|
|
28812
29038
|
if (arg.source === "response") {
|
|
28813
29039
|
return Array.isArray(arg.path) && arg.path.every((part) => typeof part === "string");
|
|
28814
29040
|
}
|
|
28815
29041
|
if (arg.source === "args") return typeof arg.arg === "string" && !!arg.arg;
|
|
29042
|
+
if (arg.source === "fixed") return typeof arg.value === "string";
|
|
29043
|
+
if (arg.source === "compute") {
|
|
29044
|
+
return typeof arg.name === "string" && !!arg.name;
|
|
29045
|
+
}
|
|
28816
29046
|
return arg.source === "state" && Array.isArray(arg.path) && arg.path.every((part) => typeof part === "string");
|
|
28817
29047
|
});
|
|
28818
|
-
return args.length === transform.args.length ? { functionId: transform.functionId, args } : void 0;
|
|
29048
|
+
return args.length === transform.args.length ? oneFunction ? { functionId: "", args, oneFunction } : { functionId: transform.functionId, args } : void 0;
|
|
28819
29049
|
}
|
|
28820
29050
|
function sanitizeMethods(methods, properties, functions = {}) {
|
|
28821
29051
|
if (!methods || typeof methods !== "object") return {};
|
|
@@ -29518,23 +29748,33 @@ function sanitizeStoreHook(value, properties, methods, roots = properties) {
|
|
|
29518
29748
|
return { reads, writes, calls };
|
|
29519
29749
|
}
|
|
29520
29750
|
function sanitizeAutoCalls(calls, kind) {
|
|
29521
|
-
if (!
|
|
29751
|
+
if (!Array.isArray(calls)) return [];
|
|
29522
29752
|
const result = [];
|
|
29523
29753
|
const seen = /* @__PURE__ */ new Set();
|
|
29524
29754
|
for (const value of calls) {
|
|
29525
29755
|
if (!value || typeof value !== "object") continue;
|
|
29526
29756
|
const call = value;
|
|
29527
29757
|
if (typeof call.id !== "string" || !call.id) continue;
|
|
29528
|
-
|
|
29758
|
+
const methodId = hasStore(kind) && typeof call.methodId === "string" && call.methodId ? call.methodId : void 0;
|
|
29759
|
+
const emits = screenEmitRows({ emits: call.emits }, "emits");
|
|
29760
|
+
if (!methodId && !emits.length) continue;
|
|
29761
|
+
const reads = Array.isArray(call.reads) ? call.reads.filter(
|
|
29762
|
+
(read) => !!read && typeof read === "object" && !!read.root && Array.isArray(read.path)
|
|
29763
|
+
) : [];
|
|
29529
29764
|
if (seen.has(call.id)) continue;
|
|
29530
29765
|
seen.add(call.id);
|
|
29531
29766
|
result.push({
|
|
29532
29767
|
id: call.id,
|
|
29533
|
-
methodId:
|
|
29768
|
+
...methodId ? { methodId } : {},
|
|
29534
29769
|
// Trusted the way a Control's own `outputArgs` is: the slot loader prunes
|
|
29535
29770
|
// unknown Controls and variants and leaves call-site rows alone, and a row
|
|
29536
29771
|
// naming something gone emits nothing rather than breaking the load.
|
|
29537
|
-
|
|
29772
|
+
// Rows answer a method's parameters, so a call-less auto-call keeps none.
|
|
29773
|
+
args: methodId && Array.isArray(call.args) ? call.args : [],
|
|
29774
|
+
...emits.length ? { emits } : {},
|
|
29775
|
+
// Trusted like `args`: a read naming something gone drops at emit and is
|
|
29776
|
+
// reported as an EmitGap (ADR 0206).
|
|
29777
|
+
...reads.length ? { reads } : {},
|
|
29538
29778
|
// Kept only where it was drawn: an absent `when` is derived from the rows
|
|
29539
29779
|
// by screenAutoCallWhen, so a Screen saved before ADR 0080 loads exactly
|
|
29540
29780
|
// as it emitted then.
|
|
@@ -30034,6 +30274,7 @@ function sanitizeOptionSets(optionSets) {
|
|
|
30034
30274
|
function repairSplitShapes(features, screens) {
|
|
30035
30275
|
let nextScreens = screens;
|
|
30036
30276
|
const nextFeatures = {};
|
|
30277
|
+
const keyIds = /* @__PURE__ */ new Map();
|
|
30037
30278
|
let changed = false;
|
|
30038
30279
|
for (const [id, feature] of Object.entries(features)) {
|
|
30039
30280
|
let current = feature;
|
|
@@ -30073,13 +30314,21 @@ function repairSplitShapes(features, screens) {
|
|
|
30073
30314
|
const shapes = { ...current.shapes };
|
|
30074
30315
|
delete shapes[twin.id];
|
|
30075
30316
|
current = { ...current, shapes };
|
|
30317
|
+
shapeKeyIdMap(twin, keeper).forEach(
|
|
30318
|
+
(to, from) => keyIds.set(from, to)
|
|
30319
|
+
);
|
|
30076
30320
|
}
|
|
30077
30321
|
}
|
|
30078
30322
|
}
|
|
30079
30323
|
nextFeatures[id] = current;
|
|
30080
30324
|
if (current !== feature) changed = true;
|
|
30081
30325
|
}
|
|
30082
|
-
|
|
30326
|
+
if (!changed) return { features, screens, keyIds };
|
|
30327
|
+
return {
|
|
30328
|
+
features: rekeyIds(nextFeatures, keyIds),
|
|
30329
|
+
screens: rekeyIds(nextScreens, keyIds),
|
|
30330
|
+
keyIds
|
|
30331
|
+
};
|
|
30083
30332
|
}
|
|
30084
30333
|
function sanitizeDistinct(raw) {
|
|
30085
30334
|
if (!Array.isArray(raw)) return [];
|
|
@@ -30222,7 +30471,12 @@ function decodeWorkspace(stored, docs) {
|
|
|
30222
30471
|
optionSets: sanitizeOptionSets(stored.optionSets),
|
|
30223
30472
|
patterns: sanitizePatterns(stored.patterns),
|
|
30224
30473
|
themes: sanitizeThemes(stored.themes),
|
|
30225
|
-
|
|
30474
|
+
// Re-keyed with the Screens: a template holds bindings the way a slot
|
|
30475
|
+
// does, so a twin's key ids the split repair retired are swapped here too.
|
|
30476
|
+
controlGroups: rekeyIds(
|
|
30477
|
+
sanitizeControlGroups(stored.controlGroups),
|
|
30478
|
+
repaired.keyIds
|
|
30479
|
+
),
|
|
30226
30480
|
// Handed over whole: an adapter keeps them its own way — a slot each in
|
|
30227
30481
|
// localStorage, a markdown file each on disk (ADR 0146).
|
|
30228
30482
|
docs,
|
|
@@ -30231,7 +30485,7 @@ function decodeWorkspace(stored, docs) {
|
|
|
30231
30485
|
// workspace opens emitting exactly what it emitted before, with the
|
|
30232
30486
|
// binding now a fact the User can disagree with (ADR 0119).
|
|
30233
30487
|
navMap: backfilledInstanceArgs(
|
|
30234
|
-
sanitizeNavMap(stored.navMap),
|
|
30488
|
+
rekeyIds(sanitizeNavMap(stored.navMap), repaired.keyIds),
|
|
30235
30489
|
// As its members see it: a row shape may be a shared one (ADR 0162).
|
|
30236
30490
|
(featureId) => {
|
|
30237
30491
|
const feature = refiled.features[featureId];
|
|
@@ -30252,7 +30506,8 @@ function decodeWorkspace(stored, docs) {
|
|
|
30252
30506
|
distinct: sanitizeDistinct(stored.distinct)
|
|
30253
30507
|
},
|
|
30254
30508
|
currentScreenId,
|
|
30255
|
-
palette: sanitizePalette(stored.palette)
|
|
30509
|
+
palette: sanitizePalette(stored.palette),
|
|
30510
|
+
keyIds: repaired.keyIds
|
|
30256
30511
|
};
|
|
30257
30512
|
}
|
|
30258
30513
|
function sanitizeNpmAllowlist(raw) {
|
|
@@ -30574,7 +30829,7 @@ function readDesignSource(files3) {
|
|
|
30574
30829
|
),
|
|
30575
30830
|
DOCS_FOLDER
|
|
30576
30831
|
);
|
|
30577
|
-
const { workspace } = decodeWorkspace(stored, docs);
|
|
30832
|
+
const { workspace, keyIds } = decodeWorkspace(stored, docs);
|
|
30578
30833
|
const screens = [];
|
|
30579
30834
|
workspace.screens.forEach((meta) => {
|
|
30580
30835
|
const raw = parsed(files3[`${DESIGN_SCREENS_DIR}/${meta.id}.json`]);
|
|
@@ -30587,7 +30842,7 @@ function readDesignSource(files3) {
|
|
|
30587
30842
|
screenStep.blob,
|
|
30588
30843
|
variantVocabularyOf(meta, workspace.features)
|
|
30589
30844
|
);
|
|
30590
|
-
if (state) screens.push({ meta, state });
|
|
30845
|
+
if (state) screens.push({ meta, state: rekeyIds(state, keyIds) });
|
|
30591
30846
|
});
|
|
30592
30847
|
const handRaw = parsed(files3[DESIGN_HAND_PATH]);
|
|
30593
30848
|
const hand = handRaw && typeof handRaw === "object" ? handRaw.hand ?? EMPTY_HAND_SCAN : EMPTY_HAND_SCAN;
|
|
@@ -34503,6 +34758,22 @@ var starterFunction = (starter) => ({
|
|
|
34503
34758
|
description: starter.description
|
|
34504
34759
|
});
|
|
34505
34760
|
|
|
34761
|
+
// libs/codegen/src/lib/value-source-helper.ts
|
|
34762
|
+
var VALUE_SOURCE = {
|
|
34763
|
+
static: "static",
|
|
34764
|
+
dynamic: "dynamic"
|
|
34765
|
+
};
|
|
34766
|
+
var VALUE_SOURCES = [
|
|
34767
|
+
VALUE_SOURCE.static,
|
|
34768
|
+
VALUE_SOURCE.dynamic
|
|
34769
|
+
];
|
|
34770
|
+
var hasValueSource = (type) => type === "price_ladder_mark" /* PRICE_LADDER_MARK */;
|
|
34771
|
+
var isValueSource = (value) => VALUE_SOURCES.includes(value);
|
|
34772
|
+
var valueSourceOf = (control) => {
|
|
34773
|
+
if (control?.valueSource) return control.valueSource;
|
|
34774
|
+
return control?.bindings?.[BINDING_SLOT.value] ? VALUE_SOURCE.dynamic : VALUE_SOURCE.static;
|
|
34775
|
+
};
|
|
34776
|
+
|
|
34506
34777
|
// libs/codegen/src/model/history.ts
|
|
34507
34778
|
var HISTORY_DEPTH = 50;
|
|
34508
34779
|
var EMPTY_HISTORY = { undo: [], redo: [] };
|
|
@@ -34788,6 +35059,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34788
35059
|
ONE_CONFIG_SOURCE,
|
|
34789
35060
|
ONE_FUNCTIONS,
|
|
34790
35061
|
ONE_FUNCTION_CATALOG,
|
|
35062
|
+
ONE_FUNCTION_DATA_PARAM,
|
|
34791
35063
|
ONE_FUNCTION_ID_PARAM,
|
|
34792
35064
|
ONE_FUNCTION_MAP_PARAM,
|
|
34793
35065
|
ONE_FUNCTION_PREFIX,
|
|
@@ -34897,6 +35169,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34897
35169
|
USER_VALUE_LABEL,
|
|
34898
35170
|
USER_VALUE_SLOTS,
|
|
34899
35171
|
VALUE_SLOT_LABEL,
|
|
35172
|
+
VALUE_SOURCE,
|
|
34900
35173
|
VARIANT_JOINS,
|
|
34901
35174
|
VARIANT_KINDS,
|
|
34902
35175
|
WC_CONFIG_STORAGE_KEY,
|
|
@@ -35397,6 +35670,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35397
35670
|
hasScreenVariableActionEnumConflict,
|
|
35398
35671
|
hasStore,
|
|
35399
35672
|
hasTextSource,
|
|
35673
|
+
hasValueSource,
|
|
35400
35674
|
hasVariableDrift,
|
|
35401
35675
|
heldFieldIds,
|
|
35402
35676
|
heldProperties,
|
|
@@ -35484,6 +35758,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35484
35758
|
isMessageSlot,
|
|
35485
35759
|
isMethodInUse,
|
|
35486
35760
|
isMountable,
|
|
35761
|
+
isMovingScreenEmit,
|
|
35487
35762
|
isNavAtOrBelow,
|
|
35488
35763
|
isNavInstanceFunction,
|
|
35489
35764
|
isNavRowShape,
|
|
@@ -35565,6 +35840,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35565
35840
|
isValidTimerName,
|
|
35566
35841
|
isValidTranslationKey,
|
|
35567
35842
|
isValidVariantName,
|
|
35843
|
+
isValueSource,
|
|
35568
35844
|
isVariantJoin,
|
|
35569
35845
|
isVariantKind,
|
|
35570
35846
|
jsNativesInGroup,
|
|
@@ -35655,7 +35931,6 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35655
35931
|
mintMenuActionSlot,
|
|
35656
35932
|
mintOutputArm,
|
|
35657
35933
|
mintOutputCall,
|
|
35658
|
-
mintScreenOutputCall,
|
|
35659
35934
|
mistypedScreenArgs,
|
|
35660
35935
|
mistypedStateArgs,
|
|
35661
35936
|
moduleTest,
|
|
@@ -35780,7 +36055,9 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35780
36055
|
outcomeReport,
|
|
35781
36056
|
outcomeTransformError,
|
|
35782
36057
|
outcomeTransformFailure,
|
|
36058
|
+
outcomeTransformFunction,
|
|
35783
36059
|
outcomeTransformFunctionIds,
|
|
36060
|
+
outcomeTransformOneFunction,
|
|
35784
36061
|
outerCall,
|
|
35785
36062
|
outputArgRows,
|
|
35786
36063
|
outputArm,
|
|
@@ -35916,6 +36193,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35916
36193
|
reconcileFormModels,
|
|
35917
36194
|
redirectRouteLiteral,
|
|
35918
36195
|
referencedShapeIds,
|
|
36196
|
+
rekeyIds,
|
|
35919
36197
|
relationshipParent,
|
|
35920
36198
|
releaseBlocker,
|
|
35921
36199
|
remapControlMapNavs,
|
|
@@ -35943,7 +36221,6 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
35943
36221
|
removeOutputArmKeepingBlocks,
|
|
35944
36222
|
removeOutputCall,
|
|
35945
36223
|
removeRuleNode,
|
|
35946
|
-
removeScreenOutputCall,
|
|
35947
36224
|
renameComputedOptionSets,
|
|
35948
36225
|
renameControlOptionSets,
|
|
35949
36226
|
renameFormEventMember,
|
|
@@ -36070,8 +36347,6 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36070
36347
|
screenMethodPayload,
|
|
36071
36348
|
screenMethodSignature,
|
|
36072
36349
|
screenNameKey,
|
|
36073
|
-
screenOutputCallIds,
|
|
36074
|
-
screenOutputCallKeys,
|
|
36075
36350
|
screenPropertiesWithComputeds,
|
|
36076
36351
|
screenTest,
|
|
36077
36352
|
screenVariableActionEnumIds,
|
|
@@ -36134,6 +36409,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36134
36409
|
shapeIdOf,
|
|
36135
36410
|
shapeImportPath,
|
|
36136
36411
|
shapeInterfaceName,
|
|
36412
|
+
shapeKeyIdMap,
|
|
36137
36413
|
shapeKeyOf,
|
|
36138
36414
|
shapeTwinAtOrigin,
|
|
36139
36415
|
shapesInReach,
|
|
@@ -36284,6 +36560,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36284
36560
|
validationFileName,
|
|
36285
36561
|
validationMemberName,
|
|
36286
36562
|
validationTest,
|
|
36563
|
+
valueSourceOf,
|
|
36287
36564
|
variableDrift,
|
|
36288
36565
|
variantCheckError,
|
|
36289
36566
|
variantCheckId,
|