@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-question-bank",
3
3
  "version": "1.0.0",
4
- "description": "std-question-bank — typed question library for surveys. Owns a Question entity (label + kind + options + required + category + surveyId + order). QuestionManage loads questions on INIT, renders them in a data-grid with Edit / Delete actions plus a Create button, and persists add/update/delete via explicit ADD_QUESTION / UPDATE_QUESTION / DELETE_QUESTION events.",
4
+ "description": "std-question-bank — typed question library for surveys. Lists questions in `browsing`; opens detail in `viewing_single` with Update / Delete actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "QuestionBankOrbital",
@@ -65,20 +65,10 @@
65
65
  "linkedEntity": "Question",
66
66
  "emits": [
67
67
  {
68
- "event": "ADD_QUESTION",
68
+ "event": "OPEN_QUESTION",
69
69
  "payloadSchema": [
70
70
  {
71
- "name": "data",
72
- "type": "object",
73
- "required": true
74
- }
75
- ]
76
- },
77
- {
78
- "event": "UPDATE_QUESTION",
79
- "payloadSchema": [
80
- {
81
- "name": "questionId",
71
+ "name": "id",
82
72
  "type": "string",
83
73
  "required": true
84
74
  },
@@ -115,55 +105,29 @@
115
105
  {
116
106
  "name": "row.order",
117
107
  "type": "number"
118
- },
119
- {
120
- "name": "data",
121
- "type": "object",
122
- "required": true
123
108
  }
124
109
  ]
125
110
  },
126
111
  {
127
- "event": "DELETE_QUESTION",
112
+ "event": "CLOSE_VIEW"
113
+ },
114
+ {
115
+ "event": "UPDATE_QUESTION",
128
116
  "payloadSchema": [
129
117
  {
130
- "name": "questionId",
131
- "type": "string",
132
- "required": true
133
- },
134
- {
135
- "name": "row.id",
118
+ "name": "id",
136
119
  "type": "string",
137
120
  "required": true
138
- },
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "event": "DELETE_QUESTION",
126
+ "payloadSchema": [
139
127
  {
140
- "name": "row.label",
128
+ "name": "id",
141
129
  "type": "string",
142
130
  "required": true
143
- },
144
- {
145
- "name": "row.kind",
146
- "type": "string"
147
- },
148
- {
149
- "name": "row.optionsJson",
150
- "type": "string"
151
- },
152
- {
153
- "name": "row.required",
154
- "type": "boolean"
155
- },
156
- {
157
- "name": "row.category",
158
- "type": "string"
159
- },
160
- {
161
- "name": "row.surveyId",
162
- "type": "string"
163
- },
164
- {
165
- "name": "row.order",
166
- "type": "number"
167
131
  }
168
132
  ]
169
133
  },
@@ -188,93 +152,6 @@
188
152
  "type": "string"
189
153
  }
190
154
  ]
191
- },
192
- {
193
- "event": "QuestionAdded",
194
- "payloadSchema": [
195
- {
196
- "name": "row.id",
197
- "type": "string",
198
- "required": true
199
- },
200
- {
201
- "name": "row.label",
202
- "type": "string",
203
- "required": true
204
- },
205
- {
206
- "name": "row.kind",
207
- "type": "string"
208
- },
209
- {
210
- "name": "row.optionsJson",
211
- "type": "string"
212
- },
213
- {
214
- "name": "row.required",
215
- "type": "boolean"
216
- },
217
- {
218
- "name": "row.category",
219
- "type": "string"
220
- },
221
- {
222
- "name": "row.surveyId",
223
- "type": "string"
224
- },
225
- {
226
- "name": "row.order",
227
- "type": "number"
228
- }
229
- ]
230
- },
231
- {
232
- "event": "QuestionUpdated",
233
- "payloadSchema": [
234
- {
235
- "name": "row.id",
236
- "type": "string",
237
- "required": true
238
- },
239
- {
240
- "name": "row.label",
241
- "type": "string",
242
- "required": true
243
- },
244
- {
245
- "name": "row.kind",
246
- "type": "string"
247
- },
248
- {
249
- "name": "row.optionsJson",
250
- "type": "string"
251
- },
252
- {
253
- "name": "row.required",
254
- "type": "boolean"
255
- },
256
- {
257
- "name": "row.category",
258
- "type": "string"
259
- },
260
- {
261
- "name": "row.surveyId",
262
- "type": "string"
263
- },
264
- {
265
- "name": "row.order",
266
- "type": "number"
267
- }
268
- ]
269
- },
270
- {
271
- "event": "QuestionDeleted",
272
- "payloadSchema": [
273
- {
274
- "name": "id",
275
- "type": "string"
276
- }
277
- ]
278
155
  }
