@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-campaign-goal",
3
3
  "version": "1.0.0",
4
- "description": "std-campaign-goal — nonprofit fundraising campaign primitive with a target dollar amount, running raised total, donor count, deadline, and status. Browses campaigns in a data-grid with Launch / End row actions.",
4
+ "description": "std-campaign-goal — nonprofit fundraising campaign with target / raised / donor count / deadline / status. Lists campaigns in `browsing`; opens campaign detail in `viewing_single` with Launch / End actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "CampaignGoalOrbital",
@@ -69,6 +69,57 @@
69
69
  "category": "interaction",
70
70
  "linkedEntity": "CampaignGoal",
71
71
  "emits": [
72
+ {
73
+ "event": "OPEN_CAMPAIGN",
74
+ "payloadSchema": [
75
+ {
76
+ "name": "id",
77
+ "type": "string",
78
+ "required": true
79
+ },
80
+ {
81
+ "name": "row.id",
82
+ "type": "string",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "row.name",
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ {
91
+ "name": "row.description",
92
+ "type": "string"
93
+ },
94
+ {
95
+ "name": "row.targetAmount",
96
+ "type": "number"
97
+ },
98
+ {
99
+ "name": "row.raisedAmount",
100
+ "type": "number"
101
+ },
102
+ {
103
+ "name": "row.donorCount",
104
+ "type": "number"
105
+ },
106
+ {
107
+ "name": "row.startDate",
108
+ "type": "string"
109
+ },
110
+ {
111
+ "name": "row.endDate",
112
+ "type": "string"
113
+ },
114
+ {
115
+ "name": "row.status",
116
+ "type": "string"
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "event": "CLOSE_VIEW"
122
+ },
72
123
  {
73
124
  "event": "LAUNCH_CAMPAIGN",
74
125
  "payloadSchema": [
@@ -121,6 +172,9 @@
121
172
  {
122
173
  "name": "browsing"
123
174
  },
175
+ {
176
+ "name": "viewing_single"
177
+ },
124
178
  {
125
179
  "name": "error"
126
180
  }
@@ -155,13 +209,17 @@
155
209
  ]
156
210
  },
157
211
  {
158
- "key": "LAUNCH_CAMPAIGN",
159
- "name": "Launch Campaign",
212
+ "key": "OPEN_CAMPAIGN",
213
+ "name": "Open Campaign",
160
214
  "payloadSchema": [
161
215
  {
162
216
  "name": "id",
163
217
  "type": "string",
164
218
  "required": true
219
+ },
220
+ {
221
+ "name": "row",
222
+ "type": "CampaignGoal"
165
223
  }
166
224
  ]
167
225
  },
@@ -175,6 +233,21 @@
175
233
  "required": true
176
234
  }
177
235
  ]
236
+ },
237
+ {
238
+ "key": "CLOSE_VIEW",
239
+ "name": "Close View"
240
+ },
241
+ {
242
+ "key": "LAUNCH_CAMPAIGN",
243
+ "name": "Launch Campaign",
244
+ "payloadSchema": [
245
+ {
246
+ "name": "id",
247
+ "type": "string",
248
+ "required": true
249
+ }
250
+ ]
178
251
  }
179
252
  ],
180
253
  "transitions": [
@@ -188,8 +261,8 @@
188
261
  "CampaignGoal",
189
262
  {
190
263
  "emit": {
191
- "failure": "CampaignGoalLoadFailed",
192
- "success": "CampaignGoalLoaded"
264
+ "success": "CampaignGoalLoaded",
265
+ "failure": "CampaignGoalLoadFailed"
193
266
  }
194
267
  }
195
268
  ],
@@ -197,22 +270,22 @@
197
270
  "render-ui",
198
271
  "main",
