@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-drip-sequence",
3
3
  "version": "1.0.0",
4
- "description": "std-drip-sequence — ordered email drip campaign primitive. Owns a DripSequence collection; ACTIVATE flips a sequence live, PAUSE halts it, and load failures surface as alerts. Pure topology atom; downstream coordinators persist status flips.",
4
+ "description": "std-drip-sequence — ordered email drip campaign primitive. Lists sequences in `browsing`; opens detail in `viewing_single` with Activate / Pause / Archive actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "DripSequenceOrbital",
@@ -64,6 +64,53 @@
64
64
  "category": "interaction",
65
65
  "linkedEntity": "DripSequence",
66
66
  "emits": [
67
+ {
68
+ "event": "OPEN_SEQUENCE",
69
+ "payloadSchema": [
70
+ {
71
+ "name": "id",
72
+ "type": "string",
73
+ "required": true
74
+ },
75
+ {
76
+ "name": "row.id",
77
+ "type": "string",
78
+ "required": true
79
+ },
80
+ {
81
+ "name": "row.name",
82
+ "type": "string",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "row.description",
87
+ "type": "string"
88
+ },
89
+ {
90
+ "name": "row.triggerEvent",
91
+ "type": "string"
92
+ },
93
+ {
94
+ "name": "row.stepsJson",
95
+ "type": "string"
96
+ },
97
+ {
98
+ "name": "row.status",
99
+ "type": "string"
100
+ },
101
+ {
102
+ "name": "row.totalEnrolled",
103
+ "type": "number"
104
+ },
105
+ {
106
+ "name": "row.totalCompleted",
107
+ "type": "number"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "event": "CLOSE_VIEW"
113
+ },
67
114
  {
68
115
  "event": "ACTIVATE",
69
116
  "payloadSchema": [
@@ -116,6 +163,9 @@
116
163
  {
117
164
  "name": "browsing"
118
165
  },
166
+ {
167
+ "name": "viewing_single"
168
+ },
119
169
  {
120
170
  "name": "error"
121
171
  }
@@ -150,13 +200,17 @@
150
200
  ]
151
201
  },
152
202
  {
153
- "key": "ACTIVATE",
154
- "name": "Activate",
203
+ "key": "OPEN_SEQUENCE",
204
+ "name": "Open Sequence",
155
205
  "payloadSchema": [
156
206
  {
157
207
  "name": "id",
158
208
  "type": "string",
159
209
  "required": true
210
+ },
211
+ {
212
+ "name": "row",
213
+ "type": "DripSequence"
160
214
  }
161
215
  ]
162
216
  },
@@ -170,6 +224,21 @@
170
224
  "required": true
171
225
  }
172
226
  ]
227
+ },
228
+ {
229
+ "key": "CLOSE_VIEW",
230
+ "name": "Close View"
231
+ },
232
+ {
233
+ "key": "ACTIVATE",
234
+ "name": "Activate",
235
+ "payloadSchema": [
236
+ {
237
+ "name": "id",
238
+ "type": "string",
239
+ "required": true
240
+ }
241
+ ]
173
242
  }
174
243
  ],
175
244
  "transitions": [
@@ -192,22 +261,22 @@
192
261
  "render-ui",
193
262
  "main",
194
263
  {
195
- "gap": "md",
196
- "direction": "vertical",
197
- "type": "stack",
198
- "align": "center",
264
+ "className": "py-12",
199
265
  "children": [
200
266
  {
201
267
  "type": "spinner"
202
268
  },
203
269
  {
204
- "type": "typography",
205
270
  "color": "muted",
206
- "content": "Loading drip sequences…",
207
- "variant": "caption"
271
+ "type": "typography",
272
+ "variant": "caption",
273
+ "content": "Loading drip sequences…"
208
274
  }
209
275
  ],
210
- "className": "py-12"
276
+ "type": "stack",
277
+ "gap": "md",
278
+ "direction": "vertical",
279
+ "align": "center"
211
280
  }
212
281
  ]
213
282
  ]
@@ -221,57 +290,76 @@
221
290
  "render-ui",
222
291
  "main",