279
156
  ],
280
157
  "stateMachine": {
@@ -287,7 +164,7 @@
287
164
  "name": "browsing"
288
165
  },
289
166
  {
290
- "name": "editing"
167
+ "name": "viewing_single"
291
168
  },
292
169
  {
293
170
  "name": "error"
@@ -323,13 +200,17 @@
323
200
  ]
324
201
  },
325
202
  {
326
- "key": "ADD_QUESTION",
327
- "name": "Add Question",
203
+ "key": "OPEN_QUESTION",
204
+ "name": "Open Question",
328
205
  "payloadSchema": [
329
206
  {
330
- "name": "data",
331
- "type": "object",
207
+ "name": "id",
208
+ "type": "string",
332
209
  "required": true
210
+ },
211
+ {
212
+ "name": "row",
213
+ "type": "Question"
333
214
  }
334
215
  ]
335
216
  },
@@ -338,18 +219,9 @@
338
219
  "name": "Update Question",
339
220
  "payloadSchema": [
340
221
  {
341
- "name": "questionId",
222
+ "name": "id",
342
223
  "type": "string",
343
224
  "required": true
344
- },
345
- {
346
- "name": "row",
347
- "type": "Question"
348
- },
349
- {
350
- "name": "data",
351
- "type": "object",
352
- "required": true
353
225
  }
354
226
  ]
355
227
  },
@@ -358,45 +230,15 @@
358
230
  "name": "Delete Question",
359
231
  "payloadSchema": [
360
232
  {
361
- "name": "questionId",
233
+ "name": "id",
362
234
  "type": "string",
363
235
  "required": true
364
- },
365
- {
366
- "name": "row",
367
- "type": "Question"
368
- }
369
- ]
370
- },
371
- {
372
- "key": "QuestionAdded",
373
- "name": "Question added",
374
- "payloadSchema": [
375
- {
376
- "name": "row",
377
- "type": "Question"
378
236
  }
379
237
  ]
380
238
  },
381
239
  {
382
- "key": "QuestionUpdated",
383
- "name": "Question updated",
384
- "payloadSchema": [
385
- {
386
- "name": "row",
387
- "type": "Question"
388
- }
389
- ]
390
- },
391
- {
392
- "key": "QuestionDeleted",
393
- "name": "Question deleted",
394
- "payloadSchema": [
395
- {
396
- "name": "id",
397
- "type": "string"
398
- }
399
- ]
240
+ "key": "CLOSE_VIEW",
241
+ "name": "Close View"
400
242
  }
401
243
  ],
402
244
  "transitions": [
@@ -410,8 +252,8 @@
410
252
  "Question",
411
253
  {
412
254
  "emit": {
413
- "failure": "QuestionLoadFailed",
414
- "success": "QuestionLoaded"
255
+ "success": "QuestionLoaded",
256
+ "failure": "QuestionLoadFailed"
415
257
  }
416
258
  }
417
259
  ],
@@ -419,9 +261,11 @@
419
261
  "render-ui",
420
262
  "main",
421
263
  {
422
- "type": "stack",
423
264
  "direction": "vertical",
424
265
  "gap": "md",
266
+ "className": "py-12",
267
+ "align": "center",
268
+ "type": "stack",
425
269
  "children": [
426
270
  {
427
271
  "type": "spinner"
@@ -429,12 +273,10 @@
429
273
  {
430
274
  "type": "typography",
431
275
  "variant": "caption",
432
- "color": "muted",
433
- "content": "Loading questions…"
276
+ "content": "Loading questions…",
277
+ "color": "muted"
434
278
  }
435
- ],
436
- "align": "center",
437
- "className": "py-12"
279
+ ]
438
280
  }
439
281
  ]
440
282
  ]
