@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-chart-of-accounts",
3
3
  "version": "1.0.0",
4
- "description": "std-chart-of-accounts — list of all accounts (asset, liability, equity, revenue, expense) that ledger entries post against. Owns an Account entity and a single chart trait that loads accounts, renders them in a data-grid, and surfaces Activate / Deactivate per row.",
4
+ "description": "std-chart-of-accounts — list of all accounts (asset, liability, equity, revenue, expense) that ledger entries post against. Lists accounts in `browsing`; opens detail in `viewing_single` with Activate / Deactivate actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ChartOfAccountsOrbital",
@@ -60,6 +60,50 @@
60
60
  "category": "interaction",
61
61
  "linkedEntity": "Account",
62
62
  "emits": [
63
+ {
64
+ "event": "OPEN_ACCOUNT",
65
+ "payloadSchema": [
66
+ {
67
+ "name": "id",
68
+ "type": "string",
69
+ "required": true
70
+ },
71
+ {
72
+ "name": "row.id",
73
+ "type": "string",
74
+ "required": true
75
+ },
76
+ {
77
+ "name": "row.code",
78
+ "type": "string",
79
+ "required": true
80
+ },
81
+ {
82
+ "name": "row.name",
83
+ "type": "string",
84
+ "required": true
85
+ },
86
+ {
87
+ "name": "row.type",
88
+ "type": "string"
89
+ },
90
+ {
91
+ "name": "row.parentCode",
92
+ "type": "string"
93
+ },
94
+ {
95
+ "name": "row.isActive",
96
+ "type": "boolean"
97
+ },
98
+ {
99
+ "name": "row.balance",
100
+ "type": "number"
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "event": "CLOSE_VIEW"
106
+ },
63
107
  {
64
108
  "event": "ACTIVATE_ACCOUNT",
65
109
  "payloadSchema": [
@@ -112,6 +156,9 @@
112
156
  {
113
157
  "name": "browsing"
114
158
  },
159
+ {
160
+ "name": "viewing_single"
161
+ },
115
162
  {
116
163
  "name": "error"
117
164
  }
@@ -146,13 +193,17 @@
146
193
  ]
147
194
  },
148
195
  {
149
- "key": "ACTIVATE_ACCOUNT",
150
- "name": "Activate Account",
196
+ "key": "OPEN_ACCOUNT",
197
+ "name": "Open Account",
151
198
  "payloadSchema": [
152
199
  {
153
200
  "name": "id",
154
201
  "type": "string",
155
202
  "required": true
203
+ },
204
+ {
205
+ "name": "row",
206
+ "type": "Account"
156
207
  }
157
208
  ]
158
209
  },
@@ -166,6 +217,21 @@
166
217
  "required": true
167
218
  }
168
219
  ]
220
+ },
221
+ {
222
+ "key": "CLOSE_VIEW",
223
+ "name": "Close View"
224
+ },
225
+ {
226
+ "key": "ACTIVATE_ACCOUNT",
227
+ "name": "Activate Account",
228
+ "payloadSchema": [
229
+ {
230
+ "name": "id",
231
+ "type": "string",
232
+ "required": true
233
+ }
234
+ ]
169
235
  }
170
236
  ],
171
237
  "transitions": [
@@ -189,21 +255,21 @@
189
255
  "main",
190
256
  {
191
257
  "type": "stack",
192
- "direction": "vertical",
193
258
  "align": "center",
194
- "gap": "md",
195
- "className": "py-12",
196
259
  "children": [
197
260
  {
198
261
  "type": "spinner"
199
262
  },
200
263
  {
201
- "content": "Loading accounts…",
202
- "color": "muted",
203
264
  "variant": "caption",
265
+ "color": "muted",
266
+ "content": "Loading accounts…",
204
267
  "type": "typography"
205
268
  }
206
- ]
269
+ ],
270
+ "className": "py-12",
271
+ "direction": "vertical",
272
+ "gap": "md"
207
273
  }
208
274
  ]
209
275
  ]
@@ -217,137 +283,295 @@
217
283
  "render-ui",
218
284
  "main",
