@almadar/std 14.26.0 → 14.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  3. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  4. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  5. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  6. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  7. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  8. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  9. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  10. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  11. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  12. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  13. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  14. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  15. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  16. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  17. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  18. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  19. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  20. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  21. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  22. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  23. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  24. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  25. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  26. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  27. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  28. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  29. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  30. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  31. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  32. package/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  33. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  34. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  35. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  36. package/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  37. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  38. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  39. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  40. package/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  45. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  47. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  49. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  50. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  54. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  57. package/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  58. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  59. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  60. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  63. package/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  64. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  65. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  66. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  67. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  68. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  69. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  70. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  71. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  72. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  73. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  74. package/behaviors/registry/core/atoms/std-board.orb +1367 -0
  75. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  76. package/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  77. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  78. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  79. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  80. package/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  81. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  82. package/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  83. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  84. package/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  85. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  86. package/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  87. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  88. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  89. package/dist/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  90. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  91. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  92. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  93. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  94. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  95. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  96. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  97. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  98. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  99. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  100. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  101. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  102. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  103. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  104. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  105. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  106. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  107. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  108. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  109. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  110. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  111. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  112. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  113. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  114. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  115. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  116. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  117. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  118. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  119. package/dist/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  120. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  121. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  122. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  123. package/dist/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  124. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  125. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  126. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  127. package/dist/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  128. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  129. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  130. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  131. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  132. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  133. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  134. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  135. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  136. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  137. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  138. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  139. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  140. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  141. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  142. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  143. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  144. package/dist/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  145. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  146. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  147. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  148. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  149. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  150. package/dist/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  151. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  152. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  153. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  154. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  155. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  156. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  157. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  158. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  159. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  160. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  161. package/dist/behaviors/registry/core/atoms/std-board.orb +1367 -0
  162. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  163. package/dist/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  164. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  165. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  166. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  167. package/dist/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  168. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  169. package/dist/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  170. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  171. package/dist/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  172. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  173. package/dist/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  174. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  175. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-branching-logic",
3
3
  "version": "1.0.0",
4
- "description": "std-branching-logic — survey skip-logic rules. Owns a BranchingRule entity and a manage trait that fetches rules on INIT, lists them via the branching-logic-builder pattern, and persists ADD_RULE / UPDATE_RULE / DELETE_RULE.",
4
+ "description": "std-branching-logic — survey skip-logic rules. Lists rules in `browsing`; opens rule detail in `viewing_single` with Edit / Delete actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "BranchingLogicOrbital",
@@ -59,20 +59,10 @@
59
59
  "linkedEntity": "BranchingRule",
