@almadar/std 3.1.0 → 3.1.1

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 (176) hide show
  1. package/dist/behaviors/exports/atoms/std-async.orb +420 -0
  2. package/dist/behaviors/exports/atoms/std-browse.orb +173 -0
  3. package/dist/behaviors/exports/atoms/std-cache-aside.orb +881 -0
  4. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +501 -0
  5. package/dist/behaviors/exports/atoms/std-collision.orb +616 -0
  6. package/dist/behaviors/exports/atoms/std-combat-log.orb +145 -0
  7. package/dist/behaviors/exports/atoms/std-combat.orb +410 -0
  8. package/dist/behaviors/exports/atoms/std-confirmation.orb +282 -0
  9. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +238 -0
  10. package/dist/behaviors/exports/atoms/std-display.orb +842 -0
  11. package/dist/behaviors/exports/atoms/std-drawer.orb +316 -0
  12. package/dist/behaviors/exports/atoms/std-filter.orb +442 -0
  13. package/dist/behaviors/exports/atoms/std-game-audio.orb +113 -0
  14. package/dist/behaviors/exports/atoms/std-game-canvas-2d.orb +135 -0
  15. package/dist/behaviors/exports/atoms/std-game-canvas-3d.orb +224 -0
  16. package/dist/behaviors/exports/atoms/std-game-hud.orb +151 -0
  17. package/dist/behaviors/exports/atoms/std-game-menu.orb +211 -0
  18. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +195 -0
  19. package/dist/behaviors/exports/atoms/std-gameflow.orb +318 -0
  20. package/dist/behaviors/exports/atoms/std-input.orb +629 -0
  21. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +255 -0
  22. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +631 -0
  23. package/dist/behaviors/exports/atoms/std-loading.orb +511 -0
  24. package/dist/behaviors/exports/atoms/std-modal.orb +270 -0
  25. package/dist/behaviors/exports/atoms/std-movement.orb +1037 -0
  26. package/dist/behaviors/exports/atoms/std-notification.orb +418 -0
  27. package/dist/behaviors/exports/atoms/std-overworld.orb +483 -0
  28. package/dist/behaviors/exports/atoms/std-pagination.orb +331 -0
  29. package/dist/behaviors/exports/atoms/std-physics2d.orb +419 -0
  30. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +257 -0
  31. package/dist/behaviors/exports/atoms/std-quest.orb +980 -0
  32. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +638 -0
  33. package/dist/behaviors/exports/atoms/std-score-board.orb +238 -0
  34. package/dist/behaviors/exports/atoms/std-score.orb +466 -0
  35. package/dist/behaviors/exports/atoms/std-search.orb +373 -0
  36. package/dist/behaviors/exports/atoms/std-selection.orb +759 -0
  37. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +183 -0
  38. package/dist/behaviors/exports/atoms/std-sort.orb +578 -0
  39. package/dist/behaviors/exports/atoms/std-sprite.orb +156 -0
  40. package/dist/behaviors/exports/atoms/std-tabs.orb +274 -0
  41. package/dist/behaviors/exports/atoms/std-timer.orb +1030 -0
  42. package/dist/behaviors/exports/atoms/std-undo.orb +694 -0
  43. package/dist/behaviors/exports/atoms/std-wizard.orb +666 -0
  44. package/dist/behaviors/exports/molecules/std-builder-game.orb +183 -0
  45. package/dist/behaviors/exports/molecules/std-cart.orb +591 -0
  46. package/dist/behaviors/exports/molecules/std-classifier-game.orb +183 -0
  47. package/dist/behaviors/exports/molecules/std-debugger-game.orb +183 -0
  48. package/dist/behaviors/exports/molecules/std-detail.orb +589 -0
  49. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +183 -0
  50. package/dist/behaviors/exports/molecules/std-geospatial.orb +649 -0
  51. package/dist/behaviors/exports/molecules/std-inventory.orb +853 -0
  52. package/dist/behaviors/exports/molecules/std-list.orb +954 -0
  53. package/dist/behaviors/exports/molecules/std-messaging.orb +585 -0
  54. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +183 -0
  55. package/dist/behaviors/exports/molecules/std-platformer-game.orb +496 -0
  56. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +527 -0
  57. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +183 -0
  58. package/dist/behaviors/exports/molecules/std-simulator-game.orb +183 -0
  59. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +443 -0
  60. package/dist/behaviors/exports/organisms/std-api-gateway.orb +2296 -0
  61. package/dist/behaviors/exports/organisms/std-arcade-game.orb +833 -0
  62. package/dist/behaviors/exports/organisms/std-booking-system.orb +3977 -0
  63. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +2214 -0
  64. package/dist/behaviors/exports/organisms/std-cms.orb +2644 -0
  65. package/dist/behaviors/exports/organisms/std-coding-academy.orb +1394 -0
  66. package/dist/behaviors/exports/organisms/std-crm.orb +3541 -0
  67. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +3134 -0
  68. package/dist/behaviors/exports/organisms/std-ecommerce.orb +3743 -0
  69. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +2385 -0
  70. package/dist/behaviors/exports/organisms/std-healthcare.orb +4679 -0
  71. package/dist/behaviors/exports/organisms/std-helpdesk.orb +2564 -0
  72. package/dist/behaviors/exports/organisms/std-hr-portal.orb +4029 -0
  73. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +2297 -0
  74. package/dist/behaviors/exports/organisms/std-lms.orb +2854 -0
  75. package/dist/behaviors/exports/organisms/std-logic-training.orb +598 -0
  76. package/dist/behaviors/exports/organisms/std-platformer-app.orb +1569 -0
  77. package/dist/behaviors/exports/organisms/std-project-manager.orb +3021 -0
  78. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +743 -0
  79. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +2380 -0
  80. package/dist/behaviors/exports/organisms/std-rpg-game.orb +2804 -0
  81. package/dist/behaviors/exports/organisms/std-social-feed.orb +1221 -0
  82. package/dist/behaviors/exports/organisms/std-stem-lab.orb +1210 -0
  83. package/dist/behaviors/exports/organisms/std-strategy-game.orb +1761 -0
  84. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +2217 -0
  85. package/dist/behaviors/exports-reader.d.ts +2 -0
  86. package/dist/behaviors/exports-reader.js +5 -3
  87. package/dist/behaviors/exports-reader.js.map +1 -1
  88. package/dist/behaviors/index.js +5 -3
  89. package/dist/behaviors/index.js.map +1 -1
  90. package/dist/exports/atoms/std-async.orb +420 -0
  91. package/dist/exports/atoms/std-browse.orb +173 -0
  92. package/dist/exports/atoms/std-cache-aside.orb +881 -0
  93. package/dist/exports/atoms/std-circuit-breaker.orb +501 -0
  94. package/dist/exports/atoms/std-collision.orb +616 -0
  95. package/dist/exports/atoms/std-combat-log.orb +145 -0
  96. package/dist/exports/atoms/std-combat.orb +410 -0
  97. package/dist/exports/atoms/std-confirmation.orb +282 -0
  98. package/dist/exports/atoms/std-dialogue-box.orb +238 -0
  99. package/dist/exports/atoms/std-display.orb +842 -0
  100. package/dist/exports/atoms/std-drawer.orb +316 -0
  101. package/dist/exports/atoms/std-filter.orb +442 -0
  102. package/dist/exports/atoms/std-game-audio.orb +113 -0
  103. package/dist/exports/atoms/std-game-canvas-2d.orb +135 -0
  104. package/dist/exports/atoms/std-game-canvas-3d.orb +224 -0
  105. package/dist/exports/atoms/std-game-hud.orb +151 -0
  106. package/dist/exports/atoms/std-game-menu.orb +211 -0
  107. package/dist/exports/atoms/std-game-over-screen.orb +195 -0
  108. package/dist/exports/atoms/std-gameflow.orb +318 -0
  109. package/dist/exports/atoms/std-input.orb +629 -0
  110. package/dist/exports/atoms/std-inventory-panel.orb +255 -0
  111. package/dist/exports/atoms/std-isometric-canvas.orb +631 -0
  112. package/dist/exports/atoms/std-loading.orb +511 -0
  113. package/dist/exports/atoms/std-modal.orb +270 -0
  114. package/dist/exports/atoms/std-movement.orb +1037 -0
  115. package/dist/exports/atoms/std-notification.orb +418 -0
  116. package/dist/exports/atoms/std-overworld.orb +483 -0
  117. package/dist/exports/atoms/std-pagination.orb +331 -0
  118. package/dist/exports/atoms/std-physics2d.orb +419 -0
  119. package/dist/exports/atoms/std-platformer-canvas.orb +257 -0
  120. package/dist/exports/atoms/std-quest.orb +980 -0
  121. package/dist/exports/atoms/std-rate-limiter.orb +638 -0
  122. package/dist/exports/atoms/std-score-board.orb +238 -0
  123. package/dist/exports/atoms/std-score.orb +466 -0
  124. package/dist/exports/atoms/std-search.orb +373 -0
  125. package/dist/exports/atoms/std-selection.orb +759 -0
  126. package/dist/exports/atoms/std-simulation-canvas.orb +183 -0
  127. package/dist/exports/atoms/std-sort.orb +578 -0
  128. package/dist/exports/atoms/std-sprite.orb +156 -0
  129. package/dist/exports/atoms/std-tabs.orb +274 -0
  130. package/dist/exports/atoms/std-timer.orb +1030 -0
  131. package/dist/exports/atoms/std-undo.orb +694 -0
  132. package/dist/exports/atoms/std-wizard.orb +666 -0
  133. package/dist/exports/molecules/std-builder-game.orb +183 -0
  134. package/dist/exports/molecules/std-cart.orb +591 -0
  135. package/dist/exports/molecules/std-classifier-game.orb +183 -0
  136. package/dist/exports/molecules/std-debugger-game.orb +183 -0
  137. package/dist/exports/molecules/std-detail.orb +589 -0
  138. package/dist/exports/molecules/std-event-handler-game.orb +183 -0
  139. package/dist/exports/molecules/std-geospatial.orb +649 -0
  140. package/dist/exports/molecules/std-inventory.orb +853 -0
  141. package/dist/exports/molecules/std-list.orb +954 -0
  142. package/dist/exports/molecules/std-messaging.orb +585 -0
  143. package/dist/exports/molecules/std-negotiator-game.orb +183 -0
  144. package/dist/exports/molecules/std-platformer-game.orb +496 -0
  145. package/dist/exports/molecules/std-puzzle-game.orb +527 -0
  146. package/dist/exports/molecules/std-sequencer-game.orb +183 -0
  147. package/dist/exports/molecules/std-simulator-game.orb +183 -0
  148. package/dist/exports/molecules/std-turn-based-battle.orb +443 -0
  149. package/dist/exports/organisms/std-api-gateway.orb +2296 -0
  150. package/dist/exports/organisms/std-arcade-game.orb +833 -0
  151. package/dist/exports/organisms/std-booking-system.orb +3977 -0
  152. package/dist/exports/organisms/std-cicd-pipeline.orb +2214 -0
  153. package/dist/exports/organisms/std-cms.orb +2644 -0
  154. package/dist/exports/organisms/std-coding-academy.orb +1394 -0
  155. package/dist/exports/organisms/std-crm.orb +3541 -0
  156. package/dist/exports/organisms/std-devops-dashboard.orb +3134 -0
  157. package/dist/exports/organisms/std-ecommerce.orb +3743 -0
  158. package/dist/exports/organisms/std-finance-tracker.orb +2385 -0
  159. package/dist/exports/organisms/std-healthcare.orb +4679 -0
  160. package/dist/exports/organisms/std-helpdesk.orb +2564 -0
  161. package/dist/exports/organisms/std-hr-portal.orb +4029 -0
  162. package/dist/exports/organisms/std-iot-dashboard.orb +2297 -0
  163. package/dist/exports/organisms/std-lms.orb +2854 -0
  164. package/dist/exports/organisms/std-logic-training.orb +598 -0
  165. package/dist/exports/organisms/std-platformer-app.orb +1569 -0
  166. package/dist/exports/organisms/std-project-manager.orb +3021 -0
  167. package/dist/exports/organisms/std-puzzle-app.orb +743 -0
  168. package/dist/exports/organisms/std-realtime-chat.orb +2380 -0
  169. package/dist/exports/organisms/std-rpg-game.orb +2804 -0
  170. package/dist/exports/organisms/std-social-feed.orb +1221 -0
  171. package/dist/exports/organisms/std-stem-lab.orb +1210 -0
  172. package/dist/exports/organisms/std-strategy-game.orb +1761 -0
  173. package/dist/exports/organisms/std-trading-dashboard.orb +2217 -0
  174. package/dist/index.js +5 -3
  175. package/dist/index.js.map +1 -1
  176. package/package.json +1 -1
