@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-donor",
3
3
  "version": "1.0.0",
4
- "description": "std-donor — donor primitive: person or organization that has donated to a nonprofit, with lifetime giving total and contact info.",
4
+ "description": "std-donor — nonprofit donor primitive (person or org with lifetime giving total). Lists donors in `browsing`; opens donor detail in `viewing_single` with Thank / Solicit actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "DonorOrbital",
@@ -75,7 +75,7 @@
75
75
  "linkedEntity": "Donor",
76
76
  "emits": [
77
77
  {
78
- "event": "THANK_DONOR",
78
+ "event": "OPEN_DONOR",
79
79
  "payloadSchema": [
80
80
  {
81
81
  "name": "id",
@@ -127,54 +127,25 @@
127
127
  ]
128
128
  },
129
129
  {
130
- "event": "SOLICIT_DONOR",
130
+ "event": "CLOSE_VIEW"
131
+ },
132
+ {
133
+ "event": "THANK_DONOR",
131
134
  "payloadSchema": [
132
135
  {
133
136
  "name": "id",
134
137
  "type": "string",
135
138
  "required": true
136
- },
137
- {
138
- "name": "row.id",
139
- "type": "string",
140
- "required": true
141
- },
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "event": "SOLICIT_DONOR",
144
+ "payloadSchema": [
142
145
  {
143
- "name": "row.name",
146
+ "name": "id",
144
147
  "type": "string",
145
148
  "required": true
146
- },
147
- {
148
- "name": "row.email",
149
- "type": "string"
150
- },
151
- {
152
- "name": "row.phone",
153
- "type": "string"
154
- },
155
- {
156
- "name": "row.donorType",
157
- "type": "string"
158
- },
159
- {
160
- "name": "row.lifetimeAmount",
161
- "type": "number"
162
- },
163
- {
164
- "name": "row.firstDonationAt",
165
- "type": "string"
166
- },
167
- {
168
- "name": "row.lastDonationAt",
169
- "type": "string"
170
- },
171
- {
172
- "name": "row.preferredCampaign",
173
- "type": "string"
174
- },
175
- {
176
- "name": "row.isRecurring",
177
- "type": "boolean"
178
149
  }
179
150
  ]
180
151
  },
@@ -210,6 +181,9 @@
210
181
  {
211
182
  "name": "browsing"
212
183
  },
184
+ {
185
+ "name": "viewing_single"
186
+ },
213
187
  {
214
188
  "name": "error"
215
189
  }
@@ -243,6 +217,21 @@
243
217
  }
244
218
  ]
245
219
  },
220
+ {
221
+ "key": "OPEN_DONOR",
222
+ "name": "Open Donor",
223
+ "payloadSchema": [
224
+ {
225
+ "name": "id",
226
+ "type": "string",
227
+ "required": true
228
+ },
229
+ {
230
+ "name": "row",
231
+ "type": "Donor"
232
+ }
233
+ ]
234
+ },
246
235
  {
247
236
  "key": "THANK_DONOR",
248
237
  "name": "Thank Donor",
@@ -254,6 +243,10 @@
254
243
  }
255
244
  ]
256
245
  },
246
+ {
247
+ "key": "CLOSE_VIEW",
248
+ "name": "Close View"
249
+ },
257
250
  {
258
251
  "key": "SOLICIT_DONOR",
259
252
  "name": "Solicit Donor",
@@ -277,8 +270,8 @@
277
270
  "Donor",
278
271
  {
279
272
  "emit": {
280
- "failure": "DonorLoadFailed",
281
- "success": "DonorLoaded"
273
+ "success": "DonorLoaded",
274
+ "failure": "DonorLoadFailed"
282
275
  }
283
276
  }
284
277
  ],
@@ -286,6 +279,11 @@
286
279
  "render-ui",
287
280
  "main",