60
60
  "emits": [
61
61
  {
62
- "event": "ADD_RULE",
62
+ "event": "OPEN_RULE",
63
63
  "payloadSchema": [
64
64
  {
65
- "name": "data",
66
- "type": "object",
67
- "required": true
68
- }
69
- ]
70
- },
71
- {
72
- "event": "UPDATE_RULE",
73
- "payloadSchema": [
74
- {
75
- "name": "ruleId",
65
+ "name": "id",
76
66
  "type": "string",
77
67
  "required": true
78
68
  },
@@ -107,58 +97,14 @@
107
97
  {
108
98
  "name": "row.priority",
109
99
  "type": "number"
110
- },
111
- {
112
- "name": "data",
113
- "type": "object",
114
- "required": true
115
100
  }
116
101
  ]
117
102
  },
118
103
  {
119
- "event": "DELETE_RULE",
120
- "payloadSchema": [
121
- {
122
- "name": "ruleId",
123
- "type": "string",
124
- "required": true
125
- },
126
- {
127
- "name": "row.id",
128
- "type": "string",
129
- "required": true
130
- },
131
- {
132
- "name": "row.surveyId",
133
- "type": "string",
134
- "required": true
135
- },
136
- {
137
- "name": "row.sourceQuestionId",
138
- "type": "string",
139
- "required": true
140
- },
141
- {
142
- "name": "row.operator",
143
- "type": "string"
144
- },
145
- {
146
- "name": "row.value",
147
- "type": "string"
148
- },
149
- {
150
- "name": "row.targetQuestionId",
151
- "type": "string",
152
- "required": true
153
- },
154
- {
155
- "name": "row.priority",
156
- "type": "number"
157
- }
158
- ]
104
+ "event": "CLOSE_VIEW"
159
105
  },
160
106
  {
161
- "event": "EDIT",
107
+ "event": "DELETE_RULE",
162
108
  "payloadSchema": [
163
109
  {
164
110
  "name": "id",
@@ -167,49 +113,6 @@
167
113
  }
168
114
  ]
169
115
  },
170
- {
171
- "event": "EDIT_SOURCE",
172
- "payloadSchema": [
173
- {
174
- "name": "value",
175
- "type": "string",
176
- "required": true
177
- }
178
- ]
179
- },
180
- {
181
- "event": "EDIT_OPERATOR",
182
- "payloadSchema": [
183
- {
184
- "name": "value",
185
- "type": "string",
186
- "required": true
187
- }
188
- ]
189
- },
190
- {
191
- "event": "EDIT_VALUE",
192
- "payloadSchema": [
193
- {
194
- "name": "value",
195
- "type": "string",
196
- "required": true
197
- }
198
- ]
199
- },
200
- {
201
- "event": "EDIT_TARGET",
202
- "payloadSchema": [
203
- {
204
- "name": "value",
205
- "type": "string",
206
- "required": true
207
- }
208
- ]
209
- },
210
- {
211
- "event": "CANCEL"
212
- },
213
116
  {
214
117
  "event": "BranchingRuleLoaded",
215
118
  "payloadSchema": [
@@ -231,90 +134,6 @@
231
134
  "type": "string"
232
135
  }
233
136
  ]
234
- },
235
- {
236
- "event": "BranchingRuleAdded",
237
- "payloadSchema": [
238
- {
239
- "name": "row.id",
240
- "type": "string",
241
- "required": true
242
- },
243
- {
244
- "name": "row.surveyId",
245
- "type": "string",
246
- "required": true
247
- },
248
- {
249
- "name": "row.sourceQuestionId",
250
- "type": "string",
251
- "required": true
252
- },
253
- {
254
- "name": "row.operator",
255
- "type": "string"
256
- },
257
- {
258
- "name": "row.value",
259
- "type": "string"
260
- },
261
- {
262
- "name": "row.targetQuestionId",
263
- "type": "string",
264
- "required": true
265
- },
266
- {
267
- "name": "row.priority",
268
- "type": "number"
269
- }
270
- ]
271
- },
272
- {
273
- "event": "BranchingRuleUpdated",
274
- "payloadSchema": [
275
- {
276
- "name": "row.id",
277
- "type": "string",
278
- "required": true
279
- },
280
- {
281
- "name": "row.surveyId",
282
- "type": "string",
283
- "required": true
284
- },
285
- {
286
- "name": "row.sourceQuestionId",
287
- "type": "string",
288
- "required": true
289
- },
290
- {
291
- "name": "row.operator",
292
- "type": "string"
293
- },
294
- {
295
- "name": "row.value",
296
- "type": "string"
297
- },
298
- {
299
- "name": "row.targetQuestionId",
300
- "type": "string",
301
- "required": true
302
- },
303
- {
304
- "name": "row.priority",
305
- "type": "number"
306
- }
307
- ]
308
- },
309
- {
310
- "event": "BranchingRuleDeleted",
311
- "payloadSchema": [
312
- {
313
- "name": "id",
314
- "type": "string",
315
- "required": true
316
- }
317
- ]
318
137
  }
319
138
  ],
320
139
  "stateMachine": {
@@ -327,7 +146,7 @@
327
146
  "name": "browsing"
328
147
  },
