@almadar/std 14.26.0 → 14.27.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 (151) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  3. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  4. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  5. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  6. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  7. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  8. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  9. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  10. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  11. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  12. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  13. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  14. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  15. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  16. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  17. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  18. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  19. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  20. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  21. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  22. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  23. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  24. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  25. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  26. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  27. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  28. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  29. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  30. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  31. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  32. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  33. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  34. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  35. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  36. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  37. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  38. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  39. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  40. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  41. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  42. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  43. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  44. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  45. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  46. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  47. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  48. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  49. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  50. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  51. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  52. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  53. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  54. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  55. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  56. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  57. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  58. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  59. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  60. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  61. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  62. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  63. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  64. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  65. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  66. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  67. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  68. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  69. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  70. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  71. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  72. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  73. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  74. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  75. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  76. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  77. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  78. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  79. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  80. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  81. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  82. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  83. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  84. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  85. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  86. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  87. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  88. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  89. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  90. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  91. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  92. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  93. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  94. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  95. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  96. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  97. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  98. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  99. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  100. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  101. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  102. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  103. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  104. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  105. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  106. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  107. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  108. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  109. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  110. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  111. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  112. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  113. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  114. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  115. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  116. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  117. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  118. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  119. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  120. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  121. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  122. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  123. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  124. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  125. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  126. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  127. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  128. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  129. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  130. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  131. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  132. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  133. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  134. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  135. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  136. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  137. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  138. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  139. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  140. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  141. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  142. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  143. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  144. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  145. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  146. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  147. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  148. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  149. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  150. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  151. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-email-broadcast",
3
3
  "version": "1.0.0",
4
- "description": "std-email-broadcast — send an email blast to a segment of contacts using a chosen template; tracks send progress.",
4
+ "description": "std-email-broadcast — send an email blast to a segment of contacts using a chosen template. Lists broadcasts in `browsing`; opens detail in `viewing_single` with Send / Cancel actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "EmailBroadcastOrbital",
@@ -70,6 +70,57 @@
70
70
  "category": "interaction",
71
71
  "linkedEntity": "EmailBroadcast",
72
72
  "emits": [
73
+ {
74
+ "event": "OPEN_BROADCAST",
75
+ "payloadSchema": [
76
+ {
77
+ "name": "id",
78
+ "type": "string",
79
+ "required": true
80
+ },
81
+ {
82
+ "name": "row.id",
83
+ "type": "string",
84
+ "required": true
85
+ },
86
+ {
87
+ "name": "row.name",
88
+ "type": "string",
89
+ "required": true
90
+ },
91
+ {
92
+ "name": "row.subject",
93
+ "type": "string"
94
+ },
95
+ {
96
+ "name": "row.segmentId",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "row.templateId",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "name": "row.status",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "row.scheduledAt",
109
+ "type": "string"
110
+ },
111
+ {
112
+ "name": "row.recipientCount",
113
+ "type": "number"
114
+ },
115
+ {
116
+ "name": "row.sentCount",
117
+ "type": "number"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "event": "CLOSE_VIEW"
123
+ },
73
124
  {
74
125
  "event": "SEND",
75
126
  "payloadSchema": [
@@ -80,6 +131,16 @@
80
131
  }
81
132
  ]
82
133
  },
134
+ {
135
+ "event": "CANCEL_BROADCAST",
136
+ "payloadSchema": [
137
+ {
138
+ "name": "id",
139
+ "type": "string",
140
+ "required": true
141
+ }
142
+ ]
143
+ },
83
144
  {
84
145
  "event": "EmailBroadcastLoaded",
85
146
  "payloadSchema": [
@@ -101,15 +162,6 @@
101
162
  "type": "string"
102
163
  }
103
164
  ]
104
- },
105
- {
106
- "event": "BroadcastSent",
107
- "payloadSchema": [
108
- {
109
- "name": "id",
110
- "type": "string"
111
- }
112
- ]
113
165
  }
114
166
  ],
115
167
  "stateMachine": {
@@ -122,7 +174,7 @@
122
174
  "name": "browsing"
123
175
  },
124
176
  {
125
- "name": "sending"
177
+ "name": "viewing_single"
126
178
  },