288
281
  {
282
+ "align": "center",
283
+ "gap": "md",
284
+ "type": "stack",
285
+ "direction": "vertical",
286
+ "className": "py-12",
289
287
  "children": [
290
288
  {
291
289
  "type": "spinner"
@@ -293,15 +291,10 @@
293
291
  {
294
292
  "type": "typography",
295
293
  "color": "muted",
296
- "content": "Loading donors…",
297
- "variant": "caption"
294
+ "variant": "caption",
295
+ "content": "Loading donors…"
298
296
  }
299
- ],
300
- "type": "stack",
301
- "gap": "md",
302
- "direction": "vertical",
303
- "align": "center",
304
- "className": "py-12"
297
+ ]
305
298
  }
306
299
  ]
307
300
  ]
@@ -315,104 +308,81 @@
315
308
  "render-ui",
316
309
  "main",
317
310
  {
311
+ "type": "stack",
318
312
  "direction": "vertical",
319
313
  "gap": "md",
320
- "type": "stack",
321
314
  "children": [
322
315
  {
323
- "direction": "horizontal",
324
- "align": "center",
325
316
  "type": "stack",
317
+ "direction": "horizontal",
326
318
  "children": [
327
319
  {
328
320
  "type": "icon",
329
- "name": "heart-handshake"
321
+ "name": "heart"
330
322
  },
331
323
  {
332
324
  "variant": "h3",
333
- "content": "@config.title",
334
- "type": "typography"
335
- },
336
- {
337
- "type": "avatar",
338
- "name": "Top donor",
339
- "src": "https://i.pravatar.cc/64?u=top-donor"
325
+ "type": "typography",
326
+ "content": "@config.title"
340
327
  }
341
328
  ],
342
- "gap": "sm"
329
+ "gap": "sm",
330
+ "align": "center"
343
331
  },
344
332
  {
345
- "direction": "horizontal",
346
- "gap": "md",
333
+ "cols": 4.0,
347
334
  "children": [
348
335
  {
349
- "type": "flip-card",
350
- "front": {
351
- "bio": "Gives monthly since 2020",
352
- "avatar": "https://i.pravatar.cc/120?u=sarah",
353
- "name": "Sarah Johnson",
354
- "type": "team-card",
355
- "role": "Top recurring donor"
356
- },
357
- "back": {
358
- "gap": "sm",
359
- "direction": "vertical",
360
- "children": [
361
- {
362
- "type": "typography",
363
- "content": "Lifetime giving",
364
- "variant": "h4"
365
- },
366
- {
367
- "content": "$24,500 across 48 gifts",
368
- "variant": "body",
369
- "type": "typography"
370
- }
371
- ],
372
- "type": "stack"
373
- }
336
+ "value": "@payload.data.length",
337
+ "icon": "heart",
338
+ "label": "Total donors",
339
+ "type": "stat-display"
340
+ },
341
+ {
342
+ "type": "stat-display",
343
+ "label": "Recurring",
344
+ "value": "184",
345
+ "icon": "refresh-cw"
374
346
  },
375
347
  {
376
- "type": "team-card",
377
- "avatar": "https://i.pravatar.cc/120?u=lead",
378
- "role": "Field coordinator",
379
- "name": "Volunteer Team Lead",
380
- "bio": "Leads our regional volunteer corps"
348
+ "type": "stat-display",
349
+ "icon": "dollar-sign",
350
+ "value": "$2.4M",
351
+ "label": "Total lifetime"
352
+ },
353
+ {
354
+ "label": "Avg gift",
355
+ "icon": "trending-up",
356
+ "value": "$148",
357
+ "type": "stat-display"
381
358
  }
382
359
  ],
383
- "type": "stack"
384
- },
385
- {
386
- "type": "team-organism"
360
+ "type": "simple-grid"
387
361
  },
388
362
  {
389
363
  "type": "divider"
390
364
  },
391
365
  {
392
- "entity": "@payload.data",
393
- "cols": 1.0,
394
366
  "itemActions": [
395
367
  {
396
368
  "variant": "primary",
397
- "label": "Thank",
398
- "event": "THANK_DONOR"
369
+ "event": "OPEN_DONOR",
370
+ "label": "Open",
371
+ "icon": "arrow-right"
399
372
  },
400
373
  {
401
- "event": "SOLICIT_DONOR",
402
- "variant": "ghost",
403
- "label": "Solicit"
374
+ "event": "THANK_DONOR",
375
+ "label": "Thank",
376
+ "variant": "secondary"
404
377
  }
405
378
  ],
379
+ "entity": "@payload.data",
380
+ "type": "data-grid",
406
381
  "fields": [
407
382
  {
408
- "name": "name",
409
- "variant": "caption",
410
- "label": "Name"
411
- },
412
- {
413
- "variant": "caption",
414
- "name": "email",
415
- "label": "Email"
383
+ "label": "Name",
384
+ "variant": "h4",
385
+ "name": "name"
416
386
  },
417
387
  {
418
388
  "variant": "badge",
@@ -420,18 +390,21 @@
420
390
  "name": "donorType"
421
391
  },
422
392
  {
423
- "name": "lifetimeAmount",
393
+ "variant": "body",
394
+ "name": "email",
395
+ "label": "Email"
396
+ },
397
+ {
424
398
  "variant": "caption",
425
- "label": "Lifetime"
399
+ "label": "Lifetime",
400
+ "name": "lifetimeAmount"
426
401
  },
427
402
  {
428
- "name": "lastDonationAt",
429
403
  "variant": "caption",
430
- "label": "Last Gift"
404
+ "label": "Last gift",
405
+ "name": "lastDonationAt"
431
406
  }
432
- ],
433
- "type": "data-grid",
434
- "gap": "sm"
407
+ ]
435
408
  }
436
409
  ]
