@almadar/std 3.2.0 → 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 +214 -16
  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 +747 -0
  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 +214 -16
  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 +747 -0
  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 +214 -16
  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 +747 -0
  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
@@ -228,7 +228,9 @@
228
228
  }
229
229
  ],
230
230
  "className": "transition-shadow hover:shadow-md cursor-pointer",
231
- "children": [
231
+ "renderItem": [
232
+ "fn",
233
+ "item",
232
234
  {
233
235
  "type": "stack",
234
236
  "direction": "vertical",
@@ -254,13 +256,13 @@
254
256
  {
255
257
  "type": "typography",
256
258
  "variant": "h4",
257
- "content": "@entity.title"
259
+ "content": "@item.title"
258
260
  }
259
261
  ]
260
262
  },
261
263
  {
262
264
  "type": "badge",
263
- "label": "@entity.slug"
265
+ "label": "@item.slug"
264
266
  }
265
267
  ]
266
268
  },
@@ -268,7 +270,7 @@
268
270
  "type": "typography",
269
271
  "variant": "caption",
270
272
  "color": "muted",
271
- "content": "@entity.content"
273
+ "content": "@item.content"
272
274
  }
273
275
  ]
274
276
  }
@@ -386,154 +388,55 @@
386
388
  "modal",
387
389
  null
388
390
  ],