127
179
  {
128
180
  "name": "error"
@@ -158,23 +210,43 @@
158
210
  ]
159
211
  },
160
212
  {
161
- "key": "SEND",
162
- "name": "Send",
213
+ "key": "OPEN_BROADCAST",
214
+ "name": "Open Broadcast",
163
215
  "payloadSchema": [
164
216
  {
165
- "name": "broadcastId",
217
+ "name": "id",
166
218
  "type": "string",
167
219
  "required": true
220
+ },
221
+ {
222
+ "name": "row",
223
+ "type": "EmailBroadcast"
168
224
  }
169
225
  ]
170
226
  },
171
227
  {
172
- "key": "BroadcastSent",
173
- "name": "Broadcast sent",
228
+ "key": "CANCEL_BROADCAST",
229
+ "name": "Cancel Broadcast",
174
230
  "payloadSchema": [
175
231
  {
176
232
  "name": "id",
177
- "type": "string"
233
+ "type": "string",
234
+ "required": true
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "key": "CLOSE_VIEW",
240
+ "name": "Close View"
241
+ },
242
+ {
243
+ "key": "SEND",
244
+ "name": "Send",
245
+ "payloadSchema": [
246
+ {
247
+ "name": "broadcastId",
248
+ "type": "string",
249
+ "required": true
178
250
  }
179
251
  ]
180
252
  }
@@ -199,22 +271,22 @@
199
271
  "render-ui",
200
272
  "main",
201
273
  {
202
- "gap": "md",
203
- "type": "stack",
204
- "direction": "vertical",
205
274
  "align": "center",
206
- "className": "py-12",
207
275
  "children": [
208
276
  {
209
277
  "type": "spinner"
210
278
  },
211
279
  {
212
- "color": "muted",
213
280
  "type": "typography",
214
- "content": "Loading broadcasts…",
215
- "variant": "caption"
281
+ "variant": "caption",
282
+ "color": "muted",
283
+ "content": "Loading broadcasts…"
216
284
  }
217
- ]
285
+ ],
286
+ "gap": "md",
287
+ "className": "py-12",
288
+ "type": "stack",
289
+ "direction": "vertical"
218
290
  }
219
291
  ]
220
292
  ]
@@ -228,15 +300,14 @@
228
300
  "render-ui",
229
301
  "main",