@@ -448,92 +290,107 @@
448
290
  "render-ui",
449
291
  "main",
450
292
  {
451
- "gap": "md",
452
- "direction": "vertical",
453
293
  "type": "stack",
454
294
  "children": [
455
295
  {
456
- "type": "stack",
457
- "justify": "between",
458
- "direction": "horizontal",
296
+ "align": "center",
459
297
  "gap": "sm",
460
298
  "children": [
461
299
  {
462
- "gap": "sm",
463
- "type": "stack",
464
- "children": [
465
- {
466
- "type": "icon",
467
- "name": "list-checks"
468
- },
469
- {
470
- "variant": "h3",
471
- "type": "typography",
472
- "content": "@config.title"
473
- }
474
- ],
475
- "direction": "horizontal"
300
+ "name": "list-checks",
301
+ "type": "icon"
476
302
  },
477
303
  {
478
- "type": "button",
479
- "label": "Add Question",
480
- "variant": "primary",
481
- "action": "ADD_QUESTION",
482
- "icon": "plus"
304
+ "variant": "h3",
305
+ "type": "typography",
306
+ "content": "@config.title"
483
307
  }
484
- ]
485
- },
486
- {
487
- "type": "divider"
308
+ ],
309
+ "type": "stack",
310
+ "direction": "horizontal"
488
311
  },
489
312
  {
490
- "gap": "sm",
491
- "type": "data-grid",
492
- "cols": 1.0,
493
- "entity": "@payload.data",
494
- "itemActions": [
313
+ "type": "simple-grid",
314
+ "children": [
495
315
  {
496
- "variant": "ghost",
497
- "icon": "edit",
498
- "event": "UPDATE_QUESTION",
499
- "label": "Edit"
316
+ "label": "Total questions",
317
+ "type": "stat-display",
318
+ "value": "@payload.data.length",
319
+ "icon": "list-checks"
500
320
  },
501
321
  {
502
- "event": "DELETE_QUESTION",
503
- "variant": "danger",
504
- "label": "Delete",
505
- "icon": "trash"
322
+ "value": "18",
323
+ "label": "Required",
324
+ "type": "stat-display",
325
+ "icon": "alert-circle"
326
+ },
327
+ {
328
+ "type": "stat-display",
329
+ "icon": "clipboard-list",
330
+ "label": "Surveys",
331
+ "value": "6"
332
+ },
333
+ {
334
+ "type": "stat-display",
335
+ "label": "Categories",
336
+ "icon": "tag",
337
+ "value": "9"
506
338
  }
507
339
  ],
340
+ "cols": 4.0
341
+ },
342
+ {
343
+ "type": "divider"
344
+ },
345
+ {
346
+ "entity": "@payload.data",
347
+ "gap": "sm",
508
348
  "fields": [
509
349
  {
510
350
  "name": "label",
511
351
  "label": "Question",
512
- "variant": "h4"
352
+ "variant": "caption"
513
353
  },
514
354
  {
355
+ "name": "kind",
515
356
  "label": "Type",
516
- "variant": "badge",
517
- "name": "kind"
357
+ "variant": "badge"
518
358
  },
519
359
  {
520
- "name": "category",
521
360
  "variant": "caption",
522
- "label": "Category"
361
+ "label": "Category",
362
+ "name": "category"
523
363
  },
524
364
  {
525
- "label": "Required",
526
- "variant": "badge",
527
- "name": "required"
365
+ "label": "Survey",
366
+ "name": "surveyId",
367
+ "variant": "caption"
528
368
  },
529
369
  {
530
- "variant": "caption",
531
370
  "name": "order",
532
- "label": "Order"
371
+ "label": "Order",
372
+ "variant": "caption"
533
373
  }
534
- ]
374
+ ],
375
+ "itemActions": [
376
+ {
377
+ "label": "Open",
378
+ "icon": "arrow-right",
379
+ "event": "OPEN_QUESTION",
380
+ "variant": "primary"
381
+ },
382
+ {
383
+ "label": "Delete",
384
+ "event": "DELETE_QUESTION",
385
+ "variant": "danger"
386
+ }
387
+ ],
388
+ "type": "data-grid",
389
+ "cols": 1.0
535
390
  }
536
- ]
391
+ ],
392
+ "direction": "vertical",
393
+ "gap": "md"
537
394
  }