389
- [
390
- "fetch",
391
- "Article"
392
- ],
393
- [
394
- "notify",
395
- "Article deleted successfully"
396
- ]
397
- ]
398
- },
399
- {
400
- "from": "deleting",
401
- "to": "browsing",
402
- "event": "CANCEL",
403
- "effects": [
404
- [
405
- "render-ui",
406
- "modal",
407
- null
408
- ]
409
- ]
410
- },
411
- {
412
- "from": "deleting",
413
- "to": "browsing",
414
- "event": "CLOSE",
415
- "effects": [
416
- [
417
- "render-ui",
418
- "modal",
419
- null
420
- ]
421
- ]
422
- }
423
- ]
424
- },
425
- "emits": [
426
- {
427
- "event": "PUBLISH",
428
- "payload": [
429
- {
430
- "name": "id",
431
- "type": "string",
432
- "required": true
433
- }
434
- ],
435
- "scope": "external"
436
- },
437
- {
438
- "event": "CATEGORIZE",
439
- "payload": [
440
- {
441
- "name": "id",
442
- "type": "string",
443
- "required": true
444
- }
445
- ],
446
- "scope": "external"
447
- }
448
- ]
449
- },
450
- {
451
- "name": "ArticleCreate",
452
- "linkedEntity": "Article",
453
- "category": "interaction",
454
- "emits": [
455
- {
456
- "event": "ARTICLE_CREATED"
457
- }
458
- ],
459
- "stateMachine": {
460
- "states": [
461
- {
462
- "name": "closed",
463
- "isInitial": true
464
- },
465
- {
466
- "name": "open"
467
- }
468
- ],
469
- "events": [
470
- {
471
- "key": "INIT",
472
- "name": "Initialize"
473
- },
474
- {
475
- "key": "CREATE",
476
- "name": "Open"
477
- },
478
- {
479
- "key": "CLOSE",
480
- "name": "Close"
481
- },
482
- {
483
- "key": "SAVE",
484
- "name": "Save",
485
- "payload": [
486
- {
487
- "name": "data",
488
- "type": "object",
489
- "required": true
490
- }
491
- ]
492
- }
493
- ],
494
- "transitions": [
495
- {
496
- "from": "closed",
497
- "to": "closed",
498
- "event": "INIT",
499
- "effects": [
500
- [
501
- "fetch",
502
- "Article"
503
- ]
504
- ]
505
- },
506
- {
507
- "from": "closed",
508
- "to": "open",
509
- "event": "CREATE",
510
- "effects": [
511
391
  [
512
392
  "fetch",
513
393
  "Article"
514
394
  ],
515
395
  [
516
396
  "render-ui",
517
- "modal",
397
+ "main",
518
398
  {
519
399
  "type": "stack",
520
400
  "direction": "vertical",
521
- "gap": "md",
401
+ "gap": "lg",
522
402
  "children": [
523
403
  {
524
404
  "type": "stack",
525
405
  "direction": "horizontal",
526
- "gap": "sm",
406
+ "gap": "md",
407
+ "justify": "space-between",
527
408
  "children": [
528
409
  {
529
- "type": "icon",
530
- "name": "plus-circle",
531
- "size": "md"
410
+ "type": "stack",
411
+ "direction": "horizontal",
412
+ "gap": "sm",
413
+ "align": "center",
414
+ "children": [
415
+ {
416
+ "type": "icon",
417
+ "name": "file-text",
418
+ "size": "lg"
419
+ },
420
+ {
421
+ "type": "typography",
422
+ "content": "Articles",
423
+ "variant": "h2"
424
+ }
425
+ ]
532
426
  },
533
427
  {
534
- "type": "typography",
535
- "content": "Create Article",
536
- "variant": "h3"
428
+ "type": "stack",
429
+ "direction": "horizontal",
430
+ "gap": "sm",
431
+ "children": [
432
+ {
433
+ "type": "button",
434
+ "label": "Create Article",
435
+ "event": "CREATE",
436
+ "variant": "primary",
437
+ "icon": "plus"
438
+ }
439
+ ]
537
440
  }
538
441
  ]
539
442
  },
@@ -541,165 +444,143 @@
541
444
  "type": "divider"
542
445
  },
543
446
  {
544
- "type": "form-section",
447
+ "type": "data-grid",
545
448
  "entity": "Article",
546
- "mode": "create",
547
- "submitEvent": "SAVE",
548
- "cancelEvent": "CLOSE",
549
- "fields": [
550
- "title",
551
- "slug",
552
- "content",
553
- "author",
554
- "status",
555
- "publishedAt"
449
+ "emptyIcon": "inbox",
450
+ "emptyTitle": "No articles yet",
451
+ "emptyDescription": "Create your first article to get started.",
452
+ "itemActions": [
453
+ {
454
+ "label": "View",
455
+ "event": "VIEW"
456
+ },
457
+ {
458
+ "label": "Edit",
459
+ "event": "EDIT"
460
+ },
461
+ {
462
+ "label": "Delete",
463
+ "event": "DELETE",
464
+ "variant": "danger"
465
+ }
466
+ ],
467
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
468
+ "renderItem": [
469
+ "fn",
470
+ "item",
471
+ {
472
+ "type": "stack",
473
+ "direction": "vertical",
474
+ "gap": "sm",
475
+ "children": [
476
+ {
477
+ "type": "stack",
478
+ "direction": "horizontal",
479
+ "justify": "space-between",
480
+ "align": "center",
481
+ "children": [
482
+ {
483
+ "type": "stack",
484
+ "direction": "horizontal",
485
+ "gap": "sm",
486
+ "align": "center",
487
+ "children": [
488
+ {
489
+ "type": "icon",
490
+ "name": "file-text",
491
+ "size": "sm"
492
+ },
493
+ {
494
+ "type": "typography",
495
+ "variant": "h4",
496
+ "content": "@item.title"
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "type": "badge",
502
+ "label": "@item.slug"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "type": "typography",
508
+ "variant": "caption",
509
+ "color": "muted",
510
+ "content": "@item.content"
511
+ }
512
+ ]
513
+ }
556
514
  ]
557
515
  }
558
516
  ]
559
517
  }
518
+ ],
519
+ [
520
+ "notify",
521
+ "Article deleted successfully"
560
522
  ]
561
523
  ]
562
524
  },
563
525
  {
564
- "from": "open",
565
- "to": "closed",
566
- "event": "CLOSE",
526
+ "from": "deleting",
527
+ "to": "browsing",
528
+ "event": "CANCEL",
567
529
  "effects": [
568
530
  [
569
531
  "render-ui",
570
532
  "modal",
571
533
  null
572
- ]
573
- ]
574
- },
575
- {
576
- "from": "open",
577
- "to": "closed",
578
- "event": "SAVE",
579
- "effects": [
580
- [
581
- "persist",
582
- "create",
583
- "Article",
584
- "@payload.data"
585
- ],
586
- [
587
- "fetch",
588
- "Article"
589
- ],
590
- [
591
- "render-ui",
592
- "modal",
593
- null
594
- ],
595
- [
596
- "emit",
597
- "ARTICLE_CREATED"
598
- ],
599
- [
600
- "notify",
601
- "Article created successfully"
602
- ]
603
- ]
604
- }
605
- ]
606
- }
607
- },
608
- {
609
- "name": "ArticleEdit",
610
- "linkedEntity": "Article",
611
- "category": "interaction",
612
- "emits": [
613
- {
614
- "event": "ARTICLE_UPDATED"
615
- }
616
- ],
617
- "stateMachine": {
618
- "states": [
619
- {
620
- "name": "closed",
621
- "isInitial": true
622
- },
623
- {
624
- "name": "open"
625
- }
626
- ],
627
- "events": [
628
- {
629
- "key": "INIT",
630
- "name": "Initialize"
631
- },
632
- {
633
- "key": "EDIT",
634
- "name": "Open",
635
- "payload": [
636
- {
637
- "name": "id",
638
- "type": "string",
639
- "required": true
640
- }
641
- ]
642
- },
643
- {
644
- "key": "CLOSE",
645
- "name": "Close"
646
- },
647
- {
648
- "key": "SAVE",
649
- "name": "Save",
650
- "payload": [
651
- {
652
- "name": "data",
653
- "type": "object",
654
- "required": true
655
- }
656
- ]
657
- }
658
- ],
659
- "transitions": [
660
- {
661
- "from": "closed",
662
- "to": "closed",
663
- "event": "INIT",
664
- "effects": [
534
+ ],
665
535
  [
666
536
  "fetch",
667
537
  "Article"
668
- ]
669
- ]
670
- },
671
- {
672
- "from": "closed",
673
- "to": "open",
674
- "event": "EDIT",
675
- "effects": [
676
- [
677
- "fetch",
678
- "Article",
679
- "@payload.id"
680
538
  ],
681
539
  [
682
540
  "render-ui",
683
- "modal",
541
+ "main",
684
542
  {
685
543
  "type": "stack",
686
544
  "direction": "vertical",
687
- "gap": "md",
545
+ "gap": "lg",
688
546
  "children": [
689
547
  {
690
548
  "type": "stack",
691
549
  "direction": "horizontal",
692
- "gap": "sm",
550
+ "gap": "md",
551
+ "justify": "space-between",
693
552
  "children": [
694
553
  {
695
- "type": "icon",
696
- "name": "edit",
697
- "size": "md"
554
+ "type": "stack",
555
+ "direction": "horizontal",
556
+ "gap": "sm",
557
+ "align": "center",
558
+ "children": [
559
+ {
560
+ "type": "icon",
561
+ "name": "file-text",
562
+ "size": "lg"
563
+ },
564
+ {
565
+ "type": "typography",
566
+ "content": "Articles",
567
+ "variant": "h2"
568
+ }
569
+ ]
698
570
  },
699
571
  {
700
- "type": "typography",
701
- "content": "Edit Article",
702
- "variant": "h3"
572
+ "type": "stack",
573
+ "direction": "horizontal",
574
+ "gap": "sm",
575
+ "children": [
576
+ {
577
+ "type": "button",
578
+ "label": "Create Article",
579
+ "event": "CREATE",
580
+ "variant": "primary",
581
+ "icon": "plus"
582
+ }
583
+ ]
703
584
  }
704
585
  ]
705
586
  },
@@ -707,20 +588,74 @@
707
588
  "type": "divider"
708
589
  },
709
590
  {
710
- "type": "form-section",
591
+ "type": "data-grid",
711
592
  "entity": "Article",
712
- "mode": "edit",
713
- "submitEvent": "SAVE",
714
- "cancelEvent": "CLOSE",
715
- "fields": [
716
- "title",
717
- "slug",
718
- "content",
719
- "author",
720
- "status",
721
- "publishedAt"
593
+ "emptyIcon": "inbox",
594
+ "emptyTitle": "No articles yet",
595
+ "emptyDescription": "Create your first article to get started.",
596
+ "itemActions": [
597
+ {
598
+ "label": "View",
599
+ "event": "VIEW"
600
+ },
601
+ {
602
+ "label": "Edit",
603
+ "event": "EDIT"
604
+ },
605
+ {
606
+ "label": "Delete",
607
+ "event": "DELETE",
608
+ "variant": "danger"
609
+ }
722
610
  ],
723
- "entityId": "@entity.id"
611
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
612
+ "renderItem": [
613
+ "fn",
614
+ "item",
615
+ {
616
+ "type": "stack",
617
+ "direction": "vertical",
618
+ "gap": "sm",
619
+ "children": [
620
+ {
621
+ "type": "stack",
622
+ "direction": "horizontal",
623
+ "justify": "space-between",
624
+ "align": "center",
625
+ "children": [
626
+ {
627
+ "type": "stack",
628
+ "direction": "horizontal",
629
+ "gap": "sm",
630
+ "align": "center",
631
+ "children": [
632
+ {
633
+ "type": "icon",
634
+ "name": "file-text",
635
+ "size": "sm"
636
+ },
637
+ {
638
+ "type": "typography",
639
+ "variant": "h4",
640
+ "content": "@item.title"
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ "type": "badge",
646
+ "label": "@item.slug"
647
+ }
648
+ ]
649
+ },
650
+ {
651
+ "type": "typography",
652
+ "variant": "caption",
653
+ "color": "muted",
654
+ "content": "@item.content"
655
+ }
656
+ ]
657
+ }
658
+ ]
724
659
  }
725
660
  ]
726
661
  }
@@ -728,27 +663,14 @@
728
663
  ]
729
664
  },
730
665
  {
731
- "from": "open",
732
- "to": "closed",
666
+ "from": "deleting",
667
+ "to": "browsing",
733
668
  "event": "CLOSE",
734
669
  "effects": [
735
670
  [
736
671
  "render-ui",
737
672
  "modal",
738
673
  null
739
- ]
740
- ]
741
- },
742
- {
743
- "from": "open",
744
- "to": "closed",
745
- "event": "SAVE",
746
- "effects": [
747
- [
748
- "persist",
749
- "update",
750
- "Article",
751
- "@payload.data"
752
674
  ],
753
675
  [
754
676
  "fetch",
@@ -756,55 +678,199 @@
756
678
  ],
757
679
  [
758
680
  "render-ui",
759
- "modal",
760
- null
761
- ],
762
- [
763
- "emit",
764
- "ARTICLE_UPDATED"
765
- ],
766
- [
767
- "notify",
768
- "Article updated successfully"
769
- ]
770
- ]
771
- }
772
- ]
773
- }
774
- },
775
- {
776
- "name": "ArticleView",
777
- "linkedEntity": "Article",
778
- "category": "interaction",
779
- "stateMachine": {
780
- "states": [
781
- {
782
- "name": "closed",
783
- "isInitial": true
784
- },
785
- {
786
- "name": "open"
787
- }
788
- ],
789
- "events": [
681
+ "main",
682
+ {
683
+ "type": "stack",
684
+ "direction": "vertical",
685
+ "gap": "lg",
686
+ "children": [
687
+ {
688
+ "type": "stack",
689
+ "direction": "horizontal",
690
+ "gap": "md",
691
+ "justify": "space-between",
692
+ "children": [
693
+ {
694
+ "type": "stack",
695
+ "direction": "horizontal",
696
+ "gap": "sm",
697
+ "align": "center",
698
+ "children": [
699
+ {
700
+ "type": "icon",
701
+ "name": "file-text",
702
+ "size": "lg"
703
+ },
704
+ {
705
+ "type": "typography",
706
+ "content": "Articles",
707
+ "variant": "h2"
708
+ }
709
+ ]
710
+ },
711
+ {
712
+ "type": "stack",
713
+ "direction": "horizontal",
714
+ "gap": "sm",
715
+ "children": [
716
+ {
717
+ "type": "button",
718
+ "label": "Create Article",
719
+ "event": "CREATE",
720
+ "variant": "primary",
721
+ "icon": "plus"
722
+ }
723
+ ]
724
+ }
725
+ ]
726
+ },
727
+ {
728
+ "type": "divider"
729
+ },
730
+ {
731
+ "type": "data-grid",
732
+ "entity": "Article",
733
+ "emptyIcon": "inbox",
734
+ "emptyTitle": "No articles yet",
735
+ "emptyDescription": "Create your first article to get started.",
736
+ "itemActions": [
737
+ {
738
+ "label": "View",
739
+ "event": "VIEW"
740
+ },
741
+ {
742
+ "label": "Edit",
743
+ "event": "EDIT"
744
+ },
745
+ {
746
+ "label": "Delete",
747
+ "event": "DELETE",
748
+ "variant": "danger"
749
+ }
750
+ ],
751
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
752
+ "renderItem": [
753
+ "fn",
754
+ "item",
755
+ {
756
+ "type": "stack",
757
+ "direction": "vertical",
758
+ "gap": "sm",
759
+ "children": [
760
+ {
761
+ "type": "stack",
762
+ "direction": "horizontal",
763
+ "justify": "space-between",
764
+ "align": "center",
765
+ "children": [
766
+ {
767
+ "type": "stack",
768
+ "direction": "horizontal",
769
+ "gap": "sm",
770
+ "align": "center",
771
+ "children": [
772
+ {
773
+ "type": "icon",
774
+ "name": "file-text",
775
+ "size": "sm"
776
+ },
777
+ {
778
+ "type": "typography",
779
+ "variant": "h4",
780
+ "content": "@item.title"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "type": "badge",
786
+ "label": "@item.slug"
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ "type": "typography",
792
+ "variant": "caption",
793
+ "color": "muted",
794
+ "content": "@item.content"
795
+ }
796
+ ]
797
+ }
798
+ ]
799
+ }
800
+ ]
801
+ }
802
+ ]
803
+ ]
804
+ }
805
+ ]
806
+ },
807
+ "emits": [
808
+ {
809
+ "event": "PUBLISH",
810
+ "payload": [
811
+ {
812
+ "name": "id",
813
+ "type": "string",
814
+ "required": true
815
+ }
816
+ ],
817
+ "scope": "external"
818
+ },
819
+ {
820
+ "event": "CATEGORIZE",
821
+ "payload": [
822
+ {
823
+ "name": "id",
824
+ "type": "string",
825
+ "required": true
826
+ }
827
+ ],
828
+ "scope": "external"
829
+ }
830
+ ]
831
+ },
832
+ {
833
+ "name": "ArticleCreate",
834
+ "linkedEntity": "Article",
835
+ "category": "interaction",
836
+ "emits": [
837
+ {
838
+ "event": "ARTICLE_CREATED"
839
+ }
840
+ ],
841
+ "stateMachine": {
842
+ "states": [
843
+ {
844
+ "name": "closed",
845
+ "isInitial": true
846
+ },
847
+ {
848
+ "name": "open"
849
+ }
850
+ ],
851
+ "events": [
790
852
  {
791
853
  "key": "INIT",
792
854
  "name": "Initialize"
793
855
  },
794
856
  {
795
- "key": "VIEW",
796
- "name": "Open",
857
+ "key": "CREATE",
858
+ "name": "Open"
859
+ },
860
+ {
861
+ "key": "CLOSE",
862
+ "name": "Close"
863
+ },
864
+ {
865
+ "key": "SAVE",
866
+ "name": "Save",
797
867
  "payload": [
798
868
  {
799
- "name": "id",
800
- "type": "string",
869
+ "name": "data",
870
+ "type": "object",
801
871
  "required": true
802
872
  }
803
873
  ]
804
- },
805
- {
806
- "key": "CLOSE",
807
- "name": "Close"
808
874
  }
809
875
  ],
810
876
  "transitions": [
@@ -822,12 +888,11 @@
822
888
  {
823
889
  "from": "closed",
824
890
  "to": "open",
825
- "event": "VIEW",
891
+ "event": "CREATE",
826
892
  "effects": [
827
893
  [
828
894
  "fetch",
829
- "Article",
830
- "@payload.id"
895
+ "Article"
831
896
  ],
832
897
  [
833
898
  "render-ui",
@@ -841,17 +906,16 @@
841
906
  "type": "stack",
842
907
  "direction": "horizontal",
843
908
  "gap": "sm",
844
- "align": "center",
845
909
  "children": [
846
910
  {
847
911
  "type": "icon",
848
- "name": "eye",
912
+ "name": "plus-circle",
849
913
  "size": "md"
850
914
  },
851
915
  {
852
916
  "type": "typography",
853
- "variant": "h3",
854
- "content": "@entity.title"
917
+ "content": "Create Article",
918
+ "variant": "h3"
855
919
  }
856
920
  ]
857
921
  },
@@ -859,129 +923,18 @@
859
923
  "type": "divider"
860
924
  },
861
925
  {
862
- "type": "stack",
863
- "direction": "horizontal",
864
- "gap": "md",
865
- "children": [
866
- {
867
- "type": "typography",
868
- "variant": "caption",
869
- "content": "Title"
870
- },
871
- {
872
- "type": "typography",
873
- "variant": "body",
874
- "content": "@entity.title"
875
- }
876
- ]
877
- },
878
- {
879
- "type": "stack",
880
- "direction": "horizontal",
881
- "gap": "md",
882
- "children": [
883
- {
884
- "type": "typography",
885
- "variant": "caption",
886
- "content": "Slug"
887
- },
888
- {
889
- "type": "typography",
890
- "variant": "body",
891
- "content": "@entity.slug"
892
- }
893
- ]
894
- },
895
- {
896
- "type": "stack",
897
- "direction": "horizontal",
898
- "gap": "md",
899
- "children": [
900
- {
901
- "type": "typography",
902
- "variant": "caption",
903
- "content": "Content"
904
- },
905
- {
906
- "type": "typography",
907
- "variant": "body",
908
- "content": "@entity.content"
909
- }
910
- ]
911
- },
912
- {
913
- "type": "stack",
914
- "direction": "horizontal",
915
- "gap": "md",
916
- "children": [
917
- {
918
- "type": "typography",
919
- "variant": "caption",
920
- "content": "Author"
921
- },
922
- {
923
- "type": "typography",
924
- "variant": "body",
925
- "content": "@entity.author"
926
- }
927
- ]
928
- },
929
- {
930
- "type": "stack",
931
- "direction": "horizontal",
932
- "gap": "md",
933
- "children": [
934
- {
935
- "type": "typography",
936
- "variant": "caption",
937
- "content": "Status"
938
- },
939
- {
940
- "type": "typography",
941
- "variant": "body",
942
- "content": "@entity.status"
943
- }
944
- ]
945
- },
946
- {
947
- "type": "stack",
948
- "direction": "horizontal",
949
- "gap": "md",
950
- "children": [
951
- {
952
- "type": "typography",
953
- "variant": "caption",
954
- "content": "PublishedAt"
955
- },
956
- {
957
- "type": "typography",
958
- "variant": "body",
959
- "content": "@entity.publishedAt"
960
- }
961
- ]
962
- },
963
- {
964
- "type": "divider"
965
- },
966
- {
967
- "type": "stack",
968
- "direction": "horizontal",
969
- "gap": "sm",
970
- "justify": "end",
971
- "children": [
972
- {
973
- "type": "button",
974
- "label": "Edit",
975
- "event": "EDIT",
976
- "variant": "primary",
977
- "icon": "edit"
978
- },
979
- {
980
- "type": "button",
981
- "label": "Close",
982
- "event": "CLOSE",
983
- "variant": "ghost"
984
- }
926
+ "type": "form-section",
927
+ "entity": "Article",
928
+ "mode": "create",
929
+ "submitEvent": "SAVE",
930
+ "cancelEvent": "CLOSE",
931
+ "fields": [
932
+ "title",
933
+ "slug",
934
+ "content",
935
+ "author",
936
+ "status",
937
+ "publishedAt"
985
938
  ]
986
939
  }
987
940
  ]
@@ -1000,94 +953,57 @@
1000
953
  null
1001
954
  ]
1002
955
  ]
956
+ },
957
+ {
958
+ "from": "open",
959
+ "to": "closed",
960
+ "event": "SAVE",
961
+ "effects": [
962
+ [
963
+ "persist",
964
+ "create",
965
+ "Article",
966
+ "@payload.data"
967
+ ],
968
+ [
969
+ "fetch",
970
+ "Article"
971
+ ],
972
+ [
973
+ "render-ui",
974
+ "modal",
975
+ null
976
+ ],
977
+ [
978
+ "emit",
979
+ "ARTICLE_CREATED"
980
+ ],
981
+ [
982
+ "notify",
983
+ "Article created successfully"
984
+ ]
985
+ ]
1003
986
  }
1004
987
  ]
1005
988
  }
1006
- }
1007
- ],
1008
- "pages": [
1009
- {
1010
- "name": "ArticlesPage",
1011
- "path": "/articles",
1012
- "isInitial": true,
1013
- "traits": [
1014
- {
1015
- "ref": "ArticleBrowse"
1016
- },
1017
- {
1018
- "ref": "ArticleCreate"
1019
- },
1020
- {
1021
- "ref": "ArticleEdit"
1022
- },
1023
- {
1024
- "ref": "ArticleView"
1025
- }
1026
- ]
1027
- }
1028
- ]
1029
- },
1030
- {
1031
- "name": "MediaAssetOrbital",
1032
- "entity": {
1033
- "name": "MediaAsset",
1034
- "persistence": "persistent",
1035
- "collection": "mediaassets",
1036
- "fields": [
1037
- {
1038
- "name": "id",
1039
- "type": "string",
1040
- "required": true
1041
- },
1042
- {
1043
- "name": "fileName",
1044
- "type": "string",
1045
- "required": true
1046
- },
1047
- {
1048
- "name": "fileType",
1049
- "type": "string",
1050
- "required": true
1051
- },
1052
- {
1053
- "name": "fileSize",
1054
- "type": "number"
1055
- },
1056
- {
1057
- "name": "url",
1058
- "type": "string"
1059
- },
1060
- {
1061
- "name": "altText",
1062
- "type": "string"
1063
- },
1064
- {
1065
- "name": "uploadedAt",
1066
- "type": "string"
1067
- }
1068
- ]
1069
- },
1070
- "traits": [
989
+ },
1071
990
  {
1072
- "name": "MediaAssetBrowse",
1073
- "linkedEntity": "MediaAsset",
991
+ "name": "ArticleEdit",
992
+ "linkedEntity": "Article",
1074
993
  "category": "interaction",
1075
- "listens": [
1076
- {
1077
- "event": "SAVE",
1078
- "triggers": "SAVE"
1079
- },
994
+ "emits": [
1080
995
  {
1081
- "event": "PUBLISH",
1082
- "triggers": "INIT",
1083
- "scope": "external"
996
+ "event": "ARTICLE_UPDATED"
1084
997
  }
1085
998
  ],
1086
999
  "stateMachine": {
1087
1000
  "states": [
1088
1001
  {
1089
- "name": "browsing",
1002
+ "name": "closed",
1090
1003
  "isInitial": true
1004
+ },
1005
+ {
1006
+ "name": "open"
1091
1007
  }
1092
1008
  ],
1093
1009
  "events": [
@@ -1096,12 +1012,8 @@
1096
1012
  "name": "Initialize"
1097
1013
  },
1098
1014
  {
1099
- "key": "CREATE",
1100
- "name": "CREATE"
1101
- },
1102
- {
1103
- "key": "VIEW",
1104
- "name": "VIEW",
1015
+ "key": "EDIT",
1016
+ "name": "Open",
1105
1017
  "payload": [
1106
1018
  {
1107
1019
  "name": "id",
@@ -1110,9 +1022,13 @@
1110
1022
  }
1111
1023
  ]
1112
1024
  },
1025
+ {
1026
+ "key": "CLOSE",
1027
+ "name": "Close"
1028
+ },
1113
1029
  {
1114
1030
  "key": "SAVE",
1115
- "name": "SAVE",
1031
+ "name": "Save",
1116
1032
  "payload": [
1117
1033
  {
1118
1034
  "name": "data",
@@ -1124,229 +1040,47 @@
1124
1040
  ],
1125
1041
  "transitions": [
1126
1042
  {
1127
- "from": "browsing",
1128
- "to": "browsing",
1043
+ "from": "closed",
1044
+ "to": "closed",
1129
1045
  "event": "INIT",
1130
1046
  "effects": [
1131
1047
  [
1132
1048
  "fetch",
1133
- "MediaAsset"
1049
+ "Article"
1050
+ ]
1051
+ ]
1052
+ },
1053
+ {
1054
+ "from": "closed",
1055
+ "to": "open",
1056
+ "event": "EDIT",
1057
+ "effects": [
1058
+ [
1059
+ "fetch",
1060
+ "Article",
1061
+ "@payload.id"
1134
1062
  ],
1135
1063
  [
1136
1064
  "render-ui",
1137
- "main",
1065
+ "modal",
1138
1066
  {
1139
1067
  "type": "stack",
1140
1068
  "direction": "vertical",
1141
- "gap": "lg",
1069
+ "gap": "md",
1142
1070
  "children": [
1143
1071
  {
1144
1072
  "type": "stack",
1145
1073
  "direction": "horizontal",
1146
- "gap": "md",
1147
- "justify": "space-between",
1074
+ "gap": "sm",
1148
1075
  "children": [
1149
1076
  {
1150
- "type": "stack",
1151
- "direction": "horizontal",
1152
- "gap": "sm",
1153
- "align": "center",
1154
- "children": [
1155
- {
1156
- "type": "icon",
1157
- "name": "image",
1158
- "size": "lg"
1159
- },
1160
- {
1161
- "type": "typography",
1162
- "content": "Media Library",
1163
- "variant": "h2"
1164
- }
1165
- ]
1166
- },
1167
- {
1168
- "type": "stack",
1169
- "direction": "horizontal",
1170
- "gap": "sm",
1171
- "children": [
1172
- {
1173
- "type": "button",
1174
- "label": "Create MediaAsset",
1175
- "event": "CREATE",
1176
- "variant": "primary",
1177
- "icon": "plus"
1178
- }
1179
- ]
1180
- }
1181
- ]
1182
- },
1183
- {
1184
- "type": "divider"
1185
- },
1186
- {
1187
- "type": "data-grid",
1188
- "entity": "MediaAsset",
1189
- "emptyIcon": "inbox",
1190
- "emptyTitle": "No mediaassets yet",
1191
- "emptyDescription": "Create your first mediaasset to get started.",
1192
- "itemActions": [
1193
- {
1194
- "label": "View",
1195
- "event": "VIEW"
1196
- }
1197
- ],
1198
- "className": "transition-shadow hover:shadow-md cursor-pointer",
1199
- "children": [
1200
- {
1201
- "type": "stack",
1202
- "direction": "vertical",
1203
- "gap": "sm",
1204
- "children": [
1205
- {
1206
- "type": "stack",
1207
- "direction": "horizontal",
1208
- "justify": "space-between",
1209
- "align": "center",
1210
- "children": [
1211
- {
1212
- "type": "stack",
1213
- "direction": "horizontal",
1214
- "gap": "sm",
1215
- "align": "center",
1216
- "children": [
1217
- {
1218
- "type": "icon",
1219
- "name": "image",
1220
- "size": "sm"
1221
- },
1222
- {
1223
- "type": "typography",
1224
- "variant": "h4",
1225
- "content": "@entity.fileName"
1226
- }
1227
- ]
1228
- },
1229
- {
1230
- "type": "badge",
1231
- "label": "@entity.fileType"
1232
- }
1233
- ]
1234
- },
1235
- {
1236
- "type": "typography",
1237
- "variant": "caption",
1238
- "color": "muted",
1239
- "content": "@entity.fileSize"
1240
- }
1241
- ]
1242
- }
1243
- ]
1244
- }
1245
- ]
1246
- }
1247
- ]
1248
- ]
1249
- },
1250
- {
1251
- "from": "browsing",
1252
- "to": "browsing",
1253
- "event": "SAVE",
1254
- "effects": [
1255
- [
1256
- "fetch",
1257
- "MediaAsset"
1258
- ]
1259
- ]
1260
- }
1261
- ]
1262
- }
1263
- },
1264
- {
1265
- "name": "MediaAssetCreate",
1266
- "linkedEntity": "MediaAsset",
1267
- "category": "interaction",
1268
- "emits": [
1269
- {
1270
- "event": "SAVE"
1271
- }
1272
- ],
1273
- "stateMachine": {
1274
- "states": [
1275
- {
1276
- "name": "closed",
1277
- "isInitial": true
1278
- },
1279
- {
1280
- "name": "open"
1281
- }
1282
- ],
1283
- "events": [
1284
- {
1285
- "key": "INIT",
1286
- "name": "Initialize"
1287
- },
1288
- {
1289
- "key": "CREATE",
1290
- "name": "Open"
1291
- },
1292
- {
1293
- "key": "CLOSE",
1294
- "name": "Close"
1295
- },
1296
- {
1297
- "key": "SAVE",
1298
- "name": "Save",
1299
- "payload": [
1300
- {
1301
- "name": "data",
1302
- "type": "object",
1303
- "required": true
1304
- }
1305
- ]
1306
- }
1307
- ],
1308
- "transitions": [
1309
- {
1310
- "from": "closed",
1311
- "to": "closed",
1312
- "event": "INIT",
1313
- "effects": [
1314
- [
1315
- "fetch",
1316
- "MediaAsset"
1317
- ]
1318
- ]
1319
- },
1320
- {
1321
- "from": "closed",
1322
- "to": "open",
1323
- "event": "CREATE",
1324
- "effects": [
1325
- [
1326
- "fetch",
1327
- "MediaAsset"
1328
- ],
1329
- [
1330
- "render-ui",
1331
- "modal",
1332
- {
1333
- "type": "stack",
1334
- "direction": "vertical",
1335
- "gap": "md",
1336
- "children": [
1337
- {
1338
- "type": "stack",
1339
- "direction": "horizontal",
1340
- "gap": "sm",
1341
- "children": [
1342
- {
1343
- "type": "icon",
1344
- "name": "plus-circle",
1345
- "size": "md"
1077
+ "type": "icon",
1078
+ "name": "edit",
1079
+ "size": "md"
1346
1080
  },
1347
1081
  {
1348
1082
  "type": "typography",
1349
- "content": "New MediaAsset",
1083
+ "content": "Edit Article",
1350
1084
  "variant": "h3"
1351
1085
  }
1352
1086
  ]
@@ -1356,18 +1090,19 @@
1356
1090
  },
1357
1091
  {
1358
1092
  "type": "form-section",
1359
- "entity": "MediaAsset",
1360
- "mode": "create",
1093
+ "entity": "Article",
1094
+ "mode": "edit",
1361
1095
  "submitEvent": "SAVE",
1362
1096
  "cancelEvent": "CLOSE",
1363
1097
  "fields": [
1364
- "fileName",
1365
- "fileType",
1366
- "fileSize",
1367
- "url",
1368
- "altText",
1369
- "uploadedAt"
1370
- ]
1098
+ "title",
1099
+ "slug",
1100
+ "content",
1101
+ "author",
1102
+ "status",
1103
+ "publishedAt"
1104
+ ],
1105
+ "entityId": "@entity.id"
1371
1106
  }
1372
1107
  ]
1373
1108
  }
@@ -1393,13 +1128,13 @@
1393
1128
  "effects": [
1394
1129
  [
1395
1130
  "persist",
1396
- "create",
1397
- "MediaAsset",
1131
+ "update",
1132
+ "Article",
1398
1133
  "@payload.data"
1399
1134
  ],
1400
1135
  [
1401
1136
  "fetch",
1402
- "MediaAsset"
1137
+ "Article"
1403
1138
  ],
1404
1139
  [
1405
1140
  "render-ui",
@@ -1408,11 +1143,11 @@
1408
1143
  ],
1409
1144
  [
1410
1145
  "emit",
1411
- "SAVE"
1146
+ "ARTICLE_UPDATED"
1412
1147
  ],
1413
1148
  [
1414
1149
  "notify",
1415
- "MediaAsset created successfully"
1150
+ "Article updated successfully"
1416
1151
  ]
1417
1152
  ]
1418
1153
  }
@@ -1420,8 +1155,8 @@
1420
1155
  }
1421
1156
  },
1422
1157
  {
1423
- "name": "MediaAssetView",
1424
- "linkedEntity": "MediaAsset",
1158
+ "name": "ArticleView",
1159
+ "linkedEntity": "Article",
1425
1160
  "category": "interaction",
1426
1161
  "stateMachine": {
1427
1162
  "states": [
@@ -1462,7 +1197,7 @@
1462
1197
  "effects": [
1463
1198
  [
1464
1199
  "fetch",
1465
- "MediaAsset"
1200
+ "Article"
1466
1201
  ]
1467
1202
  ]
1468
1203
  },
@@ -1473,7 +1208,7 @@
1473
1208
  "effects": [
1474
1209
  [
1475
1210
  "fetch",
1476
- "MediaAsset",
1211
+ "Article",
1477
1212
  "@payload.id"
1478
1213
  ],
1479
1214
  [
@@ -1498,7 +1233,7 @@
1498
1233
  {
1499
1234
  "type": "typography",
1500
1235
  "variant": "h3",
1501
- "content": "@entity.fileName"
1236
+ "content": "@entity.title"
1502
1237
  }
1503
1238
  ]
1504
1239
  },
@@ -1513,12 +1248,12 @@
1513
1248
  {
1514
1249
  "type": "typography",
1515
1250
  "variant": "caption",
1516
- "content": "FileName"
1251
+ "content": "Title"
1517
1252
  },
1518
1253
  {
1519
1254
  "type": "typography",
1520
1255
  "variant": "body",
1521
- "content": "@entity.fileName"
1256
+ "content": "@entity.title"
1522
1257
  }
1523
1258
  ]
1524
1259
  },
@@ -1530,12 +1265,12 @@
1530
1265
  {
1531
1266
  "type": "typography",
1532
1267
  "variant": "caption",
1533
- "content": "FileType"
1268
+ "content": "Slug"
1534
1269
  },
1535
1270
  {
1536
1271
  "type": "typography",
1537
1272
  "variant": "body",
1538
- "content": "@entity.fileType"
1273
+ "content": "@entity.slug"
1539
1274
  }
1540
1275
  ]
1541
1276
  },
@@ -1547,12 +1282,12 @@
1547
1282
  {
1548
1283
  "type": "typography",
1549
1284
  "variant": "caption",
1550
- "content": "FileSize"
1285
+ "content": "Content"
1551
1286
  },
1552
1287
  {
1553
1288
  "type": "typography",
1554
1289
  "variant": "body",
1555
- "content": "@entity.fileSize"
1290
+ "content": "@entity.content"
1556
1291
  }
1557
1292
  ]
1558
1293
  },
@@ -1564,12 +1299,12 @@
1564
1299
  {
1565
1300
  "type": "typography",
1566
1301
  "variant": "caption",
1567
- "content": "Url"
1302
+ "content": "Author"
1568
1303
  },
1569
1304
  {
1570
1305
  "type": "typography",
1571
1306
  "variant": "body",
1572
- "content": "@entity.url"
1307
+ "content": "@entity.author"
1573
1308
  }
1574
1309
  ]
1575
1310
  },
@@ -1581,12 +1316,12 @@
1581
1316
  {
1582
1317
  "type": "typography",
1583
1318
  "variant": "caption",
1584
- "content": "AltText"
1319
+ "content": "Status"
1585
1320
  },
1586
1321
  {
1587
1322
  "type": "typography",
1588
1323
  "variant": "body",
1589
- "content": "@entity.altText"
1324
+ "content": "@entity.status"
1590
1325
  }
1591
1326
  ]
1592
1327
  },
@@ -1598,12 +1333,12 @@
1598
1333
  {
1599
1334
  "type": "typography",
1600
1335
  "variant": "caption",
1601
- "content": "UploadedAt"
1336
+ "content": "PublishedAt"
1602
1337
  },
1603
1338
  {
1604
1339
  "type": "typography",
1605
1340
  "variant": "body",
1606
- "content": "@entity.uploadedAt"
1341
+ "content": "@entity.publishedAt"
1607
1342
  }
1608
1343
  ]