437
410
  }
@@ -456,7 +429,215 @@
456
429
  },
457
430
  {
458
431
  "from": "browsing",
459
- "to": "browsing",
432
+ "to": "viewing_single",
433
+ "event": "OPEN_DONOR",
434
+ "effects": [
435
+ [
436
+ "set",
437
+ "@entity.id",
438
+ "@payload.row.id"
439
+ ],
440
+ [
441
+ "set",
442
+ "@entity.name",
443
+ "@payload.row.name"
444
+ ],
445
+ [
446
+ "set",
447
+ "@entity.email",
448
+ "@payload.row.email"
449
+ ],
450
+ [
451
+ "set",
452
+ "@entity.phone",
453
+ "@payload.row.phone"
454
+ ],
455
+ [
456
+ "set",
457
+ "@entity.donorType",
458
+ "@payload.row.donorType"
459
+ ],
460
+ [
461
+ "set",
462
+ "@entity.lifetimeAmount",
463
+ "@payload.row.lifetimeAmount"
464
+ ],
465
+ [
466
+ "set",
467
+ "@entity.firstDonationAt",
468
+ "@payload.row.firstDonationAt"
469
+ ],
470
+ [
471
+ "set",
472
+ "@entity.lastDonationAt",
473
+ "@payload.row.lastDonationAt"
474
+ ],
475
+ [
476
+ "set",
477
+ "@entity.preferredCampaign",
478
+ "@payload.row.preferredCampaign"
479
+ ],
480
+ [
481
+ "render-ui",
482
+ "main",
483
+ {
484
+ "direction": "vertical",
485
+ "type": "stack",
486
+ "gap": "md",
487
+ "children": [
488
+ {
489
+ "gap": "sm",
490
+ "children": [
491
+ {
492
+ "action": "CLOSE_VIEW",
493
+ "variant": "ghost",
494
+ "label": "Back",
495
+ "type": "button"
496
+ },
497
+ {
498
+ "type": "icon",
499
+ "name": "heart"
500
+ },
501
+ {
502
+ "variant": "h3",
503
+ "type": "typography",
504
+ "content": "@entity.name"
505
+ },
506
+ {
507
+ "label": "@entity.donorType",
508
+ "variant": "default",
509
+ "type": "badge"
510
+ }
511
+ ],
512
+ "type": "stack",
513
+ "align": "center",
514
+ "direction": "horizontal"
515
+ },
516
+ {
517
+ "type": "divider"
518
+ },
519
+ {
520
+ "type": "stack",
521
+ "direction": "vertical",
522
+ "children": [
523
+ {
524
+ "children": [
525
+ {
526
+ "content": "Email",
527
+ "color": "muted",
528
+ "type": "typography",
529
+ "variant": "caption"
530
+ },
531
+ {
532
+ "variant": "body",
533
+ "content": "@entity.email",
534
+ "type": "typography"
535
+ }
536
+ ],
537
+ "gap": "md",
538
+ "type": "stack",
539
+ "direction": "horizontal"
540
+ },
541
+ {
542
+ "gap": "md",
543
+ "children": [
544
+ {
545
+ "variant": "caption",
546
+ "type": "typography",
547
+ "content": "Phone",
548
+ "color": "muted"
549
+ },
550
+ {
551
+ "type": "typography",
552
+ "variant": "body",
553
+ "content": "@entity.phone"
554
+ }
555
+ ],
556
+ "type": "stack",
557
+ "direction": "horizontal"
558
+ },
559
+ {
560
+ "children": [
561
+ {
562
+ "variant": "caption",
563
+ "content": "Preferred campaign",
564
+ "color": "muted",
565
+ "type": "typography"
566
+ },
567
+ {
568
+ "variant": "body",
569
+ "type": "typography",
570
+ "content": "@entity.preferredCampaign"
571
+ }
572
+ ],
573
+ "type": "stack",
574
+ "gap": "md",
575
+ "direction": "horizontal"
576
+ }
577
+ ],
578
+ "gap": "sm"
579
+ },
580
+ {
581
+ "type": "divider"
582
+ },
583
+ {
584
+ "type": "simple-grid",
585
+ "children": [
586
+ {
587
+ "type": "stat-display",
588
+ "value": "@entity.lifetimeAmount",
589
+ "icon": "dollar-sign",
590
+ "label": "Lifetime amount"
591
+ },
592
+ {
593
+ "type": "stat-display",
594
+ "label": "First donation",
595
+ "icon": "calendar",
596
+ "value": "@entity.firstDonationAt"
597
+ },
598
+ {
599
+ "value": "@entity.lastDonationAt",
600
+ "type": "stat-display",
601
+ "label": "Last donation",
602
+ "icon": "calendar-check"
603
+ }
604
+ ],
605
+ "cols": 3.0
606
+ },
607
+ {
608
+ "align": "center",
609
+ "type": "stack",
610
+ "direction": "horizontal",
611
+ "children": [
612
+ {
613
+ "action": "THANK_DONOR",
614
+ "label": "Thank Donor",
615
+ "type": "button",
616
+ "actionPayload": {
617
+ "id": "@entity.id"
618
+ },
619
+ "variant": "primary"
620
+ },
621
+ {
622
+ "label": "Solicit",
623
+ "action": "SOLICIT_DONOR",
624
+ "actionPayload": {
625
+ "id": "@entity.id"
626
+ },
627
+ "type": "button",
628
+ "variant": "secondary"
629
+ }
630
+ ],
631
+ "gap": "sm"
632
+ }
633
+ ]
634
+ }
635
+ ]
636
+ ]
637
+ },
638
+ {
639
+ "from": "browsing",
640
+ "to": "loading",
460
641
  "event": "THANK_DONOR",
461
642
  "effects": [
462
643
  [
@@ -464,20 +645,126 @@
464
645
  "@entity.id",
465
646
  "@payload.id"
466
647
  ],
648
+ [
649
+ "fetch",
650
+ "Donor",
651
+ {
652
+ "emit": {
653
+ "failure": "DonorLoadFailed",
654
+ "success": "DonorLoaded"
655
+ }
656
+ }
657
+ ],
467
658
  [
468
659
  "render-ui",
469
660
  "main",
470
661
  {
471
- "type": "alert",
472
- "variant": "success",
473
- "message": "Thank-you sent"
662
+ "children": [
663
+ {
664
+ "type": "spinner"
665
+ },
666
+ {
667
+ "variant": "caption",
668
+ "type": "typography",
669
+ "content": "Sending thanks…",
670
+ "color": "muted"
671
+ }
672
+ ],
673
+ "direction": "vertical",
674
+ "gap": "md",
675
+ "align": "center",
676
+ "type": "stack",
677
+ "className": "py-12"
474
678
  }
475
679
  ]
476
680
  ]
477
681
  },