199
272
  {
200
- "className": "py-12",
201
273
  "type": "stack",
202
- "direction": "vertical",
274
+ "className": "py-12",
275
+ "align": "center",
203
276
  "children": [
204
277
  {
205
278
  "type": "spinner"
206
279
  },
207
280
  {
281
+ "variant": "caption",
208
282
  "color": "muted",
209
283
  "content": "Loading campaigns…",
210
- "type": "typography",
211
- "variant": "caption"
284
+ "type": "typography"
212
285
  }
213
286
  ],
214
287
  "gap": "md",
215
- "align": "center"
288
+ "direction": "vertical"
216
289
  }
217
290
  ]
218
291
  ]
@@ -226,300 +299,391 @@
226
299
  "render-ui",
227
300
  "main",
228
301
  {
302
+ "direction": "vertical",
229
303
  "children": [
230
304
  {
231
- "tag": "Campaign",
232
- "primaryAction": {
233
- "label": "Donate Now",
234
- "href": "#donate"
235
- },
236
- "type": "hero-section",
237
- "title": "Help us reach our goal",
238
- "tagVariant": "primary",
239
- "titleAccent": "@config.title",
240
- "subtitle": "Every gift moves the needle. Join thousands of donors making impact possible.",
241
- "secondaryAction": {
242
- "href": "#story",
243
- "label": "Learn More"
244
- }
245
- },
246
- {
305
+ "align": "center",
247
306
  "children": [
248
307
  {
249
- "value": 482000.0,
250
- "duration": 1500.0,
251
- "type": "animated-counter",
252
- "prefix": "$",
253
- "suffix": " raised"
308
+ "type": "icon",
309
+ "name": "target"
254
310
  },
255
311
  {
256
- "suffix": " donors",
257
- "type": "animated-counter",
258
- "value": 1240.0,
259
- "duration": 1500.0
260
- },
261
- {
262
- "type": "animated-counter",
263
- "value": 87.0,
264
- "suffix": "% of goal",
265
- "duration": 1500.0
312
+ "type": "typography",
313
+ "variant": "h3",
314
+ "content": "@config.title"
266
315
  }
267
316
  ],
268
317
  "direction": "horizontal",
269
- "gap": "lg",
270
318
  "type": "stack",
271
- "justify": "around"
272
- },
273
- {
274
- "type": "progress-bar",
275
- "max": 100.0,
276
- "color": "primary",
277
- "showPercentage": true,
278
- "value": 87.0
319
+ "gap": "sm"
279
320
  },
280
321
  {
281
- "animation": "fade-up",
282
- "trigger": "scroll",
283
322
  "children": [
284
323
  {
285
- "text": "Together, we change lives.",
286
- "type": "typewriter-text",
287
- "speed": 60.0
324
+ "type": "stat-display",
325
+ "icon": "target",
326
+ "label": "Campaigns",
327
+ "value": "@payload.data.length"
328
+ },
329
+ {
330
+ "type": "stat-display",
331
+ "label": "Active",
332
+ "value": "6",
333
+ "icon": "play-circle"
334
+ },
335
+ {
336
+ "type": "stat-display",
337
+ "value": "$482K",
338
+ "icon": "dollar-sign",
339
+ "label": "Total raised"
340
+ },
341
+ {
342
+ "value": "1,240",
343
+ "icon": "users",
344
+ "label": "Donors",
345
+ "type": "stat-display"
288
346
  }
289
347
  ],
290
- "type": "animated-reveal"
348
+ "type": "simple-grid",
349
+ "cols": 4.0
291
350
  },
292
351
  {
293
- "background": "alt",
294
- "padding": "lg",
295
- "type": "content-section",
296
- "children": [
352
+ "type": "divider"
353
+ },
354
+ {
355
+ "cols": 1.0,
356
+ "type": "data-grid",
357
+ "entity": "@payload.data",
358
+ "gap": "sm",
359
+ "fields": [
297
360
  {
298
- "variant": "h3",
299
- "content": "Choose your donation tier",
300
- "type": "typography"
361
+ "variant": "caption",
362
+ "label": "Name",
363
+ "name": "name"
301
364
  },
302
365
  {
303
- "plans": [
304
- {
305
- "action": {
306
- "href": "#",
307
- "label": "Give $25"
308
- },
309
- "price": "$25",
310
- "description": "Provides one week of meals",
311
- "name": "Supporter",
312
- "features": [
313
- "Tax receipt",
314
- "Thank-you email"
315
- ]
316
- },
317
- {
318
- "description": "Funds a child's school supplies for a year",
319
- "highlighted": true,
320
- "features": [
321
- "Tax receipt",
322
- "Personalized note",
323
- "Quarterly update"
324
- ],
325
- "name": "Advocate",
326
- "price": "$100",
327
- "action": {
328
- "href": "#",
329
- "label": "Give $100"
330
- }
331
- },
332
- {
333
- "action": {
334
- "href": "#",
335
- "label": "Give $500"
336
- },
337
- "description": "Sponsors a community clean-water station",
338
- "price": "$500",
339
- "name": "Champion",
340
- "features": [
341
- "Tax receipt",
342
- "Recognition in newsletter",
343
- "Site-visit invite"
344
- ]
345
- }
346
- ],
347
- "type": "pricing-grid"
366
+ "variant": "caption",
367
+ "name": "targetAmount",
368
+ "label": "Target"
369
+ },
370
+ {
371
+ "name": "raisedAmount",
372
+ "label": "Raised",
373
+ "variant": "caption"
374
+ },
375
+ {
376
+ "variant": "caption",
377
+ "name": "donorCount",
378
+ "label": "Donors"
379
+ },
380
+ {
381
+ "label": "Status",
382
+ "name": "status",
383
+ "variant": "badge"
348
384
  }
349
- ]
350
- },
351
- {
352
- "background": "default",
353
- "type": "content-section",
354
- "padding": "md",
355
- "children": [
385
+ ],
386
+ "itemActions": [
356
387
  {
357
- "type": "typography",
358
- "variant": "h3",
359
- "content": "Impact in pictures"
388
+ "icon": "arrow-right",
389
+ "event": "OPEN_CAMPAIGN",
390
+ "label": "Open",
391
+ "variant": "primary"
360
392
  },
361
393
  {
362
- "items": [
363
- {
364
- "id": "i1",
365
- "src": "https://picsum.photos/seed/campaign1/800/600",
366
- "alt": "Clean water delivery"
367
- },
368
- {
369
- "alt": "School supplies handout",
370
- "id": "i2",
371
- "src": "https://picsum.photos/seed/campaign2/800/600"
372
- },
373
- {
374
- "alt": "Community meal program",
375
- "src": "https://picsum.photos/seed/campaign3/800/600",
376
- "id": "i3"
377
- },
378
- {
379
- "alt": "Volunteer team",
380
- "src": "https://picsum.photos/seed/campaign4/800/600",
381
- "id": "i4"
382
- }
383
- ],
384
- "type": "media-gallery"
394
+ "label": "End",
395
+ "variant": "danger",
396
+ "event": "END_CAMPAIGN"
385
397
  }
386
398
  ]
387
- },
399
+ }
400
+ ],
401
+ "gap": "md",
402
+ "type": "stack"
403
+ }
404
+ ]
405
+ ]
406
+ },
407
+ {
408
+ "from": "loading",
409
+ "to": "error",
410
+ "event": "CampaignGoalLoadFailed",
411
+ "effects": [
412
+ [
413
+ "render-ui",
414
+ "main",
415
+ {
416
+ "message": "@payload.error",
417
+ "type": "alert",
418
+ "variant": "error"
419
+ }
420
+ ]
421
+ ]
422
+ },
423
+ {
424
+ "from": "browsing",
425
+ "to": "viewing_single",
426
+ "event": "OPEN_CAMPAIGN",
427
+ "effects": [
428
+ [
429
+ "set",
430
+ "@entity.id",
431
+ "@payload.row.id"
432
+ ],
433
+ [
434
+ "set",
435
+ "@entity.name",
436
+ "@payload.row.name"
437
+ ],
438
+ [
439
+ "set",
440
+ "@entity.description",
441
+ "@payload.row.description"
442
+ ],
443
+ [
444
+ "set",
445
+ "@entity.targetAmount",
446
+ "@payload.row.targetAmount"
447
+ ],
448
+ [
449
+ "set",
450
+ "@entity.raisedAmount",
451
+ "@payload.row.raisedAmount"
452
+ ],
453
+ [
454
+ "set",
455
+ "@entity.donorCount",
456
+ "@payload.row.donorCount"
457
+ ],
458
+ [
459
+ "set",
460
+ "@entity.startDate",
461
+ "@payload.row.startDate"
462
+ ],
463
+ [
464
+ "set",
465
+ "@entity.endDate",
466
+ "@payload.row.endDate"
467
+ ],
468
+ [
469
+ "set",
470
+ "@entity.status",
471
+ "@payload.row.status"
472
+ ],
473
+ [
474
+ "render-ui",
475
+ "main",
476
+ {
477
+ "children": [
388
478
  {
389
- "images": [
479
+ "type": "stack",
480
+ "align": "center",
481
+ "gap": "sm",
482
+ "children": [
390
483
  {
391
- "caption": "Clean water",
392
- "alt": "Impact",
393
- "src": "https://picsum.photos/seed/campaign1/1200/800"
394
- }
395
- ],
396
- "type": "lightbox",
397
- "isOpen": false,
398
- "showCounter": true,
399
- "currentIndex": 0.0
400
- },
401
- {
402
- "variant": "quotes",
403
- "type": "social-proof",
404
- "items": [
484
+ "label": "Back",
485
+ "action": "CLOSE_VIEW",
486
+ "type": "button",
487
+ "variant": "ghost"
488
+ },
405
489
  {
406
- "name": "Maria S.",
407
- "quote": "This nonprofit changed my family's life."
490
+ "type": "icon",
491
+ "name": "target"
408
492
  },
409
493
  {
410
- "name": "James W.",
411
- "quote": "Every dollar I give I can see in the field."
494
+ "type": "typography",
495
+ "content": "@entity.name",
496
+ "variant": "h3"
412
497
  },
413
498
  {
414
- "quote": "Transparent, honest, and effective.",
415
- "name": "Lina P."
499
+ "variant": "default",
500
+ "label": "@entity.status",
501
+ "type": "badge"
416
502
  }
417
- ]
503
+ ],
504
+ "direction": "horizontal"
418
505
  },
419
506
  {
420
- "twitter": {
421
- "url": "https://twitter.com/example"
422
- },
423
- "github": {
424
- "url": "https://github.com/example"
425
- },
426
- "heading": "Stay connected",
427
- "type": "community-links",
428
- "discord": {
429
- "url": "https://discord.gg/example"
430
- }
507
+ "type": "divider"
431
508
  },
432
509
  {
433
- "gap": "sm",
434
- "direction": "horizontal",
435
510
  "children": [
436
511
  {
437
- "name": "target",
438
- "type": "icon"
439
- },
440
- {
441
- "content": "@config.title",
442
- "variant": "h3",
443
- "type": "typography"
512
+ "type": "stack",
513
+ "direction": "horizontal",
514
+ "children": [
515
+ {
516
+ "color": "muted",
517
+ "type": "typography",
518
+ "content": "Description",
519
+ "variant": "caption"
520
+ },
521
+ {
522
+ "type": "typography",
523
+ "content": "@entity.description",
524
+ "variant": "body"
525
+ }
526
+ ],
527
+ "gap": "md"
444
528
  }
445
529
  ],
530
+ "direction": "vertical",
531
+ "gap": "sm",
446
532
  "type": "stack"
447
533
  },
448
534
  {
449
535
  "type": "divider"
450
536
  },
451
537
  {
452
- "type": "data-grid",
453
- "fields": [
454
- {
455
- "label": "Name",
456
- "variant": "caption",
457
- "name": "name"
458
- },
538
+ "cols": 4.0,
539
+ "children": [
459
540
  {
460
- "name": "targetAmount",
541
+ "value": "@entity.targetAmount",
461
542
  "label": "Target",
462
- "variant": "caption"
543
+ "type": "stat-display",
544
+ "icon": "target"
463
545
  },
464
546
  {
465
- "label": "Raised",
466
- "variant": "caption",
467
- "name": "raisedAmount"
547
+ "value": "@entity.raisedAmount",
548
+ "icon": "dollar-sign",
549
+ "type": "stat-display",
550
+ "label": "Raised"
468
551
  },
469
552
  {
470
- "variant": "caption",
471
- "name": "donorCount",
472
- "label": "Donors"
553
+ "icon": "users",
554
+ "value": "@entity.donorCount",
555
+ "label": "Donors",
556
+ "type": "stat-display"
473
557
  },
474
558
  {
475
- "variant": "badge",
476
- "name": "status",
477
- "label": "Status"
559
+ "icon": "calendar",
560
+ "type": "stat-display",
561
+ "value": "@entity.endDate",
562
+ "label": "Ends"
478
563
  }
479
564
  ],
480
- "cols": 1.0,
481
- "gap": "sm",
482
- "entity": "@payload.data",
483
- "itemActions": [
565
+ "type": "simple-grid"
566
+ },
567
+ {
568
+ "children": [
484
569
  {
485
- "event": "LAUNCH_CAMPAIGN",
570
+ "type": "button",
571
+ "variant": "primary",
486
572
  "label": "Launch",
487
- "variant": "primary"
573
+ "action": "LAUNCH_CAMPAIGN",
574
+ "actionPayload": {
575
+ "id": "@entity.id"
576
+ }
488
577
  },
489
578
  {
490
- "event": "END_CAMPAIGN",
579
+ "action": "END_CAMPAIGN",
580
+ "actionPayload": {
581
+ "id": "@entity.id"
582
+ },
583
+ "type": "button",
491
584
  "variant": "danger",
492
585
  "label": "End"
493
586
  }
494
- ]
587
+ ],
588
+ "direction": "horizontal",
589
+ "gap": "sm",
590
+ "align": "center",
591
+ "type": "stack"
495
592
  }
496
593
  ],
497
- "gap": "lg",
498
594
  "type": "stack",
499
- "direction": "vertical"
595
+ "direction": "vertical",
596
+ "gap": "md"
500
597
  }
501
598
  ]
502
599
  ]
503
600
  },