@@ -0,0 +1,2854 @@
1
+ {
2
+ "name": "LMS",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "CourseOrbital",
7
+ "entity": {
8
+ "name": "Course",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "title",
18
+ "type": "string",
19
+ "default": ""
20
+ },
21
+ {
22
+ "name": "description",
23
+ "type": "string",
24
+ "default": ""
25
+ },
26
+ {
27
+ "name": "instructor",
28
+ "type": "string",
29
+ "default": ""
30
+ },
31
+ {
32
+ "name": "duration",
33
+ "type": "string",
34
+ "default": ""
35
+ },
36
+ {
37
+ "name": "level",
38
+ "type": "string",
39
+ "default": "Beginner"
40
+ }
41
+ ]
42
+ },
43
+ "traits": [
44
+ {
45
+ "name": "CourseBrowse",
46
+ "linkedEntity": "Course",
47
+ "category": "interaction",
48
+ "listens": [
49
+ {
50
+ "event": "COURSE_CREATED",
51
+ "triggers": "COURSE_CREATED"
52
+ },
53
+ {
54
+ "event": "COURSE_UPDATED",
55
+ "triggers": "COURSE_UPDATED"
56
+ }
57
+ ],
58
+ "stateMachine": {
59
+ "states": [
60
+ {
61
+ "name": "browsing",
62
+ "isInitial": true
63
+ },
64
+ {
65
+ "name": "deleting"
66
+ }
67
+ ],
68
+ "events": [
69
+ {
70
+ "key": "INIT",
71
+ "name": "Initialize"
72
+ },
73
+ {
74
+ "key": "CREATE",
75
+ "name": "CREATE"
76
+ },
77
+ {
78
+ "key": "VIEW",
79
+ "name": "VIEW",
80
+ "payload": [
81
+ {
82
+ "name": "id",
83
+ "type": "string",
84
+ "required": true
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "key": "EDIT",
90
+ "name": "EDIT",
91
+ "payload": [
92
+ {
93
+ "name": "id",
94
+ "type": "string",
95
+ "required": true
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "key": "DELETE",
101
+ "name": "DELETE",
102
+ "payload": [
103
+ {
104
+ "name": "id",
105
+ "type": "string",
106
+ "required": true
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "key": "COURSE_CREATED",
112
+ "name": "COURSE_CREATED",
113
+ "payload": [
114
+ {
115
+ "name": "data",
116
+ "type": "object",
117
+ "required": true
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "key": "COURSE_UPDATED",
123
+ "name": "COURSE_UPDATED",
124
+ "payload": [
125
+ {
126
+ "name": "data",
127
+ "type": "object",
128
+ "required": true
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "key": "CONFIRM_DELETE",
134
+ "name": "Confirm Delete"
135
+ },
136
+ {
137
+ "key": "CANCEL",
138
+ "name": "Cancel"
139
+ },
140
+ {
141
+ "key": "CLOSE",
142
+ "name": "Close"
143
+ }
144
+ ],
145
+ "transitions": [
146
+ {
147
+ "from": "browsing",
148
+ "to": "browsing",
149
+ "event": "INIT",
150
+ "effects": [
151
+ [
152
+ "fetch",
153
+ "Course"
154
+ ],
155
+ [
156
+ "render-ui",
157
+ "main",
158
+ {
159
+ "type": "stack",
160
+ "direction": "vertical",
161
+ "gap": "lg",
162
+ "children": [
163
+ {
164
+ "type": "stack",
165
+ "direction": "horizontal",
166
+ "gap": "md",
167
+ "justify": "space-between",
168
+ "children": [
169
+ {
170
+ "type": "stack",
171
+ "direction": "horizontal",
172
+ "gap": "sm",
173
+ "align": "center",
174
+ "children": [
175
+ {
176
+ "type": "icon",
177
+ "name": "book-open",
178
+ "size": "lg"
179
+ },
180
+ {
181
+ "type": "typography",
182
+ "content": "Courses",
183
+ "variant": "h2"
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "type": "stack",
189
+ "direction": "horizontal",
190
+ "gap": "sm",
191
+ "children": [
192
+ {
193
+ "type": "button",
194
+ "label": "Add Course",
195
+ "event": "CREATE",
196
+ "variant": "primary",
197
+ "icon": "plus"
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "type": "divider"
205
+ },
206
+ {
207
+ "type": "data-grid",
208
+ "entity": "Course",
209
+ "emptyIcon": "inbox",
210
+ "emptyTitle": "No courses yet",
211
+ "emptyDescription": "Create your first course to get started.",
212
+ "itemActions": [
213
+ {
214
+ "label": "View",
215
+ "event": "VIEW"
216
+ },
217
+ {
218
+ "label": "Edit",
219
+ "event": "EDIT"
220
+ },
221
+ {
222
+ "label": "Delete",
223
+ "event": "DELETE",
224
+ "variant": "danger"
225
+ }
226
+ ],
227
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
228
+ "children": [
229
+ {
230
+ "type": "stack",
231
+ "direction": "vertical",
232
+ "gap": "sm",
233
+ "children": [
234
+ {
235
+ "type": "stack",
236
+ "direction": "horizontal",
237
+ "justify": "space-between",
238
+ "align": "center",
239
+ "children": [
240
+ {
241
+ "type": "stack",
242
+ "direction": "horizontal",
243
+ "gap": "sm",
244
+ "align": "center",
245
+ "children": [
246
+ {
247
+ "type": "icon",
248
+ "name": "book-open",
249
+ "size": "sm"
250
+ },
251
+ {
252
+ "type": "typography",
253
+ "variant": "h4",
254
+ "content": "@entity.title"
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "type": "badge",
260
+ "label": "@entity.description"
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ "type": "typography",
266
+ "variant": "caption",
267
+ "color": "muted",
268
+ "content": "@entity.instructor"
269
+ }
270
+ ]
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ }
276
+ ]
277
+ ]
278
+ },
279
+ {
280
+ "from": "browsing",
281
+ "to": "browsing",
282
+ "event": "COURSE_CREATED",
283
+ "effects": [
284
+ [
285
+ "fetch",
286
+ "Course"
287
+ ]
288
+ ]
289
+ },
290
+ {
291
+ "from": "browsing",
292
+ "to": "browsing",
293
+ "event": "COURSE_UPDATED",
294
+ "effects": [
295
+ [
296
+ "fetch",
297
+ "Course"
298
+ ]
299
+ ]
300
+ },
301
+ {
302
+ "from": "browsing",
303
+ "to": "deleting",
304
+ "event": "DELETE",
305
+ "effects": [
306
+ [
307
+ "fetch",
308
+ "Course",
309
+ "@payload.id"
310
+ ],
311
+ [
312
+ "render-ui",
313
+ "modal",
314
+ {
315
+ "type": "stack",
316
+ "direction": "vertical",
317
+ "gap": "md",
318
+ "children": [
319
+ {
320
+ "type": "stack",
321
+ "direction": "horizontal",
322
+ "gap": "sm",
323
+ "children": [
324
+ {
325
+ "type": "icon",
326
+ "name": "trash-2",
327
+ "size": "md"
328
+ },
329
+ {
330
+ "type": "typography",
331
+ "content": "Delete Course",
332
+ "variant": "h3"
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "type": "divider"
338
+ },
339
+ {
340
+ "type": "typography",
341
+ "content": "Are you sure you want to delete this course?",
342
+ "variant": "body"
343
+ },
344
+ {
345
+ "type": "stack",
346
+ "direction": "horizontal",
347
+ "gap": "sm",
348
+ "justify": "end",
349
+ "children": [
350
+ {
351
+ "type": "button",
352
+ "label": "Cancel",
353
+ "event": "CANCEL",
354
+ "variant": "ghost"
355
+ },
356
+ {
357
+ "type": "button",
358
+ "label": "Delete",
359
+ "event": "CONFIRM_DELETE",
360
+ "variant": "danger",
361
+ "icon": "trash"
362
+ }
363
+ ]
364
+ }
365
+ ]
366
+ }
367
+ ]
368
+ ]
369
+ },
370
+ {
371
+ "from": "deleting",
372
+ "to": "browsing",
373
+ "event": "CONFIRM_DELETE",
374
+ "effects": [
375
+ [
376
+ "persist",
377
+ "delete",
378
+ "Course",
379
+ "@entity.id"
380
+ ],
381
+ [
382
+ "render-ui",
383
+ "modal",
384
+ null
385
+ ],
386
+ [
387
+ "fetch",
388
+ "Course"
389
+ ],
390
+ [
391
+ "notify",
392
+ "Course deleted successfully"
393
+ ]
394
+ ]
395
+ },
396
+ {
397
+ "from": "deleting",
398
+ "to": "browsing",
399
+ "event": "CANCEL",
400
+ "effects": [
401
+ [
402
+ "render-ui",
403
+ "modal",
404
+ null
405
+ ]
406
+ ]
407
+ },
408
+ {
409
+ "from": "deleting",
410
+ "to": "browsing",
411
+ "event": "CLOSE",
412
+ "effects": [
413
+ [
414
+ "render-ui",
415
+ "modal",
416
+ null
417
+ ]
418
+ ]
419
+ }
420
+ ]
421
+ },
422
+ "emits": [
423
+ {
424
+ "event": "ENROLL",
425
+ "description": "Enroll in a course",
426
+ "payload": [
427
+ {
428
+ "name": "id",
429
+ "type": "string",
430
+ "required": true
431
+ }
432
+ ],
433
+ "scope": "external"
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "name": "CourseCreate",
439
+ "linkedEntity": "Course",
440
+ "category": "interaction",
441
+ "emits": [
442
+ {
443
+ "event": "COURSE_CREATED"
444
+ }
445
+ ],
446
+ "stateMachine": {
447
+ "states": [
448
+ {
449
+ "name": "closed",
450
+ "isInitial": true
451
+ },
452
+ {
453
+ "name": "open"
454
+ }
455
+ ],
456
+ "events": [
457
+ {
458
+ "key": "INIT",
459
+ "name": "Initialize"
460
+ },
461
+ {
462
+ "key": "CREATE",
463
+ "name": "Open"
464
+ },
465
+ {
466
+ "key": "CLOSE",
467
+ "name": "Close"
468
+ },
469
+ {
470
+ "key": "SAVE",
471
+ "name": "Save",
472
+ "payload": [
473
+ {
474
+ "name": "data",
475
+ "type": "object",
476
+ "required": true
477
+ }
478
+ ]
479
+ }
480
+ ],
481
+ "transitions": [
482
+ {
483
+ "from": "closed",
484
+ "to": "closed",
485
+ "event": "INIT",
486
+ "effects": [
487
+ [
488
+ "fetch",
489
+ "Course"
490
+ ]
491
+ ]
492
+ },
493
+ {
494
+ "from": "closed",
495
+ "to": "open",
496
+ "event": "CREATE",
497
+ "effects": [
498
+ [
499
+ "fetch",
500
+ "Course"
501
+ ],
502
+ [
503
+ "render-ui",
504
+ "modal",
505
+ {
506
+ "type": "stack",
507
+ "direction": "vertical",
508
+ "gap": "md",
509
+ "children": [
510
+ {
511
+ "type": "stack",
512
+ "direction": "horizontal",
513
+ "gap": "sm",
514
+ "children": [
515
+ {
516
+ "type": "icon",
517
+ "name": "plus-circle",
518
+ "size": "md"
519
+ },
520
+ {
521
+ "type": "typography",
522
+ "content": "New Course",
523
+ "variant": "h3"
524
+ }
525
+ ]
526
+ },
527
+ {
528
+ "type": "divider"
529
+ },
530
+ {
531
+ "type": "form-section",
532
+ "entity": "Course",
533
+ "mode": "create",
534
+ "submitEvent": "SAVE",
535
+ "cancelEvent": "CLOSE",
536
+ "fields": [
537
+ "title",
538
+ "description",
539
+ "instructor",
540
+ "duration",
541
+ "level"
542
+ ]
543
+ }
544
+ ]
545
+ }
546
+ ]
547
+ ]
548
+ },
549
+ {
550
+ "from": "open",
551
+ "to": "closed",
552
+ "event": "CLOSE",
553
+ "effects": [
554
+ [
555
+ "render-ui",
556
+ "modal",
557
+ null
558
+ ]
559
+ ]
560
+ },
561
+ {
562
+ "from": "open",
563
+ "to": "closed",
564
+ "event": "SAVE",
565
+ "effects": [
566
+ [
567
+ "persist",
568
+ "create",
569
+ "Course",
570
+ "@payload.data"
571
+ ],
572
+ [
573
+ "fetch",
574
+ "Course"
575
+ ],
576
+ [
577
+ "render-ui",
578
+ "modal",
579
+ null
580
+ ],
581
+ [
582
+ "emit",
583
+ "COURSE_CREATED"
584
+ ],
585
+ [
586
+ "notify",
587
+ "Course created successfully"
588
+ ]
589
+ ]
590
+ }
591
+ ]
592
+ }
593
+ },
594
+ {
595
+ "name": "CourseEdit",
596
+ "linkedEntity": "Course",
597
+ "category": "interaction",
598
+ "emits": [
599
+ {
600
+ "event": "COURSE_UPDATED"
601
+ }
602
+ ],
603
+ "stateMachine": {
604
+ "states": [
605
+ {
606
+ "name": "closed",
607
+ "isInitial": true
608
+ },
609
+ {
610
+ "name": "open"
611
+ }
612
+ ],
613
+ "events": [
614
+ {
615
+ "key": "INIT",
616
+ "name": "Initialize"
617
+ },
618
+ {
619
+ "key": "EDIT",
620
+ "name": "Open",
621
+ "payload": [
622
+ {
623
+ "name": "id",
624
+ "type": "string",
625
+ "required": true
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ "key": "CLOSE",
631
+ "name": "Close"
632
+ },
633
+ {
634
+ "key": "SAVE",
635
+ "name": "Save",
636
+ "payload": [
637
+ {
638
+ "name": "data",
639
+ "type": "object",
640
+ "required": true
641
+ }
642
+ ]
643
+ }
644
+ ],
645
+ "transitions": [
646
+ {
647
+ "from": "closed",
648
+ "to": "closed",
649
+ "event": "INIT",
650
+ "effects": [
651
+ [
652
+ "fetch",
653
+ "Course"
654
+ ]
655
+ ]
656
+ },
657
+ {
658
+ "from": "closed",
659
+ "to": "open",
660
+ "event": "EDIT",
661
+ "effects": [
662
+ [
663
+ "fetch",
664
+ "Course",
665
+ "@payload.id"
666
+ ],
667
+ [
668
+ "render-ui",
669
+ "modal",
670
+ {
671
+ "type": "stack",
672
+ "direction": "vertical",
673
+ "gap": "md",
674
+ "children": [
675
+ {
676
+ "type": "stack",
677
+ "direction": "horizontal",
678
+ "gap": "sm",
679
+ "children": [
680
+ {
681
+ "type": "icon",
682
+ "name": "edit",
683
+ "size": "md"
684
+ },
685
+ {
686
+ "type": "typography",
687
+ "content": "Edit Course",
688
+ "variant": "h3"
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "type": "divider"
694
+ },
695
+ {
696
+ "type": "form-section",
697
+ "entity": "Course",
698
+ "mode": "edit",
699
+ "submitEvent": "SAVE",
700
+ "cancelEvent": "CLOSE",
701
+ "fields": [
702
+ "title",
703
+ "description",
704
+ "instructor",
705
+ "duration",
706
+ "level"
707
+ ]
708
+ }
709
+ ]
710
+ }
711
+ ]
712
+ ]
713
+ },
714
+ {
715
+ "from": "open",
716
+ "to": "closed",
717
+ "event": "CLOSE",
718
+ "effects": [
719
+ [
720
+ "render-ui",
721
+ "modal",
722
+ null
723
+ ]
724
+ ]
725
+ },
726
+ {
727
+ "from": "open",
728
+ "to": "closed",
729
+ "event": "SAVE",
730
+ "effects": [
731
+ [
732
+ "persist",
733
+ "update",
734
+ "Course",
735
+ "@payload.data"
736
+ ],
737
+ [
738
+ "fetch",
739
+ "Course"
740
+ ],
741
+ [
742
+ "render-ui",
743
+ "modal",
744
+ null
745
+ ],
746
+ [
747
+ "emit",
748
+ "COURSE_UPDATED"
749
+ ],
750
+ [
751
+ "notify",
752
+ "Course updated successfully"
753
+ ]
754
+ ]
755
+ }
756
+ ]
757
+ }
758
+ },
759
+ {
760
+ "name": "CourseView",
761
+ "linkedEntity": "Course",
762
+ "category": "interaction",
763
+ "stateMachine": {
764
+ "states": [
765
+ {
766
+ "name": "closed",
767
+ "isInitial": true
768
+ },
769
+ {
770
+ "name": "open"
771
+ }
772
+ ],
773
+ "events": [
774
+ {
775
+ "key": "INIT",
776
+ "name": "Initialize"
777
+ },
778
+ {
779
+ "key": "VIEW",
780
+ "name": "Open",
781
+ "payload": [
782
+ {
783
+ "name": "id",
784
+ "type": "string",
785
+ "required": true
786
+ }
787
+ ]
788
+ },
789
+ {
790
+ "key": "CLOSE",
791
+ "name": "Close"
792
+ }
793
+ ],
794
+ "transitions": [
795
+ {
796
+ "from": "closed",
797
+ "to": "closed",
798
+ "event": "INIT",
799
+ "effects": [
800
+ [
801
+ "fetch",
802
+ "Course"
803
+ ]
804
+ ]
805
+ },
806
+ {
807
+ "from": "closed",
808
+ "to": "open",
809
+ "event": "VIEW",
810
+ "effects": [
811
+ [
812
+ "fetch",
813
+ "Course",
814
+ "@payload.id"
815
+ ],
816
+ [
817
+ "render-ui",
818
+ "modal",
819
+ {
820
+ "type": "stack",
821
+ "direction": "vertical",
822
+ "gap": "md",
823
+ "children": [
824
+ {
825
+ "type": "stack",
826
+ "direction": "horizontal",
827
+ "gap": "sm",
828
+ "align": "center",
829
+ "children": [
830
+ {
831
+ "type": "icon",
832
+ "name": "eye",
833
+ "size": "md"
834
+ },
835
+ {
836
+ "type": "typography",
837
+ "variant": "h3",
838
+ "content": "@entity.title"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "type": "divider"
844
+ },
845
+ {
846
+ "type": "stack",
847
+ "direction": "horizontal",
848
+ "gap": "md",
849
+ "children": [
850
+ {
851
+ "type": "typography",
852
+ "variant": "caption",
853
+ "content": "Title"
854
+ },
855
+ {
856
+ "type": "typography",
857
+ "variant": "body",
858
+ "content": "@entity.title"
859
+ }
860
+ ]
861
+ },
862
+ {
863
+ "type": "stack",
864
+ "direction": "horizontal",
865
+ "gap": "md",
866
+ "children": [
867
+ {
868
+ "type": "typography",
869
+ "variant": "caption",
870
+ "content": "Description"
871
+ },
872
+ {
873
+ "type": "typography",
874
+ "variant": "body",
875
+ "content": "@entity.description"
876
+ }
877
+ ]
878
+ },
879
+ {
880
+ "type": "stack",
881
+ "direction": "horizontal",
882
+ "gap": "md",
883
+ "children": [
884
+ {
885
+ "type": "typography",
886
+ "variant": "caption",
887
+ "content": "Instructor"
888
+ },
889
+ {
890
+ "type": "typography",
891
+ "variant": "body",
892
+ "content": "@entity.instructor"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "type": "stack",
898
+ "direction": "horizontal",
899
+ "gap": "md",
900
+ "children": [
901
+ {
902
+ "type": "typography",
903
+ "variant": "caption",
904
+ "content": "Duration"
905
+ },
906
+ {
907
+ "type": "typography",
908
+ "variant": "body",
909
+ "content": "@entity.duration"
910
+ }
911
+ ]
912
+ },
913
+ {
914
+ "type": "stack",
915
+ "direction": "horizontal",
916
+ "gap": "md",
917
+ "children": [
918
+ {
919
+ "type": "typography",
920
+ "variant": "caption",
921
+ "content": "Level"
922
+ },
923
+ {
924
+ "type": "typography",
925
+ "variant": "body",
926
+ "content": "@entity.level"
927
+ }
928
+ ]
929
+ },
930
+ {
931
+ "type": "divider"
932
+ },
933
+ {
934
+ "type": "stack",
935
+ "direction": "horizontal",
936
+ "gap": "sm",
937
+ "justify": "end",
938
+ "children": [
939
+ {
940
+ "type": "button",
941
+ "label": "Edit",
942
+ "event": "EDIT",
943
+ "variant": "primary",
944
+ "icon": "edit"
945
+ },
946
+ {
947
+ "type": "button",
948
+ "label": "Close",
949
+ "event": "CLOSE",
950
+ "variant": "ghost"
951
+ }
952
+ ]
953
+ }
954
+ ]
955
+ }
956
+ ]
957
+ ]
958
+ },
959
+ {
960
+ "from": "open",
961
+ "to": "closed",
962
+ "event": "CLOSE",
963
+ "effects": [
964
+ [
965
+ "render-ui",
966
+ "modal",
967
+ null
968
+ ]
969
+ ]
970
+ }
971
+ ]
972
+ }
973
+ }
974
+ ],
975
+ "pages": [
976
+ {
977
+ "name": "CoursesPage",
978
+ "path": "/courses",
979
+ "isInitial": true,
980
+ "traits": [
981
+ {
982
+ "ref": "CourseBrowse"
983
+ },
984
+ {
985
+ "ref": "CourseCreate"
986
+ },
987
+ {
988
+ "ref": "CourseEdit"
989
+ },
990
+ {
991
+ "ref": "CourseView"
992
+ }
993
+ ]
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "name": "EnrollmentOrbital",
999
+ "entity": {
1000
+ "name": "Enrollment",
1001
+ "persistence": "runtime",
1002
+ "fields": [
1003
+ {
1004
+ "name": "id",
1005
+ "type": "string",
1006
+ "required": true
1007
+ },
1008
+ {
1009
+ "name": "studentName",
1010
+ "type": "string",
1011
+ "default": ""
1012
+ },
1013
+ {
1014
+ "name": "email",
1015
+ "type": "string",
1016
+ "default": ""
1017
+ },
1018
+ {
1019
+ "name": "courseId",
1020
+ "type": "string",
1021
+ "default": ""
1022
+ },
1023
+ {
1024
+ "name": "enrolledAt",
1025
+ "type": "string",
1026
+ "default": ""
1027
+ },
1028
+ {
1029
+ "name": "status",
1030
+ "type": "string",
1031
+ "default": "pending"
1032
+ }
1033
+ ]
1034
+ },
1035
+ "traits": [
1036
+ {
1037
+ "name": "EnrollmentWizard",
1038
+ "linkedEntity": "Enrollment",
1039
+ "category": "interaction",
1040
+ "stateMachine": {
1041
+ "states": [
1042
+ {
1043
+ "name": "step1",
1044
+ "isInitial": true
1045
+ },
1046
+ {
1047
+ "name": "step2"
1048
+ },
1049
+ {
1050
+ "name": "review"
1051
+ },
1052
+ {
1053
+ "name": "complete"
1054
+ }
1055
+ ],
1056
+ "events": [
1057
+ {
1058
+ "key": "INIT",
1059
+ "name": "Initialize"
1060
+ },
1061
+ {
1062
+ "key": "NEXT",
1063
+ "name": "Next Step",
1064
+ "payload": [
1065
+ {
1066
+ "name": "data",
1067
+ "type": "object",
1068
+ "required": true
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "key": "PREV",
1074
+ "name": "Previous Step"
1075
+ },
1076
+ {
1077
+ "key": "COMPLETE",
1078
+ "name": "Complete Wizard",
1079
+ "payload": [
1080
+ {
1081
+ "name": "data",
1082
+ "type": "object",
1083
+ "required": true
1084
+ }
1085
+ ]
1086
+ },
1087
+ {
1088
+ "key": "RESTART",
1089
+ "name": "Restart Wizard"
1090
+ }
1091
+ ],
1092
+ "transitions": [
1093
+ {
1094
+ "from": "step1",
1095
+ "to": "step1",
1096
+ "event": "INIT",
1097
+ "effects": [
1098
+ [
1099
+ "fetch",
1100
+ "Enrollment"
1101
+ ],
1102
+ [
1103
+ "render-ui",
1104
+ "main",
1105
+ {
1106
+ "type": "stack",
1107
+ "direction": "vertical",
1108
+ "gap": "lg",
1109
+ "children": [
1110
+ {
1111
+ "type": "stack",
1112
+ "direction": "horizontal",
1113
+ "gap": "sm",
1114
+ "align": "center",
1115
+ "children": [
1116
+ {
1117
+ "type": "icon",
1118
+ "name": "user-plus",
1119
+ "size": "lg"
1120
+ },
1121
+ {
1122
+ "type": "typography",
1123
+ "content": "Course Enrollment",
1124
+ "variant": "h2"
1125
+ }
1126
+ ]
1127
+ },
1128
+ {
1129
+ "type": "badge",
1130
+ "label": "Step 1 of 2"
1131
+ },
1132
+ {
1133
+ "type": "wizard-progress",
1134
+ "steps": [
1135
+ "Student Info",
1136
+ "Course Selection"
1137
+ ],
1138
+ "currentStep": 0
1139
+ },
1140
+ {
1141
+ "type": "divider"
1142
+ },
1143
+ {
1144
+ "type": "typography",
1145
+ "content": "Student Info",
1146
+ "variant": "h3"
1147
+ },
1148
+ {
1149
+ "type": "form-section",
1150
+ "entity": "Enrollment",
1151
+ "mode": "create",
1152
+ "submitEvent": "NEXT",
1153
+ "cancelEvent": "INIT",
1154
+ "fields": [
1155
+ "studentName",
1156
+ "email"
1157
+ ]
1158
+ },
1159
+ {
1160
+ "type": "stack",
1161
+ "direction": "horizontal",
1162
+ "gap": "sm",
1163
+ "justify": "end",
1164
+ "children": [
1165
+ {
1166
+ "type": "button",
1167
+ "label": "Next",
1168
+ "event": "NEXT",
1169
+ "variant": "primary",
1170
+ "icon": "arrow-right"
1171
+ }
1172
+ ]
1173
+ }
1174
+ ]
1175
+ }
1176
+ ]
1177
+ ]
1178
+ },
1179
+ {
1180
+ "from": "step1",
1181
+ "to": "step2",
1182
+ "event": "NEXT",
1183
+ "effects": [
1184
+ [
1185
+ "fetch",
1186
+ "Enrollment"
1187
+ ],
1188
+ [
1189
+ "render-ui",
1190
+ "main",
1191
+ {
1192
+ "type": "stack",
1193
+ "direction": "vertical",
1194
+ "gap": "lg",
1195
+ "children": [
1196
+ {
1197
+ "type": "stack",
1198
+ "direction": "horizontal",
1199
+ "gap": "sm",
1200
+ "align": "center",
1201
+ "children": [
1202
+ {
1203
+ "type": "icon",
1204
+ "name": "user-plus",
1205
+ "size": "lg"
1206
+ },
1207
+ {
1208
+ "type": "typography",
1209
+ "content": "Course Enrollment",
1210
+ "variant": "h2"
1211
+ }
1212
+ ]
1213
+ },
1214
+ {
1215
+ "type": "badge",
1216
+ "label": "Step 2 of 2"
1217
+ },
1218
+ {
1219
+ "type": "wizard-progress",
1220
+ "steps": [
1221
+ "Student Info",
1222
+ "Course Selection"
1223
+ ],
1224
+ "currentStep": 1
1225
+ },
1226
+ {
1227
+ "type": "divider"
1228
+ },
1229
+ {
1230
+ "type": "typography",
1231
+ "content": "Course Selection",
1232
+ "variant": "h3"
1233
+ },
1234
+ {
1235
+ "type": "form-section",
1236
+ "entity": "Enrollment",
1237
+ "mode": "create",
1238
+ "submitEvent": "NEXT",
1239
+ "cancelEvent": "PREV",
1240
+ "fields": [
1241
+ "courseId"
1242
+ ]
1243
+ },
1244
+ {
1245
+ "type": "stack",
1246
+ "direction": "horizontal",
1247
+ "gap": "sm",
1248
+ "justify": "end",
1249
+ "children": [
1250
+ {
1251
+ "type": "button",
1252
+ "label": "Back",
1253
+ "event": "PREV",
1254
+ "variant": "ghost",
1255
+ "icon": "arrow-left"
1256
+ },
1257
+ {
1258
+ "type": "button",
1259
+ "label": "Next",
1260
+ "event": "NEXT",
1261
+ "variant": "primary",
1262
+ "icon": "arrow-right"
1263
+ }
1264
+ ]
1265
+ }
1266
+ ]
1267
+ }
1268
+ ]
1269
+ ]
1270
+ },
1271
+ {
1272
+ "from": "step2",
1273
+ "to": "review",
1274
+ "event": "NEXT",
1275
+ "effects": [
1276
+ [
1277
+ "fetch",
1278
+ "Enrollment"
1279
+ ],
1280
+ [
1281
+ "render-ui",
1282
+ "main",
1283
+ {
1284
+ "type": "stack",
1285
+ "direction": "vertical",
1286
+ "gap": "lg",
1287
+ "children": [
1288
+ {
1289
+ "type": "stack",
1290
+ "direction": "horizontal",
1291
+ "gap": "sm",
1292
+ "align": "center",
1293
+ "children": [
1294
+ {
1295
+ "type": "icon",
1296
+ "name": "user-plus",
1297
+ "size": "lg"
1298
+ },
1299
+ {
1300
+ "type": "typography",
1301
+ "content": "Course Enrollment",
1302
+ "variant": "h2"
1303
+ }
1304
+ ]
1305
+ },
1306
+ {
1307
+ "type": "badge",
1308
+ "label": "Review"
1309
+ },
1310
+ {
1311
+ "type": "wizard-progress",
1312
+ "steps": [
1313
+ "Student Info",
1314
+ "Course Selection"
1315
+ ],
1316
+ "currentStep": 2
1317
+ },
1318
+ {
1319
+ "type": "divider"
1320
+ },
1321
+ {
1322
+ "type": "data-list",
1323
+ "entity": "Enrollment",
1324
+ "children": [
1325
+ {
1326
+ "type": "stack",
1327
+ "direction": "vertical",
1328
+ "gap": "sm",
1329
+ "children": [
1330
+ {
1331
+ "type": "stack",
1332
+ "direction": "horizontal",
1333
+ "gap": "md",
1334
+ "justify": "space-between",
1335
+ "children": [
1336
+ {
1337
+ "type": "typography",
1338
+ "variant": "caption",
1339
+ "content": "StudentName"
1340
+ },
1341
+ {
1342
+ "type": "typography",
1343
+ "variant": "body",
1344
+ "content": "@entity.studentName"
1345
+ }
1346
+ ]
1347
+ },
1348
+ {
1349
+ "type": "stack",
1350
+ "direction": "horizontal",
1351
+ "gap": "md",
1352
+ "justify": "space-between",
1353
+ "children": [
1354
+ {
1355
+ "type": "typography",
1356
+ "variant": "caption",
1357
+ "content": "Email"
1358
+ },
1359
+ {
1360
+ "type": "typography",
1361
+ "variant": "body",
1362
+ "content": "@entity.email"
1363
+ }
1364
+ ]
1365
+ },
1366
+ {
1367
+ "type": "stack",
1368
+ "direction": "horizontal",
1369
+ "gap": "md",
1370
+ "justify": "space-between",
1371
+ "children": [
1372
+ {
1373
+ "type": "typography",
1374
+ "variant": "caption",
1375
+ "content": "CourseId"
1376
+ },
1377
+ {
1378
+ "type": "typography",
1379
+ "variant": "body",
1380
+ "content": "@entity.courseId"
1381
+ }
1382
+ ]
1383
+ },
1384
+ {
1385
+ "type": "stack",
1386
+ "direction": "horizontal",
1387
+ "gap": "md",
1388
+ "justify": "space-between",
1389
+ "children": [
1390
+ {
1391
+ "type": "typography",
1392
+ "variant": "caption",
1393
+ "content": "EnrolledAt"
1394
+ },
1395
+ {
1396
+ "type": "typography",
1397
+ "variant": "body",
1398
+ "content": "@entity.enrolledAt"
1399
+ }
1400
+ ]
1401
+ },
1402
+ {
1403
+ "type": "stack",
1404
+ "direction": "horizontal",
1405
+ "gap": "md",
1406
+ "justify": "space-between",
1407
+ "children": [
1408
+ {
1409
+ "type": "typography",
1410
+ "variant": "caption",
1411
+ "content": "Status"
1412
+ },
1413
+ {
1414
+ "type": "typography",
1415
+ "variant": "body",
1416
+ "content": "@entity.status"
1417
+ }
1418
+ ]
1419
+ }
1420
+ ]
1421
+ }
1422
+ ]
1423
+ },
1424
+ {
1425
+ "type": "stack",
1426
+ "direction": "horizontal",
1427
+ "gap": "sm",
1428
+ "justify": "end",
1429
+ "children": [
1430
+ {
1431
+ "type": "button",
1432
+ "label": "Back",
1433
+ "event": "PREV",
1434
+ "variant": "ghost",
1435
+ "icon": "arrow-left"
1436
+ },
1437
+ {
1438
+ "type": "button",
1439
+ "label": "Complete",
1440
+ "event": "COMPLETE",
1441
+ "variant": "primary",
1442
+ "icon": "check"
1443
+ }
1444
+ ]
1445
+ }
1446
+ ]
1447
+ }
1448
+ ]
1449
+ ]
1450
+ },
1451
+ {
1452
+ "from": "step2",
1453
+ "to": "step1",
1454
+ "event": "PREV",
1455
+ "effects": [
1456
+ [
1457
+ "fetch",
1458
+ "Enrollment"
1459
+ ],
1460
+ [
1461
+ "render-ui",
1462
+ "main",
1463
+ {
1464
+ "type": "stack",
1465
+ "direction": "vertical",
1466
+ "gap": "lg",
1467
+ "children": [
1468
+ {
1469
+ "type": "stack",
1470
+ "direction": "horizontal",
1471
+ "gap": "sm",
1472
+ "align": "center",
1473
+ "children": [
1474
+ {
1475
+ "type": "icon",
1476
+ "name": "user-plus",
1477
+ "size": "lg"
1478
+ },
1479
+ {
1480
+ "type": "typography",
1481
+ "content": "Course Enrollment",
1482
+ "variant": "h2"
1483
+ }
1484
+ ]
1485
+ },
1486
+ {
1487
+ "type": "badge",
1488
+ "label": "Step 1 of 2"
1489
+ },
1490
+ {
1491
+ "type": "wizard-progress",
1492
+ "steps": [
1493
+ "Student Info",
1494
+ "Course Selection"
1495
+ ],
1496
+ "currentStep": 0
1497
+ },
1498
+ {
1499
+ "type": "divider"
1500
+ },
1501
+ {
1502
+ "type": "typography",
1503
+ "content": "Student Info",
1504
+ "variant": "h3"
1505
+ },
1506
+ {
1507
+ "type": "form-section",
1508
+ "entity": "Enrollment",
1509
+ "mode": "create",
1510
+ "submitEvent": "NEXT",
1511
+ "cancelEvent": "INIT",
1512
+ "fields": [
1513
+ "studentName",
1514
+ "email"
1515
+ ]
1516
+ },
1517
+ {
1518
+ "type": "stack",
1519
+ "direction": "horizontal",
1520
+ "gap": "sm",
1521
+ "justify": "end",
1522
+ "children": [
1523
+ {
1524
+ "type": "button",
1525
+ "label": "Next",
1526
+ "event": "NEXT",
1527
+ "variant": "primary",
1528
+ "icon": "arrow-right"
1529
+ }
1530
+ ]
1531
+ }
1532
+ ]
1533
+ }
1534
+ ]
1535
+ ]
1536
+ },
1537
+ {
1538
+ "from": "review",
1539
+ "to": "step2",
1540
+ "event": "PREV",
1541
+ "effects": [
1542
+ [
1543
+ "fetch",
1544
+ "Enrollment"
1545
+ ],
1546
+ [
1547
+ "render-ui",
1548
+ "main",
1549
+ {
1550
+ "type": "stack",
1551
+ "direction": "vertical",
1552
+ "gap": "lg",
1553
+ "children": [
1554
+ {
1555
+ "type": "stack",
1556
+ "direction": "horizontal",
1557
+ "gap": "sm",
1558
+ "align": "center",
1559
+ "children": [
1560
+ {
1561
+ "type": "icon",
1562
+ "name": "user-plus",
1563
+ "size": "lg"
1564
+ },
1565
+ {
1566
+ "type": "typography",
1567
+ "content": "Course Enrollment",
1568
+ "variant": "h2"
1569
+ }
1570
+ ]
1571
+ },
1572
+ {
1573
+ "type": "badge",
1574
+ "label": "Step 2 of 2"
1575
+ },
1576
+ {
1577
+ "type": "wizard-progress",
1578
+ "steps": [
1579
+ "Student Info",
1580
+ "Course Selection"
1581
+ ],
1582
+ "currentStep": 1
1583
+ },
1584
+ {
1585
+ "type": "divider"
1586
+ },
1587
+ {
1588
+ "type": "typography",
1589
+ "content": "Course Selection",
1590
+ "variant": "h3"
1591
+ },
1592
+ {
1593
+ "type": "form-section",
1594
+ "entity": "Enrollment",
1595
+ "mode": "create",
1596
+ "submitEvent": "NEXT",
1597
+ "cancelEvent": "PREV",
1598
+ "fields": [
1599
+ "courseId"
1600
+ ]
1601
+ },
1602
+ {
1603
+ "type": "stack",
1604
+ "direction": "horizontal",
1605
+ "gap": "sm",
1606
+ "justify": "end",
1607
+ "children": [
1608
+ {
1609
+ "type": "button",
1610
+ "label": "Back",
1611
+ "event": "PREV",
1612
+ "variant": "ghost",
1613
+ "icon": "arrow-left"
1614
+ },
1615
+ {
1616
+ "type": "button",
1617
+ "label": "Next",
1618
+ "event": "NEXT",
1619
+ "variant": "primary",
1620
+ "icon": "arrow-right"
1621
+ }
1622
+ ]
1623
+ }
1624
+ ]
1625
+ }
1626
+ ]
1627
+ ]
1628
+ },
1629
+ {
1630
+ "from": "review",
1631
+ "to": "complete",
1632
+ "event": "COMPLETE",
1633
+ "effects": [
1634
+ [
1635
+ "persist",
1636
+ "create",
1637
+ "Enrollment",
1638
+ "@payload.data"
1639
+ ],
1640
+ [
1641
+ "notify",
1642
+ "success",
1643
+ "Enrollment created successfully"
1644
+ ],
1645
+ [
1646
+ "render-ui",
1647
+ "main",
1648
+ {
1649
+ "type": "stack",
1650
+ "direction": "vertical",
1651
+ "gap": "lg",
1652
+ "align": "center",
1653
+ "children": [
1654
+ {
1655
+ "type": "icon",
1656
+ "name": "check-circle",
1657
+ "size": "lg"
1658
+ },
1659
+ {
1660
+ "type": "typography",
1661
+ "content": "Enrolled!",
1662
+ "variant": "h2"
1663
+ },
1664
+ {
1665
+ "type": "typography",
1666
+ "content": "You have been successfully enrolled in the course.",
1667
+ "variant": "body"
1668
+ },
1669
+ {
1670
+ "type": "button",
1671
+ "label": "Start New",
1672
+ "event": "RESTART",
1673
+ "variant": "primary",
1674
+ "icon": "refresh-cw"
1675
+ }
1676
+ ]
1677
+ }
1678
+ ]
1679
+ ]
1680
+ },
1681
+ {
1682
+ "from": "complete",
1683
+ "to": "step1",
1684
+ "event": "RESTART",
1685
+ "effects": [
1686
+ [
1687
+ "fetch",
1688
+ "Enrollment"
1689
+ ],
1690
+ [
1691
+ "render-ui",
1692
+ "main",
1693
+ {
1694
+ "type": "stack",
1695
+ "direction": "vertical",
1696
+ "gap": "lg",
1697
+ "children": [
1698
+ {
1699
+ "type": "stack",
1700
+ "direction": "horizontal",
1701
+ "gap": "sm",
1702
+ "align": "center",
1703
+ "children": [
1704
+ {
1705
+ "type": "icon",
1706
+ "name": "user-plus",
1707
+ "size": "lg"
1708
+ },
1709
+ {
1710
+ "type": "typography",
1711
+ "content": "Course Enrollment",
1712
+ "variant": "h2"
1713
+ }
1714
+ ]
1715
+ },
1716
+ {
1717
+ "type": "badge",
1718
+ "label": "Step 1 of 2"
1719
+ },
1720
+ {
1721
+ "type": "wizard-progress",
1722
+ "steps": [
1723
+ "Student Info",
1724
+ "Course Selection"
1725
+ ],
1726
+ "currentStep": 0
1727
+ },
1728
+ {
1729
+ "type": "divider"
1730
+ },
1731
+ {
1732
+ "type": "typography",
1733
+ "content": "Student Info",
1734
+ "variant": "h3"
1735
+ },
1736
+ {
1737
+ "type": "form-section",
1738
+ "entity": "Enrollment",
1739
+ "mode": "create",
1740
+ "submitEvent": "NEXT",
1741
+ "cancelEvent": "INIT",
1742
+ "fields": [
1743
+ "studentName",
1744
+ "email"
1745
+ ]
1746
+ },
1747
+ {
1748
+ "type": "stack",
1749
+ "direction": "horizontal",
1750
+ "gap": "sm",
1751
+ "justify": "end",
1752
+ "children": [
1753
+ {
1754
+ "type": "button",
1755
+ "label": "Next",
1756
+ "event": "NEXT",
1757
+ "variant": "primary",
1758
+ "icon": "arrow-right"
1759
+ }
1760
+ ]
1761
+ }
1762
+ ]
1763
+ }
1764
+ ]
1765
+ ]
1766
+ },
1767
+ {
1768
+ "from": "complete",
1769
+ "to": "step1",
1770
+ "event": "INIT",
1771
+ "effects": [
1772
+ [
1773
+ "fetch",
1774
+ "Enrollment"
1775
+ ],
1776
+ [
1777
+ "render-ui",
1778
+ "main",
1779
+ {
1780
+ "type": "stack",
1781
+ "direction": "vertical",
1782
+ "gap": "lg",
1783
+ "children": [
1784
+ {
1785
+ "type": "stack",
1786
+ "direction": "horizontal",
1787
+ "gap": "sm",
1788
+ "align": "center",
1789
+ "children": [
1790
+ {
1791
+ "type": "icon",
1792
+ "name": "user-plus",
1793
+ "size": "lg"
1794
+ },
1795
+ {
1796
+ "type": "typography",
1797
+ "content": "Course Enrollment",
1798
+ "variant": "h2"
1799
+ }
1800
+ ]
1801
+ },
1802
+ {
1803
+ "type": "badge",
1804
+ "label": "Step 1 of 2"
1805
+ },
1806
+ {
1807
+ "type": "wizard-progress",
1808
+ "steps": [
1809
+ "Student Info",
1810
+ "Course Selection"
1811
+ ],
1812
+ "currentStep": 0
1813
+ },
1814
+ {
1815
+ "type": "divider"
1816
+ },
1817
+ {
1818
+ "type": "typography",
1819
+ "content": "Student Info",
1820
+ "variant": "h3"
1821
+ },
1822
+ {
1823
+ "type": "form-section",
1824
+ "entity": "Enrollment",
1825
+ "mode": "create",
1826
+ "submitEvent": "NEXT",
1827
+ "cancelEvent": "INIT",
1828
+ "fields": [
1829
+ "studentName",
1830
+ "email"
1831
+ ]
1832
+ },
1833
+ {
1834
+ "type": "stack",
1835
+ "direction": "horizontal",
1836
+ "gap": "sm",
1837
+ "justify": "end",
1838
+ "children": [
1839
+ {
1840
+ "type": "button",
1841
+ "label": "Next",
1842
+ "event": "NEXT",
1843
+ "variant": "primary",
1844
+ "icon": "arrow-right"
1845
+ }
1846
+ ]
1847
+ }
1848
+ ]
1849
+ }
1850
+ ]
1851
+ ]
1852
+ }
1853
+ ]
1854
+ },
1855
+ "listens": [
1856
+ {
1857
+ "event": "ENROLL",
1858
+ "triggers": "INIT",
1859
+ "scope": "external"
1860
+ }
1861
+ ],
1862
+ "emits": [
1863
+ {
1864
+ "event": "COMPLETE_LESSON",
1865
+ "description": "Lesson completed, update progress",
1866
+ "payload": [
1867
+ {
1868
+ "name": "id",
1869
+ "type": "string",
1870
+ "required": true
1871
+ }
1872
+ ],
1873
+ "scope": "external"
1874
+ }
1875
+ ]
1876
+ }
1877
+ ],
1878
+ "pages": [
1879
+ {
1880
+ "name": "EnrollPage",
1881
+ "path": "/enroll",
1882
+ "traits": [
1883
+ {
1884
+ "ref": "EnrollmentWizard"
1885
+ }
1886
+ ]
1887
+ }
1888
+ ]
1889
+ },
1890
+ {
1891
+ "name": "ProgressOrbital",
1892
+ "entity": {
1893
+ "name": "Progress",
1894
+ "persistence": "runtime",
1895
+ "fields": [
1896
+ {
1897
+ "name": "id",
1898
+ "type": "string",
1899
+ "required": true
1900
+ },
1901
+ {
1902
+ "name": "courseName",
1903
+ "type": "string",
1904
+ "default": ""
1905
+ },
1906
+ {
1907
+ "name": "lessonsCompleted",
1908
+ "type": "number",
1909
+ "default": 0
1910
+ },
1911
+ {
1912
+ "name": "totalLessons",
1913
+ "type": "number",
1914
+ "default": 0
1915
+ },
1916
+ {
1917
+ "name": "percentComplete",
1918
+ "type": "number",
1919
+ "default": 0
1920
+ },
1921
+ {
1922
+ "name": "lastActivity",
1923
+ "type": "string",
1924
+ "default": ""
1925
+ }
1926
+ ]
1927
+ },
1928
+ "traits": [
1929
+ {
1930
+ "name": "ProgressDisplay",
1931
+ "linkedEntity": "Progress",
1932
+ "category": "interaction",
1933
+ "stateMachine": {
1934
+ "states": [
1935
+ {
1936
+ "name": "loading",
1937
+ "isInitial": true
1938
+ },
1939
+ {
1940
+ "name": "displaying"
1941
+ },
1942
+ {
1943
+ "name": "refreshing"
1944
+ }
1945
+ ],
1946
+ "events": [
1947
+ {
1948
+ "key": "INIT",
1949
+ "name": "Initialize"
1950
+ },
1951
+ {
1952
+ "key": "LOADED",
1953
+ "name": "Loaded"
1954
+ },
1955
+ {
1956
+ "key": "REFRESH",
1957
+ "name": "Refresh"
1958
+ },
1959
+ {
1960
+ "key": "REFRESHED",
1961
+ "name": "Refreshed"
1962
+ }
1963
+ ],
1964
+ "transitions": [
1965
+ {
1966
+ "from": "loading",
1967
+ "to": "displaying",
1968
+ "event": "INIT",
1969
+ "effects": [
1970
+ [
1971
+ "fetch",
1972
+ "Progress"
1973
+ ],
1974
+ [
1975
+ "render-ui",
1976
+ "main",
1977
+ {
1978
+ "type": "stack",
1979
+ "direction": "vertical",
1980
+ "gap": "lg",
1981
+ "children": [
1982
+ {
1983
+ "type": "stack",
1984
+ "direction": "horizontal",
1985
+ "gap": "md",
1986
+ "justify": "space-between",
1987
+ "children": [
1988
+ {
1989
+ "type": "stack",
1990
+ "direction": "horizontal",
1991
+ "gap": "md",
1992
+ "children": [
1993
+ {
1994
+ "type": "icon",
1995
+ "name": "trending-up",
1996
+ "size": "lg"
1997
+ },
1998
+ {
1999
+ "type": "typography",
2000
+ "content": "Progress",
2001
+ "variant": "h2"
2002
+ }
2003
+ ]
2004
+ },
2005
+ {
2006
+ "type": "button",
2007
+ "label": "Refresh",
2008
+ "event": "REFRESH",
2009
+ "variant": "secondary",
2010
+ "icon": "refresh-cw"
2011
+ }
2012
+ ]
2013
+ },
2014
+ {
2015
+ "type": "divider"
2016
+ },
2017
+ {
2018
+ "type": "simple-grid",
2019
+ "columns": 3,
2020
+ "children": [
2021
+ {
2022
+ "type": "card",
2023
+ "children": [
2024
+ {
2025
+ "type": "stack",
2026
+ "direction": "vertical",
2027
+ "gap": "sm",
2028
+ "children": [
2029
+ {
2030
+ "type": "typography",
2031
+ "variant": "caption",
2032
+ "content": "CourseName"
2033
+ },
2034
+ {
2035
+ "type": "typography",
2036
+ "variant": "h3",
2037
+ "content": "@entity.courseName"
2038
+ }
2039
+ ]
2040
+ }
2041
+ ]
2042
+ },
2043
+ {
2044
+ "type": "card",
2045
+ "children": [
2046
+ {
2047
+ "type": "stack",
2048
+ "direction": "vertical",
2049
+ "gap": "sm",
2050
+ "children": [
2051
+ {
2052
+ "type": "typography",
2053
+ "variant": "caption",
2054
+ "content": "LessonsCompleted"
2055
+ },
2056
+ {
2057
+ "type": "typography",
2058
+ "variant": "h3",
2059
+ "content": "@entity.lessonsCompleted"
2060
+ }
2061
+ ]
2062
+ }
2063
+ ]
2064
+ },
2065
+ {
2066
+ "type": "card",
2067
+ "children": [
2068
+ {
2069
+ "type": "stack",
2070
+ "direction": "vertical",
2071
+ "gap": "sm",
2072
+ "children": [
2073
+ {
2074
+ "type": "typography",
2075
+ "variant": "caption",
2076
+ "content": "TotalLessons"
2077
+ },
2078
+ {
2079
+ "type": "typography",
2080
+ "variant": "h3",
2081
+ "content": "@entity.totalLessons"
2082
+ }
2083
+ ]
2084
+ }
2085
+ ]
2086
+ },
2087
+ {
2088
+ "type": "card",
2089
+ "children": [
2090
+ {
2091
+ "type": "stack",
2092
+ "direction": "vertical",
2093
+ "gap": "sm",
2094
+ "children": [
2095
+ {
2096
+ "type": "typography",
2097
+ "variant": "caption",
2098
+ "content": "PercentComplete"
2099
+ },
2100
+ {
2101
+ "type": "typography",
2102
+ "variant": "h3",
2103
+ "content": "@entity.percentComplete"
2104
+ }
2105
+ ]
2106
+ }
2107
+ ]
2108
+ },
2109
+ {
2110
+ "type": "card",
2111
+ "children": [
2112
+ {
2113
+ "type": "stack",
2114
+ "direction": "vertical",
2115
+ "gap": "sm",
2116
+ "children": [
2117
+ {
2118
+ "type": "typography",
2119
+ "variant": "caption",
2120
+ "content": "LastActivity"
2121
+ },
2122
+ {
2123
+ "type": "typography",
2124
+ "variant": "h3",
2125
+ "content": "@entity.lastActivity"
2126
+ }
2127
+ ]
2128
+ }
2129
+ ]
2130
+ }
2131
+ ]
2132
+ }
2133
+ ]
2134
+ }
2135
+ ]
2136
+ ]
2137
+ },
2138
+ {
2139
+ "from": "loading",
2140
+ "to": "displaying",
2141
+ "event": "LOADED",
2142
+ "effects": [
2143
+ [
2144
+ "fetch",
2145
+ "Progress"
2146
+ ],
2147
+ [
2148
+ "render-ui",
2149
+ "main",
2150
+ {
2151
+ "type": "stack",
2152
+ "direction": "vertical",
2153
+ "gap": "lg",
2154
+ "children": [
2155
+ {
2156
+ "type": "stack",
2157
+ "direction": "horizontal",
2158
+ "gap": "md",
2159
+ "justify": "space-between",
2160
+ "children": [
2161
+ {
2162
+ "type": "stack",
2163
+ "direction": "horizontal",
2164
+ "gap": "md",
2165
+ "children": [
2166
+ {
2167
+ "type": "icon",
2168
+ "name": "trending-up",
2169
+ "size": "lg"
2170
+ },
2171
+ {
2172
+ "type": "typography",
2173
+ "content": "Progress",
2174
+ "variant": "h2"
2175
+ }
2176
+ ]
2177
+ },
2178
+ {
2179
+ "type": "button",
2180
+ "label": "Refresh",
2181
+ "event": "REFRESH",
2182
+ "variant": "secondary",
2183
+ "icon": "refresh-cw"
2184
+ }
2185
+ ]
2186
+ },
2187
+ {
2188
+ "type": "divider"
2189
+ },
2190
+ {
2191
+ "type": "simple-grid",
2192
+ "columns": 3,
2193
+ "children": [
2194
+ {
2195
+ "type": "card",
2196
+ "children": [
2197
+ {
2198
+ "type": "stack",
2199
+ "direction": "vertical",
2200
+ "gap": "sm",
2201
+ "children": [
2202
+ {
2203
+ "type": "typography",
2204
+ "variant": "caption",
2205
+ "content": "CourseName"
2206
+ },
2207
+ {
2208
+ "type": "typography",
2209
+ "variant": "h3",
2210
+ "content": "@entity.courseName"
2211
+ }
2212
+ ]
2213
+ }
2214
+ ]
2215
+ },
2216
+ {
2217
+ "type": "card",
2218
+ "children": [
2219
+ {
2220
+ "type": "stack",
2221
+ "direction": "vertical",
2222
+ "gap": "sm",
2223
+ "children": [
2224
+ {
2225
+ "type": "typography",
2226
+ "variant": "caption",
2227
+ "content": "LessonsCompleted"
2228
+ },
2229
+ {
2230
+ "type": "typography",
2231
+ "variant": "h3",
2232
+ "content": "@entity.lessonsCompleted"
2233
+ }
2234
+ ]
2235
+ }
2236
+ ]
2237
+ },
2238
+ {
2239
+ "type": "card",
2240
+ "children": [
2241
+ {
2242
+ "type": "stack",
2243
+ "direction": "vertical",
2244
+ "gap": "sm",
2245
+ "children": [
2246
+ {
2247
+ "type": "typography",
2248
+ "variant": "caption",
2249
+ "content": "TotalLessons"
2250
+ },
2251
+ {
2252
+ "type": "typography",
2253
+ "variant": "h3",
2254
+ "content": "@entity.totalLessons"
2255
+ }
2256
+ ]
2257
+ }
2258
+ ]
2259
+ },
2260
+ {
2261
+ "type": "card",
2262
+ "children": [
2263
+ {
2264
+ "type": "stack",
2265
+ "direction": "vertical",
2266
+ "gap": "sm",
2267
+ "children": [
2268
+ {
2269
+ "type": "typography",
2270
+ "variant": "caption",
2271
+ "content": "PercentComplete"
2272
+ },
2273
+ {
2274
+ "type": "typography",
2275
+ "variant": "h3",
2276
+ "content": "@entity.percentComplete"
2277
+ }
2278
+ ]
2279
+ }
2280
+ ]
2281
+ },
2282
+ {
2283
+ "type": "card",
2284
+ "children": [
2285
+ {
2286
+ "type": "stack",
2287
+ "direction": "vertical",
2288
+ "gap": "sm",
2289
+ "children": [
2290
+ {
2291
+ "type": "typography",
2292
+ "variant": "caption",
2293
+ "content": "LastActivity"
2294
+ },
2295
+ {
2296
+ "type": "typography",
2297
+ "variant": "h3",
2298
+ "content": "@entity.lastActivity"
2299
+ }
2300
+ ]
2301
+ }
2302
+ ]
2303
+ }
2304
+ ]
2305
+ }
2306
+ ]
2307
+ }
2308
+ ]
2309
+ ]
2310
+ },
2311
+ {
2312
+ "from": "displaying",
2313
+ "to": "displaying",
2314
+ "event": "INIT",
2315
+ "effects": [
2316
+ [
2317
+ "fetch",
2318
+ "Progress"
2319
+ ],
2320
+ [
2321
+ "render-ui",
2322
+ "main",
2323
+ {
2324
+ "type": "stack",
2325
+ "direction": "vertical",
2326
+ "gap": "lg",
2327
+ "children": [
2328
+ {
2329
+ "type": "stack",
2330
+ "direction": "horizontal",
2331
+ "gap": "md",
2332
+ "justify": "space-between",
2333
+ "children": [
2334
+ {
2335
+ "type": "stack",
2336
+ "direction": "horizontal",
2337
+ "gap": "md",
2338
+ "children": [
2339
+ {
2340
+ "type": "icon",
2341
+ "name": "trending-up",
2342
+ "size": "lg"
2343
+ },
2344
+ {
2345
+ "type": "typography",
2346
+ "content": "Progress",
2347
+ "variant": "h2"
2348
+ }
2349
+ ]
2350
+ },
2351
+ {
2352
+ "type": "button",
2353
+ "label": "Refresh",
2354
+ "event": "REFRESH",
2355
+ "variant": "secondary",
2356
+ "icon": "refresh-cw"
2357
+ }
2358
+ ]
2359
+ },
2360
+ {
2361
+ "type": "divider"
2362
+ },
2363
+ {
2364
+ "type": "simple-grid",
2365
+ "columns": 3,
2366
+ "children": [
2367
+ {
2368
+ "type": "card",
2369
+ "children": [
2370
+ {
2371
+ "type": "stack",
2372
+ "direction": "vertical",
2373
+ "gap": "sm",
2374
+ "children": [
2375
+ {
2376
+ "type": "typography",
2377
+ "variant": "caption",
2378
+ "content": "CourseName"
2379
+ },
2380
+ {
2381
+ "type": "typography",
2382
+ "variant": "h3",
2383
+ "content": "@entity.courseName"
2384
+ }
2385
+ ]
2386
+ }
2387
+ ]
2388
+ },
2389
+ {
2390
+ "type": "card",
2391
+ "children": [
2392
+ {
2393
+ "type": "stack",
2394
+ "direction": "vertical",
2395
+ "gap": "sm",
2396
+ "children": [
2397
+ {
2398
+ "type": "typography",
2399
+ "variant": "caption",
2400
+ "content": "LessonsCompleted"
2401
+ },
2402
+ {
2403
+ "type": "typography",
2404
+ "variant": "h3",
2405
+ "content": "@entity.lessonsCompleted"
2406
+ }
2407
+ ]
2408
+ }
2409
+ ]
2410
+ },
2411
+ {
2412
+ "type": "card",
2413
+ "children": [
2414
+ {
2415
+ "type": "stack",
2416
+ "direction": "vertical",
2417
+ "gap": "sm",
2418
+ "children": [
2419
+ {
2420
+ "type": "typography",
2421
+ "variant": "caption",
2422
+ "content": "TotalLessons"
2423
+ },
2424
+ {
2425
+ "type": "typography",
2426
+ "variant": "h3",
2427
+ "content": "@entity.totalLessons"
2428
+ }
2429
+ ]
2430
+ }
2431
+ ]
2432
+ },
2433
+ {
2434
+ "type": "card",
2435
+ "children": [
2436
+ {
2437
+ "type": "stack",
2438
+ "direction": "vertical",
2439
+ "gap": "sm",
2440
+ "children": [
2441
+ {
2442
+ "type": "typography",
2443
+ "variant": "caption",
2444
+ "content": "PercentComplete"
2445
+ },
2446
+ {
2447
+ "type": "typography",
2448
+ "variant": "h3",
2449
+ "content": "@entity.percentComplete"
2450
+ }
2451
+ ]
2452
+ }
2453
+ ]
2454
+ },
2455
+ {
2456
+ "type": "card",
2457
+ "children": [
2458
+ {
2459
+ "type": "stack",
2460
+ "direction": "vertical",
2461
+ "gap": "sm",
2462
+ "children": [
2463
+ {
2464
+ "type": "typography",
2465
+ "variant": "caption",
2466
+ "content": "LastActivity"
2467
+ },
2468
+ {
2469
+ "type": "typography",
2470
+ "variant": "h3",
2471
+ "content": "@entity.lastActivity"
2472
+ }
2473
+ ]
2474
+ }
2475
+ ]
2476
+ }
2477
+ ]
2478
+ }
2479
+ ]
2480
+ }
2481
+ ]
2482
+ ]
2483
+ },
2484
+ {
2485
+ "from": "displaying",
2486
+ "to": "refreshing",
2487
+ "event": "REFRESH",
2488
+ "effects": [
2489
+ [
2490
+ "fetch",
2491
+ "Progress"
2492
+ ],
2493
+ [
2494
+ "render-ui",
2495
+ "main",
2496
+ {
2497
+ "type": "stack",
2498
+ "direction": "vertical",
2499
+ "gap": "lg",
2500
+ "children": [
2501
+ {
2502
+ "type": "stack",
2503
+ "direction": "horizontal",
2504
+ "gap": "md",
2505
+ "justify": "space-between",
2506
+ "children": [
2507
+ {
2508
+ "type": "stack",
2509
+ "direction": "horizontal",
2510
+ "gap": "md",
2511
+ "children": [
2512
+ {
2513
+ "type": "icon",
2514
+ "name": "trending-up",
2515
+ "size": "lg"
2516
+ },
2517
+ {
2518
+ "type": "typography",
2519
+ "content": "Progress",
2520
+ "variant": "h2"
2521
+ }
2522
+ ]
2523
+ },
2524
+ {
2525
+ "type": "button",
2526
+ "label": "Refresh",
2527
+ "event": "REFRESH",
2528
+ "variant": "secondary",
2529
+ "icon": "refresh-cw"
2530
+ }
2531
+ ]
2532
+ },
2533
+ {
2534
+ "type": "divider"
2535
+ },
2536
+ {
2537
+ "type": "simple-grid",
2538
+ "columns": 3,
2539
+ "children": [
2540
+ {
2541
+ "type": "card",
2542
+ "children": [
2543
+ {
2544
+ "type": "stack",
2545
+ "direction": "vertical",
2546
+ "gap": "sm",
2547
+ "children": [
2548
+ {
2549
+ "type": "typography",
2550
+ "variant": "caption",
2551
+ "content": "CourseName"
2552
+ },
2553
+ {
2554
+ "type": "typography",
2555
+ "variant": "h3",
2556
+ "content": "@entity.courseName"
2557
+ }
2558
+ ]
2559
+ }
2560
+ ]
2561
+ },
2562
+ {
2563
+ "type": "card",
2564
+ "children": [
2565
+ {
2566
+ "type": "stack",
2567
+ "direction": "vertical",
2568
+ "gap": "sm",
2569
+ "children": [
2570
+ {
2571
+ "type": "typography",
2572
+ "variant": "caption",
2573
+ "content": "LessonsCompleted"
2574
+ },
2575
+ {
2576
+ "type": "typography",
2577
+ "variant": "h3",
2578
+ "content": "@entity.lessonsCompleted"
2579
+ }
2580
+ ]
2581
+ }
2582
+ ]
2583
+ },
2584
+ {
2585
+ "type": "card",
2586
+ "children": [
2587
+ {
2588
+ "type": "stack",
2589
+ "direction": "vertical",
2590
+ "gap": "sm",
2591
+ "children": [
2592
+ {
2593
+ "type": "typography",
2594
+ "variant": "caption",
2595
+ "content": "TotalLessons"
2596
+ },
2597
+ {
2598
+ "type": "typography",
2599
+ "variant": "h3",
2600
+ "content": "@entity.totalLessons"
2601
+ }
2602
+ ]
2603
+ }
2604
+ ]
2605
+ },
2606
+ {
2607
+ "type": "card",
2608
+ "children": [
2609
+ {
2610
+ "type": "stack",
2611
+ "direction": "vertical",
2612
+ "gap": "sm",
2613
+ "children": [
2614
+ {
2615
+ "type": "typography",
2616
+ "variant": "caption",
2617
+ "content": "PercentComplete"
2618
+ },
2619
+ {
2620
+ "type": "typography",
2621
+ "variant": "h3",
2622
+ "content": "@entity.percentComplete"
2623
+ }
2624
+ ]
2625
+ }
2626
+ ]
2627
+ },
2628
+ {
2629
+ "type": "card",
2630
+ "children": [
2631
+ {
2632
+ "type": "stack",
2633
+ "direction": "vertical",
2634
+ "gap": "sm",
2635
+ "children": [
2636
+ {
2637
+ "type": "typography",
2638
+ "variant": "caption",
2639
+ "content": "LastActivity"
2640
+ },
2641
+ {
2642
+ "type": "typography",
2643
+ "variant": "h3",
2644
+ "content": "@entity.lastActivity"
2645
+ }
2646
+ ]
2647
+ }
2648
+ ]
2649
+ }
2650
+ ]
2651
+ }
2652
+ ]
2653
+ }
2654
+ ]
2655
+ ]
2656
+ },
2657
+ {
2658
+ "from": "refreshing",
2659
+ "to": "displaying",
2660
+ "event": "REFRESHED",
2661
+ "effects": [
2662
+ [
2663
+ "fetch",
2664
+ "Progress"
2665
+ ],
2666
+ [
2667
+ "render-ui",
2668
+ "main",
2669
+ {
2670
+ "type": "stack",
2671
+ "direction": "vertical",
2672
+ "gap": "lg",
2673
+ "children": [
2674
+ {
2675
+ "type": "stack",
2676
+ "direction": "horizontal",
2677
+ "gap": "md",
2678
+ "justify": "space-between",
2679
+ "children": [
2680
+ {
2681
+ "type": "stack",
2682
+ "direction": "horizontal",
2683
+ "gap": "md",
2684
+ "children": [
2685
+ {
2686
+ "type": "icon",
2687
+ "name": "trending-up",
2688
+ "size": "lg"
2689
+ },
2690
+ {
2691
+ "type": "typography",
2692
+ "content": "Progress",
2693
+ "variant": "h2"
2694
+ }
2695
+ ]
2696
+ },
2697
+ {
2698
+ "type": "button",
2699
+ "label": "Refresh",
2700
+ "event": "REFRESH",
2701
+ "variant": "secondary",
2702
+ "icon": "refresh-cw"
2703
+ }
2704
+ ]
2705
+ },
2706
+ {
2707
+ "type": "divider"
2708
+ },
2709
+ {
2710
+ "type": "simple-grid",
2711
+ "columns": 3,
2712
+ "children": [
2713
+ {
2714
+ "type": "card",
2715
+ "children": [
2716
+ {
2717
+ "type": "stack",
2718
+ "direction": "vertical",
2719
+ "gap": "sm",
2720
+ "children": [
2721
+ {
2722
+ "type": "typography",
2723
+ "variant": "caption",
2724
+ "content": "CourseName"
2725
+ },
2726
+ {
2727
+ "type": "typography",
2728
+ "variant": "h3",
2729
+ "content": "@entity.courseName"
2730
+ }
2731
+ ]
2732
+ }
2733
+ ]
2734
+ },
2735
+ {
2736
+ "type": "card",
2737
+ "children": [
2738
+ {
2739
+ "type": "stack",
2740
+ "direction": "vertical",
2741
+ "gap": "sm",
2742
+ "children": [
2743
+ {
2744
+ "type": "typography",
2745
+ "variant": "caption",
2746
+ "content": "LessonsCompleted"
2747
+ },
2748
+ {
2749
+ "type": "typography",
2750
+ "variant": "h3",
2751
+ "content": "@entity.lessonsCompleted"
2752
+ }
2753
+ ]
2754
+ }
2755
+ ]
2756
+ },
2757
+ {
2758
+ "type": "card",
2759
+ "children": [
2760
+ {
2761
+ "type": "stack",
2762
+ "direction": "vertical",
2763
+ "gap": "sm",
2764
+ "children": [
2765
+ {
2766
+ "type": "typography",
2767
+ "variant": "caption",
2768
+ "content": "TotalLessons"
2769
+ },
2770
+ {
2771
+ "type": "typography",
2772
+ "variant": "h3",
2773
+ "content": "@entity.totalLessons"
2774
+ }
2775
+ ]
2776
+ }
2777
+ ]
2778
+ },
2779
+ {
2780
+ "type": "card",
2781
+ "children": [
2782
+ {
2783
+ "type": "stack",
2784
+ "direction": "vertical",
2785
+ "gap": "sm",
2786
+ "children": [
2787
+ {
2788
+ "type": "typography",
2789
+ "variant": "caption",
2790
+ "content": "PercentComplete"
2791
+ },
2792
+ {
2793
+ "type": "typography",
2794
+ "variant": "h3",
2795
+ "content": "@entity.percentComplete"
2796
+ }
2797
+ ]
2798
+ }
2799
+ ]
2800
+ },
2801
+ {
2802
+ "type": "card",
2803
+ "children": [
2804
+ {
2805
+ "type": "stack",
2806
+ "direction": "vertical",
2807
+ "gap": "sm",
2808
+ "children": [
2809
+ {
2810
+ "type": "typography",
2811
+ "variant": "caption",
2812
+ "content": "LastActivity"
2813
+ },
2814
+ {
2815
+ "type": "typography",
2816
+ "variant": "h3",
2817
+ "content": "@entity.lastActivity"
2818
+ }
2819
+ ]
2820
+ }
2821
+ ]
2822
+ }
2823
+ ]
2824
+ }
2825
+ ]
2826
+ }
2827
+ ]
2828
+ ]
2829
+ }
2830
+ ]
2831
+ },
2832
+ "listens": [
2833
+ {
2834
+ "event": "COMPLETE_LESSON",
2835
+ "triggers": "INIT",
2836
+ "scope": "external"
2837
+ }
2838
+ ]
2839
+ }
2840
+ ],
2841
+ "pages": [
2842
+ {
2843
+ "name": "ProgressPage",
2844
+ "path": "/progress",
2845
+ "traits": [
2846
+ {
2847
+ "ref": "ProgressDisplay"
2848
+ }
2849
+ ]
2850
+ }
2851
+ ]
2852
+ }
2853
+ ]
2854
+ }