@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-class-session",
3
3
  "version": "1.0.0",
4
- "description": "std-class-session — scheduled fitness/yoga/dance class session primitive. Tracks instructor, time, capacity, and attendance; START_CLASS / CANCEL_CLASS drive lifecycle transitions for studio operators.",
4
+ "description": "std-class-session — scheduled fitness/yoga/dance class session. Lists sessions in `browsing`; opens session detail in `viewing_single` with Start / Cancel actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ClassSessionOrbital",
@@ -74,6 +74,62 @@
74
74
  "category": "interaction",
75
75
  "linkedEntity": "ClassSession",
76
76
  "emits": [
77
+ {
78
+ "event": "OPEN_SESSION",
79
+ "payloadSchema": [
80
+ {
81
+ "name": "id",
82
+ "type": "string",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "row.id",
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ {
91
+ "name": "row.className",
92
+ "type": "string",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "row.instructorName",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "row.startTime",
101
+ "type": "string",
102
+ "required": true
103
+ },
104
+ {
105
+ "name": "row.durationMinutes",
106
+ "type": "number"
107
+ },
108
+ {
109
+ "name": "row.capacity",
110
+ "type": "number"
111
+ },
112
+ {
113
+ "name": "row.bookedCount",
114
+ "type": "number"
115
+ },
116
+ {
117
+ "name": "row.location",
118
+ "type": "string"
119
+ },
120
+ {
121
+ "name": "row.status",
122
+ "type": "string"
123
+ },
124
+ {
125
+ "name": "row.notes",
126
+ "type": "string"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "event": "CLOSE_VIEW"
132
+ },
77
133
  {
78
134
  "event": "START_CLASS",
79
135
  "payloadSchema": [
@@ -126,6 +182,9 @@
126
182
  {
127
183
  "name": "browsing"
128
184
  },
185
+ {
186
+ "name": "viewing_single"
187
+ },
129
188
  {
130
189
  "name": "error"
131
190
  }
@@ -160,13 +219,17 @@
160
219
  ]
161
220
  },
162
221
  {
163
- "key": "START_CLASS",
164
- "name": "Start Class",
222
+ "key": "OPEN_SESSION",
223
+ "name": "Open Session",
165
224
  "payloadSchema": [
166
225
  {
167
226
  "name": "id",
168
227
  "type": "string",
169
228
  "required": true
229
+ },
230
+ {
231
+ "name": "row",
232
+ "type": "ClassSession"
170
233
  }
171
234
  ]
172
235
  },
@@ -180,6 +243,21 @@
180
243
  "required": true
181
244
  }
182
245
  ]
246
+ },
247
+ {
248
+ "key": "CLOSE_VIEW",
249
+ "name": "Close View"
250
+ },
251
+ {
252
+ "key": "START_CLASS",
253
+ "name": "Start Class",
254
+ "payloadSchema": [
255
+ {
256
+ "name": "id",
257
+ "type": "string",
258
+ "required": true
259
+ }
260
+ ]
183
261
  }
184
262
  ],
185
263
  "transitions": [
@@ -202,22 +280,22 @@
202
280
  "render-ui",
203
281
  "main",
204
282
  {
205
- "direction": "vertical",
206
- "gap": "md",
207
- "className": "py-12",
208
283
  "children": [
209
284
  {
210
285
  "type": "spinner"
211
286
  },
212
287
  {
288
+ "color": "muted",
213
289
  "variant": "caption",
214
290
  "type": "typography",
215
- "content": "Loading class sessions…",
216
- "color": "muted"
291
+ "content": "Loading class sessions…"
217
292
  }
218
293
  ],
294
+ "type": "stack",
295
+ "gap": "md",
219
296
  "align": "center",
220
- "type": "stack"
297
+ "direction": "vertical",
298
+ "className": "py-12"
221
299
  }
222
300
  ]
223
301
  ]
@@ -232,86 +310,56 @@
232
310
  "main",