230
302
  {
231
- "direction": "vertical",
232
- "gap": "md",
233
303
  "type": "stack",
304
+ "direction": "vertical",
234
305
  "children": [
235
306
  {
236
307
  "children": [
237
308
  {
238
- "type": "icon",
239
- "name": "mail"
309
+ "name": "mail",
310
+ "type": "icon"
240
311
  },
241
312
  {
242
313
  "content": "@config.title",
@@ -244,50 +315,72 @@
244
315
  "variant": "h3"
245
316
  }
246
317
  ],
247
- "type": "stack",
318
+ "direction": "horizontal",
319
+ "align": "center",
248
320
  "gap": "sm",
249
- "direction": "horizontal"
321
+ "type": "stack"
322
+ },
323
+ {
324
+ "type": "simple-grid",
325
+ "cols": 4.0,
326
+ "children": [
327
+ {
328
+ "value": "@payload.data.length",
329
+ "icon": "mail",
330
+ "label": "Total broadcasts",
331
+ "type": "stat-display"
332
+ },
333
+ {
334
+ "icon": "send",
335
+ "type": "stat-display",
336
+ "label": "Sent this month",
337
+ "value": "23"
338
+ },
339
+ {
340
+ "value": "41%",
341
+ "label": "Open rate",
342
+ "icon": "eye",
343
+ "type": "stat-display"
344
+ },
345
+ {
346
+ "value": "12%",
347
+ "type": "stat-display",
348
+ "icon": "mouse-pointer",
349
+ "label": "Click rate"
350
+ }
351
+ ]
250
352
  },
251
353
  {
252
354
  "type": "divider"
253
355
  },
254
356
  {
255
357
  "entity": "@payload.data",
256
- "itemActions": [
257
- {
258
- "label": "Send",
259
- "variant": "primary",
260
- "event": "SEND",
261
- "icon": "send"
262
- }
263
- ],
264
358
  "type": "data-grid",
265
- "gap": "sm",
266
359
  "fields": [
267
360
  {
361
+ "name": "name",
268
362
  "label": "Name",
269
- "variant": "caption",
270
- "name": "name"
363
+ "variant": "caption"
271
364
  },
272
365
  {
366
+ "variant": "caption",
273
367
  "name": "subject",
274
- "label": "Subject",
275
- "variant": "caption"
368
+ "label": "Subject"
276
369
  },
277
370
  {
371
+ "name": "status",
278
372
  "label": "Status",
279
- "variant": "badge",
280
- "name": "status"
373
+ "variant": "badge"
281
374
  },
282
375
  {
283
- "name": "recipientCount",
376
+ "variant": "caption",
284
377
  "label": "Recipients",
285
- "variant": "badge"
378
+ "name": "recipientCount"
286
379
  },
287
380
  {
288
- "name": "sentCount",
289
381
  "label": "Sent",
290
- "variant": "badge"
382
+ "variant": "caption",
383
+ "name": "sentCount"
291
384
  },
292
385
  {
293
386
  "name": "scheduledAt",
@@ -295,9 +388,24 @@
295
388
  "variant": "caption"
296
389
  }
297
390
  ],
298
- "cols": 1.0
391
+ "cols": 1.0,
392
+ "gap": "sm",
393
+ "itemActions": [
394
+ {
395
+ "event": "OPEN_BROADCAST",
396
+ "label": "Open",
397
+ "variant": "primary",
398
+ "icon": "arrow-right"
399
+ },
400
+ {
401
+ "label": "Cancel",
402
+ "event": "CANCEL_BROADCAST",
403
+ "variant": "danger"
404
+ }
405
+ ]
299
406
  }
300
- ]
407
+ ],
408
+ "gap": "md"
301
409
  }
302
410
  ]
303
411
  ]
@@ -311,16 +419,308 @@
311
419
  "render-ui",
312
420
  "main",