1609
1344
  },
@@ -1616,6 +1351,13 @@
1616
1351
  "gap": "sm",
1617
1352
  "justify": "end",
1618
1353
  "children": [
1354
+ {
1355
+ "type": "button",
1356
+ "label": "Edit",
1357
+ "event": "EDIT",
1358
+ "variant": "primary",
1359
+ "icon": "edit"
1360
+ },
1619
1361
  {
1620
1362
  "type": "button",
1621
1363
  "label": "Close",
@@ -1647,28 +1389,32 @@
1647
1389
  ],
1648
1390
  "pages": [
1649
1391
  {
1650
- "name": "MediaPage",
1651
- "path": "/media",
1392
+ "name": "ArticlesPage",
1393
+ "path": "/articles",
1394
+ "isInitial": true,
1652
1395
  "traits": [
1653
1396
  {
1654
- "ref": "MediaAssetBrowse"
1397
+ "ref": "ArticleBrowse"
1655
1398
  },
1656
1399
  {
1657
- "ref": "MediaAssetCreate"
1400
+ "ref": "ArticleCreate"
1658
1401
  },
1659
1402
  {
1660
- "ref": "MediaAssetView"
1403
+ "ref": "ArticleEdit"
1404
+ },
1405
+ {
1406
+ "ref": "ArticleView"
1661
1407
  }
1662
1408
  ]
1663
1409
  }
1664
1410
  ]
1665
1411
  },