538
395
  ]
539
396
  ]
@@ -547,8 +404,8 @@
547
404
  "render-ui",
548
405
  "main",
549
406
  {
550
- "message": "@payload.error",
551
407
  "type": "alert",
408
+ "message": "@payload.error",
552
409
  "variant": "error"
553
410
  }
554
411
  ]
@@ -556,32 +413,13 @@
556
413
  },
557
414
  {
558
415
  "from": "browsing",
559
- "to": "editing",
560
- "event": "ADD_QUESTION",
561
- "effects": [
562
- [
563
- "persist",
564
- "create",
565
- "Question",
566
- "@payload.data",
567
- {
568
- "emit": {
569
- "success": "QuestionAdded",
570
- "failure": "QuestionLoadFailed"
571
- }
572
- }
573
- ]
574
- ]
575
- },
576
- {
577
- "from": "browsing",
578
- "to": "editing",
579
- "event": "UPDATE_QUESTION",
416
+ "to": "viewing_single",
417
+ "event": "OPEN_QUESTION",
580
418
  "effects": [
581
419
  [
582
420
  "set",
583
421
  "@entity.id",
584
- "@payload.questionId"
422
+ "@payload.row.id"
585
423
  ],
586
424
  [
587
425
  "set",
@@ -619,56 +457,197 @@
619
457
  "@payload.row.order"
620
458
  ],
621
459
  [
622
- "persist",
623
- "update",
624
- "Question",
625
- "@entity",
460
+ "render-ui",
461
+ "main",
626
462
  {
627
- "emit": {
628
- "failure": "QuestionLoadFailed",
629
- "success": "QuestionUpdated"
630
- }
463
+ "direction": "vertical",
464
+ "children": [
465
+ {
466
+ "align": "center",
467
+ "direction": "horizontal",
468
+ "type": "stack",
469
+ "children": [
470
+ {
471
+ "label": "Back",
472
+ "variant": "ghost",
473
+ "type": "button",
474
+ "action": "CLOSE_VIEW"
475
+ },
476
+ {
477
+ "type": "icon",
478
+ "name": "list-checks"
479
+ },
480
+ {
481
+ "content": "@entity.label",
482
+ "type": "typography",
483
+ "variant": "h3"
484
+ },
485
+ {
486
+ "type": "badge",
487
+ "label": "@entity.kind",
488
+ "variant": "default"
489
+ }
490
+ ],
491
+ "gap": "sm"
492
+ },
493
+ {
494
+ "type": "divider"
495
+ },
496
+ {
497
+ "direction": "vertical",
498
+ "children": [
499
+ {
500
+ "children": [
501
+ {
502
+ "variant": "caption",
503
+ "content": "Category",
504
+ "type": "typography",
505
+ "color": "muted"
506
+ },
507
+ {
508
+ "variant": "body",
509
+ "content": "@entity.category",
510
+ "type": "typography"
511
+ }
512
+ ],
513
+ "gap": "md",
514
+ "type": "stack",
515
+ "direction": "horizontal"
516
+ },
517
+ {
518
+ "type": "stack",
519
+ "direction": "horizontal",
520
+ "children": [
521
+ {
522
+ "variant": "caption",
523
+ "color": "muted",
524
+ "type": "typography",
525
+ "content": "Survey"
526
+ },
527
+ {
528
+ "variant": "body",
529
+ "content": "@entity.surveyId",
530
+ "type": "typography"
531
+ }
532
+ ],
533
+ "gap": "md"
534
+ },
535
+ {
536
+ "children": [
537
+ {
538
+ "content": "Options",
539
+ "type": "typography",
540
+ "variant": "caption",
541
+ "color": "muted"
542
+ },
543
+ {
544
+ "variant": "body",
545
+ "type": "typography",
546
+ "content": "@entity.optionsJson"
547
+ }
548
+ ],
549
+ "type": "stack",
550
+ "direction": "horizontal",
551
+ "gap": "md"
552
+ }
553
+ ],
554
+ "gap": "sm",
555
+ "type": "stack"
556
+ },
557
+ {
558
+ "type": "divider"
559
+ },
560
+ {
561
+ "cols": 2.0,
562
+ "children": [
563
+ {
564
+ "type": "stat-display",
565
+ "label": "Kind",
566
+ "icon": "tag",
567
+ "value": "@entity.kind"
568
+ },
569
+ {
570
+ "label": "Order",
571
+ "icon": "hash",
572
+ "type": "stat-display",
573
+ "value": "@entity.order"
574
+ }
575
+ ],
576
+ "type": "simple-grid"
577
+ },
578
+ {
579
+ "children": [
580
+ {
581
+ "label": "Update",
582
+ "actionPayload": {
583
+ "id": "@entity.id"
584
+ },
585
+ "action": "UPDATE_QUESTION",
586
+ "type": "button",
587
+ "variant": "primary"
588
+ },
589
+ {
590
+ "actionPayload": {
591
+ "id": "@entity.id"
592
+ },
593
+ "type": "button",
594
+ "variant": "danger",
595
+ "label": "Delete",
596
+ "action": "DELETE_QUESTION"
597
+ }
598
+ ],
599
+ "gap": "sm",
600
+ "align": "center",
601
+ "type": "stack",
602
+ "direction": "horizontal"
603
+ }
604
+ ],
605
+ "type": "stack",
606
+ "gap": "md"
631
607
  }
632
608
  ]
633
609
  ]
634
610
  },