223
292
  {
293
+ "gap": "md",
294
+ "type": "stack",
224
295
  "children": [
225
296
  {
297
+ "type": "stack",
226
298
  "gap": "sm",
299
+ "direction": "horizontal",
300
+ "align": "center",
227
301
  "children": [
228
302
  {
229
- "name": "mail",
230
- "type": "icon"
303
+ "type": "icon",
304
+ "name": "mail"
231
305
  },
232
306
  {
307
+ "variant": "h3",
233
308
  "type": "typography",
234
- "content": "@config.title",
235
- "variant": "h3"
309
+ "content": "@config.title"
236
310
  }
237
- ],
238
- "type": "stack",
239
- "direction": "horizontal"
311
+ ]
240
312
  },
241
313
  {
242
- "type": "date-range-selector",
243
- "selected": "last-30-days",
244
- "options": [
245
- {
246
- "value": "last-7-days",
247
- "label": "Last 7 days"
248
- },
314
+ "children": [
249
315
  {
250
- "label": "Last 30 days",
251
- "value": "last-30-days"
316
+ "label": "Total sequences",
317
+ "value": "@payload.data.length",
318
+ "icon": "mail",
319
+ "type": "stat-display"
252
320
  },
253
321
  {
254
- "value": "last-90-days",
255
- "label": "Last 90 days"
322
+ "label": "Active",
323
+ "icon": "play-circle",
324
+ "type": "stat-display",
325
+ "value": "14"
256
326
  },
257
327
  {
258
- "label": "Year to date",
259
- "value": "year-to-date"
328
+ "type": "stat-display",
329
+ "icon": "users",
330
+ "value": "8,420",
331
+ "label": "Enrolled"
260
332
  },
261
333
  {
262
- "value": "all-time",
263
- "label": "All time"
334
+ "icon": "check-circle",
335
+ "type": "stat-display",
336
+ "label": "Completion rate",
337
+ "value": "67%"
264
338
  }
265
- ]
339
+ ],
340
+ "type": "simple-grid",
341
+ "cols": 4.0
266
342
  },
267
343
  {
268
344
  "type": "divider"
269
345
  },
270
346
  {
271
- "type": "data-grid",
347
+ "entity": "@payload.data",
272
348
  "cols": 1.0,
349
+ "itemActions": [
350
+ {
351
+ "variant": "primary",
352
+ "label": "Open",
353
+ "event": "OPEN_SEQUENCE",
354
+ "icon": "arrow-right"
355
+ },
356
+ {
357
+ "variant": "danger",
358
+ "event": "PAUSE",
359
+ "label": "Pause"
360
+ }
361
+ ],
273
362
  "gap": "sm",
274
- "entity": "@payload.data",
275
363
  "fields": [
276
364
  {
277
365
  "label": "Name",
@@ -279,19 +367,19 @@
279
367
  "name": "name"
280
368
  },
281
369
  {
282
- "label": "Description",
283
370
  "variant": "caption",
371
+ "label": "Description",
284
372
  "name": "description"
285
373
  },
286
374
  {
287
375
  "name": "triggerEvent",
288
- "variant": "caption",
289
- "label": "Trigger"
376
+ "label": "Trigger",
377
+ "variant": "caption"
290
378
  },
291
379
  {
292
380
  "name": "status",
293
- "label": "Status",
294
- "variant": "badge"
381
+ "variant": "badge",
382
+ "label": "Status"
295
383
  },
296
384
  {
297
385
  "variant": "caption",
@@ -299,51 +387,300 @@
299
387
  "name": "totalEnrolled"
300
388
  },
301
389
  {
302
- "label": "Completed",
303
390
  "name": "totalCompleted",
391
+ "label": "Completed",
304
392
  "variant": "caption"
305
393
  }
306
394
  ],
307
- "itemActions": [
395
+ "type": "data-grid"
396
+ }
397
+ ],
398
+ "direction": "vertical"
399
+ }
400
+ ]
401
+ ]
402
+ },
403
+ {
404
+ "from": "loading",
405
+ "to": "error",
406
+ "event": "DripSequenceLoadFailed",
407
+ "effects": [
408
+ [
409
+ "render-ui",
410
+ "main",
411
+ {
412
+ "type": "alert",
413
+ "variant": "error",
414
+ "message": "@payload.error"
415
+ }
416
+ ]
417
+ ]
418
+ },
419
+ {
420
+ "from": "browsing",
421
+ "to": "viewing_single",
422
+ "event": "OPEN_SEQUENCE",
423
+ "effects": [
424
+ [
425
+ "set",
426
+ "@entity.id",
427
+ "@payload.row.id"
428
+ ],
429
+ [
430
+ "set",
431
+ "@entity.name",
432
+ "@payload.row.name"
433
+ ],
434
+ [
435
+ "set",
436
+ "@entity.description",
437
+ "@payload.row.description"
438
+ ],
439
+ [
440
+ "set",
441
+ "@entity.triggerEvent",
442
+ "@payload.row.triggerEvent"
443
+ ],
444
+ [
445
+ "set",
446
+ "@entity.stepsJson",
447
+ "@payload.row.stepsJson"
448
+ ],
449
+ [
450
+ "set",
451
+ "@entity.status",
452
+ "@payload.row.status"
453
+ ],
454
+ [
455
+ "set",
456
+ "@entity.totalEnrolled",
457
+ "@payload.row.totalEnrolled"
458
+ ],
459
+ [
460
+ "set",
461
+ "@entity.totalCompleted",
462
+ "@payload.row.totalCompleted"
463
+ ],
464
+ [
465
+ "render-ui",
466
+ "main",
467
+ {
468
+ "gap": "md",
469
+ "type": "stack",
470
+ "children": [
471
+ {
472
+ "gap": "sm",
473
+ "type": "stack",
474
+ "direction": "horizontal",
475
+ "children": [
476
+ {
477
+ "variant": "ghost",
478
+ "label": "Back",
479
+ "type": "button",
480
+ "action": "CLOSE_VIEW"
481
+ },
482
+ {
483
+ "type": "icon",
484
+ "name": "mail"
485
+ },
486
+ {
487
+ "content": "@entity.name",
488
+ "variant": "h3",
489
+ "type": "typography"
490
+ },
308
491
  {
492
+ "type": "badge",
309
493
  "variant": "primary",
310
- "event": "ACTIVATE",
494
+ "label": "@entity.status"
495
+ }
496
+ ],
497
+ "align": "center"
498
+ },
499
+ {
500
+ "type": "divider"
501
+ },
502
+ {
503
+ "type": "stack",
504
+ "direction": "vertical",
505
+ "gap": "sm",
506
+ "children": [
507
+ {
508
+ "gap": "md",
509
+ "type": "stack",
510
+ "children": [
511
+ {
512
+ "color": "muted",
513
+ "variant": "caption",
514
+ "content": "Description",
515
+ "type": "typography"
516
+ },
517
+ {
518
+ "variant": "body",
519
+ "type": "typography",
520
+ "content": "@entity.description"
521
+ }
522
+ ],
523
+ "direction": "horizontal"
524
+ },
525
+ {
526
+ "children": [
527
+ {
528
+ "color": "muted",
529
+ "variant": "caption",
530
+ "type": "typography",
531
+ "content": "Trigger"
532
+ },
533
+ {
534
+ "variant": "body",
535
+ "type": "typography",
536
+ "content": "@entity.triggerEvent"
537
+ }
538
+ ],
539
+ "gap": "md",
540
+ "type": "stack",
541
+ "direction": "horizontal"
542
+ }
543
+ ]
544
+ },
545
+ {
546
+ "type": "divider"
547
+ },
548
+ {
549
+ "type": "simple-grid",
550
+ "children": [
551
+ {
552
+ "type": "stat-display",
553
+ "icon": "users",
554
+ "value": "@entity.totalEnrolled",
555
+ "label": "Enrolled"
556
+ },
557
+ {
558
+ "icon": "check-circle",
559
+ "value": "@entity.totalCompleted",
560
+ "type": "stat-display",
561
+ "label": "Completed"
562
+ }
563
+ ],
564
+ "cols": 2.0
565
+ },
566
+ {
567
+ "gap": "sm",
568
+ "align": "center",
569
+ "type": "stack",
570
+ "direction": "horizontal",
571
+ "children": [
572
+ {
573
+ "action": "ACTIVATE",
574
+ "actionPayload": {
575
+ "id": "@entity.id"
576
+ },
577
+ "variant": "primary",
578
+ "type": "button",
311
579
  "label": "Activate"
312
580
  },
313
581
  {
314
- "variant": "ghost",
582
+ "type": "button",
583
+ "action": "PAUSE",
584
+ "actionPayload": {
585
+ "id": "@entity.id"
586
+ },
315
587
  "label": "Pause",
316
- "event": "PAUSE"
588
+ "variant": "danger"
317
589
  }
318
590
  ]
319
591
  }
320
592
  ],
593
+ "direction": "vertical"
594
+ }
595
+ ]
596
+ ]
597
+ },
598
+ {
599
+ "from": "browsing",
600
+ "to": "loading",
601
+ "event": "PAUSE",
602
+ "effects": [
603
+ [
604
+ "set",
605
+ "@entity.id",
606
+ "@payload.id"
607
+ ],
608
+ [
609
+ "fetch",
610
+ "DripSequence",
611
+ {
612
+ "emit": {
613
+ "failure": "DripSequenceLoadFailed",
614
+ "success": "DripSequenceLoaded"
615
+ }
616
+ }
617
+ ],
618
+ [
619
+ "render-ui",
620
+ "main",
621
+ {
622
+ "className": "py-12",
321
623
  "gap": "md",
624
+ "align": "center",
322
625
  "direction": "vertical",
626
+ "children": [
627
+ {
628
+ "type": "spinner"
629
+ },
630
+ {
631
+ "type": "typography",
632
+ "variant": "caption",
633
+ "content": "Pausing sequence…",
634
+ "color": "muted"
635
+ }
636
+ ],
323
637
  "type": "stack"
324
638
  }
325
639
  ]
326
640
  ]
327
641
  },