478
682
  {
479
- "from": "browsing",
480
- "to": "browsing",
683
+ "from": "viewing_single",
684
+ "to": "loading",
685
+ "event": "CLOSE_VIEW",
686
+ "effects": [
687
+ [
688
+ "fetch",
689
+ "Donor",
690
+ {
691
+ "emit": {
692
+ "failure": "DonorLoadFailed",
693
+ "success": "DonorLoaded"
694
+ }
695
+ }
696
+ ],
697
+ [
698
+ "render-ui",
699
+ "main",
700
+ {
701
+ "type": "stack",
702
+ "children": [
703
+ {
704
+ "type": "spinner"
705
+ },
706
+ {
707
+ "type": "typography",
708
+ "variant": "caption",
709
+ "content": "Loading donors…",
710
+ "color": "muted"
711
+ }
712
+ ],
713
+ "direction": "vertical",
714
+ "gap": "md",
715
+ "align": "center",
716
+ "className": "py-12"
717
+ }
718
+ ]
719
+ ]
720
+ },
721
+ {
722
+ "from": "viewing_single",
723
+ "to": "loading",
724
+ "event": "THANK_DONOR",
725
+ "effects": [
726
+ [
727
+ "set",
728
+ "@entity.id",
729
+ "@payload.id"
730
+ ],
731
+ [
732
+ "fetch",
733
+ "Donor",
734
+ {
735
+ "emit": {
736
+ "success": "DonorLoaded",
737
+ "failure": "DonorLoadFailed"
738
+ }
739
+ }
740
+ ],
741
+ [
742
+ "render-ui",
743
+ "main",
744
+ {
745
+ "align": "center",
746
+ "children": [
747
+ {
748
+ "type": "spinner"
749
+ },
750
+ {
751
+ "variant": "caption",
752
+ "type": "typography",
753
+ "color": "muted",
754
+ "content": "Sending thanks…"
755
+ }
756
+ ],
757
+ "type": "stack",
758
+ "direction": "vertical",
759
+ "gap": "md",
760
+ "className": "py-12"
761
+ }
762
+ ]
763
+ ]
764
+ },
765
+ {
766
+ "from": "viewing_single",
767
+ "to": "loading",
481
768
  "event": "SOLICIT_DONOR",
482
769
  "effects": [
483
770
  [
@@ -485,13 +772,36 @@
485
772
  "@entity.id",
486
773
  "@payload.id"
487
774
  ],
775
+ [
776
+ "fetch",
777
+ "Donor",
778
+ {
779
+ "emit": {
780
+ "failure": "DonorLoadFailed",
781
+ "success": "DonorLoaded"
782
+ }
783
+ }
784
+ ],
488
785
  [
489
786
  "render-ui",
490
787
  "main",
491
788
  {
492
- "type": "alert",
493
- "message": "Solicitation queued",
494
- "variant": "info"
789
+ "children": [
790
+ {
791
+ "type": "spinner"
792
+ },
793
+ {
794
+ "color": "muted",
795
+ "variant": "caption",
796
+ "type": "typography",
797
+ "content": "Soliciting donor…"
798
+ }
799
+ ],
800
+ "align": "center",
801
+ "className": "py-12",
802
+ "direction": "vertical",
803
+ "gap": "md",
804
+ "type": "stack"
495
805
  }
496
806
  ]
497
807
  ]
@@ -506,8 +816,8 @@
506
816
  "Donor",
507
817
  {
508
818
  "emit": {
509
- "success": "DonorLoaded",
510
- "failure": "DonorLoadFailed"
819
+ "failure": "DonorLoadFailed",
820
+ "success": "DonorLoaded"
511
821
  }
512
822
  }
513
823
  ],
@@ -515,8 +825,8 @@
515
825
  "render-ui",
516
826
  "main",
517
827
  {
518
- "type": "spinner",
519
- "size": "sm"
828
+ "size": "sm",
829
+ "type": "spinner"
520
830
  }
521
831
  ]
522
832
  ]