1666
1412
  {
1667
- "name": "CategoryOrbital",
1413
+ "name": "MediaAssetOrbital",
1668
1414
  "entity": {
1669
- "name": "Category",
1415
+ "name": "MediaAsset",
1670
1416
  "persistence": "persistent",
1671
- "collection": "categorys",
1417
+ "collection": "mediaassets",
1672
1418
  "fields": [
1673
1419
  {
1674
1420
  "name": "id",
@@ -1676,46 +1422,45 @@
1676
1422
  "required": true
1677
1423
  },
1678
1424
  {
1679
- "name": "name",
1425
+ "name": "fileName",
1680
1426
  "type": "string",
1681
1427
  "required": true
1682
1428
  },
1683
1429
  {
1684
- "name": "slug",
1430
+ "name": "fileType",
1685
1431
  "type": "string",
1686
1432
  "required": true
1687
1433
  },
1688
1434
  {
1689
- "name": "description",
1435
+ "name": "fileSize",
1436
+ "type": "number"
1437
+ },
1438
+ {
1439
+ "name": "url",
1690
1440
  "type": "string"
1691
1441
  },
1692
1442
  {
1693
- "name": "parentCategory",
1443
+ "name": "altText",
1694
1444
  "type": "string"
1695
1445
  },
1696
1446
  {
1697
- "name": "articleCount",
1698
- "type": "number",
1699
- "default": 0
1447
+ "name": "uploadedAt",
1448
+ "type": "string"
1700
1449
  }
1701
1450
  ]
1702
1451
  },
1703
1452
  "traits": [
1704
1453
  {
1705
- "name": "CategoryBrowse",
1706
- "linkedEntity": "Category",
1454
+ "name": "MediaAssetBrowse",
1455
+ "linkedEntity": "MediaAsset",
1707
1456
  "category": "interaction",
1708
1457
  "listens": [
1709
1458
  {
1710
- "event": "CATEGORY_CREATED",
1711
- "triggers": "CATEGORY_CREATED"
1712
- },
1713
- {
1714
- "event": "CATEGORY_UPDATED",
1715
- "triggers": "CATEGORY_UPDATED"
1459
+ "event": "SAVE",
1460
+ "triggers": "SAVE"
1716
1461
  },
1717
1462
  {
1718
- "event": "CATEGORIZE",
1463
+ "event": "PUBLISH",
1719
1464
  "triggers": "INIT",
1720
1465
  "scope": "external"
1721
1466
  }
@@ -1725,9 +1470,6 @@
1725
1470
  {
1726
1471
  "name": "browsing",
1727
1472
  "isInitial": true
1728
- },
1729
- {
1730
- "name": "deleting"
1731
1473
  }
1732
1474
  ],
1733
1475
  "events": [
@@ -1751,30 +1493,193 @@
1751
1493
  ]
1752
1494
  },
1753
1495
  {
1754
- "key": "EDIT",
1755
- "name": "EDIT",
1496
+ "key": "SAVE",
1497
+ "name": "SAVE",
1756
1498
  "payload": [
1757
1499
  {
1758
- "name": "id",
1759
- "type": "string",
1500
+ "name": "data",
1501
+ "type": "object",
1760
1502
  "required": true
1761
1503
  }
1762
1504
  ]
1505
+ }
1506
+ ],
1507
+ "transitions": [
1508
+ {
1509
+ "from": "browsing",
1510
+ "to": "browsing",
1511
+ "event": "INIT",
1512
+ "effects": [
1513
+ [
1514
+ "fetch",
1515
+ "MediaAsset"
1516
+ ],
1517
+ [
1518
+ "render-ui",
1519
+ "main",
1520
+ {
1521
+ "type": "stack",
1522
+ "direction": "vertical",
1523
+ "gap": "lg",
1524
+ "children": [
1525
+ {
1526
+ "type": "stack",
1527
+ "direction": "horizontal",
1528
+ "gap": "md",
1529
+ "justify": "space-between",
1530
+ "children": [
1531
+ {
1532
+ "type": "stack",
1533
+ "direction": "horizontal",
1534
+ "gap": "sm",
1535
+ "align": "center",
1536
+ "children": [
1537
+ {
1538
+ "type": "icon",
1539
+ "name": "image",
1540
+ "size": "lg"
1541
+ },
1542
+ {
1543
+ "type": "typography",
1544
+ "content": "Media Library",
1545
+ "variant": "h2"
1546
+ }
1547
+ ]
1548
+ },
1549
+ {
1550
+ "type": "stack",
1551
+ "direction": "horizontal",
1552
+ "gap": "sm",
1553
+ "children": [
1554
+ {
1555
+ "type": "button",
1556
+ "label": "Create MediaAsset",
1557
+ "event": "CREATE",
1558
+ "variant": "primary",
1559
+ "icon": "plus"
1560
+ }
1561
+ ]
1562
+ }
1563
+ ]
1564
+ },
1565
+ {
1566
+ "type": "divider"
1567
+ },
1568
+ {
1569
+ "type": "data-grid",
1570
+ "entity": "MediaAsset",
1571
+ "emptyIcon": "inbox",
1572
+ "emptyTitle": "No mediaassets yet",
1573
+ "emptyDescription": "Create your first mediaasset to get started.",
1574
+ "itemActions": [
1575
+ {
1576
+ "label": "View",
1577
+ "event": "VIEW"
1578
+ }
1579
+ ],
1580
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1581
+ "renderItem": [
1582
+ "fn",
1583
+ "item",
1584
+ {
1585
+ "type": "stack",
1586
+ "direction": "vertical",
1587
+ "gap": "sm",
1588
+ "children": [
1589
+ {
1590
+ "type": "stack",
1591
+ "direction": "horizontal",
1592
+ "justify": "space-between",
1593
+ "align": "center",
1594
+ "children": [
1595
+ {
1596
+ "type": "stack",
1597
+ "direction": "horizontal",
1598
+ "gap": "sm",
1599
+ "align": "center",
1600
+ "children": [
1601
+ {
1602
+ "type": "icon",
1603
+ "name": "image",
1604
+ "size": "sm"
1605
+ },
1606
+ {
1607
+ "type": "typography",
1608
+ "variant": "h4",
1609
+ "content": "@item.fileName"
1610
+ }
1611
+ ]
1612
+ },
1613
+ {
1614
+ "type": "badge",
1615
+ "label": "@item.fileType"
1616
+ }
1617
+ ]
1618
+ },
1619
+ {
1620
+ "type": "typography",
1621
+ "variant": "caption",
1622
+ "color": "muted",
1623
+ "content": "@item.fileSize"
1624
+ }
1625
+ ]
1626
+ }
1627
+ ]
1628
+ }
1629
+ ]
1630
+ }
1631
+ ]
1632
+ ]
1763
1633
  },
1764
1634
  {
1765
- "key": "DELETE",
1766
- "name": "DELETE",
1767
- "payload": [
1768
- {
1769
- "name": "id",
1770
- "type": "string",
1771
- "required": true
1772
- }
1635
+ "from": "browsing",
1636
+ "to": "browsing",
1637
+ "event": "SAVE",
1638
+ "effects": [
1639
+ [
1640
+ "fetch",
1641
+ "MediaAsset"
1642
+ ]
1773
1643
  ]
1644
+ }
1645
+ ]
1646
+ }
1647
+ },
1648
+ {
1649
+ "name": "MediaAssetCreate",
1650
+ "linkedEntity": "MediaAsset",
1651
+ "category": "interaction",
1652
+ "emits": [
1653
+ {
1654
+ "event": "SAVE"
1655
+ }
1656
+ ],
1657
+ "stateMachine": {
1658
+ "states": [
1659
+ {
1660
+ "name": "closed",
1661
+ "isInitial": true
1774
1662
  },
1775
1663
  {
1776
- "key": "CATEGORY_CREATED",
1777
- "name": "CATEGORY_CREATED",
1664
+ "name": "open"
1665
+ }
1666
+ ],
1667
+ "events": [
1668
+ {
1669
+ "key": "INIT",
1670
+ "name": "Initialize"
1671
+ },
1672
+ {
1673
+ "key": "CREATE",
1674
+ "name": "Open"
1675
+ },
1676
+ {
1677
+ "key": "CLOSE",
1678
+ "name": "Close"
1679
+ },
1680
+ {
1681
+ "key": "SAVE",
1682
+ "name": "Save",
1778
1683
  "payload": [
1779
1684
  {
1780
1685
  "name": "data",
@@ -1782,37 +1687,897 @@
1782
1687
  "required": true
1783
1688
  }
1784
1689
  ]
1690
+ }
1691
+ ],
1692
+ "transitions": [
1693
+ {
1694
+ "from": "closed",
1695
+ "to": "closed",
1696
+ "event": "INIT",
1697
+ "effects": [
1698
+ [
1699
+ "fetch",
1700
+ "MediaAsset"
1701
+ ]
1702
+ ]
1785
1703
  },
1786
1704
  {
1787
- "key": "CATEGORY_UPDATED",
1788
- "name": "CATEGORY_UPDATED",
1789
- "payload": [
1790
- {
1791
- "name": "data",
1792
- "type": "object",
1793
- "required": true
1794
- }
1705
+ "from": "closed",
1706
+ "to": "open",
1707
+ "event": "CREATE",
1708
+ "effects": [
1709
+ [
1710
+ "fetch",
1711
+ "MediaAsset"
1712
+ ],
1713
+ [
1714
+ "render-ui",
1715
+ "modal",
1716
+ {
1717
+ "type": "stack",
1718
+ "direction": "vertical",
1719
+ "gap": "md",
1720
+ "children": [
1721
+ {
1722
+ "type": "stack",
1723
+ "direction": "horizontal",
1724
+ "gap": "sm",
1725
+ "children": [
1726
+ {
1727
+ "type": "icon",
1728
+ "name": "plus-circle",
1729
+ "size": "md"
1730
+ },
1731
+ {
1732
+ "type": "typography",
1733
+ "content": "New MediaAsset",
1734
+ "variant": "h3"
1735
+ }
1736
+ ]
1737
+ },
1738
+ {
1739
+ "type": "divider"
1740
+ },
1741
+ {
1742
+ "type": "form-section",
1743
+ "entity": "MediaAsset",
1744
+ "mode": "create",
1745
+ "submitEvent": "SAVE",
1746
+ "cancelEvent": "CLOSE",
1747
+ "fields": [
1748
+ "fileName",
1749
+ "fileType",
1750
+ "fileSize",
1751
+ "url",
1752
+ "altText",
1753
+ "uploadedAt"
1754
+ ]
1755
+ }
1756
+ ]
1757
+ }
1758
+ ]
1759
+ ]
1760
+ },
1761
+ {
1762
+ "from": "open",
1763
+ "to": "closed",
1764
+ "event": "CLOSE",
1765
+ "effects": [
1766
+ [
1767
+ "render-ui",
1768
+ "modal",
1769
+ null
1770
+ ]
1771
+ ]
1772
+ },
1773
+ {
1774
+ "from": "open",
1775
+ "to": "closed",
1776
+ "event": "SAVE",
1777
+ "effects": [
1778
+ [
1779
+ "persist",
1780
+ "create",
1781
+ "MediaAsset",
1782
+ "@payload.data"
1783
+ ],
1784
+ [
1785
+ "fetch",
1786
+ "MediaAsset"
1787
+ ],
1788
+ [
1789
+ "render-ui",
1790
+ "modal",
1791
+ null
1792
+ ],
1793
+ [
1794
+ "emit",
1795
+ "SAVE"
1796
+ ],
1797
+ [
1798
+ "notify",
1799
+ "MediaAsset created successfully"
1800
+ ]
1801
+ ]
1802
+ }
1803
+ ]
1804
+ }
1805
+ },
1806
+ {
1807
+ "name": "MediaAssetView",
1808
+ "linkedEntity": "MediaAsset",
1809
+ "category": "interaction",
1810
+ "stateMachine": {
1811
+ "states": [
1812
+ {
1813
+ "name": "closed",
1814
+ "isInitial": true
1815
+ },
1816
+ {
1817
+ "name": "open"
1818
+ }
1819
+ ],
1820
+ "events": [
1821
+ {
1822
+ "key": "INIT",
1823
+ "name": "Initialize"
1824
+ },
1825
+ {
1826
+ "key": "VIEW",
1827
+ "name": "Open",
1828
+ "payload": [
1829
+ {
1830
+ "name": "id",
1831
+ "type": "string",
1832
+ "required": true
1833
+ }
1834
+ ]
1835
+ },
1836
+ {
1837
+ "key": "CLOSE",
1838
+ "name": "Close"
1839
+ }
1840
+ ],
1841
+ "transitions": [
1842
+ {
1843
+ "from": "closed",
1844
+ "to": "closed",
1845
+ "event": "INIT",
1846
+ "effects": [
1847
+ [
1848
+ "fetch",
1849
+ "MediaAsset"
1850
+ ]
1851
+ ]
1852
+ },
1853
+ {
1854
+ "from": "closed",
1855
+ "to": "open",
1856
+ "event": "VIEW",
1857
+ "effects": [
1858
+ [
1859
+ "fetch",
1860
+ "MediaAsset",
1861
+ "@payload.id"
1862
+ ],
1863
+ [
1864
+ "render-ui",
1865
+ "modal",
1866
+ {
1867
+ "type": "stack",
1868
+ "direction": "vertical",
1869
+ "gap": "md",
1870
+ "children": [
1871
+ {
1872
+ "type": "stack",
1873
+ "direction": "horizontal",
1874
+ "gap": "sm",
1875
+ "align": "center",
1876
+ "children": [
1877
+ {
1878
+ "type": "icon",
1879
+ "name": "eye",
1880
+ "size": "md"
1881
+ },
1882
+ {
1883
+ "type": "typography",
1884
+ "variant": "h3",
1885
+ "content": "@entity.fileName"
1886
+ }
1887
+ ]
1888
+ },
1889
+ {
1890
+ "type": "divider"
1891
+ },
1892
+ {
1893
+ "type": "stack",
1894
+ "direction": "horizontal",
1895
+ "gap": "md",
1896
+ "children": [
1897
+ {
1898
+ "type": "typography",
1899
+ "variant": "caption",
1900
+ "content": "FileName"
1901
+ },
1902
+ {
1903
+ "type": "typography",
1904
+ "variant": "body",
1905
+ "content": "@entity.fileName"
1906
+ }
1907
+ ]
1908
+ },
1909
+ {
1910
+ "type": "stack",
1911
+ "direction": "horizontal",
1912
+ "gap": "md",
1913
+ "children": [
1914
+ {
1915
+ "type": "typography",
1916
+ "variant": "caption",
1917
+ "content": "FileType"
1918
+ },
1919
+ {
1920
+ "type": "typography",
1921
+ "variant": "body",
1922
+ "content": "@entity.fileType"
1923
+ }
1924
+ ]
1925
+ },
1926
+ {
1927
+ "type": "stack",
1928
+ "direction": "horizontal",
1929
+ "gap": "md",
1930
+ "children": [
1931
+ {
1932
+ "type": "typography",
1933
+ "variant": "caption",
1934
+ "content": "FileSize"
1935
+ },
1936
+ {
1937
+ "type": "typography",
1938
+ "variant": "body",
1939
+ "content": "@entity.fileSize"
1940
+ }
1941
+ ]
1942
+ },
1943
+ {
1944
+ "type": "stack",
1945
+ "direction": "horizontal",
1946
+ "gap": "md",
1947
+ "children": [
1948
+ {
1949
+ "type": "typography",
1950
+ "variant": "caption",
1951
+ "content": "Url"
1952
+ },
1953
+ {
1954
+ "type": "typography",
1955
+ "variant": "body",
1956
+ "content": "@entity.url"
1957
+ }
1958
+ ]
1959
+ },
1960
+ {
1961
+ "type": "stack",
1962
+ "direction": "horizontal",
1963
+ "gap": "md",
1964
+ "children": [
1965
+ {
1966
+ "type": "typography",
1967
+ "variant": "caption",
1968
+ "content": "AltText"
1969
+ },
1970
+ {
1971
+ "type": "typography",
1972
+ "variant": "body",
1973
+ "content": "@entity.altText"
1974
+ }
1975
+ ]
1976
+ },
1977
+ {
1978
+ "type": "stack",
1979
+ "direction": "horizontal",
1980
+ "gap": "md",
1981
+ "children": [
1982
+ {
1983
+ "type": "typography",
1984
+ "variant": "caption",
1985
+ "content": "UploadedAt"
1986
+ },
1987
+ {
1988
+ "type": "typography",
1989
+ "variant": "body",
1990
+ "content": "@entity.uploadedAt"
1991
+ }
1992
+ ]
1993
+ },
1994
+ {
1995
+ "type": "divider"
1996
+ },
1997
+ {
1998
+ "type": "stack",
1999
+ "direction": "horizontal",
2000
+ "gap": "sm",
2001
+ "justify": "end",
2002
+ "children": [
2003
+ {
2004
+ "type": "button",
2005
+ "label": "Close",
2006
+ "event": "CLOSE",
2007
+ "variant": "ghost"
2008
+ }
2009
+ ]
2010
+ }
2011
+ ]
2012
+ }
2013
+ ]
2014
+ ]
2015
+ },
2016
+ {
2017
+ "from": "open",
2018
+ "to": "closed",
2019
+ "event": "CLOSE",
2020
+ "effects": [
2021
+ [
2022
+ "render-ui",
2023
+ "modal",
2024
+ null
2025
+ ]
2026
+ ]
2027
+ }
2028
+ ]
2029
+ }
2030
+ }
2031
+ ],
2032
+ "pages": [
2033
+ {
2034
+ "name": "MediaPage",
2035
+ "path": "/media",
2036
+ "traits": [
2037
+ {
2038
+ "ref": "MediaAssetBrowse"
2039
+ },
2040
+ {
2041
+ "ref": "MediaAssetCreate"
2042
+ },
2043
+ {
2044
+ "ref": "MediaAssetView"
2045
+ }
2046
+ ]
2047
+ }
2048
+ ]
2049
+ },
2050
+ {
2051
+ "name": "CategoryOrbital",
2052
+ "entity": {
2053
+ "name": "Category",
2054
+ "persistence": "persistent",
2055
+ "collection": "categorys",
2056
+ "fields": [
2057
+ {
2058
+ "name": "id",
2059
+ "type": "string",
2060
+ "required": true
2061
+ },
2062
+ {
2063
+ "name": "name",
2064
+ "type": "string",
2065
+ "required": true
2066
+ },
2067
+ {
2068
+ "name": "slug",
2069
+ "type": "string",
2070
+ "required": true
2071
+ },
2072
+ {
2073
+ "name": "description",
2074
+ "type": "string"
2075
+ },
2076
+ {
2077
+ "name": "parentCategory",
2078
+ "type": "string"
2079
+ },
2080
+ {
2081
+ "name": "articleCount",
2082
+ "type": "number",
2083
+ "default": 0
2084
+ }
2085
+ ]
2086
+ },
2087
+ "traits": [
2088
+ {
2089
+ "name": "CategoryBrowse",
2090
+ "linkedEntity": "Category",
2091
+ "category": "interaction",
2092
+ "listens": [
2093
+ {
2094
+ "event": "CATEGORY_CREATED",
2095
+ "triggers": "CATEGORY_CREATED"
2096
+ },
2097
+ {
2098
+ "event": "CATEGORY_UPDATED",
2099
+ "triggers": "CATEGORY_UPDATED"
2100
+ },
2101
+ {
2102
+ "event": "CATEGORIZE",
2103
+ "triggers": "INIT",
2104
+ "scope": "external"
2105
+ }
2106
+ ],
2107
+ "stateMachine": {
2108
+ "states": [
2109
+ {
2110
+ "name": "browsing",
2111
+ "isInitial": true
2112
+ },
2113
+ {
2114
+ "name": "deleting"
2115
+ }
2116
+ ],
2117
+ "events": [
2118
+ {
2119
+ "key": "INIT",
2120
+ "name": "Initialize"
2121
+ },
2122
+ {
2123
+ "key": "CREATE",
2124
+ "name": "CREATE"
2125
+ },
2126
+ {
2127
+ "key": "VIEW",
2128
+ "name": "VIEW",
2129
+ "payload": [
2130
+ {
2131
+ "name": "id",
2132
+ "type": "string",
2133
+ "required": true
2134
+ }
2135
+ ]
2136
+ },
2137
+ {
2138
+ "key": "EDIT",
2139
+ "name": "EDIT",
2140
+ "payload": [
2141
+ {
2142
+ "name": "id",
2143
+ "type": "string",
2144
+ "required": true
2145
+ }
2146
+ ]
2147
+ },
2148
+ {
2149
+ "key": "DELETE",
2150
+ "name": "DELETE",
2151
+ "payload": [
2152
+ {
2153
+ "name": "id",
2154
+ "type": "string",
2155
+ "required": true
2156
+ }
2157
+ ]
2158
+ },
2159
+ {
2160
+ "key": "CATEGORY_CREATED",
2161
+ "name": "CATEGORY_CREATED",
2162
+ "payload": [
2163
+ {
2164
+ "name": "data",
2165
+ "type": "object",
2166
+ "required": true
2167
+ }
2168
+ ]
2169
+ },
2170
+ {
2171
+ "key": "CATEGORY_UPDATED",
2172
+ "name": "CATEGORY_UPDATED",
2173
+ "payload": [
2174
+ {
2175
+ "name": "data",
2176
+ "type": "object",
2177
+ "required": true
2178
+ }
2179
+ ]
2180
+ },
2181
+ {
2182
+ "key": "CONFIRM_DELETE",
2183
+ "name": "Confirm Delete"
2184
+ },
2185
+ {
2186
+ "key": "CANCEL",
2187
+ "name": "Cancel"
2188
+ },
2189
+ {
2190
+ "key": "CLOSE",
2191
+ "name": "Close"
2192
+ }
2193
+ ],
2194
+ "transitions": [
2195
+ {
2196
+ "from": "browsing",
2197
+ "to": "browsing",
2198
+ "event": "INIT",
2199
+ "effects": [
2200
+ [
2201
+ "fetch",
2202
+ "Category"
2203
+ ],
2204
+ [
2205
+ "render-ui",
2206
+ "main",
2207
+ {
2208
+ "type": "stack",
2209
+ "direction": "vertical",
2210
+ "gap": "lg",
2211
+ "children": [
2212
+ {
2213
+ "type": "stack",
2214
+ "direction": "horizontal",
2215
+ "gap": "md",
2216
+ "justify": "space-between",
2217
+ "children": [
2218
+ {
2219
+ "type": "stack",
2220
+ "direction": "horizontal",
2221
+ "gap": "sm",
2222
+ "align": "center",
2223
+ "children": [
2224
+ {
2225
+ "type": "icon",
2226
+ "name": "folder",
2227
+ "size": "lg"
2228
+ },
2229
+ {
2230
+ "type": "typography",
2231
+ "content": "Categories",
2232
+ "variant": "h2"
2233
+ }
2234
+ ]
2235
+ },
2236
+ {
2237
+ "type": "stack",
2238
+ "direction": "horizontal",
2239
+ "gap": "sm",
2240
+ "children": [
2241
+ {
2242
+ "type": "button",
2243
+ "label": "Create Category",
2244
+ "event": "CREATE",
2245
+ "variant": "primary",
2246
+ "icon": "plus"
2247
+ }
2248
+ ]
2249
+ }
2250
+ ]
2251
+ },
2252
+ {
2253
+ "type": "divider"
2254
+ },
2255
+ {
2256
+ "type": "data-grid",
2257
+ "entity": "Category",
2258
+ "emptyIcon": "inbox",
2259
+ "emptyTitle": "No categorys yet",
2260
+ "emptyDescription": "Create your first category to get started.",
2261
+ "itemActions": [
2262
+ {
2263
+ "label": "View",
2264
+ "event": "VIEW"
2265
+ },
2266
+ {
2267
+ "label": "Edit",
2268
+ "event": "EDIT"
2269
+ },
2270
+ {
2271
+ "label": "Delete",
2272
+ "event": "DELETE",
2273
+ "variant": "danger"
2274
+ }
2275
+ ],
2276
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2277
+ "renderItem": [
2278
+ "fn",
2279
+ "item",
2280
+ {
2281
+ "type": "stack",
2282
+ "direction": "vertical",
2283
+ "gap": "sm",
2284
+ "children": [
2285
+ {
2286
+ "type": "stack",
2287
+ "direction": "horizontal",
2288
+ "justify": "space-between",
2289
+ "align": "center",
2290
+ "children": [
2291
+ {
2292
+ "type": "stack",
2293
+ "direction": "horizontal",
2294
+ "gap": "sm",
2295
+ "align": "center",
2296
+ "children": [
2297
+ {
2298
+ "type": "icon",
2299
+ "name": "folder",
2300
+ "size": "sm"
2301
+ },
2302
+ {
2303
+ "type": "typography",
2304
+ "variant": "h4",
2305
+ "content": "@item.name"
2306
+ }
2307
+ ]
2308
+ },
2309
+ {
2310
+ "type": "badge",
2311
+ "label": "@item.slug"
2312
+ }
2313
+ ]
2314
+ },
2315
+ {
2316
+ "type": "typography",
2317
+ "variant": "caption",
2318
+ "color": "muted",
2319
+ "content": "@item.description"
2320
+ }
2321
+ ]
2322
+ }
2323
+ ]
2324
+ }
2325
+ ]
2326
+ }
2327
+ ]
2328
+ ]
2329
+ },
2330
+ {
2331
+ "from": "browsing",
2332
+ "to": "browsing",
2333
+ "event": "CATEGORY_CREATED",
2334
+ "effects": [
2335
+ [
2336
+ "fetch",
2337
+ "Category"
2338
+ ]
2339
+ ]
2340
+ },
2341
+ {
2342
+ "from": "browsing",
2343
+ "to": "browsing",
2344
+ "event": "CATEGORY_UPDATED",
2345
+ "effects": [
2346
+ [
2347
+ "fetch",
2348
+ "Category"
2349
+ ]
2350
+ ]
2351
+ },
2352
+ {
2353
+ "from": "browsing",
2354
+ "to": "deleting",
2355
+ "event": "DELETE",
2356
+ "effects": [
2357
+ [
2358
+ "fetch",
2359
+ "Category",
2360
+ "@payload.id"
2361
+ ],
2362
+ [
2363
+ "render-ui",
2364
+ "modal",
2365
+ {
2366
+ "type": "stack",
2367
+ "direction": "vertical",
2368
+ "gap": "md",
2369
+ "children": [
2370
+ {
2371
+ "type": "stack",
2372
+ "direction": "horizontal",
2373
+ "gap": "sm",
2374
+ "children": [
2375
+ {
2376
+ "type": "icon",
2377
+ "name": "trash-2",
2378
+ "size": "md"
2379
+ },
2380
+ {
2381
+ "type": "typography",
2382
+ "content": "Delete Category",
2383
+ "variant": "h3"
2384
+ }
2385
+ ]
2386
+ },
2387
+ {
2388
+ "type": "divider"
2389
+ },
2390
+ {
2391
+ "type": "typography",
2392
+ "content": "Are you sure you want to delete this category?",
2393
+ "variant": "body"
2394
+ },
2395
+ {
2396
+ "type": "stack",
2397
+ "direction": "horizontal",
2398
+ "gap": "sm",
2399
+ "justify": "end",
2400
+ "children": [
2401
+ {
2402
+ "type": "button",
2403
+ "label": "Cancel",
2404
+ "event": "CANCEL",
2405
+ "variant": "ghost"
2406
+ },
2407
+ {
2408
+ "type": "button",
2409
+ "label": "Delete",
2410
+ "event": "CONFIRM_DELETE",
2411
+ "variant": "danger",
2412
+ "icon": "trash"
2413
+ }
2414
+ ]
2415
+ }
2416
+ ]
2417
+ }
2418
+ ]
2419
+ ]
2420
+ },
2421
+ {
2422
+ "from": "deleting",
2423
+ "to": "browsing",
2424
+ "event": "CONFIRM_DELETE",
2425
+ "effects": [
2426
+ [
2427
+ "persist",
2428
+ "delete",
2429
+ "Category",
2430
+ "@entity.id"
2431
+ ],
2432
+ [
2433
+ "render-ui",
2434
+ "modal",
2435
+ null
2436
+ ],
2437
+ [
2438
+ "fetch",
2439
+ "Category"
2440
+ ],
2441
+ [
2442
+ "render-ui",
2443
+ "main",
2444
+ {
2445
+ "type": "stack",
2446
+ "direction": "vertical",
2447
+ "gap": "lg",
2448
+ "children": [
2449
+ {
2450
+ "type": "stack",
2451
+ "direction": "horizontal",
2452
+ "gap": "md",
2453
+ "justify": "space-between",
2454
+ "children": [
2455
+ {
2456
+ "type": "stack",
2457
+ "direction": "horizontal",
2458
+ "gap": "sm",
2459
+ "align": "center",
2460
+ "children": [
2461
+ {
2462
+ "type": "icon",
2463
+ "name": "folder",
2464
+ "size": "lg"
2465
+ },
2466
+ {
2467
+ "type": "typography",
2468
+ "content": "Categories",
2469
+ "variant": "h2"
2470
+ }
2471
+ ]
2472
+ },
2473
+ {
2474
+ "type": "stack",
2475
+ "direction": "horizontal",
2476
+ "gap": "sm",
2477
+ "children": [
2478
+ {
2479
+ "type": "button",
2480
+ "label": "Create Category",
2481
+ "event": "CREATE",
2482
+ "variant": "primary",
2483
+ "icon": "plus"
2484
+ }
2485
+ ]
2486
+ }
2487
+ ]
2488
+ },
2489
+ {
2490
+ "type": "divider"
2491
+ },
2492
+ {
2493
+ "type": "data-grid",
2494
+ "entity": "Category",
2495
+ "emptyIcon": "inbox",
2496
+ "emptyTitle": "No categorys yet",
2497
+ "emptyDescription": "Create your first category to get started.",
2498
+ "itemActions": [
2499
+ {
2500
+ "label": "View",
2501
+ "event": "VIEW"
2502
+ },
2503
+ {
2504
+ "label": "Edit",
2505
+ "event": "EDIT"
2506
+ },
2507
+ {
2508
+ "label": "Delete",
2509
+ "event": "DELETE",
2510
+ "variant": "danger"
2511
+ }
2512
+ ],
2513
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2514
+ "renderItem": [
2515
+ "fn",
2516
+ "item",
2517
+ {
2518
+ "type": "stack",
2519
+ "direction": "vertical",
2520
+ "gap": "sm",
2521
+ "children": [
2522
+ {
2523
+ "type": "stack",
2524
+ "direction": "horizontal",
2525
+ "justify": "space-between",
2526
+ "align": "center",
2527
+ "children": [
2528
+ {
2529
+ "type": "stack",
2530
+ "direction": "horizontal",
2531
+ "gap": "sm",
2532
+ "align": "center",
2533
+ "children": [
2534
+ {
2535
+ "type": "icon",
2536
+ "name": "folder",
2537
+ "size": "sm"
2538
+ },
2539
+ {
2540
+ "type": "typography",
2541
+ "variant": "h4",
2542
+ "content": "@item.name"
2543
+ }
2544
+ ]
2545
+ },
2546
+ {
2547
+ "type": "badge",
2548
+ "label": "@item.slug"
2549
+ }
2550
+ ]
2551
+ },
2552
+ {
2553
+ "type": "typography",
2554
+ "variant": "caption",
2555
+ "color": "muted",
2556
+ "content": "@item.description"
2557
+ }
2558
+ ]
2559
+ }
2560
+ ]
2561
+ }
2562
+ ]
2563
+ }
2564
+ ],
2565
+ [
2566
+ "notify",
2567
+ "Category deleted successfully"
2568
+ ]
1795
2569
  ]
1796
2570
  },
1797
2571
  {
1798
- "key": "CONFIRM_DELETE",
1799
- "name": "Confirm Delete"
1800
- },
1801
- {
1802
- "key": "CANCEL",
1803
- "name": "Cancel"
1804
- },
1805
- {
1806
- "key": "CLOSE",
1807
- "name": "Close"
1808
- }
1809
- ],
1810
- "transitions": [
1811
- {
1812
- "from": "browsing",
2572
+ "from": "deleting",
1813
2573
  "to": "browsing",
1814
- "event": "INIT",
2574
+ "event": "CANCEL",
1815
2575
  "effects": [
2576
+ [
2577
+ "render-ui",
2578
+ "modal",
2579
+ null
2580
+ ],
1816
2581
  [
1817
2582
  "fetch",
1818
2583
  "Category"
@@ -1890,7 +2655,9 @@
1890
2655
  }
1891
2656
  ],
1892
2657
  "className": "transition-shadow hover:shadow-md cursor-pointer",
1893
- "children": [
2658
+ "renderItem": [
2659
+ "fn",
2660
+ "item",
1894
2661
  {
1895
2662
  "type": "stack",
1896
2663
  "direction": "vertical",
@@ -1916,13 +2683,13 @@
1916
2683
  {
1917
2684
  "type": "typography",
1918
2685
  "variant": "h4",
1919
- "content": "@entity.name"
2686
+ "content": "@item.name"
1920
2687
  }
1921
2688
  ]
1922
2689
  },
1923
2690
  {
1924
2691
  "type": "badge",
1925
- "label": "@entity.slug"
2692
+ "label": "@item.slug"
1926
2693
  }
1927
2694
  ]
1928
2695
  },
@@ -1930,7 +2697,7 @@
1930
2697
  "type": "typography",
1931
2698
  "variant": "caption",
1932
2699
  "color": "muted",
1933
- "content": "@entity.description"
2700
+ "content": "@item.description"
1934
2701
  }
1935
2702
  ]
1936
2703
  }
@@ -1942,59 +2709,64 @@
1942
2709
  ]
1943
2710
  },