329
148
  {
330
- "name": "editing"
149
+ "name": "viewing_single"
331
150
  },
332
151
  {
333
152
  "name": "error"
@@ -363,35 +182,13 @@
363
182
  ]
364
183
  },
365
184
  {
366
- "key": "ADD_RULE",
367
- "name": "Add Rule",
368
- "payloadSchema": [
369
- {
370
- "name": "data",
371
- "type": "object",
372
- "required": true
373
- }
374
- ]
375
- },
376
- {
377
- "key": "EDIT",
378
- "name": "Edit",
185
+ "key": "OPEN_RULE",
186
+ "name": "Open Rule",
379
187
  "payloadSchema": [
380
188
  {
381
189
  "name": "id",
382
190
  "type": "string",
383
191
  "required": true
384
- }
385
- ]
386
- },
387
- {
388
- "key": "DELETE_RULE",
389
- "name": "Delete Rule",
390
- "payloadSchema": [
391
- {
392
- "name": "ruleId",
393
- "type": "string",
394
- "required": true
395
192
  },
396
193
  {
397
194
  "name": "row",
@@ -400,28 +197,8 @@
400
197
  ]
401
198
  },
402
199
  {
403
- "key": "BranchingRuleAdded",
404
- "name": "BranchingRule added",
405
- "payloadSchema": [
406
- {
407
- "name": "row",
408
- "type": "BranchingRule"
409
- }
410
- ]
411
- },
412
- {
413
- "key": "BranchingRuleUpdated",
414
- "name": "BranchingRule updated",
415
- "payloadSchema": [
416
- {
417
- "name": "row",
418
- "type": "BranchingRule"
419
- }
420
- ]
421
- },
422
- {
423
- "key": "BranchingRuleDeleted",
424
- "name": "BranchingRule deleted",
200
+ "key": "DELETE_RULE",
201
+ "name": "Delete Rule",
425
202
  "payloadSchema": [
426
203
  {
427
204
  "name": "id",
@@ -431,72 +208,8 @@
431
208
  ]
432
209
  },
433
210
  {
434
- "key": "EDIT_SOURCE",
435
- "name": "Edit Source",
436
- "payloadSchema": [
437
- {
438
- "name": "value",
439
- "type": "string",
440
- "required": true
441
- }
442
- ]
443
- },
444
- {
445
- "key": "EDIT_OPERATOR",
446
- "name": "Edit Operator",
447
- "payloadSchema": [
448
- {
449
- "name": "value",
450
- "type": "string",
451
- "required": true
452
- }
453
- ]
454
- },
455
- {
456
- "key": "EDIT_VALUE",
457
- "name": "Edit Value",
458
- "payloadSchema": [
459
- {
460
- "name": "value",
461
- "type": "string",
462
- "required": true
463
- }
464
- ]
465
- },
466
- {
467
- "key": "EDIT_TARGET",
468
- "name": "Edit Target",
469
- "payloadSchema": [
470
- {
471
- "name": "value",
472
- "type": "string",
473
- "required": true
474
- }
475
- ]
476
- },
477
- {
478
- "key": "UPDATE_RULE",
479
- "name": "Update Rule",
480
- "payloadSchema": [
481
- {
482
- "name": "ruleId",
483
- "type": "string",
484
- "required": true
485
- },
486
- {
487
- "name": "row",
488
- "type": "BranchingRule"
489
- },
490
- {
491
- "name": "data",
492
- "type": "object",
493
- "required": true
494
- }
495
- ]
496
- },
497
- {
498
- "key": "CANCEL",
499
- "name": "Cancel"
211
+ "key": "CLOSE_VIEW",
212
+ "name": "Close View"
500
213
  }
501
214
  ],
502
215
  "transitions": [
@@ -510,8 +223,8 @@
510
223
  "BranchingRule",
511
224
  {
512
225
  "emit": {
513
- "failure": "BranchingRuleLoadFailed",
514
- "success": "BranchingRuleLoaded"
226
+ "success": "BranchingRuleLoaded",
227
+ "failure": "BranchingRuleLoadFailed"
515
228
  }
516
229
  }
517
230
  ],
@@ -519,22 +232,22 @@
519
232
  "render-ui",
520
233
  "main",
521
234
  {
522
- "className": "py-12",
523
- "align": "center",
524
235
  "type": "stack",
236
+ "align": "center",
237
+ "className": "py-12",
525
238
  "gap": "md",
526
- "direction": "vertical",
527
239
  "children": [
528
240
  {
529
241
  "type": "spinner"
530
242
  },
531
243
  {
532
244
  "type": "typography",
245
+ "content": "Loading branching rules…",
533
246
  "color": "muted",
534
- "variant": "caption",
535
- "content": "Loading branching rules…"
247
+ "variant": "caption"
536
248
  }
537
- ]
249
+ ],
250
+ "direction": "vertical"
538
251
  }
