@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-response-collector",
3
3
  "version": "1.0.0",
4
- "description": "std-response-collector — survey per-respondent answer accumulator. ResponseCollect fetches Response rows on INIT, lists them, and on SUBMIT persists a new answer row tagged with surveyId, respondentId, questionId, and serialized answerJson, emitting ResponseSubmitted for cross-trait listeners.",
4
+ "description": "std-response-collector — survey per-respondent answer accumulator. Lists responses in `browsing`; opens detail in `viewing_single` with Resubmit / Delete actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ResponseCollectorOrbital",
@@ -47,91 +47,77 @@
47
47
  "linkedEntity": "Response",
48
48
  "emits": [
49
49
  {
50
- "event": "SUBMIT",
50
+ "event": "OPEN_RESPONSE",
51
51
  "payloadSchema": [
52
52
  {
53
- "name": "surveyId",
53
+ "name": "id",
54
54
  "type": "string",
55
55
  "required": true
56
56
  },
57
57
  {
58
- "name": "respondentId",
58
+ "name": "row.id",
59
59
  "type": "string",
60
60
  "required": true
61
61
  },
62
62
  {
63
- "name": "questionId",
63
+ "name": "row.surveyId",
64
64
  "type": "string",
65
65
  "required": true
66
66
  },
67
67
  {
68
- "name": "answerJson",
69
- "type": "string"
68
+ "name": "row.respondentId",
69
+ "type": "string",
70
+ "required": true
70
71
  },
71
72
  {
72
- "name": "data",
73
- "type": "object",
73
+ "name": "row.questionId",
74
+ "type": "string",
74
75
  "required": true
76
+ },
77
+ {
78
+ "name": "row.answerJson",
79
+ "type": "string"
80
+ },
81
+ {
82
+ "name": "row.submittedAt",
83
+ "type": "string"
75
84
  }
76
85
  ]
77
86
  },
78
87
  {
79
- "event": "ResponseLoaded",
88
+ "event": "CLOSE_VIEW"
89
+ },
90
+ {
91
+ "event": "RESUBMIT",
80
92
  "payloadSchema": [
81
93
  {
82
- "name": "data",
83
- "type": "[Response]"
94
+ "name": "id",
95
+ "type": "string",
96
+ "required": true
84
97
  }
85
98
  ]
86
99
  },
87
100
  {
88
- "event": "ResponseLoadFailed",
101
+ "event": "DELETE_RESPONSE",
89
102
  "payloadSchema": [
90
103
  {
91
- "name": "error",
92
- "type": "string"
93
- },
94
- {
95
- "name": "code",
96
- "type": "string"
104
+ "name": "id",
105
+ "type": "string",
106
+ "required": true
97
107
  }
98
108
  ]
99
109
  },
100
110
  {
101
- "event": "ResponseSubmitted",
111
+ "event": "ResponseLoaded",
102
112
  "payloadSchema": [
103
113
  {
104
- "name": "row.id",
105
- "type": "string",
106
- "required": true
107
- },
108
- {
109
- "name": "row.surveyId",
110
- "type": "string",
111
- "required": true
112
- },
113
- {
114
- "name": "row.respondentId",
115
- "type": "string",
116
- "required": true
117
- },
118
- {
119
- "name": "row.questionId",
120
- "type": "string",
121
- "required": true
122
- },
123
- {
124
- "name": "row.answerJson",
125
- "type": "string"
126
- },
127
- {
128
- "name": "row.submittedAt",
129
- "type": "string"
114
+ "name": "data",
115
+ "type": "[Response]"
130
116
  }
131
117
  ]
132
118
  },
133
119
  {
134
- "event": "ResponseSubmitFailed",
120
+ "event": "ResponseLoadFailed",
135
121
  "payloadSchema": [
136
122
  {
137
123
  "name": "error",
@@ -154,7 +140,7 @@
154
140
  "name": "browsing"
155
141
  },
156
142
  {
157
- "name": "submitting"
143
+ "name": "viewing_single"
158
144
  },
159
145
  {
160
146
  "name": "error"
@@ -190,58 +176,45 @@
190
176
  ]
191
177
  },
192
178
  {
193
- "key": "SUBMIT",
194
- "name": "Submit",
179
+ "key": "OPEN_RESPONSE",
180
+ "name": "Open Response",
195
181
  "payloadSchema": [
196
182
  {
197
- "name": "surveyId",
183
+ "name": "id",
198
184
  "type": "string",
199
185
  "required": true
200
186
  },
201
187
  {
202
- "name": "respondentId",
203
- "type": "string",
204
- "required": true
205
- },
206
- {
207
- "name": "questionId",
208
- "type": "string",
209
- "required": true
210
- },
211
- {
212
- "name": "answerJson",
213
- "type": "string"
214
- },
215
- {
216
- "name": "data",
217
- "type": "object",
218
- "required": true
188
+ "name": "row",
189
+ "type": "Response"
219
190
  }
220
191
  ]
221
192
  },
222
193
  {
223
- "key": "ResponseSubmitted",
224
- "name": "Response submitted",
194
+ "key": "RESUBMIT",
195
+ "name": "Resubmit",
225
196
  "payloadSchema": [
226
197
  {
227
- "name": "row",
228
- "type": "Response"
198
+ "name": "id",
199
+ "type": "string",
200
+ "required": true
229
201
  }
230
202
  ]
231
203
  },
232
204
  {
233
- "key": "ResponseSubmitFailed",
234
- "name": "Response submit failed",
205
+ "key": "DELETE_RESPONSE",
206
+ "name": "Delete Response",
235
207
  "payloadSchema": [
236
208
  {
237
- "name": "error",
238
- "type": "string"
239
- },
240
- {
241
- "name": "code",
242
- "type": "string"
209
+ "name": "id",
210
+ "type": "string",
211
+ "required": true
243
212
  }
244
213
  ]
214
+ },
215
+ {
216
+ "key": "CLOSE_VIEW",
217
+ "name": "Close View"
245
218
  }
246
219
  ],
247
220
  "transitions": [
@@ -255,8 +228,8 @@
255
228
  "Response",
256
229
  {
257
230
  "emit": {
258
- "success": "ResponseLoaded",
259
- "failure": "ResponseLoadFailed"
231
+ "failure": "ResponseLoadFailed",
232
+ "success": "ResponseLoaded"
260
233
  }
261
234
  }
262
235
  ],
@@ -265,19 +238,19 @@
265
238
  "main",
266
239
  {
267
240
  "direction": "vertical",
268
- "align": "center",
269
- "className": "py-12",
270
241
  "type": "stack",
271
242
  "gap": "md",
243
+ "className": "py-12",
244
+ "align": "center",
272
245
  "children": [
273
246
  {
274
247
  "type": "spinner"
275
248
  },
276
249
  {
277
250
  "variant": "caption",
251
+ "color": "muted",
278
252
  "content": "Loading responses…",
279
- "type": "typography",
280
- "color": "muted"
253
+ "type": "typography"
281
254
  }
282
255
  ]
283
256
  }
@@ -294,44 +267,106 @@
294
267
  "main",
295
268
  {
296
269
  "direction": "vertical",
297
- "gap": "md",
298
270
  "type": "stack",
299
271
  "children": [
300
272
  {
301
- "content": "@config.title",
302
- "type": "typography",
303
- "variant": "h3"
273
+ "children": [
274
+ {
275
+ "type": "icon",
276
+ "name": "clipboard-list"
277
+ },
278
+ {
279
+ "type": "typography",
280
+ "content": "@config.title",
281
+ "variant": "h3"
282
+ }
283
+ ],
284
+ "align": "center",
285
+ "type": "stack",
286
+ "gap": "sm",
287
+ "direction": "horizontal"
304
288
  },
305
289
  {
306
- "type": "data-grid",
307
- "fields": [
290
+ "children": [
308
291
  {
309
- "label": "Question",
310
- "name": "questionId"
292
+ "type": "stat-display",
293
+ "value": "@payload.data.length",
294
+ "label": "Total responses",
295
+ "icon": "clipboard-list"
311
296
  },
312
297
  {
313
- "label": "Respondent",
314
- "name": "respondentId"
298
+ "label": "Completion",
299
+ "icon": "check-circle",
300
+ "value": "84%",
301
+ "type": "stat-display"
315
302
  },
316
303
  {
317
- "label": "Answer",
318
- "name": "answerJson"
304
+ "label": "Respondents",
305
+ "icon": "users",
306
+ "value": "312",
307
+ "type": "stat-display"
319
308
  },
320
309
  {
321
- "label": "Submitted",
322
- "name": "submittedAt"
310
+ "value": "6",
311
+ "type": "stat-display",
312
+ "icon": "file-text",
313
+ "label": "Surveys"
323
314
  }
324
315
  ],
316
+ "cols": 4.0,
317
+ "type": "simple-grid"
318
+ },
319
+ {
320
+ "type": "divider"
321
+ },
322
+ {
323
+ "type": "data-grid",
324
+ "gap": "sm",
325
+ "cols": 1.0,
325
326
  "itemActions": [
326
327
  {
327
- "event": "SUBMIT",
328
- "label": "View",
329
- "icon": "eye"
328
+ "event": "OPEN_RESPONSE",
329
+ "label": "Open",
330
+ "variant": "primary",
331
+ "icon": "arrow-right"
332
+ },
333
+ {
334
+ "variant": "danger",
335
+ "event": "DELETE_RESPONSE",
336
+ "label": "Delete"
330
337
  }
331
338
  ],
332
- "entity": "@payload.data"
339
+ "entity": "@payload.data",
340
+ "fields": [
341
+ {
342
+ "label": "Question",
343
+ "name": "questionId",
344
+ "variant": "caption"
345
+ },
346
+ {
347
+ "label": "Respondent",
348
+ "name": "respondentId",
349
+ "variant": "caption"
350
+ },
351
+ {
352
+ "name": "surveyId",
353
+ "label": "Survey",
354
+ "variant": "caption"
355
+ },
356
+ {
357
+ "name": "answerJson",
358
+ "variant": "caption",
359
+ "label": "Answer"
360
+ },
361
+ {
362
+ "variant": "caption",
363
+ "name": "submittedAt",
364
+ "label": "Submitted"
365
+ }
366
+ ]
333
367
  }
334
- ]
368
+ ],
369
+ "gap": "md"
335
370
  }
336
371
  ]