219
285
  {
220
- "gap": "md",
221
- "direction": "vertical",
222
286
  "type": "stack",
223
287
  "children": [
224
288
  {
225
289
  "gap": "sm",
226
290
  "type": "stack",
291
+ "direction": "horizontal",
292
+ "align": "center",
227
293
  "children": [
228
294
  {
229
295
  "name": "book-open",
230
296
  "type": "icon"
231
297
  },
232
298
  {
233
- "variant": "h3",
234
299
  "type": "typography",
235
- "content": "@config.title"
300
+ "content": "@config.title",
301
+ "variant": "h3"
236
302
  }
237
- ],
238
- "direction": "horizontal"
303
+ ]
239
304
  },
240
305
  {
241
- "direction": "horizontal",
242
- "items": [
243
- {
244
- "label": "Assets",
245
- "color": "primary"
246
- },
306
+ "cols": 4.0,
307
+ "children": [
247
308
  {
248
- "label": "Liabilities",
249
- "color": "warning"
309
+ "icon": "book-open",
310
+ "label": "Total accounts",
311
+ "type": "stat-display",
312
+ "value": "@payload.data.length"
250
313
  },
251
314
  {
252
- "label": "Equity",
253
- "color": "secondary"
315
+ "label": "Active",
316
+ "value": "118",
317
+ "type": "stat-display",
318
+ "icon": "check-circle"
254
319
  },
255
320
  {
256
- "color": "success",
257
- "label": "Revenue"
321
+ "icon": "trending-up",
322
+ "value": "$2.4M",
323
+ "label": "Assets balance",
324
+ "type": "stat-display"
258
325
  },
259
326
  {
260
- "label": "Expense",
261
- "color": "destructive"
327
+ "type": "stat-display",
328
+ "label": "Liabilities",
329
+ "value": "$840K",
330
+ "icon": "trending-down"
262
331
  }
263
332
  ],
264
- "type": "chart-legend"
333
+ "type": "simple-grid"
334
+ },
335
+ {
336
+ "type": "divider"
265
337
  },
266
338
  {
267
- "items": [
339
+ "gap": "sm",
340
+ "itemActions": [
268
341
  {
269
- "title": "Assets",
270
- "id": "assets",
271
- "content": "Current assets, fixed assets, and other resources owned."
342
+ "label": "Open",
343
+ "variant": "primary",
344
+ "icon": "arrow-right",
345
+ "event": "OPEN_ACCOUNT"
272
346
  },
273
347
  {
274
- "content": "Accounts payable, loans, and other obligations.",
275
- "id": "liabilities",
276
- "title": "Liabilities"
348
+ "label": "Deactivate",
349
+ "event": "DEACTIVATE_ACCOUNT",
350
+ "variant": "danger"
351
+ }
352
+ ],
353
+ "entity": "@payload.data",
354
+ "fields": [
355
+ {
356
+ "variant": "caption",
357
+ "name": "code",
358
+ "label": "Code"
359
+ },
360
+ {
361
+ "label": "Name",
362
+ "name": "name",
363
+ "variant": "caption"
277
364
  },
278
365
  {
279
- "content": "Owner capital, retained earnings, and contributions.",
280
- "title": "Equity",
281
- "id": "equity"
366
+ "variant": "badge",
367
+ "name": "type",
368
+ "label": "Type"
282
369
  },
283
370
  {
284
- "title": "Revenue",
285
- "content": "Operating income from sales and services.",
286
- "id": "revenue"
371
+ "variant": "caption",
372
+ "label": "Parent",
373
+ "name": "parentCode"
287
374
  },
288
375
  {
289
- "title": "Expense",
290
- "content": "Operating costs, depreciation, and write-offs.",
291
- "id": "expense"
376
+ "label": "Balance",
377
+ "name": "balance",
378
+ "variant": "caption"
292
379
  }
293
380
  ],
294
- "multiple": true,
295
- "type": "accordion"
296
- },
297
- {
298
- "type": "divider"
299
- },
381
+ "cols": 1.0,
382
+ "type": "data-grid"
383
+ }
384
+ ],
385
+ "direction": "vertical",
386
+ "gap": "md"
387
+ }
388
+ ]
389
+ ]
390
+ },
391
+ {
392
+ "from": "loading",
393
+ "to": "error",
394
+ "event": "AccountLoadFailed",
395
+ "effects": [
396
+ [
397
+ "render-ui",
398
+ "main",
399
+ {
400
+ "variant": "error",
401
+ "message": "@payload.error",
402
+ "type": "alert"
403
+ }
404
+ ]
405
+ ]
406
+ },
407
+ {
408
+ "from": "browsing",
409
+ "to": "viewing_single",
410
+ "event": "OPEN_ACCOUNT",
411
+ "effects": [
412
+ [
413
+ "set",
414
+ "@entity.id",
415
+ "@payload.row.id"
416
+ ],
417
+ [
418
+ "set",
419
+ "@entity.code",
420
+ "@payload.row.code"
421
+ ],
422
+ [
423
+ "set",
424
+ "@entity.name",
425
+ "@payload.row.name"
426
+ ],
427
+ [
428
+ "set",
429
+ "@entity.type",
430
+ "@payload.row.type"
431
+ ],
432
+ [
433
+ "set",
434
+ "@entity.parentCode",
435
+ "@payload.row.parentCode"
436
+ ],
437
+ [
438
+ "set",
439
+ "@entity.isActive",
440
+ "@payload.row.isActive"
441
+ ],
442
+ [
443
+ "set",
444
+ "@entity.balance",
445
+ "@payload.row.balance"
446
+ ],
447
+ [
448
+ "render-ui",
449
+ "main",
450
+ {
451
+ "gap": "md",
452
+ "type": "stack",
453
+ "direction": "vertical",
454
+ "children": [
300
455
  {
301
- "fields": [
456
+ "direction": "horizontal",
457
+ "children": [
302
458
  {
303
- "variant": "caption",
304
- "label": "Code",
305
- "name": "code"
459
+ "type": "button",
460
+ "label": "Back",
461
+ "action": "CLOSE_VIEW",
462
+ "variant": "ghost"
306
463
  },
307
464
  {
308
- "name": "name",
309
- "variant": "caption",
310
- "label": "Name"
465
+ "type": "icon",
466
+ "name": "book-open"
311
467
  },
312
468
  {
313
- "name": "type",
314
- "label": "Type",
315
- "variant": "caption"
469
+ "type": "typography",
470
+ "variant": "h3",
471
+ "content": "@entity.name"
316
472
  },
317
473
  {
318
- "variant": "caption",
319
- "name": "parentCode",
320
- "label": "Parent"
474
+ "label": "@entity.type",
475
+ "variant": "primary",
476
+ "type": "badge"
477
+ }
478
+ ],
479
+ "type": "stack",
480
+ "gap": "sm",
481
+ "align": "center"
482
+ },
483
+ {
484
+ "type": "divider"
485
+ },
486
+ {
487
+ "children": [
488
+ {
489
+ "direction": "horizontal",
490
+ "type": "stack",
491
+ "children": [
492
+ {
493
+ "content": "Code",
494
+ "color": "muted",
495
+ "type": "typography",
496
+ "variant": "caption"
497
+ },
498
+ {
499
+ "type": "typography",
500
+ "content": "@entity.code",
501
+ "variant": "body"
502
+ }
503
+ ],
504
+ "gap": "md"
321
505
  },
322
506
  {
323
- "name": "balance",
324
- "variant": "caption",
325
- "label": "Balance"
507
+ "direction": "horizontal",
508
+ "type": "stack",
509
+ "children": [
510
+ {
511
+ "color": "muted",
512
+ "content": "Parent",
513
+ "type": "typography",
514
+ "variant": "caption"
515
+ },
516
+ {
517
+ "type": "typography",
518
+ "content": "@entity.parentCode",
519
+ "variant": "body"
520
+ }
521
+ ],
522
+ "gap": "md"
523
+ }
524
+ ],
525
+ "type": "stack",
526
+ "gap": "sm",
527
+ "direction": "vertical"
528
+ },
529
+ {
530
+ "type": "divider"
531
+ },
532
+ {
533
+ "children": [
534
+ {
535
+ "type": "stat-display",
536
+ "label": "Balance",
537
+ "value": "@entity.balance",
538
+ "icon": "dollar-sign"
326
539
  },
327
540
  {
328
- "variant": "caption",
329
- "label": "Active",
330
- "name": "isActive"
541
+ "label": "Type",
542
+ "type": "stat-display",
543
+ "value": "@entity.type",
544
+ "icon": "tag"
331
545
  }
332
546
  ],
547
+ "type": "simple-grid",
548
+ "cols": 2.0
549
+ },
550
+ {
551
+ "type": "stack",
333
552
  "gap": "sm",
334
- "type": "data-grid",
335
- "itemActions": [
553
+ "children": [
336
554
  {
337
- "event": "ACTIVATE_ACCOUNT",
338
- "label": "Activate",
339
- "icon": "check-circle",
340
- "variant": "primary"
555
+ "type": "button",
556
+ "action": "ACTIVATE_ACCOUNT",
557
+ "actionPayload": {
558
+ "id": "@entity.id"
559
+ },
560
+ "variant": "primary",
561
+ "label": "Activate"
341
562
  },
342
563
  {
564
+ "action": "DEACTIVATE_ACCOUNT",
343
565
  "label": "Deactivate",
344
- "event": "DEACTIVATE_ACCOUNT",
345
566
  "variant": "danger",
346
- "icon": "x-circle"
567
+ "type": "button",
568
+ "actionPayload": {
569
+ "id": "@entity.id"
570
+ }
347
571
  }
348
572
  ],
349
- "entity": "@payload.data",
350
- "cols": 1.0
573
+ "align": "center",
574
+ "direction": "horizontal"
351
575
  }
352
576
  ]
353
577
  }
@@ -355,24 +579,91 @@
355
579
  ]
356
580
  },
357
581
  {
358
- "from": "loading",
359
- "to": "error",
360
- "event": "AccountLoadFailed",
582
+ "from": "browsing",
583
+ "to": "loading",
584
+ "event": "DEACTIVATE_ACCOUNT",
361
585
  "effects": [
586
+ [
587
+ "set",
588
+ "@entity.id",
589
+ "@payload.id"
590
+ ],
591
+ [
592
+ "fetch",
593
+ "Account",
594
+ {
595
+ "emit": {
596
+ "success": "AccountLoaded",
597
+ "failure": "AccountLoadFailed"
598
+ }
599
+ }
600
+ ],
362
601
  [
363
602
  "render-ui",
364
603
  "main",
365
604
  {
366
- "message": "@payload.error",
367
- "type": "alert",
368
- "variant": "error"
605
+ "className": "py-12",
606
+ "gap": "md",
607
+ "children": [
608
+ {
609
+ "type": "spinner"
610
+ },
611
+ {
612
+ "content": "Deactivating account…",
613
+ "color": "muted",
614
+ "variant": "caption",
615
+ "type": "typography"
616
+ }
617
+ ],
618
+ "direction": "vertical",
619
+ "align": "center",
620
+ "type": "stack"
369
621
  }
370
622
  ]
371
623
  ]
372
624
  },
373
625
  {
374
- "from": "browsing",
375
- "to": "browsing",
626
+ "from": "viewing_single",
627
+ "to": "loading",
628
+ "event": "CLOSE_VIEW",
629
+ "effects": [
630
+ [
631
+ "fetch",
632
+ "Account",
633
+ {
634
+ "emit": {
635
+ "success": "AccountLoaded",
636
+ "failure": "AccountLoadFailed"
637
+ }
638
+ }
639
+ ],
640
+ [
641
+ "render-ui",
642
+ "main",
643
+ {
644
+ "type": "stack",
645
+ "gap": "md",
646
+ "direction": "vertical",
647
+ "align": "center",
648
+ "className": "py-12",
649
+ "children": [
650
+ {
651
+ "type": "spinner"
652
+ },
653
+ {
654
+ "color": "muted",
655
+ "variant": "caption",
656
+ "type": "typography",
657
+ "content": "Loading accounts…"
658
+ }
659
+ ]
660
+ }
661
+ ]
662
+ ]
663
+ },
664
+ {
665
+ "from": "viewing_single",
666
+ "to": "loading",
376
667
  "event": "ACTIVATE_ACCOUNT",
377
668
  "effects": [
378
669
  [
@@ -380,20 +671,43 @@
380
671
  "@entity.id",
381
672
  "@payload.id"
382
673
  ],
674
+ [
675
+ "fetch",
676
+ "Account",
677
+ {
678
+ "emit": {
679
+ "failure": "AccountLoadFailed",
680
+ "success": "AccountLoaded"
681
+ }
682
+ }
683
+ ],
383
684
  [
384
685
  "render-ui",
385
686
  "main",
386
687
  {
387
- "type": "alert",
388
- "message": "Account activated",
389
- "variant": "success"
688
+ "type": "stack",
689
+ "className": "py-12",
690
+ "gap": "md",
691
+ "children": [
692
+ {
693
+ "type": "spinner"
694
+ },
695
+ {
696
+ "color": "muted",
697
+ "content": "Activating account…",
698
+ "variant": "caption",
699
+ "type": "typography"
700
+ }
701
+ ],
702
+ "direction": "vertical",
703
+ "align": "center"
390
704
  }
391
705
  ]
392
706
  ]
393
707
  },
394
708
  {
395
- "from": "browsing",
396
- "to": "browsing",
709
+ "from": "viewing_single",
710
+ "to": "loading",
397
711
  "event": "DEACTIVATE_ACCOUNT",
398
712
  "effects": [
399
713
  [
@@ -401,13 +715,36 @@
401
715
  "@entity.id",
402
716
  "@payload.id"
403
717
  ],
718
+ [
719
+ "fetch",
720
+ "Account",
721
+ {
722
+ "emit": {
723
+ "success": "AccountLoaded",
724
+ "failure": "AccountLoadFailed"
725
+ }
726
+ }
727
+ ],
404
728
  [
405
729
  "render-ui",
406
730
  "main",
407
731
  {
408
- "type": "alert",
409
- "message": "Account deactivated",
410
- "variant": "info"
732
+ "type": "stack",
733
+ "direction": "vertical",
734
+ "gap": "md",
735
+ "align": "center",
736
+ "className": "py-12",
737
+ "children": [
738
+ {
739
+ "type": "spinner"
740
+ },
741
+ {
742
+ "type": "typography",
743
+ "variant": "caption",
744
+ "content": "Deactivating account…",
745
+ "color": "muted"
746
+ }
747
+ ]
411
748
  }
412
749
  ]
413
750
  ]