@almadar/std 3.2.1 → 3.2.2

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 (262) hide show
  1. package/behaviors/exports/atoms/std-async.orb +41 -24
  2. package/behaviors/exports/atoms/std-browse.orb +12 -5
  3. package/behaviors/exports/atoms/std-cache-aside.orb +256 -42
  4. package/behaviors/exports/atoms/std-circuit-breaker.orb +577 -97
  5. package/behaviors/exports/atoms/std-collision.orb +278 -206
  6. package/behaviors/exports/atoms/std-combat-log.orb +6 -1
  7. package/behaviors/exports/atoms/std-combat.orb +6 -1
  8. package/behaviors/exports/atoms/std-confirmation.orb +212 -7
  9. package/behaviors/exports/atoms/std-dialogue-box.orb +6 -1
  10. package/behaviors/exports/atoms/std-display.orb +166 -21
  11. package/behaviors/exports/atoms/std-drawer.orb +208 -104
  12. package/behaviors/exports/atoms/std-filter.orb +211 -18
  13. package/behaviors/exports/atoms/std-game-audio.orb +6 -1
  14. package/behaviors/exports/atoms/std-game-canvas2d.orb +6 -1
  15. package/behaviors/exports/atoms/std-game-canvas3d.orb +6 -1
  16. package/behaviors/exports/atoms/std-game-hud.orb +6 -1
  17. package/behaviors/exports/atoms/std-game-menu.orb +6 -1
  18. package/behaviors/exports/atoms/std-game-over-screen.orb +6 -1
  19. package/behaviors/exports/atoms/std-gameflow.orb +100 -5
  20. package/behaviors/exports/atoms/std-input.orb +142 -137
  21. package/behaviors/exports/atoms/std-inventory-panel.orb +6 -1
  22. package/behaviors/exports/atoms/std-isometric-canvas.orb +6 -1
  23. package/behaviors/exports/atoms/std-loading.orb +27 -76
  24. package/behaviors/exports/atoms/std-modal.orb +177 -93
  25. package/behaviors/exports/atoms/std-movement.orb +401 -31
  26. package/behaviors/exports/atoms/std-notification.orb +46 -95
  27. package/behaviors/exports/atoms/std-overworld.orb +44 -16
  28. package/behaviors/exports/atoms/std-pagination.orb +26 -89
  29. package/behaviors/exports/atoms/std-physics2d.orb +6 -1
  30. package/behaviors/exports/atoms/std-platformer-canvas.orb +6 -1
  31. package/behaviors/exports/atoms/std-quest.orb +309 -34
  32. package/behaviors/exports/atoms/std-rate-limiter.orb +410 -157
  33. package/behaviors/exports/atoms/std-score-board.orb +6 -1
  34. package/behaviors/exports/atoms/std-score.orb +211 -11
  35. package/behaviors/exports/atoms/std-search.orb +28 -27
  36. package/behaviors/exports/atoms/std-selection.orb +160 -121
  37. package/behaviors/exports/atoms/std-simulation-canvas.orb +6 -1
  38. package/behaviors/exports/atoms/std-sort.orb +134 -24
  39. package/behaviors/exports/atoms/std-sprite.orb +6 -1
  40. package/behaviors/exports/atoms/std-tabs.orb +25 -15
  41. package/behaviors/exports/atoms/std-timer.orb +483 -91
  42. package/behaviors/exports/atoms/std-undo.orb +211 -81
  43. package/behaviors/exports/atoms/std-wizard.orb +31 -34
  44. package/behaviors/exports/molecules/std-builder-game.orb +6 -1
  45. package/behaviors/exports/molecules/std-cart.orb +6 -1
  46. package/behaviors/exports/molecules/std-classifier-game.orb +6 -1
  47. package/behaviors/exports/molecules/std-debugger-game.orb +6 -1
  48. package/behaviors/exports/molecules/std-detail.orb +12 -5
  49. package/behaviors/exports/molecules/std-event-handler-game.orb +6 -1
  50. package/behaviors/exports/molecules/std-geospatial.orb +28 -9
  51. package/behaviors/exports/molecules/std-inventory.orb +28 -9
  52. package/behaviors/exports/molecules/std-list.orb +392 -5
  53. package/behaviors/exports/molecules/std-messaging.orb +12 -5
  54. package/behaviors/exports/molecules/std-negotiator-game.orb +6 -1
  55. package/behaviors/exports/molecules/std-platformer-game.orb +40 -1
  56. package/behaviors/exports/molecules/std-puzzle-game.orb +26 -1
  57. package/behaviors/exports/molecules/std-sequencer-game.orb +6 -1
  58. package/behaviors/exports/molecules/std-simulator-game.orb +6 -1
  59. package/behaviors/exports/molecules/std-turn-based-battle.orb +40 -1
  60. package/behaviors/exports/organisms/std-api-gateway.orb +1145 -403
  61. package/behaviors/exports/organisms/std-arcade-game.orb +94 -4
  62. package/behaviors/exports/organisms/std-booking-system.orb +2165 -1605
  63. package/behaviors/exports/organisms/std-cicd-pipeline.orb +581 -47
  64. package/behaviors/exports/organisms/std-cms.orb +1713 -947
  65. package/behaviors/exports/organisms/std-coding-academy.orb +180 -380
  66. package/behaviors/exports/organisms/std-crm.orb +1669 -1153
  67. package/behaviors/exports/organisms/std-devops-dashboard.orb +1430 -378
  68. package/behaviors/exports/organisms/std-ecommerce.orb +2361 -1601
  69. package/behaviors/exports/organisms/std-finance-tracker.orb +622 -438
  70. package/behaviors/exports/organisms/std-healthcare.orb +1687 -1125
  71. package/behaviors/exports/organisms/std-helpdesk.orb +626 -407
  72. package/behaviors/exports/organisms/std-hr-portal.orb +1309 -714
  73. package/behaviors/exports/organisms/std-iot-dashboard.orb +1247 -335
  74. package/behaviors/exports/organisms/std-lms.orb +658 -362
  75. package/behaviors/exports/organisms/std-platformer-app.orb +56 -8
  76. package/behaviors/exports/organisms/std-project-manager.orb +1697 -1183
  77. package/behaviors/exports/organisms/std-puzzle-app.orb +20 -0
  78. package/behaviors/exports/organisms/std-realtime-chat.orb +552 -28
  79. package/behaviors/exports/organisms/std-rpg-game.orb +397 -56
  80. package/behaviors/exports/organisms/std-social-feed.orb +12 -8
  81. package/behaviors/exports/organisms/std-stem-lab.orb +175 -290
  82. package/behaviors/exports/organisms/std-strategy-game.orb +252 -395
  83. package/behaviors/exports/organisms/std-trading-dashboard.orb +718 -524
  84. package/behaviors/exports/validation-report.json +252 -252
  85. package/behaviors/exports/verify-results.json +13 -0
  86. package/dist/behaviors/exports/atoms/std-async.orb +41 -24
  87. package/dist/behaviors/exports/atoms/std-browse.orb +12 -5
  88. package/dist/behaviors/exports/atoms/std-cache-aside.orb +256 -42
  89. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +577 -97
  90. package/dist/behaviors/exports/atoms/std-collision.orb +278 -206
  91. package/dist/behaviors/exports/atoms/std-combat-log.orb +6 -1
  92. package/dist/behaviors/exports/atoms/std-combat.orb +6 -1
  93. package/dist/behaviors/exports/atoms/std-confirmation.orb +212 -7
  94. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +6 -1
  95. package/dist/behaviors/exports/atoms/std-display.orb +166 -21
  96. package/dist/behaviors/exports/atoms/std-drawer.orb +208 -104
  97. package/dist/behaviors/exports/atoms/std-filter.orb +211 -18
  98. package/dist/behaviors/exports/atoms/std-game-audio.orb +6 -1
  99. package/dist/behaviors/exports/atoms/std-game-canvas2d.orb +6 -1
  100. package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +6 -1
  101. package/dist/behaviors/exports/atoms/std-game-hud.orb +6 -1
  102. package/dist/behaviors/exports/atoms/std-game-menu.orb +6 -1
  103. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +6 -1
  104. package/dist/behaviors/exports/atoms/std-gameflow.orb +100 -5
  105. package/dist/behaviors/exports/atoms/std-input.orb +142 -137
  106. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +6 -1
  107. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +6 -1
  108. package/dist/behaviors/exports/atoms/std-loading.orb +27 -76
  109. package/dist/behaviors/exports/atoms/std-modal.orb +177 -93
  110. package/dist/behaviors/exports/atoms/std-movement.orb +401 -31
  111. package/dist/behaviors/exports/atoms/std-notification.orb +46 -95
  112. package/dist/behaviors/exports/atoms/std-overworld.orb +44 -16
  113. package/dist/behaviors/exports/atoms/std-pagination.orb +26 -89
  114. package/dist/behaviors/exports/atoms/std-physics2d.orb +6 -1
  115. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +6 -1
  116. package/dist/behaviors/exports/atoms/std-quest.orb +309 -34
  117. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +410 -157
  118. package/dist/behaviors/exports/atoms/std-score-board.orb +6 -1
  119. package/dist/behaviors/exports/atoms/std-score.orb +211 -11
  120. package/dist/behaviors/exports/atoms/std-search.orb +28 -27
  121. package/dist/behaviors/exports/atoms/std-selection.orb +160 -121
  122. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +6 -1
  123. package/dist/behaviors/exports/atoms/std-sort.orb +134 -24
  124. package/dist/behaviors/exports/atoms/std-sprite.orb +6 -1
  125. package/dist/behaviors/exports/atoms/std-tabs.orb +25 -15
  126. package/dist/behaviors/exports/atoms/std-timer.orb +483 -91
  127. package/dist/behaviors/exports/atoms/std-undo.orb +211 -81
  128. package/dist/behaviors/exports/atoms/std-wizard.orb +31 -34
  129. package/dist/behaviors/exports/molecules/std-builder-game.orb +6 -1
  130. package/dist/behaviors/exports/molecules/std-cart.orb +6 -1
  131. package/dist/behaviors/exports/molecules/std-classifier-game.orb +6 -1
  132. package/dist/behaviors/exports/molecules/std-debugger-game.orb +6 -1
  133. package/dist/behaviors/exports/molecules/std-detail.orb +12 -5
  134. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +6 -1
  135. package/dist/behaviors/exports/molecules/std-geospatial.orb +28 -9
  136. package/dist/behaviors/exports/molecules/std-inventory.orb +28 -9
  137. package/dist/behaviors/exports/molecules/std-list.orb +392 -5
  138. package/dist/behaviors/exports/molecules/std-messaging.orb +12 -5
  139. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +6 -1
  140. package/dist/behaviors/exports/molecules/std-platformer-game.orb +40 -1
  141. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +26 -1
  142. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +6 -1
  143. package/dist/behaviors/exports/molecules/std-simulator-game.orb +6 -1
  144. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +40 -1
  145. package/dist/behaviors/exports/organisms/std-api-gateway.orb +1145 -403
  146. package/dist/behaviors/exports/organisms/std-arcade-game.orb +94 -4
  147. package/dist/behaviors/exports/organisms/std-booking-system.orb +2165 -1605
  148. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +581 -47
  149. package/dist/behaviors/exports/organisms/std-cms.orb +1713 -947
  150. package/dist/behaviors/exports/organisms/std-coding-academy.orb +180 -380
  151. package/dist/behaviors/exports/organisms/std-crm.orb +1669 -1153
  152. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +1430 -378
  153. package/dist/behaviors/exports/organisms/std-ecommerce.orb +2361 -1601
  154. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +622 -438
  155. package/dist/behaviors/exports/organisms/std-healthcare.orb +1687 -1125
  156. package/dist/behaviors/exports/organisms/std-helpdesk.orb +626 -407
  157. package/dist/behaviors/exports/organisms/std-hr-portal.orb +1309 -714
  158. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +1247 -335
  159. package/dist/behaviors/exports/organisms/std-lms.orb +658 -362
  160. package/dist/behaviors/exports/organisms/std-platformer-app.orb +56 -8
  161. package/dist/behaviors/exports/organisms/std-project-manager.orb +1697 -1183
  162. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +20 -0
  163. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +552 -28
  164. package/dist/behaviors/exports/organisms/std-rpg-game.orb +397 -56
  165. package/dist/behaviors/exports/organisms/std-social-feed.orb +12 -8
  166. package/dist/behaviors/exports/organisms/std-stem-lab.orb +175 -290
  167. package/dist/behaviors/exports/organisms/std-strategy-game.orb +252 -395
  168. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +718 -524
  169. package/dist/behaviors/exports/validation-report.json +252 -252
  170. package/dist/behaviors/exports/verify-results.json +13 -0
  171. package/dist/behaviors/functions/index.js +715 -593
  172. package/dist/behaviors/functions/index.js.map +1 -1
  173. package/dist/behaviors/index.js +715 -593
  174. package/dist/behaviors/index.js.map +1 -1
  175. package/dist/exports/atoms/std-async.orb +41 -24
  176. package/dist/exports/atoms/std-browse.orb +12 -5
  177. package/dist/exports/atoms/std-cache-aside.orb +256 -42
  178. package/dist/exports/atoms/std-circuit-breaker.orb +577 -97
  179. package/dist/exports/atoms/std-collision.orb +278 -206
  180. package/dist/exports/atoms/std-combat-log.orb +6 -1
  181. package/dist/exports/atoms/std-combat.orb +6 -1
  182. package/dist/exports/atoms/std-confirmation.orb +212 -7
  183. package/dist/exports/atoms/std-dialogue-box.orb +6 -1
  184. package/dist/exports/atoms/std-display.orb +166 -21
  185. package/dist/exports/atoms/std-drawer.orb +208 -104
  186. package/dist/exports/atoms/std-filter.orb +211 -18
  187. package/dist/exports/atoms/std-game-audio.orb +6 -1
  188. package/dist/exports/atoms/std-game-canvas2d.orb +6 -1
  189. package/dist/exports/atoms/std-game-canvas3d.orb +6 -1
  190. package/dist/exports/atoms/std-game-hud.orb +6 -1
  191. package/dist/exports/atoms/std-game-menu.orb +6 -1
  192. package/dist/exports/atoms/std-game-over-screen.orb +6 -1
  193. package/dist/exports/atoms/std-gameflow.orb +100 -5
  194. package/dist/exports/atoms/std-input.orb +142 -137
  195. package/dist/exports/atoms/std-inventory-panel.orb +6 -1
  196. package/dist/exports/atoms/std-isometric-canvas.orb +6 -1
  197. package/dist/exports/atoms/std-loading.orb +27 -76
  198. package/dist/exports/atoms/std-modal.orb +177 -93
  199. package/dist/exports/atoms/std-movement.orb +401 -31
  200. package/dist/exports/atoms/std-notification.orb +46 -95
  201. package/dist/exports/atoms/std-overworld.orb +44 -16
  202. package/dist/exports/atoms/std-pagination.orb +26 -89
  203. package/dist/exports/atoms/std-physics2d.orb +6 -1
  204. package/dist/exports/atoms/std-platformer-canvas.orb +6 -1
  205. package/dist/exports/atoms/std-quest.orb +309 -34
  206. package/dist/exports/atoms/std-rate-limiter.orb +410 -157
  207. package/dist/exports/atoms/std-score-board.orb +6 -1
  208. package/dist/exports/atoms/std-score.orb +211 -11
  209. package/dist/exports/atoms/std-search.orb +28 -27
  210. package/dist/exports/atoms/std-selection.orb +160 -121
  211. package/dist/exports/atoms/std-simulation-canvas.orb +6 -1
  212. package/dist/exports/atoms/std-sort.orb +134 -24
  213. package/dist/exports/atoms/std-sprite.orb +6 -1
  214. package/dist/exports/atoms/std-tabs.orb +25 -15
  215. package/dist/exports/atoms/std-timer.orb +483 -91
  216. package/dist/exports/atoms/std-undo.orb +211 -81
  217. package/dist/exports/atoms/std-wizard.orb +31 -34
  218. package/dist/exports/molecules/std-builder-game.orb +6 -1
  219. package/dist/exports/molecules/std-cart.orb +6 -1
  220. package/dist/exports/molecules/std-classifier-game.orb +6 -1
  221. package/dist/exports/molecules/std-debugger-game.orb +6 -1
  222. package/dist/exports/molecules/std-detail.orb +12 -5
  223. package/dist/exports/molecules/std-event-handler-game.orb +6 -1
  224. package/dist/exports/molecules/std-geospatial.orb +28 -9
  225. package/dist/exports/molecules/std-inventory.orb +28 -9
  226. package/dist/exports/molecules/std-list.orb +392 -5
  227. package/dist/exports/molecules/std-messaging.orb +12 -5
  228. package/dist/exports/molecules/std-negotiator-game.orb +6 -1
  229. package/dist/exports/molecules/std-platformer-game.orb +40 -1
  230. package/dist/exports/molecules/std-puzzle-game.orb +26 -1
  231. package/dist/exports/molecules/std-sequencer-game.orb +6 -1
  232. package/dist/exports/molecules/std-simulator-game.orb +6 -1
  233. package/dist/exports/molecules/std-turn-based-battle.orb +40 -1
  234. package/dist/exports/organisms/std-api-gateway.orb +1145 -403
  235. package/dist/exports/organisms/std-arcade-game.orb +94 -4
  236. package/dist/exports/organisms/std-booking-system.orb +2165 -1605
  237. package/dist/exports/organisms/std-cicd-pipeline.orb +581 -47
  238. package/dist/exports/organisms/std-cms.orb +1713 -947
  239. package/dist/exports/organisms/std-coding-academy.orb +180 -380
  240. package/dist/exports/organisms/std-crm.orb +1669 -1153
  241. package/dist/exports/organisms/std-devops-dashboard.orb +1430 -378
  242. package/dist/exports/organisms/std-ecommerce.orb +2361 -1601
  243. package/dist/exports/organisms/std-finance-tracker.orb +622 -438
  244. package/dist/exports/organisms/std-healthcare.orb +1687 -1125
  245. package/dist/exports/organisms/std-helpdesk.orb +626 -407
  246. package/dist/exports/organisms/std-hr-portal.orb +1309 -714
  247. package/dist/exports/organisms/std-iot-dashboard.orb +1247 -335
  248. package/dist/exports/organisms/std-lms.orb +658 -362
  249. package/dist/exports/organisms/std-platformer-app.orb +56 -8
  250. package/dist/exports/organisms/std-project-manager.orb +1697 -1183
  251. package/dist/exports/organisms/std-puzzle-app.orb +20 -0
  252. package/dist/exports/organisms/std-realtime-chat.orb +552 -28
  253. package/dist/exports/organisms/std-rpg-game.orb +397 -56
  254. package/dist/exports/organisms/std-social-feed.orb +12 -8
  255. package/dist/exports/organisms/std-stem-lab.orb +175 -290
  256. package/dist/exports/organisms/std-strategy-game.orb +252 -395
  257. package/dist/exports/organisms/std-trading-dashboard.orb +718 -524
  258. package/dist/exports/validation-report.json +252 -252
  259. package/dist/exports/verify-results.json +13 -0
  260. package/dist/index.js +715 -593
  261. package/dist/index.js.map +1 -1
  262. package/package.json +1 -1