539
252
  ]
540
253
  ]
@@ -548,8 +261,15 @@
548
261
  "render-ui",
549
262
  "main",
550
263
  {
264
+ "gap": "md",
265
+ "direction": "vertical",
266
+ "type": "stack",
551
267
  "children": [
552
268
  {
269
+ "type": "stack",
270
+ "gap": "sm",
271
+ "direction": "horizontal",
272
+ "align": "center",
553
273
  "children": [
554
274
  {
555
275
  "type": "icon",
@@ -557,28 +277,64 @@
557
277
  },
558
278
  {
559
279
  "content": "@config.title",
560
- "type": "typography",
561
- "variant": "h3"
280
+ "variant": "h3",
281
+ "type": "typography"
562
282
  }
563
- ],
564
- "gap": "sm",
565
- "direction": "horizontal",
566
- "type": "stack"
283
+ ]
567
284
  },
568
285
  {
569
- "type": "divider"
286
+ "cols": 4.0,
287
+ "type": "simple-grid",
288
+ "children": [
289
+ {
290
+ "type": "stat-display",
291
+ "value": "@payload.data.length",
292
+ "icon": "git-branch",
293
+ "label": "Total rules"
294
+ },
295
+ {
296
+ "label": "Active surveys",
297
+ "icon": "clipboard-list",
298
+ "type": "stat-display",
299
+ "value": "8"
300
+ },
301
+ {
302
+ "icon": "skip-forward",
303
+ "type": "stat-display",
304
+ "value": "42",
305
+ "label": "Skip jumps"
306
+ },
307
+ {
308
+ "value": "3",
309
+ "label": "Priority avg",
310
+ "type": "stat-display",
311
+ "icon": "trending-up"
312
+ }
313
+ ]
570
314
  },
571
315
  {
572
- "type": "branching-logic-builder",
573
- "rules": "@payload.data",
574
- "questions": []
316
+ "type": "divider"
575
317
  },
576
318
  {
577
- "entity": "@payload.data",
319
+ "itemActions": [
320
+ {
321
+ "label": "Open",
322
+ "variant": "primary",
323
+ "event": "OPEN_RULE",
324
+ "icon": "arrow-right"
325
+ },
326
+ {
327
+ "icon": "trash-2",
328
+ "label": "Delete",
329
+ "event": "DELETE_RULE",
330
+ "variant": "danger"
331
+ }
332
+ ],
578
333
  "fields": [
579
334
  {
580
335
  "name": "sourceQuestionId",
581
- "label": "If question"
336
+ "label": "If question",
337
+ "variant": "caption"
582
338
  },
583
339
  {
584
340
  "name": "operator",
@@ -586,48 +342,27 @@
586
342
  "label": "Op"
587
343
  },
588
344
  {
589
- "label": "Value",
590
- "name": "value"
345
+ "variant": "caption",
346
+ "name": "value",
347
+ "label": "Value"
591
348
  },
592
349
  {
593
- "name": "targetQuestionId",
594
- "label": "Jump to"
350
+ "label": "Jump to",
351
+ "variant": "caption",
352
+ "name": "targetQuestionId"
595
353
  },
596
354
  {
355
+ "name": "priority",
597
356
  "label": "Priority",
598
- "variant": "badge",
599
- "name": "priority"
357
+ "variant": "badge"
600
358
  }
601
359
  ],
602
360
  "cols": 1.0,
361
+ "type": "data-grid",
603
362
  "gap": "sm",
604
- "itemActions": [
605
- {
606
- "event": "EDIT",
607
- "variant": "secondary",
608
- "label": "Edit",
609
- "icon": "pencil"
610
- },
611
- {
612
- "event": "DELETE_RULE",
613
- "label": "Delete",
614
- "variant": "danger",
615
- "icon": "trash-2"
616
- }
617
- ],
618
- "type": "data-grid"
619
- },
620
- {
621
- "label": "Add rule",
622
- "variant": "primary",
623
- "type": "button",
624
- "action": "ADD_RULE",
625
- "icon": "plus"
363
+ "entity": "@payload.data"
626
364
  }
627
- ],
628
- "direction": "vertical",
629
- "type": "stack",
630
- "gap": "md"
365
+ ]
631
366
  }