313
421
  {
422
+ "type": "alert",
314
423
  "message": "@payload.error",
315
- "variant": "error",
316
- "type": "alert"
424
+ "variant": "error"
425
+ }
426
+ ]
427
+ ]
428
+ },
429
+ {
430
+ "from": "browsing",
431
+ "to": "viewing_single",
432
+ "event": "OPEN_BROADCAST",
433
+ "effects": [
434
+ [
435
+ "set",
436
+ "@entity.id",
437
+ "@payload.row.id"
438
+ ],
439
+ [
440
+ "set",
441
+ "@entity.name",
442
+ "@payload.row.name"
443
+ ],
444
+ [
445
+ "set",
446
+ "@entity.subject",
447
+ "@payload.row.subject"
448
+ ],
449
+ [
450
+ "set",
451
+ "@entity.segmentId",
452
+ "@payload.row.segmentId"
453
+ ],
454
+ [
455
+ "set",
456
+ "@entity.templateId",
457
+ "@payload.row.templateId"
458
+ ],
459
+ [
460
+ "set",
461
+ "@entity.status",
462
+ "@payload.row.status"
463
+ ],
464
+ [
465
+ "set",
466
+ "@entity.scheduledAt",
467
+ "@payload.row.scheduledAt"
468
+ ],
469
+ [
470
+ "set",
471
+ "@entity.recipientCount",
472
+ "@payload.row.recipientCount"
473
+ ],
474
+ [
475
+ "set",
476
+ "@entity.sentCount",
477
+ "@payload.row.sentCount"
478
+ ],
479
+ [
480
+ "render-ui",
481
+ "main",
482
+ {
483
+ "children": [
484
+ {
485
+ "type": "stack",
486
+ "align": "center",
487
+ "gap": "sm",
488
+ "children": [
489
+ {
490
+ "label": "Back",
491
+ "type": "button",
492
+ "variant": "ghost",
493
+ "action": "CLOSE_VIEW"
494
+ },
495
+ {
496
+ "type": "icon",
497
+ "name": "mail"
498
+ },
499
+ {
500
+ "variant": "h3",
501
+ "content": "@entity.name",
502
+ "type": "typography"
503
+ },
504
+ {
505
+ "variant": "primary",
506
+ "type": "badge",
507
+ "label": "@entity.status"
508
+ }
509
+ ],
510
+ "direction": "horizontal"
511
+ },
512
+ {
513
+ "type": "divider"
514
+ },
515
+ {
516
+ "direction": "vertical",
517
+ "gap": "sm",
518
+ "children": [
519
+ {
520
+ "type": "stack",
521
+ "children": [
522
+ {
523
+ "type": "typography",
524
+ "color": "muted",
525
+ "content": "Subject",
526
+ "variant": "caption"
527
+ },
528
+ {
529
+ "content": "@entity.subject",
530
+ "type": "typography",
531
+ "variant": "body"
532
+ }
533
+ ],
534
+ "gap": "md",
535
+ "direction": "horizontal"
536
+ },
537
+ {
538
+ "type": "stack",
539
+ "children": [
540
+ {
541
+ "color": "muted",
542
+ "type": "typography",
543
+ "variant": "caption",
544
+ "content": "Segment"
545
+ },
546
+ {
547
+ "type": "typography",
548
+ "content": "@entity.segmentId",
549
+ "variant": "body"
550
+ }
551
+ ],
552
+ "direction": "horizontal",
553
+ "gap": "md"
554
+ },
555
+ {
556
+ "children": [
557
+ {
558
+ "type": "typography",
559
+ "content": "Template",
560
+ "color": "muted",
561
+ "variant": "caption"
562
+ },
563
+ {
564
+ "type": "typography",
565
+ "content": "@entity.templateId",
566
+ "variant": "body"
567
+ }
568
+ ],
569
+ "direction": "horizontal",
570
+ "gap": "md",
571
+ "type": "stack"
572
+ }
573
+ ],
574
+ "type": "stack"
575
+ },
576
+ {
577
+ "type": "divider"
578
+ },
579
+ {
580
+ "cols": 3.0,
581
+ "children": [
582
+ {
583
+ "value": "@entity.recipientCount",
584
+ "type": "stat-display",
585
+ "label": "Recipients",
586
+ "icon": "users"
587
+ },
588
+ {
589
+ "label": "Sent",
590
+ "icon": "send",
591
+ "value": "@entity.sentCount",
592
+ "type": "stat-display"
593
+ },
594
+ {
595
+ "icon": "calendar",
596
+ "label": "Scheduled",
597
+ "type": "stat-display",
598
+ "value": "@entity.scheduledAt"
599
+ }
600
+ ],
601
+ "type": "simple-grid"
602
+ },
603
+ {
604
+ "align": "center",
605
+ "direction": "horizontal",
606
+ "children": [
607
+ {
608
+ "variant": "primary",
609
+ "type": "button",
610
+ "label": "Send Now",
611
+ "action": "SEND",
612
+ "actionPayload": {
613
+ "broadcastId": "@entity.id",
614
+ "id": "@entity.id"
615
+ }
616
+ },
617
+ {
618
+ "action": "CANCEL_BROADCAST",
619
+ "label": "Cancel",
620
+ "actionPayload": {
621
+ "id": "@entity.id"
622
+ },
623
+ "type": "button",
624
+ "variant": "danger"
625
+ }
626
+ ],
627
+ "type": "stack",
628
+ "gap": "sm"
629
+ }
630
+ ],
631
+ "gap": "md",
632
+ "type": "stack",
633
+ "direction": "vertical"
317
634
  }
318
635
  ]
319
636
  ]
320
637
  },