635
611
  {
636
612
  "from": "browsing",
637
- "to": "editing",
638
- "event": "DELETE_QUESTION",
613
+ "to": "loading",
614
+ "event": "UPDATE_QUESTION",
639
615
  "effects": [
640
616
  [
641
617
  "set",
642
618
  "@entity.id",
643
- "@payload.questionId"
619
+ "@payload.id"
644
620
  ],
645
621
  [
646
- "persist",
647
- "delete",
622
+ "fetch",
648
623
  "Question",
649
- "@entity.id",
650
624
  {
651
625
  "emit": {
652
- "success": "QuestionDeleted",
626
+ "success": "QuestionLoaded",
653
627
  "failure": "QuestionLoadFailed"
654
628
  }
655
629
  }
656
- ]
657
- ]
658
- },
659
- {
660
- "from": "browsing",
661
- "to": "loading",
662
- "event": "QuestionAdded",
663
- "effects": [
630
+ ],
664
631
  [
665
- "fetch",
666
- "Question",
632
+ "render-ui",
633
+ "main",
667
634
  {
668
- "emit": {
669
- "failure": "QuestionLoadFailed",
670
- "success": "QuestionLoaded"
671
- }
635
+ "align": "center",
636
+ "className": "py-12",
637
+ "children": [
638
+ {
639
+ "type": "spinner"
640
+ },
641
+ {
642
+ "content": "Updating question…",
643
+ "variant": "caption",
644
+ "color": "muted",
645
+ "type": "typography"
646
+ }
647
+ ],
648
+ "type": "stack",
649
+ "gap": "md",
650
+ "direction": "vertical"
672
651
  }
673
652
  ]
674
653
  ]
@@ -676,25 +655,13 @@
676
655
  {
677
656
  "from": "browsing",
678
657
  "to": "loading",
679
- "event": "QuestionUpdated",
658
+ "event": "DELETE_QUESTION",
680
659
  "effects": [
681
660
  [
682
- "fetch",
683
- "Question",
684
- {
685
- "emit": {
686
- "failure": "QuestionLoadFailed",
687
- "success": "QuestionLoaded"
688
- }
689
- }
690
- ]
691
- ]
692
- },
693
- {
694
- "from": "browsing",
695
- "to": "loading",
696
- "event": "QuestionDeleted",
697
- "effects": [
661
+ "set",
662
+ "@entity.id",
663
+ "@payload.id"
664
+ ],
698
665
  [
699
666
  "fetch",
700
667
  "Question",
@@ -704,29 +671,35 @@
704
671
  "failure": "QuestionLoadFailed"
705
672
  }
706
673
  }