632
367
  ]
633
368
  ]
@@ -650,173 +385,223 @@
650
385
  },
651
386
  {
652
387
  "from": "browsing",
653
- "to": "browsing",
654
- "event": "ADD_RULE",
655
- "effects": [
656
- [
657
- "persist",
658
- "create",
659
- "BranchingRule",
660
- "@payload.data",
661
- {
662
- "emit": {
663
- "failure": "BranchingRuleLoadFailed",
664
- "success": "BranchingRuleAdded"
665
- }
666
- }
667
- ]
668
- ]
669
- },
670
- {
671
- "from": "browsing",
672
- "to": "editing",
673
- "event": "EDIT",
388
+ "to": "viewing_single",
389
+ "event": "OPEN_RULE",
674
390
  "effects": [
675
391
  [
676
392
  "set",
677
393
  "@entity.id",
678
- "@payload.id"
394
+ "@payload.row.id"
395
+ ],
396
+ [
397
+ "set",
398
+ "@entity.surveyId",
399
+ "@payload.row.surveyId"
400
+ ],
401
+ [
402
+ "set",
403
+ "@entity.sourceQuestionId",
404
+ "@payload.row.sourceQuestionId"
405
+ ],
406
+ [
407
+ "set",
408
+ "@entity.operator",
409
+ "@payload.row.operator"
410
+ ],
411
+ [
412
+ "set",
413
+ "@entity.value",
414
+ "@payload.row.value"
415
+ ],
416
+ [
417
+ "set",
418
+ "@entity.targetQuestionId",
419
+ "@payload.row.targetQuestionId"
420
+ ],
421
+ [
422
+ "set",
423
+ "@entity.priority",
424
+ "@payload.row.priority"
679
425
  ],
680
426
  [
681
427
  "render-ui",
682
428
  "main",
683
429
  {
684
- "direction": "vertical",
685
- "gap": "md",
686
- "type": "stack",
687
430
  "children": [
688
431
  {
432
+ "align": "center",
433
+ "direction": "horizontal",
434
+ "gap": "sm",
689
435
  "children": [
690
436
  {
691
- "type": "icon",
692
- "name": "pencil"
437
+ "type": "button",
438
+ "label": "Back",
439
+ "action": "CLOSE_VIEW",
440
+ "variant": "ghost"
441
+ },
442
+ {
443
+ "name": "git-branch",
444
+ "type": "icon"
693
445
  },
694
446
  {
447
+ "content": "@entity.sourceQuestionId",
695
448
  "variant": "h3",
696
- "type": "typography",
697
- "content": "Edit branching rule"
449
+ "type": "typography"
450
+ },
451
+ {
452
+ "variant": "default",
453
+ "type": "badge",
454
+ "label": "@entity.operator"
698
455
  }
699
456
  ],
700
- "gap": "sm",
701
- "direction": "horizontal",
702
457
  "type": "stack"
703
458
  },
704
459
  {
705
460
  "type": "divider"
706
461
  },
707
462
  {
708
- "value": "@entity.sourceQuestionId",
709
- "placeholder": "Source question id",
710
- "action": "EDIT_SOURCE",
711
- "type": "input"
712
- },
713
- {
714
- "action": "EDIT_OPERATOR",
715
- "type": "select",
716
- "placeholder": "Operator",
717
- "options": [
718
- {
719
- "label": "Equals",
720
- "value": "equals"
721
- },
722
- {
723
- "label": "Not equals",
724
- "value": "not-equals"
725
- },
463
+ "gap": "sm",
464
+ "children": [
726
465
  {
727
- "label": "Contains",
728
- "value": "contains"
466
+ "children": [
467
+ {
468
+ "variant": "caption",
469
+ "type": "typography",
470
+ "color": "muted",
471
+ "content": "Survey"
472
+ },
473
+ {
474
+ "content": "@entity.surveyId",
475
+ "variant": "body",
476
+ "type": "typography"
477
+ }
478
+ ],
479
+ "gap": "md",
480
+ "type": "stack",
481
+ "direction": "horizontal"
729
482
  },
730
483
  {
731
- "value": "in",
732
- "label": "In"
484
+ "gap": "md",
485
+ "children": [
486
+ {
487
+ "color": "muted",
488
+ "type": "typography",
489
+ "variant": "caption",
490
+ "content": "Value"
491
+ },
492
+ {
493
+ "content": "@entity.value",
494
+ "type": "typography",
495
+ "variant": "body"
496
+ }
497
+ ],
498
+ "direction": "horizontal",
499
+ "type": "stack"
733
500
  }
734
501
  ],
735
- "value": "@entity.operator"
502
+ "direction": "vertical",
503
+ "type": "stack"
736
504
  },
737
505
  {
738
- "type": "input",
739
- "action": "EDIT_VALUE",
740
- "value": "@entity.value",
741
- "placeholder": "Value"
506
+ "type": "divider"
742
507
  },
743
508
  {
744
- "value": "@entity.targetQuestionId",
745
- "action": "EDIT_TARGET",
746
- "placeholder": "Target question id",
747
- "type": "input"
509
+ "type": "simple-grid",
510
+ "cols": 3.0,
511
+ "children": [
512
+ {
513
+ "label": "Source",
514
+ "icon": "help-circle",
515
+ "type": "stat-display",
516
+ "value": "@entity.sourceQuestionId"
517
+ },
518
+ {
519
+ "label": "Target",
520
+ "type": "stat-display",
521
+ "icon": "arrow-right-circle",
522
+ "value": "@entity.targetQuestionId"
523
+ },
524
+ {
525
+ "icon": "trending-up",
526
+ "type": "stat-display",
527
+ "label": "Priority",
528
+ "value": "@entity.priority"
529
+ }
530
+ ]
748
531
  },
749
532
  {
533
+ "type": "stack",
750
534
  "direction": "horizontal",
535
+ "align": "center",
751
536
  "gap": "sm",
752
- "type": "stack",
753
537
  "children": [
754
538
  {
755
- "variant": "primary",
756
- "icon": "check",
757
- "type": "button",
758
- "label": "Save",
759
- "action": "UPDATE_RULE"
760
- },
761
- {
762
- "action": "CANCEL",
763
- "label": "Cancel",
539
+ "variant": "danger",
540
+ "label": "Delete",
764
541
  "type": "button",
765
- "variant": "secondary",
766
- "icon": "x"
542
+ "action": "DELETE_RULE",
543
+ "actionPayload": {
544
+ "id": "@entity.id"
545
+ }
767
546
  }
768
547
  ]
769
548
  }
770
- ]
549
+ ],
550
+ "direction": "vertical",
551
+ "gap": "md",
552
+ "type": "stack"
771
553
  }
772
554
  ]
773
555
  ]
774
556
  },