321
638
  {
322
639
  "from": "browsing",
323
- "to": "sending",
640
+ "to": "loading",
641
+ "event": "CANCEL_BROADCAST",
642
+ "effects": [
643
+ [
644
+ "set",
645
+ "@entity.id",
646
+ "@payload.id"
647
+ ],
648
+ [
649
+ "fetch",
650
+ "EmailBroadcast",
651
+ {
652
+ "emit": {
653
+ "success": "EmailBroadcastLoaded",
654
+ "failure": "EmailBroadcastLoadFailed"
655
+ }
656
+ }
657
+ ],
658
+ [
659
+ "render-ui",
660
+ "main",
661
+ {
662
+ "align": "center",
663
+ "direction": "vertical",
664
+ "className": "py-12",
665
+ "children": [
666
+ {
667
+ "type": "spinner"
668
+ },
669
+ {
670
+ "content": "Cancelling broadcast…",
671
+ "variant": "caption",
672
+ "type": "typography",
673
+ "color": "muted"
674
+ }
675
+ ],
676
+ "gap": "md",
677
+ "type": "stack"
678
+ }
679
+ ]
680
+ ]
681
+ },
682
+ {
683
+ "from": "viewing_single",
684
+ "to": "loading",
685
+ "event": "CLOSE_VIEW",
686
+ "effects": [
687
+ [
688
+ "fetch",
689
+ "EmailBroadcast",
690
+ {
691
+ "emit": {
692
+ "success": "EmailBroadcastLoaded",
693
+ "failure": "EmailBroadcastLoadFailed"
694
+ }
695
+ }
696
+ ],
697
+ [
698
+ "render-ui",
699
+ "main",
700
+ {
701
+ "children": [
702
+ {
703
+ "type": "spinner"
704
+ },
705
+ {
706
+ "variant": "caption",
707
+ "color": "muted",
708
+ "type": "typography",
709
+ "content": "Loading broadcasts…"
710
+ }
711
+ ],
712
+ "className": "py-12",
713
+ "direction": "vertical",
714
+ "gap": "md",
715
+ "type": "stack",
716
+ "align": "center"
717
+ }
718
+ ]
719
+ ]
720
+ },
721
+ {
722
+ "from": "viewing_single",
723
+ "to": "loading",
324
724
  "event": "SEND",
325
725
  "effects": [
326
726
  [
@@ -329,26 +729,79 @@
329
729
  "@payload.broadcastId"
330
730
  ],
331
731
  [
332
- "emit",
333
- "BroadcastSent",
732
+ "fetch",
733
+ "EmailBroadcast",
334
734
  {
335
- "id": "@payload.broadcastId"
735
+ "emit": {
736
+ "failure": "EmailBroadcastLoadFailed",
737
+ "success": "EmailBroadcastLoaded"
738
+ }
739
+ }
740
+ ],
741
+ [
742
+ "render-ui",
743
+ "main",
744
+ {
745
+ "className": "py-12",
746
+ "children": [
747
+ {
748
+ "type": "spinner"
749
+ },
750
+ {
751
+ "type": "typography",
752
+ "variant": "caption",
753
+ "color": "muted",
754
+ "content": "Sending broadcast…"
755
+ }
756
+ ],
757
+ "type": "stack",
758
+ "gap": "md",
759
+ "align": "center",
760
+ "direction": "vertical"
336
761
  }
337
762
  ]
338
763
  ]
339
764
  },
340
765
  {
341
- "from": "sending",
342
- "to": "browsing",
343
- "event": "BroadcastSent",
766
+ "from": "viewing_single",
767
+ "to": "loading",
768
+ "event": "CANCEL_BROADCAST",
344
769
  "effects": [
770
+ [
771
+ "set",
772
+ "@entity.id",
773
+ "@payload.id"
774
+ ],
775
+ [
776
+ "fetch",
777
+ "EmailBroadcast",
778
+ {
779
+ "emit": {
780
+ "success": "EmailBroadcastLoaded",
781
+ "failure": "EmailBroadcastLoadFailed"
782
+ }
783
+ }
784
+ ],
345
785
  [
346
786
  "render-ui",
347
787
  "main",
348
788
  {
349
- "message": "Broadcast sent",
350
- "type": "alert",
351
- "variant": "success"
789
+ "gap": "md",
790
+ "type": "stack",
791
+ "direction": "vertical",
792
+ "align": "center",
793
+ "className": "py-12",
794
+ "children": [
795
+ {
796
+ "type": "spinner"
797
+ },
798
+ {
799
+ "type": "typography",
800
+ "variant": "caption",
801
+ "color": "muted",
802
+ "content": "Cancelling broadcast…"
803
+ }
804
+ ]
352
805
  }
353
806
  ]
354
807
  ]