@magmonium/cli 0.8.27 → 0.8.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codegen/index.js +1060 -303
- package/package.json +1 -1
package/codegen/index.js
CHANGED
|
@@ -209,6 +209,7 @@ __export(index_exports, {
|
|
|
209
209
|
METHOD_VARIANT_SOURCES: () => METHOD_VARIANT_SOURCES,
|
|
210
210
|
MIGRATION_FLOOR: () => MIGRATION_FLOOR,
|
|
211
211
|
MODAL_STORE: () => MODAL_STORE,
|
|
212
|
+
NATIVE_ONE_FUNCTION_SPECS: () => NATIVE_ONE_FUNCTION_SPECS,
|
|
212
213
|
NAV_ID_SEP: () => NAV_ID_SEP2,
|
|
213
214
|
NAV_LINK_KINDS: () => NAV_LINK_KINDS,
|
|
214
215
|
NAV_PRESENTATIONS: () => NAV_PRESENTATIONS,
|
|
@@ -229,9 +230,12 @@ __export(index_exports, {
|
|
|
229
230
|
ONE_FUNCTIONS: () => ONE_FUNCTIONS,
|
|
230
231
|
ONE_FUNCTION_CATALOG: () => ONE_FUNCTION_CATALOG,
|
|
231
232
|
ONE_FUNCTION_DATA_PARAM: () => ONE_FUNCTION_DATA_PARAM,
|
|
233
|
+
ONE_FUNCTION_IDS_PARAM: () => ONE_FUNCTION_IDS_PARAM,
|
|
232
234
|
ONE_FUNCTION_ID_PARAM: () => ONE_FUNCTION_ID_PARAM,
|
|
235
|
+
ONE_FUNCTION_KEY_PARAM: () => ONE_FUNCTION_KEY_PARAM,
|
|
233
236
|
ONE_FUNCTION_MAP_PARAM: () => ONE_FUNCTION_MAP_PARAM,
|
|
234
237
|
ONE_FUNCTION_PREFIX: () => ONE_FUNCTION_PREFIX,
|
|
238
|
+
ONE_FUNCTION_SPECS: () => ONE_FUNCTION_SPECS,
|
|
235
239
|
ONE_IMPORT_MODULE: () => ONE_IMPORT_MODULE,
|
|
236
240
|
ONE_PACKAGE_VERSION: () => ONE_PACKAGE_VERSION,
|
|
237
241
|
OPEN_SCREEN_INPUT_SOURCES: () => OPEN_SCREEN_INPUT_SOURCES,
|
|
@@ -507,6 +511,7 @@ __export(index_exports, {
|
|
|
507
511
|
checkedFieldIds: () => checkedFieldIds,
|
|
508
512
|
checksUsingFunction: () => checksUsingFunction,
|
|
509
513
|
childNavId: () => childNavId,
|
|
514
|
+
classCallOutcomes: () => classCallOutcomes,
|
|
510
515
|
classCardScope: () => classCardScope,
|
|
511
516
|
clearOutputCallRows: () => clearOutputCallRows,
|
|
512
517
|
clearOutputGroupRows: () => clearOutputGroupRows,
|
|
@@ -542,22 +547,27 @@ __export(index_exports, {
|
|
|
542
547
|
composeFunctionBinding: () => composeFunctionBinding,
|
|
543
548
|
composeLabelValue: () => composeLabelValue,
|
|
544
549
|
computeError: () => computeError,
|
|
550
|
+
computeFunction: () => computeFunction,
|
|
545
551
|
computeId: () => computeId,
|
|
546
552
|
computeInputMemberError: () => computeInputMemberError,
|
|
547
553
|
computeInputPaths: () => computeInputPaths,
|
|
548
554
|
computeIsRead: () => computeIsRead,
|
|
549
555
|
computeMemberRead: () => computeMemberRead,
|
|
550
556
|
computeNameTaken: () => computeNameTaken,
|
|
557
|
+
computeOneFunction: () => computeOneFunction,
|
|
558
|
+
computeOneReturns: () => computeOneReturns,
|
|
551
559
|
computeReadable: () => computeReadable,
|
|
552
560
|
computeTextPaths: () => computeTextPaths,
|
|
553
561
|
computedAsProperty: () => computedAsProperty,
|
|
554
562
|
computedLocalNames: () => computedLocalNames,
|
|
555
563
|
computedRootIds: () => computedRootIds,
|
|
564
|
+
conditionArgValue: () => conditionArgValue,
|
|
556
565
|
conditionCheckType: () => conditionCheckType,
|
|
557
566
|
conditionError: () => conditionError,
|
|
558
567
|
conditionFunction: () => conditionFunction,
|
|
559
568
|
conditionId: () => conditionId,
|
|
560
569
|
conditionKind: () => conditionKind,
|
|
570
|
+
conditionReadsCompute: () => conditionReadsCompute,
|
|
561
571
|
configurableResponses: () => configurableResponses,
|
|
562
572
|
confirmError: () => confirmError,
|
|
563
573
|
confirmId: () => confirmId,
|
|
@@ -577,6 +587,7 @@ __export(index_exports, {
|
|
|
577
587
|
controlUsesOverlayRef: () => controlUsesOverlayRef,
|
|
578
588
|
controlVariantIds: () => controlVariantIds,
|
|
579
589
|
controlVariants: () => controlVariants,
|
|
590
|
+
controlWireOutcomes: () => controlWireOutcomes,
|
|
580
591
|
countFormResetReferences: () => countFormResetReferences,
|
|
581
592
|
countIconReferences: () => countIconReferences,
|
|
582
593
|
countOptionSetReferences: () => countOptionSetReferences,
|
|
@@ -768,6 +779,7 @@ __export(index_exports, {
|
|
|
768
779
|
formModelSourceType: () => formModelSourceType,
|
|
769
780
|
formModelStateOptions: () => formModelStateOptions,
|
|
770
781
|
formModelTransforms: () => formModelTransforms,
|
|
782
|
+
formQueryReaches: () => formQueryReaches,
|
|
771
783
|
formRefName: () => formRefName,
|
|
772
784
|
formRefNames: () => formRefNames,
|
|
773
785
|
formResetDepths: () => formResetDepths,
|
|
@@ -951,12 +963,14 @@ __export(index_exports, {
|
|
|
951
963
|
isMethodInUse: () => isMethodInUse,
|
|
952
964
|
isMountable: () => isMountable,
|
|
953
965
|
isMovingScreenEmit: () => isMovingScreenEmit,
|
|
966
|
+
isNativeOneFunction: () => isNativeOneFunction,
|
|
954
967
|
isNavAtOrBelow: () => isNavAtOrBelow,
|
|
955
968
|
isNavInstanceFunction: () => isNavInstanceFunction,
|
|
956
969
|
isNavRowShape: () => isNavRowShape,
|
|
957
970
|
isNavVisibilityFunction: () => isNavVisibilityFunction,
|
|
958
971
|
isOnChange: () => isOnChange,
|
|
959
972
|
isOneFunctionComputed: () => isOneFunctionComputed,
|
|
973
|
+
isOneFunctionStateComputed: () => isOneFunctionStateComputed,
|
|
960
974
|
isOptionRowShape: () => isOptionRowShape,
|
|
961
975
|
isOrderingMenuActionOperator: () => isOrderingMenuActionOperator,
|
|
962
976
|
isOrderingOutputArmOperator: () => isOrderingOutputArmOperator,
|
|
@@ -1223,12 +1237,21 @@ __export(index_exports, {
|
|
|
1223
1237
|
normalizeVariantName: () => normalizeVariantName,
|
|
1224
1238
|
offersOutputArms: () => offersOutputArms,
|
|
1225
1239
|
oneFunctionArgFits: () => oneFunctionArgFits,
|
|
1240
|
+
oneFunctionBoundSignature: () => oneFunctionBoundSignature,
|
|
1241
|
+
oneFunctionFitsLanding: () => oneFunctionFitsLanding,
|
|
1226
1242
|
oneFunctionFromPickValue: () => oneFunctionFromPickValue,
|
|
1243
|
+
oneFunctionLiftedAt: () => oneFunctionLiftedAt,
|
|
1244
|
+
oneFunctionMintsKey: () => oneFunctionMintsKey,
|
|
1227
1245
|
oneFunctionOf: () => oneFunctionOf,
|
|
1228
1246
|
oneFunctionPickValue: () => oneFunctionPickValue,
|
|
1229
1247
|
oneFunctionReturns: () => oneFunctionReturns,
|
|
1230
1248
|
oneFunctionSignature: () => oneFunctionSignature,
|
|
1231
1249
|
oneFunctionSignatureText: () => oneFunctionSignatureText,
|
|
1250
|
+
oneFunctionSiteFits: () => oneFunctionSiteFits,
|
|
1251
|
+
oneParamFixedHeld: () => oneParamFixedHeld,
|
|
1252
|
+
oneParamStatePathOnly: () => oneParamStatePathOnly,
|
|
1253
|
+
oneParamTakesFixed: () => oneParamTakesFixed,
|
|
1254
|
+
oneParamTypeText: () => oneParamTypeText,
|
|
1232
1255
|
openError: () => openError,
|
|
1233
1256
|
openId: () => openId,
|
|
1234
1257
|
openInputAnswered: () => openInputAnswered,
|
|
@@ -1431,6 +1454,7 @@ __export(index_exports, {
|
|
|
1431
1454
|
renameMenuItemId: () => renameMenuItemId,
|
|
1432
1455
|
renameScreenMethodParamReads: () => renameScreenMethodParamReads,
|
|
1433
1456
|
repairCallOutcome: () => repairCallOutcome,
|
|
1457
|
+
repairClassCallSites: () => repairClassCallSites,
|
|
1434
1458
|
repairFieldCheckSignatures: () => repairFieldCheckSignatures,
|
|
1435
1459
|
repairMarkdownLinkUrls: () => repairMarkdownLinkUrls,
|
|
1436
1460
|
repairMessageVariables: () => repairMessageVariables,
|
|
@@ -1640,6 +1664,7 @@ __export(index_exports, {
|
|
|
1640
1664
|
starterFunction: () => starterFunction,
|
|
1641
1665
|
stateComputedArgExpression: () => stateComputedArgExpression,
|
|
1642
1666
|
stateComputedArgHeldType: () => stateComputedArgHeldType,
|
|
1667
|
+
stateComputedFunction: () => stateComputedFunction,
|
|
1643
1668
|
stateInterfaceName: () => stateInterfaceName,
|
|
1644
1669
|
statePathHeldType: () => statePathHeldType,
|
|
1645
1670
|
statePathRead: () => statePathRead,
|
|
@@ -5220,94 +5245,258 @@ var screenMethodCalls = (method) => method ? [
|
|
|
5220
5245
|
{
|
|
5221
5246
|
methodId: method.methodId,
|
|
5222
5247
|
functionId: method.functionId,
|
|
5223
|
-
args: method.args
|
|
5248
|
+
args: method.args,
|
|
5249
|
+
// The handler's own call's settling (ADR 0219), filed on the handler.
|
|
5250
|
+
...method.outcome ? { outcome: method.outcome } : {}
|
|
5224
5251
|
},
|
|
5225
5252
|
...method.calls ?? []
|
|
5226
5253
|
] : [];
|
|
5227
5254
|
|
|
5228
5255
|
// libs/codegen/src/model/one-function-catalog.ts
|
|
5229
5256
|
var ONE_FUNCTION_ID_PARAM = "id";
|
|
5257
|
+
var ONE_FUNCTION_IDS_PARAM = "ids";
|
|
5230
5258
|
var ONE_FUNCTION_MAP_PARAM = "map";
|
|
5231
5259
|
var ONE_FUNCTION_DATA_PARAM = "data";
|
|
5260
|
+
var ONE_FUNCTION_KEY_PARAM = "key";
|
|
5232
5261
|
var ONE_FUNCTION_PREFIX = "one:";
|
|
5233
|
-
var
|
|
5234
|
-
id:
|
|
5235
|
-
name:
|
|
5236
|
-
|
|
5237
|
-
cardinality:
|
|
5238
|
-
acceptsUndefined: true
|
|
5239
|
-
});
|
|
5240
|
-
var defineOneFunction = (spec) => {
|
|
5241
|
-
const { returns, ...entry2 } = spec;
|
|
5242
|
-
return {
|
|
5243
|
-
...entry2,
|
|
5244
|
-
importFrom: ONE_IMPORT_MODULE,
|
|
5245
|
-
returnsRow: returns !== "boolean",
|
|
5246
|
-
signature: (row) => ({
|
|
5247
|
-
params: entry2.params.map((param) => signatureParam(param, row)),
|
|
5248
|
-
...returns === "boolean" ? { returnType: { type: "boolean" }, returnCardinality: "one" } : returns === "row" ? { returnType: row, returnCardinality: "one", returnUndefined: true } : { returnType: row, returnCardinality: "map" }
|
|
5249
|
-
})
|
|
5250
|
-
};
|
|
5262
|
+
var ID = {
|
|
5263
|
+
id: ONE_FUNCTION_ID_PARAM,
|
|
5264
|
+
name: "id",
|
|
5265
|
+
type: "string",
|
|
5266
|
+
cardinality: "one"
|
|
5251
5267
|
};
|
|
5252
|
-
var
|
|
5268
|
+
var MAP = {
|
|
5269
|
+
id: ONE_FUNCTION_MAP_PARAM,
|
|
5270
|
+
name: "map",
|
|
5271
|
+
type: "T",
|
|
5272
|
+
cardinality: "map",
|
|
5273
|
+
statePathOnly: true
|
|
5274
|
+
};
|
|
5275
|
+
var ONE_FUNCTION_SPECS = {
|
|
5253
5276
|
// `getFromMap<T>(id, map: Record<string, T>): T | undefined` — the row a
|
|
5254
5277
|
// `map` holds under an id, typically a ScreenInput a Page was handed.
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5278
|
+
getFromMap: {
|
|
5279
|
+
params: [ID, MAP],
|
|
5280
|
+
returns: { type: "T", cardinality: "one", optional: true }
|
|
5281
|
+
},
|
|
5282
|
+
// `getManyFromMaps<T>(ids: string[], map: Record<string, T>): T[]` — the
|
|
5283
|
+
// rows a `map` holds under each id, in id order, a miss skipped. Over a
|
|
5284
|
+
// `map-many` it answers every id's list joined into one flat list, so its
|
|
5285
|
+
// return stays `many` where the record lifts.
|
|
5286
|
+
getManyFromMaps: {
|
|
5259
5287
|
params: [
|
|
5260
|
-
{
|
|
5261
|
-
|
|
5288
|
+
{
|
|
5289
|
+
id: ONE_FUNCTION_IDS_PARAM,
|
|
5290
|
+
name: "ids",
|
|
5291
|
+
type: "string",
|
|
5292
|
+
cardinality: "many"
|
|
5293
|
+
},
|
|
5294
|
+
MAP
|
|
5262
5295
|
],
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
}),
|
|
5296
|
+
returns: { type: "T", cardinality: "many", liftsTo: "many" }
|
|
5297
|
+
},
|
|
5266
5298
|
// `existsInMap(id, map: Record<string, unknown>): boolean` — whether a
|
|
5267
5299
|
// `map` holds anything under an id (ADR 0202). `false` rather than
|
|
5268
5300
|
// `undefined` while either is, so a gate on an unloaded store reads "not
|
|
5269
5301
|
// there yet" and a computed over it never needs `?.`.
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5302
|
+
existsInMap: {
|
|
5303
|
+
params: [ID, MAP],
|
|
5304
|
+
returns: { type: "boolean", cardinality: "one" }
|
|
5305
|
+
},
|
|
5306
|
+
// `notExistsInMap(id, map: Record<string, unknown>): boolean` — the named
|
|
5307
|
+
// inverse, for a CallCondition alone: a computed reads `!existsInMap`.
|
|
5308
|
+
notExistsInMap: {
|
|
5309
|
+
params: [ID, MAP],
|
|
5310
|
+
returns: { type: "boolean", cardinality: "one" },
|
|
5311
|
+
narrowTo: ["call-condition"]
|
|
5312
|
+
},
|
|
5313
|
+
// `missingFromMap(ids: string[], map: Record<string, unknown>): string[] |
|
|
5314
|
+
// undefined` — the ids a `map` does not hold yet, in id order and each
|
|
5315
|
+
// once: what is still to fetch. `undefined` while the ids are missing or
|
|
5316
|
+
// empty and once the map holds every one; every id while the map is
|
|
5317
|
+
// missing. A ScreenComputed or a CallCompute by its signature: it answers
|
|
5318
|
+
// neither a `boolean` nor `T` (ADR 0216).
|
|
5319
|
+
missingFromMap: {
|
|
5274
5320
|
params: [
|
|
5275
|
-
{
|
|
5276
|
-
|
|
5321
|
+
{
|
|
5322
|
+
id: ONE_FUNCTION_IDS_PARAM,
|
|
5323
|
+
name: "ids",
|
|
5324
|
+
type: "string",
|
|
5325
|
+
cardinality: "many"
|
|
5326
|
+
},
|
|
5327
|
+
MAP
|
|
5277
5328
|
],
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
// `
|
|
5282
|
-
//
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
reach: ["call-condition"],
|
|
5286
|
-
returns: "boolean",
|
|
5329
|
+
returns: { type: "string", cardinality: "many", optional: true }
|
|
5330
|
+
},
|
|
5331
|
+
// `anyMissingFromMap(ids: string[], map: Record<string, unknown>): boolean`
|
|
5332
|
+
// — whether `missingFromMap` would answer any id: the gate a batch call is
|
|
5333
|
+
// dropped by once every row is held (ADR 0216). For a CallCondition alone:
|
|
5334
|
+
// a computed reads `missingFromMap` itself.
|
|
5335
|
+
anyMissingFromMap: {
|
|
5287
5336
|
params: [
|
|
5288
|
-
{
|
|
5289
|
-
|
|
5337
|
+
{
|
|
5338
|
+
id: ONE_FUNCTION_IDS_PARAM,
|
|
5339
|
+
name: "ids",
|
|
5340
|
+
type: "string",
|
|
5341
|
+
cardinality: "many"
|
|
5342
|
+
},
|
|
5343
|
+
MAP
|
|
5290
5344
|
],
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
}
|
|
5345
|
+
returns: { type: "boolean", cardinality: "one" },
|
|
5346
|
+
narrowTo: ["call-condition"]
|
|
5347
|
+
},
|
|
5294
5348
|
// `setInMap<T>(id, data: T, map: Record<string, T>): Record<string, T>` —
|
|
5295
5349
|
// the map with `data` held under `id`, every other entry kept (ADR 0205).
|
|
5296
|
-
//
|
|
5297
|
-
|
|
5298
|
-
defineOneFunction({
|
|
5299
|
-
name: "setInMap",
|
|
5300
|
-
reach: ["outcome-transform"],
|
|
5301
|
-
returns: "row-map",
|
|
5350
|
+
// For an OutcomeTransform alone: a computed has no landing to keep entries of.
|
|
5351
|
+
setInMap: {
|
|
5302
5352
|
params: [
|
|
5303
|
-
|
|
5304
|
-
{
|
|
5305
|
-
|
|
5353
|
+
ID,
|
|
5354
|
+
{
|
|
5355
|
+
id: ONE_FUNCTION_DATA_PARAM,
|
|
5356
|
+
name: "data",
|
|
5357
|
+
type: "T",
|
|
5358
|
+
cardinality: "one"
|
|
5359
|
+
},
|
|
5360
|
+
MAP
|
|
5306
5361
|
],
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
}
|
|
5362
|
+
returns: { type: "T", cardinality: "map" },
|
|
5363
|
+
narrowTo: ["outcome-transform"]
|
|
5364
|
+
},
|
|
5365
|
+
// `mapMany<T>(data: T[], key: keyof T, map: Record<string, T[]>):
|
|
5366
|
+
// Record<string, T[]>` — a flat list of rows landed into a `map-many`, each
|
|
5367
|
+
// row grouped under its `key` member: a batch `loadCurves(ids)` answers
|
|
5368
|
+
// every strategy's points in one list, each naming its strategy in `sid`.
|
|
5369
|
+
// A key the list names has its list replaced, every other entry is kept.
|
|
5370
|
+
mapMany: {
|
|
5371
|
+
params: [
|
|
5372
|
+
{
|
|
5373
|
+
id: ONE_FUNCTION_DATA_PARAM,
|
|
5374
|
+
name: "data",
|
|
5375
|
+
type: "T",
|
|
5376
|
+
cardinality: "many"
|
|
5377
|
+
},
|
|
5378
|
+
{
|
|
5379
|
+
id: ONE_FUNCTION_KEY_PARAM,
|
|
5380
|
+
name: "key",
|
|
5381
|
+
type: "string",
|
|
5382
|
+
cardinality: "one"
|
|
5383
|
+
},
|
|
5384
|
+
{ ...MAP, cardinality: "map-many" }
|
|
5385
|
+
],
|
|
5386
|
+
returns: { type: "T", cardinality: "map-many" },
|
|
5387
|
+
narrowTo: ["outcome-transform"]
|
|
5388
|
+
},
|
|
5389
|
+
// `pluckStrings<T>(items: T[], key: string): string[]` — the `string`
|
|
5390
|
+
// values one member of each row holds, in row order: the ids of a list a
|
|
5391
|
+
// later lookup reads by. `key` is typed in like `mapMany`'s, prefilled with
|
|
5392
|
+
// the row's id-named `string` member; a value that is not a string is
|
|
5393
|
+
// skipped, and missing items or key answer `[]` (ADR 0218).
|
|
5394
|
+
pluckStrings: {
|
|
5395
|
+
params: [
|
|
5396
|
+
{
|
|
5397
|
+
id: ONE_FUNCTION_DATA_PARAM,
|
|
5398
|
+
name: "items",
|
|
5399
|
+
type: "T",
|
|
5400
|
+
cardinality: "many"
|
|
5401
|
+
},
|
|
5402
|
+
{
|
|
5403
|
+
id: ONE_FUNCTION_KEY_PARAM,
|
|
5404
|
+
name: "key",
|
|
5405
|
+
type: "string",
|
|
5406
|
+
cardinality: "one"
|
|
5407
|
+
}
|
|
5408
|
+
],
|
|
5409
|
+
returns: { type: "string", cardinality: "many" }
|
|
5410
|
+
}
|
|
5411
|
+
};
|
|
5412
|
+
var NATIVE_ONE_FUNCTION_SPECS = {
|
|
5413
|
+
// `Object.assign({}, target, source)` — a keyed answer merged into a keyed
|
|
5414
|
+
// landing: every entry of `source` held over `target`, every other entry of
|
|
5415
|
+
// `target` kept. Spelled onto a fresh `{}` so the store's own state object
|
|
5416
|
+
// is never written in place. Lifts like `setInMap`, so `{ [id]: points }`
|
|
5417
|
+
// merges into a `map-many` whole.
|
|
5418
|
+
"Object.assign": {
|
|
5419
|
+
params: [
|
|
5420
|
+
{
|
|
5421
|
+
id: ONE_FUNCTION_MAP_PARAM,
|
|
5422
|
+
name: "target",
|
|
5423
|
+
type: "T",
|
|
5424
|
+
cardinality: "map",
|
|
5425
|
+
statePathOnly: true
|
|
5426
|
+
},
|
|
5427
|
+
{
|
|
5428
|
+
id: ONE_FUNCTION_DATA_PARAM,
|
|
5429
|
+
name: "source",
|
|
5430
|
+
type: "T",
|
|
5431
|
+
cardinality: "map"
|
|
5432
|
+
}
|
|
5433
|
+
],
|
|
5434
|
+
returns: { type: "T", cardinality: "map" },
|
|
5435
|
+
narrowTo: ["outcome-transform"],
|
|
5436
|
+
spell: (args) => `Object.assign({}, ${args.join(", ")})`
|
|
5437
|
+
}
|
|
5438
|
+
};
|
|
5439
|
+
var LIFT = {
|
|
5440
|
+
one: "many",
|
|
5441
|
+
map: "map-many"
|
|
5442
|
+
};
|
|
5443
|
+
var slots = (spec) => [
|
|
5444
|
+
...spec.params,
|
|
5445
|
+
spec.returns
|
|
5310
5446
|
];
|
|
5447
|
+
var lifts = (spec) => slots(spec).some((slot) => slot.type === "T") && slots(spec).every((slot) => slot.type !== "T" || !!liftOf(slot));
|
|
5448
|
+
var liftOf = (slot) => slot.liftsTo ?? LIFT[slot.cardinality];
|
|
5449
|
+
var liftedCardinality = (slot, lifted) => lifted && slot.type === "T" ? liftOf(slot) ?? slot.cardinality : slot.cardinality;
|
|
5450
|
+
var slotDataType = (slot, row) => slot.type === "T" ? row : { type: slot.type };
|
|
5451
|
+
var oneFunctionSiteFits = (spec, reach) => reach === "call-condition" ? spec.returns.type === "boolean" && spec.returns.cardinality === "one" : reach === "outcome-transform" ? spec.returns.type === "T" : true;
|
|
5452
|
+
var REACHES = [
|
|
5453
|
+
"screen-computed",
|
|
5454
|
+
"state-computed",
|
|
5455
|
+
"call-condition",
|
|
5456
|
+
"call-compute",
|
|
5457
|
+
"outcome-transform"
|
|
5458
|
+
];
|
|
5459
|
+
var defineOneFunction = (name3, spec) => {
|
|
5460
|
+
const liftable = lifts(spec);
|
|
5461
|
+
const params = spec.params.map(
|
|
5462
|
+
({ liftsTo: _declared, ...param }) => ({
|
|
5463
|
+
...param,
|
|
5464
|
+
...liftable && param.type === "T" ? { liftsTo: liftOf(param) } : {}
|
|
5465
|
+
})
|
|
5466
|
+
);
|
|
5467
|
+
const rowParam = params.find((param) => param.type === "T" && param.statePathOnly) ?? params.find((param) => param.type === "T");
|
|
5468
|
+
return {
|
|
5469
|
+
name: name3,
|
|
5470
|
+
..."spell" in spec ? { spell: spec.spell } : { importFrom: ONE_IMPORT_MODULE },
|
|
5471
|
+
reach: REACHES.filter(
|
|
5472
|
+
(reach) => oneFunctionSiteFits(spec, reach) && (!spec.narrowTo || spec.narrowTo.includes(reach))
|
|
5473
|
+
),
|
|
5474
|
+
...spec.narrowTo ? { narrowTo: spec.narrowTo } : {},
|
|
5475
|
+
returnsRow: spec.returns.type === "T",
|
|
5476
|
+
params,
|
|
5477
|
+
returns: spec.returns,
|
|
5478
|
+
rowParamId: rowParam?.id ?? "",
|
|
5479
|
+
signature: (row, lifted = false) => ({
|
|
5480
|
+
params: params.map(
|
|
5481
|
+
(param) => ({
|
|
5482
|
+
id: param.id,
|
|
5483
|
+
name: param.name,
|
|
5484
|
+
dataType: slotDataType(param, row),
|
|
5485
|
+
cardinality: liftedCardinality(param, lifted),
|
|
5486
|
+
acceptsUndefined: true
|
|
5487
|
+
})
|
|
5488
|
+
),
|
|
5489
|
+
returnType: slotDataType(spec.returns, row),
|
|
5490
|
+
returnCardinality: liftedCardinality(spec.returns, lifted),
|
|
5491
|
+
...spec.returns.optional ? { returnUndefined: true } : {}
|
|
5492
|
+
})
|
|
5493
|
+
};
|
|
5494
|
+
};
|
|
5495
|
+
var ONE_FUNCTIONS = [
|
|
5496
|
+
...Object.entries(ONE_FUNCTION_SPECS),
|
|
5497
|
+
...Object.entries(NATIVE_ONE_FUNCTION_SPECS)
|
|
5498
|
+
].map(([name3, spec]) => defineOneFunction(name3, spec));
|
|
5499
|
+
var isNativeOneFunction = (entry2) => !!entry2?.spell;
|
|
5311
5500
|
var ONE_FUNCTION_CATALOG = Object.fromEntries(ONE_FUNCTIONS.map((entry2) => [entry2.name, entry2]));
|
|
5312
5501
|
var oneFunctionOf = (name3) => name3 ? ONE_FUNCTIONS.find((entry2) => entry2.name === name3) : void 0;
|
|
5313
5502
|
var listOneFunctions = (reach = "screen-computed") => ONE_FUNCTIONS.filter((entry2) => entry2.reach.includes(reach)).sort(
|
|
@@ -5315,26 +5504,28 @@ var listOneFunctions = (reach = "screen-computed") => ONE_FUNCTIONS.filter((entr
|
|
|
5315
5504
|
);
|
|
5316
5505
|
var oneFunctionPickValue = (name3) => `${ONE_FUNCTION_PREFIX}${name3}`;
|
|
5317
5506
|
var oneFunctionFromPickValue = (value) => value?.startsWith(ONE_FUNCTION_PREFIX) ? oneFunctionOf(value.slice(ONE_FUNCTION_PREFIX.length)) : void 0;
|
|
5507
|
+
var oneParamStatePathOnly = (param) => !!param.statePathOnly;
|
|
5508
|
+
var oneParamTakesFixed = (param) => param.type !== "T" && param.cardinality === "one" && !param.statePathOnly;
|
|
5509
|
+
var oneParamFixedHeld = (param, value) => oneParamTakesFixed(param) && param.type !== "T" && typeof value === param.type ? { dataType: { type: param.type }, cardinality: "one" } : void 0;
|
|
5318
5510
|
function oneFunctionArgFits(param, held, fromPath) {
|
|
5319
5511
|
if (!held) return false;
|
|
5320
|
-
if (param.
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
return
|
|
5324
|
-
}
|
|
5325
|
-
var
|
|
5326
|
-
|
|
5327
|
-
return
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
const signature = mapCardinality === "map-many" ? listedSignature(entry2, entry2.signature(row)) : entry2.signature(row);
|
|
5512
|
+
if (param.statePathOnly && !fromPath) return false;
|
|
5513
|
+
if (param.type !== "T")
|
|
5514
|
+
return held.dataType.type === param.type && held.cardinality === param.cardinality;
|
|
5515
|
+
return held.cardinality === param.cardinality || held.cardinality === param.liftsTo;
|
|
5516
|
+
}
|
|
5517
|
+
var liftedBy = (entry2, paramId, cardinality) => {
|
|
5518
|
+
const param = entry2.params.find((candidate) => candidate.id === paramId);
|
|
5519
|
+
return !!param?.liftsTo && cardinality === param.liftsTo;
|
|
5520
|
+
};
|
|
5521
|
+
var oneFunctionLiftedAt = (entry2, cardinality) => entry2.returnsRow && !!entry2.params.some((param) => param.liftsTo) && cardinality !== entry2.returns.cardinality && cardinality === liftOf(entry2.returns);
|
|
5522
|
+
var oneFunctionFitsLanding = (entry2, cardinality) => entry2.returnsRow && (cardinality === entry2.returns.cardinality || oneFunctionLiftedAt(entry2, cardinality));
|
|
5523
|
+
var oneFunctionMintsKey = (entry2) => entry2.returnsRow && (entry2.returns.cardinality === "map" || entry2.returns.cardinality === "map-many");
|
|
5524
|
+
function oneFunctionReturns(entry2, row, heldCardinality) {
|
|
5525
|
+
const signature = entry2.signature(
|
|
5526
|
+
row,
|
|
5527
|
+
liftedBy(entry2, entry2.rowParamId, heldCardinality)
|
|
5528
|
+
);
|
|
5338
5529
|
return {
|
|
5339
5530
|
dataType: signature.returnType,
|
|
5340
5531
|
cardinality: signature.returnCardinality,
|
|
@@ -5342,26 +5533,38 @@ function oneFunctionReturns(entry2, row, mapCardinality = "map") {
|
|
|
5342
5533
|
};
|
|
5343
5534
|
}
|
|
5344
5535
|
function oneFunctionSignature(entry2, returns) {
|
|
5345
|
-
const signature = entry2.signature(returns.dataType);
|
|
5346
5536
|
return {
|
|
5347
5537
|
id: "",
|
|
5348
5538
|
name: entry2.name,
|
|
5349
5539
|
// An entry answering a fixed type stores that type, not the row: its
|
|
5350
5540
|
// `map` is spelled `Record<string, unknown>` by the library, so the stand-in
|
|
5351
5541
|
// over the stored type reads the same at every reader.
|
|
5352
|
-
...
|
|
5542
|
+
...entry2.signature(
|
|
5543
|
+
returns.dataType,
|
|
5544
|
+
oneFunctionLiftedAt(entry2, returns.cardinality)
|
|
5545
|
+
),
|
|
5546
|
+
body: ""
|
|
5547
|
+
};
|
|
5548
|
+
}
|
|
5549
|
+
function oneFunctionBoundSignature(entry2, row, heldCardinality) {
|
|
5550
|
+
return {
|
|
5551
|
+
id: "",
|
|
5552
|
+
name: entry2.name,
|
|
5553
|
+
...entry2.signature(row, liftedBy(entry2, entry2.rowParamId, heldCardinality)),
|
|
5353
5554
|
body: ""
|
|
5354
5555
|
};
|
|
5355
5556
|
}
|
|
5557
|
+
function oneParamTypeText(entry2, param, rowLabel) {
|
|
5558
|
+
const t = param.type !== "T" ? param.type : entry2.returnsRow ? rowLabel ?? "T" : "unknown";
|
|
5559
|
+
return param.cardinality === "map" ? `Record<string, ${t}>` : param.cardinality === "map-many" ? `Record<string, ${t}[]>` : param.cardinality === "many" ? `${t}[]` : t;
|
|
5560
|
+
}
|
|
5356
5561
|
function oneFunctionSignatureText(entry2, rowLabel) {
|
|
5357
5562
|
const generic = entry2.returnsRow && !rowLabel;
|
|
5358
|
-
const t = entry2.returnsRow ? rowLabel ?? "T" : "unknown";
|
|
5359
5563
|
const params = entry2.params.map(
|
|
5360
|
-
(param) =>
|
|
5564
|
+
(param) => `${param.name}: ${oneParamTypeText(entry2, param, rowLabel)}`
|
|
5361
5565
|
).join(", ");
|
|
5362
|
-
const
|
|
5363
|
-
|
|
5364
|
-
return `${entry2.name}${generic ? "<T>" : ""}(${params}): ${returns}`;
|
|
5566
|
+
const returns = oneParamTypeText(entry2, entry2.returns, rowLabel);
|
|
5567
|
+
return `${entry2.name}${generic ? "<T>" : ""}(${params}): ${entry2.returns.optional ? `${returns} | undefined` : returns}`;
|
|
5365
5568
|
}
|
|
5366
5569
|
|
|
5367
5570
|
// libs/codegen/src/lib/pure-function-helper.ts
|
|
@@ -5569,6 +5772,13 @@ function screenComputedFunction(computed, functions) {
|
|
|
5569
5772
|
body: `return ${PASSTHROUGH_PARAM_ID};`
|
|
5570
5773
|
};
|
|
5571
5774
|
}
|
|
5775
|
+
function stateComputedFunction(computed, functions) {
|
|
5776
|
+
if (computed.functionId) return functions[computed.functionId];
|
|
5777
|
+
if (!computed.oneFunction || !computed.returns) return void 0;
|
|
5778
|
+
const entry2 = oneFunctionOf(computed.oneFunction);
|
|
5779
|
+
return entry2 ? oneFunctionSignature(entry2, computed.returns) : void 0;
|
|
5780
|
+
}
|
|
5781
|
+
var isOneFunctionStateComputed = (computed) => !computed.functionId && !!computed.oneFunction;
|
|
5572
5782
|
var isPassthroughComputed = (computed) => !computed.functionId && !computed.oneFunction;
|
|
5573
5783
|
var isOneFunctionComputed = (computed) => !computed.functionId && !!computed.oneFunction;
|
|
5574
5784
|
function screenComputedNavIds(computed) {
|
|
@@ -5766,7 +5976,7 @@ function propertiesWithComputeds(properties, computeds = {}, functions = {}) {
|
|
|
5766
5976
|
for (const computed of Object.values(computeds ?? {})) {
|
|
5767
5977
|
const asProperty = computedAsProperty(
|
|
5768
5978
|
computed,
|
|
5769
|
-
functions
|
|
5979
|
+
stateComputedFunction(computed, functions)
|
|
5770
5980
|
);
|
|
5771
5981
|
if (asProperty) result[computed.id] = asProperty;
|
|
5772
5982
|
}
|
|
@@ -6653,6 +6863,20 @@ var BINDING_TRANSFORM_LEAVES = [
|
|
|
6653
6863
|
"binding"
|
|
6654
6864
|
];
|
|
6655
6865
|
|
|
6866
|
+
// libs/codegen/src/lib/compute-function.ts
|
|
6867
|
+
function computeFunction(compute, functions) {
|
|
6868
|
+
if (!compute) return void 0;
|
|
6869
|
+
if (compute.oneFunction) {
|
|
6870
|
+
const entry2 = computeOneFunction(compute);
|
|
6871
|
+
return entry2 && compute.returns ? oneFunctionSignature(entry2, compute.returns) : void 0;
|
|
6872
|
+
}
|
|
6873
|
+
return functions[compute.functionId];
|
|
6874
|
+
}
|
|
6875
|
+
var computeOneFunction = (compute) => {
|
|
6876
|
+
const entry2 = oneFunctionOf(compute.oneFunction);
|
|
6877
|
+
return entry2?.reach.includes("call-compute") ? entry2 : void 0;
|
|
6878
|
+
};
|
|
6879
|
+
|
|
6656
6880
|
// libs/codegen/src/lib/outcome-transform-helper.ts
|
|
6657
6881
|
var outcomeTransformOneFunction = (transform) => {
|
|
6658
6882
|
const entry2 = oneFunctionOf(transform?.oneFunction);
|
|
@@ -6690,7 +6914,7 @@ var argValue = (binding, mapping, method, op, roots, shapes, functions) => {
|
|
|
6690
6914
|
const compute = (method.computes ?? []).find(
|
|
6691
6915
|
(candidate) => candidate.name === binding.name
|
|
6692
6916
|
);
|
|
6693
|
-
const fn = compute
|
|
6917
|
+
const fn = computeFunction(compute, functions);
|
|
6694
6918
|
return fn ? {
|
|
6695
6919
|
value: {
|
|
6696
6920
|
dataType: fn.returnType,
|
|
@@ -6797,7 +7021,8 @@ function outcomeTransformFailure(mapping, method, op, properties, shapes, functi
|
|
|
6797
7021
|
}
|
|
6798
7022
|
continue;
|
|
6799
7023
|
}
|
|
6800
|
-
|
|
7024
|
+
const oneParam = one?.params[index];
|
|
7025
|
+
if (oneParam && oneParamStatePathOnly(oneParam) && binding?.source !== "state") {
|
|
6801
7026
|
return {
|
|
6802
7027
|
error: "emit-gap-outcome-transform-source",
|
|
6803
7028
|
paramIndex: index,
|
|
@@ -7448,22 +7673,7 @@ function sanitizeLeaf(leaf) {
|
|
|
7448
7673
|
}
|
|
7449
7674
|
}
|
|
7450
7675
|
|
|
7451
|
-
// libs/codegen/src/lib/binding-
|
|
7452
|
-
var screenComputedPresent = (id, screenComputeds, functions, inputs) => {
|
|
7453
|
-
const computed = screenComputeds?.[id];
|
|
7454
|
-
const fn = computed ? screenComputedFunction(computed, functions ?? {}) : void 0;
|
|
7455
|
-
if (!computed || !fn) return false;
|
|
7456
|
-
if (fn.returnUndefined === true || returnCardinalityOf(fn) !== "one") {
|
|
7457
|
-
return false;
|
|
7458
|
-
}
|
|
7459
|
-
return !screenComputedIsOptional(
|
|
7460
|
-
computed,
|
|
7461
|
-
fn,
|
|
7462
|
-
inputs ?? {},
|
|
7463
|
-
screenComputeds ?? {},
|
|
7464
|
-
functions ?? {}
|
|
7465
|
-
);
|
|
7466
|
-
};
|
|
7676
|
+
// libs/codegen/src/lib/binding-slot.ts
|
|
7467
7677
|
var BINDING_SLOT = {
|
|
7468
7678
|
// A `text` Control's label, and a Stat's (libs/one ADR 0022). Renders
|
|
7469
7679
|
// verbatim — the case where a bound value *is* a translation key is what a
|
|
@@ -7529,6 +7739,23 @@ var BINDING_SLOT = {
|
|
|
7529
7739
|
// `configs.selection`, a Button's Control id.
|
|
7530
7740
|
selection: "selection"
|
|
7531
7741
|
};
|
|
7742
|
+
|
|
7743
|
+
// libs/codegen/src/lib/binding-helper.ts
|
|
7744
|
+
var screenComputedPresent = (id, screenComputeds, functions, inputs) => {
|
|
7745
|
+
const computed = screenComputeds?.[id];
|
|
7746
|
+
const fn = computed ? screenComputedFunction(computed, functions ?? {}) : void 0;
|
|
7747
|
+
if (!computed || !fn) return false;
|
|
7748
|
+
if (fn.returnUndefined === true || returnCardinalityOf(fn) !== "one") {
|
|
7749
|
+
return false;
|
|
7750
|
+
}
|
|
7751
|
+
return !screenComputedIsOptional(
|
|
7752
|
+
computed,
|
|
7753
|
+
fn,
|
|
7754
|
+
inputs ?? {},
|
|
7755
|
+
screenComputeds ?? {},
|
|
7756
|
+
functions ?? {}
|
|
7757
|
+
);
|
|
7758
|
+
};
|
|
7532
7759
|
var USER_VALUE_SLOTS = [
|
|
7533
7760
|
BINDING_SLOT.id,
|
|
7534
7761
|
BINDING_SLOT.firstName,
|
|
@@ -8839,8 +9066,8 @@ var rootShapeId = (binding, scope, seen) => {
|
|
|
8839
9066
|
return scope.formModels?.[root.id]?.formId;
|
|
8840
9067
|
}
|
|
8841
9068
|
if (root.kind === "computed") {
|
|
8842
|
-
const
|
|
8843
|
-
const returnType =
|
|
9069
|
+
const computed = scope.computeds?.[root.id];
|
|
9070
|
+
const returnType = computed ? stateComputedFunction(computed, scope.functions ?? {})?.returnType : void 0;
|
|
8844
9071
|
if (returnType?.type === "shape") return returnType.shapeId;
|
|
8845
9072
|
const folded = scope.properties?.[root.id]?.dataType;
|
|
8846
9073
|
return folded?.type === "shape" ? folded.shapeId : void 0;
|
|
@@ -8908,7 +9135,7 @@ var bindingCardinality = (binding, scope, seen = /* @__PURE__ */ new Set()) => {
|
|
|
8908
9135
|
}
|
|
8909
9136
|
case "computed": {
|
|
8910
9137
|
const computed = scope.computeds?.[root.id];
|
|
8911
|
-
const fn = computed ? scope.functions
|
|
9138
|
+
const fn = computed ? stateComputedFunction(computed, scope.functions ?? {}) : void 0;
|
|
8912
9139
|
const folded = fn ? void 0 : scope.properties?.[root.id];
|
|
8913
9140
|
dataType = fn?.returnType ?? folded?.dataType;
|
|
8914
9141
|
cardinality = fn ? returnCardinalityOf(fn) : folded?.cardinality;
|
|
@@ -12914,40 +13141,40 @@ var isMenuActionSlotComplete = (slot) => slot.checks.length > 0 && slot.checks.e
|
|
|
12914
13141
|
var menuActionSlot = (control, slotId) => menuActionSlots(control).find((slot) => slot.id === slotId);
|
|
12915
13142
|
var menuActionCheckLabel = (check) => isUnaryMenuActionOperator(check.operator) ? `${check.member} ${check.operator.replace("_", " ")}` : `${check.member} ${check.operator} ${(check.value ?? "").trim()}`;
|
|
12916
13143
|
var menuActionSummary = (slot) => slot.checks.map(menuActionCheckLabel).join(" and ");
|
|
12917
|
-
var withSlots = (control,
|
|
13144
|
+
var withSlots = (control, slots2) => ({
|
|
12918
13145
|
...control,
|
|
12919
|
-
menuActions:
|
|
13146
|
+
menuActions: slots2.length ? slots2 : void 0
|
|
12920
13147
|
});
|
|
12921
13148
|
function mintMenuActionSlot(control) {
|
|
12922
13149
|
const slotId = genId();
|
|
12923
|
-
const
|
|
12924
|
-
return { control: withSlots(control,
|
|
13150
|
+
const slots2 = [...menuActionSlots(control), { id: slotId, checks: [] }];
|
|
13151
|
+
return { control: withSlots(control, slots2), slotId };
|
|
12925
13152
|
}
|
|
12926
13153
|
function setMenuActionChecks(control, slotId, checks) {
|
|
12927
|
-
const
|
|
12928
|
-
if (!
|
|
13154
|
+
const slots2 = menuActionSlots(control);
|
|
13155
|
+
if (!slots2.some((slot) => slot.id === slotId)) return control;
|
|
12929
13156
|
return withSlots(
|
|
12930
13157
|
control,
|
|
12931
|
-
|
|
13158
|
+
slots2.map((slot) => slot.id === slotId ? { ...slot, checks } : slot)
|
|
12932
13159
|
);
|
|
12933
13160
|
}
|
|
12934
13161
|
function moveMenuActionSlot(control, slotId, delta) {
|
|
12935
|
-
const
|
|
12936
|
-
const from =
|
|
13162
|
+
const slots2 = menuActionSlots(control);
|
|
13163
|
+
const from = slots2.findIndex((slot) => slot.id === slotId);
|
|
12937
13164
|
if (from < 0) return control;
|
|
12938
|
-
const to = Math.min(Math.max(from + delta, 0),
|
|
13165
|
+
const to = Math.min(Math.max(from + delta, 0), slots2.length - 1);
|
|
12939
13166
|
if (to === from) return control;
|
|
12940
|
-
const next = [...
|
|
13167
|
+
const next = [...slots2];
|
|
12941
13168
|
const [moved] = next.splice(from, 1);
|
|
12942
13169
|
next.splice(to, 0, moved);
|
|
12943
13170
|
return withSlots(control, next);
|
|
12944
13171
|
}
|
|
12945
13172
|
function removeMenuActionSlot(control, slotId) {
|
|
12946
|
-
const
|
|
12947
|
-
if (!
|
|
13173
|
+
const slots2 = menuActionSlots(control);
|
|
13174
|
+
if (!slots2.some((slot) => slot.id === slotId)) return control;
|
|
12948
13175
|
const dropped = withSlots(
|
|
12949
13176
|
control,
|
|
12950
|
-
|
|
13177
|
+
slots2.filter((slot) => slot.id !== slotId)
|
|
12951
13178
|
);
|
|
12952
13179
|
return clearOutputGroupRows(dropped, menuActionKey(slotId));
|
|
12953
13180
|
}
|
|
@@ -12955,9 +13182,9 @@ function renameMenuItemId(control, from, to) {
|
|
|
12955
13182
|
const before = from.trim();
|
|
12956
13183
|
const after = to.trim();
|
|
12957
13184
|
if (!before || !after || before === after) return control;
|
|
12958
|
-
const
|
|
13185
|
+
const slots2 = menuActionSlots(control);
|
|
12959
13186
|
let touched = false;
|
|
12960
|
-
const next =
|
|
13187
|
+
const next = slots2.map((slot) => {
|
|
12961
13188
|
if (!namesItem(slot, before)) return slot;
|
|
12962
13189
|
touched = true;
|
|
12963
13190
|
return {
|
|
@@ -13195,7 +13422,7 @@ function methodArgs(method, op) {
|
|
|
13195
13422
|
out.push({
|
|
13196
13423
|
name: param.name,
|
|
13197
13424
|
dataType: param.dataType,
|
|
13198
|
-
cardinality: "one",
|
|
13425
|
+
cardinality: param.cardinality ?? "one",
|
|
13199
13426
|
shapes: {},
|
|
13200
13427
|
optional: !param.required
|
|
13201
13428
|
});
|
|
@@ -13213,7 +13440,7 @@ function argSubjectType(method, op, arg) {
|
|
|
13213
13440
|
);
|
|
13214
13441
|
}
|
|
13215
13442
|
const param = (method.params ?? []).find((one) => one.name === arg);
|
|
13216
|
-
return param ? { dataType: param.dataType, cardinality: "one" } : void 0;
|
|
13443
|
+
return param ? { dataType: param.dataType, cardinality: param.cardinality ?? "one" } : void 0;
|
|
13217
13444
|
}
|
|
13218
13445
|
function methodSignature(args) {
|
|
13219
13446
|
if (!args.length) return "f()";
|
|
@@ -13475,7 +13702,7 @@ function authoredArgs(method) {
|
|
|
13475
13702
|
out.push({
|
|
13476
13703
|
name: param.name,
|
|
13477
13704
|
dataType: param.dataType,
|
|
13478
|
-
cardinality: "one",
|
|
13705
|
+
cardinality: param.cardinality ?? "one",
|
|
13479
13706
|
shapes: {},
|
|
13480
13707
|
optional: !param.required
|
|
13481
13708
|
});
|
|
@@ -15235,6 +15462,65 @@ var createCompute = () => ({
|
|
|
15235
15462
|
functionId: "",
|
|
15236
15463
|
args: {}
|
|
15237
15464
|
});
|
|
15465
|
+
function oneArgHeld(binding, compute, method, args, functions, properties, shapes) {
|
|
15466
|
+
if (binding.source === "fixed") return void 0;
|
|
15467
|
+
if (binding.source === "compute") {
|
|
15468
|
+
const computes = method.computes ?? [];
|
|
15469
|
+
if (!computeReadable(computes, compute.id, binding.name)) return void 0;
|
|
15470
|
+
const earlier = computeFunction(
|
|
15471
|
+
computes.find(
|
|
15472
|
+
(candidate) => candidate.name.trim() === binding.name.trim()
|
|
15473
|
+
),
|
|
15474
|
+
functions
|
|
15475
|
+
);
|
|
15476
|
+
return earlier ? { dataType: earlier.returnType, cardinality: earlier.returnCardinality } : void 0;
|
|
15477
|
+
}
|
|
15478
|
+
const read = argValue2(binding, args, properties, shapes);
|
|
15479
|
+
return read?.value.dataType ? { dataType: read.value.dataType, cardinality: read.value.cardinality } : void 0;
|
|
15480
|
+
}
|
|
15481
|
+
function computeOneReturns(compute, method, args, functions, properties, shapes) {
|
|
15482
|
+
const entry2 = computeOneFunction(compute);
|
|
15483
|
+
const binding = entry2 && compute.args[entry2.rowParamId];
|
|
15484
|
+
const held = binding && oneArgHeld(binding, compute, method, args, functions, properties, shapes);
|
|
15485
|
+
return held ? oneFunctionReturns(entry2, held.dataType, held.cardinality) : void 0;
|
|
15486
|
+
}
|
|
15487
|
+
function oneComputeError(compute, method, args, functions, properties, shapes) {
|
|
15488
|
+
const entry2 = computeOneFunction(compute);
|
|
15489
|
+
if (!entry2 || !compute.returns) return "emit-gap-call-compute-function";
|
|
15490
|
+
for (const param of entry2.params) {
|
|
15491
|
+
const binding = compute.args[param.id];
|
|
15492
|
+
if (!binding) return "emit-gap-call-compute-args";
|
|
15493
|
+
if (binding.source === "fixed") {
|
|
15494
|
+
if (!oneParamFixedHeld(param, binding.value)) {
|
|
15495
|
+
return "emit-gap-call-compute-type";
|
|
15496
|
+
}
|
|
15497
|
+
continue;
|
|
15498
|
+
}
|
|
15499
|
+
const held = oneArgHeld(
|
|
15500
|
+
binding,
|
|
15501
|
+
compute,
|
|
15502
|
+
method,
|
|
15503
|
+
args,
|
|
15504
|
+
functions,
|
|
15505
|
+
properties,
|
|
15506
|
+
shapes
|
|
15507
|
+
);
|
|
15508
|
+
if (!held) return "emit-gap-call-compute-args";
|
|
15509
|
+
if (!oneFunctionArgFits(param, held, binding.source === "store")) {
|
|
15510
|
+
return "emit-gap-call-compute-type";
|
|
15511
|
+
}
|
|
15512
|
+
}
|
|
15513
|
+
const expected = computeOneReturns(
|
|
15514
|
+
compute,
|
|
15515
|
+
method,
|
|
15516
|
+
args,
|
|
15517
|
+
functions,
|
|
15518
|
+
properties,
|
|
15519
|
+
shapes
|
|
15520
|
+
);
|
|
15521
|
+
const stored = compute.returns;
|
|
15522
|
+
return expected && JSON.stringify(expected.dataType) === JSON.stringify(stored.dataType) && expected.cardinality === stored.cardinality && !!expected.optional === !!stored.optional ? void 0 : "emit-gap-call-compute-type";
|
|
15523
|
+
}
|
|
15238
15524
|
function computeNameTaken(method, name3, args, ownId) {
|
|
15239
15525
|
const wanted = name3.trim();
|
|
15240
15526
|
if (!wanted) return false;
|
|
@@ -15268,6 +15554,16 @@ function computeError(compute, method, args, functions, properties, shapes) {
|
|
|
15268
15554
|
if (computeNameTaken(method, compute.name, args, compute.id)) {
|
|
15269
15555
|
return "emit-gap-call-compute-name";
|
|
15270
15556
|
}
|
|
15557
|
+
if (compute.oneFunction) {
|
|
15558
|
+
return oneComputeError(
|
|
15559
|
+
compute,
|
|
15560
|
+
method,
|
|
15561
|
+
args,
|
|
15562
|
+
functions,
|
|
15563
|
+
properties,
|
|
15564
|
+
shapes
|
|
15565
|
+
);
|
|
15566
|
+
}
|
|
15271
15567
|
const fn = functions[compute.functionId];
|
|
15272
15568
|
if (!fn) return "emit-gap-call-compute-function";
|
|
15273
15569
|
const computes = method.computes ?? [];
|
|
@@ -15291,7 +15587,7 @@ function computeError(compute, method, args, functions, properties, shapes) {
|
|
|
15291
15587
|
const earlier = computes.find(
|
|
15292
15588
|
(candidate) => candidate.name.trim() === binding.name.trim()
|
|
15293
15589
|
);
|
|
15294
|
-
const earlierFn = earlier
|
|
15590
|
+
const earlierFn = computeFunction(earlier, functions);
|
|
15295
15591
|
if (!earlierFn) return "emit-gap-call-compute-args";
|
|
15296
15592
|
if (!dataTypeFits(
|
|
15297
15593
|
{
|
|
@@ -15355,7 +15651,7 @@ function computeMemberRead(fn, member, shapes) {
|
|
|
15355
15651
|
function computeTextPaths(computes, functions, shapes) {
|
|
15356
15652
|
const out = [];
|
|
15357
15653
|
for (const compute of computes) {
|
|
15358
|
-
const fn = functions
|
|
15654
|
+
const fn = computeFunction(compute, functions);
|
|
15359
15655
|
const name3 = compute.name.trim();
|
|
15360
15656
|
if (!fn || !name3 || fn.returnCardinality !== "one") continue;
|
|
15361
15657
|
if (fn.returnType.type !== "shape") {
|
|
@@ -15386,7 +15682,7 @@ function computeTextPaths(computes, functions, shapes) {
|
|
|
15386
15682
|
function computeInputPaths(computes, functions, shapes) {
|
|
15387
15683
|
const out = [];
|
|
15388
15684
|
for (const compute of computes) {
|
|
15389
|
-
const fn = functions
|
|
15685
|
+
const fn = computeFunction(compute, functions);
|
|
15390
15686
|
const name3 = compute.name.trim();
|
|
15391
15687
|
if (!fn || !name3) continue;
|
|
15392
15688
|
const walk = (member, label, dataType, cardinality, seen) => {
|
|
@@ -15415,7 +15711,7 @@ function computeInputMemberError(method, functions, shapes) {
|
|
|
15415
15711
|
const compute = (method.computes ?? []).find(
|
|
15416
15712
|
(c) => c.name === mapping.compute
|
|
15417
15713
|
);
|
|
15418
|
-
const fn = compute
|
|
15714
|
+
const fn = computeFunction(compute, functions);
|
|
15419
15715
|
if (!fn || !computeMemberRead(fn, mapping.member, shapes)) {
|
|
15420
15716
|
return "input-incomplete";
|
|
15421
15717
|
}
|
|
@@ -15433,6 +15729,13 @@ function computeIsRead(method, name3) {
|
|
|
15433
15729
|
)) {
|
|
15434
15730
|
return true;
|
|
15435
15731
|
}
|
|
15732
|
+
if ((method.conditions ?? []).some(
|
|
15733
|
+
(condition) => condition.kind === "check" ? condition.check?.source === "compute" && condition.check.compute === wanted : Object.values(condition.args).some(
|
|
15734
|
+
(binding) => binding.source === "compute" && binding.name === wanted
|
|
15735
|
+
)
|
|
15736
|
+
)) {
|
|
15737
|
+
return true;
|
|
15738
|
+
}
|
|
15436
15739
|
return (method.computes ?? []).some(
|
|
15437
15740
|
(compute) => Object.values(compute.args).some(
|
|
15438
15741
|
(binding) => binding.source === "compute" && binding.name === wanted
|
|
@@ -15510,7 +15813,7 @@ function variantCheckType(check, method, op, roots, shapes, functions) {
|
|
|
15510
15813
|
const compute = (method.computes ?? []).find(
|
|
15511
15814
|
(one) => one.name === check.compute
|
|
15512
15815
|
);
|
|
15513
|
-
const fn = compute
|
|
15816
|
+
const fn = computeFunction(compute, functions);
|
|
15514
15817
|
return fn ? { dataType: fn.returnType, cardinality: fn.returnCardinality } : void 0;
|
|
15515
15818
|
}
|
|
15516
15819
|
return responsePathAt(
|
|
@@ -15599,21 +15902,37 @@ function conditionFunction(condition, functions) {
|
|
|
15599
15902
|
return functions[condition.functionId];
|
|
15600
15903
|
}
|
|
15601
15904
|
var answersBoolean = (fn) => fn.returnType.type === "boolean" && fn.returnCardinality === "one";
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15905
|
+
var conditionArgValue = (binding, args, properties, shapes, computes, functions) => {
|
|
15906
|
+
if (binding.source !== "compute") {
|
|
15907
|
+
return argValue2(binding, args, properties, shapes);
|
|
15908
|
+
}
|
|
15909
|
+
const fn = computeFunction(
|
|
15910
|
+
computes.find((compute) => compute.name.trim() === binding.name.trim()),
|
|
15911
|
+
functions
|
|
15912
|
+
);
|
|
15913
|
+
return fn ? {
|
|
15914
|
+
value: { dataType: fn.returnType, cardinality: fn.returnCardinality },
|
|
15607
15915
|
shapes
|
|
15608
|
-
|
|
15916
|
+
} : void 0;
|
|
15917
|
+
};
|
|
15918
|
+
function conditionCheckType(check, args, properties, shapes, computes = [], functions = {}) {
|
|
15919
|
+
const binding = check.source === "args" ? check.arg ? { source: "args", arg: check.arg } : void 0 : check.source === "compute" ? check.compute ? { source: "compute", name: check.compute } : void 0 : check.path?.length ? { source: "store", path: check.path } : void 0;
|
|
15920
|
+
const read = binding ? conditionArgValue(binding, args, properties, shapes, computes, functions) : void 0;
|
|
15609
15921
|
return read ? {
|
|
15610
15922
|
dataType: read.value.dataType ?? { type: "string" },
|
|
15611
15923
|
cardinality: read.value.cardinality
|
|
15612
15924
|
} : void 0;
|
|
15613
15925
|
}
|
|
15614
|
-
function checkError2(check, args, properties, shapes) {
|
|
15926
|
+
function checkError2(check, args, properties, shapes, computes, functions) {
|
|
15615
15927
|
if (!check) return "condition-check-subject";
|
|
15616
|
-
const type = conditionCheckType(
|
|
15928
|
+
const type = conditionCheckType(
|
|
15929
|
+
check,
|
|
15930
|
+
args,
|
|
15931
|
+
properties,
|
|
15932
|
+
shapes,
|
|
15933
|
+
computes,
|
|
15934
|
+
functions
|
|
15935
|
+
);
|
|
15617
15936
|
if (!type) return "condition-check-subject";
|
|
15618
15937
|
if (!variantCheckOperators(type).includes(check.operator)) {
|
|
15619
15938
|
return "condition-check-operator";
|
|
@@ -15621,9 +15940,17 @@ function checkError2(check, args, properties, shapes) {
|
|
|
15621
15940
|
if (isUnaryOperator(check.operator)) return void 0;
|
|
15622
15941
|
return validateLiteral(check.value ?? "", type.dataType, type.cardinality) ? "condition-check-value" : void 0;
|
|
15623
15942
|
}
|
|
15624
|
-
function conditionError(condition, args, functions, properties, shapes) {
|
|
15943
|
+
function conditionError(condition, args, functions, properties, shapes, computes = []) {
|
|
15944
|
+
const valueOf = (binding) => conditionArgValue(binding, args, properties, shapes, computes, functions);
|
|
15625
15945
|
if (conditionKind(condition) === "check") {
|
|
15626
|
-
return checkError2(
|
|
15946
|
+
return checkError2(
|
|
15947
|
+
condition.check,
|
|
15948
|
+
args,
|
|
15949
|
+
properties,
|
|
15950
|
+
shapes,
|
|
15951
|
+
computes,
|
|
15952
|
+
functions
|
|
15953
|
+
);
|
|
15627
15954
|
}
|
|
15628
15955
|
const entry2 = condition.oneFunction ? oneFunctionOf(condition.oneFunction) : void 0;
|
|
15629
15956
|
if (condition.oneFunction) {
|
|
@@ -15633,11 +15960,10 @@ function conditionError(condition, args, functions, properties, shapes) {
|
|
|
15633
15960
|
const binding = condition.args[param.id];
|
|
15634
15961
|
if (!binding) return "condition-args";
|
|
15635
15962
|
if (binding.source === "fixed") {
|
|
15636
|
-
if (param
|
|
15637
|
-
return "condition-type";
|
|
15963
|
+
if (!oneParamFixedHeld(param, binding.value)) return "condition-type";
|
|
15638
15964
|
continue;
|
|
15639
15965
|
}
|
|
15640
|
-
const read =
|
|
15966
|
+
const read = valueOf(binding);
|
|
15641
15967
|
if (!read) return "condition-args";
|
|
15642
15968
|
const held = read.value.dataType ? { dataType: read.value.dataType, cardinality: read.value.cardinality } : void 0;
|
|
15643
15969
|
if (!oneFunctionArgFits(param, held, binding.source === "store"))
|
|
@@ -15661,7 +15987,7 @@ function conditionError(condition, args, functions, properties, shapes) {
|
|
|
15661
15987
|
if (invalid) return "condition-type";
|
|
15662
15988
|
continue;
|
|
15663
15989
|
}
|
|
15664
|
-
const read =
|
|
15990
|
+
const read = valueOf(binding);
|
|
15665
15991
|
if (!read) return "condition-args";
|
|
15666
15992
|
if (!dataTypeFits(
|
|
15667
15993
|
read.value,
|
|
@@ -15674,9 +16000,22 @@ function conditionError(condition, args, functions, properties, shapes) {
|
|
|
15674
16000
|
}
|
|
15675
16001
|
return void 0;
|
|
15676
16002
|
}
|
|
15677
|
-
var drawnConditions = (method, args, functions, properties, shapes) =>
|
|
15678
|
-
|
|
15679
|
-
)
|
|
16003
|
+
var drawnConditions = (method, args, functions, properties, shapes) => {
|
|
16004
|
+
const computes = drawnComputes(method, args, functions, properties, shapes);
|
|
16005
|
+
return (method.conditions ?? []).filter(
|
|
16006
|
+
(condition) => !conditionError(condition, args, functions, properties, shapes, computes)
|
|
16007
|
+
);
|
|
16008
|
+
};
|
|
16009
|
+
var conditionReadsCompute = (condition, name3) => {
|
|
16010
|
+
const wanted = name3.trim();
|
|
16011
|
+
if (!wanted) return false;
|
|
16012
|
+
if (conditionKind(condition) === "check") {
|
|
16013
|
+
return condition.check?.source === "compute" && condition.check.compute?.trim() === wanted;
|
|
16014
|
+
}
|
|
16015
|
+
return Object.values(condition.args).some(
|
|
16016
|
+
(binding) => binding.source === "compute" && binding.name.trim() === wanted
|
|
16017
|
+
);
|
|
16018
|
+
};
|
|
15680
16019
|
|
|
15681
16020
|
// libs/codegen/src/lib/translation-asset-helper.ts
|
|
15682
16021
|
var SOURCE_LANG = "en";
|
|
@@ -16030,7 +16369,7 @@ var refReaches = (button, buttonChain, form, controls) => {
|
|
|
16030
16369
|
const buttonSide = armChildOf(scope.id, button, controls);
|
|
16031
16370
|
return !!formSide && !!buttonSide && projectionSlotOf(formSide) === projectionSlotOf(buttonSide);
|
|
16032
16371
|
};
|
|
16033
|
-
var
|
|
16372
|
+
var formQueryReaches = (form, controls) => ![form, ...ancestors(form, controls)].some(
|
|
16034
16373
|
(node) => isRepeatFamily(node.type) || node.type === "content" /* CONTENT */
|
|
16035
16374
|
);
|
|
16036
16375
|
var accessTo = (button, form, controls) => {
|
|
@@ -16040,7 +16379,7 @@ var accessTo = (button, form, controls) => {
|
|
|
16040
16379
|
...ancestors(button, controls).map((parent) => parent.id)
|
|
16041
16380
|
]);
|
|
16042
16381
|
if (refReaches(button, buttonChain, form, controls)) return "ref";
|
|
16043
|
-
return
|
|
16382
|
+
return formQueryReaches(form, controls) ? "query" : void 0;
|
|
16044
16383
|
};
|
|
16045
16384
|
function submitTargetForms(button, controls) {
|
|
16046
16385
|
if (!canNameSubmitTarget(button, controls)) return [];
|
|
@@ -16100,7 +16439,8 @@ function hasCallOutcome(outcome) {
|
|
|
16100
16439
|
return OUTCOME_ARMS.some((arm) => armHasRows(outcome?.[arm]));
|
|
16101
16440
|
}
|
|
16102
16441
|
function armHasRows(arm) {
|
|
16103
|
-
return !!(arm?.writes?.length || arm?.screenWrites?.length ||
|
|
16442
|
+
return !!(arm?.writes?.length || arm?.screenWrites?.length || // An arm that only tells the host something happened is an arm (ADR 0143).
|
|
16443
|
+
arm?.emits?.length || arm?.formResets?.length || arm?.closesOverlay || arm?.nav || isOutcomeReportDrawn(arm?.report) || arm?.dialog);
|
|
16104
16444
|
}
|
|
16105
16445
|
function denialDialogOf(arm) {
|
|
16106
16446
|
const dialog = arm?.dialog;
|
|
@@ -16109,17 +16449,46 @@ function denialDialogOf(arm) {
|
|
|
16109
16449
|
function setArmDialog(arm, dialog) {
|
|
16110
16450
|
return { ...arm ?? {}, dialog };
|
|
16111
16451
|
}
|
|
16112
|
-
function
|
|
16113
|
-
return Object.values(
|
|
16114
|
-
|
|
16115
|
-
|
|
16452
|
+
function controlWireOutcomes(control) {
|
|
16453
|
+
return Object.values(control.outputOpens ?? {}).flatMap(
|
|
16454
|
+
(open) => Object.values(open?.outputs ?? {}).map((wire) => ({
|
|
16455
|
+
methodId: wire?.binding?.methodId,
|
|
16456
|
+
outcome: wire?.outcome
|
|
16457
|
+
}))
|
|
16458
|
+
);
|
|
16459
|
+
}
|
|
16460
|
+
function classCallOutcomes(sites) {
|
|
16461
|
+
return [
|
|
16462
|
+
...Object.values(sites.methods ?? {}).flatMap(
|
|
16463
|
+
(handler) => screenMethodCalls(handler).map((one) => ({
|
|
16464
|
+
methodId: one.methodId,
|
|
16465
|
+
outcome: one.outcome
|
|
16466
|
+
}))
|
|
16467
|
+
),
|
|
16468
|
+
...(sites.autoCalls ?? []).map((call) => ({
|
|
16469
|
+
methodId: call.methodId,
|
|
16470
|
+
outcome: call.outcome
|
|
16471
|
+
}))
|
|
16472
|
+
];
|
|
16473
|
+
}
|
|
16474
|
+
function denialTranslationKeys(controls, sites = []) {
|
|
16475
|
+
return [
|
|
16476
|
+
...Object.values(controls).flatMap((control) => [
|
|
16477
|
+
...Object.values(control.outputOutcomes ?? {}),
|
|
16478
|
+
...controlWireOutcomes(control).map((entry2) => entry2.outcome)
|
|
16479
|
+
]),
|
|
16480
|
+
...sites.flatMap(
|
|
16481
|
+
(site) => classCallOutcomes(site).map((entry2) => entry2.outcome)
|
|
16482
|
+
)
|
|
16483
|
+
].flatMap((outcome) => {
|
|
16116
16484
|
const dialog = outcome?.denied?.dialog;
|
|
16117
16485
|
return dialog ? [dialog.header, dialog.body, dialog.confirmLabel] : [];
|
|
16118
16486
|
}).filter((value) => !!value && !!value.trim()).map((value) => parseLabelValue(value).key).filter((key2) => !!key2);
|
|
16119
16487
|
}
|
|
16120
16488
|
function controlDrawsDenial(control) {
|
|
16121
16489
|
return [
|
|
16122
|
-
...Object.values(control.outputOutcomes ?? {})
|
|
16490
|
+
...Object.values(control.outputOutcomes ?? {}),
|
|
16491
|
+
...controlWireOutcomes(control).map((entry2) => entry2.outcome)
|
|
16123
16492
|
].some((outcome) => armHasRows(outcome?.denied));
|
|
16124
16493
|
}
|
|
16125
16494
|
function isOutcomeReportDrawn(report) {
|
|
@@ -16242,7 +16611,34 @@ function repairCallOutcome(controls, outcome, constantIds = /* @__PURE__ */ new
|
|
|
16242
16611
|
}
|
|
16243
16612
|
return moved ? repaired : void 0;
|
|
16244
16613
|
}
|
|
16245
|
-
function
|
|
16614
|
+
function repairClassCallSites(controls, sites) {
|
|
16615
|
+
let moved = false;
|
|
16616
|
+
const fix = (outcome) => {
|
|
16617
|
+
if (!outcome) return void 0;
|
|
16618
|
+
const next = repairCallOutcome(controls, outcome);
|
|
16619
|
+
if (!next) return outcome;
|
|
16620
|
+
moved = true;
|
|
16621
|
+
return hasCallOutcome(next) ? next : void 0;
|
|
16622
|
+
};
|
|
16623
|
+
const strip = (entry2) => {
|
|
16624
|
+
const outcome = fix(entry2.outcome);
|
|
16625
|
+
if (outcome === entry2.outcome) return entry2;
|
|
16626
|
+
const { outcome: _drop, ...rest } = entry2;
|
|
16627
|
+
return outcome ? { ...rest, outcome } : rest;
|
|
16628
|
+
};
|
|
16629
|
+
const methods = sites.methods ? Object.fromEntries(
|
|
16630
|
+
Object.entries(sites.methods).map(([id, handler]) => {
|
|
16631
|
+
const own = strip(handler);
|
|
16632
|
+
return [
|
|
16633
|
+
id,
|
|
16634
|
+
handler.calls ? { ...own, calls: handler.calls.map(strip) } : own
|
|
16635
|
+
];
|
|
16636
|
+
})
|
|
16637
|
+
) : void 0;
|
|
16638
|
+
const autoCalls = sites.autoCalls?.map(strip);
|
|
16639
|
+
return moved ? { methods, autoCalls } : void 0;
|
|
16640
|
+
}
|
|
16641
|
+
function methodArms(controlMaps, sites = []) {
|
|
16246
16642
|
const arms = {};
|
|
16247
16643
|
const mark = (methodId, outcome) => {
|
|
16248
16644
|
if (!methodId) return;
|
|
@@ -16260,6 +16656,14 @@ function methodArms(controlMaps) {
|
|
|
16260
16656
|
)) {
|
|
16261
16657
|
mark(control.outputs?.[output], outcome);
|
|
16262
16658
|
}
|
|
16659
|
+
for (const { methodId, outcome } of controlWireOutcomes(control)) {
|
|
16660
|
+
if (outcome) mark(methodId, outcome);
|
|
16661
|
+
}
|
|
16662
|
+
}
|
|
16663
|
+
}
|
|
16664
|
+
for (const site of sites) {
|
|
16665
|
+
for (const { methodId, outcome } of classCallOutcomes(site)) {
|
|
16666
|
+
if (outcome) mark(methodId, outcome);
|
|
16263
16667
|
}
|
|
16264
16668
|
}
|
|
16265
16669
|
return arms;
|
|
@@ -16574,7 +16978,7 @@ function mappingExpression(mapping, target, properties, shapes, functions, compu
|
|
|
16574
16978
|
if (mapping.source === "args") source = `${mapping.arg}`;
|
|
16575
16979
|
else if (mapping.source === "compute") {
|
|
16576
16980
|
const compute = computes.find((c) => c.name === mapping.compute);
|
|
16577
|
-
const fn = compute
|
|
16981
|
+
const fn = computeFunction(compute, functions);
|
|
16578
16982
|
const absent = !!fn?.returnUndefined;
|
|
16579
16983
|
const waits = absent && target.required;
|
|
16580
16984
|
source = `compute.${mapping.compute}`;
|
|
@@ -16821,11 +17225,13 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
|
|
|
16821
17225
|
functions
|
|
16822
17226
|
);
|
|
16823
17227
|
if (!fn) return void 0;
|
|
16824
|
-
const
|
|
17228
|
+
const one = oneFunctionOf(mapping.transform.oneFunction);
|
|
17229
|
+
const typeArgs = one && !one.spell ? `<${spell(
|
|
16825
17230
|
property.dataType,
|
|
16826
|
-
property.cardinality
|
|
17231
|
+
oneFunctionLiftedAt(one, property.cardinality) ? "many" : "one"
|
|
16827
17232
|
)}>` : "";
|
|
16828
|
-
if (mapping.transform.oneFunction
|
|
17233
|
+
if (mapping.transform.oneFunction && !one?.spell)
|
|
17234
|
+
oneFunctionNames.add(fn.name);
|
|
16829
17235
|
const args = mapping.transform.args.map((binding, index) => {
|
|
16830
17236
|
if (binding.source === "response") {
|
|
16831
17237
|
return binding.path.length ? {
|
|
@@ -16884,7 +17290,10 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
|
|
|
16884
17290
|
}
|
|
16885
17291
|
locals.set(index, local);
|
|
16886
17292
|
});
|
|
16887
|
-
const
|
|
17293
|
+
const argExpressions = args.map(
|
|
17294
|
+
(arg, index) => locals.get(index) ?? arg.expression
|
|
17295
|
+
);
|
|
17296
|
+
const call = one?.spell ? one.spell(argExpressions) : `${fn.name}${typeArgs}(${argExpressions.join(", ")})`;
|
|
16888
17297
|
if (!locals.size) return { receiver, key: property.name, value: call };
|
|
16889
17298
|
const guard = [...new Set(locals.values())].map((local) => `${local} === undefined`).join(" || ");
|
|
16890
17299
|
const passTerms = [...new Set(locals.values())].map(
|
|
@@ -17627,79 +18036,10 @@ ${failureArms.map(
|
|
|
17627
18036
|
const guardHead = guardArgs.size ? `(${guardReceiver}): ${guardReceiver} is ${argObjectType(true)} =>` : "() =>";
|
|
17628
18037
|
const guardBlock = guards.length ? `
|
|
17629
18038
|
filter(${guardHead} ${guards.join(" && ")}),` : "";
|
|
17630
|
-
|
|
17631
|
-
const
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
functions,
|
|
17635
|
-
roots,
|
|
17636
|
-
shapes
|
|
17637
|
-
).map((condition) => {
|
|
17638
|
-
const check = condition.check;
|
|
17639
|
-
if (conditionKind(condition) === "check" && check) {
|
|
17640
|
-
const type = conditionCheckType(check, args, roots, shapes);
|
|
17641
|
-
if (check.source === "args") {
|
|
17642
|
-
conditionReadsArgs = true;
|
|
17643
|
-
return generateVariantCheckExpression(
|
|
17644
|
-
check,
|
|
17645
|
-
`${guardReceiver}.${check.arg}`,
|
|
17646
|
-
type,
|
|
17647
|
-
!!args.find((arg) => arg.name === check.arg)?.optional
|
|
17648
|
-
);
|
|
17649
|
-
}
|
|
17650
|
-
return generateVariantCheckExpression(
|
|
17651
|
-
check,
|
|
17652
|
-
statePathExpression(
|
|
17653
|
-
check.path ?? [],
|
|
17654
|
-
roots,
|
|
17655
|
-
shapes,
|
|
17656
|
-
false,
|
|
17657
|
-
receiverOf
|
|
17658
|
-
),
|
|
17659
|
-
type,
|
|
17660
|
-
true
|
|
17661
|
-
);
|
|
17662
|
-
}
|
|
17663
|
-
const fn = conditionFunction(condition, functions);
|
|
17664
|
-
if (condition.oneFunction && fn) oneFunctionNames.add(fn.name);
|
|
17665
|
-
const waits = [];
|
|
17666
|
-
const callArgs2 = (fn?.params ?? []).map((param) => {
|
|
17667
|
-
const binding = condition.args[param.id];
|
|
17668
|
-
if (!binding) return "undefined";
|
|
17669
|
-
if (binding.source === "fixed") {
|
|
17670
|
-
return literalExpression(String(binding.value), param.dataType);
|
|
17671
|
-
}
|
|
17672
|
-
if (binding.source === "args") {
|
|
17673
|
-
conditionReadsArgs = true;
|
|
17674
|
-
const read2 = `${guardReceiver}.${binding.arg}`;
|
|
17675
|
-
if (!requiredArgs.has(binding.arg) && !param.acceptsUndefined) {
|
|
17676
|
-
waits.push(`${read2} !== undefined`);
|
|
17677
|
-
}
|
|
17678
|
-
return read2;
|
|
17679
|
-
}
|
|
17680
|
-
const held = statePathValue(binding.path, roots, shapes);
|
|
17681
|
-
const read = statePathExpression(
|
|
17682
|
-
binding.path,
|
|
17683
|
-
roots,
|
|
17684
|
-
shapes,
|
|
17685
|
-
false,
|
|
17686
|
-
receiverOf
|
|
17687
|
-
);
|
|
17688
|
-
if (held?.cardinality === "many") return `${read} ?? []`;
|
|
17689
|
-
if (isMapCardinality(held?.cardinality)) return `${read} ?? {}`;
|
|
17690
|
-
if (param.acceptsUndefined) return read;
|
|
17691
|
-
waits.push(`${read} !== undefined`);
|
|
17692
|
-
return statePathExpression(binding.path, roots, shapes, true, receiverOf);
|
|
17693
|
-
});
|
|
17694
|
-
const negate = condition.oneFunction && condition.negate ? "!" : "";
|
|
17695
|
-
return [
|
|
17696
|
-
...Array.from(new Set(waits)),
|
|
17697
|
-
`${negate}${fn?.name}(${callArgs2.join(", ")})`
|
|
17698
|
-
].join(" && ");
|
|
17699
|
-
});
|
|
17700
|
-
const conditionBlock = conditions.length ? `
|
|
17701
|
-
filter(${conditionReadsArgs ? guardReceiver : "()"} => ${conditions.join(" && ")}),` : "";
|
|
17702
|
-
const readsCompute = (name3) => method.inputs.some((m) => m.source === "compute" && m.compute === name3) || method.response.some(
|
|
18039
|
+
const drawnConds = drawnConditions(method, args, functions, roots, shapes);
|
|
18040
|
+
const readsCompute = (name3) => drawnConds.some(
|
|
18041
|
+
(condition) => conditionReadsCompute(condition, name3)
|
|
18042
|
+
) || method.inputs.some((m) => m.source === "compute" && m.compute === name3) || method.response.some(
|
|
17703
18043
|
(mapping) => (mapping.transform?.args ?? []).some(
|
|
17704
18044
|
(binding) => binding.source === "compute" && binding.name === name3
|
|
17705
18045
|
)
|
|
@@ -17741,7 +18081,8 @@ ${failureArms.map(
|
|
|
17741
18081
|
const computeGuards = [];
|
|
17742
18082
|
let computeGuardsReadArgs = false;
|
|
17743
18083
|
const computeLines = computes.map((compute) => {
|
|
17744
|
-
const fn = functions
|
|
18084
|
+
const fn = computeFunction(compute, functions);
|
|
18085
|
+
if (compute.oneFunction && fn) oneFunctionNames.add(fn.name);
|
|
17745
18086
|
const callArgs2 = (fn?.params ?? []).map((param) => {
|
|
17746
18087
|
const binding = compute.args[param.id];
|
|
17747
18088
|
if (!binding) return "undefined";
|
|
@@ -17788,6 +18129,104 @@ ${computeLines.map((line) => ` ${line}`).join("\n")}
|
|
|
17788
18129
|
return { ${args.length ? `...${guardReceiver}, ` : ""}compute: { ${computes.map((compute) => compute.name).join(", ")} } };
|
|
17789
18130
|
}),` : "";
|
|
17790
18131
|
if (computes.length) emitsMap = true;
|
|
18132
|
+
let conditionReadsArgs = false;
|
|
18133
|
+
const conditions = drawnConds.map((condition) => {
|
|
18134
|
+
const check = condition.check;
|
|
18135
|
+
if (conditionKind(condition) === "check" && check) {
|
|
18136
|
+
const type = conditionCheckType(
|
|
18137
|
+
check,
|
|
18138
|
+
args,
|
|
18139
|
+
roots,
|
|
18140
|
+
shapes,
|
|
18141
|
+
computes,
|
|
18142
|
+
functions
|
|
18143
|
+
);
|
|
18144
|
+
if (check.source === "compute") {
|
|
18145
|
+
conditionReadsArgs = true;
|
|
18146
|
+
const fn2 = computeFunction(
|
|
18147
|
+
computes.find((compute) => compute.name === check.compute),
|
|
18148
|
+
functions
|
|
18149
|
+
);
|
|
18150
|
+
return generateVariantCheckExpression(
|
|
18151
|
+
check,
|
|
18152
|
+
`${guardReceiver}.${COMPUTE_BAG}.${check.compute}`,
|
|
18153
|
+
type,
|
|
18154
|
+
!!fn2?.returnUndefined
|
|
18155
|
+
);
|
|
18156
|
+
}
|
|
18157
|
+
if (check.source === "args") {
|
|
18158
|
+
conditionReadsArgs = true;
|
|
18159
|
+
return generateVariantCheckExpression(
|
|
18160
|
+
check,
|
|
18161
|
+
`${guardReceiver}.${check.arg}`,
|
|
18162
|
+
type,
|
|
18163
|
+
!!args.find((arg) => arg.name === check.arg)?.optional
|
|
18164
|
+
);
|
|
18165
|
+
}
|
|
18166
|
+
return generateVariantCheckExpression(
|
|
18167
|
+
check,
|
|
18168
|
+
statePathExpression(
|
|
18169
|
+
check.path ?? [],
|
|
18170
|
+
roots,
|
|
18171
|
+
shapes,
|
|
18172
|
+
false,
|
|
18173
|
+
receiverOf
|
|
18174
|
+
),
|
|
18175
|
+
type,
|
|
18176
|
+
true
|
|
18177
|
+
);
|
|
18178
|
+
}
|
|
18179
|
+
const fn = conditionFunction(condition, functions);
|
|
18180
|
+
if (condition.oneFunction && fn) oneFunctionNames.add(fn.name);
|
|
18181
|
+
const waits = [];
|
|
18182
|
+
const callArgs2 = (fn?.params ?? []).map((param) => {
|
|
18183
|
+
const binding = condition.args[param.id];
|
|
18184
|
+
if (!binding) return "undefined";
|
|
18185
|
+
if (binding.source === "fixed") {
|
|
18186
|
+
return literalExpression(String(binding.value), param.dataType);
|
|
18187
|
+
}
|
|
18188
|
+
if (binding.source === "compute") {
|
|
18189
|
+
conditionReadsArgs = true;
|
|
18190
|
+
const read2 = `${guardReceiver}.${COMPUTE_BAG}.${binding.name}`;
|
|
18191
|
+
const held2 = computeFunction(
|
|
18192
|
+
computes.find((compute) => compute.name === binding.name),
|
|
18193
|
+
functions
|
|
18194
|
+
);
|
|
18195
|
+
if (held2?.returnUndefined && !param.acceptsUndefined) {
|
|
18196
|
+
waits.push(`${read2} !== undefined`);
|
|
18197
|
+
}
|
|
18198
|
+
return read2;
|
|
18199
|
+
}
|
|
18200
|
+
if (binding.source === "args") {
|
|
18201
|
+
conditionReadsArgs = true;
|
|
18202
|
+
const read2 = `${guardReceiver}.${binding.arg}`;
|
|
18203
|
+
if (!requiredArgs.has(binding.arg) && !param.acceptsUndefined) {
|
|
18204
|
+
waits.push(`${read2} !== undefined`);
|
|
18205
|
+
}
|
|
18206
|
+
return read2;
|
|
18207
|
+
}
|
|
18208
|
+
const held = statePathValue(binding.path, roots, shapes);
|
|
18209
|
+
const read = statePathExpression(
|
|
18210
|
+
binding.path,
|
|
18211
|
+
roots,
|
|
18212
|
+
shapes,
|
|
18213
|
+
false,
|
|
18214
|
+
receiverOf
|
|
18215
|
+
);
|
|
18216
|
+
if (held?.cardinality === "many") return `${read} ?? []`;
|
|
18217
|
+
if (isMapCardinality(held?.cardinality)) return `${read} ?? {}`;
|
|
18218
|
+
if (param.acceptsUndefined) return read;
|
|
18219
|
+
waits.push(`${read} !== undefined`);
|
|
18220
|
+
return statePathExpression(binding.path, roots, shapes, true, receiverOf);
|
|
18221
|
+
});
|
|
18222
|
+
const negate = condition.oneFunction && condition.negate ? "!" : "";
|
|
18223
|
+
return [
|
|
18224
|
+
...Array.from(new Set(waits)),
|
|
18225
|
+
`${negate}${fn?.name}(${callArgs2.join(", ")})`
|
|
18226
|
+
].join(" && ");
|
|
18227
|
+
});
|
|
18228
|
+
const conditionBlock = conditions.length ? `
|
|
18229
|
+
filter(${conditionReadsArgs ? guardReceiver : "()"} => ${conditions.join(" && ")}),` : "";
|
|
17791
18230
|
const computeValueGuards = method.inputs.flatMap((mapping) => {
|
|
17792
18231
|
if (mapping.source !== "compute" || !mapping.compute) return [];
|
|
17793
18232
|
const target = targets.find(
|
|
@@ -17795,7 +18234,7 @@ ${computeLines.map((line) => ` ${line}`).join("\n")}
|
|
|
17795
18234
|
);
|
|
17796
18235
|
if (!target) return [];
|
|
17797
18236
|
const compute = computes.find((c) => c.name === mapping.compute);
|
|
17798
|
-
const fn = compute
|
|
18237
|
+
const fn = computeFunction(compute, functions);
|
|
17799
18238
|
if (!fn?.returnUndefined) return [];
|
|
17800
18239
|
const read = `${COMPUTE_BAG}.${mapping.compute}`;
|
|
17801
18240
|
return [
|
|
@@ -17811,7 +18250,7 @@ ${computeLines.map((line) => ` ${line}`).join("\n")}
|
|
|
17811
18250
|
for (const [slot, binding] of Object.entries(confirm?.params ?? {})) {
|
|
17812
18251
|
if (binding.source === "compute") {
|
|
17813
18252
|
const compute = computes.find((c) => c.name === binding.name);
|
|
17814
|
-
const fn = compute
|
|
18253
|
+
const fn = computeFunction(compute, functions);
|
|
17815
18254
|
if (!fn) continue;
|
|
17816
18255
|
const member = computeMemberRead(fn, binding.member, shapes);
|
|
17817
18256
|
if (!member) continue;
|
|
@@ -17928,7 +18367,7 @@ ${beforePersists.map((line) => ` ${line}`).join("\n")}
|
|
|
17928
18367
|
// ends — `finalize` fires on success, on error and when a later call
|
|
17929
18368
|
// replaces it, so the wait never outlives the request (ADR 0139).
|
|
17930
18369
|
` ${method.name}: rxMethod<${argType}>(
|
|
17931
|
-
pipe(${debounceBlock}${guardBlock}${
|
|
18370
|
+
pipe(${debounceBlock}${guardBlock}${computeGuardBlock}${computeBlock}${conditionBlock}${computeValueGuardBlock}${confirmBlock}${beforeBlock}
|
|
17932
18371
|
switchMap(${callArgName} => {${settleOnly ? `
|
|
17933
18372
|
const { onSent, onSettled } = (input || {}) as { ${SETTLE_MEMBERS.join("; ")} };` : ""}
|
|
17934
18373
|
onSent?.();
|
|
@@ -17939,7 +18378,7 @@ ${beforePersists.map((line) => ` ${line}`).join("\n")}
|
|
|
17939
18378
|
)
|
|
17940
18379
|
),`
|
|
17941
18380
|
) : ` ${method.name}: rxMethod<${argType}>(
|
|
17942
|
-
pipe(${debounceBlock}${guardBlock}${
|
|
18381
|
+
pipe(${debounceBlock}${guardBlock}${computeGuardBlock}${computeBlock}${conditionBlock}${computeValueGuardBlock}${confirmBlock}${beforeBlock}
|
|
17943
18382
|
switchMap(${callArgName} =>
|
|
17944
18383
|
${apiCall}.pipe(${tapBlock}${catchBlock}
|
|
17945
18384
|
)
|
|
@@ -20415,8 +20854,9 @@ function limitSources(scope) {
|
|
|
20415
20854
|
});
|
|
20416
20855
|
});
|
|
20417
20856
|
Object.values(scope.computeds ?? {}).forEach((computed) => {
|
|
20418
|
-
const fn = functions[computed.functionId];
|
|
20419
|
-
|
|
20857
|
+
const fn = computed.functionId ? functions[computed.functionId] : void 0;
|
|
20858
|
+
const held = fn ? { dataType: fn.returnType, cardinality: returnCardinalityOf(fn) } : computed.returns;
|
|
20859
|
+
if (held && isNumberScalar(held.dataType, held.cardinality))
|
|
20420
20860
|
add({
|
|
20421
20861
|
id: computed.id,
|
|
20422
20862
|
name: computed.name,
|
|
@@ -22217,7 +22657,7 @@ function renderBranch(node, indent2, names, methods, operationOf, storeProp, ctx
|
|
|
22217
22657
|
return render(chain[0].arm.childrens, indent2).join("\n");
|
|
22218
22658
|
}
|
|
22219
22659
|
const pad2 = " ".repeat(indent2);
|
|
22220
|
-
const
|
|
22660
|
+
const slots2 = branchSlots(chain.map((entry2) => entry2.arm));
|
|
22221
22661
|
const chainFor = (slot) => {
|
|
22222
22662
|
const lines = [];
|
|
22223
22663
|
chain.forEach((entry2, index) => {
|
|
@@ -22243,7 +22683,7 @@ function renderBranch(node, indent2, names, methods, operationOf, storeProp, ctx
|
|
|
22243
22683
|
lines.push(`${pad2}}`);
|
|
22244
22684
|
return lines.join("\n");
|
|
22245
22685
|
};
|
|
22246
|
-
return
|
|
22686
|
+
return slots2.map(chainFor).join("\n");
|
|
22247
22687
|
}
|
|
22248
22688
|
function branchSlots(arms) {
|
|
22249
22689
|
const named = /* @__PURE__ */ new Set();
|
|
@@ -22502,10 +22942,10 @@ var optionsGapReason = (binding, ctx, storeProp) => {
|
|
|
22502
22942
|
function bindingGapComments(node, ctx, storeProp, pad2) {
|
|
22503
22943
|
const bindings = ctx.controlMap?.[node.id]?.bindings;
|
|
22504
22944
|
if (!bindings) return "";
|
|
22505
|
-
const
|
|
22506
|
-
if (!
|
|
22945
|
+
const slots2 = attrBindingSlots(node.type);
|
|
22946
|
+
if (!slots2.length) return "";
|
|
22507
22947
|
const scope = bindingScope(ctx, storeProp);
|
|
22508
|
-
return
|
|
22948
|
+
return slots2.map((slot) => {
|
|
22509
22949
|
const binding = bindings[slot];
|
|
22510
22950
|
if (!binding) return "";
|
|
22511
22951
|
const reason = slot === BINDING_SLOT.options && node.type !== "context_menu" /* CONTEXT_MENU */ ? optionsGapReason(binding, ctx, storeProp) : bindingGapReason(binding, scope);
|
|
@@ -22643,7 +23083,7 @@ var boundCardinality = (binding, ctx) => {
|
|
|
22643
23083
|
}
|
|
22644
23084
|
case "computed": {
|
|
22645
23085
|
const computed = ctx.computeds?.[binding.root.id];
|
|
22646
|
-
const fn = computed ? ctx.functions
|
|
23086
|
+
const fn = computed ? stateComputedFunction(computed, ctx.functions ?? {}) : void 0;
|
|
22647
23087
|
dataType = fn?.returnType;
|
|
22648
23088
|
cardinality = fn ? returnCardinalityOf(fn) : void 0;
|
|
22649
23089
|
break;
|
|
@@ -22927,7 +23367,7 @@ function tagAttrs(node, ctx, storeProp) {
|
|
|
22927
23367
|
}
|
|
22928
23368
|
if (node.type === "form" /* FORM */) {
|
|
22929
23369
|
const member = validationMemberFor(node, ctx);
|
|
22930
|
-
const ref = formRefNames(ctx.controlMap ?? {}).get(node.id);
|
|
23370
|
+
const ref = formRefNames(ctx.controlMap ?? {}).get(node.id) ?? (classResetForms(ctx).some((form) => form.id === node.id) ? formRefName(node) : void 0);
|
|
22931
23371
|
return `${ref ? ` #${ref}` : ""}${inlineAttrs(node)}${member ? ` [validation]="${member}"` : ""}${boundAttrs(node, ctx, storeProp)}`;
|
|
22932
23372
|
}
|
|
22933
23373
|
const submitReads = submitTargetReads(node, ctx);
|
|
@@ -24308,6 +24748,167 @@ var localBase2 = (binding, scope) => {
|
|
|
24308
24748
|
(segment, index) => index === 0 ? segment.charAt(0).toLowerCase() + segment.slice(1) : segment.charAt(0).toUpperCase() + segment.slice(1)
|
|
24309
24749
|
).join("");
|
|
24310
24750
|
};
|
|
24751
|
+
var resetTargetMember = (form) => `${formRefName(form).replace(/Ref$/, "")}ResetTarget`;
|
|
24752
|
+
function classResetForms(ctx) {
|
|
24753
|
+
const controls = ctx.controlMap ?? {};
|
|
24754
|
+
const outcomes = [
|
|
24755
|
+
...Object.values(ctx.screenMethods ?? {}).flatMap(
|
|
24756
|
+
(handler) => screenMethodCalls(handler).map((one) => one.outcome)
|
|
24757
|
+
),
|
|
24758
|
+
...(ctx.autoCalls ?? []).map((call) => call.outcome),
|
|
24759
|
+
// A wire's arms emit into the class body too, inside the open's callback,
|
|
24760
|
+
// where no template hands a ref in (ADR 0144).
|
|
24761
|
+
...Object.values(controls).flatMap(
|
|
24762
|
+
(control) => controlWireOutcomes(control).map((entry2) => entry2.outcome)
|
|
24763
|
+
)
|
|
24764
|
+
];
|
|
24765
|
+
const forms = /* @__PURE__ */ new Map();
|
|
24766
|
+
for (const outcome of outcomes) {
|
|
24767
|
+
for (const arm of OUTCOME_ARMS) {
|
|
24768
|
+
for (const row of outcome?.[arm]?.formResets ?? []) {
|
|
24769
|
+
const form = controls[row.controlId];
|
|
24770
|
+
if (!form || form.type !== "form" /* FORM */) continue;
|
|
24771
|
+
if (!formQueryReaches(form, controls)) continue;
|
|
24772
|
+
forms.set(form.id, form);
|
|
24773
|
+
}
|
|
24774
|
+
}
|
|
24775
|
+
}
|
|
24776
|
+
return [...forms.values()];
|
|
24777
|
+
}
|
|
24778
|
+
function resetTargetQueriesBlock(ctx) {
|
|
24779
|
+
return classResetForms(ctx).map(
|
|
24780
|
+
(form) => `
|
|
24781
|
+
protected readonly ${resetTargetMember(
|
|
24782
|
+
form
|
|
24783
|
+
)} = viewChild<SectionFormComponent>('${formRefName(form)}');
|
|
24784
|
+
`
|
|
24785
|
+
).join("");
|
|
24786
|
+
}
|
|
24787
|
+
function classArmStatements(arm, rows, ctx, selfStore, constants, reads, argsLocal) {
|
|
24788
|
+
const controls = ctx.controlMap ?? {};
|
|
24789
|
+
const { payload, fieldNames, eventRoot, eventMember } = reads;
|
|
24790
|
+
const resets = (rows.formResets ?? []).filter((row) => {
|
|
24791
|
+
const form = controls[row.controlId];
|
|
24792
|
+
return !!form && form.type === "form" /* FORM */ && formQueryReaches(form, controls);
|
|
24793
|
+
});
|
|
24794
|
+
const clears = resets.map((row) => formResetPropertyId(controls[row.controlId])).filter((propertyId) => !!propertyId).map((propertyId) => ({ propertyId, value: { kind: "clear" } }));
|
|
24795
|
+
const modelClears = resets.flatMap((row) => {
|
|
24796
|
+
const model = formResetModel(row.controlId, ctx.formModels ?? {});
|
|
24797
|
+
if (!model) return [];
|
|
24798
|
+
const keys = formModelShapeKeys(controls, row.controlId).map((key2) => {
|
|
24799
|
+
const type = formModelKeyType(key2);
|
|
24800
|
+
return type ? `${key2.name}: ${formModelKeyZero(type)}` : void 0;
|
|
24801
|
+
}).filter((entry2) => !!entry2);
|
|
24802
|
+
return [`this.${model.name}.set({ ${keys.join(", ")} })`];
|
|
24803
|
+
});
|
|
24804
|
+
const writes = [...rows.writes ?? [], ...clears].filter(
|
|
24805
|
+
(write, index, all) => all.findIndex((other) => other.propertyId === write.propertyId) === index
|
|
24806
|
+
);
|
|
24807
|
+
const statements = [
|
|
24808
|
+
...arm === "denied" ? [denialDialogCall(denialDialogOf(rows))] : [],
|
|
24809
|
+
...screenWriteStatements(
|
|
24810
|
+
ctx.variables ?? {},
|
|
24811
|
+
rows.screenWrites ?? [],
|
|
24812
|
+
payload,
|
|
24813
|
+
fieldNames,
|
|
24814
|
+
ctx.inputs ?? {},
|
|
24815
|
+
constants,
|
|
24816
|
+
eventRoot,
|
|
24817
|
+
"class",
|
|
24818
|
+
eventMember,
|
|
24819
|
+
void 0,
|
|
24820
|
+
ctx.functions ?? {}
|
|
24821
|
+
),
|
|
24822
|
+
...screenEmitStatements(
|
|
24823
|
+
ctx.outputs ?? {},
|
|
24824
|
+
rows.emits ?? [],
|
|
24825
|
+
payload,
|
|
24826
|
+
fieldNames,
|
|
24827
|
+
ctx.inputs ?? {},
|
|
24828
|
+
constants,
|
|
24829
|
+
eventRoot,
|
|
24830
|
+
"class",
|
|
24831
|
+
eventMember,
|
|
24832
|
+
reads.emitBindings
|
|
24833
|
+
)
|
|
24834
|
+
];
|
|
24835
|
+
if (ctx.properties && selfStore) {
|
|
24836
|
+
const patch = stateWritePatchExpression(
|
|
24837
|
+
ctx.properties,
|
|
24838
|
+
writes,
|
|
24839
|
+
payload,
|
|
24840
|
+
fieldNames,
|
|
24841
|
+
ctx.inputs ?? {},
|
|
24842
|
+
selfStore,
|
|
24843
|
+
constants,
|
|
24844
|
+
eventRoot,
|
|
24845
|
+
"class",
|
|
24846
|
+
eventMember,
|
|
24847
|
+
void 0,
|
|
24848
|
+
ctx.functions ?? {}
|
|
24849
|
+
);
|
|
24850
|
+
if (patch) statements.push(patch);
|
|
24851
|
+
}
|
|
24852
|
+
statements.push(...modelClears);
|
|
24853
|
+
for (const row of resets) {
|
|
24854
|
+
if (row.depth === "value") continue;
|
|
24855
|
+
statements.push(
|
|
24856
|
+
`this.${resetTargetMember(controls[row.controlId])}()?.reset()`
|
|
24857
|
+
);
|
|
24858
|
+
}
|
|
24859
|
+
const answer = isOutcomeReportDrawn(rows.report) ? armReportExpr(
|
|
24860
|
+
rows.report,
|
|
24861
|
+
{ id: "" },
|
|
24862
|
+
ctx,
|
|
24863
|
+
selfStore,
|
|
24864
|
+
payload,
|
|
24865
|
+
eventRoot,
|
|
24866
|
+
(path) => payload === "void" ? void 0 : path.length ? eventMember ? eventMember(path, `$event?.${path.join("?.")}`, eventRoot) : `$event?.${path.join("?.")}` : eventRoot
|
|
24867
|
+
) : void 0;
|
|
24868
|
+
if (rows.closesOverlay) {
|
|
24869
|
+
statements.push(`${OVERLAY_REF_MEMBER}?.close(${answer ?? "undefined"})`);
|
|
24870
|
+
} else if (answer) {
|
|
24871
|
+
statements.push(`${OVERLAY_REF_MEMBER}?.change(${answer})`);
|
|
24872
|
+
}
|
|
24873
|
+
const linkRead = outputLinkRead(ctx, selfStore.replace(/^this\./, ""));
|
|
24874
|
+
const nav = outcomeNavStatement(
|
|
24875
|
+
rows.nav,
|
|
24876
|
+
ctx.navMap ?? {},
|
|
24877
|
+
(arg) => arg.source === "args" ? argsLocal ? `${argsLocal}.${arg.arg.join("?.")}` : void 0 : linkRead(arg)
|
|
24878
|
+
);
|
|
24879
|
+
if (nav) statements.push(nav);
|
|
24880
|
+
return statements;
|
|
24881
|
+
}
|
|
24882
|
+
function classOutcomeCall(callee, args, method, outcome, ctx, selfStore, constants, reads, argsLocalName, indent2) {
|
|
24883
|
+
if (!method || (method.kind ?? "http") !== "http" || !hasCallOutcome(outcome))
|
|
24884
|
+
return [`${callee}(${args})`];
|
|
24885
|
+
const argsLocal = outcomeReadsArgs(outcome) && args && args !== "{}" ? argsLocalName : void 0;
|
|
24886
|
+
const callbacks = OUTCOME_ARMS.map((arm) => {
|
|
24887
|
+
const rows = outcome?.[arm];
|
|
24888
|
+
if (!rows || !armHasRows(rows)) return "";
|
|
24889
|
+
const lines = classArmStatements(
|
|
24890
|
+
arm,
|
|
24891
|
+
rows,
|
|
24892
|
+
ctx,
|
|
24893
|
+
selfStore,
|
|
24894
|
+
constants,
|
|
24895
|
+
reads,
|
|
24896
|
+
argsLocal
|
|
24897
|
+
);
|
|
24898
|
+
if (!lines.length) return "";
|
|
24899
|
+
return `${ARM_CALLBACK[arm]}: ${armParams(arm)} => {
|
|
24900
|
+
${lines.map((line) => `${indent2.line}${line};`).join("\n")}
|
|
24901
|
+
${indent2.close}}`;
|
|
24902
|
+
}).filter(Boolean);
|
|
24903
|
+
if (!callbacks.length) return [`${callee}(${args})`];
|
|
24904
|
+
return [
|
|
24905
|
+
...argsLocal ? [`const ${argsLocal} = ${args}`] : [],
|
|
24906
|
+
`${callee}({ ${[
|
|
24907
|
+
...argsLocal ? [`...${argsLocal}`] : args && args !== "{}" ? [spreadArgs(args)] : [],
|
|
24908
|
+
...callbacks
|
|
24909
|
+
].join(", ")} })`
|
|
24910
|
+
];
|
|
24911
|
+
}
|
|
24311
24912
|
function screenMethodsBlock(screenMethods, methods, operationOf, storeProp, ctx, constants) {
|
|
24312
24913
|
const declared = Object.values(screenMethods).sort(
|
|
24313
24914
|
(a, b) => a.name.localeCompare(b.name)
|
|
@@ -24418,9 +25019,29 @@ function screenMethodsBlock(screenMethods, methods, operationOf, storeProp, ctx,
|
|
|
24418
25019
|
statements.push(`const ${local} = ${expr}`);
|
|
24419
25020
|
}
|
|
24420
25021
|
const tested = read.filter(([, local]) => hoists.guarded.has(local));
|
|
25022
|
+
const fired = classOutcomeCall(
|
|
25023
|
+
call.callee,
|
|
25024
|
+
args,
|
|
25025
|
+
method,
|
|
25026
|
+
one.outcome,
|
|
25027
|
+
ctx,
|
|
25028
|
+
selfStore,
|
|
25029
|
+
constants,
|
|
25030
|
+
{
|
|
25031
|
+
payload,
|
|
25032
|
+
fieldNames,
|
|
25033
|
+
eventRoot,
|
|
25034
|
+
eventMember: screenMethodParamRead
|
|
25035
|
+
},
|
|
25036
|
+
mintLocal2("callArgs", taken),
|
|
25037
|
+
several && tested.length ? { line: " ", close: " " } : { line: " ", close: " " }
|
|
25038
|
+
);
|
|
24421
25039
|
if (tested.length && several) {
|
|
25040
|
+
const test = tested.map(([, local]) => `${local} !== undefined`).join(" && ");
|
|
24422
25041
|
statements.push(
|
|
24423
|
-
`if (${
|
|
25042
|
+
fired.length === 1 ? `if (${test}) ${fired[0]}` : `if (${test}) {
|
|
25043
|
+
${fired.map((line) => ` ${line};`).join("\n")}
|
|
25044
|
+
}`
|
|
24424
25045
|
);
|
|
24425
25046
|
} else {
|
|
24426
25047
|
if (tested.length) {
|
|
@@ -24428,7 +25049,7 @@ function screenMethodsBlock(screenMethods, methods, operationOf, storeProp, ctx,
|
|
|
24428
25049
|
`if (${tested.map(([, local]) => `${local} === undefined`).join(" || ")}) return`
|
|
24429
25050
|
);
|
|
24430
25051
|
}
|
|
24431
|
-
statements.push(
|
|
25052
|
+
statements.push(...fired);
|
|
24432
25053
|
}
|
|
24433
25054
|
}
|
|
24434
25055
|
}
|
|
@@ -24596,7 +25217,34 @@ function overlayOutputEmits(open, ref, node, output, ctx, storeProp, methods, op
|
|
|
24596
25217
|
"class"
|
|
24597
25218
|
);
|
|
24598
25219
|
if (patch) lines.push(patch);
|
|
24599
|
-
|
|
25220
|
+
wireBindings(wire).forEach((binding, index) => {
|
|
25221
|
+
if (!index && wire.binding && hasCallOutcome(wire.outcome)) {
|
|
25222
|
+
const parts = wireCallParts(
|
|
25223
|
+
binding,
|
|
25224
|
+
key2,
|
|
25225
|
+
payload,
|
|
25226
|
+
methods,
|
|
25227
|
+
operationOf,
|
|
25228
|
+
storeProp,
|
|
25229
|
+
ctx
|
|
25230
|
+
);
|
|
25231
|
+
if (!parts) return;
|
|
25232
|
+
lines.push(
|
|
25233
|
+
...classOutcomeCall(
|
|
25234
|
+
`${storeProp ? `this.${storeProp}` : ""}.${parts.method.name}`,
|
|
25235
|
+
parts.args,
|
|
25236
|
+
parts.method,
|
|
25237
|
+
wire.outcome,
|
|
25238
|
+
ctx,
|
|
25239
|
+
storeProp ? `this.${storeProp}` : "",
|
|
25240
|
+
ctx.constants ?? {},
|
|
25241
|
+
{ payload, fieldNames: [], eventRoot: "$event" },
|
|
25242
|
+
"callArgs",
|
|
25243
|
+
{ line: " ", close: " " }
|
|
25244
|
+
)
|
|
25245
|
+
);
|
|
25246
|
+
return;
|
|
25247
|
+
}
|
|
24600
25248
|
const call = wireCall(
|
|
24601
25249
|
binding,
|
|
24602
25250
|
key2,
|
|
@@ -24607,7 +25255,7 @@ function overlayOutputEmits(open, ref, node, output, ctx, storeProp, methods, op
|
|
|
24607
25255
|
ctx
|
|
24608
25256
|
);
|
|
24609
25257
|
if (call) lines.push(call);
|
|
24610
|
-
}
|
|
25258
|
+
});
|
|
24611
25259
|
return [
|
|
24612
25260
|
{
|
|
24613
25261
|
name: target.name,
|
|
@@ -25178,13 +25826,13 @@ function menuActionHandlersBlock(tree, methods, operationOf, storeProp, ctx, pay
|
|
|
25178
25826
|
walk(node.childrens);
|
|
25179
25827
|
continue;
|
|
25180
25828
|
}
|
|
25181
|
-
const
|
|
25829
|
+
const slots2 = menuActionSlots(node).filter(
|
|
25182
25830
|
isMenuActionSlotComplete
|
|
25183
25831
|
);
|
|
25184
|
-
if (!
|
|
25832
|
+
if (!slots2.length) continue;
|
|
25185
25833
|
const payload = payloadShape(MENU_ACTION_OUTPUT, node.type, node.configs);
|
|
25186
25834
|
const arms = [];
|
|
25187
|
-
for (const slot of
|
|
25835
|
+
for (const slot of slots2) {
|
|
25188
25836
|
const key2 = menuActionKey(slot.id);
|
|
25189
25837
|
const statements = gatedCallSiteStatements(
|
|
25190
25838
|
node,
|
|
@@ -25256,8 +25904,8 @@ function armSubjectExpr(check, node, ctx, storeProp, payload, eventRoot) {
|
|
|
25256
25904
|
const path = (check.event ?? []).filter(Boolean);
|
|
25257
25905
|
return payload !== "record" || !path.length ? eventRoot : `$event?.${path.join("?.")}`;
|
|
25258
25906
|
}
|
|
25259
|
-
function armReportExpr(report, node, ctx, storeProp, payload, eventRoot) {
|
|
25260
|
-
const subject = armSubjectExpr(
|
|
25907
|
+
function armReportExpr(report, node, ctx, storeProp, payload, eventRoot, eventRead) {
|
|
25908
|
+
const subject = eventRead && report.source === "event" ? eventRead((report.event ?? []).filter(Boolean)) : armSubjectExpr(
|
|
25261
25909
|
{ ...report, id: "", operator: "==" },
|
|
25262
25910
|
node,
|
|
25263
25911
|
ctx,
|
|
@@ -25808,7 +26456,7 @@ function methodArgsOf(method, operationOf, ctx) {
|
|
|
25808
26456
|
}
|
|
25809
26457
|
return op ? methodArgs(method, op) : authoredArgs(method);
|
|
25810
26458
|
}
|
|
25811
|
-
function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf, outputs = {}) {
|
|
26459
|
+
function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf, outputs = {}, ctx) {
|
|
25812
26460
|
const byName = new Map(
|
|
25813
26461
|
Object.values(inputs).map((input) => [input.id, input.name])
|
|
25814
26462
|
);
|
|
@@ -25947,7 +26595,23 @@ ${reads.map(([expr, local]) => ` const ${local} = ${expr};`).join("\n")}` :
|
|
|
25947
26595
|
${emits.map((line) => ` ${line};`).join("\n")}
|
|
25948
26596
|
});` : "";
|
|
25949
26597
|
const callLine = method ? `
|
|
25950
|
-
|
|
26598
|
+
${classOutcomeCall(
|
|
26599
|
+
`this.${storePropOf?.(method.id) ?? storeProp}.${method.name}`,
|
|
26600
|
+
args,
|
|
26601
|
+
method,
|
|
26602
|
+
ctx ? call.outcome : void 0,
|
|
26603
|
+
ctx ?? {},
|
|
26604
|
+
storeProp ? `this.${storeProp}` : "",
|
|
26605
|
+
constants,
|
|
26606
|
+
{
|
|
26607
|
+
payload: "void",
|
|
26608
|
+
fieldNames: [],
|
|
26609
|
+
eventRoot: "$event",
|
|
26610
|
+
emitBindings: { scope: bindings.bindingScope ?? {} }
|
|
26611
|
+
},
|
|
26612
|
+
mintLocal2("callArgs", taken),
|
|
26613
|
+
{ line: " ", close: " " }
|
|
26614
|
+
).map((line) => ` ${line};`).join("\n")}` : "";
|
|
25951
26615
|
return `${flagDecl}
|
|
25952
26616
|
private readonly ${member} = effect(() => {${hoists}${guard}${latch}${emitBlock}${callLine}
|
|
25953
26617
|
});
|
|
@@ -26285,7 +26949,10 @@ ${record(" ")}
|
|
|
26285
26949
|
)
|
|
26286
26950
|
).sort();
|
|
26287
26951
|
const levels = computedLevels.map((level) => {
|
|
26288
|
-
const entries = level.map((computed) => ({
|
|
26952
|
+
const entries = level.map((computed) => ({
|
|
26953
|
+
computed,
|
|
26954
|
+
fn: stateComputedFunction(computed, functions)
|
|
26955
|
+
})).filter(
|
|
26289
26956
|
(pair) => !!pair.fn
|
|
26290
26957
|
);
|
|
26291
26958
|
const destructured = Array.from(
|
|
@@ -26381,8 +27048,15 @@ ${lines.join("\n")}
|
|
|
26381
27048
|
...drawn.needsModal ? [MODAL_STORE] : [],
|
|
26382
27049
|
// A `denied` arm's refusal is claimed off the library (api ADR 0005).
|
|
26383
27050
|
...drawn.needsDenial ? ["claimDenial"] : [],
|
|
26384
|
-
// A CallCondition asking a OneFunction (ADR 0202)
|
|
26385
|
-
|
|
27051
|
+
// A CallCondition asking a OneFunction (ADR 0202), and a StateComputed
|
|
27052
|
+
// calling one (ADR 0218) — one name imported once.
|
|
27053
|
+
.../* @__PURE__ */ new Set([
|
|
27054
|
+
...drawn.oneFunctions ?? [],
|
|
27055
|
+
...Object.values(computeds).filter(isOneFunctionStateComputed).flatMap((computed) => {
|
|
27056
|
+
const entry2 = oneFunctionOf(computed.oneFunction);
|
|
27057
|
+
return entry2 && !isNativeOneFunction(entry2) ? [entry2.name] : [];
|
|
27058
|
+
})
|
|
27059
|
+
]),
|
|
26386
27060
|
...hooks.needsStorage || drawn.needsStorage || storageMethods.needsStorage ? [STORAGE_SERVICE] : [],
|
|
26387
27061
|
// What the host's search box is read through, drawn per row the way every
|
|
26388
27062
|
// other source's import is (ADR 0184).
|
|
@@ -26398,7 +27072,9 @@ ${lines.join("\n")}
|
|
|
26398
27072
|
const storageImport = oneImports.length ? `import { ${oneImports.join(", ")} } from '@magmonium/one';
|
|
26399
27073
|
` : "";
|
|
26400
27074
|
const functionImports = Array.from(
|
|
26401
|
-
Object.values(computeds).map(
|
|
27075
|
+
Object.values(computeds).map(
|
|
27076
|
+
(computed) => computed.functionId ? functions[computed.functionId] : void 0
|
|
27077
|
+
).concat((drawn.functionIds ?? []).map((id) => functions[id])).concat(hooks.feedFunctionId ? [functions[hooks.feedFunctionId]] : []).concat(
|
|
26402
27078
|
ruleFunctionImports(
|
|
26403
27079
|
variantList.map((variant) => variant.rule),
|
|
26404
27080
|
rootProperties,
|
|
@@ -27082,7 +27758,29 @@ ${tables.map(
|
|
|
27082
27758
|
ctx,
|
|
27083
27759
|
payloads
|
|
27084
27760
|
);
|
|
27085
|
-
const
|
|
27761
|
+
const screenMethodsBody = screenMethodsBlock(
|
|
27762
|
+
ctx.screenMethods ?? {},
|
|
27763
|
+
methods,
|
|
27764
|
+
operationOf,
|
|
27765
|
+
storeProp,
|
|
27766
|
+
ctx,
|
|
27767
|
+
constants
|
|
27768
|
+
);
|
|
27769
|
+
const autoCallsBody = autoCallsBlock(
|
|
27770
|
+
autoCalls,
|
|
27771
|
+
methods,
|
|
27772
|
+
operationOf,
|
|
27773
|
+
storeProp,
|
|
27774
|
+
ctx.inputs ?? {},
|
|
27775
|
+
constants,
|
|
27776
|
+
ctx.functions ?? {},
|
|
27777
|
+
callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
|
|
27778
|
+
ctx.storePropOf,
|
|
27779
|
+
ctx.outputs ?? {},
|
|
27780
|
+
ctx
|
|
27781
|
+
);
|
|
27782
|
+
const classArmsBody = `${screenMethodsBody}${autoCallsBody}`;
|
|
27783
|
+
const usesModal = `${outputOpenBody}${menuActionHandlersBody}${outputArmHandlersBody}${classArmsBody}`.includes(
|
|
27086
27784
|
"this.modal."
|
|
27087
27785
|
) || Object.values(ctx.controlMap ?? {}).some(controlDrawsDenial);
|
|
27088
27786
|
const drawsOverlayClose = Object.values(ctx.controlMap ?? {}).some(
|
|
@@ -27096,21 +27794,9 @@ ${tables.map(
|
|
|
27096
27794
|
const classReadsNavRef = `${screenVariantsBody}${screenComputedsBody}`.includes(
|
|
27097
27795
|
`${NAV_REF_MEMBER}?.`
|
|
27098
27796
|
);
|
|
27099
|
-
const
|
|
27100
|
-
autoCalls,
|
|
27101
|
-
methods,
|
|
27102
|
-
operationOf,
|
|
27103
|
-
storeProp,
|
|
27104
|
-
ctx.inputs ?? {},
|
|
27105
|
-
constants,
|
|
27106
|
-
ctx.functions ?? {},
|
|
27107
|
-
callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
|
|
27108
|
-
ctx.storePropOf,
|
|
27109
|
-
ctx.outputs ?? {}
|
|
27110
|
-
);
|
|
27111
|
-
const submitTargetQueriesBody = submitTargetQueriesBlock(
|
|
27797
|
+
const submitTargetQueriesBody = `${submitTargetQueriesBlock(
|
|
27112
27798
|
ctx.controlMap ?? {}
|
|
27113
|
-
)
|
|
27799
|
+
)}${resetTargetQueriesBlock(ctx)}`;
|
|
27114
27800
|
const angularCore = [
|
|
27115
27801
|
"ChangeDetectionStrategy",
|
|
27116
27802
|
"Component",
|
|
@@ -27118,7 +27804,7 @@ ${tables.map(
|
|
|
27118
27804
|
...screenComputedsBody || screenVariantsBody || cardsBody || messageParamsBody ? ["computed"] : [],
|
|
27119
27805
|
...autoCalls.length ? ["effect"] : [],
|
|
27120
27806
|
...autoCallsBody.includes("untracked(") ? ["untracked"] : [],
|
|
27121
|
-
...needsStore || usesAuth || injectedGlobalStores.length > 0 || usesModal || drawsOverlayClose || drawsOutcomeNav || classReadsNavRef || `${outputLinkBody}${menuActionHandlersBody}${outputArmHandlersBody}`.includes(
|
|
27807
|
+
...needsStore || usesAuth || injectedGlobalStores.length > 0 || usesModal || drawsOverlayClose || drawsOutcomeNav || classReadsNavRef || `${classArmsBody}${outputOpenBody}`.includes(`${OVERLAY_REF_MEMBER}?.`) || `${classArmsBody}${outputOpenBody}`.includes(`${NAV_REF_MEMBER}?.`) || `${outputLinkBody}${menuActionHandlersBody}${outputArmHandlersBody}`.includes(
|
|
27122
27808
|
`${NAV_REF_MEMBER}?.`
|
|
27123
27809
|
) ? ["inject"] : [],
|
|
27124
27810
|
...inputs.length ? ["input"] : [],
|
|
@@ -27312,7 +27998,7 @@ ${tables.map(
|
|
|
27312
27998
|
const modalBody = usesModal ? `
|
|
27313
27999
|
protected readonly modal = inject(ModalStore);
|
|
27314
28000
|
` : "";
|
|
27315
|
-
const usesOverlayRef = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}`.includes(
|
|
28001
|
+
const usesOverlayRef = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}${classArmsBody}${outputOpenBody}`.includes(
|
|
27316
28002
|
`${OVERLAY_REF_MEMBER}?.`
|
|
27317
28003
|
);
|
|
27318
28004
|
const overlayRefImport = usesOverlayRef ? `import { MODAL_REF } from '@magmonium/one';
|
|
@@ -27320,7 +28006,7 @@ ${tables.map(
|
|
|
27320
28006
|
const overlayRefBody = usesOverlayRef ? `
|
|
27321
28007
|
private readonly overlay = inject(MODAL_REF, { optional: true });
|
|
27322
28008
|
` : "";
|
|
27323
|
-
const usesNavRef = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}${screenVariantsBody}${screenComputedsBody}${outputLinkBody}`.includes(
|
|
28009
|
+
const usesNavRef = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}${screenVariantsBody}${screenComputedsBody}${outputLinkBody}${classArmsBody}${outputOpenBody}`.includes(
|
|
27324
28010
|
`${NAV_REF_MEMBER}?.`
|
|
27325
28011
|
);
|
|
27326
28012
|
const navRefImport = usesNavRef ? `import { NAV_STORE_REF, type NavStoreRef } from '@magmonium/one';
|
|
@@ -27339,7 +28025,7 @@ ${tables.map(
|
|
|
27339
28025
|
})
|
|
27340
28026
|
| null;
|
|
27341
28027
|
` : "";
|
|
27342
|
-
const usesNavRouter = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}${outputLinkBody}`.includes(
|
|
28028
|
+
const usesNavRouter = `${outcomeHandlersBody}${menuActionHandlersBody}${outputArmHandlersBody}${outputLinkBody}${classArmsBody}${outputOpenBody}`.includes(
|
|
27343
28029
|
`${NAV_ROUTER_MEMBER}.`
|
|
27344
28030
|
);
|
|
27345
28031
|
const navRouterImport = usesNavRouter ? `import { ActivatedRoute, Router } from '@angular/router';
|
|
@@ -27349,14 +28035,6 @@ ${tables.map(
|
|
|
27349
28035
|
|
|
27350
28036
|
private readonly navRoute = inject(ActivatedRoute);
|
|
27351
28037
|
` : "";
|
|
27352
|
-
const screenMethodsBody = screenMethodsBlock(
|
|
27353
|
-
ctx.screenMethods ?? {},
|
|
27354
|
-
methods,
|
|
27355
|
-
operationOf,
|
|
27356
|
-
storeProp,
|
|
27357
|
-
ctx,
|
|
27358
|
-
constants
|
|
27359
|
-
);
|
|
27360
28038
|
const payloadsBody = payloadPropsBlock(payloads);
|
|
27361
28039
|
const transformMembersBody = transformMembersBlock(
|
|
27362
28040
|
templateRefs,
|
|
@@ -27748,7 +28426,7 @@ __export(package_exports, {
|
|
|
27748
28426
|
version: () => version
|
|
27749
28427
|
});
|
|
27750
28428
|
var name = "@magmonium/one";
|
|
27751
|
-
var version = "0.4.
|
|
28429
|
+
var version = "0.4.117";
|
|
27752
28430
|
var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
|
|
27753
28431
|
var author = "magmonium";
|
|
27754
28432
|
var license = "MIT";
|
|
@@ -27816,7 +28494,7 @@ __export(package_exports2, {
|
|
|
27816
28494
|
version: () => version2
|
|
27817
28495
|
});
|
|
27818
28496
|
var name2 = "@magmonium/cli";
|
|
27819
|
-
var version2 = "0.8.
|
|
28497
|
+
var version2 = "0.8.29";
|
|
27820
28498
|
var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
|
|
27821
28499
|
var bin = {
|
|
27822
28500
|
"mag-cli": "bin/cli.js"
|
|
@@ -28398,7 +29076,7 @@ function navRowSourceOptions(feature, owner) {
|
|
|
28398
29076
|
const value = owner && storeOwnerValue(owner);
|
|
28399
29077
|
return storesOf(feature).filter((store) => !value || storeOwnerValue(store.owner) === value).flatMap(
|
|
28400
29078
|
(store) => Object.values(store.computeds).filter((computed) => {
|
|
28401
|
-
const fn = feature.functions
|
|
29079
|
+
const fn = stateComputedFunction(computed, feature.functions ?? {});
|
|
28402
29080
|
return !!fn && isNavRowShape(fn.returnType, fn.returnCardinality, feature.shapes);
|
|
28403
29081
|
}).map((computed) => ({
|
|
28404
29082
|
value: computed.id,
|
|
@@ -30433,9 +31111,10 @@ function sanitizeMethods(methods, properties, functions = {}) {
|
|
|
30433
31111
|
(persist) => (persist.sourceKind !== "clear" && persist.sourceKind !== "function" || persist.timing === "before" && persist.shelf === "store") && (persist.sourceKind !== "function" || !!persist.transform) && (persist.sourceKind !== "response" || persist.timing === "after") && (persist.sourceKind !== "state" || !!persist.source.length && !!properties[persist.source[0]]) && (persist.sourceKind !== "args" || !!persist.arg) && (persist.sourceKind !== "fixed" || typeof persist.value === "string") && (persist.shelf === "store" ? persist.sourceKind !== "state" && !!properties[persist.propertyId ?? ""] : !!persist.key.trim())
|
|
30434
31112
|
);
|
|
30435
31113
|
const computes = (Array.isArray(method.computes) ? method.computes : []).filter(
|
|
30436
|
-
(compute) => !!compute && typeof compute.id === "string" && !!compute.id && typeof compute.name === "string" && !!compute.name.trim() && typeof compute.functionId === "string" && !!functions[compute.functionId] && !!compute.args && typeof compute.args === "object"
|
|
30437
|
-
).map((compute) => ({
|
|
31114
|
+
(compute) => !!compute && typeof compute.id === "string" && !!compute.id && typeof compute.name === "string" && !!compute.name.trim() && (compute.oneFunction ? !!computeOneFunction(compute) && !!compute.returns && typeof compute.returns === "object" && !!compute.returns.dataType && typeof compute.returns.cardinality === "string" : typeof compute.functionId === "string" && !!functions[compute.functionId]) && !!compute.args && typeof compute.args === "object"
|
|
31115
|
+
).map(({ oneFunction, returns, ...compute }) => ({
|
|
30438
31116
|
...compute,
|
|
31117
|
+
...oneFunction ? { functionId: "", oneFunction, returns } : {},
|
|
30439
31118
|
args: Object.fromEntries(
|
|
30440
31119
|
Object.entries(compute.args).filter(([, binding]) => {
|
|
30441
31120
|
if (!binding) return false;
|
|
@@ -30476,18 +31155,21 @@ function sanitizeMethods(methods, properties, functions = {}) {
|
|
|
30476
31155
|
if (!binding) return false;
|
|
30477
31156
|
if (binding.source === "args") return !!binding.arg;
|
|
30478
31157
|
if (binding.source === "fixed") return binding.value !== void 0;
|
|
31158
|
+
if (binding.source === "compute")
|
|
31159
|
+
return typeof binding.name === "string" && !!binding.name;
|
|
30479
31160
|
return binding.source === "store" && Array.isArray(binding.path) && !!binding.path.length && !!properties[binding.path[0]];
|
|
30480
31161
|
})
|
|
30481
31162
|
)
|
|
30482
31163
|
});
|
|
30483
31164
|
const conditions = (Array.isArray(method.conditions) ? method.conditions : []).filter(
|
|
30484
|
-
(condition) => !!condition && typeof condition.id === "string" && !!condition.id && (condition.kind === "check" ? !!condition.check && (condition.check.source === "store" || condition.check.source === "args") && RULE_OPERATORS.includes(condition.check.operator) : (typeof condition.oneFunction === "string" ? !!condition.oneFunction : typeof condition.functionId === "string" && !!functions[condition.functionId]) && !!condition.args && typeof condition.args === "object")
|
|
31165
|
+
(condition) => !!condition && typeof condition.id === "string" && !!condition.id && (condition.kind === "check" ? !!condition.check && (condition.check.source === "store" || condition.check.source === "args" || condition.check.source === "compute") && RULE_OPERATORS.includes(condition.check.operator) : (typeof condition.oneFunction === "string" ? !!condition.oneFunction : typeof condition.functionId === "string" && !!functions[condition.functionId]) && !!condition.args && typeof condition.args === "object")
|
|
30485
31166
|
).map((condition) => {
|
|
30486
31167
|
const check = condition.check;
|
|
30487
31168
|
if (condition.kind !== "check" || !check)
|
|
30488
31169
|
return functionCondition(condition);
|
|
30489
31170
|
const path = check.source === "store" && Array.isArray(check.path) && check.path.every((segment) => typeof segment === "string") && !!check.path.length && !!properties[check.path[0]] ? check.path : void 0;
|
|
30490
31171
|
const arg = check.source === "args" && typeof check.arg === "string" ? check.arg : void 0;
|
|
31172
|
+
const compute = check.source === "compute" && typeof check.compute === "string" ? check.compute : void 0;
|
|
30491
31173
|
return {
|
|
30492
31174
|
id: condition.id,
|
|
30493
31175
|
kind: "check",
|
|
@@ -30498,6 +31180,7 @@ function sanitizeMethods(methods, properties, functions = {}) {
|
|
|
30498
31180
|
operator: check.operator,
|
|
30499
31181
|
...path ? { path } : {},
|
|
30500
31182
|
...arg ? { arg } : {},
|
|
31183
|
+
...compute ? { compute } : {},
|
|
30501
31184
|
...typeof check.value === "string" ? { value: check.value } : {}
|
|
30502
31185
|
}
|
|
30503
31186
|
};
|
|
@@ -30534,6 +31217,7 @@ function sanitizeMethods(methods, properties, functions = {}) {
|
|
|
30534
31217
|
id: param.id,
|
|
30535
31218
|
name: param.name.trim(),
|
|
30536
31219
|
dataType: { type: param.dataType.type },
|
|
31220
|
+
...param.cardinality === "many" ? { cardinality: "many" } : {},
|
|
30537
31221
|
// The one axis the User answers for a parameter nothing sends, so the
|
|
30538
31222
|
// load is where it would otherwise be lost silently (GLOSSARY.md
|
|
30539
31223
|
// MethodParam).
|
|
@@ -30857,9 +31541,27 @@ function sanitizeStateComputeds(value, functions, reservedNames) {
|
|
|
30857
31541
|
if (typeof computed.name !== "string" || !isValidPropertyName(computed.name) || taken.has(computed.name)) {
|
|
30858
31542
|
continue;
|
|
30859
31543
|
}
|
|
31544
|
+
const args = computed.args ?? {};
|
|
31545
|
+
const returns = computed.functionId ? void 0 : sanitizeComputedReturns(computed.returns);
|
|
31546
|
+
const oneFunction = !computed.functionId && typeof computed.oneFunction === "string" ? computed.oneFunction : void 0;
|
|
31547
|
+
if (oneFunction && returns) {
|
|
31548
|
+
const stored = {
|
|
31549
|
+
id,
|
|
31550
|
+
name: computed.name,
|
|
31551
|
+
oneFunction,
|
|
31552
|
+
args,
|
|
31553
|
+
returns
|
|
31554
|
+
};
|
|
31555
|
+
const fn2 = stateComputedFunction(stored, {});
|
|
31556
|
+
if (fn2 && fn2.params.some((param) => args[param.id] === void 0)) {
|
|
31557
|
+
continue;
|
|
31558
|
+
}
|
|
31559
|
+
taken.add(computed.name);
|
|
31560
|
+
result[id] = stored;
|
|
31561
|
+
continue;
|
|
31562
|
+
}
|
|
30860
31563
|
const fn = computed.functionId ? functions[computed.functionId] : void 0;
|
|
30861
31564
|
if (!fn) continue;
|
|
30862
|
-
const args = computed.args ?? {};
|
|
30863
31565
|
if (fn.params.some((param) => args[param.id] === void 0)) continue;
|
|
30864
31566
|
taken.add(computed.name);
|
|
30865
31567
|
result[id] = { id, name: computed.name, functionId: fn.id, args };
|
|
@@ -31090,6 +31792,15 @@ function sanitizeStoreHook(value, properties, methods, roots = properties) {
|
|
|
31090
31792
|
if (!reads.length && !writes.length && !calls.length) return void 0;
|
|
31091
31793
|
return { reads, writes, calls };
|
|
31092
31794
|
}
|
|
31795
|
+
function storedCallOutcome(value, methodId) {
|
|
31796
|
+
if (!methodId || !value || typeof value !== "object" || Array.isArray(value))
|
|
31797
|
+
return {};
|
|
31798
|
+
const outcome = value;
|
|
31799
|
+
const arms = ["success", "denied", "failure"].filter(
|
|
31800
|
+
(arm) => !!outcome[arm] && typeof outcome[arm] === "object"
|
|
31801
|
+
);
|
|
31802
|
+
return arms.length ? { outcome: Object.fromEntries(arms.map((arm) => [arm, outcome[arm]])) } : {};
|
|
31803
|
+
}
|
|
31093
31804
|
function sanitizeAutoCalls(calls, kind) {
|
|
31094
31805
|
if (!Array.isArray(calls)) return [];
|
|
31095
31806
|
const result = [];
|
|
@@ -31118,6 +31829,7 @@ function sanitizeAutoCalls(calls, kind) {
|
|
|
31118
31829
|
// Trusted like `args`: a read naming something gone drops at emit and is
|
|
31119
31830
|
// reported as an EmitGap (ADR 0206).
|
|
31120
31831
|
...reads.length ? { reads } : {},
|
|
31832
|
+
...storedCallOutcome(call.outcome, methodId),
|
|
31121
31833
|
// Kept only where it was drawn: an absent `when` is derived from the rows
|
|
31122
31834
|
// by screenAutoCallWhen, so a Screen saved before ADR 0080 loads exactly
|
|
31123
31835
|
// as it emitted then.
|
|
@@ -31147,7 +31859,11 @@ function sanitizeScreenMethods(value, taken) {
|
|
|
31147
31859
|
...Array.isArray(method.params) && method.params.length ? { params: sanitizeScreenMethodParams(method.params) } : {},
|
|
31148
31860
|
// The further calls (GLOSSARY.md OutputCall), each trusted the way the
|
|
31149
31861
|
// handler's own call is: an object, one of the two ids at most.
|
|
31150
|
-
...Array.isArray(method.calls) && method.calls.length ? { calls: sanitizeScreenMethodCalls(method.calls) } : {}
|
|
31862
|
+
...Array.isArray(method.calls) && method.calls.length ? { calls: sanitizeScreenMethodCalls(method.calls) } : {},
|
|
31863
|
+
...storedCallOutcome(
|
|
31864
|
+
method.outcome,
|
|
31865
|
+
typeof method.methodId === "string" ? method.methodId : void 0
|
|
31866
|
+
)
|
|
31151
31867
|
};
|
|
31152
31868
|
}
|
|
31153
31869
|
return result;
|
|
@@ -31155,7 +31871,11 @@ function sanitizeScreenMethods(value, taken) {
|
|
|
31155
31871
|
function sanitizeScreenMethodCalls(value) {
|
|
31156
31872
|
return value.filter((raw) => !!raw && typeof raw === "object").map((call) => ({
|
|
31157
31873
|
...typeof call.methodId === "string" && call.methodId ? { methodId: call.methodId } : typeof call.functionId === "string" && call.functionId ? { functionId: call.functionId } : {},
|
|
31158
|
-
...Array.isArray(call.args) && call.args.length ? { args: call.args } : {}
|
|
31874
|
+
...Array.isArray(call.args) && call.args.length ? { args: call.args } : {},
|
|
31875
|
+
...storedCallOutcome(
|
|
31876
|
+
call.outcome,
|
|
31877
|
+
typeof call.methodId === "string" ? call.methodId : void 0
|
|
31878
|
+
)
|
|
31159
31879
|
}));
|
|
31160
31880
|
}
|
|
31161
31881
|
function sanitizeScreenMethodParams(value) {
|
|
@@ -35699,7 +36419,13 @@ var featureContextOf = (ws, feature) => ({
|
|
|
35699
36419
|
var featureMethodArms = (ws, featureId) => featureId ? methodArms(
|
|
35700
36420
|
ws.screens.filter(
|
|
35701
36421
|
({ meta }) => meta.kind === "feature" && meta.featureId === featureId
|
|
35702
|
-
).map(({ state }) => state.controlMap)
|
|
36422
|
+
).map(({ state }) => state.controlMap),
|
|
36423
|
+
ws.screens.filter(
|
|
36424
|
+
({ meta }) => meta.kind === "feature" && meta.featureId === featureId
|
|
36425
|
+
).map(({ meta }) => ({
|
|
36426
|
+
methods: meta.methods,
|
|
36427
|
+
autoCalls: meta.autoCalls
|
|
36428
|
+
}))
|
|
35703
36429
|
) : {};
|
|
35704
36430
|
var featureUsesBusy = (ws, featureId) => !!featureId && ws.screens.some(
|
|
35705
36431
|
({ meta, state }) => meta.kind === "feature" && meta.featureId === featureId && controlMapUsesBusy(state.controlMap)
|
|
@@ -35986,7 +36712,13 @@ var emitAuthoredAssets = (ws, stringify) => {
|
|
|
35986
36712
|
(feature) => methodConfirmKeys(feature.methods)
|
|
35987
36713
|
),
|
|
35988
36714
|
// A DenialDialog's messages, handed to the dialog the same way.
|
|
35989
|
-
...denialTranslationKeys(
|
|
36715
|
+
...denialTranslationKeys(
|
|
36716
|
+
map,
|
|
36717
|
+
ws.screens.map(({ meta }) => ({
|
|
36718
|
+
methods: meta.methods,
|
|
36719
|
+
autoCalls: meta.autoCalls
|
|
36720
|
+
}))
|
|
36721
|
+
)
|
|
35990
36722
|
]).forEach((asset) => {
|
|
35991
36723
|
files3.push({
|
|
35992
36724
|
path: `mag_assets/${asset.path}`,
|
|
@@ -36494,6 +37226,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36494
37226
|
METHOD_VARIANT_SOURCES,
|
|
36495
37227
|
MIGRATION_FLOOR,
|
|
36496
37228
|
MODAL_STORE,
|
|
37229
|
+
NATIVE_ONE_FUNCTION_SPECS,
|
|
36497
37230
|
NAV_ID_SEP,
|
|
36498
37231
|
NAV_LINK_KINDS,
|
|
36499
37232
|
NAV_PRESENTATIONS,
|
|
@@ -36514,9 +37247,12 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36514
37247
|
ONE_FUNCTIONS,
|
|
36515
37248
|
ONE_FUNCTION_CATALOG,
|
|
36516
37249
|
ONE_FUNCTION_DATA_PARAM,
|
|
37250
|
+
ONE_FUNCTION_IDS_PARAM,
|
|
36517
37251
|
ONE_FUNCTION_ID_PARAM,
|
|
37252
|
+
ONE_FUNCTION_KEY_PARAM,
|
|
36518
37253
|
ONE_FUNCTION_MAP_PARAM,
|
|
36519
37254
|
ONE_FUNCTION_PREFIX,
|
|
37255
|
+
ONE_FUNCTION_SPECS,
|
|
36520
37256
|
ONE_IMPORT_MODULE,
|
|
36521
37257
|
ONE_PACKAGE_VERSION,
|
|
36522
37258
|
OPEN_SCREEN_INPUT_SOURCES,
|
|
@@ -36792,6 +37528,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36792
37528
|
checkedFieldIds,
|
|
36793
37529
|
checksUsingFunction,
|
|
36794
37530
|
childNavId,
|
|
37531
|
+
classCallOutcomes,
|
|
36795
37532
|
classCardScope,
|
|
36796
37533
|
clearOutputCallRows,
|
|
36797
37534
|
clearOutputGroupRows,
|
|
@@ -36827,22 +37564,27 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36827
37564
|
composeFunctionBinding,
|
|
36828
37565
|
composeLabelValue,
|
|
36829
37566
|
computeError,
|
|
37567
|
+
computeFunction,
|
|
36830
37568
|
computeId,
|
|
36831
37569
|
computeInputMemberError,
|
|
36832
37570
|
computeInputPaths,
|
|
36833
37571
|
computeIsRead,
|
|
36834
37572
|
computeMemberRead,
|
|
36835
37573
|
computeNameTaken,
|
|
37574
|
+
computeOneFunction,
|
|
37575
|
+
computeOneReturns,
|
|
36836
37576
|
computeReadable,
|
|
36837
37577
|
computeTextPaths,
|
|
36838
37578
|
computedAsProperty,
|
|
36839
37579
|
computedLocalNames,
|
|
36840
37580
|
computedRootIds,
|
|
37581
|
+
conditionArgValue,
|
|
36841
37582
|
conditionCheckType,
|
|
36842
37583
|
conditionError,
|
|
36843
37584
|
conditionFunction,
|
|
36844
37585
|
conditionId,
|
|
36845
37586
|
conditionKind,
|
|
37587
|
+
conditionReadsCompute,
|
|
36846
37588
|
configurableResponses,
|
|
36847
37589
|
confirmError,
|
|
36848
37590
|
confirmId,
|
|
@@ -36862,6 +37604,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
36862
37604
|
controlUsesOverlayRef,
|
|
36863
37605
|
controlVariantIds,
|
|
36864
37606
|
controlVariants,
|
|
37607
|
+
controlWireOutcomes,
|
|
36865
37608
|
countFormResetReferences,
|
|
36866
37609
|
countIconReferences,
|
|
36867
37610
|
countOptionSetReferences,
|
|
@@ -37053,6 +37796,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
37053
37796
|
formModelSourceType,
|
|
37054
37797
|
formModelStateOptions,
|
|
37055
37798
|
formModelTransforms,
|
|
37799
|
+
formQueryReaches,
|
|
37056
37800
|
formRefName,
|
|
37057
37801
|
formRefNames,
|
|
37058
37802
|
formResetDepths,
|
|
@@ -37236,12 +37980,14 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
37236
37980
|
isMethodInUse,
|
|
37237
37981
|
isMountable,
|
|
37238
37982
|
isMovingScreenEmit,
|
|
37983
|
+
isNativeOneFunction,
|
|
37239
37984
|
isNavAtOrBelow,
|
|
37240
37985
|
isNavInstanceFunction,
|
|
37241
37986
|
isNavRowShape,
|
|
37242
37987
|
isNavVisibilityFunction,
|
|
37243
37988
|
isOnChange,
|
|
37244
37989
|
isOneFunctionComputed,
|
|
37990
|
+
isOneFunctionStateComputed,
|
|
37245
37991
|
isOptionRowShape,
|
|
37246
37992
|
isOrderingMenuActionOperator,
|
|
37247
37993
|
isOrderingOutputArmOperator,
|
|
@@ -37508,12 +38254,21 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
37508
38254
|
normalizeVariantName,
|
|
37509
38255
|
offersOutputArms,
|
|
37510
38256
|
oneFunctionArgFits,
|
|
38257
|
+
oneFunctionBoundSignature,
|
|
38258
|
+
oneFunctionFitsLanding,
|
|
37511
38259
|
oneFunctionFromPickValue,
|
|
38260
|
+
oneFunctionLiftedAt,
|
|
38261
|
+
oneFunctionMintsKey,
|
|
37512
38262
|
oneFunctionOf,
|
|
37513
38263
|
oneFunctionPickValue,
|
|
37514
38264
|
oneFunctionReturns,
|
|
37515
38265
|
oneFunctionSignature,
|
|
37516
38266
|
oneFunctionSignatureText,
|
|
38267
|
+
oneFunctionSiteFits,
|
|
38268
|
+
oneParamFixedHeld,
|
|
38269
|
+
oneParamStatePathOnly,
|
|
38270
|
+
oneParamTakesFixed,
|
|
38271
|
+
oneParamTypeText,
|
|
37517
38272
|
openError,
|
|
37518
38273
|
openId,
|
|
37519
38274
|
openInputAnswered,
|
|
@@ -37716,6 +38471,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
37716
38471
|
renameMenuItemId,
|
|
37717
38472
|
renameScreenMethodParamReads,
|
|
37718
38473
|
repairCallOutcome,
|
|
38474
|
+
repairClassCallSites,
|
|
37719
38475
|
repairFieldCheckSignatures,
|
|
37720
38476
|
repairMarkdownLinkUrls,
|
|
37721
38477
|
repairMessageVariables,
|
|
@@ -37925,6 +38681,7 @@ var HISTORY_SELECTION_KEYS = [
|
|
|
37925
38681
|
starterFunction,
|
|
37926
38682
|
stateComputedArgExpression,
|
|
37927
38683
|
stateComputedArgHeldType,
|
|
38684
|
+
stateComputedFunction,
|
|
37928
38685
|
stateInterfaceName,
|
|
37929
38686
|
statePathHeldType,
|
|
37930
38687
|
statePathRead,
|