707
- ]
708
- ]
709
- },
710
- {
711
- "from": "browsing",
712
- "to": "error",
713
- "event": "QuestionLoadFailed",
714
- "effects": [
674
+ ],
715
675
  [
716
676
  "render-ui",
717
677
  "main",
718
678
  {
719
- "variant": "error",
720
- "message": "@payload.error",
721
- "type": "alert"
679
+ "align": "center",
680
+ "className": "py-12",
681
+ "children": [
682
+ {
683
+ "type": "spinner"
684
+ },
685
+ {
686
+ "type": "typography",
687
+ "variant": "caption",
688
+ "content": "Deleting question…",
689
+ "color": "muted"
690
+ }
691
+ ],
692
+ "type": "stack",
693
+ "gap": "md",
694
+ "direction": "vertical"
722
695
  }
723
696
  ]
724
697
  ]
725
698
  },
726
699
  {
727
- "from": "editing",
700
+ "from": "viewing_single",
728
701
  "to": "loading",
729
- "event": "QuestionAdded",
702
+ "event": "CLOSE_VIEW",
730
703
  "effects": [
731
704
  [
732
705
  "fetch",
@@ -737,14 +710,41 @@
737
710
  "failure": "QuestionLoadFailed"
738
711
  }
739
712
  }
713
+ ],
714
+ [
715
+ "render-ui",
716
+ "main",
717
+ {
718
+ "type": "stack",
719
+ "className": "py-12",
720
+ "children": [
721
+ {
722
+ "type": "spinner"
723
+ },
724
+ {
725
+ "color": "muted",
726
+ "type": "typography",
727
+ "variant": "caption",
728
+ "content": "Loading questions…"
729
+ }
730
+ ],
731
+ "direction": "vertical",
732
+ "align": "center",
733
+ "gap": "md"
734
+ }
740
735
  ]
741
736
  ]
742
737
  },
743
738
  {
744
- "from": "editing",
739
+ "from": "viewing_single",
745
740
  "to": "loading",
746
- "event": "QuestionUpdated",
741
+ "event": "UPDATE_QUESTION",
747
742
  "effects": [
743
+ [
744
+ "set",
745
+ "@entity.id",
746
+ "@payload.id"
747
+ ],
748
748
  [
749
749
  "fetch",
750
750
  "Question",
@@ -754,38 +754,71 @@
754
754
  "failure": "QuestionLoadFailed"
755
755
  }
756
756
  }
757
+ ],
758
+ [
759
+ "render-ui",
760
+ "main",
761
+ {
762
+ "direction": "vertical",
763
+ "align": "center",
764
+ "children": [
765
+ {
766
+ "type": "spinner"
767
+ },
768
+ {
769
+ "content": "Updating question…",
770
+ "color": "muted",
771
+ "type": "typography",
772
+ "variant": "caption"
773
+ }
774
+ ],
775
+ "type": "stack",
776
+ "className": "py-12",
777
+ "gap": "md"
778
+ }
757
779
  ]
758
780
  ]
759
781
  },
760
782
  {
761
- "from": "editing",
783
+ "from": "viewing_single",
762
784
  "to": "loading",
763
- "event": "QuestionDeleted",
785
+ "event": "DELETE_QUESTION",
764
786
  "effects": [
787
+ [
788
+ "set",
789
+ "@entity.id",
790
+ "@payload.id"
791
+ ],
765
792
  [
766
793
  "fetch",
767
794
  "Question",
768
795
  {
769
796
  "emit": {
770
- "failure": "QuestionLoadFailed",
771
- "success": "QuestionLoaded"
797
+ "success": "QuestionLoaded",
798
+ "failure": "QuestionLoadFailed"
772
799
  }
773
800
  }
774
- ]
775
- ]
776
- },
777
- {
778
- "from": "editing",
779
- "to": "error",
780
- "event": "QuestionLoadFailed",
781
- "effects": [
801
+ ],
782
802
  [
783
803
  "render-ui",
784
804
  "main",
785
805
  {
786
- "type": "alert",
787
- "variant": "error",
788
- "message": "@payload.error"
806
+ "type": "stack",
807
+ "gap": "md",
808
+ "direction": "vertical",
809
+ "align": "center",
810
+ "className": "py-12",
811
+ "children": [
812
+ {
813
+ "type": "spinner"
814
+ },
815
+ {
816
+ "type": "typography",
817
+ "content": "Deleting question…",
818
+ "variant": "caption",
819
+ "color": "muted"
820
+ }
821
+ ]
789
822
  }
790
823
  ]
791
824
  ]