233
311
  {
234
312
  "direction": "vertical",
313
+ "type": "stack",
314
+ "gap": "md",
235
315
  "children": [
236
316
  {
237
317
  "direction": "horizontal",
238
- "gap": "sm",
239
- "type": "stack",
240
318
  "children": [
241
319
  {
242
- "type": "icon",
243
- "name": "calendar"
320
+ "name": "calendar",
321
+ "type": "icon"
244
322
  },
245
323
  {
246
- "content": "@config.title",
247
324
  "type": "typography",
248
- "variant": "h3"
325
+ "variant": "h3",
326
+ "content": "@config.title"
249
327
  }
250
- ]
251
- },
252
- {
253
- "type": "calendar-grid"
328
+ ],
329
+ "align": "center",
330
+ "type": "stack",
331
+ "gap": "sm"
254
332
  },
255
333
  {
256
- "title": "Studio photos",
257
- "columns": 3.0,
258
- "items": [
334
+ "type": "simple-grid",
335
+ "cols": 4.0,
336
+ "children": [
259
337
  {
260
- "id": "Studio",
261
- "src": "https://picsum.photos/seed/studio1/800/600",
262
- "type": "image",
263
- "alt": "Studio"
338
+ "icon": "calendar",
339
+ "label": "Sessions",
340
+ "type": "stat-display",
341
+ "value": "@payload.data.length"
264
342
  },
265
343
  {
266
- "type": "image",
267
- "alt": "Studio",
268
- "src": "https://picsum.photos/seed/studio2/800/600",
269
- "id": "Studio"
344
+ "icon": "clock",
345
+ "label": "Today",
346
+ "value": "12",
347
+ "type": "stat-display"
270
348
  },
271
349
  {
272
- "src": "https://picsum.photos/seed/studio3/800/600",
273
- "id": "Studio",
274
- "type": "image",
275
- "alt": "Studio"
276
- }
277
- ],
278
- "type": "media-gallery"
279
- },
280
- {
281
- "readOnly": true,
282
- "max": 5.0,
283
- "label": "Class rating",
284
- "type": "star-rating",
285
- "value": 4.5
286
- },
287
- {
288
- "type": "accordion",
289
- "items": [
290
- {
291
- "content": "Mat, blocks, strap",
292
- "id": "equipment",
293
- "title": "Equipment"
350
+ "value": "78%",
351
+ "type": "stat-display",
352
+ "label": "Capacity used",
353
+ "icon": "users"
294
354
  },
295
355
  {
296
- "content": "Curated session playlist",
297
- "id": "playlist",
298
- "title": "Playlist"
356
+ "type": "stat-display",
357
+ "value": "2",
358
+ "icon": "x-circle",
359
+ "label": "Cancelled"
299
360
  }
300
361
  ]
301
362
  },
302
- {
303
- "isOpen": false,
304
- "type": "lightbox",
305
- "images": [
306
- {
307
- "alt": "Studio",
308
- "caption": "Studio",
309
- "src": "https://picsum.photos/seed/studio1/1200/800"
310
- }
311
- ],
312
- "currentIndex": 0.0,
313
- "showCounter": true
314
- },
315
363
  {
316
364
  "type": "divider"
317
365
  },
@@ -323,51 +371,50 @@
323
371
  "variant": "caption"
324
372
  },
325
373
  {
326
- "variant": "caption",
374
+ "label": "Instructor",
327
375
  "name": "instructorName",
328
- "label": "Instructor"
376
+ "variant": "caption"
329
377
  },
330
378
  {
331
- "label": "Start",
332
379
  "name": "startTime",
380
+ "label": "Start",
333
381
  "variant": "caption"
334
382
  },
335
383
  {
336
- "name": "capacity",
384
+ "variant": "badge",
337
385
  "label": "Capacity",
338
- "variant": "badge"
386
+ "name": "capacity"
339
387
  },
340
388
  {
341
- "variant": "badge",
342
389
  "label": "Booked",
390
+ "variant": "badge",
343
391
  "name": "bookedCount"
344
392
  },
345
393
  {
346
- "name": "status",
394
+ "variant": "badge",
347
395
  "label": "Status",
348
- "variant": "badge"
396
+ "name": "status"
349
397
  }
350
398
  ],
351
- "gap": "sm",
352
399
  "cols": 1.0,