775
557
  {
776
558
  "from": "browsing",
777
- "to": "browsing",
559
+ "to": "loading",
778
560
  "event": "DELETE_RULE",
779
561
  "effects": [
780
562
  [
781
563
  "set",
782
564
  "@entity.id",
783
- "@payload.ruleId"
565
+ "@payload.id"
784
566
  ],
785
567
  [
786
- "persist",
787
- "delete",
568
+ "fetch",
788
569
  "BranchingRule",
789
- "@payload.row",
790
570
  {
791
571
  "emit": {
792
- "success": "BranchingRuleDeleted",
572
+ "success": "BranchingRuleLoaded",
793
573
  "failure": "BranchingRuleLoadFailed"
794
574
  }
795
575
  }
796
- ]
797
- ]
798
- },
799
- {
800
- "from": "browsing",
801
- "to": "loading",
802
- "event": "BranchingRuleAdded",
803
- "effects": [
576
+ ],
804
577
  [
805
- "fetch",
806
- "BranchingRule",
578
+ "render-ui",
579
+ "main",
807
580
  {
808
- "emit": {
809
- "failure": "BranchingRuleLoadFailed",
810
- "success": "BranchingRuleLoaded"
811
- }
581
+ "className": "py-12",
582
+ "gap": "md",
583
+ "direction": "vertical",
584
+ "children": [
585
+ {
586
+ "type": "spinner"
587
+ },
588
+ {
589
+ "variant": "caption",
590
+ "content": "Deleting rule…",
591
+ "color": "muted",
592
+ "type": "typography"
593
+ }
594
+ ],
595
+ "type": "stack",
596
+ "align": "center"
812
597
  }
813
598
  ]
814
599
  ]