337
372
  ]
@@ -346,46 +381,216 @@
346
381
  "main",
347
382
  {
348
383
  "message": "@payload.error",
349
- "type": "alert",
350
- "variant": "error"
384
+ "variant": "error",
385
+ "type": "alert"
351
386
  }
352
387
  ]
353
388
  ]
354
389
  },
355
390
  {
356
391
  "from": "browsing",
357
- "to": "submitting",
358
- "event": "SUBMIT",
392
+ "to": "viewing_single",
393
+ "event": "OPEN_RESPONSE",
359
394
  "effects": [
395
+ [
396
+ "set",
397
+ "@entity.id",
398
+ "@payload.row.id"
399
+ ],
360
400
  [
361
401
  "set",
362
402
  "@entity.surveyId",
363
- "@payload.surveyId"
403
+ "@payload.row.surveyId"
364
404
  ],
365
405
  [
366
406
  "set",
367
407
  "@entity.respondentId",
368
- "@payload.respondentId"
408
+ "@payload.row.respondentId"
369
409
  ],
370
410
  [
371
411
  "set",
372
412
  "@entity.questionId",
373
- "@payload.questionId"
413
+ "@payload.row.questionId"
374
414
  ],
375
415
  [
376
416
  "set",
377
417
  "@entity.answerJson",
378
- "@payload.answerJson"
418
+ "@payload.row.answerJson"
419
+ ],
420
+ [
421
+ "set",
422
+ "@entity.submittedAt",
423
+ "@payload.row.submittedAt"
424
+ ],
425
+ [
426
+ "render-ui",
427
+ "main",
428
+ {
429
+ "direction": "vertical",
430
+ "gap": "md",
431
+ "children": [
432
+ {
433
+ "type": "stack",
434
+ "align": "center",
435
+ "direction": "horizontal",
436
+ "gap": "sm",
437
+ "children": [
438
+ {
439
+ "type": "button",
440
+ "label": "Back",
441
+ "variant": "ghost",
442
+ "action": "CLOSE_VIEW"
443
+ },
444
+ {
445
+ "name": "clipboard-list",
446
+ "type": "icon"
447
+ },
448
+ {
449
+ "variant": "h3",
450
+ "type": "typography",
451
+ "content": "@entity.respondentId"
452
+ },
453
+ {
454
+ "variant": "success",
455
+ "type": "badge",
456
+ "label": "Submitted"
457
+ }
458
+ ]
459
+ },
460
+ {
461
+ "type": "divider"
462
+ },
463
+ {
464
+ "gap": "sm",
465
+ "children": [
466
+ {
467
+ "type": "stack",
468
+ "gap": "md",
469
+ "direction": "horizontal",
470
+ "children": [
471
+ {
472
+ "variant": "caption",
473
+ "content": "Survey",
474
+ "color": "muted",
475
+ "type": "typography"
476
+ },
477
+ {
478
+ "content": "@entity.surveyId",
479
+ "type": "typography",
480
+ "variant": "body"
481
+ }
482
+ ]
483
+ },
484
+ {
485
+ "direction": "horizontal",
486
+ "children": [
487
+ {
488
+ "content": "Question",
489
+ "variant": "caption",
490
+ "color": "muted",
491
+ "type": "typography"
492
+ },
493
+ {
494
+ "content": "@entity.questionId",
495
+ "variant": "body",
496
+ "type": "typography"
497
+ }
498
+ ],
499
+ "gap": "md",
500
+ "type": "stack"
501
+ },
502
+ {
503
+ "direction": "horizontal",
504
+ "type": "stack",
505
+ "children": [
506
+ {
507
+ "content": "Answer",
508
+ "type": "typography",
509
+ "color": "muted",
510
+ "variant": "caption"
511
+ },
512
+ {
513
+ "type": "typography",
514
+ "content": "@entity.answerJson",
515
+ "variant": "body"
516
+ }
517
+ ],
518
+ "gap": "md"
519
+ }
520
+ ],
521
+ "direction": "vertical",
522
+ "type": "stack"
523
+ },
524
+ {
525
+ "type": "divider"
526
+ },
527
+ {
528
+ "children": [
529
+ {
530
+ "value": "@entity.respondentId",
531
+ "type": "stat-display",
532
+ "icon": "user",
533
+ "label": "Respondent"
534
+ },
535
+ {
536
+ "label": "Submitted",
537
+ "type": "stat-display",
538
+ "icon": "calendar",
539
+ "value": "@entity.submittedAt"
540
+ }
541
+ ],
542
+ "type": "simple-grid",
543
+ "cols": 2.0
544
+ },
545
+ {
546
+ "direction": "horizontal",
547
+ "gap": "sm",
548
+ "align": "center",
549
+ "children": [
550
+ {
551
+ "variant": "primary",
552
+ "type": "button",
553
+ "label": "Resubmit",
554
+ "actionPayload": {
555
+ "id": "@entity.id"
556
+ },
557
+ "action": "RESUBMIT"
558
+ },
559
+ {
560
+ "variant": "danger",
561
+ "action": "DELETE_RESPONSE",
562
+ "actionPayload": {
563
+ "id": "@entity.id"
564
+ },
565
+ "label": "Delete",
566
+ "type": "button"
567
+ }
568
+ ],
569
+ "type": "stack"
570
+ }
571
+ ],
572
+ "type": "stack"
573
+ }
574
+ ]
575
+ ]
576
+ },
577
+ {
578
+ "from": "browsing",
579
+ "to": "loading",
580
+ "event": "RESUBMIT",
581
+ "effects": [
582
+ [
583
+ "set",
584
+ "@entity.id",
585
+ "@payload.id"
379
586
  ],
380
587
  [
381
- "persist",
382
- "create",
588
+ "fetch",
383
589
  "Response",
384
- "@payload.data",
385
590
  {
386
591
  "emit": {
387
- "success": "ResponseSubmitted",
388
- "failure": "ResponseSubmitFailed"
592
+ "success": "ResponseLoaded",
593
+ "failure": "ResponseLoadFailed"
389
594
  }
390
595
  }
391
596
  ],
@@ -393,30 +598,74 @@
393
598
  "render-ui",
394
599
  "main",
395
600
  {
396
- "align": "center",
397
601
  "className": "py-12",
398
602
  "children": [
399
603
  {
400
604
  "type": "spinner"
401
605
  },
402
606
  {
403
- "color": "muted",
404
- "content": "Submitting response…",
607
+ "variant": "caption",
608
+ "content": "Resubmitting response…",
405
609
  "type": "typography",
406
- "variant": "caption"
610
+ "color": "muted"
407
611
  }
408
612
  ],
613
+ "type": "stack",
614
+ "direction": "vertical",
409
615
  "gap": "md",
616
+ "align": "center"
617
+ }
618
+ ]
619
+ ]
620
+ },
621
+ {
622
+ "from": "browsing",
623
+ "to": "loading",
624
+ "event": "DELETE_RESPONSE",
625
+ "effects": [
626
+ [
627
+ "set",
628
+ "@entity.id",
629
+ "@payload.id"
630
+ ],
631
+ [
632
+ "fetch",
633
+ "Response",
634
+ {
635
+ "emit": {
636
+ "failure": "ResponseLoadFailed",
637
+ "success": "ResponseLoaded"
638
+ }
639
+ }
640
+ ],
641
+ [
642
+ "render-ui",
643
+ "main",
644
+ {
410
645
  "type": "stack",
411
- "direction": "vertical"
646
+ "gap": "md",
647
+ "children": [
648
+ {
649
+ "type": "spinner"
650
+ },
651
+ {
652
+ "color": "muted",
653
+ "variant": "caption",
654
+ "type": "typography",
655
+ "content": "Deleting response…"
656
+ }
657
+ ],
658
+ "direction": "vertical",
659
+ "align": "center",
660
+ "className": "py-12"
412
661
  }
413
662
  ]
414
663
  ]
415
664
  },