504
601
  {
505
- "from": "loading",
506
- "to": "error",
507
- "event": "CampaignGoalLoadFailed",
602
+ "from": "browsing",
603
+ "to": "loading",
604
+ "event": "END_CAMPAIGN",
508
605
  "effects": [
606
+ [
607
+ "set",
608
+ "@entity.id",
609
+ "@payload.id"
610
+ ],
611
+ [
612
+ "fetch",
613
+ "CampaignGoal",
614
+ {
615
+ "emit": {
616
+ "failure": "CampaignGoalLoadFailed",
617
+ "success": "CampaignGoalLoaded"
618
+ }
619
+ }
620
+ ],
509
621
  [
510
622
  "render-ui",
511
623
  "main",
512
624
  {
513
- "variant": "error",
514
- "message": "@payload.error",
515
- "type": "alert"
625
+ "gap": "md",
626
+ "children": [
627
+ {
628
+ "type": "spinner"
629
+ },
630
+ {
631
+ "variant": "caption",
632
+ "content": "Ending campaign…",
633
+ "color": "muted",
634
+ "type": "typography"
635
+ }
636
+ ],
637
+ "type": "stack",
638
+ "align": "center",
639
+ "direction": "vertical",
640
+ "className": "py-12"
516
641
  }
517
642
  ]
518
643
  ]
519
644
  },