1944
2711
  {
1945
- "from": "browsing",
2712
+ "from": "deleting",
1946
2713
  "to": "browsing",
1947
- "event": "CATEGORY_CREATED",
2714
+ "event": "CLOSE",
1948
2715
  "effects": [
1949
2716
  [
1950
- "fetch",
1951
- "Category"
1952
- ]
1953
- ]
1954
- },
1955
- {
1956
- "from": "browsing",
1957
- "to": "browsing",
1958
- "event": "CATEGORY_UPDATED",
1959
- "effects": [
2717
+ "render-ui",
2718
+ "modal",
2719
+ null
2720
+ ],
1960
2721
  [
1961
2722
  "fetch",
1962
2723
  "Category"
1963
- ]
1964
- ]
1965
- },
1966
- {
1967
- "from": "browsing",
1968
- "to": "deleting",
1969
- "event": "DELETE",
1970
- "effects": [
1971
- [
1972
- "fetch",
1973
- "Category",
1974
- "@payload.id"
1975
2724
  ],
1976
2725
  [
1977
2726
  "render-ui",
1978
- "modal",
2727
+ "main",
1979
2728
  {
1980
2729
  "type": "stack",
1981
2730
  "direction": "vertical",
1982
- "gap": "md",
2731
+ "gap": "lg",
1983
2732
  "children": [
1984
2733
  {
1985
2734
  "type": "stack",
1986
2735
  "direction": "horizontal",
1987
- "gap": "sm",
2736
+ "gap": "md",
2737
+ "justify": "space-between",
1988
2738
  "children": [
1989
2739
  {
1990
- "type": "icon",
1991
- "name": "trash-2",
1992
- "size": "md"
2740
+ "type": "stack",
2741
+ "direction": "horizontal",
2742
+ "gap": "sm",
2743
+ "align": "center",
2744
+ "children": [
2745
+ {
2746
+ "type": "icon",
2747
+ "name": "folder",
2748
+ "size": "lg"
2749
+ },
2750
+ {
2751
+ "type": "typography",
2752
+ "content": "Categories",
2753
+ "variant": "h2"
2754
+ }
2755
+ ]
1993
2756
  },
1994
2757
  {
1995
- "type": "typography",
1996
- "content": "Delete Category",
1997
- "variant": "h3"
2758
+ "type": "stack",
2759
+ "direction": "horizontal",
2760
+ "gap": "sm",
2761
+ "children": [
2762
+ {
2763
+ "type": "button",
2764
+ "label": "Create Category",
2765
+ "event": "CREATE",
2766
+ "variant": "primary",
2767
+ "icon": "plus"
2768
+ }
2769
+ ]
1998
2770
  }
1999
2771
  ]
2000
2772
  },
@@ -2002,28 +2774,72 @@
2002
2774
  "type": "divider"
2003
2775
  },
2004
2776
  {
2005
- "type": "typography",
2006
- "content": "Are you sure you want to delete this category?",
2007
- "variant": "body"
2008
- },
2009
- {
2010
- "type": "stack",
2011
- "direction": "horizontal",
2012
- "gap": "sm",
2013
- "justify": "end",
2014
- "children": [
2777
+ "type": "data-grid",
2778
+ "entity": "Category",
2779
+ "emptyIcon": "inbox",
2780
+ "emptyTitle": "No categorys yet",
2781
+ "emptyDescription": "Create your first category to get started.",
2782
+ "itemActions": [
2015
2783
  {
2016
- "type": "button",
2017
- "label": "Cancel",
2018
- "event": "CANCEL",
2019
- "variant": "ghost"
2784
+ "label": "View",
2785
+ "event": "VIEW"
2786
+ },
2787
+ {
2788
+ "label": "Edit",
2789
+ "event": "EDIT"
2020
2790
  },
2021
2791
  {
2022
- "type": "button",
2023
2792
  "label": "Delete",
2024
- "event": "CONFIRM_DELETE",
2025
- "variant": "danger",
2026
- "icon": "trash"
2793
+ "event": "DELETE",
2794
+ "variant": "danger"
2795
+ }
2796
+ ],
2797
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2798
+ "renderItem": [
2799
+ "fn",
2800
+ "item",
2801
+ {
2802
+ "type": "stack",
2803
+ "direction": "vertical",
2804
+ "gap": "sm",
2805
+ "children": [
2806
+ {
2807
+ "type": "stack",
2808
+ "direction": "horizontal",
2809
+ "justify": "space-between",
2810
+ "align": "center",
2811
+ "children": [
2812
+ {
2813
+ "type": "stack",
2814
+ "direction": "horizontal",
2815
+ "gap": "sm",
2816
+ "align": "center",
2817
+ "children": [
2818
+ {
2819
+ "type": "icon",
2820
+ "name": "folder",
2821
+ "size": "sm"
2822
+ },
2823
+ {
2824
+ "type": "typography",
2825
+ "variant": "h4",
2826
+ "content": "@item.name"
2827
+ }
2828
+ ]
2829
+ },
2830
+ {
2831
+ "type": "badge",
2832
+ "label": "@item.slug"
2833
+ }
2834
+ ]
2835
+ },
2836
+ {
2837
+ "type": "typography",
2838
+ "variant": "caption",
2839
+ "color": "muted",
2840
+ "content": "@item.description"
2841
+ }
2842
+ ]
2027
2843
  }
2028
2844
  ]
2029
2845
  }
@@ -2031,56 +2847,6 @@
2031
2847
  }
2032
2848
  ]
2033
2849
  ]
2034
- },
2035
- {
2036
- "from": "deleting",
2037
- "to": "browsing",
2038
- "event": "CONFIRM_DELETE",
2039
- "effects": [
2040
- [
2041
- "persist",
2042
- "delete",
2043
- "Category",
2044
- "@entity.id"
2045
- ],
2046
- [
2047
- "render-ui",
2048
- "modal",
2049
- null
2050
- ],
2051
- [
2052
- "fetch",
2053
- "Category"
2054
- ],
2055
- [
2056
- "notify",
2057
- "Category deleted successfully"
2058
- ]
2059
- ]
2060
- },
2061
- {
2062
- "from": "deleting",
2063
- "to": "browsing",
2064
- "event": "CANCEL",
2065
- "effects": [
2066
- [
2067
- "render-ui",
2068
- "modal",
2069
- null
2070
- ]
2071
- ]
2072
- },
2073
- {
2074
- "from": "deleting",
2075
- "to": "browsing",
2076
- "event": "CLOSE",
2077
- "effects": [
2078
- [
2079
- "render-ui",
2080
- "modal",
2081
- null
2082
- ]
2083
- ]
2084
2850
  }
2085
2851
  ]
2086
2852
  }