353
400
  "type": "data-grid",
354
- "entity": "@payload.data",
401
+ "gap": "sm",
355
402
  "itemActions": [
356
403
  {
357
- "variant": "primary",
358
- "label": "Start",
359
- "event": "START_CLASS"
404
+ "label": "Open",
405
+ "icon": "arrow-right",
406
+ "event": "OPEN_SESSION",
407
+ "variant": "primary"
360
408
  },
361
409
  {
362
410
  "event": "CANCEL_CLASS",
363
411
  "variant": "danger",
364
412
  "label": "Cancel"
365
413
  }
366
- ]
414
+ ],
415
+ "entity": "@payload.data"
367
416
  }
368
- ],
369
- "gap": "md",
370
- "type": "stack"
417
+ ]
371
418
  }
372
419
  ]
373
420
  ]
@@ -382,36 +429,234 @@
382
429
  "main",
383
430
  {
384
431
  "message": "@payload.error",
385
- "variant": "error",
386
- "type": "alert"
432
+ "type": "alert",
433
+ "variant": "error"
387
434
  }
388
435
  ]
389
436
  ]
390
437
  },
391
438
  {
392
439
  "from": "browsing",
393
- "to": "browsing",
394
- "event": "START_CLASS",
440
+ "to": "viewing_single",
441
+ "event": "OPEN_SESSION",
395
442
  "effects": [
396
443
  [
397
444
  "set",
398
445
  "@entity.id",
399
- "@payload.id"
446
+ "@payload.row.id"
447
+ ],
448
+ [
449
+ "set",
450
+ "@entity.className",
451
+ "@payload.row.className"
452
+ ],
453
+ [
454
+ "set",
455
+ "@entity.instructorName",
456
+ "@payload.row.instructorName"
457
+ ],
458
+ [
459
+ "set",
460
+ "@entity.startTime",
461
+ "@payload.row.startTime"
462
+ ],
463
+ [
464
+ "set",
465
+ "@entity.durationMinutes",
466
+ "@payload.row.durationMinutes"
467
+ ],
468
+ [
469
+ "set",
470
+ "@entity.capacity",
471
+ "@payload.row.capacity"
472
+ ],
473
+ [
474
+ "set",
475
+ "@entity.bookedCount",
476
+ "@payload.row.bookedCount"
477
+ ],
478
+ [
479
+ "set",
480
+ "@entity.location",
481
+ "@payload.row.location"
482
+ ],
483
+ [
484
+ "set",
485
+ "@entity.status",
486
+ "@payload.row.status"
487
+ ],
488
+ [
489
+ "set",
490
+ "@entity.notes",
491
+ "@payload.row.notes"
400
492
  ],
401
493
  [
402
494
  "render-ui",
403
495
  "main",
404
496
  {
405
- "variant": "success",
406
- "message": "Class started",
407
- "type": "alert"
497
+ "type": "stack",
498
+ "children": [
499
+ {
500
+ "direction": "horizontal",
501
+ "gap": "sm",
502
+ "children": [
503
+ {
504
+ "type": "button",
505
+ "action": "CLOSE_VIEW",
506
+ "variant": "ghost",
507
+ "label": "Back"
508
+ },
509
+ {
510
+ "name": "calendar",
511
+ "type": "icon"
512
+ },
513
+ {
514
+ "content": "@entity.className",
515
+ "type": "typography",
516
+ "variant": "h3"
517
+ },
518
+ {
519
+ "type": "badge",
520
+ "variant": "default",
521
+ "label": "@entity.status"
522
+ }
523
+ ],
524
+ "align": "center",
525
+ "type": "stack"
526
+ },
527
+ {
528
+ "type": "divider"
529
+ },
530
+ {
531
+ "gap": "sm",
532
+ "children": [
533
+ {
534
+ "type": "stack",
535
+ "direction": "horizontal",
536
+ "gap": "md",
537
+ "children": [
538
+ {
539
+ "color": "muted",
540
+ "content": "Instructor",
541
+ "type": "typography",
542
+ "variant": "caption"
543
+ },
544
+ {
545
+ "variant": "body",
546
+ "content": "@entity.instructorName",
547
+ "type": "typography"
548
+ }
549
+ ]
550
+ },
551
+ {
552
+ "direction": "horizontal",
553
+ "type": "stack",
554
+ "gap": "md",
555
+ "children": [
556
+ {
557
+ "color": "muted",
558
+ "variant": "caption",
559
+ "type": "typography",
560
+ "content": "Location"
561
+ },
562
+ {
563
+ "content": "@entity.location",
564
+ "type": "typography",
565
+ "variant": "body"
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ "gap": "md",
571
+ "direction": "horizontal",
572
+ "type": "stack",
573
+ "children": [
574
+ {
575
+ "content": "Notes",
576
+ "type": "typography",
577
+ "variant": "caption",
578
+ "color": "muted"
579
+ },
580
+ {
581
+ "variant": "body",
582
+ "content": "@entity.notes",
583
+ "type": "typography"
584
+ }
585
+ ]
586
+ }
587
+ ],
588
+ "type": "stack",
589
+ "direction": "vertical"
590
+ },
591
+ {
592
+ "type": "divider"
593
+ },
594
+ {
595
+ "type": "simple-grid",
596
+ "children": [
597
+ {
598
+ "label": "Start",
599
+ "type": "stat-display",
600
+ "value": "@entity.startTime",
601
+ "icon": "clock"
602
+ },
603
+ {
604
+ "value": "@entity.durationMinutes",
605
+ "icon": "timer",
606
+ "label": "Duration",
607
+ "type": "stat-display"
608
+ },
609
+ {
610
+ "icon": "users",
611
+ "type": "stat-display",
612
+ "value": "@entity.bookedCount",
613
+ "label": "Booked"
614
+ },
615
+ {
616
+ "icon": "user-plus",
617
+ "value": "@entity.capacity",
618
+ "label": "Capacity",
619
+ "type": "stat-display"
620
+ }
621
+ ],
622
+ "cols": 4.0
623
+ },
624
+ {
625
+ "type": "stack",
626
+ "direction": "horizontal",
627
+ "align": "center",
628
+ "children": [
629
+ {
630
+ "action": "START_CLASS",
631
+ "actionPayload": {
632
+ "id": "@entity.id"
633
+ },
634
+ "type": "button",
635
+ "variant": "primary",
636
+ "label": "Start Class"
637
+ },
638
+ {
639
+ "variant": "danger",
640
+ "actionPayload": {
641
+ "id": "@entity.id"
642
+ },
643
+ "type": "button",
644
+ "label": "Cancel",
645
+ "action": "CANCEL_CLASS"
646
+ }
647
+ ],
648
+ "gap": "sm"
649
+ }
650
+ ],
651
+ "gap": "md",
652
+ "direction": "vertical"
408
653
  }
409
654
  ]
410
655
  ]
411
656
  },
412
657
  {
413
658
  "from": "browsing",
414
- "to": "browsing",
659
+ "to": "loading",
415
660
  "event": "CANCEL_CLASS",
416
661
  "effects": [
417
662
  [
@@ -419,29 +664,52 @@
419
664
  "@entity.id",
420
665
  "@payload.id"
421
666
  ],
667
+ [
668
+ "fetch",
669
+ "ClassSession",
670
+ {
671
+ "emit": {
672
+ "success": "ClassSessionLoaded",
673
+ "failure": "ClassSessionLoadFailed"
674
+ }
675
+ }
676
+ ],
422
677
  [
423
678
  "render-ui",
424
679
  "main",
425
680
  {
426
- "type": "alert",
427
- "message": "Class cancelled",
428
- "variant": "info"
681
+ "direction": "vertical",
682
+ "gap": "md",
683
+ "className": "py-12",
684
+ "align": "center",
685
+ "children": [
686
+ {
687
+ "type": "spinner"
688
+ },
689
+ {
690
+ "type": "typography",
691
+ "color": "muted",
692
+ "content": "Cancelling class…",
693
+ "variant": "caption"
694
+ }
695
+ ],
696
+ "type": "stack"
429
697
  }
430
698
  ]
431
699
  ]
432
700
  },
433
701
  {
434
- "from": "error",
702
+ "from": "viewing_single",
435
703
  "to": "loading",
436
- "event": "INIT",
704
+ "event": "CLOSE_VIEW",
437
705
  "effects": [
438
706
  [
439
707
  "fetch",
440
708
  "ClassSession",
441
709
  {
442
710
  "emit": {
443
- "success": "ClassSessionLoaded",
444
- "failure": "ClassSessionLoadFailed"
711
+ "failure": "ClassSessionLoadFailed",
712
+ "success": "ClassSessionLoaded"
445
713
  }
446
714
  }
447
715
  ],
@@ -449,22 +717,135 @@
449
717
  "render-ui",
450
718
  "main",
451
719
  {
720
+ "gap": "md",
452
721
  "align": "center",
453
722
  "className": "py-12",
454
- "gap": "md",
723
+ "children": [
724
+ {
725
+ "type": "spinner"
726
+ },
727
+ {
728
+ "content": "Loading class sessions…",
729
+ "type": "typography",
730
+ "color": "muted",
731
+ "variant": "caption"
732
+ }
733
+ ],
455
734
  "type": "stack",
735
+ "direction": "vertical"
736
+ }
737
+ ]
738
+ ]
739
+ },
740
+ {
741
+ "from": "viewing_single",
742
+ "to": "loading",
743
+ "event": "START_CLASS",
744
+ "effects": [
745
+ [
746
+ "set",
747
+ "@entity.id",
748
+ "@payload.id"
749
+ ],
750
+ [
751
+ "fetch",
752
+ "ClassSession",
753
+ {
754
+ "emit": {
755
+ "failure": "ClassSessionLoadFailed",
756
+ "success": "ClassSessionLoaded"
757
+ }
758
+ }
759
+ ],
760
+ [
761
+ "render-ui",
762
+ "main",
763
+ {
764
+ "className": "py-12",
456
765
  "direction": "vertical",
766
+ "gap": "md",
457
767
  "children": [
458
768
  {
459
769
  "type": "spinner"
460
770
  },
461
771
  {
462
- "content": "Loading class sessions…",
772
+ "content": "Starting class…",
773
+ "type": "typography",
774
+ "color": "muted",
775
+ "variant": "caption"
776
+ }
777
+ ],
778
+ "align": "center",
779
+ "type": "stack"
780
+ }
781
+ ]
782
+ ]
783
+ },
784
+ {
785
+ "from": "viewing_single",
786
+ "to": "loading",
787
+ "event": "CANCEL_CLASS",
788
+ "effects": [
789
+ [
790
+ "set",
791
+ "@entity.id",
792
+ "@payload.id"
793
+ ],
794
+ [
795
+ "fetch",
796
+ "ClassSession",
797
+ {
798
+ "emit": {
799
+ "success": "ClassSessionLoaded",
800
+ "failure": "ClassSessionLoadFailed"
801
+ }
802
+ }
803
+ ],
804
+ [
805
+ "render-ui",
806
+ "main",
807
+ {
808
+ "gap": "md",
809
+ "children": [
810
+ {
811
+ "type": "spinner"
812
+ },
813
+ {
814
+ "content": "Cancelling class…",
463
815
  "type": "typography",
464
816
  "variant": "caption",
465
817
  "color": "muted"
466
818
  }
467
- ]
819
+ ],
820
+ "type": "stack",
821
+ "direction": "vertical",
822
+ "align": "center",
823
+ "className": "py-12"
824
+ }
825
+ ]
826
+ ]
827
+ },
828
+ {
829
+ "from": "error",
830
+ "to": "loading",
831
+ "event": "INIT",
832
+ "effects": [
833
+ [
834
+ "fetch",
835
+ "ClassSession",
836
+ {
837
+ "emit": {
838
+ "success": "ClassSessionLoaded",
839
+ "failure": "ClassSessionLoadFailed"
840
+ }
841
+ }
842
+ ],
843
+ [
844
+ "render-ui",
845
+ "main",
846
+ {
847
+ "type": "spinner",
848
+ "size": "sm"
468
849
  }
469
850
  ]
470
851
  ]