@@ -229,7 +229,9 @@
229
229
  }
230
230
  ],
231
231
  "className": "transition-shadow hover:shadow-md cursor-pointer",
232
- "children": [
232
+ "renderItem": [
233
+ "fn",
234
+ "item",
233
235
  {
234
236
  "type": "stack",
235
237
  "direction": "vertical",
@@ -255,13 +257,13 @@
255
257
  {
256
258
  "type": "typography",
257
259
  "variant": "h4",
258
- "content": "@entity.name"
260
+ "content": "@item.name"
259
261
  }
260
262
  ]
261
263
  },
262
264
  {
263
265
  "type": "badge",
264
- "label": "@entity.specialty"
266
+ "label": "@item.specialty"
265
267
  }
266
268
  ]
267
269
  },
@@ -269,7 +271,7 @@
269
271
  "type": "typography",
270
272
  "variant": "caption",
271
273
  "color": "muted",
272
- "content": "@entity.location"
274
+ "content": "@item.location"
273
275
  }
274
276
  ]
275
277
  }
@@ -387,143 +389,55 @@
387
389
  "modal",
388
390
  null
389
391
  ],
390
- [
391
- "fetch",
392
- "Provider"
393
- ],
394
- [
395
- "notify",
396
- "Provider deleted successfully"
397
- ]
398
- ]
399
- },
400
- {
401
- "from": "deleting",
402
- "to": "browsing",
403
- "event": "CANCEL",
404
- "effects": [
405
- [
406
- "render-ui",
407
- "modal",
408
- null
409
- ]
410
- ]
411
- },
412
- {
413
- "from": "deleting",
414
- "to": "browsing",
415
- "event": "CLOSE",
416
- "effects": [
417
- [
418
- "render-ui",
419
- "modal",
420
- null
421
- ]
422
- ]
423
- }
424
- ]
425
- },
426
- "emits": [
427
- {
428
- "event": "BOOK",
429
- "payload": [
430
- {
431
- "name": "id",
432
- "type": "string",
433
- "required": true
434
- }
435
- ],
436
- "scope": "external"
437
- }
438
- ]
439
- },
440
- {
441
- "name": "ProviderCreate",
442
- "linkedEntity": "Provider",
443
- "category": "interaction",
444
- "emits": [
445
- {
446
- "event": "PROVIDER_CREATED"
447
- }
448
- ],
449
- "stateMachine": {
450
- "states": [
451
- {
452
- "name": "closed",
453
- "isInitial": true
454
- },
455
- {
456
- "name": "open"
457
- }
458
- ],
459
- "events": [
460
- {
461
- "key": "INIT",
462
- "name": "Initialize"
463
- },
464
- {
465
- "key": "CREATE",
466
- "name": "Open"
467
- },
468
- {
469
- "key": "CLOSE",
470
- "name": "Close"
471
- },
472
- {
473
- "key": "SAVE",
474
- "name": "Save",
475
- "payload": [
476
- {
477
- "name": "data",
478
- "type": "object",
479
- "required": true
480
- }
481
- ]
482
- }
483
- ],
484
- "transitions": [
485
- {
486
- "from": "closed",
487
- "to": "closed",
488
- "event": "INIT",
489
- "effects": [
490
- [
491
- "fetch",
492
- "Provider"
493
- ]
494
- ]
495
- },
496
- {
497
- "from": "closed",
498
- "to": "open",
499
- "event": "CREATE",
500
- "effects": [
501
392
  [
502
393
  "fetch",
503
394
  "Provider"
504
395
  ],
505
396
  [
506
397
  "render-ui",
507
- "modal",
398
+ "main",
508
399
  {
509
400
  "type": "stack",
510
401
  "direction": "vertical",
511
- "gap": "md",
402
+ "gap": "lg",
512
403
  "children": [
513
404
  {
514
405
  "type": "stack",
515
406
  "direction": "horizontal",
516
- "gap": "sm",
407
+ "gap": "md",
408
+ "justify": "space-between",
517
409
  "children": [
518
410
  {
519
- "type": "icon",
520
- "name": "plus-circle",
521
- "size": "md"
411
+ "type": "stack",
412
+ "direction": "horizontal",
413
+ "gap": "sm",
414
+ "align": "center",
415
+ "children": [
416
+ {
417
+ "type": "icon",
418
+ "name": "briefcase",
419
+ "size": "lg"
420
+ },
421
+ {
422
+ "type": "typography",
423
+ "content": "Providers",
424
+ "variant": "h2"
425
+ }
426
+ ]
522
427
  },
523
428
  {
524
- "type": "typography",
525
- "content": "Create Provider",
526
- "variant": "h3"
429
+ "type": "stack",
430
+ "direction": "horizontal",
431
+ "gap": "sm",
432
+ "children": [
433
+ {
434
+ "type": "button",
435
+ "label": "Create Provider",
436
+ "event": "CREATE",
437
+ "variant": "primary",
438
+ "icon": "plus"
439
+ }
440
+ ]
527
441
  }
528
442
  ]
529
443
  },
@@ -531,47 +445,93 @@
531
445
  "type": "divider"
532
446
  },
533
447
  {
534
- "type": "form-section",
448
+ "type": "data-grid",
535
449
  "entity": "Provider",
536
- "mode": "create",
537
- "submitEvent": "SAVE",
538
- "cancelEvent": "CLOSE",
539
- "fields": [
540
- "name",
541
- "specialty",
542
- "location",
543
- "phone",
544
- "rating",
545
- "available"
450
+ "emptyIcon": "inbox",
451
+ "emptyTitle": "No providers yet",
452
+ "emptyDescription": "Create your first provider to get started.",
453
+ "itemActions": [
454
+ {
455
+ "label": "View",
456
+ "event": "VIEW"
457
+ },
458
+ {
459
+ "label": "Edit",
460
+ "event": "EDIT"
461
+ },
462
+ {
463
+ "label": "Delete",
464
+ "event": "DELETE",
465
+ "variant": "danger"
466
+ }
467
+ ],
468
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
469
+ "renderItem": [
470
+ "fn",
471
+ "item",
472
+ {
473
+ "type": "stack",
474
+ "direction": "vertical",
475
+ "gap": "sm",
476
+ "children": [
477
+ {
478
+ "type": "stack",
479
+ "direction": "horizontal",
480
+ "justify": "space-between",
481
+ "align": "center",
482
+ "children": [
483
+ {
484
+ "type": "stack",
485
+ "direction": "horizontal",
486
+ "gap": "sm",
487
+ "align": "center",
488
+ "children": [
489
+ {
490
+ "type": "icon",
491
+ "name": "briefcase",
492
+ "size": "sm"
493
+ },
494
+ {
495
+ "type": "typography",
496
+ "variant": "h4",
497
+ "content": "@item.name"
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ "type": "badge",
503
+ "label": "@item.specialty"
504
+ }
505
+ ]
506
+ },
507
+ {
508
+ "type": "typography",
509
+ "variant": "caption",
510
+ "color": "muted",
511
+ "content": "@item.location"
512
+ }
513
+ ]
514
+ }
546
515
  ]
547
516
  }
548
517
  ]
549
518
  }
519
+ ],
520
+ [
521
+ "notify",
522
+ "Provider deleted successfully"
550
523
  ]
551
524
  ]
552
525
  },
553
526
  {
554
- "from": "open",
555
- "to": "closed",
556
- "event": "CLOSE",
527
+ "from": "deleting",
528
+ "to": "browsing",
529
+ "event": "CANCEL",
557
530
  "effects": [
558
531
  [
559
532
  "render-ui",
560
533
  "modal",
561
534
  null
562
- ]
563
- ]
564
- },
565
- {
566
- "from": "open",
567
- "to": "closed",
568
- "event": "SAVE",
569
- "effects": [
570
- [
571
- "persist",
572
- "create",
573
- "Provider",
574
- "@payload.data"
575
535
  ],
576
536
  [
577
537
  "fetch",
@@ -579,117 +539,49 @@
579
539
  ],
580
540
  [
581
541
  "render-ui",
582
- "modal",
583
- null
584
- ],
585
- [
586
- "emit",
587
- "PROVIDER_CREATED"
588
- ],
589
- [
590
- "notify",
591
- "Provider created successfully"
592
- ]
593
- ]
594
- }
595
- ]
596
- }
597
- },
598
- {
599
- "name": "ProviderEdit",
600
- "linkedEntity": "Provider",
601
- "category": "interaction",
602
- "emits": [
603
- {
604
- "event": "PROVIDER_UPDATED"
605
- }
606
- ],
607
- "stateMachine": {
608
- "states": [
609
- {
610
- "name": "closed",
611
- "isInitial": true
612
- },
613
- {
614
- "name": "open"
615
- }
616
- ],
617
- "events": [
618
- {
619
- "key": "INIT",
620
- "name": "Initialize"
621
- },
622
- {
623
- "key": "EDIT",
624
- "name": "Open",
625
- "payload": [
626
- {
627
- "name": "id",
628
- "type": "string",
629
- "required": true
630
- }
631
- ]
632
- },
633
- {
634
- "key": "CLOSE",
635
- "name": "Close"
636
- },
637
- {
638
- "key": "SAVE",
639
- "name": "Save",
640
- "payload": [
641
- {
642
- "name": "data",
643
- "type": "object",
644
- "required": true
645
- }
646
- ]
647
- }
648
- ],
649
- "transitions": [
650
- {
651
- "from": "closed",
652
- "to": "closed",
653
- "event": "INIT",
654
- "effects": [
655
- [
656
- "fetch",
657
- "Provider"
658
- ]
659
- ]
660
- },
661
- {
662
- "from": "closed",
663
- "to": "open",
664
- "event": "EDIT",
665
- "effects": [
666
- [
667
- "fetch",
668
- "Provider",
669
- "@payload.id"
670
- ],
671
- [
672
- "render-ui",
673
- "modal",
542
+ "main",
674
543
  {
675
544
  "type": "stack",
676
545
  "direction": "vertical",
677
- "gap": "md",
546
+ "gap": "lg",
678
547
  "children": [
679
548
  {
680
549
  "type": "stack",
681
550
  "direction": "horizontal",
682
- "gap": "sm",
551
+ "gap": "md",
552
+ "justify": "space-between",
683
553
  "children": [
684
554
  {
685
- "type": "icon",
686
- "name": "edit",
687
- "size": "md"
555
+ "type": "stack",
556
+ "direction": "horizontal",
557
+ "gap": "sm",
558
+ "align": "center",
559
+ "children": [
560
+ {
561
+ "type": "icon",
562
+ "name": "briefcase",
563
+ "size": "lg"
564
+ },
565
+ {
566
+ "type": "typography",
567
+ "content": "Providers",
568
+ "variant": "h2"
569
+ }
570
+ ]
688
571
  },
689
572
  {
690
- "type": "typography",
691
- "content": "Edit Provider",
692
- "variant": "h3"
573
+ "type": "stack",
574
+ "direction": "horizontal",
575
+ "gap": "sm",
576
+ "children": [
577
+ {
578
+ "type": "button",
579
+ "label": "Create Provider",
580
+ "event": "CREATE",
581
+ "variant": "primary",
582
+ "icon": "plus"
583
+ }
584
+ ]
693
585
  }
694
586
  ]
695
587
  },
@@ -697,20 +589,74 @@
697
589
  "type": "divider"
698
590
  },
699
591
  {
700
- "type": "form-section",
592
+ "type": "data-grid",
701
593
  "entity": "Provider",
702
- "mode": "edit",
703
- "submitEvent": "SAVE",
704
- "cancelEvent": "CLOSE",
705
- "fields": [
706
- "name",
707
- "specialty",
708
- "location",
709
- "phone",
710
- "rating",
711
- "available"
594
+ "emptyIcon": "inbox",
595
+ "emptyTitle": "No providers yet",
596
+ "emptyDescription": "Create your first provider to get started.",
597
+ "itemActions": [
598
+ {
599
+ "label": "View",
600
+ "event": "VIEW"
601
+ },
602
+ {
603
+ "label": "Edit",
604
+ "event": "EDIT"
605
+ },
606
+ {
607
+ "label": "Delete",
608
+ "event": "DELETE",
609
+ "variant": "danger"
610
+ }
712
611
  ],
713
- "entityId": "@entity.id"
612
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
613
+ "renderItem": [
614
+ "fn",
615
+ "item",
616
+ {
617
+ "type": "stack",
618
+ "direction": "vertical",
619
+ "gap": "sm",
620
+ "children": [
621
+ {
622
+ "type": "stack",
623
+ "direction": "horizontal",
624
+ "justify": "space-between",
625
+ "align": "center",
626
+ "children": [
627
+ {
628
+ "type": "stack",
629
+ "direction": "horizontal",
630
+ "gap": "sm",
631
+ "align": "center",
632
+ "children": [
633
+ {
634
+ "type": "icon",
635
+ "name": "briefcase",
636
+ "size": "sm"
637
+ },
638
+ {
639
+ "type": "typography",
640
+ "variant": "h4",
641
+ "content": "@item.name"
642
+ }
643
+ ]
644
+ },
645
+ {
646
+ "type": "badge",
647
+ "label": "@item.specialty"
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "type": "typography",
653
+ "variant": "caption",
654
+ "color": "muted",
655
+ "content": "@item.location"
656
+ }
657
+ ]
658
+ }
659
+ ]
714
660
  }
715
661
  ]
716
662
  }
@@ -718,27 +664,14 @@
718
664
  ]
719
665
  },
720
666
  {
721
- "from": "open",
722
- "to": "closed",
667
+ "from": "deleting",
668
+ "to": "browsing",
723
669
  "event": "CLOSE",
724
670
  "effects": [
725
671
  [
726
672
  "render-ui",
727
673
  "modal",
728
674
  null
729
- ]
730
- ]
731
- },
732
- {
733
- "from": "open",
734
- "to": "closed",
735
- "event": "SAVE",
736
- "effects": [
737
- [
738
- "persist",
739
- "update",
740
- "Provider",
741
- "@payload.data"
742
675
  ],
743
676
  [
744
677
  "fetch",
@@ -746,55 +679,188 @@
746
679
  ],
747
680
  [
748
681
  "render-ui",
749
- "modal",
750
- null
751
- ],
752
- [
753
- "emit",
754
- "PROVIDER_UPDATED"
755
- ],
756
- [
757
- "notify",
758
- "Provider updated successfully"
759
- ]
760
- ]
761
- }
762
- ]
763
- }
764
- },
765
- {
766
- "name": "ProviderView",
767
- "linkedEntity": "Provider",
768
- "category": "interaction",
769
- "stateMachine": {
770
- "states": [
771
- {
772
- "name": "closed",
773
- "isInitial": true
774
- },
775
- {
776
- "name": "open"
777
- }
778
- ],
779
- "events": [
780
- {
781
- "key": "INIT",
782
- "name": "Initialize"
783
- },
784
- {
785
- "key": "VIEW",
786
- "name": "Open",
787
- "payload": [
788
- {
789
- "name": "id",
790
- "type": "string",
791
- "required": true
792
- }
682
+ "main",
683
+ {
684
+ "type": "stack",
685
+ "direction": "vertical",
686
+ "gap": "lg",
687
+ "children": [
688
+ {
689
+ "type": "stack",
690
+ "direction": "horizontal",
691
+ "gap": "md",
692
+ "justify": "space-between",
693
+ "children": [
694
+ {
695
+ "type": "stack",
696
+ "direction": "horizontal",
697
+ "gap": "sm",
698
+ "align": "center",
699
+ "children": [
700
+ {
701
+ "type": "icon",
702
+ "name": "briefcase",
703
+ "size": "lg"
704
+ },
705
+ {
706
+ "type": "typography",
707
+ "content": "Providers",
708
+ "variant": "h2"
709
+ }
710
+ ]
711
+ },
712
+ {
713
+ "type": "stack",
714
+ "direction": "horizontal",
715
+ "gap": "sm",
716
+ "children": [
717
+ {
718
+ "type": "button",
719
+ "label": "Create Provider",
720
+ "event": "CREATE",
721
+ "variant": "primary",
722
+ "icon": "plus"
723
+ }
724
+ ]
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ "type": "divider"
730
+ },
731
+ {
732
+ "type": "data-grid",
733
+ "entity": "Provider",
734
+ "emptyIcon": "inbox",
735
+ "emptyTitle": "No providers yet",
736
+ "emptyDescription": "Create your first provider to get started.",
737
+ "itemActions": [
738
+ {
739
+ "label": "View",
740
+ "event": "VIEW"
741
+ },
742
+ {
743
+ "label": "Edit",
744
+ "event": "EDIT"
745
+ },
746
+ {
747
+ "label": "Delete",
748
+ "event": "DELETE",
749
+ "variant": "danger"
750
+ }
751
+ ],
752
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
753
+ "renderItem": [
754
+ "fn",
755
+ "item",
756
+ {
757
+ "type": "stack",
758
+ "direction": "vertical",
759
+ "gap": "sm",
760
+ "children": [
761
+ {
762
+ "type": "stack",
763
+ "direction": "horizontal",
764
+ "justify": "space-between",
765
+ "align": "center",
766
+ "children": [
767
+ {
768
+ "type": "stack",
769
+ "direction": "horizontal",
770
+ "gap": "sm",
771
+ "align": "center",
772
+ "children": [
773
+ {
774
+ "type": "icon",
775
+ "name": "briefcase",
776
+ "size": "sm"
777
+ },
778
+ {
779
+ "type": "typography",
780
+ "variant": "h4",
781
+ "content": "@item.name"
782
+ }
783
+ ]
784
+ },
785
+ {
786
+ "type": "badge",
787
+ "label": "@item.specialty"
788
+ }
789
+ ]
790
+ },
791
+ {
792
+ "type": "typography",
793
+ "variant": "caption",
794
+ "color": "muted",
795
+ "content": "@item.location"
796
+ }
797
+ ]
798
+ }
799
+ ]
800
+ }
801
+ ]
802
+ }
803
+ ]
793
804
  ]
805
+ }
806
+ ]
807
+ },
808
+ "emits": [
809
+ {
810
+ "event": "BOOK",
811
+ "payload": [
812
+ {
813
+ "name": "id",
814
+ "type": "string",
815
+ "required": true
816
+ }
817
+ ],
818
+ "scope": "external"
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ "name": "ProviderCreate",
824
+ "linkedEntity": "Provider",
825
+ "category": "interaction",
826
+ "emits": [
827
+ {
828
+ "event": "PROVIDER_CREATED"
829
+ }
830
+ ],
831
+ "stateMachine": {
832
+ "states": [
833
+ {
834
+ "name": "closed",
835
+ "isInitial": true
836
+ },
837
+ {
838
+ "name": "open"
839
+ }
840
+ ],
841
+ "events": [
842
+ {
843
+ "key": "INIT",
844
+ "name": "Initialize"
845
+ },
846
+ {
847
+ "key": "CREATE",
848
+ "name": "Open"
794
849
  },
795
850
  {
796
851
  "key": "CLOSE",
797
852
  "name": "Close"
853
+ },
854
+ {
855
+ "key": "SAVE",
856
+ "name": "Save",
857
+ "payload": [
858
+ {
859
+ "name": "data",
860
+ "type": "object",
861
+ "required": true
862
+ }
863
+ ]
798
864
  }
799
865
  ],
800
866
  "transitions": [
@@ -812,12 +878,11 @@
812
878
  {
813
879
  "from": "closed",
814
880
  "to": "open",
815
- "event": "VIEW",
881
+ "event": "CREATE",
816
882
  "effects": [
817
883
  [
818
884
  "fetch",
819
- "Provider",
820
- "@payload.id"
885
+ "Provider"
821
886
  ],
822
887
  [
823
888
  "render-ui",
@@ -831,17 +896,16 @@
831
896
  "type": "stack",
832
897
  "direction": "horizontal",
833
898
  "gap": "sm",
834
- "align": "center",
835
899
  "children": [
836
900
  {
837
901
  "type": "icon",
838
- "name": "eye",
902
+ "name": "plus-circle",
839
903
  "size": "md"
840
904
  },
841
905
  {
842
906
  "type": "typography",
843
- "variant": "h3",
844
- "content": "@entity.name"
907
+ "content": "Create Provider",
908
+ "variant": "h3"
845
909
  }
846
910
  ]
847
911
  },
@@ -849,129 +913,18 @@
849
913
  "type": "divider"
850
914
  },
851
915
  {
852
- "type": "stack",
853
- "direction": "horizontal",
854
- "gap": "md",
855
- "children": [
856
- {
857
- "type": "typography",
858
- "variant": "caption",
859
- "content": "Name"
860
- },
861
- {
862
- "type": "typography",
863
- "variant": "body",
864
- "content": "@entity.name"
865
- }
866
- ]
867
- },
868
- {
869
- "type": "stack",
870
- "direction": "horizontal",
871
- "gap": "md",
872
- "children": [
873
- {
874
- "type": "typography",
875
- "variant": "caption",
876
- "content": "Specialty"
877
- },
878
- {
879
- "type": "typography",
880
- "variant": "body",
881
- "content": "@entity.specialty"
882
- }
883
- ]
884
- },
885
- {
886
- "type": "stack",
887
- "direction": "horizontal",
888
- "gap": "md",
889
- "children": [
890
- {
891
- "type": "typography",
892
- "variant": "caption",
893
- "content": "Location"
894
- },
895
- {
896
- "type": "typography",
897
- "variant": "body",
898
- "content": "@entity.location"
899
- }
900
- ]
901
- },
902
- {
903
- "type": "stack",
904
- "direction": "horizontal",
905
- "gap": "md",
906
- "children": [
907
- {
908
- "type": "typography",
909
- "variant": "caption",
910
- "content": "Phone"
911
- },
912
- {
913
- "type": "typography",
914
- "variant": "body",
915
- "content": "@entity.phone"
916
- }
917
- ]
918
- },
919
- {
920
- "type": "stack",
921
- "direction": "horizontal",
922
- "gap": "md",
923
- "children": [
924
- {
925
- "type": "typography",
926
- "variant": "caption",
927
- "content": "Rating"
928
- },
929
- {
930
- "type": "typography",
931
- "variant": "body",
932
- "content": "@entity.rating"
933
- }
934
- ]
935
- },
936
- {
937
- "type": "stack",
938
- "direction": "horizontal",
939
- "gap": "md",
940
- "children": [
941
- {
942
- "type": "typography",
943
- "variant": "caption",
944
- "content": "Available"
945
- },
946
- {
947
- "type": "typography",
948
- "variant": "body",
949
- "content": "@entity.available"
950
- }
951
- ]
952
- },
953
- {
954
- "type": "divider"
955
- },
956
- {
957
- "type": "stack",
958
- "direction": "horizontal",
959
- "gap": "sm",
960
- "justify": "end",
961
- "children": [
962
- {
963
- "type": "button",
964
- "label": "Edit",
965
- "event": "EDIT",
966
- "variant": "primary",
967
- "icon": "edit"
968
- },
969
- {
970
- "type": "button",
971
- "label": "Close",
972
- "event": "CLOSE",
973
- "variant": "ghost"
974
- }
916
+ "type": "form-section",
917
+ "entity": "Provider",
918
+ "mode": "create",
919
+ "submitEvent": "SAVE",
920
+ "cancelEvent": "CLOSE",
921
+ "fields": [
922
+ "name",
923
+ "specialty",
924
+ "location",
925
+ "phone",
926
+ "rating",
927
+ "available"
975
928
  ]
976
929
  }
977
930
  ]
@@ -990,97 +943,57 @@
990
943
  null
991
944
  ]
992
945
  ]
946
+ },
947
+ {
948
+ "from": "open",
949
+ "to": "closed",
950
+ "event": "SAVE",
951
+ "effects": [
952
+ [
953
+ "persist",
954
+ "create",
955
+ "Provider",
956
+ "@payload.data"
957
+ ],
958
+ [
959
+ "fetch",
960
+ "Provider"
961
+ ],
962
+ [
963
+ "render-ui",
964
+ "modal",
965
+ null
966
+ ],
967
+ [
968
+ "emit",
969
+ "PROVIDER_CREATED"
970
+ ],
971
+ [
972
+ "notify",
973
+ "Provider created successfully"
974
+ ]
975
+ ]
993
976
  }
994
977
  ]
995
978
  }
996
- }
997
- ],
998
- "pages": [
979
+ },
999
980
  {
1000
- "name": "ProvidersPage",
1001
- "path": "/providers",
1002
- "isInitial": true,
1003
- "traits": [
1004
- {
1005
- "ref": "ProviderBrowse"
1006
- },
1007
- {
1008
- "ref": "ProviderCreate"
1009
- },
1010
- {
1011
- "ref": "ProviderEdit"
1012
- },
981
+ "name": "ProviderEdit",
982
+ "linkedEntity": "Provider",
983
+ "category": "interaction",
984
+ "emits": [
1013
985
  {
1014
- "ref": "ProviderView"
986
+ "event": "PROVIDER_UPDATED"
1015
987
  }
1016
- ]
1017
- }
1018
- ]
1019
- },
1020
- {
1021
- "name": "BookingOrbital",
1022
- "entity": {
1023
- "name": "Booking",
1024
- "persistence": "runtime",
1025
- "fields": [
1026
- {
1027
- "name": "id",
1028
- "type": "string",
1029
- "required": true
1030
- },
1031
- {
1032
- "name": "providerName",
1033
- "type": "string",
1034
- "required": true
1035
- },
1036
- {
1037
- "name": "customerName",
1038
- "type": "string",
1039
- "required": true
1040
- },
1041
- {
1042
- "name": "customerEmail",
1043
- "type": "string",
1044
- "required": true
1045
- },
1046
- {
1047
- "name": "date",
1048
- "type": "string",
1049
- "required": true
1050
- },
1051
- {
1052
- "name": "time",
1053
- "type": "string",
1054
- "required": true
1055
- },
1056
- {
1057
- "name": "notes",
1058
- "type": "string"
1059
- }
1060
- ]
1061
- },
1062
- "traits": [
1063
- {
1064
- "name": "BookingWizard",
1065
- "linkedEntity": "Booking",
1066
- "category": "interaction",
988
+ ],
1067
989
  "stateMachine": {
1068
990
  "states": [
1069
991
  {
1070
- "name": "step1",
992
+ "name": "closed",
1071
993
  "isInitial": true
1072
994
  },
1073
995
  {
1074
- "name": "step2"
1075
- },
1076
- {
1077
- "name": "step3"
1078
- },
1079
- {
1080
- "name": "review"
1081
- },
1082
- {
1083
- "name": "complete"
996
+ "name": "open"
1084
997
  }
1085
998
  ],
1086
999
  "events": [
@@ -1089,23 +1002,23 @@
1089
1002
  "name": "Initialize"
1090
1003
  },
1091
1004
  {
1092
- "key": "NEXT",
1093
- "name": "Next Step",
1005
+ "key": "EDIT",
1006
+ "name": "Open",
1094
1007
  "payload": [
1095
1008
  {
1096
- "name": "data",
1097
- "type": "object",
1009
+ "name": "id",
1010
+ "type": "string",
1098
1011
  "required": true
1099
1012
  }
1100
1013
  ]
1101
1014
  },
1102
1015
  {
1103
- "key": "PREV",
1104
- "name": "Previous Step"
1016
+ "key": "CLOSE",
1017
+ "name": "Close"
1105
1018
  },
1106
1019
  {
1107
- "key": "COMPLETE",
1108
- "name": "Complete Wizard",
1020
+ "key": "SAVE",
1021
+ "name": "Save",
1109
1022
  "payload": [
1110
1023
  {
1111
1024
  "name": "data",
@@ -1113,93 +1026,73 @@
1113
1026
  "required": true
1114
1027
  }
1115
1028
  ]
1116
- },
1117
- {
1118
- "key": "RESTART",
1119
- "name": "Restart Wizard"
1120
1029
  }
1121
1030
  ],
1122
1031
  "transitions": [
1123
1032
  {
1124
- "from": "step1",
1125
- "to": "step1",
1033
+ "from": "closed",
1034
+ "to": "closed",
1126
1035
  "event": "INIT",
1127
1036
  "effects": [
1128
1037
  [
1129
1038
  "fetch",
1130
- "Booking"
1039
+ "Provider"
1040
+ ]
1041
+ ]
1042
+ },
1043
+ {
1044
+ "from": "closed",
1045
+ "to": "open",
1046
+ "event": "EDIT",
1047
+ "effects": [
1048
+ [
1049
+ "fetch",
1050
+ "Provider",
1051
+ "@payload.id"
1131
1052
  ],
1132
1053
  [
1133
1054
  "render-ui",
1134
- "main",
1055
+ "modal",
1135
1056
  {
1136
1057
  "type": "stack",
1137
1058
  "direction": "vertical",
1138
- "gap": "lg",
1059
+ "gap": "md",
1139
1060
  "children": [
1140
1061
  {
1141
1062
  "type": "stack",
1142
1063
  "direction": "horizontal",
1143
1064
  "gap": "sm",
1144
- "align": "center",
1145
1065
  "children": [
1146
1066
  {
1147
1067
  "type": "icon",
1148
- "name": "calendar",
1149
- "size": "lg"
1068
+ "name": "edit",
1069
+ "size": "md"
1150
1070
  },
1151
1071
  {
1152
1072
  "type": "typography",
1153
- "content": "Book Appointment",
1154
- "variant": "h2"
1073
+ "content": "Edit Provider",
1074
+ "variant": "h3"
1155
1075
  }
1156
1076
  ]
1157
1077
  },
1158
- {
1159
- "type": "badge",
1160
- "label": "Step 1 of 3"
1161
- },
1162
- {
1163
- "type": "wizard-progress",
1164
- "steps": [
1165
- "Provider Selection",
1166
- "Your Details",
1167
- "Date and Time"
1168
- ],
1169
- "currentStep": 0
1170
- },
1171
1078
  {
1172
1079
  "type": "divider"
1173
1080
  },
1174
- {
1175
- "type": "typography",
1176
- "content": "Provider Selection",
1177
- "variant": "h3"
1178
- },
1179
1081
  {
1180
1082
  "type": "form-section",
1181
- "entity": "Booking",
1182
- "mode": "create",
1183
- "submitEvent": "NEXT",
1184
- "cancelEvent": "INIT",
1083
+ "entity": "Provider",
1084
+ "mode": "edit",
1085
+ "submitEvent": "SAVE",
1086
+ "cancelEvent": "CLOSE",
1185
1087
  "fields": [
1186
- "providerName"
1187
- ]
1188
- },
1189
- {
1190
- "type": "stack",
1191
- "direction": "horizontal",
1192
- "gap": "sm",
1193
- "justify": "end",
1194
- "children": [
1195
- {
1196
- "type": "button",
1197
- "label": "Next",
1198
- "event": "NEXT",
1199
- "variant": "primary",
1200
- "icon": "arrow-right"
1201
- }
1202
- ]
1088
+ "name",
1089
+ "specialty",
1090
+ "location",
1091
+ "phone",
1092
+ "rating",
1093
+ "available"
1094
+ ],
1095
+ "entityId": "@entity.id"
1203
1096
  }
1204
1097
  ]
1205
1098
  }
@@ -1207,21 +1100,114 @@
1207
1100
  ]
1208
1101
  },
1209
1102
  {
1210
- "from": "step1",
1211
- "to": "step2",
1212
- "event": "NEXT",
1103
+ "from": "open",
1104
+ "to": "closed",
1105
+ "event": "CLOSE",
1106
+ "effects": [
1107
+ [
1108
+ "render-ui",
1109
+ "modal",
1110
+ null
1111
+ ]
1112
+ ]
1113
+ },
1114
+ {
1115
+ "from": "open",
1116
+ "to": "closed",
1117
+ "event": "SAVE",
1213
1118
  "effects": [
1119
+ [
1120
+ "persist",
1121
+ "update",
1122
+ "Provider",
1123
+ "@payload.data"
1124
+ ],
1214
1125
  [
1215
1126
  "fetch",
1216
- "Booking"
1127
+ "Provider"
1217
1128
  ],
1218
1129
  [
1219
1130
  "render-ui",
1220
- "main",
1131
+ "modal",
1132
+ null
1133
+ ],
1134
+ [
1135
+ "emit",
1136
+ "PROVIDER_UPDATED"
1137
+ ],
1138
+ [
1139
+ "notify",
1140
+ "Provider updated successfully"
1141
+ ]
1142
+ ]
1143
+ }
1144
+ ]
1145
+ }
1146
+ },
1147
+ {
1148
+ "name": "ProviderView",
1149
+ "linkedEntity": "Provider",
1150
+ "category": "interaction",
1151
+ "stateMachine": {
1152
+ "states": [
1153
+ {
1154
+ "name": "closed",
1155
+ "isInitial": true
1156
+ },
1157
+ {
1158
+ "name": "open"
1159
+ }
1160
+ ],
1161
+ "events": [
1162
+ {
1163
+ "key": "INIT",
1164
+ "name": "Initialize"
1165
+ },
1166
+ {
1167
+ "key": "VIEW",
1168
+ "name": "Open",
1169
+ "payload": [
1170
+ {
1171
+ "name": "id",
1172
+ "type": "string",
1173
+ "required": true
1174
+ }
1175
+ ]
1176
+ },
1177
+ {
1178
+ "key": "CLOSE",
1179
+ "name": "Close"
1180
+ }
1181
+ ],
1182
+ "transitions": [
1183
+ {
1184
+ "from": "closed",
1185
+ "to": "closed",
1186
+ "event": "INIT",
1187
+ "effects": [
1188
+ [
1189
+ "fetch",
1190
+ "Provider"
1191
+ ]
1192
+ ]
1193
+ },
1194
+ {
1195
+ "from": "closed",
1196
+ "to": "open",
1197
+ "event": "VIEW",
1198
+ "effects": [
1199
+ [
1200
+ "fetch",
1201
+ "Provider",
1202
+ "@payload.id"
1203
+ ],
1204
+ [
1205
+ "render-ui",
1206
+ "modal",
1221
1207
  {
1222
1208
  "type": "stack",
1223
1209
  "direction": "vertical",
1224
- "gap": "lg",
1210
+ "gap": "md",
1225
1211
  "children": [
1226
1212
  {
1227
1213
  "type": "stack",
@@ -1231,142 +1217,123 @@
1231
1217
  "children": [
1232
1218
  {
1233
1219
  "type": "icon",
1234
- "name": "calendar",
1235
- "size": "lg"
1220
+ "name": "eye",
1221
+ "size": "md"
1236
1222
  },
1237
1223
  {
1238
1224
  "type": "typography",
1239
- "content": "Book Appointment",
1240
- "variant": "h2"
1225
+ "variant": "h3",
1226
+ "content": "@entity.name"
1241
1227
  }
1242
1228
  ]
1243
1229
  },
1244
- {
1245
- "type": "badge",
1246
- "label": "Step 2 of 3"
1247
- },
1248
- {
1249
- "type": "wizard-progress",
1250
- "steps": [
1251
- "Provider Selection",
1252
- "Your Details",
1253
- "Date and Time"
1254
- ],
1255
- "currentStep": 1
1256
- },
1257
1230
  {
1258
1231
  "type": "divider"
1259
1232
  },
1260
1233
  {
1261
- "type": "typography",
1262
- "content": "Your Details",
1263
- "variant": "h3"
1264
- },
1265
- {
1266
- "type": "form-section",
1267
- "entity": "Booking",
1268
- "mode": "create",
1269
- "submitEvent": "NEXT",
1270
- "cancelEvent": "PREV",
1271
- "fields": [
1272
- "customerName",
1273
- "customerEmail"
1234
+ "type": "stack",
1235
+ "direction": "horizontal",
1236
+ "gap": "md",
1237
+ "children": [
1238
+ {
1239
+ "type": "typography",
1240
+ "variant": "caption",
1241
+ "content": "Name"
1242
+ },
1243
+ {
1244
+ "type": "typography",
1245
+ "variant": "body",
1246
+ "content": "@entity.name"
1247
+ }
1274
1248
  ]
1275
1249
  },
1276
1250
  {
1277
1251
  "type": "stack",
1278
1252
  "direction": "horizontal",
1279
- "gap": "sm",
1280
- "justify": "end",
1253
+ "gap": "md",
1281
1254
  "children": [
1282
1255
  {
1283
- "type": "button",
1284
- "label": "Back",
1285
- "event": "PREV",
1286
- "variant": "ghost",
1287
- "icon": "arrow-left"
1256
+ "type": "typography",
1257
+ "variant": "caption",
1258
+ "content": "Specialty"
1288
1259
  },
1289
1260
  {
1290
- "type": "button",
1291
- "label": "Next",
1292
- "event": "NEXT",
1293
- "variant": "primary",
1294
- "icon": "arrow-right"
1261
+ "type": "typography",
1262
+ "variant": "body",
1263
+ "content": "@entity.specialty"
1295
1264
  }
1296
1265
  ]
1297
- }
1298
- ]
1299
- }
1300
- ]
1301
- ]
1302
- },
1303
- {
1304
- "from": "step2",
1305
- "to": "step3",
1306
- "event": "NEXT",
1307
- "effects": [
1308
- [
1309
- "fetch",
1310
- "Booking"
1311
- ],
1312
- [
1313
- "render-ui",
1314
- "main",
1315
- {
1316
- "type": "stack",
1317
- "direction": "vertical",
1318
- "gap": "lg",
1319
- "children": [
1266
+ },
1320
1267
  {
1321
1268
  "type": "stack",
1322
1269
  "direction": "horizontal",
1323
- "gap": "sm",
1324
- "align": "center",
1270
+ "gap": "md",
1325
1271
  "children": [
1326
1272
  {
1327
- "type": "icon",
1328
- "name": "calendar",
1329
- "size": "lg"
1273
+ "type": "typography",
1274
+ "variant": "caption",
1275
+ "content": "Location"
1330
1276
  },
1331
1277
  {
1332
1278
  "type": "typography",
1333
- "content": "Book Appointment",
1334
- "variant": "h2"
1279
+ "variant": "body",
1280
+ "content": "@entity.location"
1335
1281
  }
1336
1282
  ]
1337
1283
  },
1338
1284
  {
1339
- "type": "badge",
1340
- "label": "Step 3 of 3"
1285
+ "type": "stack",
1286
+ "direction": "horizontal",
1287
+ "gap": "md",
1288
+ "children": [
1289
+ {
1290
+ "type": "typography",
1291
+ "variant": "caption",
1292
+ "content": "Phone"
1293
+ },
1294
+ {
1295
+ "type": "typography",
1296
+ "variant": "body",
1297
+ "content": "@entity.phone"
1298
+ }
1299
+ ]
1341
1300
  },
1342
1301
  {
1343
- "type": "wizard-progress",
1344
- "steps": [
1345
- "Provider Selection",
1346
- "Your Details",
1347
- "Date and Time"
1348
- ],
1349
- "currentStep": 2
1350
- },
1351
- {
1352
- "type": "divider"
1302
+ "type": "stack",
1303
+ "direction": "horizontal",
1304
+ "gap": "md",
1305
+ "children": [
1306
+ {
1307
+ "type": "typography",
1308
+ "variant": "caption",
1309
+ "content": "Rating"
1310
+ },
1311
+ {
1312
+ "type": "typography",
1313
+ "variant": "body",
1314
+ "content": "@entity.rating"
1315
+ }
1316
+ ]
1353
1317
  },
1354
1318
  {
1355
- "type": "typography",
1356
- "content": "Date and Time",
1357
- "variant": "h3"
1319
+ "type": "stack",
1320
+ "direction": "horizontal",
1321
+ "gap": "md",
1322
+ "children": [
1323
+ {
1324
+ "type": "typography",
1325
+ "variant": "caption",
1326
+ "content": "Available"
1327
+ },
1328
+ {
1329
+ "type": "typography",
1330
+ "variant": "body",
1331
+ "content": "@entity.available"
1332
+ }
1333
+ ]
1358
1334
  },
1359
1335
  {
1360
- "type": "form-section",
1361
- "entity": "Booking",
1362
- "mode": "create",
1363
- "submitEvent": "NEXT",
1364
- "cancelEvent": "PREV",
1365
- "fields": [
1366
- "date",
1367
- "time",
1368
- "notes"
1369
- ]
1336
+ "type": "divider"
1370
1337
  },
1371
1338
  {
1372
1339
  "type": "stack",
@@ -1376,17 +1343,16 @@
1376
1343
  "children": [
1377
1344
  {
1378
1345
  "type": "button",
1379
- "label": "Back",
1380
- "event": "PREV",
1381
- "variant": "ghost",
1382
- "icon": "arrow-left"
1346
+ "label": "Edit",
1347
+ "event": "EDIT",
1348
+ "variant": "primary",
1349
+ "icon": "edit"
1383
1350
  },
1384
1351
  {
1385
1352
  "type": "button",
1386
- "label": "Next",
1387
- "event": "NEXT",
1388
- "variant": "primary",
1389
- "icon": "arrow-right"
1353
+ "label": "Close",
1354
+ "event": "CLOSE",
1355
+ "variant": "ghost"
1390
1356
  }
1391
1357
  ]
1392
1358
  }
@@ -1396,9 +1362,150 @@
1396
1362
  ]
1397
1363
  },
1398
1364
  {
1399
- "from": "step3",
1400
- "to": "review",
1401
- "event": "NEXT",
1365
+ "from": "open",
1366
+ "to": "closed",
1367
+ "event": "CLOSE",
1368
+ "effects": [
1369
+ [
1370
+ "render-ui",
1371
+ "modal",
1372
+ null
1373
+ ]
1374
+ ]
1375
+ }
1376
+ ]
1377
+ }
1378
+ }
1379
+ ],
1380
+ "pages": [
1381
+ {
1382
+ "name": "ProvidersPage",
1383
+ "path": "/providers",
1384
+ "isInitial": true,
1385
+ "traits": [
1386
+ {
1387
+ "ref": "ProviderBrowse"
1388
+ },
1389
+ {
1390
+ "ref": "ProviderCreate"
1391
+ },
1392
+ {
1393
+ "ref": "ProviderEdit"
1394
+ },
1395
+ {
1396
+ "ref": "ProviderView"
1397
+ }
1398
+ ]
1399
+ }
1400
+ ]
1401
+ },
1402
+ {
1403
+ "name": "BookingOrbital",
1404
+ "entity": {
1405
+ "name": "Booking",
1406
+ "persistence": "runtime",
1407
+ "fields": [
1408
+ {
1409
+ "name": "id",
1410
+ "type": "string",
1411
+ "required": true
1412
+ },
1413
+ {
1414
+ "name": "providerName",
1415
+ "type": "string",
1416
+ "required": true
1417
+ },
1418
+ {
1419
+ "name": "customerName",
1420
+ "type": "string",
1421
+ "required": true
1422
+ },
1423
+ {
1424
+ "name": "customerEmail",
1425
+ "type": "string",
1426
+ "required": true
1427
+ },
1428
+ {
1429
+ "name": "date",
1430
+ "type": "string",
1431
+ "required": true
1432
+ },
1433
+ {
1434
+ "name": "time",
1435
+ "type": "string",
1436
+ "required": true
1437
+ },
1438
+ {
1439
+ "name": "notes",
1440
+ "type": "string"
1441
+ }
1442
+ ]
1443
+ },
1444
+ "traits": [
1445
+ {
1446
+ "name": "BookingWizard",
1447
+ "linkedEntity": "Booking",
1448
+ "category": "interaction",
1449
+ "stateMachine": {
1450
+ "states": [
1451
+ {
1452
+ "name": "step1",
1453
+ "isInitial": true
1454
+ },
1455
+ {
1456
+ "name": "step2"
1457
+ },
1458
+ {
1459
+ "name": "step3"
1460
+ },
1461
+ {
1462
+ "name": "review"
1463
+ },
1464
+ {
1465
+ "name": "complete"
1466
+ }
1467
+ ],
1468
+ "events": [
1469
+ {
1470
+ "key": "INIT",
1471
+ "name": "Initialize"
1472
+ },
1473
+ {
1474
+ "key": "NEXT",
1475
+ "name": "Next Step",
1476
+ "payload": [
1477
+ {
1478
+ "name": "data",
1479
+ "type": "object",
1480
+ "required": true
1481
+ }
1482
+ ]
1483
+ },
1484
+ {
1485
+ "key": "PREV",
1486
+ "name": "Previous Step"
1487
+ },
1488
+ {
1489
+ "key": "COMPLETE",
1490
+ "name": "Complete Wizard",
1491
+ "payload": [
1492
+ {
1493
+ "name": "data",
1494
+ "type": "object",
1495
+ "required": true
1496
+ }
1497
+ ]
1498
+ },
1499
+ {
1500
+ "key": "RESTART",
1501
+ "name": "Restart Wizard"
1502
+ }
1503
+ ],
1504
+ "transitions": [
1505
+ {
1506
+ "from": "step1",
1507
+ "to": "step1",
1508
+ "event": "INIT",
1402
1509
  "effects": [
1403
1510
  [
1404
1511
  "fetch",
@@ -1431,8 +1538,9 @@
1431
1538
  ]
1432
1539
  },
1433
1540
  {
1434
- "type": "badge",
1435
- "label": "Review"
1541
+ "type": "progress-dots",
1542
+ "count": 3,
1543
+ "currentIndex": 0
1436
1544
  },
1437
1545
  {
1438
1546
  "type": "wizard-progress",
@@ -1441,230 +1549,31 @@
1441
1549
  "Your Details",
1442
1550
  "Date and Time"
1443
1551
  ],
1444
- "currentStep": 3
1552
+ "currentStep": 0
1445
1553
  },
1446
1554
  {
1447
1555
  "type": "divider"
1448
1556
  },
1449
1557
  {
1450
- "type": "data-list",
1558
+ "type": "typography",
1559
+ "content": "Provider Selection",
1560
+ "variant": "h3"
1561
+ },
1562
+ {
1563
+ "type": "form-section",
1451
1564
  "entity": "Booking",
1452
- "children": [
1453
- {
1454
- "type": "stack",
1455
- "direction": "vertical",
1456
- "gap": "sm",
1457
- "children": [
1458
- {
1459
- "type": "stack",
1460
- "direction": "horizontal",
1461
- "gap": "md",
1462
- "justify": "space-between",
1463
- "children": [
1464
- {
1465
- "type": "typography",
1466
- "variant": "caption",
1467
- "content": "ProviderName"
1468
- },
1469
- {
1470
- "type": "typography",
1471
- "variant": "body",
1472
- "content": "@entity.providerName"
1473
- }
1474
- ]
1475
- },
1476
- {
1477
- "type": "stack",
1478
- "direction": "horizontal",
1479
- "gap": "md",
1480
- "justify": "space-between",
1481
- "children": [
1482
- {
1483
- "type": "typography",
1484
- "variant": "caption",
1485
- "content": "CustomerName"
1486
- },
1487
- {
1488
- "type": "typography",
1489
- "variant": "body",
1490
- "content": "@entity.customerName"
1491
- }
1492
- ]
1493
- },
1494
- {
1495
- "type": "stack",
1496
- "direction": "horizontal",
1497
- "gap": "md",
1498
- "justify": "space-between",
1499
- "children": [
1500
- {
1501
- "type": "typography",
1502
- "variant": "caption",
1503
- "content": "CustomerEmail"
1504
- },
1505
- {
1506
- "type": "typography",
1507
- "variant": "body",
1508
- "content": "@entity.customerEmail"
1509
- }
1510
- ]
1511
- },
1512
- {
1513
- "type": "stack",
1514
- "direction": "horizontal",
1515
- "gap": "md",
1516
- "justify": "space-between",
1517
- "children": [
1518
- {
1519
- "type": "typography",
1520
- "variant": "caption",
1521
- "content": "Date"
1522
- },
1523
- {
1524
- "type": "typography",
1525
- "variant": "body",
1526
- "content": "@entity.date"
1527
- }
1528
- ]
1529
- },
1530
- {
1531
- "type": "stack",
1532
- "direction": "horizontal",
1533
- "gap": "md",
1534
- "justify": "space-between",
1535
- "children": [
1536
- {
1537
- "type": "typography",
1538
- "variant": "caption",
1539
- "content": "Time"
1540
- },
1541
- {
1542
- "type": "typography",
1543
- "variant": "body",
1544
- "content": "@entity.time"
1545
- }
1546
- ]
1547
- },
1548
- {
1549
- "type": "stack",
1550
- "direction": "horizontal",
1551
- "gap": "md",
1552
- "justify": "space-between",
1553
- "children": [
1554
- {
1555
- "type": "typography",
1556
- "variant": "caption",
1557
- "content": "Notes"
1558
- },
1559
- {
1560
- "type": "typography",
1561
- "variant": "body",
1562
- "content": "@entity.notes"
1563
- }
1564
- ]
1565
- }
1566
- ]
1567
- }
1568
- ]
1569
- },
1570
- {
1571
- "type": "stack",
1572
- "direction": "horizontal",
1573
- "gap": "sm",
1574
- "justify": "end",
1575
- "children": [
1576
- {
1577
- "type": "button",
1578
- "label": "Back",
1579
- "event": "PREV",
1580
- "variant": "ghost",
1581
- "icon": "arrow-left"
1582
- },
1583
- {
1584
- "type": "button",
1585
- "label": "Confirm Booking",
1586
- "event": "COMPLETE",
1587
- "variant": "primary",
1588
- "icon": "check"
1589
- }
1590
- ]
1591
- }
1592
- ]
1593
- }
1594
- ]
1595
- ]
1596
- },
1597
- {
1598
- "from": "step2",
1599
- "to": "step1",
1600
- "event": "PREV",
1601
- "effects": [
1602
- [
1603
- "fetch",
1604
- "Booking"
1605
- ],
1606
- [
1607
- "render-ui",
1608
- "main",
1609
- {
1610
- "type": "stack",
1611
- "direction": "vertical",
1612
- "gap": "lg",
1613
- "children": [
1614
- {
1615
- "type": "stack",
1616
- "direction": "horizontal",
1617
- "gap": "sm",
1618
- "align": "center",
1619
- "children": [
1620
- {
1621
- "type": "icon",
1622
- "name": "calendar",
1623
- "size": "lg"
1624
- },
1625
- {
1626
- "type": "typography",
1627
- "content": "Book Appointment",
1628
- "variant": "h2"
1629
- }
1630
- ]
1631
- },
1632
- {
1633
- "type": "badge",
1634
- "label": "Step 1 of 3"
1635
- },
1636
- {
1637
- "type": "wizard-progress",
1638
- "steps": [
1639
- "Provider Selection",
1640
- "Your Details",
1641
- "Date and Time"
1642
- ],
1643
- "currentStep": 0
1644
- },
1645
- {
1646
- "type": "divider"
1647
- },
1648
- {
1649
- "type": "typography",
1650
- "content": "Provider Selection",
1651
- "variant": "h3"
1652
- },
1653
- {
1654
- "type": "form-section",
1655
- "entity": "Booking",
1656
- "mode": "create",
1657
- "submitEvent": "NEXT",
1658
- "cancelEvent": "INIT",
1659
- "fields": [
1660
- "providerName"
1661
- ]
1662
- },
1663
- {
1664
- "type": "stack",
1665
- "direction": "horizontal",
1666
- "gap": "sm",
1667
- "justify": "end",
1565
+ "mode": "create",
1566
+ "submitEvent": "NEXT",
1567
+ "cancelEvent": "INIT",
1568
+ "fields": [
1569
+ "providerName"
1570
+ ]
1571
+ },
1572
+ {
1573
+ "type": "stack",
1574
+ "direction": "horizontal",
1575
+ "gap": "sm",
1576
+ "justify": "end",
1668
1577
  "children": [
1669
1578
  {
1670
1579
  "type": "button",
@@ -1681,9 +1590,9 @@
1681
1590
  ]
1682
1591
  },
1683
1592
  {
1684
- "from": "step3",
1593
+ "from": "step1",
1685
1594
  "to": "step2",
1686
- "event": "PREV",
1595
+ "event": "NEXT",
1687
1596
  "effects": [
1688
1597
  [
1689
1598
  "fetch",
@@ -1716,8 +1625,9 @@
1716
1625
  ]
1717
1626
  },
1718
1627
  {
1719
- "type": "badge",
1720
- "label": "Step 2 of 3"
1628
+ "type": "progress-dots",
1629
+ "count": 3,
1630
+ "currentIndex": 1
1721
1631
  },
1722
1632
  {
1723
1633
  "type": "wizard-progress",
@@ -1775,9 +1685,9 @@
1775
1685
  ]
1776
1686
  },
1777
1687
  {
1778
- "from": "review",
1688
+ "from": "step2",
1779
1689
  "to": "step3",
1780
- "event": "PREV",
1690
+ "event": "NEXT",
1781
1691
  "effects": [
1782
1692
  [
1783
1693
  "fetch",
@@ -1810,8 +1720,9 @@
1810
1720
  ]
1811
1721
  },
1812
1722
  {
1813
- "type": "badge",
1814
- "label": "Step 3 of 3"
1723
+ "type": "progress-dots",
1724
+ "count": 3,
1725
+ "currentIndex": 2
1815
1726
  },
1816
1727
  {
1817
1728
  "type": "wizard-progress",
@@ -1870,61 +1781,9 @@
1870
1781
  ]
1871
1782
  },
1872
1783
  {
1873
- "from": "review",
1874
- "to": "complete",
1875
- "event": "COMPLETE",
1876
- "effects": [
1877
- [
1878
- "persist",
1879
- "create",
1880
- "Booking",
1881
- "@payload.data"
1882
- ],
1883
- [
1884
- "notify",
1885
- "success",
1886
- "Booking created successfully"
1887
- ],
1888
- [
1889
- "render-ui",
1890
- "main",
1891
- {
1892
- "type": "stack",
1893
- "direction": "vertical",
1894
- "gap": "lg",
1895
- "align": "center",
1896
- "children": [
1897
- {
1898
- "type": "icon",
1899
- "name": "check-circle",
1900
- "size": "lg"
1901
- },
1902
- {
1903
- "type": "typography",
1904
- "content": "Booking Confirmed",
1905
- "variant": "h2"
1906
- },
1907
- {
1908
- "type": "typography",
1909
- "content": "Your appointment has been booked successfully.",
1910
- "variant": "body"
1911
- },
1912
- {
1913
- "type": "button",
1914
- "label": "Start New",
1915
- "event": "RESTART",
1916
- "variant": "primary",
1917
- "icon": "refresh-cw"
1918
- }
1919
- ]
1920
- }
1921
- ]
1922
- ]
1923
- },
1924
- {
1925
- "from": "complete",
1926
- "to": "step1",
1927
- "event": "RESTART",
1784
+ "from": "step3",
1785
+ "to": "review",
1786
+ "event": "NEXT",
1928
1787
  "effects": [
1929
1788
  [
1930
1789
  "fetch",
@@ -1958,7 +1817,7 @@
1958
1817
  },
1959
1818
  {
1960
1819
  "type": "badge",
1961
- "label": "Step 1 of 3"
1820
+ "label": "Review"
1962
1821
  },
1963
1822
  {
1964
1823
  "type": "wizard-progress",
@@ -1967,15 +1826,203 @@
1967
1826
  "Your Details",
1968
1827
  "Date and Time"
1969
1828
  ],
1970
- "currentStep": 0
1829
+ "currentStep": 3
1971
1830
  },
1972
1831
  {
1973
1832
  "type": "divider"
1974
1833
  },
1975
1834
  {
1976
- "type": "typography",
1977
- "content": "Provider Selection",
1978
- "variant": "h3"
1835
+ "type": "data-list",
1836
+ "entity": "Booking",
1837
+ "renderItem": [
1838
+ "fn",
1839
+ "item",
1840
+ {
1841
+ "type": "stack",
1842
+ "direction": "vertical",
1843
+ "gap": "sm",
1844
+ "children": [
1845
+ {
1846
+ "type": "stack",
1847
+ "direction": "horizontal",
1848
+ "gap": "md",
1849
+ "justify": "space-between",
1850
+ "children": [
1851
+ {
1852
+ "type": "typography",
1853
+ "variant": "caption",
1854
+ "content": "ProviderName"
1855
+ },
1856
+ {
1857
+ "type": "typography",
1858
+ "variant": "body",
1859
+ "content": "@item.providerName"
1860
+ }
1861
+ ]
1862
+ },
1863
+ {
1864
+ "type": "stack",
1865
+ "direction": "horizontal",
1866
+ "gap": "md",
1867
+ "justify": "space-between",
1868
+ "children": [
1869
+ {
1870
+ "type": "typography",
1871
+ "variant": "caption",
1872
+ "content": "CustomerName"
1873
+ },
1874
+ {
1875
+ "type": "typography",
1876
+ "variant": "body",
1877
+ "content": "@item.customerName"
1878
+ }
1879
+ ]
1880
+ },
1881
+ {
1882
+ "type": "stack",
1883
+ "direction": "horizontal",
1884
+ "gap": "md",
1885
+ "justify": "space-between",
1886
+ "children": [
1887
+ {
1888
+ "type": "typography",
1889
+ "variant": "caption",
1890
+ "content": "CustomerEmail"
1891
+ },
1892
+ {
1893
+ "type": "typography",
1894
+ "variant": "body",
1895
+ "content": "@item.customerEmail"
1896
+ }
1897
+ ]
1898
+ },
1899
+ {
1900
+ "type": "stack",
1901
+ "direction": "horizontal",
1902
+ "gap": "md",
1903
+ "justify": "space-between",
1904
+ "children": [
1905
+ {
1906
+ "type": "typography",
1907
+ "variant": "caption",
1908
+ "content": "Date"
1909
+ },
1910
+ {
1911
+ "type": "typography",
1912
+ "variant": "body",
1913
+ "content": "@item.date"
1914
+ }
1915
+ ]
1916
+ },
1917
+ {
1918
+ "type": "stack",
1919
+ "direction": "horizontal",
1920
+ "gap": "md",
1921
+ "justify": "space-between",
1922
+ "children": [
1923
+ {
1924
+ "type": "typography",
1925
+ "variant": "caption",
1926
+ "content": "Time"
1927
+ },
1928
+ {
1929
+ "type": "typography",
1930
+ "variant": "body",
1931
+ "content": "@item.time"
1932
+ }
1933
+ ]
1934
+ },
1935
+ {
1936
+ "type": "stack",
1937
+ "direction": "horizontal",
1938
+ "gap": "md",
1939
+ "justify": "space-between",
1940
+ "children": [
1941
+ {
1942
+ "type": "typography",
1943
+ "variant": "caption",
1944
+ "content": "Notes"
1945
+ },
1946
+ {
1947
+ "type": "typography",
1948
+ "variant": "body",
1949
+ "content": "@item.notes"
1950
+ }
1951
+ ]
1952
+ }
1953
+ ]
1954
+ }
1955
+ ]
1956
+ },
1957
+ {
1958
+ "type": "wizard-navigation",
1959
+ "currentStep": 3,
1960
+ "totalSteps": 4,
1961
+ "showBack": true,
1962
+ "showComplete": true,
1963
+ "showNext": false
1964
+ }
1965
+ ]
1966
+ }
1967
+ ]
1968
+ ]
1969
+ },
1970
+ {
1971
+ "from": "step2",
1972
+ "to": "step1",
1973
+ "event": "PREV",
1974
+ "effects": [
1975
+ [
1976
+ "fetch",
1977
+ "Booking"
1978
+ ],
1979
+ [
1980
+ "render-ui",
1981
+ "main",
1982
+ {
1983
+ "type": "stack",
1984
+ "direction": "vertical",
1985
+ "gap": "lg",
1986
+ "children": [
1987
+ {
1988
+ "type": "stack",
1989
+ "direction": "horizontal",
1990
+ "gap": "sm",
1991
+ "align": "center",
1992
+ "children": [
1993
+ {
1994
+ "type": "icon",
1995
+ "name": "calendar",
1996
+ "size": "lg"
1997
+ },
1998
+ {
1999
+ "type": "typography",
2000
+ "content": "Book Appointment",
2001
+ "variant": "h2"
2002
+ }
2003
+ ]
2004
+ },
2005
+ {
2006
+ "type": "progress-dots",
2007
+ "count": 3,
2008
+ "currentIndex": 0
2009
+ },
2010
+ {
2011
+ "type": "wizard-progress",
2012
+ "steps": [
2013
+ "Provider Selection",
2014
+ "Your Details",
2015
+ "Date and Time"
2016
+ ],
2017
+ "currentStep": 0
2018
+ },
2019
+ {
2020
+ "type": "divider"
2021
+ },
2022
+ {
2023
+ "type": "typography",
2024
+ "content": "Provider Selection",
2025
+ "variant": "h3"
1979
2026
  },
1980
2027
  {
1981
2028
  "type": "form-section",
@@ -2008,9 +2055,9 @@
2008
2055
  ]
2009
2056
  },
2010
2057
  {
2011
- "from": "complete",
2012
- "to": "step1",
2013
- "event": "INIT",
2058
+ "from": "step3",
2059
+ "to": "step2",
2060
+ "event": "PREV",
2014
2061
  "effects": [
2015
2062
  [
2016
2063
  "fetch",
@@ -2043,8 +2090,9 @@
2043
2090
  ]
2044
2091
  },
2045
2092
  {
2046
- "type": "badge",
2047
- "label": "Step 1 of 3"
2093
+ "type": "progress-dots",
2094
+ "count": 3,
2095
+ "currentIndex": 1
2048
2096
  },
2049
2097
  {
2050
2098
  "type": "wizard-progress",
@@ -2053,14 +2101,14 @@
2053
2101
  "Your Details",
2054
2102
  "Date and Time"
2055
2103
  ],
2056
- "currentStep": 0
2104
+ "currentStep": 1
2057
2105
  },
2058
2106
  {
2059
2107
  "type": "divider"
2060
2108
  },
2061
2109
  {
2062
2110
  "type": "typography",
2063
- "content": "Provider Selection",
2111
+ "content": "Your Details",
2064
2112
  "variant": "h3"
2065
2113
  },
2066
2114
  {
@@ -2068,9 +2116,10 @@
2068
2116
  "entity": "Booking",
2069
2117
  "mode": "create",
2070
2118
  "submitEvent": "NEXT",
2071
- "cancelEvent": "INIT",
2119
+ "cancelEvent": "PREV",
2072
2120
  "fields": [
2073
- "providerName"
2121
+ "customerName",
2122
+ "customerEmail"
2074
2123
  ]
2075
2124
  },
2076
2125
  {
@@ -2079,6 +2128,13 @@
2079
2128
  "gap": "sm",
2080
2129
  "justify": "end",
2081
2130
  "children": [
2131
+ {
2132
+ "type": "button",
2133
+ "label": "Back",
2134
+ "event": "PREV",
2135
+ "variant": "ghost",
2136
+ "icon": "arrow-left"
2137
+ },
2082
2138
  {
2083
2139
  "type": "button",
2084
2140
  "label": "Next",
@@ -2092,66 +2148,388 @@
2092
2148
  }
2093
2149
  ]
2094
2150
  ]
2095
- }
2096
- ]
2097
- },
2098
- "listens": [
2099
- {
2100
- "event": "BOOK",
2101
- "triggers": "INIT",
2102
- "scope": "external"
2103
- }
2104
- ],
2105
- "emits": [
2106
- {
2107
- "event": "CONFIRM",
2108
- "payload": [
2109
- {
2110
- "name": "id",
2111
- "type": "string",
2112
- "required": true
2113
- }
2114
- ],
2115
- "scope": "external"
2116
- }
2117
- ]
2118
- }
2119
- ],
2120
- "pages": [
2121
- {
2122
- "name": "BookPage",
2123
- "path": "/book",
2124
- "traits": [
2125
- {
2126
- "ref": "BookingWizard"
2127
- }
2128
- ]
2129
- }
2130
- ]
2131
- },
2132
- {
2133
- "name": "AppointmentOrbital",
2134
- "entity": {
2135
- "name": "Appointment",
2136
- "persistence": "persistent",
2137
- "collection": "appointments",
2138
- "fields": [
2139
- {
2140
- "name": "id",
2141
- "type": "string",
2142
- "required": true
2143
- },
2144
- {
2145
- "name": "providerName",
2146
- "type": "string",
2147
- "required": true
2148
- },
2149
- {
2150
- "name": "customerName",
2151
- "type": "string",
2152
- "required": true
2153
- },
2154
- {
2151
+ },
2152
+ {
2153
+ "from": "review",
2154
+ "to": "step3",
2155
+ "event": "PREV",
2156
+ "effects": [
2157
+ [
2158
+ "fetch",
2159
+ "Booking"
2160
+ ],
2161
+ [
2162
+ "render-ui",
2163
+ "main",
2164
+ {
2165
+ "type": "stack",
2166
+ "direction": "vertical",
2167
+ "gap": "lg",
2168
+ "children": [
2169
+ {
2170
+ "type": "stack",
2171
+ "direction": "horizontal",
2172
+ "gap": "sm",
2173
+ "align": "center",
2174
+ "children": [
2175
+ {
2176
+ "type": "icon",
2177
+ "name": "calendar",
2178
+ "size": "lg"
2179
+ },
2180
+ {
2181
+ "type": "typography",
2182
+ "content": "Book Appointment",
2183
+ "variant": "h2"
2184
+ }
2185
+ ]
2186
+ },
2187
+ {
2188
+ "type": "progress-dots",
2189
+ "count": 3,
2190
+ "currentIndex": 2
2191
+ },
2192
+ {
2193
+ "type": "wizard-progress",
2194
+ "steps": [
2195
+ "Provider Selection",
2196
+ "Your Details",
2197
+ "Date and Time"
2198
+ ],
2199
+ "currentStep": 2
2200
+ },
2201
+ {
2202
+ "type": "divider"
2203
+ },
2204
+ {
2205
+ "type": "typography",
2206
+ "content": "Date and Time",
2207
+ "variant": "h3"
2208
+ },
2209
+ {
2210
+ "type": "form-section",
2211
+ "entity": "Booking",
2212
+ "mode": "create",
2213
+ "submitEvent": "NEXT",
2214
+ "cancelEvent": "PREV",
2215
+ "fields": [
2216
+ "date",
2217
+ "time",
2218
+ "notes"
2219
+ ]
2220
+ },
2221
+ {
2222
+ "type": "stack",
2223
+ "direction": "horizontal",
2224
+ "gap": "sm",
2225
+ "justify": "end",
2226
+ "children": [
2227
+ {
2228
+ "type": "button",
2229
+ "label": "Back",
2230
+ "event": "PREV",
2231
+ "variant": "ghost",
2232
+ "icon": "arrow-left"
2233
+ },
2234
+ {
2235
+ "type": "button",
2236
+ "label": "Next",
2237
+ "event": "NEXT",
2238
+ "variant": "primary",
2239
+ "icon": "arrow-right"
2240
+ }
2241
+ ]
2242
+ }
2243
+ ]
2244
+ }
2245
+ ]
2246
+ ]
2247
+ },
2248
+ {
2249
+ "from": "review",
2250
+ "to": "complete",
2251
+ "event": "COMPLETE",
2252
+ "effects": [
2253
+ [
2254
+ "persist",
2255
+ "create",
2256
+ "Booking",
2257
+ "@payload.data"
2258
+ ],
2259
+ [
2260
+ "notify",
2261
+ "success",
2262
+ "Booking created successfully"
2263
+ ],
2264
+ [
2265
+ "render-ui",
2266
+ "main",
2267
+ {
2268
+ "type": "stack",
2269
+ "direction": "vertical",
2270
+ "gap": "lg",
2271
+ "align": "center",
2272
+ "children": [
2273
+ {
2274
+ "type": "icon",
2275
+ "name": "check-circle",
2276
+ "size": "lg"
2277
+ },
2278
+ {
2279
+ "type": "typography",
2280
+ "content": "Booking Confirmed",
2281
+ "variant": "h2"
2282
+ },
2283
+ {
2284
+ "type": "typography",
2285
+ "content": "Your appointment has been booked successfully.",
2286
+ "variant": "body"
2287
+ },
2288
+ {
2289
+ "type": "button",
2290
+ "label": "Start New",
2291
+ "event": "RESTART",
2292
+ "variant": "primary",
2293
+ "icon": "refresh-cw"
2294
+ }
2295
+ ]
2296
+ }
2297
+ ]
2298
+ ]
2299
+ },
2300
+ {
2301
+ "from": "complete",
2302
+ "to": "step1",
2303
+ "event": "RESTART",
2304
+ "effects": [
2305
+ [
2306
+ "fetch",
2307
+ "Booking"
2308
+ ],
2309
+ [
2310
+ "render-ui",
2311
+ "main",
2312
+ {
2313
+ "type": "stack",
2314
+ "direction": "vertical",
2315
+ "gap": "lg",
2316
+ "children": [
2317
+ {
2318
+ "type": "stack",
2319
+ "direction": "horizontal",
2320
+ "gap": "sm",
2321
+ "align": "center",
2322
+ "children": [
2323
+ {
2324
+ "type": "icon",
2325
+ "name": "calendar",
2326
+ "size": "lg"
2327
+ },
2328
+ {
2329
+ "type": "typography",
2330
+ "content": "Book Appointment",
2331
+ "variant": "h2"
2332
+ }
2333
+ ]
2334
+ },
2335
+ {
2336
+ "type": "progress-dots",
2337
+ "count": 3,
2338
+ "currentIndex": 0
2339
+ },
2340
+ {
2341
+ "type": "wizard-progress",
2342
+ "steps": [
2343
+ "Provider Selection",
2344
+ "Your Details",
2345
+ "Date and Time"
2346
+ ],
2347
+ "currentStep": 0
2348
+ },
2349
+ {
2350
+ "type": "divider"
2351
+ },
2352
+ {
2353
+ "type": "typography",
2354
+ "content": "Provider Selection",
2355
+ "variant": "h3"
2356
+ },
2357
+ {
2358
+ "type": "form-section",
2359
+ "entity": "Booking",
2360
+ "mode": "create",
2361
+ "submitEvent": "NEXT",
2362
+ "cancelEvent": "INIT",
2363
+ "fields": [
2364
+ "providerName"
2365
+ ]
2366
+ },
2367
+ {
2368
+ "type": "stack",
2369
+ "direction": "horizontal",
2370
+ "gap": "sm",
2371
+ "justify": "end",
2372
+ "children": [
2373
+ {
2374
+ "type": "button",
2375
+ "label": "Next",
2376
+ "event": "NEXT",
2377
+ "variant": "primary",
2378
+ "icon": "arrow-right"
2379
+ }
2380
+ ]
2381
+ }
2382
+ ]
2383
+ }
2384
+ ]
2385
+ ]
2386
+ },
2387
+ {
2388
+ "from": "complete",
2389
+ "to": "step1",
2390
+ "event": "INIT",
2391
+ "effects": [
2392
+ [
2393
+ "fetch",
2394
+ "Booking"
2395
+ ],
2396
+ [
2397
+ "render-ui",
2398
+ "main",
2399
+ {
2400
+ "type": "stack",
2401
+ "direction": "vertical",
2402
+ "gap": "lg",
2403
+ "children": [
2404
+ {
2405
+ "type": "stack",
2406
+ "direction": "horizontal",
2407
+ "gap": "sm",
2408
+ "align": "center",
2409
+ "children": [
2410
+ {
2411
+ "type": "icon",
2412
+ "name": "calendar",
2413
+ "size": "lg"
2414
+ },
2415
+ {
2416
+ "type": "typography",
2417
+ "content": "Book Appointment",
2418
+ "variant": "h2"
2419
+ }
2420
+ ]
2421
+ },
2422
+ {
2423
+ "type": "progress-dots",
2424
+ "count": 3,
2425
+ "currentIndex": 0
2426
+ },
2427
+ {
2428
+ "type": "wizard-progress",
2429
+ "steps": [
2430
+ "Provider Selection",
2431
+ "Your Details",
2432
+ "Date and Time"
2433
+ ],
2434
+ "currentStep": 0
2435
+ },
2436
+ {
2437
+ "type": "divider"
2438
+ },
2439
+ {
2440
+ "type": "typography",
2441
+ "content": "Provider Selection",
2442
+ "variant": "h3"
2443
+ },
2444
+ {
2445
+ "type": "form-section",
2446
+ "entity": "Booking",
2447
+ "mode": "create",
2448
+ "submitEvent": "NEXT",
2449
+ "cancelEvent": "INIT",
2450
+ "fields": [
2451
+ "providerName"
2452
+ ]
2453
+ },
2454
+ {
2455
+ "type": "stack",
2456
+ "direction": "horizontal",
2457
+ "gap": "sm",
2458
+ "justify": "end",
2459
+ "children": [
2460
+ {
2461
+ "type": "button",
2462
+ "label": "Next",
2463
+ "event": "NEXT",
2464
+ "variant": "primary",
2465
+ "icon": "arrow-right"
2466
+ }
2467
+ ]
2468
+ }
2469
+ ]
2470
+ }
2471
+ ]
2472
+ ]
2473
+ }
2474
+ ]
2475
+ },
2476
+ "listens": [
2477
+ {
2478
+ "event": "BOOK",
2479
+ "triggers": "INIT",
2480
+ "scope": "external"
2481
+ }
2482
+ ],
2483
+ "emits": [
2484
+ {
2485
+ "event": "CONFIRM",
2486
+ "payload": [
2487
+ {
2488
+ "name": "id",
2489
+ "type": "string",
2490
+ "required": true
2491
+ }
2492
+ ],
2493
+ "scope": "external"
2494
+ }
2495
+ ]
2496
+ }
2497
+ ],
2498
+ "pages": [
2499
+ {
2500
+ "name": "BookPage",
2501
+ "path": "/book",
2502
+ "traits": [
2503
+ {
2504
+ "ref": "BookingWizard"
2505
+ }
2506
+ ]
2507
+ }
2508
+ ]
2509
+ },
2510
+ {
2511
+ "name": "AppointmentOrbital",
2512
+ "entity": {
2513
+ "name": "Appointment",
2514
+ "persistence": "persistent",
2515
+ "collection": "appointments",
2516
+ "fields": [
2517
+ {
2518
+ "name": "id",
2519
+ "type": "string",
2520
+ "required": true
2521
+ },
2522
+ {
2523
+ "name": "providerName",
2524
+ "type": "string",
2525
+ "required": true
2526
+ },
2527
+ {
2528
+ "name": "customerName",
2529
+ "type": "string",
2530
+ "required": true
2531
+ },
2532
+ {
2155
2533
  "name": "date",
2156
2534
  "type": "string",
2157
2535
  "required": true
@@ -2223,68 +2601,449 @@
2223
2601
  ]
2224
2602
  },
2225
2603
  {
2226
- "key": "EDIT",
2227
- "name": "EDIT",
2228
- "payload": [
2229
- {
2230
- "name": "id",
2231
- "type": "string",
2232
- "required": true
2233
- }
2604
+ "key": "EDIT",
2605
+ "name": "EDIT",
2606
+ "payload": [
2607
+ {
2608
+ "name": "id",
2609
+ "type": "string",
2610
+ "required": true
2611
+ }
2612
+ ]
2613
+ },
2614
+ {
2615
+ "key": "DELETE",
2616
+ "name": "DELETE",
2617
+ "payload": [
2618
+ {
2619
+ "name": "id",
2620
+ "type": "string",
2621
+ "required": true
2622
+ }
2623
+ ]
2624
+ },
2625
+ {
2626
+ "key": "APPOINTMENT_CREATED",
2627
+ "name": "APPOINTMENT_CREATED",
2628
+ "payload": [
2629
+ {
2630
+ "name": "data",
2631
+ "type": "object",
2632
+ "required": true
2633
+ }
2634
+ ]
2635
+ },
2636
+ {
2637
+ "key": "APPOINTMENT_UPDATED",
2638
+ "name": "APPOINTMENT_UPDATED",
2639
+ "payload": [
2640
+ {
2641
+ "name": "data",
2642
+ "type": "object",
2643
+ "required": true
2644
+ }
2645
+ ]
2646
+ },
2647
+ {
2648
+ "key": "CONFIRM_DELETE",
2649
+ "name": "Confirm Delete"
2650
+ },
2651
+ {
2652
+ "key": "CANCEL",
2653
+ "name": "Cancel"
2654
+ },
2655
+ {
2656
+ "key": "CLOSE",
2657
+ "name": "Close"
2658
+ }
2659
+ ],
2660
+ "transitions": [
2661
+ {
2662
+ "from": "browsing",
2663
+ "to": "browsing",
2664
+ "event": "INIT",
2665
+ "effects": [
2666
+ [
2667
+ "fetch",
2668
+ "Appointment"
2669
+ ],
2670
+ [
2671
+ "render-ui",
2672
+ "main",
2673
+ {
2674
+ "type": "stack",
2675
+ "direction": "vertical",
2676
+ "gap": "lg",
2677
+ "children": [
2678
+ {
2679
+ "type": "stack",
2680
+ "direction": "horizontal",
2681
+ "gap": "md",
2682
+ "justify": "space-between",
2683
+ "children": [
2684
+ {
2685
+ "type": "stack",
2686
+ "direction": "horizontal",
2687
+ "gap": "sm",
2688
+ "align": "center",
2689
+ "children": [
2690
+ {
2691
+ "type": "icon",
2692
+ "name": "clock",
2693
+ "size": "lg"
2694
+ },
2695
+ {
2696
+ "type": "typography",
2697
+ "content": "Appointments",
2698
+ "variant": "h2"
2699
+ }
2700
+ ]
2701
+ },
2702
+ {
2703
+ "type": "stack",
2704
+ "direction": "horizontal",
2705
+ "gap": "sm",
2706
+ "children": [
2707
+ {
2708
+ "type": "button",
2709
+ "label": "Create Appointment",
2710
+ "event": "CREATE",
2711
+ "variant": "primary",
2712
+ "icon": "plus"
2713
+ }
2714
+ ]
2715
+ }
2716
+ ]
2717
+ },
2718
+ {
2719
+ "type": "divider"
2720
+ },
2721
+ {
2722
+ "type": "data-grid",
2723
+ "entity": "Appointment",
2724
+ "emptyIcon": "inbox",
2725
+ "emptyTitle": "No appointments yet",
2726
+ "emptyDescription": "Create your first appointment to get started.",
2727
+ "itemActions": [
2728
+ {
2729
+ "label": "View",
2730
+ "event": "VIEW"
2731
+ },
2732
+ {
2733
+ "label": "Edit",
2734
+ "event": "EDIT"
2735
+ },
2736
+ {
2737
+ "label": "Delete",
2738
+ "event": "DELETE",
2739
+ "variant": "danger"
2740
+ }
2741
+ ],
2742
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2743
+ "renderItem": [
2744
+ "fn",
2745
+ "item",
2746
+ {
2747
+ "type": "stack",
2748
+ "direction": "vertical",
2749
+ "gap": "sm",
2750
+ "children": [
2751
+ {
2752
+ "type": "stack",
2753
+ "direction": "horizontal",
2754
+ "justify": "space-between",
2755
+ "align": "center",
2756
+ "children": [
2757
+ {
2758
+ "type": "stack",
2759
+ "direction": "horizontal",
2760
+ "gap": "sm",
2761
+ "align": "center",
2762
+ "children": [
2763
+ {
2764
+ "type": "icon",
2765
+ "name": "clock",
2766
+ "size": "sm"
2767
+ },
2768
+ {
2769
+ "type": "typography",
2770
+ "variant": "h4",
2771
+ "content": "@item.providerName"
2772
+ }
2773
+ ]
2774
+ },
2775
+ {
2776
+ "type": "badge",
2777
+ "label": "@item.customerName"
2778
+ }
2779
+ ]
2780
+ },
2781
+ {
2782
+ "type": "typography",
2783
+ "variant": "caption",
2784
+ "color": "muted",
2785
+ "content": "@item.date"
2786
+ }
2787
+ ]
2788
+ }
2789
+ ]
2790
+ }
2791
+ ]
2792
+ }
2793
+ ]
2794
+ ]
2795
+ },
2796
+ {
2797
+ "from": "browsing",
2798
+ "to": "browsing",
2799
+ "event": "APPOINTMENT_CREATED",
2800
+ "effects": [
2801
+ [
2802
+ "fetch",
2803
+ "Appointment"
2804
+ ]
2234
2805
  ]
2235
2806
  },
2236
2807
  {
2237
- "key": "DELETE",
2238
- "name": "DELETE",
2239
- "payload": [
2240
- {
2241
- "name": "id",
2242
- "type": "string",
2243
- "required": true
2244
- }
2808
+ "from": "browsing",
2809
+ "to": "browsing",
2810
+ "event": "APPOINTMENT_UPDATED",
2811
+ "effects": [
2812
+ [
2813
+ "fetch",
2814
+ "Appointment"
2815
+ ]
2245
2816
  ]
2246
2817
  },
2247
2818
  {
2248
- "key": "APPOINTMENT_CREATED",
2249
- "name": "APPOINTMENT_CREATED",
2250
- "payload": [
2251
- {
2252
- "name": "data",
2253
- "type": "object",
2254
- "required": true
2255
- }
2819
+ "from": "browsing",
2820
+ "to": "deleting",
2821
+ "event": "DELETE",
2822
+ "effects": [
2823
+ [
2824
+ "fetch",
2825
+ "Appointment",
2826
+ "@payload.id"
2827
+ ],
2828
+ [
2829
+ "render-ui",
2830
+ "modal",
2831
+ {
2832
+ "type": "stack",
2833
+ "direction": "vertical",
2834
+ "gap": "md",
2835
+ "children": [
2836
+ {
2837
+ "type": "stack",
2838
+ "direction": "horizontal",
2839
+ "gap": "sm",
2840
+ "children": [
2841
+ {
2842
+ "type": "icon",
2843
+ "name": "trash-2",
2844
+ "size": "md"
2845
+ },
2846
+ {
2847
+ "type": "typography",
2848
+ "content": "Delete Appointment",
2849
+ "variant": "h3"
2850
+ }
2851
+ ]
2852
+ },
2853
+ {
2854
+ "type": "divider"
2855
+ },
2856
+ {
2857
+ "type": "typography",
2858
+ "content": "Are you sure you want to delete this appointment?",
2859
+ "variant": "body"
2860
+ },
2861
+ {
2862
+ "type": "stack",
2863
+ "direction": "horizontal",
2864
+ "gap": "sm",
2865
+ "justify": "end",
2866
+ "children": [
2867
+ {
2868
+ "type": "button",
2869
+ "label": "Cancel",
2870
+ "event": "CANCEL",
2871
+ "variant": "ghost"
2872
+ },
2873
+ {
2874
+ "type": "button",
2875
+ "label": "Delete",
2876
+ "event": "CONFIRM_DELETE",
2877
+ "variant": "danger",
2878
+ "icon": "trash"
2879
+ }
2880
+ ]
2881
+ }
2882
+ ]
2883
+ }
2884
+ ]
2256
2885
  ]
2257
2886
  },
2258
2887
  {
2259
- "key": "APPOINTMENT_UPDATED",
2260
- "name": "APPOINTMENT_UPDATED",
2261
- "payload": [
2262
- {
2263
- "name": "data",
2264
- "type": "object",
2265
- "required": true
2266
- }
2888
+ "from": "deleting",
2889
+ "to": "browsing",
2890
+ "event": "CONFIRM_DELETE",
2891
+ "effects": [
2892
+ [
2893
+ "persist",
2894
+ "delete",
2895
+ "Appointment",
2896
+ "@entity.id"
2897
+ ],
2898
+ [
2899
+ "render-ui",
2900
+ "modal",
2901
+ null
2902
+ ],
2903
+ [
2904
+ "fetch",
2905
+ "Appointment"
2906
+ ],
2907
+ [
2908
+ "render-ui",
2909
+ "main",
2910
+ {
2911
+ "type": "stack",
2912
+ "direction": "vertical",
2913
+ "gap": "lg",
2914
+ "children": [
2915
+ {
2916
+ "type": "stack",
2917
+ "direction": "horizontal",
2918
+ "gap": "md",
2919
+ "justify": "space-between",
2920
+ "children": [
2921
+ {
2922
+ "type": "stack",
2923
+ "direction": "horizontal",
2924
+ "gap": "sm",
2925
+ "align": "center",
2926
+ "children": [
2927
+ {
2928
+ "type": "icon",
2929
+ "name": "clock",
2930
+ "size": "lg"
2931
+ },
2932
+ {
2933
+ "type": "typography",
2934
+ "content": "Appointments",
2935
+ "variant": "h2"
2936
+ }
2937
+ ]
2938
+ },
2939
+ {
2940
+ "type": "stack",
2941
+ "direction": "horizontal",
2942
+ "gap": "sm",
2943
+ "children": [
2944
+ {
2945
+ "type": "button",
2946
+ "label": "Create Appointment",
2947
+ "event": "CREATE",
2948
+ "variant": "primary",
2949
+ "icon": "plus"
2950
+ }
2951
+ ]
2952
+ }
2953
+ ]
2954
+ },
2955
+ {
2956
+ "type": "divider"
2957
+ },
2958
+ {
2959
+ "type": "data-grid",
2960
+ "entity": "Appointment",
2961
+ "emptyIcon": "inbox",
2962
+ "emptyTitle": "No appointments yet",
2963
+ "emptyDescription": "Create your first appointment to get started.",
2964
+ "itemActions": [
2965
+ {
2966
+ "label": "View",
2967
+ "event": "VIEW"
2968
+ },
2969
+ {
2970
+ "label": "Edit",
2971
+ "event": "EDIT"
2972
+ },
2973
+ {
2974
+ "label": "Delete",
2975
+ "event": "DELETE",
2976
+ "variant": "danger"
2977
+ }
2978
+ ],
2979
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2980
+ "renderItem": [
2981
+ "fn",
2982
+ "item",
2983
+ {
2984
+ "type": "stack",
2985
+ "direction": "vertical",
2986
+ "gap": "sm",
2987
+ "children": [
2988
+ {
2989
+ "type": "stack",
2990
+ "direction": "horizontal",
2991
+ "justify": "space-between",
2992
+ "align": "center",
2993
+ "children": [
2994
+ {
2995
+ "type": "stack",
2996
+ "direction": "horizontal",
2997
+ "gap": "sm",
2998
+ "align": "center",
2999
+ "children": [
3000
+ {
3001
+ "type": "icon",
3002
+ "name": "clock",
3003
+ "size": "sm"
3004
+ },
3005
+ {
3006
+ "type": "typography",
3007
+ "variant": "h4",
3008
+ "content": "@item.providerName"
3009
+ }
3010
+ ]
3011
+ },
3012
+ {
3013
+ "type": "badge",
3014
+ "label": "@item.customerName"
3015
+ }
3016
+ ]
3017
+ },
3018
+ {
3019
+ "type": "typography",
3020
+ "variant": "caption",
3021
+ "color": "muted",
3022
+ "content": "@item.date"
3023
+ }
3024
+ ]
3025
+ }
3026
+ ]
3027
+ }
3028
+ ]
3029
+ }
3030
+ ],
3031
+ [
3032
+ "notify",
3033
+ "Appointment deleted successfully"
3034
+ ]
2267
3035
  ]
2268
3036
  },
2269
3037
  {
2270
- "key": "CONFIRM_DELETE",
2271
- "name": "Confirm Delete"
2272
- },
2273
- {
2274
- "key": "CANCEL",
2275
- "name": "Cancel"
2276
- },
2277
- {
2278
- "key": "CLOSE",
2279
- "name": "Close"
2280
- }
2281
- ],
2282
- "transitions": [
2283
- {
2284
- "from": "browsing",
3038
+ "from": "deleting",
2285
3039
  "to": "browsing",
2286
- "event": "INIT",
3040
+ "event": "CANCEL",
2287
3041
  "effects": [
3042
+ [
3043
+ "render-ui",
3044
+ "modal",
3045
+ null
3046
+ ],
2288
3047
  [
2289
3048
  "fetch",
2290
3049
  "Appointment"
@@ -2362,7 +3121,9 @@
2362
3121
  }
2363
3122
  ],
2364
3123
  "className": "transition-shadow hover:shadow-md cursor-pointer",
2365
- "children": [
3124
+ "renderItem": [
3125
+ "fn",
3126
+ "item",
2366
3127
  {
2367
3128
  "type": "stack",
2368
3129
  "direction": "vertical",
@@ -2388,13 +3149,13 @@
2388
3149
  {
2389
3150
  "type": "typography",
2390
3151
  "variant": "h4",
2391
- "content": "@entity.providerName"
3152
+ "content": "@item.providerName"
2392
3153
  }
2393
3154
  ]
2394
3155
  },
2395
3156
  {
2396
3157
  "type": "badge",
2397
- "label": "@entity.customerName"
3158
+ "label": "@item.customerName"
2398
3159
  }
2399
3160
  ]
2400
3161
  },
@@ -2402,7 +3163,7 @@
2402
3163
  "type": "typography",
2403
3164
  "variant": "caption",
2404
3165
  "color": "muted",
2405
- "content": "@entity.date"
3166
+ "content": "@item.date"
2406
3167
  }
2407
3168
  ]
2408
3169
  }
@@ -2414,59 +3175,64 @@
2414
3175
  ]
2415
3176
  },
2416
3177
  {
2417
- "from": "browsing",
3178
+ "from": "deleting",
2418
3179
  "to": "browsing",
2419
- "event": "APPOINTMENT_CREATED",
3180
+ "event": "CLOSE",
2420
3181
  "effects": [
2421
3182
  [
2422
- "fetch",
2423
- "Appointment"
2424
- ]
2425
- ]
2426
- },
2427
- {
2428
- "from": "browsing",
2429
- "to": "browsing",
2430
- "event": "APPOINTMENT_UPDATED",
2431
- "effects": [
3183
+ "render-ui",
3184
+ "modal",
3185
+ null
3186
+ ],
2432
3187
  [
2433
3188
  "fetch",
2434
3189
  "Appointment"
2435
- ]
2436
- ]
2437
- },
2438
- {
2439
- "from": "browsing",
2440
- "to": "deleting",
2441
- "event": "DELETE",
2442
- "effects": [
2443
- [
2444
- "fetch",
2445
- "Appointment",
2446
- "@payload.id"
2447
3190
  ],
2448
3191
  [
2449
3192
  "render-ui",
2450
- "modal",
3193
+ "main",
2451
3194
  {
2452
3195
  "type": "stack",
2453
3196
  "direction": "vertical",
2454
- "gap": "md",
3197
+ "gap": "lg",
2455
3198
  "children": [
2456
3199
  {
2457
3200
  "type": "stack",
2458
3201
  "direction": "horizontal",
2459
- "gap": "sm",
3202
+ "gap": "md",
3203
+ "justify": "space-between",
2460
3204
  "children": [
2461
3205
  {
2462
- "type": "icon",
2463
- "name": "trash-2",
2464
- "size": "md"
3206
+ "type": "stack",
3207
+ "direction": "horizontal",
3208
+ "gap": "sm",
3209
+ "align": "center",
3210
+ "children": [
3211
+ {
3212
+ "type": "icon",
3213
+ "name": "clock",
3214
+ "size": "lg"
3215
+ },
3216
+ {
3217
+ "type": "typography",
3218
+ "content": "Appointments",
3219
+ "variant": "h2"
3220
+ }
3221
+ ]
2465
3222
  },
2466
3223
  {
2467
- "type": "typography",
2468
- "content": "Delete Appointment",
2469
- "variant": "h3"
3224
+ "type": "stack",
3225
+ "direction": "horizontal",
3226
+ "gap": "sm",
3227
+ "children": [
3228
+ {
3229
+ "type": "button",
3230
+ "label": "Create Appointment",
3231
+ "event": "CREATE",
3232
+ "variant": "primary",
3233
+ "icon": "plus"
3234
+ }
3235
+ ]
2470
3236
  }
2471
3237
  ]
2472
3238
  },
@@ -2474,28 +3240,72 @@
2474
3240
  "type": "divider"
2475
3241
  },
2476
3242
  {
2477
- "type": "typography",
2478
- "content": "Are you sure you want to delete this appointment?",
2479
- "variant": "body"
2480
- },
2481
- {
2482
- "type": "stack",
2483
- "direction": "horizontal",
2484
- "gap": "sm",
2485
- "justify": "end",
2486
- "children": [
3243
+ "type": "data-grid",
3244
+ "entity": "Appointment",
3245
+ "emptyIcon": "inbox",
3246
+ "emptyTitle": "No appointments yet",
3247
+ "emptyDescription": "Create your first appointment to get started.",
3248
+ "itemActions": [
2487
3249
  {
2488
- "type": "button",
2489
- "label": "Cancel",
2490
- "event": "CANCEL",
2491
- "variant": "ghost"
3250
+ "label": "View",
3251
+ "event": "VIEW"
3252
+ },
3253
+ {
3254
+ "label": "Edit",
3255
+ "event": "EDIT"
2492
3256
  },
2493
3257
  {
2494
- "type": "button",
2495
3258
  "label": "Delete",
2496
- "event": "CONFIRM_DELETE",
2497
- "variant": "danger",
2498
- "icon": "trash"
3259
+ "event": "DELETE",
3260
+ "variant": "danger"
3261
+ }
3262
+ ],
3263
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
3264
+ "renderItem": [
3265
+ "fn",
3266
+ "item",
3267
+ {
3268
+ "type": "stack",
3269
+ "direction": "vertical",
3270
+ "gap": "sm",
3271
+ "children": [
3272
+ {
3273
+ "type": "stack",
3274
+ "direction": "horizontal",
3275
+ "justify": "space-between",
3276
+ "align": "center",
3277
+ "children": [
3278
+ {
3279
+ "type": "stack",
3280
+ "direction": "horizontal",
3281
+ "gap": "sm",
3282
+ "align": "center",
3283
+ "children": [
3284
+ {
3285
+ "type": "icon",
3286
+ "name": "clock",
3287
+ "size": "sm"
3288
+ },
3289
+ {
3290
+ "type": "typography",
3291
+ "variant": "h4",
3292
+ "content": "@item.providerName"
3293
+ }
3294
+ ]
3295
+ },
3296
+ {
3297
+ "type": "badge",
3298
+ "label": "@item.customerName"
3299
+ }
3300
+ ]
3301
+ },
3302
+ {
3303
+ "type": "typography",
3304
+ "variant": "caption",
3305
+ "color": "muted",
3306
+ "content": "@item.date"
3307
+ }
3308
+ ]
2499
3309
  }
2500
3310
  ]
2501
3311
  }
@@ -2503,56 +3313,6 @@
2503
3313
  }
2504
3314
  ]
2505
3315
  ]
2506
- },
2507
- {
2508
- "from": "deleting",
2509
- "to": "browsing",
2510
- "event": "CONFIRM_DELETE",
2511
- "effects": [
2512
- [
2513
- "persist",
2514
- "delete",
2515
- "Appointment",
2516
- "@entity.id"
2517
- ],
2518
- [
2519
- "render-ui",
2520
- "modal",
2521
- null
2522
- ],
2523
- [
2524
- "fetch",
2525
- "Appointment"
2526
- ],
2527
- [
2528
- "notify",
2529
- "Appointment deleted successfully"
2530
- ]
2531
- ]
2532
- },
2533
- {
2534
- "from": "deleting",
2535
- "to": "browsing",
2536
- "event": "CANCEL",
2537
- "effects": [
2538
- [
2539
- "render-ui",
2540
- "modal",
2541
- null
2542
- ]
2543
- ]
2544
- },
2545
- {
2546
- "from": "deleting",
2547
- "to": "browsing",
2548
- "event": "CLOSE",
2549
- "effects": [
2550
- [
2551
- "render-ui",
2552
- "modal",
2553
- null
2554
- ]
2555
- ]
2556
3316
  }
2557
3317
  ]
2558
3318
  }
@@ -3254,100 +4014,60 @@
3254
4014
  "icon": "refresh-cw"
3255
4015
  }
3256
4016
  ]
