@magmonium/cli 0.8.18 → 0.8.20
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/bin/commands/assets.js +32 -1
- package/bin/commands/config-ci.js +10 -11
- package/bin/commands/configure-wc.js +14 -11
- package/bin/commands/connect.js +11 -8
- package/bin/commands/create-app.js +11 -1
- package/bin/commands/deploy.js +38 -7
- package/codegen/index.js +1531 -663
- package/package.json +1 -1
- package/src/compilers/web-component/lib/installed-pins.d.ts +13 -0
- package/src/compilers/web-component/lib/installed-pins.d.ts.map +1 -0
- package/src/compilers/web-component/lib/installed-pins.js +49 -0
- package/src/compilers/web-component/lib/installed-pins.js.map +1 -0
- package/src/compilers/web-component/lib/ng-build.d.ts.map +1 -1
- package/src/compilers/web-component/lib/ng-build.js +5 -0
- package/src/compilers/web-component/lib/ng-build.js.map +1 -1
- package/src/compilers/worker-compiler.d.ts.map +1 -1
- package/src/compilers/worker-compiler.js +9 -2
- package/src/compilers/worker-compiler.js.map +1 -1
- package/src/core/config.d.ts +44 -0
- package/src/core/config.d.ts.map +1 -1
- package/src/core/config.js +34 -1
- package/src/core/config.js.map +1 -1
- package/src/utils/i18n-gate.d.ts +2 -0
- package/src/utils/i18n-gate.d.ts.map +1 -1
- package/src/utils/i18n-gate.js +12 -2
- package/src/utils/i18n-gate.js.map +1 -1
package/codegen/index.js
CHANGED
|
@@ -84,9 +84,10 @@ __export(index_exports, {
|
|
|
84
84
|
DEFAULT_DEV_SOCKET_URL: () => DEFAULT_DEV_SOCKET_URL,
|
|
85
85
|
DEFAULT_INDEX_ALIAS: () => DEFAULT_INDEX_ALIAS,
|
|
86
86
|
DEFAULT_ITEM_ALIAS: () => DEFAULT_ITEM_ALIAS,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
DEFAULT_KEY_ALIAS: () => DEFAULT_KEY_ALIAS,
|
|
88
|
+
DEFAULT_LOCAL_AUTH_URL: () => DEFAULT_LOCAL_AUTH_URL,
|
|
89
|
+
DEFAULT_LOCAL_BACKEND_URL: () => DEFAULT_LOCAL_BACKEND_URL,
|
|
90
|
+
DEFAULT_LOCAL_SOCKET_URL: () => DEFAULT_LOCAL_SOCKET_URL,
|
|
90
91
|
DEFAULT_PROD_AUTH_URL: () => DEFAULT_PROD_AUTH_URL,
|
|
91
92
|
DEFAULT_PROD_BACKEND_URL: () => DEFAULT_PROD_BACKEND_URL,
|
|
92
93
|
DEFAULT_PROD_SOCKET_URL: () => DEFAULT_PROD_SOCKET_URL,
|
|
@@ -142,6 +143,8 @@ __export(index_exports, {
|
|
|
142
143
|
FORMAT_PIPE_LABEL: () => FORMAT_PIPE_LABEL,
|
|
143
144
|
FORMAT_PIPE_NAMES: () => FORMAT_PIPE_NAMES,
|
|
144
145
|
FORM_NAME_CONFIG_KEY: () => FORM_NAME_CONFIG_KEY,
|
|
146
|
+
FUNCTION_LIBRARY_GROUPS: () => FUNCTION_LIBRARY_GROUPS,
|
|
147
|
+
FUNCTION_STARTERS: () => FUNCTION_STARTERS,
|
|
145
148
|
GENERATED_SET: () => GENERATED_SET,
|
|
146
149
|
GLOBAL_METHOD_CATALOG: () => GLOBAL_METHOD_CATALOG,
|
|
147
150
|
GLOBAL_METHOD_STORES: () => GLOBAL_METHOD_STORES,
|
|
@@ -247,6 +250,7 @@ __export(index_exports, {
|
|
|
247
250
|
PLUGIN_INPUTS_KEY: () => PLUGIN_INPUTS_KEY,
|
|
248
251
|
PLUGIN_LINK_KEY: () => PLUGIN_LINK_KEY,
|
|
249
252
|
PLUGIN_OUTPUTS_KEY: () => PLUGIN_OUTPUTS_KEY,
|
|
253
|
+
PLUGIN_OUTPUT_SHAPES_KEY: () => PLUGIN_OUTPUT_SHAPES_KEY,
|
|
250
254
|
PLUGIN_PORT_KEY: () => PLUGIN_PORT_KEY,
|
|
251
255
|
PLUGIN_SCREEN_KEY: () => PLUGIN_SCREEN_KEY,
|
|
252
256
|
PLUGIN_SOURCE_KEY: () => PLUGIN_SOURCE_KEY,
|
|
@@ -293,6 +297,7 @@ __export(index_exports, {
|
|
|
293
297
|
SHARED_SHAPE_ID_PREFIX: () => SHARED_SHAPE_ID_PREFIX,
|
|
294
298
|
SHIPPED_SHELL_PATHS: () => SHIPPED_SHELL_PATHS,
|
|
295
299
|
SOURCE_LANG: () => SOURCE_LANG,
|
|
300
|
+
STARTER_GROUP: () => STARTER_GROUP,
|
|
296
301
|
STAT_TEXT_SOURCES: () => STAT_TEXT_SOURCES,
|
|
297
302
|
STORAGE_SERVICE: () => STORAGE_SERVICE,
|
|
298
303
|
STYLE_DIRECTIVE_FORM: () => STYLE_DIRECTIVE_FORM,
|
|
@@ -337,6 +342,7 @@ __export(index_exports, {
|
|
|
337
342
|
addMenuGroup: () => addMenuGroup,
|
|
338
343
|
addMenuGroupSeeded: () => addMenuGroupSeeded,
|
|
339
344
|
admitsTextSource: () => admitsTextSource,
|
|
345
|
+
aliasDisplayName: () => aliasDisplayName,
|
|
340
346
|
aliasHoldersInScope: () => aliasHoldersInScope,
|
|
341
347
|
aliasNames: () => aliasNames,
|
|
342
348
|
aliasSourceSlot: () => aliasSourceSlot,
|
|
@@ -380,6 +386,7 @@ __export(index_exports, {
|
|
|
380
386
|
bindablePaths: () => bindablePaths,
|
|
381
387
|
bindingAlwaysPresent: () => bindingAlwaysPresent,
|
|
382
388
|
bindingCanvasText: () => bindingCanvasText,
|
|
389
|
+
bindingCardinality: () => bindingCardinality,
|
|
383
390
|
bindingDataType: () => bindingDataType,
|
|
384
391
|
bindingDisplayText: () => bindingDisplayText,
|
|
385
392
|
bindingExpression: () => bindingExpression,
|
|
@@ -424,6 +431,9 @@ __export(index_exports, {
|
|
|
424
431
|
callArgumentsExpression: () => callArgumentsExpression,
|
|
425
432
|
callError: () => callError,
|
|
426
433
|
callStatement: () => callStatement,
|
|
434
|
+
callTargetKey: () => callTargetKey,
|
|
435
|
+
callTargetName: () => callTargetName,
|
|
436
|
+
callTargetOfKey: () => callTargetOfKey,
|
|
427
437
|
callableMethods: () => callableMethods,
|
|
428
438
|
canAddChildType: () => canAddChildType,
|
|
429
439
|
canAppendFormatPipe: () => canAppendFormatPipe,
|
|
@@ -493,12 +503,15 @@ __export(index_exports, {
|
|
|
493
503
|
collectThemeAssets: () => collectThemeAssets,
|
|
494
504
|
collectTranslationAssets: () => collectTranslationAssets,
|
|
495
505
|
collectTypedComponentInputs: () => collectTypedComponentInputs,
|
|
506
|
+
colorPipeExpression: () => colorPipeExpression,
|
|
507
|
+
colorPipeOf: () => colorPipeOf,
|
|
496
508
|
columnNeedsId: () => columnNeedsId,
|
|
497
509
|
compactControlGroups: () => compactControlGroups,
|
|
498
510
|
compactControlMap: () => compactControlMap,
|
|
499
511
|
comparisonSource: () => comparisonSource,
|
|
500
512
|
componentInputShapeIds: () => componentInputShapeIds,
|
|
501
513
|
componentInputTsType: () => componentInputTsType,
|
|
514
|
+
composeFunctionBinding: () => composeFunctionBinding,
|
|
502
515
|
composeLabelValue: () => composeLabelValue,
|
|
503
516
|
computeError: () => computeError,
|
|
504
517
|
computeId: () => computeId,
|
|
@@ -548,6 +561,7 @@ __export(index_exports, {
|
|
|
548
561
|
createCompute: () => createCompute,
|
|
549
562
|
createCondition: () => createCondition,
|
|
550
563
|
createConfirm: () => createConfirm,
|
|
564
|
+
createFunctionLeaf: () => createFunctionLeaf,
|
|
551
565
|
createGroup: () => createGroup,
|
|
552
566
|
createOpen: () => createOpen,
|
|
553
567
|
createOutputNav: () => createOutputNav,
|
|
@@ -570,14 +584,11 @@ __export(index_exports, {
|
|
|
570
584
|
decodeWorkspace: () => decodeWorkspace,
|
|
571
585
|
defaultCallArgEvent: () => defaultCallArgEvent,
|
|
572
586
|
defaultChildId: () => defaultChildId,
|
|
573
|
-
defaultDevHosts: () => defaultDevHosts,
|
|
574
587
|
defaultEnvironment: () => defaultEnvironment,
|
|
575
588
|
defaultLiteralFor: () => defaultLiteralFor,
|
|
576
|
-
defaultNormalHosts: () => defaultNormalHosts,
|
|
577
589
|
defaultOptionValue: () => defaultOptionValue,
|
|
578
590
|
defaultOutputArm: () => defaultOutputArm,
|
|
579
591
|
defaultOutputOpenValue: () => defaultOutputOpenValue,
|
|
580
|
-
defaultProdHosts: () => defaultProdHosts,
|
|
581
592
|
defaultScreenEmitValue: () => defaultScreenEmitValue,
|
|
582
593
|
defaultScreenWriteValue: () => defaultScreenWriteValue,
|
|
583
594
|
defaultStateWriteValue: () => defaultStateWriteValue,
|
|
@@ -683,7 +694,9 @@ __export(index_exports, {
|
|
|
683
694
|
firstControlAtLayer: () => firstControlAtLayer,
|
|
684
695
|
fittedCaseArgs: () => fittedCaseArgs,
|
|
685
696
|
fixedAllowed: () => fixedAllowed,
|
|
697
|
+
fixedExpression: () => fixedExpression,
|
|
686
698
|
fixedIsText: () => fixedIsText,
|
|
699
|
+
fixedItems: () => fixedItems,
|
|
687
700
|
fnv64: () => fnv64,
|
|
688
701
|
foldedButtonName: () => foldedButtonName,
|
|
689
702
|
foldedButtons: () => foldedButtons,
|
|
@@ -724,6 +737,11 @@ __export(index_exports, {
|
|
|
724
737
|
formatPipeExpression: () => formatPipeExpression,
|
|
725
738
|
formatPipeImports: () => formatPipeImports,
|
|
726
739
|
formatPipesOf: () => formatPipesOf,
|
|
740
|
+
functionBindingArgs: () => functionBindingArgs,
|
|
741
|
+
functionBindingId: () => functionBindingId,
|
|
742
|
+
functionBindingTarget: () => functionBindingTarget,
|
|
743
|
+
functionChipDisplay: () => functionChipDisplay,
|
|
744
|
+
functionError: () => functionError,
|
|
727
745
|
functionFileBase: () => functionFileBase,
|
|
728
746
|
functionFilePath: () => functionFilePath,
|
|
729
747
|
functionImportPath: () => functionImportPath,
|
|
@@ -741,6 +759,7 @@ __export(index_exports, {
|
|
|
741
759
|
generateFormInterface: () => generateFormInterface,
|
|
742
760
|
generateFormValidation: () => generateFormValidation,
|
|
743
761
|
generateFormValidationFile: () => generateFormValidationFile,
|
|
762
|
+
generateFunctionExpression: () => generateFunctionExpression,
|
|
744
763
|
generateFunctionFile: () => generateFunctionFile,
|
|
745
764
|
generateHtml: () => generateHtml,
|
|
746
765
|
generateRuleExpression: () => generateRuleExpression,
|
|
@@ -854,7 +873,9 @@ __export(index_exports, {
|
|
|
854
873
|
isFunctionInUse: () => isFunctionInUse,
|
|
855
874
|
isGeneratedPath: () => isGeneratedPath,
|
|
856
875
|
isHeld: () => isHeld,
|
|
876
|
+
isIdentifier: () => isIdentifier,
|
|
857
877
|
isKeyArg: () => isKeyArg,
|
|
878
|
+
isKeyedRepeat: () => isKeyedRepeat,
|
|
858
879
|
isKnownVariantId: () => isKnownVariantId,
|
|
859
880
|
isLegalNavTail: () => isLegalNavTail,
|
|
860
881
|
isLinkedFormModel: () => isLinkedFormModel,
|
|
@@ -956,12 +977,12 @@ __export(index_exports, {
|
|
|
956
977
|
jsNativesInGroup: () => jsNativesInGroup,
|
|
957
978
|
keyCandidates: () => keyCandidates,
|
|
958
979
|
keyIdKeeper: () => keyIdKeeper,
|
|
980
|
+
labelChainOf: () => labelChainOf,
|
|
959
981
|
labelEmission: () => labelEmission,
|
|
960
982
|
labelReadIsTranslated: () => labelReadIsTranslated,
|
|
961
983
|
landingNavId: () => landingNavId,
|
|
962
984
|
landsOn: () => landsOn,
|
|
963
985
|
landsUnconditionally: () => landsUnconditionally,
|
|
964
|
-
layerLabel: () => layerLabel,
|
|
965
986
|
levelStateComputeds: () => levelStateComputeds,
|
|
966
987
|
libImportsFrom: () => libImportsFrom,
|
|
967
988
|
linkDrift: () => linkDrift,
|
|
@@ -997,8 +1018,11 @@ __export(index_exports, {
|
|
|
997
1018
|
mappedMethod: () => mappedMethod,
|
|
998
1019
|
mappedProperties: () => mappedProperties,
|
|
999
1020
|
maxVariants: () => maxVariants,
|
|
1021
|
+
memberAccess: () => memberAccess,
|
|
1000
1022
|
memberIdsOf: () => memberIdsOf,
|
|
1001
1023
|
memberKindOf: () => memberKindOf,
|
|
1024
|
+
memberStep: () => memberStep,
|
|
1025
|
+
memberToken: () => memberToken,
|
|
1002
1026
|
menuActionCheckLabel: () => menuActionCheckLabel,
|
|
1003
1027
|
menuActionKey: () => menuActionKey,
|
|
1004
1028
|
menuActionKeys: () => menuActionKeys,
|
|
@@ -1101,6 +1125,7 @@ __export(index_exports, {
|
|
|
1101
1125
|
newInstanceFunctionOption: () => newInstanceFunctionOption,
|
|
1102
1126
|
newOutputArmCheck: () => newOutputArmCheck,
|
|
1103
1127
|
newRepeatSpec: () => newRepeatSpec,
|
|
1128
|
+
newerVersion: () => newerVersion,
|
|
1104
1129
|
nextAliasName: () => nextAliasName,
|
|
1105
1130
|
nextCallArgRow: () => nextCallArgRow,
|
|
1106
1131
|
nextFieldName: () => nextFieldName,
|
|
@@ -1245,14 +1270,18 @@ __export(index_exports, {
|
|
|
1245
1270
|
pickFolder: () => pickFolder,
|
|
1246
1271
|
pickedNavTail: () => pickedNavTail,
|
|
1247
1272
|
planScreenEmit: () => planScreenEmit,
|
|
1273
|
+
pluginContractResync: () => pluginContractResync,
|
|
1248
1274
|
pluginContracts: () => pluginContracts,
|
|
1249
1275
|
pluginInputSlot: () => pluginInputSlot,
|
|
1250
1276
|
pluginNamesOf: () => pluginNamesOf,
|
|
1251
1277
|
pluginOriginKey: () => pluginOriginKey,
|
|
1278
|
+
pluginOutputShapeOf: () => pluginOutputShapeOf,
|
|
1252
1279
|
pluginPickWrites: () => pluginPickWrites,
|
|
1253
1280
|
pluginPortOf: () => pluginPortOf,
|
|
1254
1281
|
pluginSourceOf: () => pluginSourceOf,
|
|
1282
|
+
presetHosts: () => presetHosts,
|
|
1255
1283
|
propertiesWithComputeds: () => propertiesWithComputeds,
|
|
1284
|
+
propertyKey: () => propertyKey,
|
|
1256
1285
|
pruneFormEventReads: () => pruneFormEventReads,
|
|
1257
1286
|
pruneMappings: () => pruneMappings,
|
|
1258
1287
|
pruneMenuActions: () => pruneMenuActions,
|
|
@@ -1267,6 +1296,7 @@ __export(index_exports, {
|
|
|
1267
1296
|
pureFunctionArgs: () => pureFunctionArgs,
|
|
1268
1297
|
pureFunctionTest: () => pureFunctionTest,
|
|
1269
1298
|
pureTarget: () => pureTarget,
|
|
1299
|
+
putSectionTableColumn: () => putSectionTableColumn,
|
|
1270
1300
|
quantifierApplies: () => quantifierApplies,
|
|
1271
1301
|
readDesignSource: () => readDesignSource,
|
|
1272
1302
|
readFileAt: () => readFileAt,
|
|
@@ -1320,6 +1350,7 @@ __export(index_exports, {
|
|
|
1320
1350
|
repairMessageVariables: () => repairMessageVariables,
|
|
1321
1351
|
repairSplitShapes: () => repairSplitShapes,
|
|
1322
1352
|
repairTranslationMarkup: () => repairTranslationMarkup,
|
|
1353
|
+
repeatEntryLets: () => repeatEntryLets,
|
|
1323
1354
|
repeatGapReason: () => repeatGapReason,
|
|
1324
1355
|
repeatHeader: () => repeatHeader,
|
|
1325
1356
|
repeatSpec: () => repeatSpec,
|
|
@@ -1355,10 +1386,13 @@ __export(index_exports, {
|
|
|
1355
1386
|
routeTargets: () => routeTargets,
|
|
1356
1387
|
routerLinkMode: () => routerLinkMode,
|
|
1357
1388
|
routesNavTail: () => routesNavTail,
|
|
1389
|
+
rowMemberOptions: () => rowMemberOptions,
|
|
1358
1390
|
rowsWithOneDefault: () => rowsWithOneDefault,
|
|
1359
1391
|
ruleCalls: () => ruleCalls,
|
|
1360
1392
|
ruleChecks: () => ruleChecks,
|
|
1361
1393
|
ruleError: () => ruleError,
|
|
1394
|
+
ruleFunctionImports: () => ruleFunctionImports,
|
|
1395
|
+
ruleFunctions: () => ruleFunctions,
|
|
1362
1396
|
ruleGlobalStores: () => ruleGlobalStores,
|
|
1363
1397
|
ruleNavs: () => ruleNavs,
|
|
1364
1398
|
ruleReferencedIds: () => ruleReferencedIds,
|
|
@@ -1467,6 +1501,7 @@ __export(index_exports, {
|
|
|
1467
1501
|
seededMenuOptions: () => seededMenuOptions,
|
|
1468
1502
|
segmentOptions: () => segmentOptions,
|
|
1469
1503
|
selectableShapes: () => selectableShapes,
|
|
1504
|
+
seriesMemberPicks: () => seriesMemberPicks,
|
|
1470
1505
|
setArmClosesOverlay: () => setArmClosesOverlay,
|
|
1471
1506
|
setArmDialog: () => setArmDialog,
|
|
1472
1507
|
setArmNav: () => setArmNav,
|
|
@@ -1474,6 +1509,7 @@ __export(index_exports, {
|
|
|
1474
1509
|
setMenuActionChecks: () => setMenuActionChecks,
|
|
1475
1510
|
setOutputArmChecks: () => setOutputArmChecks,
|
|
1476
1511
|
setOutputArmMode: () => setOutputArmMode,
|
|
1512
|
+
setOutputArmStartsChain: () => setOutputArmStartsChain,
|
|
1477
1513
|
setVariantJoin: () => setVariantJoin,
|
|
1478
1514
|
shadowOnPath: () => shadowOnPath,
|
|
1479
1515
|
shadowedShapes: () => shadowedShapes,
|
|
@@ -1501,6 +1537,7 @@ __export(index_exports, {
|
|
|
1501
1537
|
staleCases: () => staleCases,
|
|
1502
1538
|
staleMenuActionItems: () => staleMenuActionItems,
|
|
1503
1539
|
standardMenuConfigs: () => standardMenuConfigs,
|
|
1540
|
+
starterFunction: () => starterFunction,
|
|
1504
1541
|
stateComputedArgExpression: () => stateComputedArgExpression,
|
|
1505
1542
|
stateComputedArgHeldType: () => stateComputedArgHeldType,
|
|
1506
1543
|
stateInterfaceName: () => stateInterfaceName,
|
|
@@ -1518,6 +1555,7 @@ __export(index_exports, {
|
|
|
1518
1555
|
stateWriteTargets: () => stateWriteTargets,
|
|
1519
1556
|
stateWriteToggleAllowed: () => stateWriteToggleAllowed,
|
|
1520
1557
|
stateWriteValueKinds: () => stateWriteValueKinds,
|
|
1558
|
+
staticHeadSource: () => staticHeadSource,
|
|
1521
1559
|
staticLabelSource: () => staticLabelSource,
|
|
1522
1560
|
staticLiteralType: () => staticLiteralType,
|
|
1523
1561
|
staticLiteralValue: () => staticLiteralValue,
|
|
@@ -1577,6 +1615,7 @@ __export(index_exports, {
|
|
|
1577
1615
|
toPascalCase: () => toPascalCase,
|
|
1578
1616
|
toSectionTableColumns: () => toSectionTableColumns,
|
|
1579
1617
|
toggleFieldOptionValue: () => toggleFieldOptionValue,
|
|
1618
|
+
transformBindingLeaves: () => transformBindingLeaves,
|
|
1580
1619
|
transformGapDetail: () => transformGapDetail,
|
|
1581
1620
|
transformIncomplete: () => transformIncomplete,
|
|
1582
1621
|
transformLabel: () => transformLabel,
|
|
@@ -1675,11 +1714,14 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
1675
1714
|
ControlType2["SECTION"] = "section";
|
|
1676
1715
|
ControlType2["SECTION_HEADER"] = "section_header";
|
|
1677
1716
|
ControlType2["SECTION_HEADER_LABEL"] = "section_header_label";
|
|
1717
|
+
ControlType2["SECTION_FOOTER"] = "section_footer";
|
|
1678
1718
|
ControlType2["SECTION_HERO"] = "section_hero";
|
|
1679
1719
|
ControlType2["SECTION_CAROUSEL"] = "section_carousel";
|
|
1680
1720
|
ControlType2["SECTION_TABLE"] = "section_table";
|
|
1681
1721
|
ControlType2["SECTION_TABLE_ROW"] = "section_table_row";
|
|
1682
1722
|
ControlType2["SECTION_TABLE_CELL"] = "section_table_cell";
|
|
1723
|
+
ControlType2["SECTION_CHART"] = "section_chart";
|
|
1724
|
+
ControlType2["SECTION_CHART_SERIES"] = "section_chart_series";
|
|
1683
1725
|
ControlType2["LIST"] = "list";
|
|
1684
1726
|
ControlType2["SECTION_SEARCH"] = "section_search";
|
|
1685
1727
|
ControlType2["SECTION_ACTION"] = "section_action";
|
|
@@ -1704,6 +1746,7 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
1704
1746
|
ControlType2["STAT"] = "stat";
|
|
1705
1747
|
ControlType2["STAT_VALUE"] = "stat_value";
|
|
1706
1748
|
ControlType2["STAT_CORNER"] = "stat_corner";
|
|
1749
|
+
ControlType2["HEAT_SWATCH"] = "heat_swatch";
|
|
1707
1750
|
ControlType2["FORM"] = "form";
|
|
1708
1751
|
ControlType2["FIELD"] = "field";
|
|
1709
1752
|
ControlType2["SECTION_BUTTON_GROUP"] = "section_button_group";
|
|
@@ -1907,7 +1950,9 @@ document \u2014 there is one source and two places it is read.
|
|
|
1907
1950
|
Register the app in the Magmonium Store first \u2014 that is what mints its app id \u2014
|
|
1908
1951
|
and link it in One UI, so every Push writes that id into \`.magmonium/index.json\`.
|
|
1909
1952
|
CD reads the app id from \`appTarget.appId\` there, and the backend from
|
|
1910
|
-
\`appTarget.environment.
|
|
1953
|
+
\`appTarget.environment.hosts.backendUrl\` \u2014 the Environment panel's Backend URL.
|
|
1954
|
+
Pick \`dev\` or \`prod\` there before you merge: a \`local\` one points at your own
|
|
1955
|
+
machine, which a runner cannot reach, so CD refuses it.
|
|
1911
1956
|
|
|
1912
1957
|
Your deploy token is your own, not the app's: rotate it once from the Store
|
|
1913
1958
|
and reuse it for every app you own or collaborate on. It is the one secret, in
|
|
@@ -1953,39 +1998,39 @@ The job builds the bundle, \`POST\`s it to \`/store/v1/bundle/<app-id>\`, then
|
|
|
1953
1998
|
|
|
1954
1999
|
// libs/codegen/src/model/app-target.ts
|
|
1955
2000
|
var APP_MODES = ["existing", "new"];
|
|
1956
|
-
var ENVIRONMENT_PRESETS = [
|
|
1957
|
-
"normal",
|
|
1958
|
-
"dev",
|
|
1959
|
-
"prod"
|
|
1960
|
-
];
|
|
2001
|
+
var ENVIRONMENT_PRESETS = ["local", "dev", "prod"];
|
|
1961
2002
|
var DEFAULT_PROD_AUTH_URL = "https://api.magmonium.com";
|
|
1962
2003
|
var DEFAULT_PROD_BACKEND_URL = "https://api.magmonium.com";
|
|
1963
2004
|
var DEFAULT_PROD_SOCKET_URL = "wss://pops.magmonium.com";
|
|
1964
2005
|
var DEFAULT_DEV_AUTH_URL = "https://api-dev.magmonium.com";
|
|
1965
2006
|
var DEFAULT_DEV_BACKEND_URL = "https://api-dev.magmonium.com";
|
|
1966
2007
|
var DEFAULT_DEV_SOCKET_URL = "wss://pops-dev.magmonium.com";
|
|
1967
|
-
var
|
|
1968
|
-
var
|
|
1969
|
-
var
|
|
1970
|
-
var
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2008
|
+
var DEFAULT_LOCAL_AUTH_URL = "https://api-dev.magmonium.com";
|
|
2009
|
+
var DEFAULT_LOCAL_BACKEND_URL = "http://localhost:8000";
|
|
2010
|
+
var DEFAULT_LOCAL_SOCKET_URL = "wss://pops-dev.magmonium.com";
|
|
2011
|
+
var PRESET_HOSTS = {
|
|
2012
|
+
local: {
|
|
2013
|
+
authUrl: DEFAULT_LOCAL_AUTH_URL,
|
|
2014
|
+
backendUrl: DEFAULT_LOCAL_BACKEND_URL,
|
|
2015
|
+
socketUrl: DEFAULT_LOCAL_SOCKET_URL
|
|
2016
|
+
},
|
|
2017
|
+
dev: {
|
|
2018
|
+
authUrl: DEFAULT_DEV_AUTH_URL,
|
|
2019
|
+
backendUrl: DEFAULT_DEV_BACKEND_URL,
|
|
2020
|
+
socketUrl: DEFAULT_DEV_SOCKET_URL
|
|
2021
|
+
},
|
|
2022
|
+
prod: {
|
|
2023
|
+
authUrl: DEFAULT_PROD_AUTH_URL,
|
|
2024
|
+
backendUrl: DEFAULT_PROD_BACKEND_URL,
|
|
2025
|
+
socketUrl: DEFAULT_PROD_SOCKET_URL
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
var presetHosts = (preset) => ({
|
|
2029
|
+
...PRESET_HOSTS[preset]
|
|
1984
2030
|
});
|
|
1985
|
-
var defaultEnvironment = (
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
dev: { ...defaultDevHosts(), ...overrides?.dev }
|
|
2031
|
+
var defaultEnvironment = (hosts, preset = "local") => ({
|
|
2032
|
+
preset,
|
|
2033
|
+
hosts: { ...presetHosts(preset), ...hosts }
|
|
1989
2034
|
});
|
|
1990
2035
|
var EMPTY_APP_TARGET = {
|
|
1991
2036
|
// `new` rather than `existing`: an empty AppTarget has no folder to read
|
|
@@ -2548,22 +2593,41 @@ function generateShapeInterface(shapes, shape, options = {}) {
|
|
|
2548
2593
|
).join("\n") : "";
|
|
2549
2594
|
const audienceImport = (options.imports ?? true) && shape.keys.some((key2) => key2.dataType.type === "audience") ? `import type { ${AUDIENCE_TYPE_NAME} } from '${AUDIENCE_TYPE_PACKAGE}';` : "";
|
|
2550
2595
|
const members = shape.keys.map(
|
|
2551
|
-
(key2) => ` ${key2.name}: ${tsTypeExpression(
|
|
2596
|
+
(key2) => ` ${shape.positional ? tupleLabel(key2.name) : propertyKey(key2.name)}: ${tsTypeExpression(
|
|
2552
2597
|
shapes,
|
|
2553
2598
|
key2.dataType,
|
|
2554
2599
|
key2.cardinality
|
|
2555
|
-
)}
|
|
2600
|
+
)}${shape.positional ? "," : ";"}`
|
|
2556
2601
|
).join("\n");
|
|
2557
2602
|
const head = [imports, audienceImport].filter(Boolean).join("\n");
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
)} {
|
|
2603
|
+
const body = shape.positional ? `export type ${shapeInterfaceName(shape.name)} = [
|
|
2604
|
+
${members}
|
|
2605
|
+
];
|
|
2606
|
+
` : `export interface ${shapeInterfaceName(shape.name)} {
|
|
2563
2607
|
${members}
|
|
2564
2608
|
}
|
|
2565
2609
|
`;
|
|
2610
|
+
return `${head ? `${head}
|
|
2611
|
+
|
|
2612
|
+
` : ""}${body}`;
|
|
2613
|
+
}
|
|
2614
|
+
var IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
|
|
2615
|
+
var isIdentifier = (name3) => IDENTIFIER.test(name3);
|
|
2616
|
+
var quotedName = (name3) => `'${name3.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2617
|
+
var propertyKey = (name3) => isIdentifier(name3) ? name3 : quotedName(name3);
|
|
2618
|
+
var tupleLabel = (name3) => {
|
|
2619
|
+
const spelled = name3.replace(/[^\w$]/g, "_");
|
|
2620
|
+
return /^[A-Za-z_$]/.test(spelled) ? spelled : `_${spelled}`;
|
|
2621
|
+
};
|
|
2622
|
+
function memberAccess(shape, key2, optional = false) {
|
|
2623
|
+
if (!shape?.positional) {
|
|
2624
|
+
return isIdentifier(key2.name) ? `${optional ? "?." : "."}${key2.name}` : `${optional ? "?." : ""}[${quotedName(key2.name)}]`;
|
|
2625
|
+
}
|
|
2626
|
+
const index = shape.keys.findIndex((k) => k.id === key2.id);
|
|
2627
|
+
return `${optional ? "?." : ""}[${index}]`;
|
|
2566
2628
|
}
|
|
2629
|
+
var memberStep = (dot, name3) => name3.startsWith("[") ? dot === "?." ? `?.${name3}` : name3 : `${dot}${name3}`;
|
|
2630
|
+
var memberToken = (shape, key2) => shape?.positional ? `[${shape.keys.findIndex((k) => k.id === key2.id)}]` : key2.name;
|
|
2567
2631
|
function pruneUnknownShapeRefs(holder, shapes) {
|
|
2568
2632
|
const shapeId = shapeIdOf(holder.dataType);
|
|
2569
2633
|
if (!shapeId || shapes[shapeId]) return holder;
|
|
@@ -2574,17 +2638,21 @@ function statePathRead(path, properties, shapes, receiver, guarded) {
|
|
|
2574
2638
|
const property = properties[head];
|
|
2575
2639
|
if (!property) return "undefined";
|
|
2576
2640
|
let dataType = property.dataType;
|
|
2577
|
-
const
|
|
2641
|
+
const accesses = [];
|
|
2578
2642
|
for (const keyId of rest) {
|
|
2579
2643
|
const shape = dataType?.type === "shape" ? shapes[dataType.shapeId] : void 0;
|
|
2580
2644
|
const key2 = shape?.keys.find((k) => k.id === keyId);
|
|
2581
2645
|
if (!key2) return "undefined";
|
|
2582
|
-
|
|
2646
|
+
accesses.push(
|
|
2647
|
+
memberAccess(shape, key2, !accesses.length && !guarded && !!shape?.positional)
|
|
2648
|
+
);
|
|
2583
2649
|
dataType = key2.dataType;
|
|
2584
2650
|
}
|
|
2585
|
-
if (!
|
|
2651
|
+
if (!accesses.length)
|
|
2586
2652
|
return `${receiver}.${property.name}()${guarded ? "!" : ""}`;
|
|
2587
|
-
|
|
2653
|
+
const [first, ...more] = accesses;
|
|
2654
|
+
const lead = first.startsWith("?.") ? first : `${guarded ? "!" : "?"}${first}`;
|
|
2655
|
+
return `${receiver}.${property.name}()${lead}${more.join("")}`;
|
|
2588
2656
|
}
|
|
2589
2657
|
|
|
2590
2658
|
// libs/one/src/lib/shared/enum/assets/form-asset-folder.ts
|
|
@@ -2613,7 +2681,8 @@ var LAYOUT_ASSET_FOLDER = {
|
|
|
2613
2681
|
section_carousel: "section_carousels",
|
|
2614
2682
|
text_output: "text_outputs",
|
|
2615
2683
|
list: "lists",
|
|
2616
|
-
section_table: "section_tables"
|
|
2684
|
+
section_table: "section_tables",
|
|
2685
|
+
section_chart: "section_charts"
|
|
2617
2686
|
};
|
|
2618
2687
|
|
|
2619
2688
|
// libs/one/src/lib/shared/ui/form/model/form-type.ts
|
|
@@ -3111,6 +3180,7 @@ var hasContent = (node) => (node.childrens ?? []).some((child) => child.type ===
|
|
|
3111
3180
|
var CONTROL_RELATIONSHIPS = {
|
|
3112
3181
|
["section" /* SECTION */]: [
|
|
3113
3182
|
"section_header" /* SECTION_HEADER */,
|
|
3183
|
+
"section_footer" /* SECTION_FOOTER */,
|
|
3114
3184
|
"section_search" /* SECTION_SEARCH */,
|
|
3115
3185
|
"section_action" /* SECTION_ACTION */,
|
|
3116
3186
|
"section_filter" /* SECTION_FILTER */,
|
|
@@ -3121,6 +3191,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3121
3191
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3122
3192
|
"list" /* LIST */,
|
|
3123
3193
|
"section_table" /* SECTION_TABLE */,
|
|
3194
|
+
"section_chart" /* SECTION_CHART */,
|
|
3124
3195
|
"row" /* ROW */,
|
|
3125
3196
|
"col" /* COL */,
|
|
3126
3197
|
"flex" /* FLEX */,
|
|
@@ -3158,6 +3229,10 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3158
3229
|
// line is, and everything beside it (the toggle, the input) is the bar
|
|
3159
3230
|
// itself rather than a child.
|
|
3160
3231
|
["section_search" /* SECTION_SEARCH */]: ["section_header_label" /* SECTION_HEADER_LABEL */],
|
|
3232
|
+
// Its label slot and nothing else — the SectionHeader's title slot, caught
|
|
3233
|
+
// by the footer's unselected `ng-content`. Everything else a footer is
|
|
3234
|
+
// (`sticky`, `align`) is a setting rather than a child.
|
|
3235
|
+
["section_footer" /* SECTION_FOOTER */]: ["section_header_label" /* SECTION_HEADER_LABEL */],
|
|
3161
3236
|
// Buttons and nothing else — and unlike the SectionButtonGroup it looks like,
|
|
3162
3237
|
// they are *consumed* rather than projected: an `m-action` renders raw
|
|
3163
3238
|
// `<button>`s from a list, so a Button dropped here emits no tag of its own
|
|
@@ -3203,12 +3278,14 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3203
3278
|
"plugin" /* PLUGIN */,
|
|
3204
3279
|
"user" /* USER */,
|
|
3205
3280
|
"stat" /* STAT */,
|
|
3281
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3206
3282
|
"flex" /* FLEX */,
|
|
3207
3283
|
"card" /* CARD */,
|
|
3208
3284
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3209
3285
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3210
3286
|
"list" /* LIST */,
|
|
3211
3287
|
"section_table" /* SECTION_TABLE */,
|
|
3288
|
+
"section_chart" /* SECTION_CHART */,
|
|
3212
3289
|
"section_filter" /* SECTION_FILTER */,
|
|
3213
3290
|
"section_filter_group" /* SECTION_FILTER_GROUP */,
|
|
3214
3291
|
"form" /* FORM */,
|
|
@@ -3243,6 +3320,18 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3243
3320
|
],
|
|
3244
3321
|
// Cells and nothing else — a `<tr>` holds `<td>`s.
|
|
3245
3322
|
["section_table_row" /* SECTION_TABLE_ROW */]: ["section_table_cell" /* SECTION_TABLE_CELL */],
|
|
3323
|
+
// Series, a Repeat holding series, and a branch choosing between them — the
|
|
3324
|
+
// SectionTable's list with its rows swapped for lines (libs/one GLOSSARY.md
|
|
3325
|
+
// SectionChart). A Repeat and a branch are transparent, so a repeated series
|
|
3326
|
+
// lands here too. Nothing else: the plot, legend, presets and navigator are
|
|
3327
|
+
// the chart itself, never children.
|
|
3328
|
+
["section_chart" /* SECTION_CHART */]: [
|
|
3329
|
+
"section_chart_series" /* SECTION_CHART_SERIES */,
|
|
3330
|
+
"repeat" /* REPEAT */,
|
|
3331
|
+
"variant_branch" /* VARIANT_BRANCH */
|
|
3332
|
+
],
|
|
3333
|
+
// A leaf: a series is its rows and the two members it reads off them.
|
|
3334
|
+
["section_chart_series" /* SECTION_CHART_SERIES */]: [],
|
|
3246
3335
|
// Anything a Col holds that is content rather than layout: a cell is one
|
|
3247
3336
|
// box of one line, so a Section, a Row or an outlet has no business in it.
|
|
3248
3337
|
["section_table_cell" /* SECTION_TABLE_CELL */]: [
|
|
@@ -3253,6 +3342,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3253
3342
|
"img" /* IMG */,
|
|
3254
3343
|
"user" /* USER */,
|
|
3255
3344
|
"stat" /* STAT */,
|
|
3345
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3256
3346
|
"flex" /* FLEX */,
|
|
3257
3347
|
"card" /* CARD */,
|
|
3258
3348
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
@@ -3277,12 +3367,14 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3277
3367
|
"plugin" /* PLUGIN */,
|
|
3278
3368
|
"user" /* USER */,
|
|
3279
3369
|
"stat" /* STAT */,
|
|
3370
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3280
3371
|
"flex" /* FLEX */,
|
|
3281
3372
|
"card" /* CARD */,
|
|
3282
3373
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3283
3374
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3284
3375
|
"list" /* LIST */,
|
|
3285
3376
|
"section_table" /* SECTION_TABLE */,
|
|
3377
|
+
"section_chart" /* SECTION_CHART */,
|
|
3286
3378
|
"section_filter" /* SECTION_FILTER */,
|
|
3287
3379
|
"section_filter_group" /* SECTION_FILTER_GROUP */,
|
|
3288
3380
|
"form" /* FORM */,
|
|
@@ -3308,12 +3400,14 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3308
3400
|
"plugin" /* PLUGIN */,
|
|
3309
3401
|
"user" /* USER */,
|
|
3310
3402
|
"stat" /* STAT */,
|
|
3403
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3311
3404
|
"flex" /* FLEX */,
|
|
3312
3405
|
"card" /* CARD */,
|
|
3313
3406
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3314
3407
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3315
3408
|
"list" /* LIST */,
|
|
3316
3409
|
"section_table" /* SECTION_TABLE */,
|
|
3410
|
+
"section_chart" /* SECTION_CHART */,
|
|
3317
3411
|
"section_filter" /* SECTION_FILTER */,
|
|
3318
3412
|
"section_filter_group" /* SECTION_FILTER_GROUP */,
|
|
3319
3413
|
"form" /* FORM */,
|
|
@@ -3343,11 +3437,13 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3343
3437
|
"plugin" /* PLUGIN */,
|
|
3344
3438
|
"user" /* USER */,
|
|
3345
3439
|
"stat" /* STAT */,
|
|
3440
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3346
3441
|
"card" /* CARD */,
|
|
3347
3442
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3348
3443
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3349
3444
|
"list" /* LIST */,
|
|
3350
3445
|
"section_table" /* SECTION_TABLE */,
|
|
3446
|
+
"section_chart" /* SECTION_CHART */,
|
|
3351
3447
|
"section_filter" /* SECTION_FILTER */,
|
|
3352
3448
|
"section_filter_group" /* SECTION_FILTER_GROUP */,
|
|
3353
3449
|
"form" /* FORM */,
|
|
@@ -3374,11 +3470,13 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3374
3470
|
"plugin" /* PLUGIN */,
|
|
3375
3471
|
"user" /* USER */,
|
|
3376
3472
|
"stat" /* STAT */,
|
|
3473
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3377
3474
|
"card" /* CARD */,
|
|
3378
3475
|
"chat_bubble" /* CHAT_BUBBLE */,
|
|
3379
3476
|
"section_carousel" /* SECTION_CAROUSEL */,
|
|
3380
3477
|
"list" /* LIST */,
|
|
3381
3478
|
"section_table" /* SECTION_TABLE */,
|
|
3479
|
+
"section_chart" /* SECTION_CHART */,
|
|
3382
3480
|
"section_filter" /* SECTION_FILTER */,
|
|
3383
3481
|
"section_filter_group" /* SECTION_FILTER_GROUP */,
|
|
3384
3482
|
"form" /* FORM */,
|
|
@@ -3437,6 +3535,7 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3437
3535
|
"remote" /* REMOTE */,
|
|
3438
3536
|
"plugin" /* PLUGIN */,
|
|
3439
3537
|
"user" /* USER */,
|
|
3538
|
+
"heat_swatch" /* HEAT_SWATCH */,
|
|
3440
3539
|
"button" /* BUTTON */,
|
|
3441
3540
|
"context_menu" /* CONTEXT_MENU */,
|
|
3442
3541
|
"audience_picker" /* AUDIENCE_PICKER */,
|
|
@@ -3513,6 +3612,9 @@ var CONTROL_RELATIONSHIPS = {
|
|
|
3513
3612
|
// figure is drawn inside it.
|
|
3514
3613
|
["stat_value" /* STAT_VALUE */]: ["flex" /* FLEX */],
|
|
3515
3614
|
["stat_corner" /* STAT_CORNER */]: ["flex" /* FLEX */],
|
|
3615
|
+
// A leaf: a block of colour holds nothing, and the figure it stands for is a
|
|
3616
|
+
// text laid beside it by the Flex that holds both.
|
|
3617
|
+
["heat_swatch" /* HEAT_SWATCH */]: [],
|
|
3516
3618
|
// Content like a Logo, but the one content Control that is not a leaf: what
|
|
3517
3619
|
// `m-user` projects beneath the name is a ContentControl, the same single
|
|
3518
3620
|
// child a card Field takes and gated the same way, through `contentSlotOf`.
|
|
@@ -3569,6 +3671,8 @@ var canUseArmKind = (branch, kind, controlMap, currentArmId) => {
|
|
|
3569
3671
|
var CONTROL_MAX_CHILDREN = {
|
|
3570
3672
|
["section" /* SECTION */]: {
|
|
3571
3673
|
["section_header" /* SECTION_HEADER */]: 1,
|
|
3674
|
+
// One `<ng-content select="m-section-footer" />` closing the Section.
|
|
3675
|
+
["section_footer" /* SECTION_FOOTER */]: 1,
|
|
3572
3676
|
["section_search" /* SECTION_SEARCH */]: 1,
|
|
3573
3677
|
// One `<ng-content select="m-action, m-one-action" />` per Section, so a
|
|
3574
3678
|
// second bar has nowhere to land (libs/one SectionComponent).
|
|
@@ -3656,7 +3760,8 @@ var canPlaceChild = (parent, childType, controlMap) => {
|
|
|
3656
3760
|
if (isSectionHeaderSlotFamily(childType)) {
|
|
3657
3761
|
const hosts = [
|
|
3658
3762
|
"section_header" /* SECTION_HEADER */,
|
|
3659
|
-
"section_search" /* SECTION_SEARCH
|
|
3763
|
+
"section_search" /* SECTION_SEARCH */,
|
|
3764
|
+
"section_footer" /* SECTION_FOOTER */
|
|
3660
3765
|
];
|
|
3661
3766
|
if (!parent || !hosts.includes(parent.type)) return false;
|
|
3662
3767
|
return !(parent.childrens ?? []).some(
|
|
@@ -3707,6 +3812,7 @@ var OWN_DIRECTIVES = {
|
|
|
3707
3812
|
["section" /* SECTION */]: ["mAccordion", "mAccordionGroup", "routerLink"],
|
|
3708
3813
|
["section_header" /* SECTION_HEADER */]: ["routerLink"],
|
|
3709
3814
|
["section_header_label" /* SECTION_HEADER_LABEL */]: ["routerLink"],
|
|
3815
|
+
["section_footer" /* SECTION_FOOTER */]: ["routerLink"],
|
|
3710
3816
|
["section_search" /* SECTION_SEARCH */]: ["routerLink"],
|
|
3711
3817
|
["section_filter" /* SECTION_FILTER */]: ["routerLink"],
|
|
3712
3818
|
["section_filter_group" /* SECTION_FILTER_GROUP */]: ["routerLink"],
|
|
@@ -3726,6 +3832,8 @@ var OWN_DIRECTIVES = {
|
|
|
3726
3832
|
["section_table" /* SECTION_TABLE */]: [],
|
|
3727
3833
|
["section_table_row" /* SECTION_TABLE_ROW */]: [],
|
|
3728
3834
|
["section_table_cell" /* SECTION_TABLE_CELL */]: [],
|
|
3835
|
+
["section_chart" /* SECTION_CHART */]: [],
|
|
3836
|
+
["section_chart_series" /* SECTION_CHART_SERIES */]: [],
|
|
3729
3837
|
["list" /* LIST */]: ["routerLink"],
|
|
3730
3838
|
["row" /* ROW */]: ["routerLink"],
|
|
3731
3839
|
["col" /* COL */]: ["mModal", "mSidePanel", "routerLink"],
|
|
@@ -3747,6 +3855,7 @@ var OWN_DIRECTIVES = {
|
|
|
3747
3855
|
["stat" /* STAT */]: ["routerLink"],
|
|
3748
3856
|
["stat_value" /* STAT_VALUE */]: ["routerLink"],
|
|
3749
3857
|
["stat_corner" /* STAT_CORNER */]: ["routerLink"],
|
|
3858
|
+
["heat_swatch" /* HEAT_SWATCH */]: ["routerLink"],
|
|
3750
3859
|
["form" /* FORM */]: ["routerLink"],
|
|
3751
3860
|
["field" /* FIELD */]: ["mOptions", "routerLink"],
|
|
3752
3861
|
// Nothing to attach: a ContentControl emits an `ng-template` — where a
|
|
@@ -3791,6 +3900,9 @@ var OWN_DIRECTIVES = {
|
|
|
3791
3900
|
};
|
|
3792
3901
|
var STYLE_REFUSED = /* @__PURE__ */ new Set([
|
|
3793
3902
|
"root" /* ROOT */,
|
|
3903
|
+
// Draws nothing of its own — the chart draws every series — so a padding or
|
|
3904
|
+
// margin on its host would space an element nobody sees.
|
|
3905
|
+
"section_chart_series" /* SECTION_CHART_SERIES */,
|
|
3794
3906
|
"variant_branch" /* VARIANT_BRANCH */,
|
|
3795
3907
|
"branch_arm" /* BRANCH_ARM */,
|
|
3796
3908
|
"repeat" /* REPEAT */,
|
|
@@ -3876,6 +3988,7 @@ var CONTROL_LABEL = {
|
|
|
3876
3988
|
["section" /* SECTION */]: "section",
|
|
3877
3989
|
["section_header" /* SECTION_HEADER */]: "section-header",
|
|
3878
3990
|
["section_header_label" /* SECTION_HEADER_LABEL */]: "section-header-label",
|
|
3991
|
+
["section_footer" /* SECTION_FOOTER */]: "section-footer",
|
|
3879
3992
|
["section_search" /* SECTION_SEARCH */]: "section-search",
|
|
3880
3993
|
["section_filter" /* SECTION_FILTER */]: "section-filter",
|
|
3881
3994
|
["section_filter_group" /* SECTION_FILTER_GROUP */]: "section-filter-group",
|
|
@@ -3883,6 +3996,8 @@ var CONTROL_LABEL = {
|
|
|
3883
3996
|
["section_table" /* SECTION_TABLE */]: "section-table",
|
|
3884
3997
|
["section_table_row" /* SECTION_TABLE_ROW */]: "section-table-row",
|
|
3885
3998
|
["section_table_cell" /* SECTION_TABLE_CELL */]: "section-table-cell",
|
|
3999
|
+
["section_chart" /* SECTION_CHART */]: "section-chart",
|
|
4000
|
+
["section_chart_series" /* SECTION_CHART_SERIES */]: "section-chart-series",
|
|
3886
4001
|
["section_action" /* SECTION_ACTION */]: "section-action",
|
|
3887
4002
|
["section_hero" /* SECTION_HERO */]: "section-hero",
|
|
3888
4003
|
["section_carousel" /* SECTION_CAROUSEL */]: "section-carousel",
|
|
@@ -3909,6 +4024,7 @@ var CONTROL_LABEL = {
|
|
|
3909
4024
|
["stat" /* STAT */]: "stat",
|
|
3910
4025
|
["stat_value" /* STAT_VALUE */]: "stat-value",
|
|
3911
4026
|
["stat_corner" /* STAT_CORNER */]: "stat-corner",
|
|
4027
|
+
["heat_swatch" /* HEAT_SWATCH */]: "heat-swatch",
|
|
3912
4028
|
["nav_header" /* NAV_HEADER */]: "nav-header",
|
|
3913
4029
|
["form" /* FORM */]: "form",
|
|
3914
4030
|
["field" /* FIELD */]: "field",
|
|
@@ -3936,6 +4052,7 @@ var CONTROL_ICON = {
|
|
|
3936
4052
|
["section" /* SECTION */]: "control_section",
|
|
3937
4053
|
["section_header" /* SECTION_HEADER */]: "control_section_header",
|
|
3938
4054
|
["section_header_label" /* SECTION_HEADER_LABEL */]: "control_section_header_label",
|
|
4055
|
+
["section_footer" /* SECTION_FOOTER */]: "control_section_footer",
|
|
3939
4056
|
["section_search" /* SECTION_SEARCH */]: "control_section_search",
|
|
3940
4057
|
// Reuse the search glyph until filter artwork joins the shared set — the
|
|
3941
4058
|
// same stand-in CARD takes from the side panel.
|
|
@@ -3947,6 +4064,8 @@ var CONTROL_ICON = {
|
|
|
3947
4064
|
["section_table" /* SECTION_TABLE */]: "control_section_table",
|
|
3948
4065
|
["section_table_row" /* SECTION_TABLE_ROW */]: "control_section_table_row",
|
|
3949
4066
|
["section_table_cell" /* SECTION_TABLE_CELL */]: "control_section_table_cell",
|
|
4067
|
+
["section_chart" /* SECTION_CHART */]: "control_section_chart",
|
|
4068
|
+
["section_chart_series" /* SECTION_CHART_SERIES */]: "control_section_chart_series",
|
|
3950
4069
|
["section_action" /* SECTION_ACTION */]: "control_section_action",
|
|
3951
4070
|
["section_hero" /* SECTION_HERO */]: "control_section_hero",
|
|
3952
4071
|
["section_carousel" /* SECTION_CAROUSEL */]: "control_section_carousel",
|
|
@@ -3973,6 +4092,8 @@ var CONTROL_ICON = {
|
|
|
3973
4092
|
["stat" /* STAT */]: "control_stat",
|
|
3974
4093
|
["stat_value" /* STAT_VALUE */]: "control_stat_value",
|
|
3975
4094
|
["stat_corner" /* STAT_CORNER */]: "control_stat_corner",
|
|
4095
|
+
// Reuse the Stat glyph until swatch artwork joins the shared set.
|
|
4096
|
+
["heat_swatch" /* HEAT_SWATCH */]: "control_stat",
|
|
3976
4097
|
["nav_header" /* NAV_HEADER */]: "control_nav_header",
|
|
3977
4098
|
["form" /* FORM */]: "control_form",
|
|
3978
4099
|
["field" /* FIELD */]: "control_field",
|
|
@@ -4031,6 +4152,12 @@ var CONTROL_CODEGEN = {
|
|
|
4031
4152
|
tag: "m-section-header",
|
|
4032
4153
|
component: "SectionHeaderComponent"
|
|
4033
4154
|
},
|
|
4155
|
+
// Folderless for the section_header's reason — `sticky` and `align` are its
|
|
4156
|
+
// only settings, both scalars, and its text is the projected label slot.
|
|
4157
|
+
["section_footer" /* SECTION_FOOTER */]: {
|
|
4158
|
+
tag: "m-section-footer",
|
|
4159
|
+
component: "SectionFooterComponent"
|
|
4160
|
+
},
|
|
4034
4161
|
// Folderless for the section_header's reason — SectionSearchComponent takes
|
|
4035
4162
|
// `searchLabel`, `debounce`, `startOpen` and `sticky` as individual inputs
|
|
4036
4163
|
// rather than a `config` bag, so there is nothing a `name="<id>"` could
|
|
@@ -4117,6 +4244,20 @@ var CONTROL_CODEGEN = {
|
|
|
4117
4244
|
tag: "td m-section-table-cell",
|
|
4118
4245
|
component: "SectionTableCellComponent"
|
|
4119
4246
|
},
|
|
4247
|
+
// Folderful so the name picker can adopt a hand-written
|
|
4248
|
+
// `section_charts/<name>.yml` — the one place its preset `ranges` list can
|
|
4249
|
+
// be written (ADR 0010). Every other setting is a scalar on the tag.
|
|
4250
|
+
["section_chart" /* SECTION_CHART */]: {
|
|
4251
|
+
tag: "m-section-chart",
|
|
4252
|
+
component: "SectionChartComponent",
|
|
4253
|
+
folder: LAYOUT_ASSET_FOLDER.section_chart
|
|
4254
|
+
},
|
|
4255
|
+
// Folderless: `x`, `y`, `label` and `color` are scalars, and its rows are a
|
|
4256
|
+
// DataBinding under `data` — nothing is left for a `name="<id>"` to resolve.
|
|
4257
|
+
["section_chart_series" /* SECTION_CHART_SERIES */]: {
|
|
4258
|
+
tag: "m-section-chart-series",
|
|
4259
|
+
component: "SectionChartSeriesComponent"
|
|
4260
|
+
},
|
|
4120
4261
|
["row" /* ROW */]: {
|
|
4121
4262
|
tag: "m-row",
|
|
4122
4263
|
component: "RowComponent",
|
|
@@ -4214,6 +4355,12 @@ var CONTROL_CODEGEN = {
|
|
|
4214
4355
|
tag: "m-stat",
|
|
4215
4356
|
component: "StatComponent"
|
|
4216
4357
|
},
|
|
4358
|
+
// Folderless for the Logo's reason — HeatSwatchComponent takes `value`,
|
|
4359
|
+
// `fromColor`, `toColor` and `radius` as individual inputs.
|
|
4360
|
+
["heat_swatch" /* HEAT_SWATCH */]: {
|
|
4361
|
+
tag: "m-heat-swatch",
|
|
4362
|
+
component: "HeatSwatchComponent"
|
|
4363
|
+
},
|
|
4217
4364
|
// Navigation header with back button and breadcrumb trail.
|
|
4218
4365
|
// Folderless as it uses NavStore internally and takes no config.
|
|
4219
4366
|
["nav_header" /* NAV_HEADER */]: {
|
|
@@ -4605,7 +4752,7 @@ function isValidFunctionName(name3) {
|
|
|
4605
4752
|
return /^[a-z][a-zA-Z0-9]*$/.test(name3);
|
|
4606
4753
|
}
|
|
4607
4754
|
function isPureFunctionComplete(fn) {
|
|
4608
|
-
return isValidFunctionName(fn.name) && fn.
|
|
4755
|
+
return isValidFunctionName(fn.name) && fn.body.trim().length > 0;
|
|
4609
4756
|
}
|
|
4610
4757
|
function functionFileBase(name3) {
|
|
4611
4758
|
return name3.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -4699,8 +4846,6 @@ var IMPURE_TOKENS = [
|
|
|
4699
4846
|
"inject",
|
|
4700
4847
|
"fetch",
|
|
4701
4848
|
"XMLHttpRequest",
|
|
4702
|
-
"Date.now",
|
|
4703
|
-
"new Date",
|
|
4704
4849
|
"Math.random",
|
|
4705
4850
|
"localStorage",
|
|
4706
4851
|
"sessionStorage",
|
|
@@ -5042,9 +5187,10 @@ function stateComputedArgExpression(arg, roots, shapes, rootPrefix = NO_ROOT_PRE
|
|
|
5042
5187
|
let shapeId = root.dataType.type === "shape" ? root.dataType.shapeId : void 0;
|
|
5043
5188
|
let expression = `${rootPrefix(rootId)}${root.name}()`;
|
|
5044
5189
|
for (const keyId of rest) {
|
|
5045
|
-
const
|
|
5190
|
+
const shape = shapeId ? shapes[shapeId] : void 0;
|
|
5191
|
+
const key2 = shape?.keys.find((k) => k.id === keyId);
|
|
5046
5192
|
if (!key2) return "undefined";
|
|
5047
|
-
expression +=
|
|
5193
|
+
expression += memberAccess(shape, key2, true);
|
|
5048
5194
|
shapeId = key2.dataType.type === "shape" ? key2.dataType.shapeId : void 0;
|
|
5049
5195
|
}
|
|
5050
5196
|
return expression;
|
|
@@ -5841,7 +5987,8 @@ var BINDING_TRANSFORM_LEAVES = [
|
|
|
5841
5987
|
"fixed",
|
|
5842
5988
|
"store",
|
|
5843
5989
|
"const",
|
|
5844
|
-
"input"
|
|
5990
|
+
"input",
|
|
5991
|
+
"binding"
|
|
5845
5992
|
];
|
|
5846
5993
|
|
|
5847
5994
|
// libs/codegen/src/lib/outcome-transform-helper.ts
|
|
@@ -6041,6 +6188,7 @@ var sameType2 = (a, b) => a.type === "shape" && b.type === "shape" ? a.shapeId =
|
|
|
6041
6188
|
var typesMatch = (a, b) => sameType2(a.dataType, b.dataType) && a.cardinality === b.cardinality;
|
|
6042
6189
|
var memberRead = (name3, ctx) => ctx.scope === "class" ? `this.${name3}` : name3;
|
|
6043
6190
|
var isCall = (expr) => expr.kind === "call";
|
|
6191
|
+
var pipeParamValid = (expr, arity) => Number.isInteger(expr.pipeParam) && (expr.pipeParam >= 0 && expr.pipeParam < arity || expr.pipeParam === -1 && !expr.args.some((arg) => arg.kind === "pipe"));
|
|
6044
6192
|
var argOmitted = (arg, param) => !!param?.optional && !!arg && !isCall(arg) && arg.kind === "fixed" && !fixedText(arg).trim();
|
|
6045
6193
|
var fixedText = (arg) => String(arg.value ?? "");
|
|
6046
6194
|
var argOutOfRange = (arg, param) => {
|
|
@@ -6107,7 +6255,7 @@ function inferTransformType(expr, pipeType, surface, functions) {
|
|
|
6107
6255
|
if (expr.args.length !== resolved.params.length) {
|
|
6108
6256
|
return { ok: false, error: "value-transform-arity" };
|
|
6109
6257
|
}
|
|
6110
|
-
if (expr
|
|
6258
|
+
if (!pipeParamValid(expr, resolved.params.length)) {
|
|
6111
6259
|
return { ok: false, error: "value-transform-incomplete" };
|
|
6112
6260
|
}
|
|
6113
6261
|
for (let i = 0; i < expr.args.length; i++) {
|
|
@@ -6148,6 +6296,8 @@ var leafIncomplete = (leaf) => {
|
|
|
6148
6296
|
return leaf.constantId ? void 0 : empty;
|
|
6149
6297
|
case "input":
|
|
6150
6298
|
return leaf.input?.trim() ? void 0 : empty;
|
|
6299
|
+
case "binding":
|
|
6300
|
+
return leaf.binding ? void 0 : empty;
|
|
6151
6301
|
default:
|
|
6152
6302
|
return void 0;
|
|
6153
6303
|
}
|
|
@@ -6178,7 +6328,7 @@ function transformIncomplete(expr, functions, properties, shapes) {
|
|
|
6178
6328
|
if (expr.args.length !== resolved.params.length) {
|
|
6179
6329
|
return "value-transform-arity";
|
|
6180
6330
|
}
|
|
6181
|
-
if (!
|
|
6331
|
+
if (!pipeParamValid(expr, resolved.params.length)) {
|
|
6182
6332
|
return "value-transform-incomplete";
|
|
6183
6333
|
}
|
|
6184
6334
|
for (let i = 0; i < expr.args.length; i++) {
|
|
@@ -6276,7 +6426,7 @@ var parenthesized = (expr) => {
|
|
|
6276
6426
|
var STRING_LITERAL = /^('[^']*'|"[^"]*")$/;
|
|
6277
6427
|
var MEMBER_CHAIN = /^[A-Za-z_$][\w$]*(\??\.[\w$]+|\??\([^()]*\)|\[[^[\]]*\]|!)*$/;
|
|
6278
6428
|
var receiverExpr = (receiver) => MEMBER_CHAIN.test(receiver) || STRING_LITERAL.test(receiver) || parenthesized(receiver) ? receiver : `(${receiver})`;
|
|
6279
|
-
var
|
|
6429
|
+
var memberAccess2 = (receiver) => receiver.includes("?.") ? "?." : ".";
|
|
6280
6430
|
function emitTransformExpr(expr, pipeExpr, ctx, fixedType = { type: "string" }) {
|
|
6281
6431
|
if (!isCall(expr)) {
|
|
6282
6432
|
return emitLeaf(expr, pipeExpr, ctx, fixedType);
|
|
@@ -6296,16 +6446,17 @@ function emitTransformExpr(expr, pipeExpr, ctx, fixedType = { type: "string" })
|
|
|
6296
6446
|
}
|
|
6297
6447
|
const entry2 = resolved.entry;
|
|
6298
6448
|
if (!entry2) return pipeExpr;
|
|
6449
|
+
const access = (receiver) => ctx.optionalPipe && receiver === pipeExpr ? "?." : memberAccess2(receiver);
|
|
6299
6450
|
if (entry2.emit === "method") {
|
|
6300
6451
|
const [receiver, ...rest] = argExprs;
|
|
6301
|
-
return `${receiverExpr(receiver)}${
|
|
6452
|
+
return `${receiverExpr(receiver)}${access(receiver)}${entry2.name}(${rest.join(", ")})`;
|
|
6302
6453
|
}
|
|
6303
6454
|
if (entry2.emit === "static") {
|
|
6304
6455
|
return `${entry2.object ?? "Object"}.${entry2.name}(${argExprs.join(", ")})`;
|
|
6305
6456
|
}
|
|
6306
6457
|
if (entry2.emit === "property") {
|
|
6307
6458
|
const receiver = argExprs[0];
|
|
6308
|
-
return `${receiverExpr(receiver)}${
|
|
6459
|
+
return `${receiverExpr(receiver)}${access(receiver)}${entry2.name}`;
|
|
6309
6460
|
}
|
|
6310
6461
|
return `${entry2.name}(${argExprs.join(", ")})`;
|
|
6311
6462
|
}
|
|
@@ -6342,6 +6493,8 @@ function emitLeaf(leaf, pipeExpr, ctx, fixedType) {
|
|
|
6342
6493
|
if (!leaf.event?.length) return ctx.eventRoot ?? "$event";
|
|
6343
6494
|
return `$event.${leaf.event.join(".")}`;
|
|
6344
6495
|
}
|
|
6496
|
+
case "binding":
|
|
6497
|
+
return leaf.binding && ctx.bindingRead?.(leaf.binding) || "undefined";
|
|
6345
6498
|
}
|
|
6346
6499
|
}
|
|
6347
6500
|
function templateTransformRefs(exprs, functions) {
|
|
@@ -6378,10 +6531,97 @@ function transformStateRootIds(expr) {
|
|
|
6378
6531
|
return;
|
|
6379
6532
|
}
|
|
6380
6533
|
if (node.kind === "store" && node.path.length) ids.add(node.path[0]);
|
|
6534
|
+
const root = node.kind === "binding" ? node.binding?.root : void 0;
|
|
6535
|
+
if (root?.kind === "property" || root?.kind === "computed") {
|
|
6536
|
+
ids.add(root.id);
|
|
6537
|
+
}
|
|
6381
6538
|
};
|
|
6382
6539
|
walk(expr);
|
|
6383
6540
|
return [...ids];
|
|
6384
6541
|
}
|
|
6542
|
+
function transformBindingLeaves(expr) {
|
|
6543
|
+
if (!expr) return [];
|
|
6544
|
+
if (isCall(expr)) return expr.args.flatMap(transformBindingLeaves);
|
|
6545
|
+
return expr.kind === "binding" && expr.binding ? [expr.binding] : [];
|
|
6546
|
+
}
|
|
6547
|
+
var functionBindingTarget = (binding) => binding?.source === "function" ? outerCall(binding.transform)?.target : void 0;
|
|
6548
|
+
var functionBindingId = (binding) => {
|
|
6549
|
+
const target = functionBindingTarget(binding);
|
|
6550
|
+
return target?.kind === "pure" ? target.functionId : void 0;
|
|
6551
|
+
};
|
|
6552
|
+
var NATIVE_KEY_PREFIX = "native:";
|
|
6553
|
+
var callTargetKey = (target) => target.kind === "pure" ? target.functionId : `${NATIVE_KEY_PREFIX}${target.ref.group}:${target.ref.name}`;
|
|
6554
|
+
var callTargetName = (target, functions) => {
|
|
6555
|
+
if (!target) return void 0;
|
|
6556
|
+
if (target.kind === "pure") return functions?.[target.functionId]?.name;
|
|
6557
|
+
return findJsNative(target.ref.group, target.ref.name)?.name;
|
|
6558
|
+
};
|
|
6559
|
+
var callTargetOfKey = (key2) => {
|
|
6560
|
+
if (!key2.startsWith(NATIVE_KEY_PREFIX)) return pureTarget(key2);
|
|
6561
|
+
const [group = "", name3 = ""] = key2.slice(NATIVE_KEY_PREFIX.length).split(":");
|
|
6562
|
+
return nativeTarget({ group, name: name3 });
|
|
6563
|
+
};
|
|
6564
|
+
var plainRead = (binding) => ({
|
|
6565
|
+
root: binding.root,
|
|
6566
|
+
path: binding.path
|
|
6567
|
+
});
|
|
6568
|
+
function functionBindingArgs(binding, arity) {
|
|
6569
|
+
const call = binding?.source === "function" ? outerCall(binding.transform) : void 0;
|
|
6570
|
+
return Array.from({ length: arity }, (_, i) => {
|
|
6571
|
+
const arg = call?.args[i];
|
|
6572
|
+
if (!binding || !arg || isCall(arg)) return { kind: "binding" };
|
|
6573
|
+
if (arg.kind === "pipe") {
|
|
6574
|
+
return { kind: "binding", binding: plainRead(binding) };
|
|
6575
|
+
}
|
|
6576
|
+
if (arg.kind === "binding") {
|
|
6577
|
+
return arg.binding ? { kind: "binding", binding: plainRead(arg.binding) } : { kind: "binding" };
|
|
6578
|
+
}
|
|
6579
|
+
if (arg.kind === "fixed") return { kind: "fixed", value: fixedText(arg) };
|
|
6580
|
+
return { kind: "binding" };
|
|
6581
|
+
});
|
|
6582
|
+
}
|
|
6583
|
+
function composeFunctionBinding(callee, args) {
|
|
6584
|
+
const target = typeof callee === "string" ? pureTarget(callee) : callee;
|
|
6585
|
+
const pipeParam = args.findIndex(
|
|
6586
|
+
(arg) => arg.kind === "binding" && !!arg.binding
|
|
6587
|
+
);
|
|
6588
|
+
const piped = args[pipeParam];
|
|
6589
|
+
if (pipeParam < 0) {
|
|
6590
|
+
if (args.some((arg) => arg.kind === "binding")) return void 0;
|
|
6591
|
+
return {
|
|
6592
|
+
root: { kind: "none" },
|
|
6593
|
+
path: [],
|
|
6594
|
+
source: "function",
|
|
6595
|
+
transform: {
|
|
6596
|
+
kind: "call",
|
|
6597
|
+
target,
|
|
6598
|
+
pipeParam: -1,
|
|
6599
|
+
args: args.map(
|
|
6600
|
+
(arg) => ({
|
|
6601
|
+
kind: "fixed",
|
|
6602
|
+
value: arg.kind === "fixed" ? arg.value : ""
|
|
6603
|
+
})
|
|
6604
|
+
)
|
|
6605
|
+
}
|
|
6606
|
+
};
|
|
6607
|
+
}
|
|
6608
|
+
if (piped?.kind !== "binding" || !piped.binding) return void 0;
|
|
6609
|
+
return {
|
|
6610
|
+
root: piped.binding.root,
|
|
6611
|
+
path: piped.binding.path,
|
|
6612
|
+
source: "function",
|
|
6613
|
+
transform: {
|
|
6614
|
+
kind: "call",
|
|
6615
|
+
target,
|
|
6616
|
+
pipeParam,
|
|
6617
|
+
args: args.map((arg, i) => {
|
|
6618
|
+
if (i === pipeParam) return { kind: "pipe" };
|
|
6619
|
+
if (arg.kind === "fixed") return { kind: "fixed", value: arg.value };
|
|
6620
|
+
return arg.binding ? { kind: "binding", binding: plainRead(arg.binding) } : { kind: "binding" };
|
|
6621
|
+
})
|
|
6622
|
+
}
|
|
6623
|
+
};
|
|
6624
|
+
}
|
|
6385
6625
|
function unaryCall(target, arity, pipeParam = 0) {
|
|
6386
6626
|
const args = Array.from(
|
|
6387
6627
|
{ length: arity },
|
|
@@ -6495,6 +6735,14 @@ function sanitizeLeaf(leaf) {
|
|
|
6495
6735
|
kind: "event",
|
|
6496
6736
|
...Array.isArray(leaf.event) ? { event: leaf.event } : {}
|
|
6497
6737
|
};
|
|
6738
|
+
case "binding": {
|
|
6739
|
+
const binding = leaf.binding;
|
|
6740
|
+
if (!binding) return { kind: "binding" };
|
|
6741
|
+
return binding.root && typeof binding.root === "object" && Array.isArray(binding.path) ? {
|
|
6742
|
+
kind: "binding",
|
|
6743
|
+
binding: { root: binding.root, path: binding.path }
|
|
6744
|
+
} : void 0;
|
|
6745
|
+
}
|
|
6498
6746
|
default:
|
|
6499
6747
|
return void 0;
|
|
6500
6748
|
}
|
|
@@ -6523,7 +6771,8 @@ var BINDING_SLOT = {
|
|
|
6523
6771
|
label: "label",
|
|
6524
6772
|
// A FormControl's `data`. The write half is a StateWrite on `dataChange`
|
|
6525
6773
|
// rather than anything here (ADR 0065). Also a CardControl's collection: the
|
|
6526
|
-
// slot is named for the input it lands on, and both land on `data
|
|
6774
|
+
// slot is named for the input it lands on, and both land on `data` — as do a
|
|
6775
|
+
// SectionChartSeries' rows.
|
|
6527
6776
|
data: "data",
|
|
6528
6777
|
// A RepeatControl's collection.
|
|
6529
6778
|
source: "source",
|
|
@@ -6565,7 +6814,11 @@ var BINDING_SLOT = {
|
|
|
6565
6814
|
// author sees those numbers on the Canvas (ADR 0069). What the Filter is
|
|
6566
6815
|
// *disabled* by stays a Rule's job, which is the line these do not cross.
|
|
6567
6816
|
min: "min",
|
|
6568
|
-
max: "max"
|
|
6817
|
+
max: "max",
|
|
6818
|
+
// A [HeatSwatch]'s figure, named for the `m-heat-swatch` input it lands on.
|
|
6819
|
+
// Content by the `total` test: what the block paints *is* the datum, one per
|
|
6820
|
+
// row inside a Repeat.
|
|
6821
|
+
value: "value"
|
|
6569
6822
|
};
|
|
6570
6823
|
var USER_VALUE_SLOTS = [
|
|
6571
6824
|
BINDING_SLOT.id,
|
|
@@ -6683,7 +6936,8 @@ var PARAM_CAPABLE_TYPES = [
|
|
|
6683
6936
|
"stat" /* STAT */,
|
|
6684
6937
|
"section_header" /* SECTION_HEADER */,
|
|
6685
6938
|
"button" /* BUTTON */,
|
|
6686
|
-
"field" /* FIELD
|
|
6939
|
+
"field" /* FIELD */,
|
|
6940
|
+
"section_chart_series" /* SECTION_CHART_SERIES */
|
|
6687
6941
|
];
|
|
6688
6942
|
var takesMessageParams = (type) => !!type && PARAM_CAPABLE_TYPES.includes(type);
|
|
6689
6943
|
var messageSlot = (variable) => `var:${variable}`;
|
|
@@ -6699,10 +6953,12 @@ var messageBindings = (control) => {
|
|
|
6699
6953
|
};
|
|
6700
6954
|
var DEFAULT_ITEM_ALIAS = "item";
|
|
6701
6955
|
var DEFAULT_INDEX_ALIAS = "index";
|
|
6956
|
+
var DEFAULT_KEY_ALIAS = "key";
|
|
6702
6957
|
var ALIAS_PATTERN = /^[a-z][a-zA-Z0-9]*$/;
|
|
6703
6958
|
var repeatSpec = (control) => ({
|
|
6704
6959
|
itemAlias: control?.repeat?.itemAlias ?? DEFAULT_ITEM_ALIAS,
|
|
6705
6960
|
indexAlias: control?.repeat?.indexAlias ?? DEFAULT_INDEX_ALIAS,
|
|
6961
|
+
keyAlias: control?.repeat?.keyAlias ?? DEFAULT_KEY_ALIAS,
|
|
6706
6962
|
...control?.repeat?.track ? { track: control.repeat.track } : {},
|
|
6707
6963
|
...control?.repeat?.sampleRows !== void 0 ? { sampleRows: control.repeat.sampleRows } : {}
|
|
6708
6964
|
});
|
|
@@ -6765,16 +7021,26 @@ var aliasNames = (control) => isCardHolder(control) ? {
|
|
|
6765
7021
|
indexAlias: control?.cards?.indexAlias ?? DEFAULT_INDEX_ALIAS
|
|
6766
7022
|
} : {
|
|
6767
7023
|
itemAlias: repeatSpec(control).itemAlias,
|
|
6768
|
-
indexAlias: repeatSpec(control).indexAlias
|
|
7024
|
+
indexAlias: repeatSpec(control).indexAlias,
|
|
7025
|
+
// Only a Repeat walks a keyed record (GLOSSARY.md KeyAlias); a List
|
|
7026
|
+
// keeps the same spec but hands `m-list` an array.
|
|
7027
|
+
...control?.type === "repeat" /* REPEAT */ ? { keyAlias: repeatSpec(control).keyAlias } : {}
|
|
6769
7028
|
};
|
|
6770
7029
|
var aliasSourceSlot = (control) => isCardHolder(control) || control?.type === "list" /* LIST */ ? BINDING_SLOT.data : BINDING_SLOT.source;
|
|
6771
7030
|
var isAliasNameFree = (name3, where, controlMap, which) => {
|
|
6772
7031
|
if (!ALIAS_PATTERN.test(name3) || isReservedVariantName(name3)) return false;
|
|
6773
|
-
const
|
|
6774
|
-
|
|
7032
|
+
const own = {
|
|
7033
|
+
item: where.own.itemAlias,
|
|
7034
|
+
index: where.own.indexAlias,
|
|
7035
|
+
key: where.own.keyAlias
|
|
7036
|
+
};
|
|
7037
|
+
const siblings = Object.keys(own).filter(
|
|
7038
|
+
(kind) => kind !== which
|
|
7039
|
+
);
|
|
7040
|
+
if (siblings.some((kind) => own[kind] === name3)) return false;
|
|
6775
7041
|
return !aliasHoldersInScope(where.parentId, controlMap).some((holder) => {
|
|
6776
7042
|
const spec = aliasNames(holder);
|
|
6777
|
-
return spec.itemAlias === name3 || spec.indexAlias === name3;
|
|
7043
|
+
return spec.itemAlias === name3 || spec.indexAlias === name3 || spec.keyAlias === name3;
|
|
6778
7044
|
});
|
|
6779
7045
|
};
|
|
6780
7046
|
var nextAliasName = (base, where, controlMap, which) => {
|
|
@@ -6792,13 +7058,20 @@ var newRepeatSpec = (parentId, controlMap) => {
|
|
|
6792
7058
|
controlMap,
|
|
6793
7059
|
"item"
|
|
6794
7060
|
);
|
|
7061
|
+
const indexAlias = nextAliasName(
|
|
7062
|
+
DEFAULT_INDEX_ALIAS,
|
|
7063
|
+
{ parentId, own: { itemAlias, indexAlias: "" } },
|
|
7064
|
+
controlMap,
|
|
7065
|
+
"index"
|
|
7066
|
+
);
|
|
6795
7067
|
return {
|
|
6796
7068
|
itemAlias,
|
|
6797
|
-
indexAlias
|
|
6798
|
-
|
|
6799
|
-
|
|
7069
|
+
indexAlias,
|
|
7070
|
+
keyAlias: nextAliasName(
|
|
7071
|
+
DEFAULT_KEY_ALIAS,
|
|
7072
|
+
{ parentId, own: { itemAlias, indexAlias } },
|
|
6800
7073
|
controlMap,
|
|
6801
|
-
"
|
|
7074
|
+
"key"
|
|
6802
7075
|
)
|
|
6803
7076
|
};
|
|
6804
7077
|
};
|
|
@@ -6831,7 +7104,7 @@ var isBindingInScope = (binding, controlId, controlMap) => {
|
|
|
6831
7104
|
};
|
|
6832
7105
|
var bindingPathKey = (binding) => {
|
|
6833
7106
|
const root = binding.root;
|
|
6834
|
-
const head = root.kind === "alias" ? `alias:${root.repeatId}:${root.alias}` : root.kind === "auth" ? `${root.kind}:${root.property}` : `${root.kind}:${root.id}`;
|
|
7107
|
+
const head = root.kind === "alias" ? `alias:${root.repeatId}:${root.alias}` : root.kind === "auth" ? `${root.kind}:${root.property}` : root.kind === "none" ? root.kind : `${root.kind}:${root.id}`;
|
|
6835
7108
|
return binding.path.length ? `${head}.${binding.path.join(".")}` : head;
|
|
6836
7109
|
};
|
|
6837
7110
|
|
|
@@ -6880,6 +7153,7 @@ var GLOBAL_RULE_CATALOG = {
|
|
|
6880
7153
|
var globalRuleOf = (ruleId) => Object.prototype.hasOwnProperty.call(GLOBAL_RULE_CATALOG, ruleId) ? GLOBAL_RULE_CATALOG[ruleId] : void 0;
|
|
6881
7154
|
|
|
6882
7155
|
// libs/codegen/src/lib/rule-helper.ts
|
|
7156
|
+
var hop = (segment) => segment.position === void 0 ? `?.${segment.name}` : `?.[${segment.position}]`;
|
|
6883
7157
|
var isPrimitiveType = (dataType) => dataType.type !== "shape" && dataType.type !== "form" && dataType.type !== "option";
|
|
6884
7158
|
var seq = 0;
|
|
6885
7159
|
var nodeId = () => `rn${seq += 1}`;
|
|
@@ -6903,6 +7177,12 @@ var createCall = (ruleId = "") => ({
|
|
|
6903
7177
|
ruleId,
|
|
6904
7178
|
args: {}
|
|
6905
7179
|
});
|
|
7180
|
+
var createFunctionLeaf = () => ({
|
|
7181
|
+
id: nodeId(),
|
|
7182
|
+
kind: "function",
|
|
7183
|
+
functionId: "",
|
|
7184
|
+
args: {}
|
|
7185
|
+
});
|
|
6906
7186
|
var createRule = () => createGroup([createCheck()]);
|
|
6907
7187
|
function remintRule(rule) {
|
|
6908
7188
|
const walk = (node) => node.kind === "group" ? { ...node, id: nodeId(), children: node.children.map(walk) } : { ...node, id: nodeId() };
|
|
@@ -6924,13 +7204,15 @@ function resolvePath(path, properties, shapes) {
|
|
|
6924
7204
|
shapeId = shapeKeyOf(property.dataType);
|
|
6925
7205
|
continue;
|
|
6926
7206
|
}
|
|
6927
|
-
const
|
|
7207
|
+
const shape = shapeId ? shapes[shapeId] : void 0;
|
|
7208
|
+
const key2 = shape?.keys.find((k) => k.id === id);
|
|
6928
7209
|
if (!key2) break;
|
|
6929
7210
|
segments.push({
|
|
6930
7211
|
id,
|
|
6931
7212
|
name: key2.name,
|
|
6932
7213
|
dataType: key2.dataType,
|
|
6933
|
-
cardinality: key2.cardinality
|
|
7214
|
+
cardinality: key2.cardinality,
|
|
7215
|
+
...shape?.positional ? { position: shape.keys.indexOf(key2) } : {}
|
|
6934
7216
|
});
|
|
6935
7217
|
shapeId = shapeKeyOf(key2.dataType);
|
|
6936
7218
|
}
|
|
@@ -7045,14 +7327,28 @@ var swapWithin = (node, id, delta) => {
|
|
|
7045
7327
|
var moveRuleNode = (rule, id, delta) => id === rule.id ? rule : swapWithin(rule, id, delta) ?? rule;
|
|
7046
7328
|
function ruleChecks(node) {
|
|
7047
7329
|
if (node.kind === "check") return [node];
|
|
7048
|
-
if (node.kind
|
|
7330
|
+
if (node.kind !== "group") return [];
|
|
7049
7331
|
return node.children.flatMap(ruleChecks);
|
|
7050
7332
|
}
|
|
7051
7333
|
function ruleCalls(node) {
|
|
7052
7334
|
if (node.kind === "call") return [node];
|
|
7053
|
-
if (node.kind
|
|
7335
|
+
if (node.kind !== "group") return [];
|
|
7054
7336
|
return node.children.flatMap(ruleCalls);
|
|
7055
7337
|
}
|
|
7338
|
+
function ruleFunctions(node) {
|
|
7339
|
+
if (node.kind === "function") return [node];
|
|
7340
|
+
if (node.kind !== "group") return [];
|
|
7341
|
+
return node.children.flatMap(ruleFunctions);
|
|
7342
|
+
}
|
|
7343
|
+
function ruleFunctionImports(rules, properties, shapes, functions) {
|
|
7344
|
+
const byName = /* @__PURE__ */ new Map();
|
|
7345
|
+
for (const leaf of rules.flatMap(ruleFunctions)) {
|
|
7346
|
+
if (functionError(leaf, properties, shapes, functions)) continue;
|
|
7347
|
+
const fn = functions[leaf.functionId];
|
|
7348
|
+
if (fn && !byName.has(fn.name)) byName.set(fn.name, fn);
|
|
7349
|
+
}
|
|
7350
|
+
return [...byName.values()];
|
|
7351
|
+
}
|
|
7056
7352
|
var variantNavIds = (variant) => [
|
|
7057
7353
|
variant.navId ?? "",
|
|
7058
7354
|
...ruleNavs(variant.rule).map((nav) => nav.navId)
|
|
@@ -7070,7 +7366,7 @@ function remapRuleNavs(node, remap) {
|
|
|
7070
7366
|
}
|
|
7071
7367
|
function ruleNavs(node) {
|
|
7072
7368
|
if (node.kind === "nav") return [node];
|
|
7073
|
-
if (node.kind
|
|
7369
|
+
if (node.kind !== "group") return [];
|
|
7074
7370
|
return node.children.flatMap(ruleNavs);
|
|
7075
7371
|
}
|
|
7076
7372
|
var checkPaths = (check) => check.operand.kind === "path" ? [check.path, check.operand.path] : [check.path];
|
|
@@ -7079,7 +7375,8 @@ var callPaths = (call) => Object.values(call.args).flatMap(
|
|
|
7079
7375
|
);
|
|
7080
7376
|
var rulePaths = (rule) => [
|
|
7081
7377
|
...ruleChecks(rule).flatMap(checkPaths),
|
|
7082
|
-
...ruleCalls(rule).flatMap(callPaths)
|
|
7378
|
+
...ruleCalls(rule).flatMap(callPaths),
|
|
7379
|
+
...ruleFunctions(rule).flatMap((leaf) => Object.values(leaf.args))
|
|
7083
7380
|
];
|
|
7084
7381
|
var ruleReferencedIds = (rule) => new Set(rulePaths(rule).flat());
|
|
7085
7382
|
function ruleGlobalStores(rules) {
|
|
@@ -7142,18 +7439,37 @@ function callError(call, properties, shapes) {
|
|
|
7142
7439
|
}
|
|
7143
7440
|
return null;
|
|
7144
7441
|
}
|
|
7145
|
-
|
|
7442
|
+
var sameType3 = (a, b) => a.type === "shape" ? b.type === "shape" && a.shapeId === b.shapeId : a.type === "form" ? b.type === "form" && a.formId === b.formId : a.type === b.type;
|
|
7443
|
+
function functionError(leaf, properties, shapes, functions) {
|
|
7444
|
+
const fn = leaf.functionId ? functions[leaf.functionId] : void 0;
|
|
7445
|
+
if (!fn) return "rule-function-missing";
|
|
7446
|
+
if (fn.returnType.type !== "boolean" || fn.returnCardinality !== "one" || fn.returnAsync)
|
|
7447
|
+
return "rule-function-not-boolean";
|
|
7448
|
+
for (const param of fn.params) {
|
|
7449
|
+
const path = leaf.args[param.id];
|
|
7450
|
+
if (!path?.length) return "rule-operand-missing";
|
|
7451
|
+
const segments = resolvePath(path, properties, shapes);
|
|
7452
|
+
const last = segments[segments.length - 1];
|
|
7453
|
+
if (segments.length !== path.length || !last) return "rule-operand-missing";
|
|
7454
|
+
if (!sameType3(last.dataType, param.dataType) || last.cardinality !== param.cardinality)
|
|
7455
|
+
return "rule-operand-missing";
|
|
7456
|
+
}
|
|
7457
|
+
return null;
|
|
7458
|
+
}
|
|
7459
|
+
function ruleError(node, properties, shapes, functions = {}) {
|
|
7146
7460
|
if (node.kind === "check") return checkError(node, properties, shapes);
|
|
7147
7461
|
if (node.kind === "call") return callError(node, properties, shapes);
|
|
7148
7462
|
if (node.kind === "nav") return node.navId ? null : "rule-nav-missing";
|
|
7463
|
+
if (node.kind === "function")
|
|
7464
|
+
return functionError(node, properties, shapes, functions);
|
|
7149
7465
|
if (!node.children.length) return "rule-empty-group";
|
|
7150
7466
|
for (const child of node.children) {
|
|
7151
|
-
const error = ruleError(child, properties, shapes);
|
|
7467
|
+
const error = ruleError(child, properties, shapes, functions);
|
|
7152
7468
|
if (error) return error;
|
|
7153
7469
|
}
|
|
7154
7470
|
return null;
|
|
7155
7471
|
}
|
|
7156
|
-
var isRuleComplete = (rule, properties, shapes) => ruleError(rule, properties, shapes) === null;
|
|
7472
|
+
var isRuleComplete = (rule, properties, shapes, functions = {}) => ruleError(rule, properties, shapes, functions) === null;
|
|
7157
7473
|
var JS_OPERATOR = {
|
|
7158
7474
|
"==": "===",
|
|
7159
7475
|
"!=": "!==",
|
|
@@ -7169,7 +7485,7 @@ var rootSource = (segment, prefix) => {
|
|
|
7169
7485
|
};
|
|
7170
7486
|
var scalarSource = (segments, prefix = "") => segments.map((segment, index) => {
|
|
7171
7487
|
if (index === 0) return rootSource(segment, prefix);
|
|
7172
|
-
return
|
|
7488
|
+
return hop(segment);
|
|
7173
7489
|
}).join("");
|
|
7174
7490
|
function operandSource(operand, properties, shapes, prefix = "") {
|
|
7175
7491
|
if (operand.kind === "literal") return literalSource(operand.value);
|
|
@@ -7215,7 +7531,7 @@ function generateCheckExpression(check, properties, shapes, prefix = "") {
|
|
|
7215
7531
|
const taken = /* @__PURE__ */ new Set();
|
|
7216
7532
|
const walk = (index, base, depth) => {
|
|
7217
7533
|
const segment = segments[index];
|
|
7218
|
-
const access = index === 0 ? rootSource(segment, prefix) : `${base}
|
|
7534
|
+
const access = index === 0 ? rootSource(segment, prefix) : `${base}${hop(segment)}`;
|
|
7219
7535
|
const last = index === segments.length - 1;
|
|
7220
7536
|
if (segment.cardinality === "one") {
|
|
7221
7537
|
return last ? leaf(access, true) : walk(index + 1, access, depth);
|
|
@@ -7241,7 +7557,26 @@ function generateCallExpression(call, properties, shapes, prefix = "", callRecei
|
|
|
7241
7557
|
});
|
|
7242
7558
|
return `${callReceiver}${GLOBAL_RULE_STORES[rule.store].prop}.${rule.member}(${args.join(", ")})`;
|
|
7243
7559
|
}
|
|
7244
|
-
function
|
|
7560
|
+
function generateFunctionExpression(leaf, properties, shapes, functions, prefix = "") {
|
|
7561
|
+
const fn = functions[leaf.functionId];
|
|
7562
|
+
if (!fn) return "false";
|
|
7563
|
+
const guards = [];
|
|
7564
|
+
const args = fn.params.map((param) => {
|
|
7565
|
+
const read = scalarSource(
|
|
7566
|
+
resolvePath(leaf.args[param.id] ?? [], properties, shapes),
|
|
7567
|
+
prefix
|
|
7568
|
+
);
|
|
7569
|
+
if (param.acceptsUndefined) return read;
|
|
7570
|
+
guards.push(`${read} !== undefined`);
|
|
7571
|
+
return `(${read})!`;
|
|
7572
|
+
});
|
|
7573
|
+
const call = `${fn.name}(${args.join(", ")})`;
|
|
7574
|
+
return guards.length ? `(${[...guards, call].join(" && ")})` : call;
|
|
7575
|
+
}
|
|
7576
|
+
function generateRuleExpression(node, properties, shapes, top = true, prefix = "", callReceiver = "", functions = {}) {
|
|
7577
|
+
if (node.kind === "function") {
|
|
7578
|
+
return functionError(node, properties, shapes, functions) ? "false" : generateFunctionExpression(node, properties, shapes, functions, prefix);
|
|
7579
|
+
}
|
|
7245
7580
|
if (node.kind === "check") {
|
|
7246
7581
|
return checkError(node, properties, shapes) ? "false" : generateCheckExpression(node, properties, shapes, prefix);
|
|
7247
7582
|
}
|
|
@@ -7260,7 +7595,8 @@ function generateRuleExpression(node, properties, shapes, top = true, prefix = "
|
|
|
7260
7595
|
shapes,
|
|
7261
7596
|
false,
|
|
7262
7597
|
prefix,
|
|
7263
|
-
callReceiver
|
|
7598
|
+
callReceiver,
|
|
7599
|
+
functions
|
|
7264
7600
|
)
|
|
7265
7601
|
);
|
|
7266
7602
|
const joined = parts.join(joiner);
|
|
@@ -7282,6 +7618,15 @@ function pathChipDisplay(segments, quantifier, counted, operator = "==") {
|
|
|
7282
7618
|
}).join(".");
|
|
7283
7619
|
return counted ? `count of ${body}` : body;
|
|
7284
7620
|
}
|
|
7621
|
+
function functionChipDisplay(leaf, properties, shapes, functions) {
|
|
7622
|
+
const fn = functions[leaf.functionId];
|
|
7623
|
+
if (!fn) return "";
|
|
7624
|
+
const args = fn.params.map((param) => {
|
|
7625
|
+
const segments = resolvePath(leaf.args[param.id] ?? [], properties, shapes);
|
|
7626
|
+
return segments.length ? pathDisplay(segments) : "?";
|
|
7627
|
+
});
|
|
7628
|
+
return `${fn.name}(${args.join(", ")})`;
|
|
7629
|
+
}
|
|
7285
7630
|
function operandDisplay(operand, properties, shapes) {
|
|
7286
7631
|
if (operand.kind === "literal") return literalSource(operand.value);
|
|
7287
7632
|
const segments = resolvePath(operand.path, properties, shapes);
|
|
@@ -7361,265 +7706,6 @@ var collectListItemsAssets = (controlMap) => Object.values(controlMap ?? {}).fil
|
|
|
7361
7706
|
items
|
|
7362
7707
|
}));
|
|
7363
7708
|
|
|
7364
|
-
// libs/codegen/src/lib/binding-option-helper.ts
|
|
7365
|
-
var ROOT_PREFIX = "root:";
|
|
7366
|
-
var SEPARATOR = ".";
|
|
7367
|
-
var MAX_DEPTH = 6;
|
|
7368
|
-
var WALKABLE_ROOTS = /* @__PURE__ */ new Set([
|
|
7369
|
-
"alias",
|
|
7370
|
-
"input",
|
|
7371
|
-
"screen_computed"
|
|
7372
|
-
]);
|
|
7373
|
-
var encodeRoot = (root) => {
|
|
7374
|
-
if (root.kind === "alias") return `alias:${root.repeatId}:${root.alias}`;
|
|
7375
|
-
if (root.kind === "auth") return `auth:${root.property}`;
|
|
7376
|
-
return `${root.kind}:${root.id}`;
|
|
7377
|
-
};
|
|
7378
|
-
var encodeBinding = (binding) => {
|
|
7379
|
-
const { root, path } = binding;
|
|
7380
|
-
if (root.kind === "property" || root.kind === "computed") {
|
|
7381
|
-
return `${ROOT_PREFIX}store|${[root.id, ...path].join(SEPARATOR)}`;
|
|
7382
|
-
}
|
|
7383
|
-
const tail = path.join(SEPARATOR);
|
|
7384
|
-
return `${ROOT_PREFIX}${encodeRoot(root)}${tail ? `|${tail}` : ""}`;
|
|
7385
|
-
};
|
|
7386
|
-
var decodeRoot = (encoded) => {
|
|
7387
|
-
const parts = encoded.split(":");
|
|
7388
|
-
if (parts[0] === "alias" && parts.length === 3) {
|
|
7389
|
-
const alias = parts[2];
|
|
7390
|
-
if (alias !== "item" && alias !== "index") return void 0;
|
|
7391
|
-
return { kind: "alias", repeatId: parts[1], alias };
|
|
7392
|
-
}
|
|
7393
|
-
if (parts[0] === "auth") {
|
|
7394
|
-
const property = AUTH_PROPERTIES.find((entry2) => entry2.id === parts[1]);
|
|
7395
|
-
return property ? { kind: "auth", property: property.id } : void 0;
|
|
7396
|
-
}
|
|
7397
|
-
if (parts[0] === "user_store" && parts[1] === "deployToken") {
|
|
7398
|
-
return { kind: "auth", property: "deployToken" };
|
|
7399
|
-
}
|
|
7400
|
-
const kind = parts[0];
|
|
7401
|
-
if (kind === "input" || kind === "screen_computed" || kind === "screen_variable" || kind === "form_model") {
|
|
7402
|
-
return { kind, id: parts.slice(1).join(":") };
|
|
7403
|
-
}
|
|
7404
|
-
return void 0;
|
|
7405
|
-
};
|
|
7406
|
-
var bindingAlwaysPresent = (binding, scope) => {
|
|
7407
|
-
if (binding.path.length > 1) return false;
|
|
7408
|
-
const root = binding.root;
|
|
7409
|
-
if (root.kind === "alias") return true;
|
|
7410
|
-
if (root.kind === "screen_computed") {
|
|
7411
|
-
return screenComputedPresent(
|
|
7412
|
-
root.id,
|
|
7413
|
-
scope.screenComputeds,
|
|
7414
|
-
scope.functions,
|
|
7415
|
-
scope.inputs
|
|
7416
|
-
);
|
|
7417
|
-
}
|
|
7418
|
-
return root.kind === "input" && !!scope.inputs?.[root.id]?.required;
|
|
7419
|
-
};
|
|
7420
|
-
var sourceShapeId = (source, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
7421
|
-
if (!source) return void 0;
|
|
7422
|
-
let dataType;
|
|
7423
|
-
const root = source.root;
|
|
7424
|
-
if (root.kind === "property" || root.kind === "computed") {
|
|
7425
|
-
dataType = scope.roots[root.id]?.dataType;
|
|
7426
|
-
} else if (root.kind === "input") {
|
|
7427
|
-
dataType = scope.inputs?.[root.id]?.dataType;
|
|
7428
|
-
} else if (root.kind === "screen_computed") {
|
|
7429
|
-
const computed = scope.screenComputeds?.[root.id];
|
|
7430
|
-
dataType = computed ? screenComputedFunction(computed, scope.functions ?? {})?.returnType : void 0;
|
|
7431
|
-
} else if (root.kind === "alias") {
|
|
7432
|
-
if (root.alias === "index" || seen.has(root.repeatId)) return void 0;
|
|
7433
|
-
const rowShapeId = holderRowShapeId(
|
|
7434
|
-
scope.controlMap[root.repeatId],
|
|
7435
|
-
scope,
|
|
7436
|
-
/* @__PURE__ */ new Set([...seen, root.repeatId])
|
|
7437
|
-
);
|
|
7438
|
-
dataType = rowShapeId ? { type: "shape", shapeId: rowShapeId } : void 0;
|
|
7439
|
-
}
|
|
7440
|
-
for (const keyId of source.path) {
|
|
7441
|
-
const shape = dataType?.type === "shape" ? scope.shapes[dataType.shapeId] : void 0;
|
|
7442
|
-
const key2 = shape?.keys.find((k) => k.id === keyId);
|
|
7443
|
-
if (!key2) return void 0;
|
|
7444
|
-
dataType = key2.dataType;
|
|
7445
|
-
}
|
|
7446
|
-
return dataType?.type === "shape" ? dataType.shapeId : void 0;
|
|
7447
|
-
};
|
|
7448
|
-
var holderRowShapeId = (holder, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
7449
|
-
const shapeId = sourceShapeId(
|
|
7450
|
-
holder?.bindings?.[aliasSourceSlot(holder)],
|
|
7451
|
-
scope,
|
|
7452
|
-
holder ? /* @__PURE__ */ new Set([...seen, holder.id]) : seen
|
|
7453
|
-
);
|
|
7454
|
-
if (shapeId) return shapeId;
|
|
7455
|
-
return holder?.type === "list" /* LIST */ && toListItemRows(holder.configs?.[LIST_ITEMS_KEY]).length ? LIST_ROW_SHAPE_ID : void 0;
|
|
7456
|
-
};
|
|
7457
|
-
var aliasRoots = (scope) => {
|
|
7458
|
-
const control = scope.controlId ? scope.controlMap[scope.controlId] : void 0;
|
|
7459
|
-
if (!control || scope.allowAlias === false) return [];
|
|
7460
|
-
const from = isAliasHolder(control) ? control.parentId : control.id;
|
|
7461
|
-
return aliasHoldersInScope(from, scope.controlMap).flatMap((holder) => {
|
|
7462
|
-
const spec = aliasNames(holder);
|
|
7463
|
-
const rowShapeId = holderRowShapeId(holder, scope);
|
|
7464
|
-
return [
|
|
7465
|
-
{
|
|
7466
|
-
root: {
|
|
7467
|
-
kind: "alias",
|
|
7468
|
-
repeatId: holder.id,
|
|
7469
|
-
alias: "item"
|
|
7470
|
-
},
|
|
7471
|
-
name: spec.itemAlias,
|
|
7472
|
-
dataType: rowShapeId ? { type: "shape", shapeId: rowShapeId } : { type: "string" },
|
|
7473
|
-
cardinality: "one"
|
|
7474
|
-
},
|
|
7475
|
-
{
|
|
7476
|
-
root: {
|
|
7477
|
-
kind: "alias",
|
|
7478
|
-
repeatId: holder.id,
|
|
7479
|
-
alias: "index"
|
|
7480
|
-
},
|
|
7481
|
-
name: spec.indexAlias,
|
|
7482
|
-
dataType: { type: "number" },
|
|
7483
|
-
cardinality: "one"
|
|
7484
|
-
}
|
|
7485
|
-
];
|
|
7486
|
-
});
|
|
7487
|
-
};
|
|
7488
|
-
var screenRoots = (scope) => [
|
|
7489
|
-
...Object.values(scope.inputs ?? {}).map((input) => ({
|
|
7490
|
-
root: { kind: "input", id: input.id },
|
|
7491
|
-
name: input.name,
|
|
7492
|
-
dataType: input.dataType,
|
|
7493
|
-
cardinality: input.cardinality
|
|
7494
|
-
})),
|
|
7495
|
-
// A ScreenComputed's type is its PureFunction's declared return and is
|
|
7496
|
-
// never authored (GLOSSARY.md ScreenComputed), so it is read off the
|
|
7497
|
-
// function the same way `computedAsProperty` reads a StateComputed's.
|
|
7498
|
-
...Object.values(scope.screenComputeds ?? {}).flatMap((computed) => {
|
|
7499
|
-
const fn = screenComputedFunction(computed, scope.functions ?? {});
|
|
7500
|
-
return fn ? [
|
|
7501
|
-
{
|
|
7502
|
-
root: { kind: "screen_computed", id: computed.id },
|
|
7503
|
-
name: computed.name,
|
|
7504
|
-
dataType: fn.returnType,
|
|
7505
|
-
cardinality: returnCardinalityOf(fn)
|
|
7506
|
-
}
|
|
7507
|
-
] : [];
|
|
7508
|
-
}),
|
|
7509
|
-
// A ScreenVariable is read whole like the computed above — it holds no
|
|
7510
|
-
// StateShape, so there is nothing to walk into (ADR 0079).
|
|
7511
|
-
...Object.values(scope.screenVariables ?? {}).map((variable) => ({
|
|
7512
|
-
root: { kind: "screen_variable", id: variable.id },
|
|
7513
|
-
name: variable.name,
|
|
7514
|
-
dataType: { type: variable.dataType },
|
|
7515
|
-
cardinality: variable.cardinality
|
|
7516
|
-
})),
|
|
7517
|
-
// A FormModel is the one Screen-owned root walked into rather than read
|
|
7518
|
-
// whole: a form's value is an object, and its FormShape keys are what
|
|
7519
|
-
// reading it elsewhere means (ADR 0127).
|
|
7520
|
-
...Object.values(scope.formModels ?? {}).map((model) => ({
|
|
7521
|
-
root: { kind: "form_model", id: model.id },
|
|
7522
|
-
name: model.name,
|
|
7523
|
-
dataType: { type: "form", formId: model.formId },
|
|
7524
|
-
cardinality: "one"
|
|
7525
|
-
}))
|
|
7526
|
-
].sort((a, b) => a.name.localeCompare(b.name));
|
|
7527
|
-
var authRoots = () => AUTH_PROPERTIES.map((property) => ({
|
|
7528
|
-
root: { kind: "auth", property: property.id },
|
|
7529
|
-
name: property.name,
|
|
7530
|
-
dataType: property.dataType,
|
|
7531
|
-
cardinality: "one"
|
|
7532
|
-
}));
|
|
7533
|
-
var option = (root, path, label, dataType, cardinality) => ({
|
|
7534
|
-
value: encodeBinding({ root, path }),
|
|
7535
|
-
label,
|
|
7536
|
-
binding: { root, path },
|
|
7537
|
-
dataType,
|
|
7538
|
-
cardinality
|
|
7539
|
-
});
|
|
7540
|
-
var walkShape = (scope, accept, root, prefix, path, shapeId, depth) => {
|
|
7541
|
-
if (depth > MAX_DEPTH) return [];
|
|
7542
|
-
const keys = scope.shapes[shapeId]?.keys ?? [];
|
|
7543
|
-
const options = [];
|
|
7544
|
-
for (const key2 of keys) {
|
|
7545
|
-
const next = [...path, key2.id];
|
|
7546
|
-
const label = `${prefix}${SEPARATOR}${key2.cardinality === "one" ? key2.name : `${key2.name}[n]`}`;
|
|
7547
|
-
if (accept(key2.dataType, key2.cardinality)) {
|
|
7548
|
-
options.push(option(root, next, label, key2.dataType, key2.cardinality));
|
|
7549
|
-
}
|
|
7550
|
-
if (key2.dataType?.type === "shape" && key2.cardinality === "one") {
|
|
7551
|
-
options.push(
|
|
7552
|
-
...walkShape(
|
|
7553
|
-
scope,
|
|
7554
|
-
accept,
|
|
7555
|
-
root,
|
|
7556
|
-
label,
|
|
7557
|
-
next,
|
|
7558
|
-
key2.dataType.shapeId,
|
|
7559
|
-
depth + 1
|
|
7560
|
-
)
|
|
7561
|
-
);
|
|
7562
|
-
}
|
|
7563
|
-
}
|
|
7564
|
-
return options;
|
|
7565
|
-
};
|
|
7566
|
-
var optionsForRoot = (scope, accept, entry2) => {
|
|
7567
|
-
const shapeId = entry2.dataType?.type === "shape" ? entry2.dataType.shapeId : void 0;
|
|
7568
|
-
const own = accept(entry2.dataType, entry2.cardinality) ? [option(entry2.root, [], entry2.name, entry2.dataType, entry2.cardinality)] : [];
|
|
7569
|
-
if (!shapeId || !WALKABLE_ROOTS.has(entry2.root.kind)) return own;
|
|
7570
|
-
return [
|
|
7571
|
-
...own,
|
|
7572
|
-
...walkShape(scope, accept, entry2.root, entry2.name, [], shapeId, 0)
|
|
7573
|
-
];
|
|
7574
|
-
};
|
|
7575
|
-
var walkStore = (scope, accept, path, depth, prefix = "") => {
|
|
7576
|
-
if (depth > MAX_DEPTH) return [];
|
|
7577
|
-
const options = [];
|
|
7578
|
-
for (const segment of segmentOptions(
|
|
7579
|
-
path,
|
|
7580
|
-
path.length,
|
|
7581
|
-
scope.roots,
|
|
7582
|
-
scope.shapes
|
|
7583
|
-
)) {
|
|
7584
|
-
const next = [...path, segment.id];
|
|
7585
|
-
const name3 = segment.cardinality === "one" ? segment.name : `${segment.name}[n]`;
|
|
7586
|
-
const label = prefix ? `${prefix}${SEPARATOR}${name3}` : name3;
|
|
7587
|
-
if (accept(segment.dataType, segment.cardinality)) {
|
|
7588
|
-
const [rootId, ...rest] = next;
|
|
7589
|
-
const kind = scope.properties[rootId] ? "property" : "computed";
|
|
7590
|
-
options.push(
|
|
7591
|
-
option(
|
|
7592
|
-
{ kind, id: rootId },
|
|
7593
|
-
rest,
|
|
7594
|
-
label,
|
|
7595
|
-
segment.dataType,
|
|
7596
|
-
segment.cardinality
|
|
7597
|
-
)
|
|
7598
|
-
);
|
|
7599
|
-
}
|
|
7600
|
-
if (segment.dataType.type === "shape" && segment.cardinality === "one") {
|
|
7601
|
-
options.push(...walkStore(scope, accept, next, depth + 1, label));
|
|
7602
|
-
}
|
|
7603
|
-
}
|
|
7604
|
-
return options;
|
|
7605
|
-
};
|
|
7606
|
-
var bindingOptions = (rawScope, accept) => {
|
|
7607
|
-
const scope = {
|
|
7608
|
-
...rawScope,
|
|
7609
|
-
shapes: withListRowShape(rawScope.shapes)
|
|
7610
|
-
};
|
|
7611
|
-
return [
|
|
7612
|
-
...[
|
|
7613
|
-
...aliasRoots(scope),
|
|
7614
|
-
...screenRoots(scope),
|
|
7615
|
-
...authRoots()
|
|
7616
|
-
].flatMap(
|
|
7617
|
-
(entry2) => optionsForRoot(scope, accept, entry2)
|
|
7618
|
-
),
|
|
7619
|
-
...walkStore(scope, accept, [], 0)
|
|
7620
|
-
];
|
|
7621
|
-
};
|
|
7622
|
-
|
|
7623
7709
|
// libs/codegen/src/lib/form-control-helper.ts
|
|
7624
7710
|
function normalizeFieldName(raw) {
|
|
7625
7711
|
return raw.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
@@ -7966,9 +8052,10 @@ var walkKeys = (keyIds, rootShapeId2, shapes) => {
|
|
|
7966
8052
|
const names = [];
|
|
7967
8053
|
let shapeId = rootShapeId2;
|
|
7968
8054
|
for (const keyId of keyIds) {
|
|
7969
|
-
const
|
|
8055
|
+
const shape = shapeId ? shapes[shapeId] : void 0;
|
|
8056
|
+
const key2 = shape?.keys.find((k) => k.id === keyId);
|
|
7970
8057
|
if (!key2) return void 0;
|
|
7971
|
-
names.push(key2
|
|
8058
|
+
names.push(memberToken(shape, key2));
|
|
7972
8059
|
shapeId = key2.dataType?.type === "shape" ? key2.dataType.shapeId : void 0;
|
|
7973
8060
|
}
|
|
7974
8061
|
return names;
|
|
@@ -7980,7 +8067,7 @@ var rootShapeId = (binding, scope, seen) => {
|
|
|
7980
8067
|
return dataType?.type === "shape" ? dataType.shapeId : void 0;
|
|
7981
8068
|
}
|
|
7982
8069
|
if (root.kind === "alias") {
|
|
7983
|
-
if (root.alias
|
|
8070
|
+
if (root.alias !== "item" || seen.has(root.repeatId)) return void 0;
|
|
7984
8071
|
seen.add(root.repeatId);
|
|
7985
8072
|
const holder = scope.controlMap?.[root.repeatId];
|
|
7986
8073
|
const source = holder?.bindings?.[aliasSourceSlot(holder)];
|
|
@@ -8017,6 +8104,129 @@ var bindingShapeId = (binding, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
|
8017
8104
|
}
|
|
8018
8105
|
return shapeId;
|
|
8019
8106
|
};
|
|
8107
|
+
var rowMemberOptions = (binding, scope) => rowMembers(binding, scope).map(({ value, label }) => ({
|
|
8108
|
+
value,
|
|
8109
|
+
label,
|
|
8110
|
+
noTranslate: true
|
|
8111
|
+
}));
|
|
8112
|
+
var rowMembers = (binding, scope) => {
|
|
8113
|
+
const shapeId = binding ? bindingShapeId(binding, scope) : void 0;
|
|
8114
|
+
const shape = shapeId ? shapesOf(scope)[shapeId] : void 0;
|
|
8115
|
+
if (!shape) return [];
|
|
8116
|
+
if (shape.positional) {
|
|
8117
|
+
return shape.keys.map((key2, index) => ({
|
|
8118
|
+
value: String(index),
|
|
8119
|
+
label: `${index} \xB7 ${key2.name}`,
|
|
8120
|
+
name: key2.name,
|
|
8121
|
+
type: key2.dataType?.type
|
|
8122
|
+
}));
|
|
8123
|
+
}
|
|
8124
|
+
return shape.keys.filter(
|
|
8125
|
+
(key2) => key2.cardinality === "one" && key2.dataType?.type !== "shape"
|
|
8126
|
+
).map((key2) => ({
|
|
8127
|
+
value: key2.name,
|
|
8128
|
+
label: key2.name,
|
|
8129
|
+
name: key2.name,
|
|
8130
|
+
type: key2.dataType?.type
|
|
8131
|
+
}));
|
|
8132
|
+
};
|
|
8133
|
+
var isTimeMember = (name3) => /date|time|^(t|ts|x|day|period)$/i.test(name3) || /(At|_at)$/.test(name3);
|
|
8134
|
+
var seriesMemberPicks = (binding, scope, current) => {
|
|
8135
|
+
const members = rowMembers(binding, scope);
|
|
8136
|
+
if (!members.length) return {};
|
|
8137
|
+
const offered = (value) => typeof value === "string" && members.some((m) => m.value === value);
|
|
8138
|
+
const x = offered(current.x) ? current.x : (members.find((m) => isTimeMember(m.name)) ?? members.find((m) => m.type === "string") ?? members[0]).value;
|
|
8139
|
+
const rest = members.filter((m) => m.value !== x);
|
|
8140
|
+
const y = offered(current.y) && current.y !== x ? current.y : (rest.find((m) => m.type === "number") ?? rest[0])?.value;
|
|
8141
|
+
return {
|
|
8142
|
+
...x !== current.x ? { x } : {},
|
|
8143
|
+
...y !== void 0 && y !== current.y ? { y } : {}
|
|
8144
|
+
};
|
|
8145
|
+
};
|
|
8146
|
+
var bindingCardinality = (binding, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
8147
|
+
const root = binding.root;
|
|
8148
|
+
let dataType;
|
|
8149
|
+
let cardinality;
|
|
8150
|
+
switch (root.kind) {
|
|
8151
|
+
case "property": {
|
|
8152
|
+
const property = scope.properties?.[root.id];
|
|
8153
|
+
dataType = property?.dataType;
|
|
8154
|
+
cardinality = property?.cardinality;
|
|
8155
|
+
break;
|
|
8156
|
+
}
|
|
8157
|
+
case "computed": {
|
|
8158
|
+
const computed = scope.computeds?.[root.id];
|
|
8159
|
+
const fn = computed ? scope.functions?.[computed.functionId] : void 0;
|
|
8160
|
+
const folded = fn ? void 0 : scope.properties?.[root.id];
|
|
8161
|
+
dataType = fn?.returnType ?? folded?.dataType;
|
|
8162
|
+
cardinality = fn ? returnCardinalityOf(fn) : folded?.cardinality;
|
|
8163
|
+
break;
|
|
8164
|
+
}
|
|
8165
|
+
case "input": {
|
|
8166
|
+
const input = scope.inputs?.[root.id];
|
|
8167
|
+
dataType = input?.dataType;
|
|
8168
|
+
cardinality = input?.cardinality;
|
|
8169
|
+
break;
|
|
8170
|
+
}
|
|
8171
|
+
case "screen_computed": {
|
|
8172
|
+
const computed = scope.screenComputeds?.[root.id];
|
|
8173
|
+
const fn = computed ? screenComputedFunction(computed, scope.functions ?? {}) : void 0;
|
|
8174
|
+
dataType = fn?.returnType;
|
|
8175
|
+
cardinality = fn ? returnCardinalityOf(fn) : void 0;
|
|
8176
|
+
break;
|
|
8177
|
+
}
|
|
8178
|
+
case "screen_variable": {
|
|
8179
|
+
const variable = scope.screenVariables?.[root.id];
|
|
8180
|
+
dataType = variable ? { type: variable.dataType } : void 0;
|
|
8181
|
+
cardinality = variable?.cardinality;
|
|
8182
|
+
break;
|
|
8183
|
+
}
|
|
8184
|
+
case "form_model": {
|
|
8185
|
+
const model = scope.formModels?.[root.id];
|
|
8186
|
+
dataType = model ? { type: "form", formId: model.formId } : void 0;
|
|
8187
|
+
cardinality = model ? "one" : void 0;
|
|
8188
|
+
break;
|
|
8189
|
+
}
|
|
8190
|
+
case "auth":
|
|
8191
|
+
return binding.path.length ? void 0 : "one";
|
|
8192
|
+
case "alias": {
|
|
8193
|
+
if (seen.has(root.repeatId)) return void 0;
|
|
8194
|
+
seen.add(root.repeatId);
|
|
8195
|
+
const holder = scope.controlMap?.[root.repeatId];
|
|
8196
|
+
if (!holder) return void 0;
|
|
8197
|
+
if (root.alias !== "item") return binding.path.length ? void 0 : "one";
|
|
8198
|
+
const source = holder.bindings?.[aliasSourceSlot(holder)];
|
|
8199
|
+
const sourceCardinality = source ? bindingCardinality(source, scope, seen) : void 0;
|
|
8200
|
+
const shapeId = rootShapeId(binding, scope, /* @__PURE__ */ new Set());
|
|
8201
|
+
dataType = shapeId ? { type: "shape", shapeId } : void 0;
|
|
8202
|
+
cardinality = sourceCardinality === "map-many" ? "many" : "one";
|
|
8203
|
+
break;
|
|
8204
|
+
}
|
|
8205
|
+
}
|
|
8206
|
+
for (const keyId of binding.path) {
|
|
8207
|
+
const key2 = dataType?.type === "shape" ? shapesOf(scope)[dataType.shapeId]?.keys.find(
|
|
8208
|
+
(entry2) => entry2.id === keyId
|
|
8209
|
+
) : void 0;
|
|
8210
|
+
if (!key2) return void 0;
|
|
8211
|
+
dataType = key2.dataType;
|
|
8212
|
+
cardinality = key2.cardinality;
|
|
8213
|
+
}
|
|
8214
|
+
return cardinality;
|
|
8215
|
+
};
|
|
8216
|
+
var isKeyedRepeat = (control, scope) => {
|
|
8217
|
+
if (control.type !== "repeat" /* REPEAT */) return false;
|
|
8218
|
+
const source = control.bindings?.[BINDING_SLOT.source];
|
|
8219
|
+
return !!source && isMapCardinality(bindingCardinality(source, scope));
|
|
8220
|
+
};
|
|
8221
|
+
var aliasDisplayName = (repeatId, alias, scope) => {
|
|
8222
|
+
const holder = scope.controlMap?.[repeatId];
|
|
8223
|
+
const spec = aliasNames(holder);
|
|
8224
|
+
if (alias === "index") return spec.indexAlias;
|
|
8225
|
+
if (holder && isKeyedRepeat(holder, scope)) {
|
|
8226
|
+
return `${spec.itemAlias}.${alias === "key" ? "key" : "value"}`;
|
|
8227
|
+
}
|
|
8228
|
+
return alias === "key" ? spec.keyAlias : spec.itemAlias;
|
|
8229
|
+
};
|
|
8020
8230
|
var sourceCarriesTrackKey = (source, keyId, scope) => {
|
|
8021
8231
|
const shapeId = bindingShapeId(source, scope);
|
|
8022
8232
|
return !!shapeId && (shapesOf(scope)[shapeId]?.keys ?? []).some((key2) => key2.id === keyId);
|
|
@@ -8071,18 +8281,26 @@ var rootExpression = (binding, scope) => {
|
|
|
8071
8281
|
return name3 ? `${scope.memberPrefix ?? ""}${name3}()` : void 0;
|
|
8072
8282
|
}
|
|
8073
8283
|
case "alias": {
|
|
8074
|
-
const
|
|
8284
|
+
const holder = scope.controlMap?.[root.repeatId];
|
|
8285
|
+
const spec = aliasNames(holder);
|
|
8286
|
+
if (root.alias === "key") {
|
|
8287
|
+
return holder && isKeyedRepeat(holder, scope) ? spec.keyAlias : void 0;
|
|
8288
|
+
}
|
|
8075
8289
|
return root.alias === "index" ? spec.indexAlias : spec.itemAlias;
|
|
8076
8290
|
}
|
|
8077
8291
|
// Never gated by `scope.storeProp`: AuthStore is app-wide, not
|
|
8078
8292
|
// Feature-owned, so it reads the same on a storeless Page (ADR 0040).
|
|
8079
8293
|
case "auth":
|
|
8080
8294
|
return `${scope.memberPrefix ?? ""}authStore.${AUTH_EXPRESSION[root.property]}`;
|
|
8295
|
+
// A FunctionBinding that reads nothing (ADR 0199): no argument is a `pipe`,
|
|
8296
|
+
// so this head is never spelled — the call alone is the read.
|
|
8297
|
+
case "none":
|
|
8298
|
+
return binding.transform ? "undefined" : void 0;
|
|
8081
8299
|
}
|
|
8082
8300
|
};
|
|
8083
8301
|
var rootIsPresent = (binding, scope) => {
|
|
8084
8302
|
const root = binding.root;
|
|
8085
|
-
if (root.kind === "alias") return true;
|
|
8303
|
+
if (root.kind === "alias" || root.kind === "none") return true;
|
|
8086
8304
|
if (root.kind === "screen_computed") {
|
|
8087
8305
|
return screenComputedPresent(
|
|
8088
8306
|
root.id,
|
|
@@ -8111,8 +8329,8 @@ var bindingExpression = (binding, scope, guardAlias) => {
|
|
|
8111
8329
|
);
|
|
8112
8330
|
if (!names) return void 0;
|
|
8113
8331
|
const present = !!guardAlias || rootIsPresent(binding, scope);
|
|
8114
|
-
const
|
|
8115
|
-
expr = `${head}${
|
|
8332
|
+
const [first, ...rest] = names;
|
|
8333
|
+
expr = `${head}${memberStep(present ? "." : "?.", first)}${rest.map((name3) => memberStep("?.", name3)).join("")}`;
|
|
8116
8334
|
}
|
|
8117
8335
|
if (!binding.transform) return expr;
|
|
8118
8336
|
const roots = transformRoots(scope);
|
|
@@ -8124,7 +8342,11 @@ var bindingExpression = (binding, scope, guardAlias) => {
|
|
|
8124
8342
|
)) {
|
|
8125
8343
|
return void 0;
|
|
8126
8344
|
}
|
|
8345
|
+
const leafRead = (leaf) => bindingExpression(leaf, scope);
|
|
8346
|
+
const leaves = transformBindingLeaves(binding.transform);
|
|
8347
|
+
if (leaves.some((leaf) => !leafRead(leaf))) return void 0;
|
|
8127
8348
|
return emitTransformExpr(binding.transform, expr, {
|
|
8349
|
+
bindingRead: leafRead,
|
|
8128
8350
|
functions: scope.functions ?? {},
|
|
8129
8351
|
properties: roots,
|
|
8130
8352
|
shapes: shapesOf(scope),
|
|
@@ -8220,7 +8442,12 @@ var bindingGapReason = (binding, scope) => {
|
|
|
8220
8442
|
roots,
|
|
8221
8443
|
shapesOf(scope)
|
|
8222
8444
|
);
|
|
8223
|
-
if (!err)
|
|
8445
|
+
if (!err) {
|
|
8446
|
+
const dead = transformBindingLeaves(binding.transform).find(
|
|
8447
|
+
(leaf) => !bindingExpression(leaf, scope)
|
|
8448
|
+
);
|
|
8449
|
+
return dead ? `function argument ${rootLabel(dead.root, scope)} does not resolve here` : "cannot emit here";
|
|
8450
|
+
}
|
|
8224
8451
|
const detail = transformGapDetail(
|
|
8225
8452
|
binding.transform,
|
|
8226
8453
|
scope.functions ?? {},
|
|
@@ -8233,8 +8460,12 @@ var repeatHeader = (control, scope) => {
|
|
|
8233
8460
|
const source = control.bindings?.["source"];
|
|
8234
8461
|
if (!source) return void 0;
|
|
8235
8462
|
const spec = repeatSpec(control);
|
|
8236
|
-
if (!spec.track) return void 0;
|
|
8237
8463
|
const expr = bindingExpression(source, scope);
|
|
8464
|
+
if (expr && isKeyedRepeat(control, scope)) {
|
|
8465
|
+
const entry2 = repeatEntryName(spec.itemAlias);
|
|
8466
|
+
return `${entry2} of ((${expr} | keyvalue) ?? []); track ${entry2}.key; let ${spec.indexAlias} = $index`;
|
|
8467
|
+
}
|
|
8468
|
+
if (!spec.track) return void 0;
|
|
8238
8469
|
if (!expr) return void 0;
|
|
8239
8470
|
const track = trackExpression(
|
|
8240
8471
|
spec.track,
|
|
@@ -8246,12 +8477,24 @@ var repeatHeader = (control, scope) => {
|
|
|
8246
8477
|
if (!track) return void 0;
|
|
8247
8478
|
return `${spec.itemAlias} of (${expr} ?? []); track ${track}; let ${spec.indexAlias} = $index`;
|
|
8248
8479
|
};
|
|
8480
|
+
var repeatEntryName = (itemAlias) => `${itemAlias}Entry`;
|
|
8481
|
+
var repeatEntryLets = (control, scope) => {
|
|
8482
|
+
if (!isKeyedRepeat(control, scope)) return [];
|
|
8483
|
+
const spec = repeatSpec(control);
|
|
8484
|
+
const entry2 = repeatEntryName(spec.itemAlias);
|
|
8485
|
+
return [
|
|
8486
|
+
`@let ${spec.itemAlias} = ${entry2}.value;`,
|
|
8487
|
+
...spec.keyAlias ? [`@let ${spec.keyAlias} = ${entry2}.key;`] : []
|
|
8488
|
+
];
|
|
8489
|
+
};
|
|
8249
8490
|
var repeatGapReason = (control, scope) => {
|
|
8250
8491
|
const source = control.bindings?.["source"];
|
|
8251
8492
|
if (!source) return "no source bound";
|
|
8252
8493
|
const spec = repeatSpec(control);
|
|
8494
|
+
const resolves = !!bindingExpression(source, scope);
|
|
8495
|
+
if (resolves && isKeyedRepeat(control, scope)) return void 0;
|
|
8253
8496
|
if (!spec.track) return "no track picked";
|
|
8254
|
-
if (!
|
|
8497
|
+
if (!resolves) {
|
|
8255
8498
|
return `source ${rootLabel(source.root, scope)} does not resolve here`;
|
|
8256
8499
|
}
|
|
8257
8500
|
if (spec.track.kind !== "key") return void 0;
|
|
@@ -8276,14 +8519,310 @@ var rootLabel = (root, scope) => {
|
|
|
8276
8519
|
return `row alias of repeat '${root.repeatId}'`;
|
|
8277
8520
|
case "auth":
|
|
8278
8521
|
return `auth field '${root.property}'`;
|
|
8522
|
+
case "none":
|
|
8523
|
+
return "function call";
|
|
8279
8524
|
}
|
|
8280
8525
|
};
|
|
8281
8526
|
var trackExpression = (track, itemAlias, indexAlias, source, scope) => {
|
|
8282
8527
|
if (track.kind === "item") return itemAlias;
|
|
8283
8528
|
if (track.kind === "index") return indexAlias;
|
|
8284
8529
|
const shapeId = bindingShapeId(source, scope);
|
|
8285
|
-
const
|
|
8286
|
-
|
|
8530
|
+
const shape = shapeId ? shapesOf(scope)[shapeId] : void 0;
|
|
8531
|
+
const key2 = shape?.keys.find((k) => k.id === track.keyId);
|
|
8532
|
+
return key2 ? `${itemAlias}${memberAccess(shape, key2)}` : void 0;
|
|
8533
|
+
};
|
|
8534
|
+
|
|
8535
|
+
// libs/codegen/src/lib/binding-option-helper.ts
|
|
8536
|
+
var ROOT_PREFIX = "root:";
|
|
8537
|
+
var SEPARATOR = ".";
|
|
8538
|
+
var MAX_DEPTH = 6;
|
|
8539
|
+
var WALKABLE_ROOTS = /* @__PURE__ */ new Set([
|
|
8540
|
+
"alias",
|
|
8541
|
+
"input",
|
|
8542
|
+
"screen_computed"
|
|
8543
|
+
]);
|
|
8544
|
+
var encodeRoot = (root) => {
|
|
8545
|
+
if (root.kind === "alias") return `alias:${root.repeatId}:${root.alias}`;
|
|
8546
|
+
if (root.kind === "auth") return `auth:${root.property}`;
|
|
8547
|
+
if (root.kind === "none") return root.kind;
|
|
8548
|
+
return `${root.kind}:${root.id}`;
|
|
8549
|
+
};
|
|
8550
|
+
var encodeBinding = (binding) => {
|
|
8551
|
+
const { root, path } = binding;
|
|
8552
|
+
if (root.kind === "property" || root.kind === "computed") {
|
|
8553
|
+
return `${ROOT_PREFIX}store|${[root.id, ...path].join(SEPARATOR)}`;
|
|
8554
|
+
}
|
|
8555
|
+
const tail = path.join(SEPARATOR);
|
|
8556
|
+
return `${ROOT_PREFIX}${encodeRoot(root)}${tail ? `|${tail}` : ""}`;
|
|
8557
|
+
};
|
|
8558
|
+
var decodeRoot = (encoded) => {
|
|
8559
|
+
const parts = encoded.split(":");
|
|
8560
|
+
if (parts[0] === "alias" && parts.length === 3) {
|
|
8561
|
+
const alias = parts[2];
|
|
8562
|
+
if (alias !== "item" && alias !== "index" && alias !== "key") {
|
|
8563
|
+
return void 0;
|
|
8564
|
+
}
|
|
8565
|
+
return { kind: "alias", repeatId: parts[1], alias };
|
|
8566
|
+
}
|
|
8567
|
+
if (parts[0] === "auth") {
|
|
8568
|
+
const property = AUTH_PROPERTIES.find((entry2) => entry2.id === parts[1]);
|
|
8569
|
+
return property ? { kind: "auth", property: property.id } : void 0;
|
|
8570
|
+
}
|
|
8571
|
+
if (parts[0] === "user_store" && parts[1] === "deployToken") {
|
|
8572
|
+
return { kind: "auth", property: "deployToken" };
|
|
8573
|
+
}
|
|
8574
|
+
const kind = parts[0];
|
|
8575
|
+
if (kind === "input" || kind === "screen_computed" || kind === "screen_variable" || kind === "form_model") {
|
|
8576
|
+
return { kind, id: parts.slice(1).join(":") };
|
|
8577
|
+
}
|
|
8578
|
+
return void 0;
|
|
8579
|
+
};
|
|
8580
|
+
var bindingAlwaysPresent = (binding, scope) => {
|
|
8581
|
+
if (binding.path.length > 1) return false;
|
|
8582
|
+
const root = binding.root;
|
|
8583
|
+
if (root.kind === "alias") return true;
|
|
8584
|
+
if (root.kind === "screen_computed") {
|
|
8585
|
+
return screenComputedPresent(
|
|
8586
|
+
root.id,
|
|
8587
|
+
scope.screenComputeds,
|
|
8588
|
+
scope.functions,
|
|
8589
|
+
scope.inputs
|
|
8590
|
+
);
|
|
8591
|
+
}
|
|
8592
|
+
return root.kind === "input" && !!scope.inputs?.[root.id]?.required;
|
|
8593
|
+
};
|
|
8594
|
+
var sourceShapeId = (source, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
8595
|
+
if (!source) return void 0;
|
|
8596
|
+
let dataType;
|
|
8597
|
+
const root = source.root;
|
|
8598
|
+
if (root.kind === "property" || root.kind === "computed") {
|
|
8599
|
+
dataType = scope.roots[root.id]?.dataType;
|
|
8600
|
+
} else if (root.kind === "input") {
|
|
8601
|
+
dataType = scope.inputs?.[root.id]?.dataType;
|
|
8602
|
+
} else if (root.kind === "screen_computed") {
|
|
8603
|
+
const computed = scope.screenComputeds?.[root.id];
|
|
8604
|
+
dataType = computed ? screenComputedFunction(computed, scope.functions ?? {})?.returnType : void 0;
|
|
8605
|
+
} else if (root.kind === "alias") {
|
|
8606
|
+
if (root.alias !== "item" || seen.has(root.repeatId)) return void 0;
|
|
8607
|
+
const rowShapeId = holderRowShapeId(
|
|
8608
|
+
scope.controlMap[root.repeatId],
|
|
8609
|
+
scope,
|
|
8610
|
+
/* @__PURE__ */ new Set([...seen, root.repeatId])
|
|
8611
|
+
);
|
|
8612
|
+
dataType = rowShapeId ? { type: "shape", shapeId: rowShapeId } : void 0;
|
|
8613
|
+
}
|
|
8614
|
+
for (const keyId of source.path) {
|
|
8615
|
+
const shape = dataType?.type === "shape" ? scope.shapes[dataType.shapeId] : void 0;
|
|
8616
|
+
const key2 = shape?.keys.find((k) => k.id === keyId);
|
|
8617
|
+
if (!key2) return void 0;
|
|
8618
|
+
dataType = key2.dataType;
|
|
8619
|
+
}
|
|
8620
|
+
return dataType?.type === "shape" ? dataType.shapeId : void 0;
|
|
8621
|
+
};
|
|
8622
|
+
var holderRowShapeId = (holder, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
8623
|
+
const shapeId = sourceShapeId(
|
|
8624
|
+
holder?.bindings?.[aliasSourceSlot(holder)],
|
|
8625
|
+
scope,
|
|
8626
|
+
holder ? /* @__PURE__ */ new Set([...seen, holder.id]) : seen
|
|
8627
|
+
);
|
|
8628
|
+
if (shapeId) return shapeId;
|
|
8629
|
+
return holder?.type === "list" /* LIST */ && toListItemRows(holder.configs?.[LIST_ITEMS_KEY]).length ? LIST_ROW_SHAPE_ID : void 0;
|
|
8630
|
+
};
|
|
8631
|
+
var asBindingScope = (scope) => ({
|
|
8632
|
+
properties: scope.roots,
|
|
8633
|
+
shapes: scope.shapes,
|
|
8634
|
+
inputs: scope.inputs,
|
|
8635
|
+
screenComputeds: scope.screenComputeds,
|
|
8636
|
+
screenVariables: scope.screenVariables,
|
|
8637
|
+
formModels: scope.formModels,
|
|
8638
|
+
functions: scope.functions,
|
|
8639
|
+
controlMap: scope.controlMap
|
|
8640
|
+
});
|
|
8641
|
+
var holderSourceCardinality = (holder, scope) => {
|
|
8642
|
+
const source = holder.bindings?.[aliasSourceSlot(holder)];
|
|
8643
|
+
return source ? bindingCardinality(source, asBindingScope(scope)) : void 0;
|
|
8644
|
+
};
|
|
8645
|
+
var aliasRoots = (scope) => {
|
|
8646
|
+
const control = scope.controlId ? scope.controlMap[scope.controlId] : void 0;
|
|
8647
|
+
if (!control || scope.allowAlias === false) return [];
|
|
8648
|
+
const from = isAliasHolder(control) ? control.parentId : control.id;
|
|
8649
|
+
return aliasHoldersInScope(from, scope.controlMap).flatMap((holder) => {
|
|
8650
|
+
const spec = aliasNames(holder);
|
|
8651
|
+
const rowShapeId = holderRowShapeId(holder, scope);
|
|
8652
|
+
const sourceCardinality = holder.type === "repeat" /* REPEAT */ ? holderSourceCardinality(holder, scope) : void 0;
|
|
8653
|
+
const keyed = sourceCardinality === "map" || sourceCardinality === "map-many";
|
|
8654
|
+
return [
|
|
8655
|
+
{
|
|
8656
|
+
root: {
|
|
8657
|
+
kind: "alias",
|
|
8658
|
+
repeatId: holder.id,
|
|
8659
|
+
alias: "item"
|
|
8660
|
+
},
|
|
8661
|
+
// `<item>.value` under a keyed Repeat, `<item>.key` below — the two
|
|
8662
|
+
// halves of one entry, display only (`aliasDisplayName`).
|
|
8663
|
+
name: keyed ? `${spec.itemAlias}.value` : spec.itemAlias,
|
|
8664
|
+
dataType: rowShapeId ? { type: "shape", shapeId: rowShapeId } : { type: "string" },
|
|
8665
|
+
cardinality: sourceCardinality === "map-many" ? "many" : "one"
|
|
8666
|
+
},
|
|
8667
|
+
{
|
|
8668
|
+
root: {
|
|
8669
|
+
kind: "alias",
|
|
8670
|
+
repeatId: holder.id,
|
|
8671
|
+
alias: "index"
|
|
8672
|
+
},
|
|
8673
|
+
name: spec.indexAlias,
|
|
8674
|
+
dataType: { type: "number" },
|
|
8675
|
+
cardinality: "one"
|
|
8676
|
+
},
|
|
8677
|
+
...keyed && spec.keyAlias ? [
|
|
8678
|
+
{
|
|
8679
|
+
root: {
|
|
8680
|
+
kind: "alias",
|
|
8681
|
+
repeatId: holder.id,
|
|
8682
|
+
alias: "key"
|
|
8683
|
+
},
|
|
8684
|
+
name: `${spec.itemAlias}.key`,
|
|
8685
|
+
dataType: { type: "string" },
|
|
8686
|
+
cardinality: "one"
|
|
8687
|
+
}
|
|
8688
|
+
] : []
|
|
8689
|
+
];
|
|
8690
|
+
});
|
|
8691
|
+
};
|
|
8692
|
+
var screenRoots = (scope) => [
|
|
8693
|
+
...Object.values(scope.inputs ?? {}).map((input) => ({
|
|
8694
|
+
root: { kind: "input", id: input.id },
|
|
8695
|
+
name: input.name,
|
|
8696
|
+
dataType: input.dataType,
|
|
8697
|
+
cardinality: input.cardinality
|
|
8698
|
+
})),
|
|
8699
|
+
// A ScreenComputed's type is its PureFunction's declared return and is
|
|
8700
|
+
// never authored (GLOSSARY.md ScreenComputed), so it is read off the
|
|
8701
|
+
// function the same way `computedAsProperty` reads a StateComputed's.
|
|
8702
|
+
...Object.values(scope.screenComputeds ?? {}).flatMap((computed) => {
|
|
8703
|
+
const fn = screenComputedFunction(computed, scope.functions ?? {});
|
|
8704
|
+
return fn ? [
|
|
8705
|
+
{
|
|
8706
|
+
root: { kind: "screen_computed", id: computed.id },
|
|
8707
|
+
name: computed.name,
|
|
8708
|
+
dataType: fn.returnType,
|
|
8709
|
+
cardinality: returnCardinalityOf(fn)
|
|
8710
|
+
}
|
|
8711
|
+
] : [];
|
|
8712
|
+
}),
|
|
8713
|
+
// A ScreenVariable is read whole like the computed above — it holds no
|
|
8714
|
+
// StateShape, so there is nothing to walk into (ADR 0079).
|
|
8715
|
+
...Object.values(scope.screenVariables ?? {}).map((variable) => ({
|
|
8716
|
+
root: { kind: "screen_variable", id: variable.id },
|
|
8717
|
+
name: variable.name,
|
|
8718
|
+
dataType: { type: variable.dataType },
|
|
8719
|
+
cardinality: variable.cardinality
|
|
8720
|
+
})),
|
|
8721
|
+
// A FormModel is the one Screen-owned root walked into rather than read
|
|
8722
|
+
// whole: a form's value is an object, and its FormShape keys are what
|
|
8723
|
+
// reading it elsewhere means (ADR 0127).
|
|
8724
|
+
...Object.values(scope.formModels ?? {}).map((model) => ({
|
|
8725
|
+
root: { kind: "form_model", id: model.id },
|
|
8726
|
+
name: model.name,
|
|
8727
|
+
dataType: { type: "form", formId: model.formId },
|
|
8728
|
+
cardinality: "one"
|
|
8729
|
+
}))
|
|
8730
|
+
].sort((a, b) => a.name.localeCompare(b.name));
|
|
8731
|
+
var authRoots = () => AUTH_PROPERTIES.map((property) => ({
|
|
8732
|
+
root: { kind: "auth", property: property.id },
|
|
8733
|
+
name: property.name,
|
|
8734
|
+
dataType: property.dataType,
|
|
8735
|
+
cardinality: "one"
|
|
8736
|
+
}));
|
|
8737
|
+
var option = (root, path, label, dataType, cardinality) => ({
|
|
8738
|
+
value: encodeBinding({ root, path }),
|
|
8739
|
+
label,
|
|
8740
|
+
binding: { root, path },
|
|
8741
|
+
dataType,
|
|
8742
|
+
cardinality
|
|
8743
|
+
});
|
|
8744
|
+
var walkShape = (scope, accept, root, prefix, path, shapeId, depth) => {
|
|
8745
|
+
if (depth > MAX_DEPTH) return [];
|
|
8746
|
+
const keys = scope.shapes[shapeId]?.keys ?? [];
|
|
8747
|
+
const options = [];
|
|
8748
|
+
for (const key2 of keys) {
|
|
8749
|
+
const next = [...path, key2.id];
|
|
8750
|
+
const label = `${prefix}${SEPARATOR}${key2.cardinality === "one" ? key2.name : `${key2.name}[n]`}`;
|
|
8751
|
+
if (accept(key2.dataType, key2.cardinality)) {
|
|
8752
|
+
options.push(option(root, next, label, key2.dataType, key2.cardinality));
|
|
8753
|
+
}
|
|
8754
|
+
if (key2.dataType?.type === "shape" && key2.cardinality === "one") {
|
|
8755
|
+
options.push(
|
|
8756
|
+
...walkShape(
|
|
8757
|
+
scope,
|
|
8758
|
+
accept,
|
|
8759
|
+
root,
|
|
8760
|
+
label,
|
|
8761
|
+
next,
|
|
8762
|
+
key2.dataType.shapeId,
|
|
8763
|
+
depth + 1
|
|
8764
|
+
)
|
|
8765
|
+
);
|
|
8766
|
+
}
|
|
8767
|
+
}
|
|
8768
|
+
return options;
|
|
8769
|
+
};
|
|
8770
|
+
var optionsForRoot = (scope, accept, entry2) => {
|
|
8771
|
+
const shapeId = entry2.dataType?.type === "shape" ? entry2.dataType.shapeId : void 0;
|
|
8772
|
+
const own = accept(entry2.dataType, entry2.cardinality) ? [option(entry2.root, [], entry2.name, entry2.dataType, entry2.cardinality)] : [];
|
|
8773
|
+
if (!shapeId || !WALKABLE_ROOTS.has(entry2.root.kind)) return own;
|
|
8774
|
+
if (entry2.root.kind === "alias" && entry2.cardinality !== "one") return own;
|
|
8775
|
+
return [
|
|
8776
|
+
...own,
|
|
8777
|
+
...walkShape(scope, accept, entry2.root, entry2.name, [], shapeId, 0)
|
|
8778
|
+
];
|
|
8779
|
+
};
|
|
8780
|
+
var walkStore = (scope, accept, path, depth, prefix = "") => {
|
|
8781
|
+
if (depth > MAX_DEPTH) return [];
|
|
8782
|
+
const options = [];
|
|
8783
|
+
for (const segment of segmentOptions(
|
|
8784
|
+
path,
|
|
8785
|
+
path.length,
|
|
8786
|
+
scope.roots,
|
|
8787
|
+
scope.shapes
|
|
8788
|
+
)) {
|
|
8789
|
+
const next = [...path, segment.id];
|
|
8790
|
+
const name3 = segment.cardinality === "one" ? segment.name : `${segment.name}[n]`;
|
|
8791
|
+
const label = prefix ? `${prefix}${SEPARATOR}${name3}` : name3;
|
|
8792
|
+
if (accept(segment.dataType, segment.cardinality)) {
|
|
8793
|
+
const [rootId, ...rest] = next;
|
|
8794
|
+
const kind = scope.properties[rootId] ? "property" : "computed";
|
|
8795
|
+
options.push(
|
|
8796
|
+
option(
|
|
8797
|
+
{ kind, id: rootId },
|
|
8798
|
+
rest,
|
|
8799
|
+
label,
|
|
8800
|
+
segment.dataType,
|
|
8801
|
+
segment.cardinality
|
|
8802
|
+
)
|
|
8803
|
+
);
|
|
8804
|
+
}
|
|
8805
|
+
if (segment.dataType.type === "shape" && segment.cardinality === "one") {
|
|
8806
|
+
options.push(...walkStore(scope, accept, next, depth + 1, label));
|
|
8807
|
+
}
|
|
8808
|
+
}
|
|
8809
|
+
return options;
|
|
8810
|
+
};
|
|
8811
|
+
var bindingOptions = (rawScope, accept) => {
|
|
8812
|
+
const scope = {
|
|
8813
|
+
...rawScope,
|
|
8814
|
+
shapes: withListRowShape(rawScope.shapes)
|
|
8815
|
+
};
|
|
8816
|
+
return [
|
|
8817
|
+
...[
|
|
8818
|
+
...aliasRoots(scope),
|
|
8819
|
+
...screenRoots(scope),
|
|
8820
|
+
...authRoots()
|
|
8821
|
+
].flatMap(
|
|
8822
|
+
(entry2) => optionsForRoot(scope, accept, entry2)
|
|
8823
|
+
),
|
|
8824
|
+
...walkStore(scope, accept, [], 0)
|
|
8825
|
+
];
|
|
8287
8826
|
};
|
|
8288
8827
|
|
|
8289
8828
|
// libs/codegen/src/lib/filter-group-helper.ts
|
|
@@ -8514,7 +9053,7 @@ function nextCallArgRow(args, rows) {
|
|
|
8514
9053
|
value: ""
|
|
8515
9054
|
};
|
|
8516
9055
|
}
|
|
8517
|
-
var
|
|
9056
|
+
var sameType4 = (a, b) => {
|
|
8518
9057
|
if (a.cardinality !== b.cardinality) return false;
|
|
8519
9058
|
if (!a.dataType || !b.dataType) return false;
|
|
8520
9059
|
if (a.dataType.type !== b.dataType.type) return false;
|
|
@@ -8532,7 +9071,7 @@ var eventMemberType = (row, scope) => {
|
|
|
8532
9071
|
function callArgEventMismatch(row, target, scope) {
|
|
8533
9072
|
if (!target?.dataType || row.transform) return false;
|
|
8534
9073
|
const member = eventMemberType(row, scope);
|
|
8535
|
-
return !!member && !
|
|
9074
|
+
return !!member && !sameType4(target, member);
|
|
8536
9075
|
}
|
|
8537
9076
|
var AUTO_CASTS = {
|
|
8538
9077
|
string: { number: "Number", boolean: "Boolean" },
|
|
@@ -8543,7 +9082,7 @@ function callArgTypeMismatch(row, target, scope) {
|
|
|
8543
9082
|
if (!target?.dataType || row.transform) return void 0;
|
|
8544
9083
|
if (row.source !== "binding" && row.source !== "event") return void 0;
|
|
8545
9084
|
const read = bindingPipeType(row, target, scope);
|
|
8546
|
-
if (!read ||
|
|
9085
|
+
if (!read || sameType4(target, read)) return void 0;
|
|
8547
9086
|
const expected = {
|
|
8548
9087
|
dataType: target.dataType,
|
|
8549
9088
|
cardinality: target.cardinality
|
|
@@ -8586,7 +9125,7 @@ var rowComplete = (row, target, payload, fieldNames, constants, functions, scope
|
|
|
8586
9125
|
if (!target.dataType) return "call-arg-type-mismatch";
|
|
8587
9126
|
const root = scope.roots?.[row.propertyId ?? ""];
|
|
8588
9127
|
if (!root) return "call-arg-unknown-state";
|
|
8589
|
-
if (!
|
|
9128
|
+
if (!sameType4(target, root)) return "call-arg-type-mismatch";
|
|
8590
9129
|
} else if (row.source === "binding") {
|
|
8591
9130
|
if (!target.dataType) return "call-arg-type-mismatch";
|
|
8592
9131
|
if (!row.binding) return "call-arg-incomplete";
|
|
@@ -8603,7 +9142,7 @@ var rowComplete = (row, target, payload, fieldNames, constants, functions, scope
|
|
|
8603
9142
|
if (!row.storageKey?.trim()) return "call-arg-incomplete";
|
|
8604
9143
|
} else if (row.source === "search") {
|
|
8605
9144
|
if (!target.dataType) return "call-arg-type-mismatch";
|
|
8606
|
-
if (!
|
|
9145
|
+
if (!sameType4(target, {
|
|
8607
9146
|
dataType: { type: "string" },
|
|
8608
9147
|
cardinality: "one"
|
|
8609
9148
|
})) {
|
|
@@ -8686,11 +9225,10 @@ function validateCallArgs(args, rows, payload, fieldNames = [], constants = {},
|
|
|
8686
9225
|
}
|
|
8687
9226
|
return void 0;
|
|
8688
9227
|
}
|
|
8689
|
-
var
|
|
8690
|
-
var IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
9228
|
+
var memberAccess3 = (segment) => isIdentifier(segment) ? `.${segment}` : `[${propertyKey(segment)}]`;
|
|
8691
9229
|
var eventExpression = (event, payload, root = "$event", eventMember, target, dataType) => {
|
|
8692
9230
|
if (payload !== "record" || !event?.length) return root;
|
|
8693
|
-
const read = `$event${event.map(
|
|
9231
|
+
const read = `$event${event.map(memberAccess3).join("")}`;
|
|
8694
9232
|
return eventMember ? eventMember(event, read, "$event", target, dataType) : read;
|
|
8695
9233
|
};
|
|
8696
9234
|
function eventPayloadTsType(reads, shapes) {
|
|
@@ -8728,11 +9266,10 @@ function eventPayloadTsType(reads, shapes) {
|
|
|
8728
9266
|
}
|
|
8729
9267
|
}
|
|
8730
9268
|
const serialize = (node) => `{ ${[...node.children.entries()].map(
|
|
8731
|
-
([name3, child]) => `${
|
|
9269
|
+
([name3, child]) => `${propertyKey(name3)}: ${child.type ?? serialize(child)}`
|
|
8732
9270
|
).join("; ")} }`;
|
|
8733
9271
|
return root.children.size ? serialize(root) : void 0;
|
|
8734
9272
|
}
|
|
8735
|
-
var quoteKey = (name3) => IDENTIFIER.test(name3) ? name3 : `'${name3}'`;
|
|
8736
9273
|
var memberRead2 = (name3, ctx) => ctx.scope === "class" ? `this.${name3}` : name3;
|
|
8737
9274
|
var callArgStateRead = (row, ctx) => {
|
|
8738
9275
|
const name3 = ctx.roots?.[row.propertyId ?? ""]?.name;
|
|
@@ -9242,18 +9779,28 @@ function collectScreenWires(tree, refs = {}) {
|
|
|
9242
9779
|
});
|
|
9243
9780
|
}
|
|
9244
9781
|
var escapeSingle = (value) => value.replace(/'/g, "\\'");
|
|
9782
|
+
var staticLiteral = (value, primitive) => {
|
|
9783
|
+
if (primitive === "number") {
|
|
9784
|
+
const parsed2 = Number(value);
|
|
9785
|
+
return Number.isFinite(parsed2) ? String(parsed2) : void 0;
|
|
9786
|
+
}
|
|
9787
|
+
if (primitive === "boolean") return String(value === "true");
|
|
9788
|
+
return `'${escapeSingle(value)}'`;
|
|
9789
|
+
};
|
|
9245
9790
|
function screenInputExpression(binding, target, wires, renderBinding = () => void 0) {
|
|
9246
9791
|
switch (binding.kind) {
|
|
9247
9792
|
case "static": {
|
|
9248
|
-
if (!target
|
|
9793
|
+
if (!target) return void 0;
|
|
9249
9794
|
const primitive = inputPrimitive(target);
|
|
9250
9795
|
if (!primitive) return void 0;
|
|
9251
|
-
if (
|
|
9252
|
-
|
|
9253
|
-
return Number.isFinite(parsed2) ? String(parsed2) : void 0;
|
|
9796
|
+
if (target.cardinality === "one") {
|
|
9797
|
+
return staticLiteral(binding.value, primitive);
|
|
9254
9798
|
}
|
|
9255
|
-
if (
|
|
9256
|
-
|
|
9799
|
+
if (target.cardinality !== "many") return void 0;
|
|
9800
|
+
const items = fixedItems(binding.value).map(
|
|
9801
|
+
(item) => staticLiteral(item, primitive)
|
|
9802
|
+
);
|
|
9803
|
+
return items.every((item) => item !== void 0) ? `[${items.join(", ")}]` : void 0;
|
|
9257
9804
|
}
|
|
9258
9805
|
case "input":
|
|
9259
9806
|
case "variable":
|
|
@@ -9563,7 +10110,7 @@ function validateStateWrites(properties, rows, payload, fieldNames, inputs, cons
|
|
|
9563
10110
|
return void 0;
|
|
9564
10111
|
}
|
|
9565
10112
|
var IDENTIFIER2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
9566
|
-
var
|
|
10113
|
+
var memberAccess4 = (segment) => IDENTIFIER2.test(segment) ? `.${segment}` : `['${segment}']`;
|
|
9567
10114
|
var valueExpression = (value, property, payload, storeProp, inputs, constants, eventRoot, self = "", eventMember) => {
|
|
9568
10115
|
if (value.kind === "clear") return "undefined";
|
|
9569
10116
|
if (value.kind === "toggle") return `!${storeProp}.${property.name}()`;
|
|
@@ -9579,7 +10126,7 @@ var valueExpression = (value, property, payload, storeProp, inputs, constants, e
|
|
|
9579
10126
|
return input ? `${self}${input.name}()` : void 0;
|
|
9580
10127
|
}
|
|
9581
10128
|
if (payload !== "record" || !value.path?.length) return eventRoot;
|
|
9582
|
-
const read = `$event${value.path.map(
|
|
10129
|
+
const read = `$event${value.path.map(memberAccess4).join("")}`;
|
|
9583
10130
|
return eventMember ? eventMember(
|
|
9584
10131
|
value.path,
|
|
9585
10132
|
read,
|
|
@@ -9778,7 +10325,7 @@ function validateScreenWrites(variables, rows, payload, fieldNames, inputs, cons
|
|
|
9778
10325
|
return void 0;
|
|
9779
10326
|
}
|
|
9780
10327
|
var IDENTIFIER3 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
9781
|
-
var
|
|
10328
|
+
var memberAccess5 = (segment) => IDENTIFIER3.test(segment) ? `.${segment}` : `['${segment}']`;
|
|
9782
10329
|
var valueExpression2 = (value, variable, payload, inputs, constants, eventRoot, self = "", eventMember) => {
|
|
9783
10330
|
if (value.kind === "clear") return "undefined";
|
|
9784
10331
|
if (value.kind === "toggle") return `!${self}${variable.name}()`;
|
|
@@ -9794,7 +10341,7 @@ var valueExpression2 = (value, variable, payload, inputs, constants, eventRoot,
|
|
|
9794
10341
|
return input ? `${self}${input.name}()` : void 0;
|
|
9795
10342
|
}
|
|
9796
10343
|
if (payload !== "record" || !value.path?.length) return eventRoot;
|
|
9797
|
-
const read = `$event${value.path.map(
|
|
10344
|
+
const read = `$event${value.path.map(memberAccess5).join("")}`;
|
|
9798
10345
|
return eventMember ? eventMember(
|
|
9799
10346
|
value.path,
|
|
9800
10347
|
read,
|
|
@@ -10119,6 +10666,19 @@ function setOutputArmMode(control, output, armId, mode) {
|
|
|
10119
10666
|
})
|
|
10120
10667
|
);
|
|
10121
10668
|
}
|
|
10669
|
+
function setOutputArmStartsChain(control, output, armId, startsChain) {
|
|
10670
|
+
const arms = outputArms(control, output);
|
|
10671
|
+
if (!arms.some((arm) => arm.id === armId)) return control;
|
|
10672
|
+
return withArms(
|
|
10673
|
+
control,
|
|
10674
|
+
output,
|
|
10675
|
+
arms.map((arm) => {
|
|
10676
|
+
if (arm.id !== armId) return arm;
|
|
10677
|
+
const { startsChain: _dropped, ...rest } = arm;
|
|
10678
|
+
return startsChain ? { ...rest, startsChain: true } : rest;
|
|
10679
|
+
})
|
|
10680
|
+
);
|
|
10681
|
+
}
|
|
10122
10682
|
function setOutputArmChecks(control, output, armId, checks) {
|
|
10123
10683
|
const arms = outputArms(control, output);
|
|
10124
10684
|
if (!arms.some((arm) => arm.id === armId)) return control;
|
|
@@ -11163,6 +11723,70 @@ function staleMenuActionItems(control) {
|
|
|
11163
11723
|
return stale;
|
|
11164
11724
|
}
|
|
11165
11725
|
|
|
11726
|
+
// libs/codegen/src/lib/plugin-control-helper.ts
|
|
11727
|
+
var PLUGIN_LINK_KEY = "link";
|
|
11728
|
+
var PLUGIN_SCREEN_KEY = "screen";
|
|
11729
|
+
var PLUGIN_INPUTS_KEY = "pluginInputs";
|
|
11730
|
+
var PLUGIN_OUTPUTS_KEY = "pluginOutputs";
|
|
11731
|
+
var PLUGIN_OUTPUT_SHAPES_KEY = "pluginOutputShapes";
|
|
11732
|
+
var PLUGIN_SOURCE_KEY = "source";
|
|
11733
|
+
var PLUGIN_PORT_KEY = "port";
|
|
11734
|
+
var pluginSourceOf = (configs) => {
|
|
11735
|
+
const source = configs?.[PLUGIN_SOURCE_KEY];
|
|
11736
|
+
return source === "local" || source === "beta" ? source : "published";
|
|
11737
|
+
};
|
|
11738
|
+
var pluginPortOf = (configs) => {
|
|
11739
|
+
const port = Number(configs?.[PLUGIN_PORT_KEY]);
|
|
11740
|
+
return Number.isInteger(port) && port > 0 && port < 65536 ? port : void 0;
|
|
11741
|
+
};
|
|
11742
|
+
var pluginOriginKey = (configs) => {
|
|
11743
|
+
const link = String(configs?.[PLUGIN_LINK_KEY] ?? "").trim();
|
|
11744
|
+
const source = pluginSourceOf(configs);
|
|
11745
|
+
return source === "local" ? `${link}|local|${pluginPortOf(configs) ?? ""}` : `${link}|${source}`;
|
|
11746
|
+
};
|
|
11747
|
+
var IDENTIFIER4 = /^[A-Za-z_$][\w$]*$/;
|
|
11748
|
+
var pluginNamesOf = (configs, key2) => [
|
|
11749
|
+
...new Set(
|
|
11750
|
+
String(configs?.[key2] ?? "").split(/[\s,]+/).map((name3) => name3.trim()).filter((name3) => IDENTIFIER4.test(name3))
|
|
11751
|
+
)
|
|
11752
|
+
];
|
|
11753
|
+
var pluginInputSlot = (name3) => `plugin:${name3}`;
|
|
11754
|
+
var pluginOutputShapeOf = (configs, name3) => {
|
|
11755
|
+
const shapes = configs?.[PLUGIN_OUTPUT_SHAPES_KEY];
|
|
11756
|
+
if (!shapes || typeof shapes !== "object" || Array.isArray(shapes))
|
|
11757
|
+
return void 0;
|
|
11758
|
+
const shape = shapes[name3];
|
|
11759
|
+
return shape === "void" || shape === "string" || shape === "number" || shape === "boolean" || shape === "record" ? shape : void 0;
|
|
11760
|
+
};
|
|
11761
|
+
var pluginPickWrites = (before, picked, contractOf) => {
|
|
11762
|
+
const after = { ...before, ...picked };
|
|
11763
|
+
const originChanged = pluginOriginKey(after) !== pluginOriginKey(before);
|
|
11764
|
+
if (originChanged) {
|
|
11765
|
+
return {
|
|
11766
|
+
[PLUGIN_SCREEN_KEY]: void 0,
|
|
11767
|
+
[PLUGIN_INPUTS_KEY]: void 0,
|
|
11768
|
+
[PLUGIN_OUTPUTS_KEY]: void 0
|
|
11769
|
+
};
|
|
11770
|
+
}
|
|
11771
|
+
if (!(PLUGIN_SCREEN_KEY in picked)) return {};
|
|
11772
|
+
const screen = String(picked[PLUGIN_SCREEN_KEY] ?? "").trim();
|
|
11773
|
+
const contract = screen ? contractOf(after, screen) : void 0;
|
|
11774
|
+
return {
|
|
11775
|
+
[PLUGIN_INPUTS_KEY]: contract?.inputs.length ? contract.inputs.join(", ") : void 0,
|
|
11776
|
+
[PLUGIN_OUTPUTS_KEY]: contract?.outputs.length ? contract.outputs.join(", ") : void 0
|
|
11777
|
+
};
|
|
11778
|
+
};
|
|
11779
|
+
var pluginContractResync = (configs, contractOf) => {
|
|
11780
|
+
const screen = String(configs?.[PLUGIN_SCREEN_KEY] ?? "").trim();
|
|
11781
|
+
if (!configs || !screen || !contractOf(configs, screen)) return null;
|
|
11782
|
+
const writes = pluginPickWrites(configs, { [PLUGIN_SCREEN_KEY]: screen }, contractOf);
|
|
11783
|
+
const names = (bag, key2) => pluginNamesOf(bag, key2).sort().join(",");
|
|
11784
|
+
const inSync = [PLUGIN_INPUTS_KEY, PLUGIN_OUTPUTS_KEY].every(
|
|
11785
|
+
(key2) => names(configs, key2) === names(writes, key2)
|
|
11786
|
+
);
|
|
11787
|
+
return inSync ? null : writes;
|
|
11788
|
+
};
|
|
11789
|
+
|
|
11166
11790
|
// libs/codegen/src/lib/store-method-helper.ts
|
|
11167
11791
|
function normalizeMethodName(raw) {
|
|
11168
11792
|
const cleaned = raw.trim().replace(
|
|
@@ -11263,8 +11887,9 @@ function findTarget(op, target) {
|
|
|
11263
11887
|
return inputPaths(op).find((t) => t.label === key2);
|
|
11264
11888
|
}
|
|
11265
11889
|
function fixedAllowed(target) {
|
|
11266
|
-
return target.cardinality === "one" && target.dataType?.type !== "shape";
|
|
11890
|
+
return (target.cardinality === "one" || target.cardinality === "many") && target.dataType?.type !== "shape";
|
|
11267
11891
|
}
|
|
11892
|
+
var fixedItems = (value) => String(value ?? "").split(/[\n,]/).map((item) => item.trim()).filter(Boolean);
|
|
11268
11893
|
function fixedIsText(target) {
|
|
11269
11894
|
return target[0] === "path" || target[0] === "query";
|
|
11270
11895
|
}
|
|
@@ -11323,7 +11948,7 @@ function methodSignature(args) {
|
|
|
11323
11948
|
);
|
|
11324
11949
|
return `f({ ${params.join("; ")} })`;
|
|
11325
11950
|
}
|
|
11326
|
-
var
|
|
11951
|
+
var sameType5 = (a, b) => a.cardinality === b.cardinality && a.dataType?.type === b.dataType?.type;
|
|
11327
11952
|
function validateInputs(method, op) {
|
|
11328
11953
|
const targets = inputPaths(op);
|
|
11329
11954
|
const keys = targets.map((t) => t.label);
|
|
@@ -11338,7 +11963,9 @@ function validateInputs(method, op) {
|
|
|
11338
11963
|
}
|
|
11339
11964
|
}
|
|
11340
11965
|
for (const mapping of method.inputs) {
|
|
11341
|
-
if (mapping.source === "fixed" && !mapping.value)
|
|
11966
|
+
if (mapping.source === "fixed" && !fixedItems(mapping.value).length) {
|
|
11967
|
+
return "input-incomplete";
|
|
11968
|
+
}
|
|
11342
11969
|
if (mapping.source === "store" && !mapping.path?.length) {
|
|
11343
11970
|
return "input-incomplete";
|
|
11344
11971
|
}
|
|
@@ -11352,7 +11979,7 @@ function validateInputs(method, op) {
|
|
|
11352
11979
|
const args = /* @__PURE__ */ new Map();
|
|
11353
11980
|
for (const arg of allArgs(method, op)) {
|
|
11354
11981
|
const seen = args.get(arg.name);
|
|
11355
|
-
if (seen && !
|
|
11982
|
+
if (seen && !sameType5(seen, arg)) return "input-arg-clash";
|
|
11356
11983
|
args.set(arg.name, arg);
|
|
11357
11984
|
}
|
|
11358
11985
|
const requiredMissing = targets.some(
|
|
@@ -11420,6 +12047,10 @@ var OUTPUT_PAYLOADS_BY_CONTROL = {
|
|
|
11420
12047
|
// libs/one SectionTableSort — the column's id and the direction.
|
|
11421
12048
|
["section_table" /* SECTION_TABLE */]: { sortChange: "record" },
|
|
11422
12049
|
["section_table_row" /* SECTION_TABLE_ROW */]: { rowClick: "void" },
|
|
12050
|
+
// libs/one SectionChart: the preset id picked (or `custom` once the window
|
|
12051
|
+
// was dragged), and the window itself as `{from, to}` ISO text — what an
|
|
12052
|
+
// ApiOperation's date params take (GLOSSARY.md SectionChartWindow).
|
|
12053
|
+
["section_chart" /* SECTION_CHART */]: { rangeChange: "string", windowChange: "record" },
|
|
11423
12054
|
// `Record<string, string | number | (string|number)[]>` keyed by each
|
|
11424
12055
|
// Filter's own `name` — a record whose members are the Filters dropped
|
|
11425
12056
|
// into the group rather than a fixed list, which is why they are resolved
|
|
@@ -11445,6 +12076,9 @@ var OUTPUT_PAYLOAD_MEMBERS = {
|
|
|
11445
12076
|
["section_table" /* SECTION_TABLE */]: {
|
|
11446
12077
|
sortChange: { id: "S", direction: "S" }
|
|
11447
12078
|
},
|
|
12079
|
+
["section_chart" /* SECTION_CHART */]: {
|
|
12080
|
+
windowChange: { from: "S", to: "S" }
|
|
12081
|
+
},
|
|
11448
12082
|
// libs/one `Audience` — one AudienceLevel, then the people and the Groups it
|
|
11449
12083
|
// lets in or keeps out (GLOSSARY.md AudiencePickerControl). Self-typed, so
|
|
11450
12084
|
// nothing binds `data` to give the output a shape (ADR 0187).
|
|
@@ -11493,6 +12127,10 @@ function filterPayloadShape(configs) {
|
|
|
11493
12127
|
}
|
|
11494
12128
|
function payloadShape(outputName, controlType, configs) {
|
|
11495
12129
|
const declared = baseOutputName(outputName);
|
|
12130
|
+
if (controlType === "plugin" /* PLUGIN */) {
|
|
12131
|
+
const pluginShape = pluginOutputShapeOf(configs, declared);
|
|
12132
|
+
if (pluginShape) return pluginShape;
|
|
12133
|
+
}
|
|
11496
12134
|
if (controlType === "field" /* FIELD */ && declared === "dataChange") {
|
|
11497
12135
|
return fieldPayloadShape(configs) ?? "void";
|
|
11498
12136
|
}
|
|
@@ -11804,7 +12442,7 @@ function responsePaths(response) {
|
|
|
11804
12442
|
});
|
|
11805
12443
|
if (cardinality !== "one" || dataType?.type !== "shape") return;
|
|
11806
12444
|
const shape = shapes[dataType.shapeId];
|
|
11807
|
-
if (!shape) return;
|
|
12445
|
+
if (!shape || shape.positional) return;
|
|
11808
12446
|
for (const key2 of shape.keys) {
|
|
11809
12447
|
walk(
|
|
11810
12448
|
[...source, key2.name],
|
|
@@ -11841,9 +12479,18 @@ function renderElement(dataType, shapes, depth, seen) {
|
|
|
11841
12479
|
if (!shape) return "object";
|
|
11842
12480
|
if (seen.has(shape.id)) return shape.name;
|
|
11843
12481
|
const next = new Set(seen).add(shape.id);
|
|
11844
|
-
const
|
|
12482
|
+
const pad2 = " ".repeat(depth + 1);
|
|
12483
|
+
if (shape.positional) {
|
|
12484
|
+
const places = shape.keys.map((key2, i) => {
|
|
12485
|
+
const comma = i < shape.keys.length - 1 ? "," : "";
|
|
12486
|
+
return `${pad2}${renderJson(key2.dataType, key2.cardinality, shapes, depth + 1, next)}${comma} // ${key2.name}`;
|
|
12487
|
+
}).join("\n");
|
|
12488
|
+
return `[
|
|
12489
|
+
${places}
|
|
12490
|
+
${" ".repeat(depth)}]`;
|
|
12491
|
+
}
|
|
11845
12492
|
const body = shape.keys.map(
|
|
11846
|
-
(key2) => `${
|
|
12493
|
+
(key2) => `${pad2}"${key2.name}": ${renderJson(key2.dataType, key2.cardinality, shapes, depth + 1, next)}`
|
|
11847
12494
|
).join(",\n");
|
|
11848
12495
|
return body ? `{
|
|
11849
12496
|
${body}
|
|
@@ -11873,6 +12520,13 @@ function literalExpression(value, dataType) {
|
|
|
11873
12520
|
if (type === "number") return String(Number(text2) || 0);
|
|
11874
12521
|
return `'${text2.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
11875
12522
|
}
|
|
12523
|
+
function fixedExpression(value, dataType, cardinality) {
|
|
12524
|
+
if (cardinality !== "many") return literalExpression(value, dataType);
|
|
12525
|
+
const items = fixedItems(value).map(
|
|
12526
|
+
(item) => literalExpression(item, dataType)
|
|
12527
|
+
);
|
|
12528
|
+
return `[${items.join(", ")}]`;
|
|
12529
|
+
}
|
|
11876
12530
|
function responsePathAt(response, source) {
|
|
11877
12531
|
const key2 = source.join(".");
|
|
11878
12532
|
return responsePaths(response).find((p2) => p2.label === key2);
|
|
@@ -12158,6 +12812,7 @@ var rulePaths2 = (rule) => {
|
|
|
12158
12812
|
return Object.values(node.args).flatMap(
|
|
12159
12813
|
(arg) => arg.kind === "path" ? [arg.path] : []
|
|
12160
12814
|
);
|
|
12815
|
+
if (node.kind === "function") return Object.values(node.args);
|
|
12161
12816
|
return node.operand.kind === "path" ? [node.path, node.operand.path] : [node.path];
|
|
12162
12817
|
};
|
|
12163
12818
|
return walk(rule);
|
|
@@ -12510,7 +13165,7 @@ function releaseBlocker(config, linked) {
|
|
|
12510
13165
|
}
|
|
12511
13166
|
|
|
12512
13167
|
// libs/codegen/src/lib/app-target-helper.ts
|
|
12513
|
-
var DEFAULT_BACKEND_URL =
|
|
13168
|
+
var DEFAULT_BACKEND_URL = DEFAULT_LOCAL_BACKEND_URL;
|
|
12514
13169
|
function normalizeBackendUrl(url) {
|
|
12515
13170
|
return url.trim().replace(/\/swagger\.json\/?$/i, "");
|
|
12516
13171
|
}
|
|
@@ -12523,15 +13178,15 @@ function resolvedAuthUrl(authUrl, fallbackAuthUrl) {
|
|
|
12523
13178
|
const trimmed = authUrl.trim();
|
|
12524
13179
|
return trimmed || fallbackAuthUrl;
|
|
12525
13180
|
}
|
|
12526
|
-
function resolvedBackendUrl(backendUrl) {
|
|
13181
|
+
function resolvedBackendUrl(backendUrl, fallbackBackendUrl = DEFAULT_LOCAL_BACKEND_URL) {
|
|
12527
13182
|
const normalized = normalizeBackendUrl(backendUrl);
|
|
12528
|
-
return normalized ||
|
|
13183
|
+
return normalized || fallbackBackendUrl;
|
|
12529
13184
|
}
|
|
12530
13185
|
function activeHosts(target) {
|
|
12531
|
-
return target.environment.
|
|
13186
|
+
return target.environment.hosts;
|
|
12532
13187
|
}
|
|
12533
13188
|
function activeBackendUrl(target) {
|
|
12534
|
-
return target.environment.
|
|
13189
|
+
return target.environment.hosts.backendUrl;
|
|
12535
13190
|
}
|
|
12536
13191
|
function loadBackendUrl(stored) {
|
|
12537
13192
|
const backend = typeof stored.backendUrl === "string" ? stored.backendUrl.trim() : "";
|
|
@@ -12545,56 +13200,44 @@ function loadBackendUrl(stored) {
|
|
|
12545
13200
|
}
|
|
12546
13201
|
}
|
|
12547
13202
|
var asHostString = (value) => typeof value === "string" ? value.trim() : "";
|
|
12548
|
-
var
|
|
12549
|
-
var normalizeStoredAuthUrl = (authUrl,
|
|
13203
|
+
var LEGACY_LOCAL_DEV_AUTH_URL = "https://api.magmonium.com";
|
|
13204
|
+
var normalizeStoredAuthUrl = (authUrl, preset, fallback) => {
|
|
12550
13205
|
const resolved = authUrl || fallback.authUrl;
|
|
12551
|
-
if (
|
|
13206
|
+
if (preset !== "prod" && resolved === LEGACY_LOCAL_DEV_AUTH_URL) {
|
|
12552
13207
|
return fallback.authUrl;
|
|
12553
13208
|
}
|
|
12554
13209
|
return resolved;
|
|
12555
13210
|
};
|
|
12556
|
-
var loadHosts = (value,
|
|
13211
|
+
var loadHosts = (value, preset) => {
|
|
13212
|
+
const fallback = presetHosts(preset);
|
|
12557
13213
|
if (!value || typeof value !== "object") return { ...fallback };
|
|
12558
13214
|
const raw = value;
|
|
12559
13215
|
return {
|
|
12560
13216
|
authUrl: normalizeStoredAuthUrl(
|
|
12561
13217
|
asHostString(raw.authUrl),
|
|
12562
|
-
|
|
13218
|
+
preset,
|
|
12563
13219
|
fallback
|
|
12564
13220
|
),
|
|
12565
13221
|
backendUrl: asHostString(raw.backendUrl) || fallback.backendUrl,
|
|
12566
13222
|
socketUrl: asHostString(raw.socketUrl) || fallback.socketUrl
|
|
12567
13223
|
};
|
|
12568
13224
|
};
|
|
13225
|
+
var isPreset = (value) => ENVIRONMENT_PRESETS.includes(value);
|
|
12569
13226
|
function loadEnvironment(stored, legacySocketUrl = "") {
|
|
12570
13227
|
const raw = stored.environment;
|
|
12571
13228
|
if (raw && typeof raw === "object") {
|
|
12572
13229
|
const env = raw;
|
|
12573
|
-
if (env.
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
prod: loadHosts(env.prod, defaultProdHosts(), "prod"),
|
|
12577
|
-
dev: loadHosts(env.dev, defaultDevHosts(), "dev")
|
|
12578
|
-
};
|
|
13230
|
+
if (env.hosts && typeof env.hosts === "object") {
|
|
13231
|
+
const preset = isPreset(env.preset) ? env.preset : "local";
|
|
13232
|
+
return { preset, hosts: loadHosts(env.hosts, preset) };
|
|
12579
13233
|
}
|
|
12580
|
-
|
|
12581
|
-
const dev = loadHosts(env.dev, defaultDevHosts(), "dev");
|
|
12582
|
-
const activeKey = env.active === "prod" ? "prod" : "dev";
|
|
12583
|
-
const fromActive = activeKey === "prod" ? prod : dev;
|
|
12584
|
-
return {
|
|
12585
|
-
normal: { ...fromActive },
|
|
12586
|
-
prod,
|
|
12587
|
-
// Old "dev" was localhost-oriented; hosted-dev defaults when the old
|
|
12588
|
-
// active was already that localhost set copied into normal.
|
|
12589
|
-
dev: activeKey === "dev" ? defaultDevHosts() : dev
|
|
12590
|
-
};
|
|
13234
|
+
return { preset: "prod", hosts: loadHosts(env.prod, "prod") };
|
|
12591
13235
|
}
|
|
12592
13236
|
const legacyBackend = loadBackendUrl(stored);
|
|
13237
|
+
const legacySocket = legacySocketUrl.trim();
|
|
12593
13238
|
return defaultEnvironment({
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
socketUrl: legacySocketUrl.trim() || defaultNormalHosts().socketUrl
|
|
12597
|
-
}
|
|
13239
|
+
...legacyBackend && { backendUrl: legacyBackend },
|
|
13240
|
+
...legacySocket && { socketUrl: legacySocket }
|
|
12598
13241
|
});
|
|
12599
13242
|
}
|
|
12600
13243
|
function appDisplayName(appName) {
|
|
@@ -12631,6 +13274,13 @@ var bumpVersion = (version3, bump) => {
|
|
|
12631
13274
|
if (bump === "minor") return `${major}.${minor + 1}.0`;
|
|
12632
13275
|
return `${major}.${minor}.${patch + 1}`;
|
|
12633
13276
|
};
|
|
13277
|
+
var newerVersion = (a, b) => {
|
|
13278
|
+
if (!isReleaseVersion(b)) return a;
|
|
13279
|
+
if (!isReleaseVersion(a)) return b;
|
|
13280
|
+
const [x, y] = [a, b].map((one) => one.split(".").map(Number));
|
|
13281
|
+
const at = x.findIndex((part, index) => part !== y[index]);
|
|
13282
|
+
return at >= 0 && y[at] > x[at] ? b : a;
|
|
13283
|
+
};
|
|
12634
13284
|
var WC_ENVIRONMENTS = ["dev", "prod"];
|
|
12635
13285
|
|
|
12636
13286
|
// libs/codegen/src/lib/app-target-storage.ts
|
|
@@ -12907,6 +13557,22 @@ var FORMAT_PIPE_CATALOG = [
|
|
|
12907
13557
|
{ name: "forceSign", dataType: BOOL2, default: false }
|
|
12908
13558
|
]
|
|
12909
13559
|
},
|
|
13560
|
+
{
|
|
13561
|
+
// The one entry that pipes into `color` rather than `label`: it reads the
|
|
13562
|
+
// raw head value beside the label chain, so `amount | money` and
|
|
13563
|
+
// `amount | signColor` stand together on one tag (ADR 0200).
|
|
13564
|
+
name: "signColor",
|
|
13565
|
+
component: "SignColorPipe",
|
|
13566
|
+
importFrom: ONE_IMPORT_MODULE,
|
|
13567
|
+
inputType: NUM2,
|
|
13568
|
+
returnType: STR2,
|
|
13569
|
+
target: "color",
|
|
13570
|
+
params: [
|
|
13571
|
+
// Theme keys rather than hex, so a gain and a loss follow the theme.
|
|
13572
|
+
{ name: "positive", dataType: STR2, default: "success" },
|
|
13573
|
+
{ name: "negative", dataType: STR2, default: "error" }
|
|
13574
|
+
]
|
|
13575
|
+
},
|
|
12910
13576
|
{
|
|
12911
13577
|
name: "timeAgo",
|
|
12912
13578
|
component: "TimeAgoPipe",
|
|
@@ -12965,6 +13631,7 @@ var FORMAT_PIPE_LABEL = {
|
|
|
12965
13631
|
money: "pipe-money",
|
|
12966
13632
|
compactNumber: "pipe-compact-number",
|
|
12967
13633
|
percentage: "pipe-percentage",
|
|
13634
|
+
signColor: "pipe-sign-color",
|
|
12968
13635
|
timeAgo: "pipe-time-ago",
|
|
12969
13636
|
date: "pipe-date"
|
|
12970
13637
|
};
|
|
@@ -12972,6 +13639,7 @@ var FORMAT_PIPE_ICON = {
|
|
|
12972
13639
|
money: "pipe_money",
|
|
12973
13640
|
compactNumber: "pipe_compact_number",
|
|
12974
13641
|
percentage: "pipe_percentage",
|
|
13642
|
+
signColor: "pipe_sign_color",
|
|
12975
13643
|
timeAgo: "pipe_time_ago",
|
|
12976
13644
|
date: "pipe_date"
|
|
12977
13645
|
};
|
|
@@ -12979,6 +13647,7 @@ var FORMAT_PIPE_FORM = {
|
|
|
12979
13647
|
money: "pipe_money_form",
|
|
12980
13648
|
compactNumber: "pipe_compact_number_form",
|
|
12981
13649
|
percentage: "pipe_percentage_form",
|
|
13650
|
+
signColor: "pipe_sign_color_form",
|
|
12982
13651
|
timeAgo: void 0,
|
|
12983
13652
|
date: "pipe_date_form"
|
|
12984
13653
|
};
|
|
@@ -12987,18 +13656,24 @@ var FORMAT_PIPE_FORM = {
|
|
|
12987
13656
|
var TEXT_SOURCE = {
|
|
12988
13657
|
translated: "translated",
|
|
12989
13658
|
static: "static",
|
|
12990
|
-
dynamic: "dynamic"
|
|
13659
|
+
dynamic: "dynamic",
|
|
13660
|
+
// A [FunctionBinding] on the label: a PureFunction call, each parameter
|
|
13661
|
+
// mapped (ADR 0197). Bound like `dynamic`, so everything that clears or
|
|
13662
|
+
// keeps a bound label treats the two alike.
|
|
13663
|
+
function: "function"
|
|
12991
13664
|
};
|
|
12992
13665
|
var TEXT_SOURCES = [
|
|
12993
13666
|
TEXT_SOURCE.translated,
|
|
12994
13667
|
TEXT_SOURCE.static,
|
|
12995
|
-
TEXT_SOURCE.dynamic
|
|
13668
|
+
TEXT_SOURCE.dynamic,
|
|
13669
|
+
TEXT_SOURCE.function
|
|
12996
13670
|
];
|
|
12997
13671
|
var STAT_TEXT_SOURCES = [
|
|
12998
13672
|
TEXT_SOURCE.translated,
|
|
12999
|
-
TEXT_SOURCE.dynamic
|
|
13673
|
+
TEXT_SOURCE.dynamic,
|
|
13674
|
+
TEXT_SOURCE.function
|
|
13000
13675
|
];
|
|
13001
|
-
var hasTextSource = (type) => type === "text" /* TEXT_OUTPUT */ || type === "stat" /* STAT */ || type === "button" /* BUTTON */;
|
|
13676
|
+
var hasTextSource = (type) => type === "text" /* TEXT_OUTPUT */ || type === "stat" /* STAT */ || type === "button" /* BUTTON */ || type === "section_chart_series" /* SECTION_CHART_SERIES */;
|
|
13002
13677
|
var textSourcesFor = (type) => type === "stat" /* STAT */ ? STAT_TEXT_SOURCES : TEXT_SOURCES;
|
|
13003
13678
|
var admitsTextSource = (type, source) => hasTextSource(type) && textSourcesFor(type).includes(source);
|
|
13004
13679
|
var NO_TRANSLATE_CONFIG_KEY = "noTranslate";
|
|
@@ -13007,7 +13682,9 @@ var isTextSource = (value) => TEXT_SOURCES.includes(value);
|
|
|
13007
13682
|
var textSourceOf = (control) => {
|
|
13008
13683
|
if (!control) return TEXT_SOURCE.translated;
|
|
13009
13684
|
if (control.textSource) return control.textSource;
|
|
13010
|
-
|
|
13685
|
+
const label = control.bindings?.[BINDING_SLOT.label];
|
|
13686
|
+
if (label?.source === "function") return TEXT_SOURCE.function;
|
|
13687
|
+
if (label) return TEXT_SOURCE.dynamic;
|
|
13011
13688
|
return control.configs?.[NO_TRANSLATE_CONFIG_KEY] === true ? TEXT_SOURCE.static : TEXT_SOURCE.translated;
|
|
13012
13689
|
};
|
|
13013
13690
|
var textSourceConfigs = (source) => ({
|
|
@@ -13021,23 +13698,39 @@ var acceptsFormatPipe = (control) => {
|
|
|
13021
13698
|
if (!hasTextSource(control?.type)) return false;
|
|
13022
13699
|
return textSourceOf(control) !== TEXT_SOURCE.translated;
|
|
13023
13700
|
};
|
|
13701
|
+
var pipesInto = (pipe, target) => (formatPipeEntry(pipe.name)?.target ?? "label") === target;
|
|
13702
|
+
var labelChainOf = (chain) => chain.filter((pipe) => pipesInto(pipe, "label"));
|
|
13703
|
+
var colorPipeOf = (chain) => chain.find((pipe) => pipesInto(pipe, "color"));
|
|
13024
13704
|
var sameDataType = (a, b) => !!a && !!b && a.type === b.type;
|
|
13025
13705
|
var chainReturnType = (chain) => {
|
|
13026
|
-
const
|
|
13706
|
+
const label = labelChainOf(chain);
|
|
13707
|
+
const last = label.length ? label[label.length - 1] : void 0;
|
|
13027
13708
|
return formatPipeEntry(last?.name)?.returnType;
|
|
13028
13709
|
};
|
|
13029
13710
|
var canAppendFormatPipe = (control, name3, headType) => {
|
|
13030
13711
|
if (!acceptsFormatPipe(control)) return false;
|
|
13031
13712
|
const entry2 = formatPipeEntry(name3);
|
|
13032
13713
|
if (!entry2) return false;
|
|
13033
|
-
const
|
|
13034
|
-
if (
|
|
13714
|
+
const chain = formatPipesOf(control);
|
|
13715
|
+
if (entry2.target === "color") {
|
|
13716
|
+
if (colorPipeOf(chain)) return false;
|
|
13717
|
+
const head = chainInputType(labelChainOf(chain)) ?? headType;
|
|
13718
|
+
return !head || sameDataType(head, entry2.inputType);
|
|
13719
|
+
}
|
|
13720
|
+
const flowing = chainReturnType(chain);
|
|
13721
|
+
if (!flowing) {
|
|
13722
|
+
const head = headType ?? chainInputType(chain);
|
|
13723
|
+
return !head || sameDataType(head, entry2.inputType);
|
|
13724
|
+
}
|
|
13035
13725
|
return sameDataType(flowing, entry2.inputType);
|
|
13036
13726
|
};
|
|
13037
13727
|
var appendableFormatPipes = (control, headType) => FORMAT_PIPE_CATALOG.filter(
|
|
13038
13728
|
(entry2) => canAppendFormatPipe(control, entry2.name, headType)
|
|
13039
13729
|
);
|
|
13040
|
-
var chainInputType = (chain) =>
|
|
13730
|
+
var chainInputType = (chain) => {
|
|
13731
|
+
const head = labelChainOf(chain)[0] ?? colorPipeOf(chain);
|
|
13732
|
+
return formatPipeEntry(head?.name)?.inputType;
|
|
13733
|
+
};
|
|
13041
13734
|
var staticLiteralType = (control) => chainInputType(formatPipesOf(control));
|
|
13042
13735
|
var literalAtType = (type, raw) => {
|
|
13043
13736
|
if (raw === void 0 || raw === null || raw === "") return void 0;
|
|
@@ -13096,24 +13789,36 @@ var entryArgs = (entry2, pipe, scope) => {
|
|
|
13096
13789
|
}
|
|
13097
13790
|
return sources.slice(0, last + 1);
|
|
13098
13791
|
};
|
|
13099
|
-
var
|
|
13792
|
+
var pipeCall = (source, pipe, scope) => {
|
|
13100
13793
|
const entry2 = formatPipeEntry(pipe.name);
|
|
13101
|
-
if (!entry2) return
|
|
13794
|
+
if (!entry2) return void 0;
|
|
13102
13795
|
const args = entryArgs(entry2, pipe, scope);
|
|
13103
|
-
if (!args) return
|
|
13796
|
+
if (!args) return void 0;
|
|
13104
13797
|
const suffix = args.length ? `:${args.join(":")}` : "";
|
|
13105
13798
|
const call = `${source} | ${entry2.name}${suffix}`;
|
|
13106
13799
|
return entry2.nullable ? `(${call}) ?? ''` : call;
|
|
13107
|
-
}
|
|
13800
|
+
};
|
|
13801
|
+
var formatPipeExpression = (chain, expr, scope) => labelChainOf(chain).reduce(
|
|
13802
|
+
(source, pipe) => pipeCall(source, pipe, scope) ?? source,
|
|
13803
|
+
expr
|
|
13804
|
+
);
|
|
13805
|
+
var colorPipeExpression = (chain, expr, scope) => {
|
|
13806
|
+
const pipe = colorPipeOf(chain);
|
|
13807
|
+
return pipe ? pipeCall(expr, pipe, scope) : void 0;
|
|
13808
|
+
};
|
|
13108
13809
|
var formatPipeCanvasSuffix = (control) => formatPipesOf(control).map((pipe) => formatPipeEntry(pipe.name)?.name).filter((name3) => !!name3).map((name3) => `|${name3}`).join("");
|
|
13109
13810
|
var formatPipeImports = (chain) => chain.map((pipe) => formatPipeEntry(pipe.name)).filter((entry2) => !!entry2).map(({ component, importFrom }) => ({ component, importFrom }));
|
|
13110
13811
|
var staticLabelSource = (chain, raw) => {
|
|
13812
|
+
if (!labelChainOf(chain).length) return void 0;
|
|
13813
|
+
return staticHeadSource(chain, raw);
|
|
13814
|
+
};
|
|
13815
|
+
var staticHeadSource = (chain, raw) => {
|
|
13111
13816
|
if (!chain.length) return void 0;
|
|
13112
13817
|
const value = literalAtType(chainInputType(chain), raw);
|
|
13113
13818
|
return value === void 0 ? void 0 : literalSource2(value);
|
|
13114
13819
|
};
|
|
13115
13820
|
var labelEmission = (chain, headType) => {
|
|
13116
|
-
if (!chain.length) return "raw";
|
|
13821
|
+
if (!labelChainOf(chain).length) return "raw";
|
|
13117
13822
|
if (!headType || sameDataType(headType, chainInputType(chain)))
|
|
13118
13823
|
return "piped";
|
|
13119
13824
|
return headType.type === "string" ? "raw" : "none";
|
|
@@ -13127,6 +13832,13 @@ var staticCanvasLiteral = (control) => {
|
|
|
13127
13832
|
return raw === void 0 || raw === null || raw === "" ? void 0 : String(raw);
|
|
13128
13833
|
};
|
|
13129
13834
|
var bindingPathText = (binding, scope) => {
|
|
13835
|
+
if (binding.root.kind === "none") {
|
|
13836
|
+
const name3 = callTargetName(
|
|
13837
|
+
functionBindingTarget(binding),
|
|
13838
|
+
scope.functions
|
|
13839
|
+
);
|
|
13840
|
+
return name3 ? `${name3}()` : "";
|
|
13841
|
+
}
|
|
13130
13842
|
const head = rootDisplayName(binding.root, scope);
|
|
13131
13843
|
if (!head) return "";
|
|
13132
13844
|
const names = [];
|
|
@@ -13193,10 +13905,8 @@ var authSlotMap = (bindings) => {
|
|
|
13193
13905
|
};
|
|
13194
13906
|
var rootDisplayName = (root, scope) => {
|
|
13195
13907
|
switch (root.kind) {
|
|
13196
|
-
case "alias":
|
|
13197
|
-
|
|
13198
|
-
return root.alias === "index" ? spec.indexAlias : spec.itemAlias;
|
|
13199
|
-
}
|
|
13908
|
+
case "alias":
|
|
13909
|
+
return aliasDisplayName(root.repeatId, root.alias, scope);
|
|
13200
13910
|
case "input":
|
|
13201
13911
|
return scope.inputs?.[root.id]?.name;
|
|
13202
13912
|
case "screen_computed":
|
|
@@ -13207,6 +13917,9 @@ var rootDisplayName = (root, scope) => {
|
|
|
13207
13917
|
return scope.formModels?.[root.id]?.name;
|
|
13208
13918
|
case "auth":
|
|
13209
13919
|
return AUTH_PROPERTIES.find((property) => property.id === root.property)?.name;
|
|
13920
|
+
// Named by its call in `bindingPathText`, which holds the binding.
|
|
13921
|
+
case "none":
|
|
13922
|
+
return void 0;
|
|
13210
13923
|
// A StateComputed resolves as a synthetic property wherever the editor
|
|
13211
13924
|
// reads paths (ADR 0047), so one lookup answers for both store roots.
|
|
13212
13925
|
default:
|
|
@@ -13330,9 +14043,12 @@ function computeMemberRead(fn, member, shapes) {
|
|
|
13330
14043
|
const names = [];
|
|
13331
14044
|
for (const keyId of member ?? []) {
|
|
13332
14045
|
if (cardinality !== "one" || dataType?.type !== "shape") return void 0;
|
|
13333
|
-
const
|
|
14046
|
+
const shape = shapes[dataType.shapeId];
|
|
14047
|
+
const key2 = shape?.keys.find(
|
|
14048
|
+
(k) => k.id === keyId
|
|
14049
|
+
);
|
|
13334
14050
|
if (!key2) return void 0;
|
|
13335
|
-
names.push(key2
|
|
14051
|
+
names.push(memberToken(shape, key2));
|
|
13336
14052
|
dataType = key2.dataType;
|
|
13337
14053
|
cardinality = key2.cardinality;
|
|
13338
14054
|
}
|
|
@@ -14227,8 +14943,9 @@ var classCardScope = (scope) => ({
|
|
|
14227
14943
|
var memberExpression = (member, itemLocal, indexLocal, shapeId, shapes) => {
|
|
14228
14944
|
if (member.kind === "item") return itemLocal;
|
|
14229
14945
|
if (member.kind === "index") return indexLocal;
|
|
14230
|
-
const
|
|
14231
|
-
|
|
14946
|
+
const shape = shapeId ? shapes[shapeId] : void 0;
|
|
14947
|
+
const key2 = shape?.keys.find((entry2) => entry2.id === member.keyId);
|
|
14948
|
+
return key2 ? `${itemLocal}${memberAccess(shape, key2)}` : void 0;
|
|
14232
14949
|
};
|
|
14233
14950
|
var cardEmit = (node, control, scope, screenRef) => {
|
|
14234
14951
|
if (!isCardHolder(control)) return void 0;
|
|
@@ -14471,12 +15188,16 @@ function mappingExpression(mapping, target, properties, shapes, functions, compu
|
|
|
14471
15188
|
const member = fn ? computeMemberRead(fn, mapping.member, shapes) : void 0;
|
|
14472
15189
|
if (!fn || !member) return void 0;
|
|
14473
15190
|
const dot = absent && !waits ? "?." : ".";
|
|
14474
|
-
source += member.names.map((name3, at) => `${at === 0 && waits ? "!" : ""}${dot
|
|
15191
|
+
source += member.names.map((name3, at) => `${at === 0 && waits ? "!" : ""}${memberStep(dot, name3)}`).join("");
|
|
14475
15192
|
} else if (waits) {
|
|
14476
15193
|
source += "!";
|
|
14477
15194
|
}
|
|
14478
15195
|
} else if (mapping.source === "fixed") {
|
|
14479
|
-
source =
|
|
15196
|
+
source = fixedExpression(
|
|
15197
|
+
mapping.value ?? "",
|
|
15198
|
+
target.dataType,
|
|
15199
|
+
target.cardinality
|
|
15200
|
+
);
|
|
14480
15201
|
} else {
|
|
14481
15202
|
source = statePathExpression(
|
|
14482
15203
|
mapping.path ?? [],
|
|
@@ -14783,11 +15504,14 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
|
|
|
14783
15504
|
return { receiver, key: property.name, value: mapping.arg };
|
|
14784
15505
|
}
|
|
14785
15506
|
const read = mapping.source.length ? `${subject}${mapping.source.map((s) => `?.${s}`).join("")}` : subject;
|
|
15507
|
+
const element = property.dataType.type === "shape" ? shapes[property.dataType.shapeId] : void 0;
|
|
15508
|
+
const keyKey = element?.keys.find((k) => k.name === mapping.keyBy);
|
|
15509
|
+
const keyRead = keyKey ? `item${memberAccess(element, keyKey)}` : `item.${mapping.keyBy}`;
|
|
14786
15510
|
const keyed = mapping.keyBy ? property.cardinality === "map-many" ? `(${castRead(read, cast, "unknown[]")} ?? []).reduce<${tsTypeExpression(
|
|
14787
15511
|
shapes,
|
|
14788
15512
|
property.dataType,
|
|
14789
15513
|
property.cardinality
|
|
14790
|
-
)}>((acc, item) => { (acc[
|
|
15514
|
+
)}>((acc, item) => { (acc[${keyRead}] ??= []).push(item); return acc; }, {})` : `Object.fromEntries((${castRead(read, cast, "unknown[]")} ?? []).map((item) => [${keyRead}, item]))` : void 0;
|
|
14791
15515
|
const value = keyed ?? castRead(
|
|
14792
15516
|
read,
|
|
14793
15517
|
cast,
|
|
@@ -15618,7 +16342,7 @@ ${computeLines.map((line) => ` ${line}`).join("\n")}
|
|
|
15618
16342
|
const member = computeMemberRead(fn, binding.member, shapes);
|
|
15619
16343
|
if (!member) continue;
|
|
15620
16344
|
const dot = fn.returnUndefined ? "?." : ".";
|
|
15621
|
-
const read2 = `${confirmReceiver}.compute.${binding.name}${member.names.map((name3) =>
|
|
16345
|
+
const read2 = `${confirmReceiver}.compute.${binding.name}${member.names.map((name3) => memberStep(dot, name3)).join("")}`;
|
|
15622
16346
|
const isText2 = member.dataType?.type === "string" && member.cardinality === "one";
|
|
15623
16347
|
if (fn.returnUndefined) {
|
|
15624
16348
|
confirmParams[slot] = isText2 ? `${read2} ?? ''` : `String(${read2} ?? '')`;
|
|
@@ -16527,7 +17251,7 @@ function screenMemberOptions(scope, dataType, cardinality, required, byName) {
|
|
|
16527
17251
|
}));
|
|
16528
17252
|
return [...inputs, ...variables, ...constants, ...computeds];
|
|
16529
17253
|
}
|
|
16530
|
-
var
|
|
17254
|
+
var sameType6 = (candidate, declared) => {
|
|
16531
17255
|
if (candidate?.type !== declared.type) return false;
|
|
16532
17256
|
return declared.type === "shape" ? candidate.type === "shape" && candidate.shapeId === declared.shapeId : true;
|
|
16533
17257
|
};
|
|
@@ -16539,7 +17263,7 @@ function dataOptions(scope, want) {
|
|
|
16539
17263
|
const listedAsMember = !!want.dataType;
|
|
16540
17264
|
return bindingOptions(
|
|
16541
17265
|
data,
|
|
16542
|
-
(candidate, rowCardinality) => rowCardinality === cardinality &&
|
|
17266
|
+
(candidate, rowCardinality) => rowCardinality === cardinality && sameType6(candidate, declared)
|
|
16543
17267
|
).filter(
|
|
16544
17268
|
({ binding }) => !(listedAsMember && binding.path.length === 0 && memberRoots.has(binding.root.kind))
|
|
16545
17269
|
).map(({ value, label, binding }) => ({
|
|
@@ -16704,8 +17428,8 @@ function validateOutputOpen(open, screens, payload, hostInputs, constants = {},
|
|
|
16704
17428
|
const filled = new Set(outputOpenInputs(open).map((row) => row.inputId));
|
|
16705
17429
|
return declared.some((input) => input.required && !filled.has(input.id)) ? "open-input-unmapped" : void 0;
|
|
16706
17430
|
}
|
|
16707
|
-
var
|
|
16708
|
-
var
|
|
17431
|
+
var IDENTIFIER5 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
17432
|
+
var memberAccess6 = (segment) => IDENTIFIER5.test(segment) ? `.${segment}` : `['${segment}']`;
|
|
16709
17433
|
function valueExpression3(value, input, payload, hostInputs, constants, eventRoot, self, eventMember, renderMember = () => void 0, renderBinding = () => void 0) {
|
|
16710
17434
|
if (value.kind === "clear") return "undefined";
|
|
16711
17435
|
if (value.kind === "screen")
|
|
@@ -16723,7 +17447,7 @@ function valueExpression3(value, input, payload, hostInputs, constants, eventRoo
|
|
|
16723
17447
|
if (value.kind === "toggle") return void 0;
|
|
16724
17448
|
if (payload === "void") return void 0;
|
|
16725
17449
|
if (payload !== "record" || !value.path?.length) return eventRoot;
|
|
16726
|
-
const read = `$event${value.path.map(
|
|
17450
|
+
const read = `$event${value.path.map(memberAccess6).join("")}`;
|
|
16727
17451
|
return eventMember ? eventMember(value.path, read, "$event", input.cardinality, input.dataType) : read;
|
|
16728
17452
|
}
|
|
16729
17453
|
var outputOpenReadsEvent = (open) => !!open && outputOpenInputs(open).some((row) => row.value.kind === "event");
|
|
@@ -16949,7 +17673,19 @@ function generateSearchFeed(storeKey, feed, properties, shapes, functions = {},
|
|
|
16949
17673
|
if (!title) return { block: "", needsSearch: false };
|
|
16950
17674
|
const item = "item";
|
|
16951
17675
|
const index = "index";
|
|
16952
|
-
const read = (path) =>
|
|
17676
|
+
const read = (path) => {
|
|
17677
|
+
let current = property.dataType;
|
|
17678
|
+
let out = item;
|
|
17679
|
+
for (const name3 of path) {
|
|
17680
|
+
const shape = current?.type === "shape" ? shapes[current.shapeId] : void 0;
|
|
17681
|
+
const key2 = shape?.keys.find(
|
|
17682
|
+
(entry2) => entry2.name === name3
|
|
17683
|
+
);
|
|
17684
|
+
out += key2 ? memberAccess(shape, key2) : `.${name3}`;
|
|
17685
|
+
current = key2?.dataType;
|
|
17686
|
+
}
|
|
17687
|
+
return out;
|
|
17688
|
+
};
|
|
16953
17689
|
const collection = `store.${property.name}() ?? []`;
|
|
16954
17690
|
const optional = (path) => path ? resolveSearchFeedMember(path, property.dataType, shapes) : void 0;
|
|
16955
17691
|
const id = optional(feed.id);
|
|
@@ -17002,8 +17738,8 @@ var isTimerComplete = (timer) => timerError(timer) === void 0;
|
|
|
17002
17738
|
// libs/codegen/src/lib/timer-codegen.ts
|
|
17003
17739
|
var ms = (seconds) => `${Math.round(seconds * 1e3)}`;
|
|
17004
17740
|
var indentBy = (block2, steps) => {
|
|
17005
|
-
const
|
|
17006
|
-
return block2.split("\n").map((line) => line.trim() ? `${
|
|
17741
|
+
const pad2 = " ".repeat(steps * 2);
|
|
17742
|
+
return block2.split("\n").map((line) => line.trim() ? `${pad2}${line}` : line).join("\n");
|
|
17007
17743
|
};
|
|
17008
17744
|
function endStatements(timer, properties, writeCall) {
|
|
17009
17745
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -17024,7 +17760,7 @@ function endStatements(timer, properties, writeCall) {
|
|
|
17024
17760
|
}
|
|
17025
17761
|
return statements;
|
|
17026
17762
|
}
|
|
17027
|
-
function timerBlock(timer, properties, shapes, roots, mint, writeCall) {
|
|
17763
|
+
function timerBlock(timer, properties, shapes, roots, mint, writeCall, functions) {
|
|
17028
17764
|
const oneShot = timer.kind === "timeout";
|
|
17029
17765
|
const schedule = oneShot ? "setTimeout" : "setInterval";
|
|
17030
17766
|
const cancel = oneShot ? "clearTimeout" : "clearInterval";
|
|
@@ -17037,7 +17773,9 @@ function timerBlock(timer, properties, shapes, roots, mint, writeCall) {
|
|
|
17037
17773
|
roots,
|
|
17038
17774
|
shapes,
|
|
17039
17775
|
true,
|
|
17040
|
-
"store."
|
|
17776
|
+
"store.",
|
|
17777
|
+
"",
|
|
17778
|
+
functions
|
|
17041
17779
|
);
|
|
17042
17780
|
const durationProperty = timer.duration?.kind === "state" ? properties[timer.duration.propertyId] : void 0;
|
|
17043
17781
|
const durationLocal = durationProperty ? mint(`${timer.name}Seconds`) : "";
|
|
@@ -17097,15 +17835,21 @@ ${scheduled.map((line) => indentBy(line, 5)).join("\n")}
|
|
|
17097
17835
|
});
|
|
17098
17836
|
});`;
|
|
17099
17837
|
}
|
|
17100
|
-
function generateTimers(timers, properties, shapes, roots, mint, writeCall) {
|
|
17838
|
+
function generateTimers(timers, properties, shapes, roots, mint, writeCall, functions = {}) {
|
|
17101
17839
|
const drawn = Object.values(timers).filter(isTimerComplete).sort((a, b) => a.name.localeCompare(b.name));
|
|
17102
17840
|
const blocks = drawn.map(
|
|
17103
|
-
(timer) => timerBlock(timer, properties, shapes, roots, mint, writeCall)
|
|
17841
|
+
(timer) => timerBlock(timer, properties, shapes, roots, mint, writeCall, functions)
|
|
17104
17842
|
).filter(Boolean);
|
|
17105
17843
|
return {
|
|
17106
17844
|
blocks,
|
|
17107
17845
|
needsUntracked: blocks.length > 0,
|
|
17108
|
-
globalStores: ruleGlobalStores(drawn.map((timer) => timer.rule))
|
|
17846
|
+
globalStores: ruleGlobalStores(drawn.map((timer) => timer.rule)),
|
|
17847
|
+
functions: ruleFunctionImports(
|
|
17848
|
+
drawn.map((timer) => timer.rule),
|
|
17849
|
+
roots,
|
|
17850
|
+
shapes,
|
|
17851
|
+
functions
|
|
17852
|
+
)
|
|
17109
17853
|
};
|
|
17110
17854
|
}
|
|
17111
17855
|
|
|
@@ -17345,7 +18089,8 @@ function generateStoreHook(featureName, hook, properties, shapes, methods, opera
|
|
|
17345
18089
|
shapes,
|
|
17346
18090
|
timerTaken,
|
|
17347
18091
|
casts
|
|
17348
|
-
)
|
|
18092
|
+
),
|
|
18093
|
+
functions
|
|
17349
18094
|
);
|
|
17350
18095
|
const body = [
|
|
17351
18096
|
...effects,
|
|
@@ -17364,7 +18109,8 @@ function generateStoreHook(featureName, hook, properties, shapes, methods, opera
|
|
|
17364
18109
|
needsFeed: false,
|
|
17365
18110
|
needsUntracked: false,
|
|
17366
18111
|
shapeTypes: [],
|
|
17367
|
-
globalStores: []
|
|
18112
|
+
globalStores: [],
|
|
18113
|
+
ruleFunctions: []
|
|
17368
18114
|
};
|
|
17369
18115
|
}
|
|
17370
18116
|
const callsRead = (hook?.calls ?? []).some(
|
|
@@ -17408,7 +18154,8 @@ ${storageLine}${searchLine}${searchStoreLine}${globalStoreLines}${body.join("\n"
|
|
|
17408
18154
|
// A StoreHookRead's cast and a `storage` call-arg row's are both the hook
|
|
17409
18155
|
// naming an interface the api half may never mention (ADR 0060).
|
|
17410
18156
|
shapeTypes: namedShapes(shapes, [...reads.typed, ...casts]),
|
|
17411
|
-
globalStores: timerEmission.globalStores
|
|
18157
|
+
globalStores: timerEmission.globalStores,
|
|
18158
|
+
ruleFunctions: timerEmission.functions
|
|
17412
18159
|
};
|
|
17413
18160
|
}
|
|
17414
18161
|
var usesStorage = (properties) => heldProperties(properties).length > 0;
|
|
@@ -17672,8 +18419,8 @@ function validateScreenEmits(outputs, rows, payload, fieldNames, inputs, constan
|
|
|
17672
18419
|
}
|
|
17673
18420
|
return void 0;
|
|
17674
18421
|
}
|
|
17675
|
-
var
|
|
17676
|
-
var
|
|
18422
|
+
var IDENTIFIER6 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
18423
|
+
var memberAccess7 = (segment) => IDENTIFIER6.test(segment) ? `.${segment}` : `['${segment}']`;
|
|
17677
18424
|
var valueExpression4 = (value, output, payload, inputs, constants, eventRoot, self, eventMember, bindings) => {
|
|
17678
18425
|
if (value.kind === "binding") {
|
|
17679
18426
|
if (bindings?.scope?.memberPrefix && value.binding.root.kind === "alias") {
|
|
@@ -17695,7 +18442,7 @@ var valueExpression4 = (value, output, payload, inputs, constants, eventRoot, se
|
|
|
17695
18442
|
return input ? `${self}${input.name}()` : void 0;
|
|
17696
18443
|
}
|
|
17697
18444
|
if (payload !== "record" || !value.path?.length) return eventRoot;
|
|
17698
|
-
const read = `$event${value.path.map(
|
|
18445
|
+
const read = `$event${value.path.map(memberAccess7).join("")}`;
|
|
17699
18446
|
return eventMember && output.payload ? eventMember(
|
|
17700
18447
|
value.path,
|
|
17701
18448
|
read,
|
|
@@ -17893,12 +18640,23 @@ function toSectionTableColumns(value) {
|
|
|
17893
18640
|
if (DATA_TYPES.includes(raw["dataType"])) {
|
|
17894
18641
|
column.dataType = raw["dataType"];
|
|
17895
18642
|
}
|
|
18643
|
+
if (raw["defaultSort"] === true) column.defaultSort = true;
|
|
18644
|
+
if (raw["ascending"] === true) column.ascending = true;
|
|
17896
18645
|
if (raw["freeze"] === true) column.freeze = true;
|
|
17897
18646
|
if (raw["squeeze"] === true) column.squeeze = true;
|
|
17898
18647
|
return column;
|
|
17899
18648
|
});
|
|
17900
18649
|
}
|
|
17901
|
-
var columnNeedsId = (column) => !!column.sortable && !column.id;
|
|
18650
|
+
var columnNeedsId = (column) => (!!column.sortable || !!column.defaultSort) && !column.id;
|
|
18651
|
+
var putSectionTableColumn = (columns, index, column) => {
|
|
18652
|
+
const next = index >= columns.length ? [...columns, column] : columns.map((current, i) => i === index ? column : current);
|
|
18653
|
+
if (!column.defaultSort) return next;
|
|
18654
|
+
return next.map((current, i) => {
|
|
18655
|
+
if (i === index || !current.defaultSort) return current;
|
|
18656
|
+
const { defaultSort: _defaultSort, ascending: _ascending, ...rest } = current;
|
|
18657
|
+
return rest;
|
|
18658
|
+
});
|
|
18659
|
+
};
|
|
17902
18660
|
var enclosingSectionTable = (control, controlMap) => {
|
|
17903
18661
|
const seen = /* @__PURE__ */ new Set();
|
|
17904
18662
|
let current = control?.parentId ? controlMap[control.parentId] : void 0;
|
|
@@ -17943,7 +18701,7 @@ function syncSectionTableCells(controlMap, tableId, change, genId2) {
|
|
|
17943
18701
|
const next = { ...controlMap };
|
|
17944
18702
|
sectionTableRows(tableId, controlMap).forEach((row) => {
|
|
17945
18703
|
const cells = [...row.childrens];
|
|
17946
|
-
const
|
|
18704
|
+
const pad2 = (length) => {
|
|
17947
18705
|
while (cells.length < length) {
|
|
17948
18706
|
const id = genId2();
|
|
17949
18707
|
next[id] = newCell(id, row.id);
|
|
@@ -17951,7 +18709,7 @@ function syncSectionTableCells(controlMap, tableId, change, genId2) {
|
|
|
17951
18709
|
}
|
|
17952
18710
|
};
|
|
17953
18711
|
if (change.kind === "add") {
|
|
17954
|
-
|
|
18712
|
+
pad2(change.index);
|
|
17955
18713
|
const id = genId2();
|
|
17956
18714
|
next[id] = newCell(id, row.id);
|
|
17957
18715
|
cells.splice(change.index, 0, id);
|
|
@@ -17963,7 +18721,7 @@ function syncSectionTableCells(controlMap, tableId, change, genId2) {
|
|
|
17963
18721
|
);
|
|
17964
18722
|
}
|
|
17965
18723
|
} else {
|
|
17966
|
-
|
|
18724
|
+
pad2(Math.max(change.from, change.to) + 1);
|
|
17967
18725
|
const [moved] = cells.splice(change.from, 1);
|
|
17968
18726
|
cells.splice(change.to, 0, moved);
|
|
17969
18727
|
}
|
|
@@ -18029,52 +18787,6 @@ var collectSearchEmits = (tree, controlMap, screenRef) => {
|
|
|
18029
18787
|
return [...emits.values()];
|
|
18030
18788
|
};
|
|
18031
18789
|
|
|
18032
|
-
// libs/codegen/src/lib/plugin-control-helper.ts
|
|
18033
|
-
var PLUGIN_LINK_KEY = "link";
|
|
18034
|
-
var PLUGIN_SCREEN_KEY = "screen";
|
|
18035
|
-
var PLUGIN_INPUTS_KEY = "pluginInputs";
|
|
18036
|
-
var PLUGIN_OUTPUTS_KEY = "pluginOutputs";
|
|
18037
|
-
var PLUGIN_SOURCE_KEY = "source";
|
|
18038
|
-
var PLUGIN_PORT_KEY = "port";
|
|
18039
|
-
var pluginSourceOf = (configs) => {
|
|
18040
|
-
const source = configs?.[PLUGIN_SOURCE_KEY];
|
|
18041
|
-
return source === "local" || source === "beta" ? source : "published";
|
|
18042
|
-
};
|
|
18043
|
-
var pluginPortOf = (configs) => {
|
|
18044
|
-
const port = Number(configs?.[PLUGIN_PORT_KEY]);
|
|
18045
|
-
return Number.isInteger(port) && port > 0 && port < 65536 ? port : void 0;
|
|
18046
|
-
};
|
|
18047
|
-
var pluginOriginKey = (configs) => {
|
|
18048
|
-
const link = String(configs?.[PLUGIN_LINK_KEY] ?? "").trim();
|
|
18049
|
-
const source = pluginSourceOf(configs);
|
|
18050
|
-
return source === "local" ? `${link}|local|${pluginPortOf(configs) ?? ""}` : `${link}|${source}`;
|
|
18051
|
-
};
|
|
18052
|
-
var IDENTIFIER6 = /^[A-Za-z_$][\w$]*$/;
|
|
18053
|
-
var pluginNamesOf = (configs, key2) => [
|
|
18054
|
-
...new Set(
|
|
18055
|
-
String(configs?.[key2] ?? "").split(/[\s,]+/).map((name3) => name3.trim()).filter((name3) => IDENTIFIER6.test(name3))
|
|
18056
|
-
)
|
|
18057
|
-
];
|
|
18058
|
-
var pluginInputSlot = (name3) => `plugin:${name3}`;
|
|
18059
|
-
var pluginPickWrites = (before, picked, contractOf) => {
|
|
18060
|
-
const after = { ...before, ...picked };
|
|
18061
|
-
const originChanged = pluginOriginKey(after) !== pluginOriginKey(before);
|
|
18062
|
-
if (originChanged) {
|
|
18063
|
-
return {
|
|
18064
|
-
[PLUGIN_SCREEN_KEY]: void 0,
|
|
18065
|
-
[PLUGIN_INPUTS_KEY]: void 0,
|
|
18066
|
-
[PLUGIN_OUTPUTS_KEY]: void 0
|
|
18067
|
-
};
|
|
18068
|
-
}
|
|
18069
|
-
if (!(PLUGIN_SCREEN_KEY in picked)) return {};
|
|
18070
|
-
const screen = String(picked[PLUGIN_SCREEN_KEY] ?? "").trim();
|
|
18071
|
-
const contract = screen ? contractOf(after, screen) : void 0;
|
|
18072
|
-
return {
|
|
18073
|
-
[PLUGIN_INPUTS_KEY]: contract?.inputs.length ? contract.inputs.join(", ") : void 0,
|
|
18074
|
-
[PLUGIN_OUTPUTS_KEY]: contract?.outputs.length ? contract.outputs.join(", ") : void 0
|
|
18075
|
-
};
|
|
18076
|
-
};
|
|
18077
|
-
|
|
18078
18790
|
// libs/codegen/src/lib/message-params-codegen.ts
|
|
18079
18791
|
var messageParamEntries = (node, control, scope) => {
|
|
18080
18792
|
if (!takesMessageParams(node.type)) return [];
|
|
@@ -19139,7 +19851,7 @@ function screenVariantsBlock(variants, inputs, computeds, constants, variables,
|
|
|
19139
19851
|
);
|
|
19140
19852
|
const roots = { ...stateRoots, ...screenRoots2 };
|
|
19141
19853
|
const variantList = Object.values(variants);
|
|
19142
|
-
if (!variantList.length) return "";
|
|
19854
|
+
if (!variantList.length) return { body: "", functions: [] };
|
|
19143
19855
|
const entries = variantList.map(
|
|
19144
19856
|
(variant) => variant.navId !== void 0 ? ` ${variant.name}: ${NAV_REF_MEMBER}?.isNavActive?.('${variant.navId}') ?? false` : ` ${variant.name}: ${generateRuleExpression(
|
|
19145
19857
|
variant.rule,
|
|
@@ -19148,14 +19860,23 @@ function screenVariantsBlock(variants, inputs, computeds, constants, variables,
|
|
|
19148
19860
|
true,
|
|
19149
19861
|
(id) => screenRoots2[id] ? constants[id] ? { prefix: "", isSignal: false } : { prefix: "this.", isSignal: true } : `this.${storeProp}.`,
|
|
19150
19862
|
// A RuleCall asks the root store this class injects (usesAuth).
|
|
19151
|
-
"this."
|
|
19863
|
+
"this.",
|
|
19864
|
+
functions
|
|
19152
19865
|
)}`
|
|
19153
19866
|
);
|
|
19154
|
-
return
|
|
19867
|
+
return {
|
|
19868
|
+
body: `
|
|
19155
19869
|
protected readonly variant = computed(() => ({
|
|
19156
19870
|
${entries.join(",\n")}
|
|
19157
19871
|
}));
|
|
19158
|
-
|
|
19872
|
+
`,
|
|
19873
|
+
functions: ruleFunctionImports(
|
|
19874
|
+
variantList.filter((variant) => variant.navId === void 0).map((variant) => variant.rule),
|
|
19875
|
+
roots,
|
|
19876
|
+
shapes,
|
|
19877
|
+
functions
|
|
19878
|
+
)
|
|
19879
|
+
};
|
|
19159
19880
|
}
|
|
19160
19881
|
function screenVariantGuard(node, variants) {
|
|
19161
19882
|
const held = (node.variants ?? []).map((entry2) => {
|
|
@@ -19341,6 +20062,9 @@ function bodyConfigs(node) {
|
|
|
19341
20062
|
if (node.type === "list" /* LIST */) {
|
|
19342
20063
|
delete configs["items"];
|
|
19343
20064
|
}
|
|
20065
|
+
if (hasTextSource(node.type) && colorPipeOf(node.formatPipes ?? [])) {
|
|
20066
|
+
delete configs["color"];
|
|
20067
|
+
}
|
|
19344
20068
|
if (node.type === "audience_picker" /* AUDIENCE_PICKER */) {
|
|
19345
20069
|
delete configs[AUDIENCE_PICKER_LEVELS_KEY];
|
|
19346
20070
|
}
|
|
@@ -19687,11 +20411,11 @@ var numberOnlyKeysOf = (type) => {
|
|
|
19687
20411
|
if (type === "section_filter" /* SECTION_FILTER */) return FILTER_NUMBER_ONLY_KEYS;
|
|
19688
20412
|
return NUMBER_ONLY_KEYS;
|
|
19689
20413
|
};
|
|
19690
|
-
function wrapInGuard(markup, guard,
|
|
20414
|
+
function wrapInGuard(markup, guard, pad2) {
|
|
19691
20415
|
if (!guard) return markup;
|
|
19692
|
-
return `${
|
|
20416
|
+
return `${pad2}@if (${guard}) {
|
|
19693
20417
|
${markup}
|
|
19694
|
-
${
|
|
20418
|
+
${pad2}}`;
|
|
19695
20419
|
}
|
|
19696
20420
|
function orderedTreeArms(node) {
|
|
19697
20421
|
const arms = node.childrens.filter(
|
|
@@ -19725,29 +20449,29 @@ function renderBranch(node, indent2, names, methods, operationOf, storeProp, ctx
|
|
|
19725
20449
|
)
|
|
19726
20450
|
).filter(Boolean).join("\n");
|
|
19727
20451
|
if (chain.length === 1 && !chain[0].guard) return body(chain[0].arm, indent2);
|
|
19728
|
-
const
|
|
20452
|
+
const pad2 = " ".repeat(indent2);
|
|
19729
20453
|
const lines = [];
|
|
19730
20454
|
chain.forEach((entry2, index) => {
|
|
19731
20455
|
lines.push(
|
|
19732
|
-
index === 0 ? `${
|
|
20456
|
+
index === 0 ? `${pad2}@if (${entry2.guard}) {` : entry2.guard ? `${pad2}} @else if (${entry2.guard}) {` : `${pad2}} @else {`
|
|
19733
20457
|
);
|
|
19734
20458
|
const inner = body(entry2.arm, indent2 + 1);
|
|
19735
20459
|
if (inner) lines.push(inner);
|
|
19736
20460
|
});
|
|
19737
|
-
lines.push(`${
|
|
20461
|
+
lines.push(`${pad2}}`);
|
|
19738
20462
|
return lines.join("\n");
|
|
19739
20463
|
}
|
|
19740
20464
|
function renderRepeat(node, indent2, names, methods, operationOf, storeProp, ctx, wires, payloads) {
|
|
19741
|
-
const
|
|
20465
|
+
const pad2 = " ".repeat(indent2);
|
|
19742
20466
|
const control = ctx.controlMap?.[node.id];
|
|
19743
20467
|
if (!control) {
|
|
19744
|
-
return `${
|
|
20468
|
+
return `${pad2}<!-- repeat ${node.id}: control is gone; not emitted -->`;
|
|
19745
20469
|
}
|
|
19746
20470
|
const scope = bindingScope(ctx, storeProp);
|
|
19747
20471
|
const header = repeatHeader(control, scope);
|
|
19748
20472
|
if (!header) {
|
|
19749
20473
|
const reason = repeatGapReason(control, scope) ?? "cannot emit here";
|
|
19750
|
-
return `${
|
|
20474
|
+
return `${pad2}<!-- repeat ${node.id}: ${reason}; not emitted -->`;
|
|
19751
20475
|
}
|
|
19752
20476
|
const body = (children, at) => children.map(
|
|
19753
20477
|
(child) => renderNode(
|
|
@@ -19773,22 +20497,25 @@ function renderRepeat(node, indent2, names, methods, operationOf, storeProp, ctx
|
|
|
19773
20497
|
/ of \((.*) \?\? \[\]\); track /,
|
|
19774
20498
|
(_, expr) => ` of ((${expr}) | sectionTableSort: ${sectionTableRef(table.id)}.sort()); track `
|
|
19775
20499
|
) : header;
|
|
19776
|
-
const lines = [`${
|
|
20500
|
+
const lines = [`${pad2}@for (${sorted}) {`];
|
|
20501
|
+
for (const line of repeatEntryLets(control, scope)) {
|
|
20502
|
+
lines.push(`${pad2} ${line}`);
|
|
20503
|
+
}
|
|
19777
20504
|
const inner = body(rows, indent2 + 1);
|
|
19778
20505
|
if (inner) lines.push(inner);
|
|
19779
20506
|
if (empty) {
|
|
19780
20507
|
const emptyInner = body(empty.childrens, indent2 + 1);
|
|
19781
|
-
lines.push(`${
|
|
20508
|
+
lines.push(`${pad2}} @empty {`);
|
|
19782
20509
|
if (emptyInner) lines.push(emptyInner);
|
|
19783
20510
|
}
|
|
19784
|
-
lines.push(`${
|
|
20511
|
+
lines.push(`${pad2}}`);
|
|
19785
20512
|
return lines.join("\n");
|
|
19786
20513
|
}
|
|
19787
20514
|
function renderContent(node, indent2, names, methods, operationOf, storeProp, ctx, wires, payloads) {
|
|
19788
20515
|
const host = ctx.controlMap?.[ctx.controlMap?.[node.id]?.parentId ?? ""];
|
|
19789
20516
|
const slot = contentSlotOf(host);
|
|
19790
20517
|
if (!slot) return "";
|
|
19791
|
-
const
|
|
20518
|
+
const pad2 = " ".repeat(indent2);
|
|
19792
20519
|
const childIndent = slot.kind === "projected" ? indent2 : indent2 + 1;
|
|
19793
20520
|
const children = node.childrens.map(
|
|
19794
20521
|
(child) => renderNode(
|
|
@@ -19805,17 +20532,17 @@ function renderContent(node, indent2, names, methods, operationOf, storeProp, ct
|
|
|
19805
20532
|
).filter(Boolean).join("\n");
|
|
19806
20533
|
if (slot.kind === "projected") {
|
|
19807
20534
|
if (host?.type === "user" /* USER */ && node.configs?.["type"] === "inline") {
|
|
19808
|
-
return `${
|
|
20535
|
+
return `${pad2}<span inline>
|
|
19809
20536
|
${children}
|
|
19810
|
-
${
|
|
20537
|
+
${pad2}</span>`;
|
|
19811
20538
|
}
|
|
19812
20539
|
return children;
|
|
19813
20540
|
}
|
|
19814
20541
|
const open = contentTemplateTag(host);
|
|
19815
20542
|
if (!open) return "";
|
|
19816
|
-
return children ? `${
|
|
20543
|
+
return children ? `${pad2}${open}
|
|
19817
20544
|
${children}
|
|
19818
|
-
${
|
|
20545
|
+
${pad2}</ng-template>` : `${pad2}${open}</ng-template>`;
|
|
19819
20546
|
}
|
|
19820
20547
|
var SLOT_ATTR = {
|
|
19821
20548
|
["stat_value" /* STAT_VALUE */]: "value",
|
|
@@ -19823,7 +20550,7 @@ var SLOT_ATTR = {
|
|
|
19823
20550
|
["section_header_label" /* SECTION_HEADER_LABEL */]: "label"
|
|
19824
20551
|
};
|
|
19825
20552
|
function renderSlot(node, indent2, names, methods, operationOf, storeProp, ctx, wires, payloads) {
|
|
19826
|
-
const
|
|
20553
|
+
const pad2 = " ".repeat(indent2);
|
|
19827
20554
|
const attr = SLOT_ATTR[node.type];
|
|
19828
20555
|
const directives = directiveAttrs(
|
|
19829
20556
|
node,
|
|
@@ -19845,9 +20572,9 @@ function renderSlot(node, indent2, names, methods, operationOf, storeProp, ctx,
|
|
|
19845
20572
|
)
|
|
19846
20573
|
).filter(Boolean).join("\n");
|
|
19847
20574
|
if (!children) return "";
|
|
19848
|
-
return `${
|
|
20575
|
+
return `${pad2}<span ${attr}${directives}>
|
|
19849
20576
|
${children}
|
|
19850
|
-
${
|
|
20577
|
+
${pad2}</span>`;
|
|
19851
20578
|
}
|
|
19852
20579
|
function renderNode(node, indent2, names, methods, operationOf, storeProp, ctx, wires, payloads) {
|
|
19853
20580
|
if (node.type === "variant_branch" /* VARIANT_BRANCH */) {
|
|
@@ -19934,6 +20661,9 @@ var attrBindingSlots = (type) => {
|
|
|
19934
20661
|
if (type === "remote" /* REMOTE */) return REMOTE_VALUE_SLOTS;
|
|
19935
20662
|
if (type === "app_logo" /* APP_LOGO */) return APP_LOGO_VALUE_SLOTS;
|
|
19936
20663
|
if (type === "section_pagination" /* SECTION_PAGINATION */) return [BINDING_SLOT.total];
|
|
20664
|
+
if (type === "heat_swatch" /* HEAT_SWATCH */) return [BINDING_SLOT.value];
|
|
20665
|
+
if (type === "section_chart_series" /* SECTION_CHART_SERIES */)
|
|
20666
|
+
return [BINDING_SLOT.data, BINDING_SLOT.label];
|
|
19937
20667
|
return hasTextSource(type) ? [BINDING_SLOT.label] : [];
|
|
19938
20668
|
};
|
|
19939
20669
|
var OPTION_ROW_MISS_TEXT = {
|
|
@@ -19953,7 +20683,7 @@ var optionsGapReason = (binding, ctx, storeProp) => {
|
|
|
19953
20683
|
);
|
|
19954
20684
|
return miss ? OPTION_ROW_MISS_TEXT[miss] ?? "cannot emit here" : void 0;
|
|
19955
20685
|
};
|
|
19956
|
-
function bindingGapComments(node, ctx, storeProp,
|
|
20686
|
+
function bindingGapComments(node, ctx, storeProp, pad2) {
|
|
19957
20687
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
19958
20688
|
if (!bindings) return "";
|
|
19959
20689
|
const slots = attrBindingSlots(node.type);
|
|
@@ -19963,7 +20693,7 @@ function bindingGapComments(node, ctx, storeProp, pad) {
|
|
|
19963
20693
|
const binding = bindings[slot];
|
|
19964
20694
|
if (!binding) return "";
|
|
19965
20695
|
const reason = slot === BINDING_SLOT.options && node.type !== "context_menu" /* CONTEXT_MENU */ ? optionsGapReason(binding, ctx, storeProp) : bindingGapReason(binding, scope);
|
|
19966
|
-
return reason ? `${
|
|
20696
|
+
return reason ? `${pad2}<!-- ${slot} ${node.id}: ${reason}; not emitted -->
|
|
19967
20697
|
` : "";
|
|
19968
20698
|
}).join("");
|
|
19969
20699
|
}
|
|
@@ -20110,6 +20840,13 @@ var paginationTotalRead = (node, ctx, storeProp) => {
|
|
|
20110
20840
|
);
|
|
20111
20841
|
};
|
|
20112
20842
|
var formModelNameFor = (formId, ctx) => Object.values(ctx.formModels ?? {}).find((model) => model.formId === formId)?.name;
|
|
20843
|
+
function colorAttr(node, piped) {
|
|
20844
|
+
if (!colorPipeOf(node.formatPipes ?? [])) return "";
|
|
20845
|
+
const authored = node.configs?.["color"];
|
|
20846
|
+
const fallback = typeof authored === "string" && authored.trim() ? authored.trim() : "";
|
|
20847
|
+
if (!piped) return fallback ? ` color="${fallback}"` : "";
|
|
20848
|
+
return fallback ? ` [color]="(${piped}) ?? ${literalSource2(fallback)}"` : ` [color]="${piped}"`;
|
|
20849
|
+
}
|
|
20113
20850
|
function boundAttrs(node, ctx, storeProp) {
|
|
20114
20851
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
20115
20852
|
const chain = node.formatPipes ?? [];
|
|
@@ -20120,20 +20857,29 @@ function boundAttrs(node, ctx, storeProp) {
|
|
|
20120
20857
|
const parts = [];
|
|
20121
20858
|
if (hasTextSource(node.type) && bindings?.[BINDING_SLOT.label]) {
|
|
20122
20859
|
const binding = bindings[BINDING_SLOT.label];
|
|
20123
|
-
const
|
|
20124
|
-
const
|
|
20860
|
+
const headType = boundDataType(binding, ctx);
|
|
20861
|
+
const emission = labelEmission(chain, headType);
|
|
20862
|
+
const translated = labelReadIsTranslated(binding, labelChainOf(chain));
|
|
20125
20863
|
const expr = emission === "piped" ? bindingExpression(binding, scope) : emission === "raw" ? textBindingExpression(binding, scope, translated) : void 0;
|
|
20126
20864
|
const piped = expr && emission === "piped" ? withBindingFallback(formatPipeExpression(chain, expr, scope), binding) : expr;
|
|
20127
20865
|
if (piped) {
|
|
20128
|
-
parts.push(
|
|
20866
|
+
parts.push(
|
|
20867
|
+
` [label]="${piped}"${translated ? "" : ' [noTranslate]="true"'}`
|
|
20868
|
+
);
|
|
20129
20869
|
}
|
|
20870
|
+
const color = colorPipeOf(chain);
|
|
20871
|
+
const colorInput = formatPipeEntry(color?.name)?.inputType;
|
|
20872
|
+
const raw = !headType || !colorInput || headType.type === colorInput.type ? bindingExpression(binding, scope) : void 0;
|
|
20873
|
+
parts.push(colorAttr(node, raw && colorPipeExpression(chain, raw, scope)));
|
|
20130
20874
|
} else if (hasTextSource(node.type) && chain.length) {
|
|
20131
20875
|
const source = staticLabelSource(chain, node.configs?.[BINDING_SLOT.label]);
|
|
20132
20876
|
if (source) {
|
|
20133
20877
|
parts.push(
|
|
20134
|
-
` [label]="${formatPipeExpression(chain, source, scope)}" noTranslate`
|
|
20878
|
+
` [label]="${formatPipeExpression(chain, source, scope)}" [noTranslate]="true"`
|
|
20135
20879
|
);
|
|
20136
20880
|
}
|
|
20881
|
+
const head = staticHeadSource(chain, node.configs?.[BINDING_SLOT.label]);
|
|
20882
|
+
parts.push(colorAttr(node, head && colorPipeExpression(chain, head, scope)));
|
|
20137
20883
|
}
|
|
20138
20884
|
if (node.type === "form" /* FORM */) {
|
|
20139
20885
|
const model = formModelNameFor(node.id, ctx);
|
|
@@ -20146,6 +20892,14 @@ function boundAttrs(node, ctx, storeProp) {
|
|
|
20146
20892
|
}
|
|
20147
20893
|
const total = paginationTotalRead(node, ctx, storeProp);
|
|
20148
20894
|
if (total) parts.push(` [total]="${total.read}"`);
|
|
20895
|
+
if (node.type === "heat_swatch" /* HEAT_SWATCH */ && bindings?.[BINDING_SLOT.value]) {
|
|
20896
|
+
const expr = bindingExpression(bindings[BINDING_SLOT.value], scope);
|
|
20897
|
+
if (expr) parts.push(` [value]="${expr}"`);
|
|
20898
|
+
}
|
|
20899
|
+
if (node.type === "section_chart_series" /* SECTION_CHART_SERIES */ && bindings?.[BINDING_SLOT.data]) {
|
|
20900
|
+
const expr = bindingExpression(bindings[BINDING_SLOT.data], scope);
|
|
20901
|
+
if (expr) parts.push(` [data]="${expr}"`);
|
|
20902
|
+
}
|
|
20149
20903
|
if (node.type === "section_filter" /* SECTION_FILTER */ && bindings?.[BINDING_SLOT.options]) {
|
|
20150
20904
|
const expr = optionBindingExpression(
|
|
20151
20905
|
bindings[BINDING_SLOT.options],
|
|
@@ -20308,6 +21062,11 @@ function tagAttrs(node, ctx, storeProp) {
|
|
|
20308
21062
|
delete configs2["link"];
|
|
20309
21063
|
return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
|
|
20310
21064
|
}
|
|
21065
|
+
if (node.type === "heat_swatch" /* HEAT_SWATCH */ && ctx.controlMap?.[node.id]?.bindings?.[BINDING_SLOT.value]) {
|
|
21066
|
+
const configs2 = { ...node.configs ?? {} };
|
|
21067
|
+
delete configs2[BINDING_SLOT.value];
|
|
21068
|
+
return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
|
|
21069
|
+
}
|
|
20311
21070
|
if (node.type === "section_filter" /* SECTION_FILTER */) {
|
|
20312
21071
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
20313
21072
|
const configs2 = { ...node.configs ?? {} };
|
|
@@ -20796,7 +21555,7 @@ function payloadAttr(node, payloads) {
|
|
|
20796
21555
|
return prop && !prop.modeled ? ` [data]="${prop.name}!"` : "";
|
|
20797
21556
|
}
|
|
20798
21557
|
function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, wires, payloads) {
|
|
20799
|
-
const
|
|
21558
|
+
const pad2 = " ".repeat(indent2);
|
|
20800
21559
|
if (node.type === "screen" /* SCREEN */) {
|
|
20801
21560
|
const guardScope = bindingScope(ctx, storeProp);
|
|
20802
21561
|
const guards = screenControlInputGuards(
|
|
@@ -20818,11 +21577,11 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
|
|
|
20818
21577
|
const inputAliases = new Map(
|
|
20819
21578
|
guards.map((guard) => [guard.expression, guard.alias])
|
|
20820
21579
|
);
|
|
20821
|
-
const
|
|
21580
|
+
const pad3 = " ".repeat(indent2 + guards.length);
|
|
20822
21581
|
const ref = embeddedRefOf(node, ctx);
|
|
20823
21582
|
if (!ref) {
|
|
20824
21583
|
const name3 = node.handRef ?? node.screenId ?? "an embedded Screen";
|
|
20825
|
-
return `${
|
|
21584
|
+
return `${pad3}<!-- ${name3}: referenced Screen has gone; not emitted -->`;
|
|
20826
21585
|
}
|
|
20827
21586
|
const bound = screenControlAttrs(
|
|
20828
21587
|
node,
|
|
@@ -20885,7 +21644,7 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
|
|
|
20885
21644
|
(binding) => bindingExpression(binding, scope),
|
|
20886
21645
|
(binding) => bindingGapReason(binding, scope) ?? "cannot emit here"
|
|
20887
21646
|
);
|
|
20888
|
-
return `${
|
|
21647
|
+
return `${pad3}<!-- ${name3}: ${reason ?? "required input is unbound"}; not emitted -->`;
|
|
20889
21648
|
}
|
|
20890
21649
|
const maxWidth = toCssLength(node.maxWidth);
|
|
20891
21650
|
const style = maxWidth ? ` style="max-width: ${maxWidth}"` : "";
|
|
@@ -20893,7 +21652,7 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
|
|
|
20893
21652
|
const spacing = STYLE_DIRECTIVE_NAMES.map(
|
|
20894
21653
|
(name3) => styleDirectiveAttrs(name3, filterConfigs(node.directives?.[name3]?.configs))
|
|
20895
21654
|
).join("");
|
|
20896
|
-
const tag2 = `${
|
|
21655
|
+
const tag2 = `${pad3}<${ref.tag}${bound}${style}${spacing} />`;
|
|
20897
21656
|
return guards.reduceRight(
|
|
20898
21657
|
(markup, guard, index) => `${" ".repeat(indent2 + index)}@if (${guard.expression}; as ${guard.alias}) {
|
|
20899
21658
|
${markup}
|
|
@@ -20908,7 +21667,7 @@ ${" ".repeat(indent2 + index)}}`,
|
|
|
20908
21667
|
if (node.type === "plugin" /* PLUGIN */) {
|
|
20909
21668
|
return renderPluginTag(
|
|
20910
21669
|
node,
|
|
20911
|
-
|
|
21670
|
+
pad2,
|
|
20912
21671
|
tag,
|
|
20913
21672
|
methods,
|
|
20914
21673
|
operationOf,
|
|
@@ -20923,22 +21682,22 @@ ${" ".repeat(indent2 + index)}}`,
|
|
|
20923
21682
|
ctx.controlMap?.[node.id]?.bindings
|
|
20924
21683
|
)}${outputAttrs(node, methods, operationOf, storeProp, ctx)}`;
|
|
20925
21684
|
if (node.type === "section_action" /* SECTION_ACTION */) {
|
|
20926
|
-
return `${
|
|
21685
|
+
return `${pad2}<${tag}${attrs}${actionButtonsAttr(node, ctx.actionButtonNames)} />`;
|
|
20927
21686
|
}
|
|
20928
21687
|
const totalGuard = paginationTotalRead(node, ctx, storeProp)?.guard;
|
|
20929
21688
|
if (totalGuard) {
|
|
20930
|
-
return `${
|
|
20931
|
-
${
|
|
20932
|
-
${
|
|
21689
|
+
return `${pad2}@if (${totalGuard}; as ${PAGINATION_TOTAL_ALIAS}) {
|
|
21690
|
+
${pad2} <${tag}${attrs} />
|
|
21691
|
+
${pad2}}`;
|
|
20933
21692
|
}
|
|
20934
21693
|
const element = tag.split(" ")[0];
|
|
20935
|
-
const close = (inner) => element === tag ? `${
|
|
21694
|
+
const close = (inner) => element === tag ? `${pad2}<${tag}${attrs}>
|
|
20936
21695
|
${inner}
|
|
20937
|
-
${
|
|
21696
|
+
${pad2}</${tag}>` : inner ? `${pad2}<${tag}${attrs}>
|
|
20938
21697
|
${inner}
|
|
20939
|
-
${
|
|
21698
|
+
${pad2}</${element}>` : `${pad2}<${tag}${attrs}></${element}>`;
|
|
20940
21699
|
if (!node.childrens.length) {
|
|
20941
|
-
return element === tag ? `${
|
|
21700
|
+
return element === tag ? `${pad2}<${tag}${attrs} />` : close("");
|
|
20942
21701
|
}
|
|
20943
21702
|
const children = node.childrens.map(
|
|
20944
21703
|
(child) => renderNode(
|
|
@@ -20954,23 +21713,20 @@ ${pad}</${element}>` : `${pad}<${tag}${attrs}></${element}>`;
|
|
|
20954
21713
|
)
|
|
20955
21714
|
).filter(Boolean).join("\n");
|
|
20956
21715
|
if (!children)
|
|
20957
|
-
return element === tag ? `${
|
|
21716
|
+
return element === tag ? `${pad2}<${tag}${attrs} />` : close("");
|
|
20958
21717
|
return close(children);
|
|
20959
21718
|
}
|
|
20960
|
-
var pluginFacts = (tree
|
|
21719
|
+
var pluginFacts = (tree) => {
|
|
20961
21720
|
const facts = [];
|
|
20962
21721
|
const walk = (nodes) => nodes.forEach((node) => {
|
|
20963
21722
|
if (node.type === "plugin" /* PLUGIN */) {
|
|
20964
21723
|
const link = String(node.configs?.[PLUGIN_LINK_KEY] ?? "").trim();
|
|
20965
21724
|
const screen = String(node.configs?.[PLUGIN_SCREEN_KEY] ?? "").trim();
|
|
20966
|
-
const bindings = ctx.controlMap?.[node.id]?.bindings ?? {};
|
|
20967
21725
|
if (link && screen) {
|
|
20968
21726
|
facts.push({
|
|
20969
21727
|
link,
|
|
20970
21728
|
screen,
|
|
20971
|
-
inputs: pluginNamesOf(node.configs, PLUGIN_INPUTS_KEY)
|
|
20972
|
-
(name3) => !!bindings[pluginInputSlot(name3)]
|
|
20973
|
-
),
|
|
21729
|
+
inputs: pluginNamesOf(node.configs, PLUGIN_INPUTS_KEY),
|
|
20974
21730
|
outputs: pluginNamesOf(node.configs, PLUGIN_OUTPUTS_KEY)
|
|
20975
21731
|
});
|
|
20976
21732
|
}
|
|
@@ -20981,23 +21737,21 @@ var pluginFacts = (tree, ctx) => {
|
|
|
20981
21737
|
return facts;
|
|
20982
21738
|
};
|
|
20983
21739
|
var OUTPUT_ATTR = / \(([^)]+)\)="([^"]*)"/g;
|
|
20984
|
-
function renderPluginTag(node,
|
|
21740
|
+
function renderPluginTag(node, pad2, tag, methods, operationOf, storeProp, ctx) {
|
|
20985
21741
|
const attrs = `${tagAttrs(node, ctx, storeProp)}${directiveAttrs(
|
|
20986
21742
|
node,
|
|
20987
21743
|
ctx.overlayNames,
|
|
20988
21744
|
bindingScope(ctx, storeProp),
|
|
20989
21745
|
ctx.controlMap?.[node.id]?.bindings
|
|
20990
21746
|
)}`;
|
|
20991
|
-
const inner = `${
|
|
21747
|
+
const inner = `${pad2} `;
|
|
20992
21748
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
20993
21749
|
const scope = bindingScope(ctx, storeProp);
|
|
20994
|
-
const inputs = pluginNamesOf(node.configs, PLUGIN_INPUTS_KEY).
|
|
20995
|
-
(name3)
|
|
20996
|
-
|
|
20997
|
-
|
|
20998
|
-
|
|
20999
|
-
}
|
|
21000
|
-
);
|
|
21750
|
+
const inputs = pluginNamesOf(node.configs, PLUGIN_INPUTS_KEY).map((name3) => {
|
|
21751
|
+
const binding = bindings?.[pluginInputSlot(name3)];
|
|
21752
|
+
const expr = binding ? bindingExpression(binding, scope) : void 0;
|
|
21753
|
+
return expr ? `${inner}<m-plugin-input name="${name3}" [value]="${expr}" />` : `${inner}<m-plugin-input name="${name3}" />`;
|
|
21754
|
+
});
|
|
21001
21755
|
const outputs = [
|
|
21002
21756
|
...outputAttrs(node, methods, operationOf, storeProp, ctx).matchAll(
|
|
21003
21757
|
OUTPUT_ATTR
|
|
@@ -21008,9 +21762,9 @@ function renderPluginTag(node, pad, tag, methods, operationOf, storeProp, ctx) {
|
|
|
21008
21762
|
if (inputs.length) ctx.writtenTags.add("m-plugin-input");
|
|
21009
21763
|
if (outputs.length) ctx.writtenTags.add("m-plugin-output");
|
|
21010
21764
|
const children = [...inputs, ...outputs];
|
|
21011
|
-
return children.length ? `${
|
|
21765
|
+
return children.length ? `${pad2}<${tag}${attrs}>
|
|
21012
21766
|
${children.join("\n")}
|
|
21013
|
-
${
|
|
21767
|
+
${pad2}</${tag}>` : `${pad2}<${tag}${attrs} />`;
|
|
21014
21768
|
}
|
|
21015
21769
|
function planScreenEmit(tree, variants = {}, featureName = "feature", ctx = {}) {
|
|
21016
21770
|
const writtenTags = /* @__PURE__ */ new Set();
|
|
@@ -21327,7 +22081,7 @@ var formModelDeclsBlock = (models, scope) => {
|
|
|
21327
22081
|
for (const [index, id] of member.entries()) {
|
|
21328
22082
|
const key2 = current?.keys.find((entry2) => entry2.id === id);
|
|
21329
22083
|
if (!key2) return void 0;
|
|
21330
|
-
read = `${read}
|
|
22084
|
+
read = `${read}${memberAccess(current, key2, true)}`;
|
|
21331
22085
|
if (index === member.length - 1) break;
|
|
21332
22086
|
current = key2.dataType.type === "shape" ? scope.shapes[key2.dataType.shapeId] : void 0;
|
|
21333
22087
|
}
|
|
@@ -22470,7 +23224,10 @@ function armCheckExpr(check, node, ctx, storeProp, payload, eventRoot) {
|
|
|
22470
23224
|
shapes: ctx.shapes ?? {},
|
|
22471
23225
|
constants: ctx.constants ?? {},
|
|
22472
23226
|
scope: "class",
|
|
22473
|
-
storeReceiver: () => storeProp ? `this.${storeProp}` : "store"
|
|
23227
|
+
storeReceiver: () => storeProp ? `this.${storeProp}` : "store",
|
|
23228
|
+
// A binding read may be an optional input, `undefined` until set, and
|
|
23229
|
+
// every comparison below coerces what a `?.` lets through.
|
|
23230
|
+
optionalPipe: true
|
|
22474
23231
|
}) : subject;
|
|
22475
23232
|
const piped = needsParens(read) ? `(${read})` : read;
|
|
22476
23233
|
const raw = (check.value ?? "").trim();
|
|
@@ -22502,10 +23259,22 @@ function emittableArms(node, output, ctx, storeProp) {
|
|
|
22502
23259
|
if (!offersOutputArms(control)) return [];
|
|
22503
23260
|
const payload = payloadShape(output, node.type, node.configs);
|
|
22504
23261
|
const eventRoot = payloadEventRoot(output, node.type, node.configs);
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
23262
|
+
const emitted = [];
|
|
23263
|
+
let pendingBreak = false;
|
|
23264
|
+
for (const arm of scannedOutputArms(control, output)) {
|
|
23265
|
+
const expr = isOutputArmComplete(arm) ? armExpr(arm, node, ctx, storeProp, payload, eventRoot) : "";
|
|
23266
|
+
if (!expr) {
|
|
23267
|
+
pendingBreak ||= !!arm.startsChain;
|
|
23268
|
+
continue;
|
|
23269
|
+
}
|
|
23270
|
+
emitted.push({
|
|
23271
|
+
arm,
|
|
23272
|
+
expr,
|
|
23273
|
+
opensChain: !emitted.length || pendingBreak || !!arm.startsChain
|
|
23274
|
+
});
|
|
23275
|
+
pendingBreak = false;
|
|
23276
|
+
}
|
|
23277
|
+
return emitted;
|
|
22509
23278
|
}
|
|
22510
23279
|
function emittingArms(node, output, ctx, storeProp) {
|
|
22511
23280
|
const control = node;
|
|
@@ -22638,12 +23407,16 @@ ${format(
|
|
|
22638
23407
|
);
|
|
22639
23408
|
const direct = format(groupOf(output), " ");
|
|
22640
23409
|
const always = alwaysOutputArms(control, output).map((arm) => bodyOf(arm, " ")).filter(Boolean);
|
|
22641
|
-
const
|
|
23410
|
+
const chains = [];
|
|
23411
|
+
wired.forEach(({ arm, expr, opensChain }) => {
|
|
22642
23412
|
const body2 = bodyOf(arm, " ");
|
|
22643
|
-
|
|
23413
|
+
const block2 = `if (${expr}) {
|
|
22644
23414
|
${body2 ? `${body2}
|
|
22645
23415
|
` : ""} }`;
|
|
23416
|
+
if (opensChain) chains.push([block2]);
|
|
23417
|
+
else chains[chains.length - 1].push(block2);
|
|
22646
23418
|
});
|
|
23419
|
+
const chain = chains[chains.length - 1] ?? [];
|
|
22647
23420
|
const fallback = defaultOutputArm(control, output);
|
|
22648
23421
|
if (fallback) {
|
|
22649
23422
|
const body2 = bodyOf(fallback, chain.length ? " " : " ");
|
|
@@ -22676,7 +23449,7 @@ ${body2 ? `${body2}
|
|
|
22676
23449
|
...pressed,
|
|
22677
23450
|
direct,
|
|
22678
23451
|
...always,
|
|
22679
|
-
...
|
|
23452
|
+
...chains.map((blocks) => blocks.join(" else "))
|
|
22680
23453
|
].filter(Boolean).join("\n");
|
|
22681
23454
|
emitted.push(`
|
|
22682
23455
|
protected readonly ${outputArmHandlerName(
|
|
@@ -23105,11 +23878,14 @@ function collectComponentImportEntries(tree, ctx = {}) {
|
|
|
23105
23878
|
);
|
|
23106
23879
|
if (bindingsNeedTranslate(
|
|
23107
23880
|
ctx.controlMap?.[node.id]?.bindings,
|
|
23108
|
-
node.formatPipes ?? []
|
|
23881
|
+
labelChainOf(node.formatPipes ?? [])
|
|
23109
23882
|
)) {
|
|
23110
23883
|
entries.push({ component: "TranslatePipe", from: ONE_IMPORT_MODULE });
|
|
23111
23884
|
}
|
|
23112
23885
|
if (node.type === "section_action" /* SECTION_ACTION */) return;
|
|
23886
|
+
if (node.type === "repeat" /* REPEAT */ && ctx.controlMap?.[node.id] && isKeyedRepeat(ctx.controlMap[node.id], bindingScope(ctx, ""))) {
|
|
23887
|
+
entries.push({ component: "KeyValuePipe", from: "@angular/common" });
|
|
23888
|
+
}
|
|
23113
23889
|
if (node.type === "section_table" /* SECTION_TABLE */ && ctx.controlMap && tableHasRepeat(node.id, ctx.controlMap)) {
|
|
23114
23890
|
entries.push({
|
|
23115
23891
|
component: "SectionTableSortPipe",
|
|
@@ -23298,7 +24074,9 @@ function generateFeatureStore(featureName, properties, variants = {}, shapes = {
|
|
|
23298
24074
|
true,
|
|
23299
24075
|
// A Rule sits on the FeatureStore and may read a SubStore's property,
|
|
23300
24076
|
// which is what makes the main store hold that SubStore (ADR 0093).
|
|
23301
|
-
readsAcross ? rootReceiver : ""
|
|
24077
|
+
readsAcross ? rootReceiver : "",
|
|
24078
|
+
"",
|
|
24079
|
+
functions
|
|
23302
24080
|
);
|
|
23303
24081
|
return { name: variant.name, expr, local: mintVariantLocal(variant.name) };
|
|
23304
24082
|
});
|
|
@@ -23441,7 +24219,14 @@ ${lines.join("\n")}
|
|
|
23441
24219
|
const storageImport = oneImports.length ? `import { ${oneImports.join(", ")} } from '@magmonium/one';
|
|
23442
24220
|
` : "";
|
|
23443
24221
|
const functionImports = Array.from(
|
|
23444
|
-
Object.values(computeds).map((computed) => functions[computed.functionId]).concat((drawn.functionIds ?? []).map((id) => functions[id])).concat(hooks.feedFunctionId ? [functions[hooks.feedFunctionId]] : []).
|
|
24222
|
+
Object.values(computeds).map((computed) => functions[computed.functionId]).concat((drawn.functionIds ?? []).map((id) => functions[id])).concat(hooks.feedFunctionId ? [functions[hooks.feedFunctionId]] : []).concat(
|
|
24223
|
+
ruleFunctionImports(
|
|
24224
|
+
variantList.map((variant) => variant.rule),
|
|
24225
|
+
rootProperties,
|
|
24226
|
+
shapes,
|
|
24227
|
+
functions
|
|
24228
|
+
)
|
|
24229
|
+
).concat(hooks.ruleFunctions).filter((fn) => !!fn).reduce(
|
|
23445
24230
|
(byName, fn) => byName.has(fn.name) ? byName : byName.set(fn.name, fn),
|
|
23446
24231
|
/* @__PURE__ */ new Map()
|
|
23447
24232
|
).values()
|
|
@@ -24062,7 +24847,7 @@ ${tables.map(
|
|
|
24062
24847
|
needsStore ? featureStoreProp(featureName) : "",
|
|
24063
24848
|
menuVariants
|
|
24064
24849
|
);
|
|
24065
|
-
const screenVariantsBody = screenVariantsBlock(
|
|
24850
|
+
const { body: screenVariantsBody, functions: variantFunctions } = screenVariantsBlock(
|
|
24066
24851
|
screenVariants,
|
|
24067
24852
|
ctx.inputs ?? {},
|
|
24068
24853
|
screenComputeds,
|
|
@@ -24145,6 +24930,7 @@ ${tables.map(
|
|
|
24145
24930
|
const fn = (ctx.functions ?? {})[id];
|
|
24146
24931
|
if (fn) screenFunctions.set(fn.name, fn);
|
|
24147
24932
|
}
|
|
24933
|
+
for (const fn of variantFunctions) screenFunctions.set(fn.name, fn);
|
|
24148
24934
|
for (const handler of Object.values(ctx.screenMethods ?? {})) {
|
|
24149
24935
|
for (const one of screenMethodCalls(handler)) {
|
|
24150
24936
|
const fn = (ctx.functions ?? {})[one.functionId ?? ""];
|
|
@@ -24537,7 +25323,7 @@ function generateCode(tree, featureName, screenName, properties = {}, variants =
|
|
|
24537
25323
|
featureStoreProp(featureName),
|
|
24538
25324
|
codegenCtx
|
|
24539
25325
|
),
|
|
24540
|
-
plugins: pluginFacts(tree
|
|
25326
|
+
plugins: pluginFacts(tree),
|
|
24541
25327
|
variables: Object.values(codegenCtx.variables ?? {}).map((variable) => ({
|
|
24542
25328
|
name: variable.name,
|
|
24543
25329
|
dataType: { type: variable.dataType },
|
|
@@ -24680,7 +25466,7 @@ __export(package_exports, {
|
|
|
24680
25466
|
version: () => version
|
|
24681
25467
|
});
|
|
24682
25468
|
var name = "@magmonium/one";
|
|
24683
|
-
var version = "0.4.
|
|
25469
|
+
var version = "0.4.68";
|
|
24684
25470
|
var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
|
|
24685
25471
|
var author = "magmonium";
|
|
24686
25472
|
var license = "MIT";
|
|
@@ -24748,7 +25534,7 @@ __export(package_exports2, {
|
|
|
24748
25534
|
version: () => version2
|
|
24749
25535
|
});
|
|
24750
25536
|
var name2 = "@magmonium/cli";
|
|
24751
|
-
var version2 = "0.8.
|
|
25537
|
+
var version2 = "0.8.20";
|
|
24752
25538
|
var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
|
|
24753
25539
|
var bin = {
|
|
24754
25540
|
"mag-cli": "bin/cli.js"
|
|
@@ -24882,7 +25668,6 @@ function isDescendant(ancestorId, candidateId, controlMap) {
|
|
|
24882
25668
|
}
|
|
24883
25669
|
return false;
|
|
24884
25670
|
}
|
|
24885
|
-
var layerLabel = (layer) => layer === 0 ? "root-layer" : `Layer ${layer}`;
|
|
24886
25671
|
function getAvailableLayers(controlMap, selection) {
|
|
24887
25672
|
const layers = /* @__PURE__ */ new Set();
|
|
24888
25673
|
layers.add(0);
|
|
@@ -26762,7 +27547,8 @@ function sanitizeShapes(shapes, reachable = {}, owner = "feature") {
|
|
|
26762
27547
|
id,
|
|
26763
27548
|
name: shape.name,
|
|
26764
27549
|
keys: [],
|
|
26765
|
-
...origin ? { origin } : {}
|
|
27550
|
+
...origin ? { origin } : {},
|
|
27551
|
+
...shape.positional === true ? { positional: true } : {}
|
|
26766
27552
|
};
|
|
26767
27553
|
}
|
|
26768
27554
|
for (const [id, value] of Object.entries(shapes)) {
|
|
@@ -26879,6 +27665,24 @@ function sanitizeRuleNode(value, depth = 0) {
|
|
|
26879
27665
|
navId: typeof node["navId"] === "string" ? node["navId"] : ""
|
|
26880
27666
|
};
|
|
26881
27667
|
}
|
|
27668
|
+
if (kind === "function") {
|
|
27669
|
+
const rawArgs = node["args"];
|
|
27670
|
+
const args = {};
|
|
27671
|
+
if (rawArgs && typeof rawArgs === "object" && !Array.isArray(rawArgs)) {
|
|
27672
|
+
for (const [paramId, path] of Object.entries(
|
|
27673
|
+
rawArgs
|
|
27674
|
+
)) {
|
|
27675
|
+
const clean = sanitizePath(path);
|
|
27676
|
+
if (clean.length) args[paramId] = clean;
|
|
27677
|
+
}
|
|
27678
|
+
}
|
|
27679
|
+
return {
|
|
27680
|
+
id,
|
|
27681
|
+
kind: "function",
|
|
27682
|
+
functionId: typeof node["functionId"] === "string" ? node["functionId"] : "",
|
|
27683
|
+
args
|
|
27684
|
+
};
|
|
27685
|
+
}
|
|
26882
27686
|
if (kind !== "check" && kind !== "test") return void 0;
|
|
26883
27687
|
const operator = node["operator"];
|
|
26884
27688
|
const quantifier = node["quantifier"];
|
|
@@ -27375,7 +28179,6 @@ function sanitizePureFunctions(value, shapes) {
|
|
|
27375
28179
|
cardinality: sanitizeCardinality(param),
|
|
27376
28180
|
...param.acceptsUndefined === true ? { acceptsUndefined: true } : {}
|
|
27377
28181
|
})) : [];
|
|
27378
|
-
if (!params.length) continue;
|
|
27379
28182
|
const body = typeof fn.body === "string" ? fn.body : "";
|
|
27380
28183
|
const imports = sanitizeFunctionImports(fn.imports);
|
|
27381
28184
|
const description3 = typeof fn.description === "string" ? fn.description.trim() : "";
|
|
@@ -28498,7 +29301,8 @@ function buildDesignSource(ws, operations = drawnOperations(ws)) {
|
|
|
28498
29301
|
// be rederived from there — `package.json` cannot say which of its
|
|
28499
29302
|
// dependencies a User approved (ADR 0083).
|
|
28500
29303
|
npmAllowlist: ws.npmAllowlist,
|
|
28501
|
-
codegen: CLI_PACKAGE_VERSION
|
|
29304
|
+
codegen: CLI_PACKAGE_VERSION,
|
|
29305
|
+
one: ONE_PACKAGE_VERSION
|
|
28502
29306
|
};
|
|
28503
29307
|
const files3 = {
|
|
28504
29308
|
[DESIGN_INDEX_PATH]: json(index),
|
|
@@ -29043,7 +29847,7 @@ var navInstanceSourceBindings = (navMap, features, methodArgNamesOf = () => [])
|
|
|
29043
29847
|
];
|
|
29044
29848
|
});
|
|
29045
29849
|
};
|
|
29046
|
-
var navKeyLiteral =
|
|
29850
|
+
var navKeyLiteral = propertyKey;
|
|
29047
29851
|
var AUTH_STORE_PARAM = "authStore";
|
|
29048
29852
|
var AUTH_STORE_CLASS = "AuthStore";
|
|
29049
29853
|
var visibilityLoadArgs = (nav, navMap, methodArgs2, argNames) => argNames.map((name3) => {
|
|
@@ -29521,8 +30325,6 @@ var packageJson = (appName, version3, extraDeps = {}) => JSON.stringify(
|
|
|
29521
30325
|
start: "ng serve",
|
|
29522
30326
|
prebuild: "npm run gen:code && npm run assets:compile",
|
|
29523
30327
|
build: "ng build",
|
|
29524
|
-
"prebuild:dev": "npm run gen:code && npm run assets:compile",
|
|
29525
|
-
"build:dev": "ng build --configuration dev",
|
|
29526
30328
|
"prebuild:wc": "npm run gen:code",
|
|
29527
30329
|
// What CI runs, and what produces the bundle the Store deploys. Not
|
|
29528
30330
|
// `ng build` — the WC bundle is ngc + esbuild through the CLI, and
|
|
@@ -29617,7 +30419,11 @@ var packageJson = (appName, version3, extraDeps = {}) => JSON.stringify(
|
|
|
29617
30419
|
// same exact version. `$webpack` is not enough: npm still nests the
|
|
29618
30420
|
// exact pin from build-angular next to a newer root resolution.
|
|
29619
30421
|
overrides: {
|
|
29620
|
-
webpack: "5.110.3"
|
|
30422
|
+
webpack: "5.110.3",
|
|
30423
|
+
// The latest 22.2 patch changed deep Webpack imports to paths that
|
|
30424
|
+
// do not exist before webpack 5.112. Keep the builder aligned with
|
|
30425
|
+
// this Angular release and the Webpack 5.110 cap above.
|
|
30426
|
+
"@angular-devkit/build-angular": NG_VERSION
|
|
29621
30427
|
}
|
|
29622
30428
|
},
|
|
29623
30429
|
null,
|
|
@@ -29674,30 +30480,15 @@ var angularJson = (app) => JSON.stringify(
|
|
|
29674
30480
|
maximumError: "40kb"
|
|
29675
30481
|
}
|
|
29676
30482
|
],
|
|
29677
|
-
fileReplacements: [
|
|
29678
|
-
{
|
|
29679
|
-
replace: "src/environments/environment.ts",
|
|
29680
|
-
with: "src/environments/environment.prod.ts"
|
|
29681
|
-
}
|
|
29682
|
-
],
|
|
29683
30483
|
outputHashing: "all"
|
|
29684
30484
|
},
|
|
30485
|
+
// No file replacements: every configuration builds against the
|
|
30486
|
+
// one `environment.ts` (ADR 0194).
|
|
29685
30487
|
development: {
|
|
29686
30488
|
optimization: false,
|
|
29687
30489
|
extractLicenses: false,
|
|
29688
30490
|
sourceMap: true,
|
|
29689
30491
|
namedChunks: true
|
|
29690
|
-
},
|
|
29691
|
-
// `development` / `ng serve` / Run keep `environment.ts` (= active
|
|
29692
|
-
// preset). `dev` and `production` swap in the matching preset.
|
|
29693
|
-
dev: {
|
|
29694
|
-
fileReplacements: [
|
|
29695
|
-
{
|
|
29696
|
-
replace: "src/environments/environment.ts",
|
|
29697
|
-
with: "src/environments/environment.dev.ts"
|
|
29698
|
-
}
|
|
29699
|
-
],
|
|
29700
|
-
outputHashing: "all"
|
|
29701
30492
|
}
|
|
29702
30493
|
},
|
|
29703
30494
|
defaultConfiguration: "production"
|
|
@@ -30246,18 +31037,15 @@ export const appProviders: ApplicationConfig['providers'] = [
|
|
|
30246
31037
|
...navProvidersGenerated,
|
|
30247
31038
|
];
|
|
30248
31039
|
`;
|
|
30249
|
-
var
|
|
30250
|
-
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
|
-
};
|
|
30254
|
-
var environmentFile = (hosts, preset, production, comment) => {
|
|
30255
|
-
const authUrl = resolvedAuthUrl(hosts.authUrl, DEFAULT_AUTH_URL[preset]);
|
|
30256
|
-
const backend = resolvedBackendUrl(hosts.backendUrl);
|
|
31040
|
+
var environmentFile = ({ preset, hosts }) => {
|
|
31041
|
+
const fallback = presetHosts(preset);
|
|
31042
|
+
const authUrl = resolvedAuthUrl(hosts.authUrl, fallback.authUrl);
|
|
31043
|
+
const backend = resolvedBackendUrl(hosts.backendUrl, fallback.backendUrl);
|
|
30257
31044
|
const socketUrl = hosts.socketUrl.trim();
|
|
30258
|
-
return
|
|
31045
|
+
return `// The Environment \u2014 what Run, \`ng serve\` and every build use (ADR 0194).
|
|
31046
|
+
// Preset: ${preset}.
|
|
30259
31047
|
export const environment = {
|
|
30260
|
-
production: ${
|
|
31048
|
+
production: ${preset === "prod"},
|
|
30261
31049
|
authUrl: '${authUrl}',
|
|
30262
31050
|
url: '${backend}',
|
|
30263
31051
|
socketUrl: '${socketUrl}',
|
|
@@ -30477,13 +31265,19 @@ ${setupNode}${generateStep} - name: Build assets and web component
|
|
|
30477
31265
|
- name: Read app id and endpoint from the design source
|
|
30478
31266
|
run: |
|
|
30479
31267
|
APP_ID=$(jq -r '.appTarget.appId // empty' ${DESIGN_SOURCE_ROOT}/index.json)
|
|
30480
|
-
ENDPOINT=$(jq -r '.appTarget.environment.
|
|
31268
|
+
ENDPOINT=$(jq -r '.appTarget.environment.hosts.backendUrl // empty' ${DESIGN_SOURCE_ROOT}/index.json)
|
|
30481
31269
|
ENDPOINT="\${ENDPOINT%/}"
|
|
30482
31270
|
ENDPOINT="\${ENDPOINT%/swagger.json}"
|
|
30483
31271
|
if [ -z "$APP_ID" ] || [ -z "$ENDPOINT" ]; then
|
|
30484
|
-
echo "::error::${DESIGN_SOURCE_ROOT}/index.json names no appTarget.appId or
|
|
31272
|
+
echo "::error::${DESIGN_SOURCE_ROOT}/index.json names no appTarget.appId or Environment backendUrl. Link the app to its Store App in One UI and Push."
|
|
30485
31273
|
exit 1
|
|
30486
31274
|
fi
|
|
31275
|
+
case "$ENDPOINT" in
|
|
31276
|
+
*://localhost*|*://127.0.0.1*|*://0.0.0.0*)
|
|
31277
|
+
echo "::error::The Environment's Backend URL is $ENDPOINT, which a runner cannot reach. Pick dev or prod in One UI's Environment panel and Push."
|
|
31278
|
+
exit 1
|
|
31279
|
+
;;
|
|
31280
|
+
esac
|
|
30487
31281
|
echo "MAG_APP_ID=$APP_ID" >> "$GITHUB_ENV"
|
|
30488
31282
|
echo "MAG_ENDPOINT=$ENDPOINT" >> "$GITHUB_ENV"
|
|
30489
31283
|
- name: Upload bundle to backend
|
|
@@ -30815,30 +31609,7 @@ function scaffoldFiles(appName, config, environment, extraDeps = {}, plugins = [
|
|
|
30815
31609
|
{ path: "src/styles.sass", contents: stylesSass(selector) },
|
|
30816
31610
|
{
|
|
30817
31611
|
path: "src/environments/environment.ts",
|
|
30818
|
-
contents: environmentFile(
|
|
30819
|
-
environment.normal,
|
|
30820
|
-
"normal",
|
|
30821
|
-
false,
|
|
30822
|
-
`// Normal Environment \u2014 what \`ng serve\` / Run boots (ADR 0033).`
|
|
30823
|
-
)
|
|
30824
|
-
},
|
|
30825
|
-
{
|
|
30826
|
-
path: "src/environments/environment.dev.ts",
|
|
30827
|
-
contents: environmentFile(
|
|
30828
|
-
environment.dev,
|
|
30829
|
-
"dev",
|
|
30830
|
-
false,
|
|
30831
|
-
`// Swapped in by \`ng build --configuration dev\`.`
|
|
30832
|
-
)
|
|
30833
|
-
},
|
|
30834
|
-
{
|
|
30835
|
-
path: "src/environments/environment.prod.ts",
|
|
30836
|
-
contents: environmentFile(
|
|
30837
|
-
environment.prod,
|
|
30838
|
-
"prod",
|
|
30839
|
-
true,
|
|
30840
|
-
`// Swapped in by \`ng build --configuration production\`.`
|
|
30841
|
-
)
|
|
31612
|
+
contents: environmentFile(environment)
|
|
30842
31613
|
},
|
|
30843
31614
|
...isPlugin ? [
|
|
30844
31615
|
{ path: "src/app/wc.ts", contents: pluginWcTs(className, selector) },
|
|
@@ -30926,14 +31697,19 @@ var fakeOne = (dataType, shapes, depth) => {
|
|
|
30926
31697
|
return "null";
|
|
30927
31698
|
}
|
|
30928
31699
|
};
|
|
30929
|
-
var fakeShape = (shape, shapes, depth) =>
|
|
30930
|
-
|
|
30931
|
-
|
|
30932
|
-
member.cardinality,
|
|
30933
|
-
|
|
30934
|
-
|
|
30935
|
-
|
|
30936
|
-
|
|
31700
|
+
var fakeShape = (shape, shapes, depth) => (
|
|
31701
|
+
// A positional shape is a tuple on the wire, so its fake is too (ADR 0196).
|
|
31702
|
+
shape.positional ? `[${shape.keys.map(
|
|
31703
|
+
(member) => fakeLiteral(member.dataType, member.cardinality, shapes, depth)
|
|
31704
|
+
).join(", ")}]` : shape.keys.length ? `{ ${shape.keys.map(
|
|
31705
|
+
(member) => `${key(member.name)}: ${fakeLiteral(
|
|
31706
|
+
member.dataType,
|
|
31707
|
+
member.cardinality,
|
|
31708
|
+
shapes,
|
|
31709
|
+
depth
|
|
31710
|
+
)}`
|
|
31711
|
+
).join(", ")} }` : "{}"
|
|
31712
|
+
);
|
|
30937
31713
|
var withShapes = (shapes, extra = []) => {
|
|
30938
31714
|
const list = Array.isArray(extra) ? extra : Object.values(extra);
|
|
30939
31715
|
return list.length ? {
|
|
@@ -32501,14 +33277,17 @@ var emitShippedShellFiles = (authored) => {
|
|
|
32501
33277
|
).filter((file) => SHIPPED_SHELL_PATHS.includes(file.path)).map((file) => ({ path: file.path, contents: file.contents }));
|
|
32502
33278
|
};
|
|
32503
33279
|
var isRemoteManifestPath = (path) => /^mag_assets(_env\/[^/]+)?\/remote\/[^/]+\.yml$/.test(path);
|
|
32504
|
-
var
|
|
33280
|
+
var ENVIRONMENT_PATH = "src/environments/environment.ts";
|
|
33281
|
+
var syncedScaffoldFiles = (ws) => scaffoldFiles(
|
|
32505
33282
|
ws.appTarget.appName,
|
|
32506
33283
|
ws.wcConfig,
|
|
32507
33284
|
ws.appTarget.environment,
|
|
32508
33285
|
{},
|
|
32509
33286
|
pluginContractsOf(ws),
|
|
32510
33287
|
scaffoldShellOf(ws)
|
|
32511
|
-
).filter(
|
|
33288
|
+
).filter(
|
|
33289
|
+
(file) => isRemoteManifestPath(file.path) || file.path === ENVIRONMENT_PATH
|
|
33290
|
+
).map((file) => ({ path: file.path, contents: file.contents }));
|
|
32512
33291
|
var emitOverlayFiles = (authored, stringify) => {
|
|
32513
33292
|
const ws = inReach(authored);
|
|
32514
33293
|
const files3 = emitScreenCode(ws, stringify);
|
|
@@ -32527,7 +33306,7 @@ var emitOverlayFiles = (authored, stringify) => {
|
|
|
32527
33306
|
});
|
|
32528
33307
|
}
|
|
32529
33308
|
files3.push(...emitAuthoredAssets(ws, stringify));
|
|
32530
|
-
files3.push(...
|
|
33309
|
+
files3.push(...syncedScaffoldFiles(ws));
|
|
32531
33310
|
return withGeneratedBanner(withEmittedTests(files3, isGeneratedPath));
|
|
32532
33311
|
};
|
|
32533
33312
|
var emitGeneratedFiles = (authored, stringify, tests = false) => emitOverlayFiles(authored, stringify).filter(
|
|
@@ -32554,6 +33333,56 @@ var filesToTree = (files3) => {
|
|
|
32554
33333
|
return root;
|
|
32555
33334
|
};
|
|
32556
33335
|
|
|
33336
|
+
// libs/codegen/src/lib/function-starter.ts
|
|
33337
|
+
var STARTER_GROUP = "date-time";
|
|
33338
|
+
var FUNCTION_LIBRARY_GROUPS = [
|
|
33339
|
+
STARTER_GROUP,
|
|
33340
|
+
...JS_NATIVE_GROUPS
|
|
33341
|
+
];
|
|
33342
|
+
var pad = "String(value).padStart(2, '0')";
|
|
33343
|
+
var FUNCTION_STARTERS = [
|
|
33344
|
+
{
|
|
33345
|
+
name: "today",
|
|
33346
|
+
label: "function-starter-today",
|
|
33347
|
+
description: "Today's date in local time, as YYYY-MM-DD.",
|
|
33348
|
+
body: [
|
|
33349
|
+
"const date = new Date();",
|
|
33350
|
+
`const two = (value: number): string => ${pad};`,
|
|
33351
|
+
"return `${date.getFullYear()}-${two(date.getMonth() + 1)}-${two(date.getDate())}`;"
|
|
33352
|
+
].join("\n")
|
|
33353
|
+
},
|
|
33354
|
+
{
|
|
33355
|
+
name: "now",
|
|
33356
|
+
label: "function-starter-now",
|
|
33357
|
+
description: "The current moment as an ISO 8601 timestamp, in UTC.",
|
|
33358
|
+
body: "return new Date().toISOString();"
|
|
33359
|
+
},
|
|
33360
|
+
{
|
|
33361
|
+
name: "currentTime",
|
|
33362
|
+
label: "function-starter-current-time",
|
|
33363
|
+
description: "The current local time, as HH:MM.",
|
|
33364
|
+
body: [
|
|
33365
|
+
"const date = new Date();",
|
|
33366
|
+
`const two = (value: number): string => ${pad};`,
|
|
33367
|
+
"return `${two(date.getHours())}:${two(date.getMinutes())}`;"
|
|
33368
|
+
].join("\n")
|
|
33369
|
+
},
|
|
33370
|
+
{
|
|
33371
|
+
name: "currentYear",
|
|
33372
|
+
label: "function-starter-current-year",
|
|
33373
|
+
description: "The current year, as four digits.",
|
|
33374
|
+
body: "return String(new Date().getFullYear());"
|
|
33375
|
+
}
|
|
33376
|
+
];
|
|
33377
|
+
var starterFunction = (starter) => ({
|
|
33378
|
+
name: starter.name,
|
|
33379
|
+
params: [],
|
|
33380
|
+
returnType: { type: "string" },
|
|
33381
|
+
returnCardinality: "one",
|
|
33382
|
+
body: starter.body,
|
|
33383
|
+
description: starter.description
|
|
33384
|
+
});
|
|
33385
|
+
|
|
32557
33386
|
// libs/codegen/src/model/history.ts
|
|
32558
33387
|
var HISTORY_DEPTH = 50;
|
|
32559
33388
|
var EMPTY_HISTORY = { undo: [], redo: [] };
|
|
@@ -32696,9 +33525,10 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32696
33525
|
DEFAULT_DEV_SOCKET_URL,
|
|
32697
33526
|
DEFAULT_INDEX_ALIAS,
|
|
32698
33527
|
DEFAULT_ITEM_ALIAS,
|
|
32699
|
-
|
|
32700
|
-
|
|
32701
|
-
|
|
33528
|
+
DEFAULT_KEY_ALIAS,
|
|
33529
|
+
DEFAULT_LOCAL_AUTH_URL,
|
|
33530
|
+
DEFAULT_LOCAL_BACKEND_URL,
|
|
33531
|
+
DEFAULT_LOCAL_SOCKET_URL,
|
|
32702
33532
|
DEFAULT_PROD_AUTH_URL,
|
|
32703
33533
|
DEFAULT_PROD_BACKEND_URL,
|
|
32704
33534
|
DEFAULT_PROD_SOCKET_URL,
|
|
@@ -32754,6 +33584,8 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32754
33584
|
FORMAT_PIPE_LABEL,
|
|
32755
33585
|
FORMAT_PIPE_NAMES,
|
|
32756
33586
|
FORM_NAME_CONFIG_KEY,
|
|
33587
|
+
FUNCTION_LIBRARY_GROUPS,
|
|
33588
|
+
FUNCTION_STARTERS,
|
|
32757
33589
|
GENERATED_SET,
|
|
32758
33590
|
GLOBAL_METHOD_CATALOG,
|
|
32759
33591
|
GLOBAL_METHOD_STORES,
|
|
@@ -32859,6 +33691,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32859
33691
|
PLUGIN_INPUTS_KEY,
|
|
32860
33692
|
PLUGIN_LINK_KEY,
|
|
32861
33693
|
PLUGIN_OUTPUTS_KEY,
|
|
33694
|
+
PLUGIN_OUTPUT_SHAPES_KEY,
|
|
32862
33695
|
PLUGIN_PORT_KEY,
|
|
32863
33696
|
PLUGIN_SCREEN_KEY,
|
|
32864
33697
|
PLUGIN_SOURCE_KEY,
|
|
@@ -32905,6 +33738,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32905
33738
|
SHARED_SHAPE_ID_PREFIX,
|
|
32906
33739
|
SHIPPED_SHELL_PATHS,
|
|
32907
33740
|
SOURCE_LANG,
|
|
33741
|
+
STARTER_GROUP,
|
|
32908
33742
|
STAT_TEXT_SOURCES,
|
|
32909
33743
|
STORAGE_SERVICE,
|
|
32910
33744
|
STYLE_DIRECTIVE_FORM,
|
|
@@ -32949,6 +33783,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32949
33783
|
addMenuGroup,
|
|
32950
33784
|
addMenuGroupSeeded,
|
|
32951
33785
|
admitsTextSource,
|
|
33786
|
+
aliasDisplayName,
|
|
32952
33787
|
aliasHoldersInScope,
|
|
32953
33788
|
aliasNames,
|
|
32954
33789
|
aliasSourceSlot,
|
|
@@ -32992,6 +33827,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
32992
33827
|
bindablePaths,
|
|
32993
33828
|
bindingAlwaysPresent,
|
|
32994
33829
|
bindingCanvasText,
|
|
33830
|
+
bindingCardinality,
|
|
32995
33831
|
bindingDataType,
|
|
32996
33832
|
bindingDisplayText,
|
|
32997
33833
|
bindingExpression,
|
|
@@ -33036,6 +33872,9 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33036
33872
|
callArgumentsExpression,
|
|
33037
33873
|
callError,
|
|
33038
33874
|
callStatement,
|
|
33875
|
+
callTargetKey,
|
|
33876
|
+
callTargetName,
|
|
33877
|
+
callTargetOfKey,
|
|
33039
33878
|
callableMethods,
|
|
33040
33879
|
canAddChildType,
|
|
33041
33880
|
canAppendFormatPipe,
|
|
@@ -33105,12 +33944,15 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33105
33944
|
collectThemeAssets,
|
|
33106
33945
|
collectTranslationAssets,
|
|
33107
33946
|
collectTypedComponentInputs,
|
|
33947
|
+
colorPipeExpression,
|
|
33948
|
+
colorPipeOf,
|
|
33108
33949
|
columnNeedsId,
|
|
33109
33950
|
compactControlGroups,
|
|
33110
33951
|
compactControlMap,
|
|
33111
33952
|
comparisonSource,
|
|
33112
33953
|
componentInputShapeIds,
|
|
33113
33954
|
componentInputTsType,
|
|
33955
|
+
composeFunctionBinding,
|
|
33114
33956
|
composeLabelValue,
|
|
33115
33957
|
computeError,
|
|
33116
33958
|
computeId,
|
|
@@ -33160,6 +34002,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33160
34002
|
createCompute,
|
|
33161
34003
|
createCondition,
|
|
33162
34004
|
createConfirm,
|
|
34005
|
+
createFunctionLeaf,
|
|
33163
34006
|
createGroup,
|
|
33164
34007
|
createOpen,
|
|
33165
34008
|
createOutputNav,
|
|
@@ -33182,14 +34025,11 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33182
34025
|
decodeWorkspace,
|
|
33183
34026
|
defaultCallArgEvent,
|
|
33184
34027
|
defaultChildId,
|
|
33185
|
-
defaultDevHosts,
|
|
33186
34028
|
defaultEnvironment,
|
|
33187
34029
|
defaultLiteralFor,
|
|
33188
|
-
defaultNormalHosts,
|
|
33189
34030
|
defaultOptionValue,
|
|
33190
34031
|
defaultOutputArm,
|
|
33191
34032
|
defaultOutputOpenValue,
|
|
33192
|
-
defaultProdHosts,
|
|
33193
34033
|
defaultScreenEmitValue,
|
|
33194
34034
|
defaultScreenWriteValue,
|
|
33195
34035
|
defaultStateWriteValue,
|
|
@@ -33295,7 +34135,9 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33295
34135
|
firstControlAtLayer,
|
|
33296
34136
|
fittedCaseArgs,
|
|
33297
34137
|
fixedAllowed,
|
|
34138
|
+
fixedExpression,
|
|
33298
34139
|
fixedIsText,
|
|
34140
|
+
fixedItems,
|
|
33299
34141
|
fnv64,
|
|
33300
34142
|
foldedButtonName,
|
|
33301
34143
|
foldedButtons,
|
|
@@ -33336,6 +34178,11 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33336
34178
|
formatPipeExpression,
|
|
33337
34179
|
formatPipeImports,
|
|
33338
34180
|
formatPipesOf,
|
|
34181
|
+
functionBindingArgs,
|
|
34182
|
+
functionBindingId,
|
|
34183
|
+
functionBindingTarget,
|
|
34184
|
+
functionChipDisplay,
|
|
34185
|
+
functionError,
|
|
33339
34186
|
functionFileBase,
|
|
33340
34187
|
functionFilePath,
|
|
33341
34188
|
functionImportPath,
|
|
@@ -33353,6 +34200,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33353
34200
|
generateFormInterface,
|
|
33354
34201
|
generateFormValidation,
|
|
33355
34202
|
generateFormValidationFile,
|
|
34203
|
+
generateFunctionExpression,
|
|
33356
34204
|
generateFunctionFile,
|
|
33357
34205
|
generateHtml,
|
|
33358
34206
|
generateRuleExpression,
|
|
@@ -33466,7 +34314,9 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33466
34314
|
isFunctionInUse,
|
|
33467
34315
|
isGeneratedPath,
|
|
33468
34316
|
isHeld,
|
|
34317
|
+
isIdentifier,
|
|
33469
34318
|
isKeyArg,
|
|
34319
|
+
isKeyedRepeat,
|
|
33470
34320
|
isKnownVariantId,
|
|
33471
34321
|
isLegalNavTail,
|
|
33472
34322
|
isLinkedFormModel,
|
|
@@ -33568,12 +34418,12 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33568
34418
|
jsNativesInGroup,
|
|
33569
34419
|
keyCandidates,
|
|
33570
34420
|
keyIdKeeper,
|
|
34421
|
+
labelChainOf,
|
|
33571
34422
|
labelEmission,
|
|
33572
34423
|
labelReadIsTranslated,
|
|
33573
34424
|
landingNavId,
|
|
33574
34425
|
landsOn,
|
|
33575
34426
|
landsUnconditionally,
|
|
33576
|
-
layerLabel,
|
|
33577
34427
|
levelStateComputeds,
|
|
33578
34428
|
libImportsFrom,
|
|
33579
34429
|
linkDrift,
|
|
@@ -33609,8 +34459,11 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33609
34459
|
mappedMethod,
|
|
33610
34460
|
mappedProperties,
|
|
33611
34461
|
maxVariants,
|
|
34462
|
+
memberAccess,
|
|
33612
34463
|
memberIdsOf,
|
|
33613
34464
|
memberKindOf,
|
|
34465
|
+
memberStep,
|
|
34466
|
+
memberToken,
|
|
33614
34467
|
menuActionCheckLabel,
|
|
33615
34468
|
menuActionKey,
|
|
33616
34469
|
menuActionKeys,
|
|
@@ -33713,6 +34566,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33713
34566
|
newInstanceFunctionOption,
|
|
33714
34567
|
newOutputArmCheck,
|
|
33715
34568
|
newRepeatSpec,
|
|
34569
|
+
newerVersion,
|
|
33716
34570
|
nextAliasName,
|
|
33717
34571
|
nextCallArgRow,
|
|
33718
34572
|
nextFieldName,
|
|
@@ -33857,14 +34711,18 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33857
34711
|
pickFolder,
|
|
33858
34712
|
pickedNavTail,
|
|
33859
34713
|
planScreenEmit,
|
|
34714
|
+
pluginContractResync,
|
|
33860
34715
|
pluginContracts,
|
|
33861
34716
|
pluginInputSlot,
|
|
33862
34717
|
pluginNamesOf,
|
|
33863
34718
|
pluginOriginKey,
|
|
34719
|
+
pluginOutputShapeOf,
|
|
33864
34720
|
pluginPickWrites,
|
|
33865
34721
|
pluginPortOf,
|
|
33866
34722
|
pluginSourceOf,
|
|
34723
|
+
presetHosts,
|
|
33867
34724
|
propertiesWithComputeds,
|
|
34725
|
+
propertyKey,
|
|
33868
34726
|
pruneFormEventReads,
|
|
33869
34727
|
pruneMappings,
|
|
33870
34728
|
pruneMenuActions,
|
|
@@ -33879,6 +34737,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33879
34737
|
pureFunctionArgs,
|
|
33880
34738
|
pureFunctionTest,
|
|
33881
34739
|
pureTarget,
|
|
34740
|
+
putSectionTableColumn,
|
|
33882
34741
|
quantifierApplies,
|
|
33883
34742
|
readDesignSource,
|
|
33884
34743
|
readFileAt,
|
|
@@ -33932,6 +34791,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33932
34791
|
repairMessageVariables,
|
|
33933
34792
|
repairSplitShapes,
|
|
33934
34793
|
repairTranslationMarkup,
|
|
34794
|
+
repeatEntryLets,
|
|
33935
34795
|
repeatGapReason,
|
|
33936
34796
|
repeatHeader,
|
|
33937
34797
|
repeatSpec,
|
|
@@ -33967,10 +34827,13 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
33967
34827
|
routeTargets,
|
|
33968
34828
|
routerLinkMode,
|
|
33969
34829
|
routesNavTail,
|
|
34830
|
+
rowMemberOptions,
|
|
33970
34831
|
rowsWithOneDefault,
|
|
33971
34832
|
ruleCalls,
|
|
33972
34833
|
ruleChecks,
|
|
33973
34834
|
ruleError,
|
|
34835
|
+
ruleFunctionImports,
|
|
34836
|
+
ruleFunctions,
|
|
33974
34837
|
ruleGlobalStores,
|
|
33975
34838
|
ruleNavs,
|
|
33976
34839
|
ruleReferencedIds,
|
|
@@ -34079,6 +34942,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34079
34942
|
seededMenuOptions,
|
|
34080
34943
|
segmentOptions,
|
|
34081
34944
|
selectableShapes,
|
|
34945
|
+
seriesMemberPicks,
|
|
34082
34946
|
setArmClosesOverlay,
|
|
34083
34947
|
setArmDialog,
|
|
34084
34948
|
setArmNav,
|
|
@@ -34086,6 +34950,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34086
34950
|
setMenuActionChecks,
|
|
34087
34951
|
setOutputArmChecks,
|
|
34088
34952
|
setOutputArmMode,
|
|
34953
|
+
setOutputArmStartsChain,
|
|
34089
34954
|
setVariantJoin,
|
|
34090
34955
|
shadowOnPath,
|
|
34091
34956
|
shadowedShapes,
|
|
@@ -34113,6 +34978,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34113
34978
|
staleCases,
|
|
34114
34979
|
staleMenuActionItems,
|
|
34115
34980
|
standardMenuConfigs,
|
|
34981
|
+
starterFunction,
|
|
34116
34982
|
stateComputedArgExpression,
|
|
34117
34983
|
stateComputedArgHeldType,
|
|
34118
34984
|
stateInterfaceName,
|
|
@@ -34130,6 +34996,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34130
34996
|
stateWriteTargets,
|
|
34131
34997
|
stateWriteToggleAllowed,
|
|
34132
34998
|
stateWriteValueKinds,
|
|
34999
|
+
staticHeadSource,
|
|
34133
35000
|
staticLabelSource,
|
|
34134
35001
|
staticLiteralType,
|
|
34135
35002
|
staticLiteralValue,
|
|
@@ -34189,6 +35056,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
34189
35056
|
toPascalCase,
|
|
34190
35057
|
toSectionTableColumns,
|
|
34191
35058
|
toggleFieldOptionValue,
|
|
35059
|
+
transformBindingLeaves,
|
|
34192
35060
|
transformGapDetail,
|
|
34193
35061
|
transformIncomplete,
|
|
34194
35062
|
transformLabel,
|