520
645
  {
521
- "from": "browsing",
522
- "to": "browsing",
646
+ "from": "viewing_single",
647
+ "to": "loading",
648
+ "event": "CLOSE_VIEW",
649
+ "effects": [
650
+ [
651
+ "fetch",
652
+ "CampaignGoal",
653
+ {
654
+ "emit": {
655
+ "failure": "CampaignGoalLoadFailed",
656
+ "success": "CampaignGoalLoaded"
657
+ }
658
+ }
659
+ ],
660
+ [
661
+ "render-ui",
662
+ "main",
663
+ {
664
+ "direction": "vertical",
665
+ "type": "stack",
666
+ "align": "center",
667
+ "className": "py-12",
668
+ "gap": "md",
669
+ "children": [
670
+ {
671
+ "type": "spinner"
672
+ },
673
+ {
674
+ "content": "Loading campaigns…",
675
+ "type": "typography",
676
+ "variant": "caption",
677
+ "color": "muted"
678
+ }
679
+ ]
680
+ }
681
+ ]
682
+ ]
683
+ },
684
+ {
685
+ "from": "viewing_single",
686
+ "to": "loading",
523
687
  "event": "LAUNCH_CAMPAIGN",
524
688
  "effects": [
525
689
  [
@@ -527,20 +691,43 @@
527
691
  "@entity.id",
528
692
  "@payload.id"
529
693
  ],
694
+ [
695
+ "fetch",
696
+ "CampaignGoal",
697
+ {
698
+ "emit": {
699
+ "success": "CampaignGoalLoaded",
700
+ "failure": "CampaignGoalLoadFailed"
701
+ }
702
+ }
703
+ ],
530
704
  [
531
705
  "render-ui",
532
706
  "main",
533
707
  {
534
- "variant": "success",
535
- "message": "Campaign launched",
536
- "type": "alert"
708
+ "direction": "vertical",
709
+ "align": "center",
710
+ "className": "py-12",
711
+ "children": [
712
+ {
713
+ "type": "spinner"
714
+ },
715
+ {
716
+ "type": "typography",
717
+ "content": "Launching campaign…",
718
+ "color": "muted",
719
+ "variant": "caption"
720
+ }
721
+ ],
722
+ "gap": "md",
723
+ "type": "stack"
537
724
  }
538
725
  ]
539
726
  ]
540
727
  },