3257
- },
3258
- {
3259
- "type": "divider"
3260
- },
3261
- {
3262
- "type": "simple-grid",
3263
- "columns": 4,
3264
- "children": [
3265
- {
3266
- "type": "card",
3267
- "children": [
3268
- {
3269
- "type": "stack",
3270
- "direction": "vertical",
3271
- "gap": "sm",
3272
- "children": [
3273
- {
3274
- "type": "typography",
3275
- "variant": "caption",
3276
- "content": "TotalBookings"
3277
- },
3278
- {
3279
- "type": "typography",
3280
- "variant": "h3",
3281
- "content": "@entity.totalBookings"
3282
- }
3283
- ]
3284
- }
4017
+ },
4018
+ {
4019
+ "type": "divider"
4020
+ },
4021
+ {
4022
+ "type": "simple-grid",
4023
+ "columns": 4,
4024
+ "children": [
4025
+ {
4026
+ "type": "stat-display",
4027
+ "label": "TotalBookings",
4028
+ "value": [
4029
+ "object/get",
4030
+ [
4031
+ "array/first",
4032
+ "@entity"
4033
+ ],
4034
+ "totalBookings"
3285
4035
  ]
3286
4036
  },
3287
4037
  {
3288
- "type": "card",
3289
- "children": [
3290
- {
3291
- "type": "stack",
3292
- "direction": "vertical",
3293
- "gap": "sm",
3294
- "children": [
3295
- {
3296
- "type": "typography",
3297
- "variant": "caption",
3298
- "content": "ConfirmedToday"
3299
- },
3300
- {
3301
- "type": "typography",
3302
- "variant": "h3",
3303
- "content": "@entity.confirmedToday"
3304
- }
3305
- ]
3306
- }
4038
+ "type": "stat-display",
4039
+ "label": "ConfirmedToday",
4040
+ "value": [
4041
+ "object/get",
4042
+ [
4043
+ "array/first",
4044
+ "@entity"
4045
+ ],
4046
+ "confirmedToday"
3307
4047
  ]
3308
4048
  },
3309
4049
  {
3310
- "type": "card",
3311
- "children": [
3312
- {
3313
- "type": "stack",
3314
- "direction": "vertical",
3315
- "gap": "sm",
3316
- "children": [
3317
- {
3318
- "type": "typography",
3319
- "variant": "caption",
3320
- "content": "PendingBookings"
3321
- },
3322
- {
3323
- "type": "typography",
3324
- "variant": "h3",
3325
- "content": "@entity.pendingBookings"
3326
- }
3327
- ]
3328
- }
4050
+ "type": "stat-display",
4051
+ "label": "PendingBookings",
4052
+ "value": [
4053
+ "object/get",
4054
+ [
4055
+ "array/first",
4056
+ "@entity"
4057
+ ],
4058
+ "pendingBookings"
3329
4059
  ]
3330
4060
  },
3331
4061
  {
3332
- "type": "card",
3333
- "children": [
3334
- {
3335
- "type": "stack",
3336
- "direction": "vertical",
3337
- "gap": "sm",
3338
- "children": [
3339
- {
3340
- "type": "typography",
3341
- "variant": "caption",
3342
- "content": "AvailableSlots"
3343
- },
3344
- {
3345
- "type": "typography",
3346
- "variant": "h3",
3347
- "content": "@entity.availableSlots"
3348
- }
3349
- ]
3350
- }
4062
+ "type": "stat-display",
4063
+ "label": "AvailableSlots",
4064
+ "value": [
4065
+ "object/get",
4066
+ [
4067
+ "array/first",
4068
+ "@entity"
4069
+ ],
4070
+ "availableSlots"
3351
4071
  ]
3352
4072
  }
3353
4073
  ]
@@ -3414,91 +4134,51 @@
3414
4134
  "columns": 4,
3415
4135
  "children": [
3416
4136
  {
3417
- "type": "card",
3418
- "children": [
3419
- {
3420
- "type": "stack",
3421
- "direction": "vertical",
3422
- "gap": "sm",
3423
- "children": [
3424
- {
3425
- "type": "typography",
3426
- "variant": "caption",
3427
- "content": "TotalBookings"
3428
- },
3429
- {
3430
- "type": "typography",
3431
- "variant": "h3",
3432
- "content": "@entity.totalBookings"
3433
- }
3434
- ]
3435
- }
4137
+ "type": "stat-display",
4138
+ "label": "TotalBookings",
4139
+ "value": [
4140
+ "object/get",
4141
+ [
4142
+ "array/first",
4143
+ "@entity"
4144
+ ],
4145
+ "totalBookings"
3436
4146
  ]
3437
4147
  },
3438
4148
  {
3439
- "type": "card",
3440
- "children": [
3441
- {
3442
- "type": "stack",
3443
- "direction": "vertical",
3444
- "gap": "sm",
3445
- "children": [
3446
- {
3447
- "type": "typography",
3448
- "variant": "caption",
3449
- "content": "ConfirmedToday"
3450
- },
3451
- {
3452
- "type": "typography",
3453
- "variant": "h3",
3454
- "content": "@entity.confirmedToday"
3455
- }
3456
- ]
3457
- }
4149
+ "type": "stat-display",
4150
+ "label": "ConfirmedToday",
4151
+ "value": [
4152
+ "object/get",
4153
+ [
4154
+ "array/first",
4155
+ "@entity"
4156
+ ],
4157
+ "confirmedToday"
3458
4158
  ]
3459
4159
  },
3460
4160
  {
3461
- "type": "card",
3462
- "children": [
3463
- {
3464
- "type": "stack",
3465
- "direction": "vertical",
3466
- "gap": "sm",
3467
- "children": [
3468
- {
3469
- "type": "typography",
3470
- "variant": "caption",
3471
- "content": "PendingBookings"
3472
- },
3473
- {
3474
- "type": "typography",
3475
- "variant": "h3",
3476
- "content": "@entity.pendingBookings"
3477
- }
3478
- ]
3479
- }
4161
+ "type": "stat-display",
4162
+ "label": "PendingBookings",
4163
+ "value": [
4164
+ "object/get",
4165
+ [
4166
+ "array/first",
4167
+ "@entity"
4168
+ ],
4169
+ "pendingBookings"
3480
4170
  ]
3481
4171
  },
3482
4172
  {
3483
- "type": "card",
3484
- "children": [
3485
- {
3486
- "type": "stack",
3487
- "direction": "vertical",
3488
- "gap": "sm",
3489
- "children": [
3490
- {
3491
- "type": "typography",
3492
- "variant": "caption",
3493
- "content": "AvailableSlots"
3494
- },
3495
- {
3496
- "type": "typography",
3497
- "variant": "h3",
3498
- "content": "@entity.availableSlots"
3499
- }
3500
- ]
3501
- }
4173
+ "type": "stat-display",
4174
+ "label": "AvailableSlots",
4175
+ "value": [
4176
+ "object/get",
4177
+ [
4178
+ "array/first",
4179
+ "@entity"
4180
+ ],
4181
+ "availableSlots"
3502
4182
  ]
3503
4183
  }
3504
4184
  ]
@@ -3565,91 +4245,51 @@
3565
4245
  "columns": 4,
3566
4246
  "children": [
3567
4247
  {
3568
- "type": "card",
3569
- "children": [
3570
- {
3571
- "type": "stack",
3572
- "direction": "vertical",
3573
- "gap": "sm",
3574
- "children": [
3575
- {
3576
- "type": "typography",
3577
- "variant": "caption",
3578
- "content": "TotalBookings"
3579
- },
3580
- {
3581
- "type": "typography",
3582
- "variant": "h3",
3583
- "content": "@entity.totalBookings"
3584
- }
3585
- ]
3586
- }
4248
+ "type": "stat-display",
4249
+ "label": "TotalBookings",
4250
+ "value": [
4251
+ "object/get",
4252
+ [
4253
+ "array/first",
4254
+ "@entity"
4255
+ ],
4256
+ "totalBookings"
3587
4257
  ]
3588
4258
  },
3589
4259
  {
3590
- "type": "card",
3591
- "children": [
3592
- {
3593
- "type": "stack",
3594
- "direction": "vertical",
3595
- "gap": "sm",
3596
- "children": [
3597
- {
3598
- "type": "typography",
3599
- "variant": "caption",
3600
- "content": "ConfirmedToday"
3601
- },
3602
- {
3603
- "type": "typography",
3604
- "variant": "h3",
3605
- "content": "@entity.confirmedToday"
3606
- }
3607
- ]
3608
- }
4260
+ "type": "stat-display",
4261
+ "label": "ConfirmedToday",
4262
+ "value": [
4263
+ "object/get",
4264
+ [
4265
+ "array/first",
4266
+ "@entity"
4267
+ ],
4268
+ "confirmedToday"
3609
4269
  ]
3610
4270
  },
3611
4271
  {
3612
- "type": "card",
3613
- "children": [
3614
- {
3615
- "type": "stack",
3616
- "direction": "vertical",
3617
- "gap": "sm",
3618
- "children": [
3619
- {
3620
- "type": "typography",
3621
- "variant": "caption",
3622
- "content": "PendingBookings"
3623
- },
3624
- {
3625
- "type": "typography",
3626
- "variant": "h3",
3627
- "content": "@entity.pendingBookings"
3628
- }
3629
- ]
3630
- }
4272
+ "type": "stat-display",
4273
+ "label": "PendingBookings",
4274
+ "value": [
4275
+ "object/get",
4276
+ [
4277
+ "array/first",
4278
+ "@entity"
4279
+ ],
4280
+ "pendingBookings"
3631
4281
  ]
3632
4282
  },
3633
4283
  {
3634
- "type": "card",
3635
- "children": [
3636
- {
3637
- "type": "stack",
3638
- "direction": "vertical",
3639
- "gap": "sm",
3640
- "children": [
3641
- {
3642
- "type": "typography",
3643
- "variant": "caption",
3644
- "content": "AvailableSlots"
3645
- },
3646
- {
3647
- "type": "typography",
3648
- "variant": "h3",
3649
- "content": "@entity.availableSlots"
3650
- }
3651
- ]
3652
- }
4284
+ "type": "stat-display",
4285
+ "label": "AvailableSlots",
4286
+ "value": [
4287
+ "object/get",
4288
+ [
4289
+ "array/first",
4290
+ "@entity"
4291
+ ],
4292
+ "availableSlots"
3653
4293
  ]
3654
4294
  }
3655
4295
  ]
@@ -3716,91 +4356,51 @@
3716
4356
  "columns": 4,
3717
4357
  "children": [
3718
4358
  {
3719
- "type": "card",
3720
- "children": [
3721
- {
3722
- "type": "stack",
3723
- "direction": "vertical",
3724
- "gap": "sm",
3725
- "children": [
3726
- {
3727
- "type": "typography",
3728
- "variant": "caption",
3729
- "content": "TotalBookings"
3730
- },
3731
- {
3732
- "type": "typography",
3733
- "variant": "h3",
3734
- "content": "@entity.totalBookings"
3735
- }
3736
- ]
3737
- }
4359
+ "type": "stat-display",
4360
+ "label": "TotalBookings",
4361
+ "value": [
4362
+ "object/get",
4363
+ [
4364
+ "array/first",
4365
+ "@entity"
4366
+ ],
4367
+ "totalBookings"
3738
4368
  ]
3739
4369
  },
3740
4370
  {
3741
- "type": "card",
3742
- "children": [
3743
- {
3744
- "type": "stack",
3745
- "direction": "vertical",
3746
- "gap": "sm",
3747
- "children": [
3748
- {
3749
- "type": "typography",
3750
- "variant": "caption",
3751
- "content": "ConfirmedToday"
3752
- },
3753
- {
3754
- "type": "typography",
3755
- "variant": "h3",
3756
- "content": "@entity.confirmedToday"
3757
- }
3758
- ]
3759
- }
4371
+ "type": "stat-display",
4372
+ "label": "ConfirmedToday",
4373
+ "value": [
4374
+ "object/get",
4375
+ [
4376
+ "array/first",
4377
+ "@entity"
4378
+ ],
4379
+ "confirmedToday"
3760
4380
  ]
3761
4381
  },
3762
4382
  {
3763
- "type": "card",
3764
- "children": [
3765
- {
3766
- "type": "stack",
3767
- "direction": "vertical",
3768
- "gap": "sm",
3769
- "children": [
3770
- {
3771
- "type": "typography",
3772
- "variant": "caption",
3773
- "content": "PendingBookings"
3774
- },
3775
- {
3776
- "type": "typography",
3777
- "variant": "h3",
3778
- "content": "@entity.pendingBookings"
3779
- }
3780
- ]
3781
- }
4383
+ "type": "stat-display",
4384
+ "label": "PendingBookings",
4385
+ "value": [
4386
+ "object/get",
4387
+ [
4388
+ "array/first",
4389
+ "@entity"
4390
+ ],
4391
+ "pendingBookings"
3782
4392
  ]
3783
4393
  },
3784
4394
  {
3785
- "type": "card",
3786
- "children": [
3787
- {
3788
- "type": "stack",
3789
- "direction": "vertical",
3790
- "gap": "sm",
3791
- "children": [
3792
- {
3793
- "type": "typography",
3794
- "variant": "caption",
3795
- "content": "AvailableSlots"
3796
- },
3797
- {
3798
- "type": "typography",
3799
- "variant": "h3",
3800
- "content": "@entity.availableSlots"
3801
- }
3802
- ]
3803
- }
4395
+ "type": "stat-display",
4396
+ "label": "AvailableSlots",
4397
+ "value": [
4398
+ "object/get",
4399
+ [
4400
+ "array/first",
4401
+ "@entity"
4402
+ ],
4403
+ "availableSlots"
3804
4404
  ]
3805
4405
  }
3806
4406
  ]
@@ -3867,91 +4467,51 @@
3867
4467
  "columns": 4,
3868
4468
  "children": [
3869
4469
  {
3870
- "type": "card",
3871
- "children": [
3872
- {
3873
- "type": "stack",
3874
- "direction": "vertical",
3875
- "gap": "sm",
3876
- "children": [
3877
- {
3878
- "type": "typography",
3879
- "variant": "caption",
3880
- "content": "TotalBookings"
3881
- },
3882
- {
3883
- "type": "typography",
3884
- "variant": "h3",
3885
- "content": "@entity.totalBookings"
3886
- }
3887
- ]
3888
- }
4470
+ "type": "stat-display",
4471
+ "label": "TotalBookings",
4472
+ "value": [
4473
+ "object/get",
4474
+ [
4475
+ "array/first",
4476
+ "@entity"
4477
+ ],
4478
+ "totalBookings"
3889
4479
  ]
3890
4480
  },
3891
4481
  {
3892
- "type": "card",
3893
- "children": [
3894
- {
3895
- "type": "stack",
3896
- "direction": "vertical",
3897
- "gap": "sm",
3898
- "children": [
3899
- {
3900
- "type": "typography",
3901
- "variant": "caption",
3902
- "content": "ConfirmedToday"
3903
- },
3904
- {
3905
- "type": "typography",
3906
- "variant": "h3",
3907
- "content": "@entity.confirmedToday"
3908
- }
3909
- ]
3910
- }
4482
+ "type": "stat-display",
4483
+ "label": "ConfirmedToday",
4484
+ "value": [
4485
+ "object/get",
4486
+ [
4487
+ "array/first",
4488
+ "@entity"
4489
+ ],
4490
+ "confirmedToday"
3911
4491
  ]
3912
4492
  },
3913
4493
  {
3914
- "type": "card",
3915
- "children": [
3916
- {
3917
- "type": "stack",
3918
- "direction": "vertical",
3919
- "gap": "sm",
3920
- "children": [
3921
- {
3922
- "type": "typography",
3923
- "variant": "caption",
3924
- "content": "PendingBookings"
3925
- },
3926
- {
3927
- "type": "typography",
3928
- "variant": "h3",
3929
- "content": "@entity.pendingBookings"
3930
- }
3931
- ]
3932
- }
4494
+ "type": "stat-display",
4495
+ "label": "PendingBookings",
4496
+ "value": [
4497
+ "object/get",
4498
+ [
4499
+ "array/first",
4500
+ "@entity"
4501
+ ],
4502
+ "pendingBookings"
3933
4503
  ]
3934
4504
  },
3935
4505
  {
3936
- "type": "card",
3937
- "children": [
3938
- {
3939
- "type": "stack",
3940
- "direction": "vertical",
3941
- "gap": "sm",
3942
- "children": [
3943
- {
3944
- "type": "typography",
3945
- "variant": "caption",
3946
- "content": "AvailableSlots"
3947
- },
3948
- {
3949
- "type": "typography",
3950
- "variant": "h3",
3951
- "content": "@entity.availableSlots"
3952
- }
3953
- ]
3954
- }
4506
+ "type": "stat-display",
4507
+ "label": "AvailableSlots",
4508
+ "value": [
4509
+ "object/get",
4510
+ [
4511
+ "array/first",
4512
+ "@entity"
4513
+ ],
4514
+ "availableSlots"
3955
4515
  ]
3956
4516
  }
3957
4517
  ]