328
642
  {
329
- "from": "loading",
330
- "to": "error",
331
- "event": "DripSequenceLoadFailed",
643
+ "from": "viewing_single",
644
+ "to": "loading",
645
+ "event": "CLOSE_VIEW",
332
646
  "effects": [
647
+ [
648
+ "fetch",
649
+ "DripSequence",
650
+ {
651
+ "emit": {
652
+ "success": "DripSequenceLoaded",
653
+ "failure": "DripSequenceLoadFailed"
654
+ }
655
+ }
656
+ ],
333
657
  [
334
658
  "render-ui",
335
659
  "main",
336
660
  {
337
- "message": "@payload.error",
338
- "variant": "error",
339
- "type": "alert"
661
+ "align": "center",
662
+ "className": "py-12",
663
+ "type": "stack",
664
+ "children": [
665
+ {
666
+ "type": "spinner"
667
+ },
668
+ {
669
+ "type": "typography",
670
+ "content": "Loading drip sequences…",
671
+ "color": "muted",
672
+ "variant": "caption"
673
+ }
674
+ ],
675
+ "gap": "md",
676
+ "direction": "vertical"
340
677
  }
341
678
  ]
342
679
  ]
343
680
  },
344
681
  {
345
- "from": "browsing",
346
- "to": "browsing",
682
+ "from": "viewing_single",
683
+ "to": "loading",
347
684
  "event": "ACTIVATE",
348
685
  "effects": [
349
686
  [
@@ -351,20 +688,43 @@
351
688
  "@entity.id",
352
689
  "@payload.id"
353
690
  ],
691
+ [
692
+ "fetch",
693
+ "DripSequence",
694
+ {
695
+ "emit": {
696
+ "success": "DripSequenceLoaded",
697
+ "failure": "DripSequenceLoadFailed"
698
+ }
699
+ }
700
+ ],
354
701
  [
355
702
  "render-ui",
356
703
  "main",
357
704
  {
358
- "type": "alert",
359
- "variant": "success",
360
- "message": "Drip sequence activated"
705
+ "className": "py-12",
706
+ "gap": "md",
707
+ "align": "center",
708
+ "children": [
709
+ {
710
+ "type": "spinner"
711
+ },
712
+ {
713
+ "content": "Activating sequence…",
714
+ "type": "typography",
715
+ "color": "muted",
716
+ "variant": "caption"
717
+ }
718
+ ],
719
+ "type": "stack",
720
+ "direction": "vertical"
361
721
  }
362
722
  ]
363
723
  ]
364
724
  },