815
600
  },
816
601
  {
817
- "from": "browsing",
602
+ "from": "viewing_single",
818
603
  "to": "loading",
819
- "event": "BranchingRuleUpdated",
604
+ "event": "CLOSE_VIEW",
820
605
  "effects": [
821
606
  [
822
607
  "fetch",
@@ -827,144 +612,41 @@
827
612
  "failure": "BranchingRuleLoadFailed"
828
613
  }
829
614
  }
830
- ]
831
- ]
832
- },
833
- {
834
- "from": "browsing",
835
- "to": "loading",
836
- "event": "BranchingRuleDeleted",
837
- "effects": [
838
- [
839
- "fetch",
840
- "BranchingRule",
841
- {
842
- "emit": {
843
- "failure": "BranchingRuleLoadFailed",
844
- "success": "BranchingRuleLoaded"
845
- }
846
- }
847
- ]
848
- ]
849
- },
850
- {
851
- "from": "browsing",
852
- "to": "error",
853
- "event": "BranchingRuleLoadFailed",
854
- "effects": [
615
+ ],
855
616
  [
856
617
  "render-ui",
857
618
  "main",
858
619
  {
859
- "variant": "error",
860
- "message": "@payload.error",
861
- "type": "alert"
620
+ "align": "center",
621
+ "direction": "vertical",
622
+ "className": "py-12",
623
+ "children": [
624
+ {
625
+ "type": "spinner"
626
+ },
627
+ {
628
+ "content": "Loading branching rules…",
629
+ "type": "typography",
630
+ "color": "muted",
631
+ "variant": "caption"
632
+ }
633
+ ],
634
+ "gap": "md",
635
+ "type": "stack"
862
636
  }
863
637
  ]
864
638
  ]
865
639
  },