541
728
  {
542
- "from": "browsing",
543
- "to": "browsing",
729
+ "from": "viewing_single",
730
+ "to": "loading",
544
731
  "event": "END_CAMPAIGN",
545
732
  "effects": [
546
733
  [
@@ -548,13 +735,36 @@
548
735
  "@entity.id",
549
736
  "@payload.id"
550
737
  ],
738
+ [
739
+ "fetch",
740
+ "CampaignGoal",
741
+ {
742
+ "emit": {
743
+ "failure": "CampaignGoalLoadFailed",
744
+ "success": "CampaignGoalLoaded"
745
+ }
746
+ }
747
+ ],
551
748
  [
552
749
  "render-ui",
553
750
  "main",
554
751
  {
555
- "message": "Campaign ended",
556
- "variant": "info",
557
- "type": "alert"
752
+ "type": "stack",
753
+ "direction": "vertical",
754
+ "gap": "md",
755
+ "align": "center",
756
+ "children": [
757
+ {
758
+ "type": "spinner"
759
+ },
760
+ {
761
+ "content": "Ending campaign…",
762
+ "color": "muted",
763
+ "type": "typography",
764
+ "variant": "caption"
765
+ }
766
+ ],
767
+ "className": "py-12"
558
768
  }
559
769
  ]
560
770
  ]