416
665
  {
417
- "from": "submitting",
666
+ "from": "viewing_single",
418
667
  "to": "loading",
419
- "event": "ResponseSubmitted",
668
+ "event": "CLOSE_VIEW",
420
669
  "effects": [
421
670
  [
422
671
  "fetch",
@@ -432,18 +681,18 @@
432
681
  "render-ui",
433
682
  "main",
434
683
  {
684
+ "gap": "md",
435
685
  "direction": "vertical",
686
+ "align": "center",
436
687
  "className": "py-12",
437
688
  "type": "stack",
438
- "align": "center",
439
- "gap": "md",
440
689
  "children": [
441
690
  {
442
691
  "type": "spinner"
443
692
  },
444
693
  {
694
+ "content": "Loading responses…",
445
695
  "color": "muted",
446
- "content": "Refreshing responses…",
447
696
  "type": "typography",
448
697
  "variant": "caption"
449
698
  }
@@ -453,33 +702,66 @@
453
702
  ]
454
703
  },
455
704
  {
456
- "from": "submitting",
457
- "to": "error",
458
- "event": "ResponseSubmitFailed",
705
+ "from": "viewing_single",
706
+ "to": "loading",
707
+ "event": "RESUBMIT",
459
708
  "effects": [
709
+ [
710
+ "set",
711
+ "@entity.id",
712
+ "@payload.id"
713
+ ],
714
+ [
715
+ "fetch",
716
+ "Response",
717
+ {
718
+ "emit": {
719
+ "failure": "ResponseLoadFailed",
720
+ "success": "ResponseLoaded"
721
+ }
722
+ }
723
+ ],
460
724
  [
461
725
  "render-ui",
462
726
  "main",
463
727
  {
464
- "variant": "error",
465
- "type": "alert",
466
- "message": "@payload.error"
728
+ "type": "stack",
729
+ "direction": "vertical",
730
+ "align": "center",
731
+ "className": "py-12",
732
+ "gap": "md",
733
+ "children": [
734
+ {
735
+ "type": "spinner"
736
+ },
737
+ {
738
+ "variant": "caption",
739
+ "content": "Resubmitting response…",
740
+ "color": "muted",
741
+ "type": "typography"
742
+ }
743
+ ]
467
744
  }
468
745
  ]
469
746
  ]
470
747
  },
471
748
  {
472
- "from": "error",
749
+ "from": "viewing_single",
473
750
  "to": "loading",
474
- "event": "INIT",
751
+ "event": "DELETE_RESPONSE",
475
752
  "effects": [
753
+ [
754
+ "set",
755
+ "@entity.id",
756
+ "@payload.id"
757
+ ],
476
758
  [
477
759
  "fetch",
478
760
  "Response",
479
761
  {
480
762
  "emit": {
481
- "success": "ResponseLoaded",
482
- "failure": "ResponseLoadFailed"
763
+ "failure": "ResponseLoadFailed",
764
+ "success": "ResponseLoaded"
483
765
  }
484
766
  }
485
767
  ],
@@ -488,21 +770,46 @@
488
770
  "main",
489
771
  {
490
772
  "align": "center",
491
- "direction": "vertical",
492
- "type": "stack",
493
773
  "gap": "md",
774
+ "type": "stack",
494
775
  "className": "py-12",
495
776
  "children": [
496
777
  {
497
778
  "type": "spinner"
498
779
  },
499
780
  {
781
+ "content": "Deleting response…",
500
782
  "color": "muted",
501
- "content": "Loading responses…",
502
- "variant": "caption",
503
- "type": "typography"
783
+ "type": "typography",
784
+ "variant": "caption"
504
785
  }
505
- ]
786
+ ],
787
+ "direction": "vertical"
788
+ }
789
+ ]
790
+ ]
791
+ },
792
+ {
793
+ "from": "error",
794
+ "to": "loading",
795
+ "event": "INIT",
796
+ "effects": [
797
+ [
798
+ "fetch",
799
+ "Response",
800
+ {
801
+ "emit": {
802
+ "failure": "ResponseLoadFailed",
803
+ "success": "ResponseLoaded"
804
+ }
805
+ }
806
+ ],
807
+ [
808
+ "render-ui",
809
+ "main",
810
+ {
811
+ "type": "spinner",
812
+ "size": "sm"
506
813
  }
507
814
  ]
508
815
  ]