866
640
  {
867
- "from": "editing",
868
- "to": "editing",
869
- "event": "EDIT_SOURCE",
870
- "effects": [
871
- [
872
- "set",
873
- "@entity.sourceQuestionId",
874
- "@payload.value"
875
- ]
876
- ]
877
- },
878
- {
879
- "from": "editing",
880
- "to": "editing",
881
- "event": "EDIT_OPERATOR",
882
- "effects": [
883
- [
884
- "set",
885
- "@entity.operator",
886
- "@payload.value"
887
- ]
888
- ]
889
- },
890
- {
891
- "from": "editing",
892
- "to": "editing",
893
- "event": "EDIT_VALUE",
894
- "effects": [
895
- [
896
- "set",
897
- "@entity.value",
898
- "@payload.value"
899
- ]
900
- ]
901
- },
902
- {
903
- "from": "editing",
904
- "to": "editing",
905
- "event": "EDIT_TARGET",
906
- "effects": [
907
- [
908
- "set",
909
- "@entity.targetQuestionId",
910
- "@payload.value"
911
- ]
912
- ]
913
- },
914
- {
915
- "from": "editing",
916
- "to": "browsing",
917
- "event": "UPDATE_RULE",
641
+ "from": "viewing_single",
642
+ "to": "loading",
643
+ "event": "DELETE_RULE",
918
644
  "effects": [
919
645
  [
920
646
  "set",
921
647
  "@entity.id",
922
- "@payload.ruleId"
923
- ],
924
- [
925
- "set",
926
- "@entity.sourceQuestionId",
927
- "@payload.row.sourceQuestionId"
928
- ],
929
- [
930
- "set",
931
- "@entity.operator",
932
- "@payload.row.operator"
933
- ],
934
- [
935
- "set",
936
- "@entity.value",
937
- "@payload.row.value"
938
- ],
939
- [
940
- "set",
941
- "@entity.targetQuestionId",
942
- "@payload.row.targetQuestionId"
943
- ],
944
- [
945
- "set",
946
- "@entity.priority",
947
- "@payload.row.priority"
648
+ "@payload.id"
948
649
  ],
949
- [
950
- "persist",
951
- "update",
952
- "BranchingRule",
953
- "@payload.data",
954
- {
955
- "emit": {
956
- "failure": "BranchingRuleLoadFailed",
957
- "success": "BranchingRuleUpdated"
958
- }
959
- }
960
- ]
961
- ]
962
- },
963
- {
964
- "from": "editing",
965
- "to": "loading",
966
- "event": "CANCEL",
967
- "effects": [
968
650
  [
969
651
  "fetch",
970
652
  "BranchingRule",
@@ -974,38 +656,27 @@
974
656
  "success": "BranchingRuleLoaded"
975
657
  }
976
658
  }
977
- ]
978
- ]
979
- },
980
- {
981
- "from": "editing",
982
- "to": "loading",
983
- "event": "BranchingRuleUpdated",
984
- "effects": [
985
- [
986
- "fetch",
987
- "BranchingRule",
988
- {
989
- "emit": {
990
- "success": "BranchingRuleLoaded",
991
- "failure": "BranchingRuleLoadFailed"
992
- }
993
- }
994
- ]
995
- ]
996
- },
997
- {
998
- "from": "editing",
999
- "to": "error",
1000
- "event": "BranchingRuleLoadFailed",
1001
- "effects": [
659
+ ],
1002
660
  [
1003
661
  "render-ui",
1004
662
  "main",
1005
663
  {
1006
- "message": "@payload.error",
1007
- "type": "alert",
1008
- "variant": "error"
664
+ "className": "py-12",
665
+ "direction": "vertical",
666
+ "gap": "md",
667
+ "align": "center",
668
+ "children": [
669
+ {
670
+ "type": "spinner"
671
+ },
672
+ {
673
+ "variant": "caption",
674
+ "content": "Deleting rule…",
675
+ "type": "typography",
676
+ "color": "muted"
677
+ }
678
+ ],
679
+ "type": "stack"
1009
680
  }
1010
681
  ]
1011
682
  ]