365
725
  {
366
- "from": "browsing",
367
- "to": "browsing",
726
+ "from": "viewing_single",
727
+ "to": "loading",
368
728
  "event": "PAUSE",
369
729
  "effects": [
370
730
  [
@@ -372,13 +732,36 @@
372
732
  "@entity.id",
373
733
  "@payload.id"
374
734
  ],
735
+ [
736
+ "fetch",
737
+ "DripSequence",
738
+ {
739
+ "emit": {
740
+ "failure": "DripSequenceLoadFailed",
741
+ "success": "DripSequenceLoaded"
742
+ }
743
+ }
744
+ ],
375
745
  [
376
746
  "render-ui",
377
747
  "main",
378
748
  {
379
- "message": "Drip sequence paused",
380
- "variant": "info",
381
- "type": "alert"
749
+ "align": "center",
750
+ "gap": "md",
751
+ "type": "stack",
752
+ "className": "py-12",
753
+ "children": [
754
+ {
755
+ "type": "spinner"
756
+ },
757
+ {
758
+ "content": "Pausing sequence…",
759
+ "color": "muted",
760
+ "type": "typography",
761
+ "variant": "caption"
762
+ }
763
+ ],
764
+ "direction": "vertical"
382
765
  }
383
766
  ]
384
767
  ]