@almadar/std 14.26.0 → 14.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  3. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  4. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  5. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  6. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  7. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  8. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  9. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  10. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  11. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  12. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  13. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  14. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  15. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  16. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  17. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  18. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  19. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  20. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  21. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  22. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  23. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  24. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  25. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  26. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  27. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  28. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  29. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  30. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  31. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  32. package/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  33. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  34. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  35. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  36. package/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  37. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  38. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  39. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  40. package/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  45. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  47. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  49. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  50. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  54. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  57. package/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  58. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  59. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  60. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  63. package/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  64. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  65. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  66. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  67. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  68. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  69. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  70. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  71. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  72. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  73. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  74. package/behaviors/registry/core/atoms/std-board.orb +1367 -0
  75. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  76. package/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  77. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  78. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  79. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  80. package/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  81. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  82. package/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  83. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  84. package/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  85. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  86. package/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  87. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  88. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  89. package/dist/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  90. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  91. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  92. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  93. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  94. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  95. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  96. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  97. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  98. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  99. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  100. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  101. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  102. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  103. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  104. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  105. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  106. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  107. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  108. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  109. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  110. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  111. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  112. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  113. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  114. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  115. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  116. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  117. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  118. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  119. package/dist/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  120. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  121. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  122. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  123. package/dist/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  124. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  125. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  126. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  127. package/dist/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  128. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  129. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  130. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  131. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  132. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  133. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  134. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  135. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  136. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  137. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  138. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  139. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  140. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  141. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  142. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  143. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  144. package/dist/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  145. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  146. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  147. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  148. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  149. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  150. package/dist/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  151. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  152. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  153. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  154. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  155. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  156. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  157. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  158. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  159. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  160. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  161. package/dist/behaviors/registry/core/atoms/std-board.orb +1367 -0
  162. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  163. package/dist/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  164. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  165. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  166. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  167. package/dist/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  168. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  169. package/dist/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  170. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  171. package/dist/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  172. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  173. package/dist/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  174. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  175. package/package.json +1 -1
@@ -0,0 +1,937 @@
1
+ {
2
+ "name": "std-recurrence",
3
+ "version": "1.0.0",
4
+ "description": "std-recurrence — generic rule-based occurrence generator. Topology = defining_rule / generating_occurrences / viewing_calendar / awaiting_exception_decision / cancelled / error — adds SKIP_OCCURRENCE / RESCHEDULE_OCCURRENCE / END_AFTER_N / END_ON_DATE transitions a pure-CRUD atom can't express. Renders rule editor + calendar overview of generated occurrences + per-occurrence exception modal.",
5
+ "orbitals": [
6
+ {
7
+ "name": "RecurrenceOrbital",
8
+ "entity": {
9
+ "name": "RecurrenceView",
10
+ "persistence": "runtime",
11
+ "fields": [
12
+ {
13
+ "name": "id",
14
+ "type": "string",
15
+ "required": true
16
+ },
17
+ {
18
+ "name": "occurrences",
19
+ "type": "array",
20
+ "default": [],
21
+ "items": {
22
+ "type": "object",
23
+ "properties": {
24
+ "date": {
25
+ "name": "date",
26
+ "type": "string"
27
+ },
28
+ "notes": {
29
+ "name": "notes",
30
+ "type": "string"
31
+ },
32
+ "label": {
33
+ "name": "label",
34
+ "type": "string"
35
+ },
36
+ "id": {
37
+ "name": "id",
38
+ "type": "string"
39
+ },
40
+ "status": {
41
+ "name": "status",
42
+ "type": "string",
43
+ "values": [
44
+ "scheduled",
45
+ "skipped",
46
+ "completed",
47
+ "rescheduled"
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "name": "frequency",
55
+ "type": "string",
56
+ "default": "weekly",
57
+ "values": [
58
+ "daily",
59
+ "weekly",
60
+ "monthly",
61
+ "yearly"
62
+ ]
63
+ },
64
+ {
65
+ "name": "interval",
66
+ "type": "number",
67
+ "default": 1.0
68
+ },
69
+ {
70
+ "name": "startDate",
71
+ "type": "string",
72
+ "default": ""
73
+ },
74
+ {
75
+ "name": "endDate",
76
+ "type": "string",
77
+ "default": ""
78
+ },
79
+ {
80
+ "name": "endAfterCount",
81
+ "type": "number",
82
+ "default": 0.0
83
+ },
84
+ {
85
+ "name": "currentOccurrenceId",
86
+ "type": "string",
87
+ "default": ""
88
+ },
89
+ {
90
+ "name": "currentOccurrenceDate",
91
+ "type": "string",
92
+ "default": ""
93
+ },
94
+ {
95
+ "name": "currentOccurrenceLabel",
96
+ "type": "string",
97
+ "default": ""
98
+ },
99
+ {
100
+ "name": "rescheduleDate",
101
+ "type": "string",
102
+ "default": ""
103
+ },
104
+ {
105
+ "name": "skipReason",
106
+ "type": "string",
107
+ "default": ""
108
+ },
109
+ {
110
+ "name": "errorMessage",
111
+ "type": "string",
112
+ "default": ""
113
+ }
114
+ ]
115
+ },
116
+ "traits": [
117
+ {
118
+ "name": "RecurrenceEditor",
119
+ "category": "interaction",
120
+ "linkedEntity": "RecurrenceView",
121
+ "emits": [
122
+ {
123
+ "event": "EDIT_RULE"
124
+ },
125
+ {
126
+ "event": "SAVE_RULE",
127
+ "payloadSchema": [
128
+ {
129
+ "name": "data",
130
+ "type": "object"
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "event": "CANCEL_RULE"
136
+ },
137
+ {
138
+ "event": "OPEN_EXCEPTION",
139
+ "payloadSchema": [
140
+ {
141
+ "name": "id",
142
+ "type": "string"
143
+ },
144
+ {
145
+ "name": "row",
146
+ "type": "object",
147
+ "required": true
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ "event": "CLOSE_EXCEPTION"
153
+ },
154
+ {
155
+ "event": "SKIP_OCCURRENCE",
156
+ "payloadSchema": [
157
+ {
158
+ "name": "id",
159
+ "type": "string"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "event": "RESCHEDULE_OCCURRENCE",
165
+ "payloadSchema": [
166
+ {
167
+ "name": "id",
168
+ "type": "string"
169
+ },
170
+ {
171
+ "name": "newDate",
172
+ "type": "string"
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "event": "CANCEL_SCHEDULE"
178
+ },
179
+ {
180
+ "event": "RESTART"
181
+ },
182
+ {
183
+ "event": "RecurrenceLoaded",
184
+ "payloadSchema": [
185
+ {
186
+ "name": "data",
187
+ "type": "[object]"
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "event": "RecurrenceLoadFailed",
193
+ "payloadSchema": [
194
+ {
195
+ "name": "error",
196
+ "type": "string"
197
+ },
198
+ {
199
+ "name": "code",
200
+ "type": "string"
201
+ }
202
+ ]
203
+ }
204
+ ],
205
+ "stateMachine": {
206
+ "states": [
207
+ {
208
+ "name": "loading",
209
+ "isInitial": true
210
+ },
211
+ {
212
+ "name": "viewing_calendar"
213
+ },
214
+ {
215
+ "name": "defining_rule"
216
+ },
217
+ {
218
+ "name": "awaiting_exception_decision"
219
+ },
220
+ {
221
+ "name": "cancelled"
222
+ },
223
+ {
224
+ "name": "error"
225
+ }
226
+ ],
227
+ "events": [
228
+ {
229
+ "key": "INIT",
230
+ "name": "Initialize"
231
+ },
232
+ {
233
+ "key": "RecurrenceLoaded",
234
+ "name": "Recurrence loaded",
235
+ "payloadSchema": [
236
+ {
237
+ "name": "data",
238
+ "type": "[object]"
239
+ }
240
+ ]
241
+ },
242
+ {
243
+ "key": "RecurrenceLoadFailed",
244
+ "name": "Recurrence load failed",
245
+ "payloadSchema": [
246
+ {
247
+ "name": "error",
248
+ "type": "string"
249
+ },
250
+ {
251
+ "name": "code",
252
+ "type": "string"
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ "key": "RecurrenceSaved",
258
+ "name": "Recurrence saved",
259
+ "payloadSchema": [
260
+ {
261
+ "name": "row",
262
+ "type": "object"
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "key": "RecurrenceSaveFailed",
268
+ "name": "Recurrence save failed",
269
+ "payloadSchema": [
270
+ {
271
+ "name": "error",
272
+ "type": "string"
273
+ },
274
+ {
275
+ "name": "code",
276
+ "type": "string"
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "key": "EDIT_RULE",
282
+ "name": "Edit Rule"
283
+ },
284
+ {
285
+ "key": "OPEN_EXCEPTION",
286
+ "name": "Open Exception",
287
+ "payloadSchema": [
288
+ {
289
+ "name": "id",
290
+ "type": "string"
291
+ },
292
+ {
293
+ "name": "row",
294
+ "type": "object",
295
+ "required": true
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "key": "CANCEL_SCHEDULE",
301
+ "name": "Cancel Schedule"
302
+ },
303
+ {
304
+ "key": "SAVE_RULE",
305
+ "name": "Save Rule",
306
+ "payloadSchema": [
307
+ {
308
+ "name": "data",
309
+ "type": "object"
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ "key": "CANCEL_RULE",
315
+ "name": "Cancel Rule"
316
+ },
317
+ {
318
+ "key": "SKIP_OCCURRENCE",
319
+ "name": "Skip Occurrence",
320
+ "payloadSchema": [
321
+ {
322
+ "name": "id",
323
+ "type": "string"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "key": "RESCHEDULE_OCCURRENCE",
329
+ "name": "Reschedule Occurrence",
330
+ "payloadSchema": [
331
+ {
332
+ "name": "id",
333
+ "type": "string"
334
+ },
335
+ {
336
+ "name": "newDate",
337
+ "type": "string"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "key": "CLOSE_EXCEPTION",
343
+ "name": "Close Exception"
344
+ },
345
+ {
346
+ "key": "RESTART",
347
+ "name": "Restart"
348
+ }
349
+ ],
350
+ "transitions": [
351
+ {
352
+ "from": "loading",
353
+ "to": "loading",
354
+ "event": "INIT",
355
+ "effects": [
356
+ [
357
+ "fetch",
358
+ "RecurrenceView",
359
+ {
360
+ "emit": {
361
+ "failure": "RecurrenceLoadFailed",
362
+ "success": "RecurrenceLoaded"
363
+ }
364
+ }
365
+ ],
366
+ [
367
+ "render-ui",
368
+ "main",
369
+ {
370
+ "type": "loading-state",
371
+ "title": "Loading schedule…"
372
+ }
373
+ ]
374
+ ]
375
+ },
376
+ {
377
+ "from": "loading",
378
+ "to": "viewing_calendar",
379
+ "event": "RecurrenceLoaded",
380
+ "effects": [
381
+ [
382
+ "set",
383
+ "@entity.occurrences",
384
+ [
385
+ "array/map",
386
+ "@payload.data",
387
+ [
388
+ "fn",
389
+ "row",
390
+ {
391
+ "notes": [
392
+ "object/get",
393
+ "@row",
394
+ "notes",
395
+ ""
396
+ ],
397
+ "status": "scheduled",
398
+ "id": [
399
+ "object/get",
400
+ "@row",
401
+ "id",
402
+ ""
403
+ ],
404
+ "label": [
405
+ "object/get",
406
+ "@row",
407
+ "label",
408
+ ""
409
+ ],
410
+ "date": [
411
+ "object/get",
412
+ "@row",
413
+ "date",
414
+ ""
415
+ ]
416
+ }
417
+ ]
418
+ ]
419
+ ],
420
+ [
421
+ "render-ui",
422
+ "main",
423
+ {
424
+ "gap": "md",
425
+ "direction": "vertical",
426
+ "children": [
427
+ {
428
+ "type": "stack",
429
+ "align": "center",
430
+ "direction": "horizontal",
431
+ "gap": "sm",
432
+ "children": [
433
+ {
434
+ "type": "icon",
435
+ "name": "calendar"
436
+ },
437
+ {
438
+ "content": "@config.title",
439
+ "variant": "h3",
440
+ "type": "typography"
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "type": "divider"
446
+ },
447
+ {
448
+ "entity": "@entity.occurrences",
449
+ "gap": "sm",
450
+ "fields": [],
451
+ "type": "data-list",
452
+ "renderItem": [
453
+ "fn",
454
+ "occ",
455
+ {
456
+ "type": "card",
457
+ "children": [
458
+ {
459
+ "align": "center",
460
+ "children": [
461
+ {
462
+ "name": "clock",
463
+ "type": "icon"
464
+ },
465
+ {
466
+ "direction": "vertical",
467
+ "type": "stack",
468
+ "children": [
469
+ {
470
+ "type": "typography",
471
+ "content": "@occ.label",
472
+ "variant": "h4"
473
+ },
474
+ {
475
+ "variant": "caption",
476
+ "type": "typography",
477
+ "color": "muted",
478
+ "content": "@occ.date"
479
+ }
480
+ ],
481
+ "gap": "xs"
482
+ },
483
+ {
484
+ "label": "@occ.status",
485
+ "variant": "primary",
486
+ "type": "badge"
487
+ },
488
+ {
489
+ "action": "OPEN_EXCEPTION",
490
+ "variant": "ghost",
491
+ "type": "button",
492
+ "label": "Edit",
493
+ "icon": "edit",
494
+ "actionPayload": {
495
+ "id": "@occ.id",
496
+ "row": "@occ"
497
+ }
498
+ }
499
+ ],
500
+ "direction": "horizontal",
501
+ "type": "stack",
502
+ "gap": "sm"
503
+ }
504
+ ]
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "gap": "sm",
510
+ "type": "stack",
511
+ "children": [
512
+ {
513
+ "type": "button",
514
+ "label": "Edit Rule",
515
+ "variant": "secondary",
516
+ "icon": "settings",
517
+ "action": "EDIT_RULE"
518
+ },
519
+ {
520
+ "type": "button",
521
+ "label": "End Schedule",
522
+ "action": "CANCEL_SCHEDULE",
523
+ "variant": "danger",
524
+ "icon": "x-circle"
525
+ }
526
+ ],
527
+ "direction": "horizontal",
528
+ "align": "center"
529
+ }
530
+ ],
531
+ "type": "stack"
532
+ }
533
+ ]
534
+ ]
535
+ },
536
+ {
537
+ "from": "loading",
538
+ "to": "error",
539
+ "event": "RecurrenceLoadFailed",
540
+ "effects": [
541
+ [
542
+ "set",
543
+ "@entity.errorMessage",
544
+ "@payload.error"
545
+ ],
546
+ [
547
+ "render-ui",
548
+ "main",
549
+ {
550
+ "type": "error-state",
551
+ "title": "Failed to load",
552
+ "message": "@entity.errorMessage"
553
+ }
554
+ ]
555
+ ]
556
+ },
557
+ {
558
+ "from": "loading",
559
+ "to": "viewing_calendar",
560
+ "event": "RecurrenceSaved",
561
+ "effects": [
562
+ [
563
+ "render-ui",
564
+ "main",
565
+ {
566
+ "type": "loading-state",
567
+ "title": "Refreshing…"
568
+ }
569
+ ]
570
+ ]
571
+ },
572
+ {
573
+ "from": "loading",
574
+ "to": "error",
575
+ "event": "RecurrenceSaveFailed",
576
+ "effects": [
577
+ [
578
+ "set",
579
+ "@entity.errorMessage",
580
+ "@payload.error"
581
+ ],
582
+ [
583
+ "render-ui",
584
+ "main",
585
+ {
586
+ "type": "error-state",
587
+ "title": "Save failed",
588
+ "message": "@entity.errorMessage"
589
+ }
590
+ ]
591
+ ]
592
+ },
593
+ {
594
+ "from": "viewing_calendar",
595
+ "to": "defining_rule",
596
+ "event": "EDIT_RULE",
597
+ "effects": [
598
+ [
599
+ "render-ui",
600
+ "main",
601
+ {
602
+ "gap": "md",
603
+ "children": [
604
+ {
605
+ "align": "center",
606
+ "children": [
607
+ {
608
+ "icon": "arrow-left",
609
+ "label": "Back",
610
+ "variant": "ghost",
611
+ "action": "CANCEL_RULE",
612
+ "type": "button"
613
+ },
614
+ {
615
+ "name": "settings",
616
+ "type": "icon"
617
+ },
618
+ {
619
+ "type": "typography",
620
+ "content": "Recurrence Rule",
621
+ "variant": "h3"
622
+ }
623
+ ],
624
+ "direction": "horizontal",
625
+ "type": "stack",
626
+ "gap": "sm"
627
+ },
628
+ {
629
+ "type": "divider"
630
+ },
631
+ {
632
+ "cancelEvent": "CANCEL_RULE",
633
+ "type": "form-section",
634
+ "entity": "@entity",
635
+ "fields": "@config.formFields",
636
+ "mode": "edit",
637
+ "submitEvent": "SAVE_RULE"
638
+ }
639
+ ],
640
+ "type": "stack",
641
+ "direction": "vertical"
642
+ }
643
+ ]
644
+ ]
645
+ },
646
+ {
647
+ "from": "viewing_calendar",
648
+ "to": "awaiting_exception_decision",
649
+ "event": "OPEN_EXCEPTION",
650
+ "effects": [
651
+ [
652
+ "set",
653
+ "@entity.currentOccurrenceId",
654
+ "@payload.id"
655
+ ],
656
+ [
657
+ "set",
658
+ "@entity.currentOccurrenceDate",
659
+ "@payload.row.date"
660
+ ],
661
+ [
662
+ "set",
663
+ "@entity.currentOccurrenceLabel",
664
+ "@payload.row.label"
665
+ ],
666
+ [
667
+ "render-ui",
668
+ "main",
669
+ {
670
+ "gap": "md",
671
+ "children": [
672
+ {
673
+ "align": "center",
674
+ "children": [
675
+ {
676
+ "icon": "arrow-left",
677
+ "variant": "ghost",
678
+ "label": "Back",
679
+ "action": "CLOSE_EXCEPTION",
680
+ "type": "button"
681
+ },
682
+ {
683
+ "type": "icon",
684
+ "name": "calendar-x"
685
+ },
686
+ {
687
+ "type": "typography",
688
+ "variant": "h3",
689
+ "content": "@entity.currentOccurrenceLabel"
690
+ },
691
+ {
692
+ "type": "badge",
693
+ "label": "@entity.currentOccurrenceDate",
694
+ "variant": "primary"
695
+ }
696
+ ],
697
+ "type": "stack",
698
+ "direction": "horizontal",
699
+ "gap": "sm"
700
+ },
701
+ {
702
+ "type": "divider"
703
+ },
704
+ {
705
+ "type": "stack",
706
+ "direction": "horizontal",
707
+ "children": [
708
+ {
709
+ "action": "SKIP_OCCURRENCE",
710
+ "label": "Skip",
711
+ "icon": "skip-forward",
712
+ "actionPayload": {
713
+ "id": "@entity.currentOccurrenceId"
714
+ },
715
+ "type": "button",
716
+ "variant": "secondary"
717
+ },
718
+ {
719
+ "type": "button",
720
+ "actionPayload": {
721
+ "id": "@entity.currentOccurrenceId"
722
+ },
723
+ "action": "RESCHEDULE_OCCURRENCE",
724
+ "variant": "primary",
725
+ "label": "Reschedule",
726
+ "icon": "calendar-clock"
727
+ }
728
+ ],
729
+ "align": "center",
730
+ "gap": "sm"
731
+ }
732
+ ],
733
+ "type": "stack",
734
+ "direction": "vertical"
735
+ }
736
+ ]
737
+ ]
738
+ },
739
+ {
740
+ "from": "viewing_calendar",
741
+ "to": "cancelled",
742
+ "event": "CANCEL_SCHEDULE",
743
+ "effects": [
744
+ [
745
+ "render-ui",
746
+ "main",
747
+ {
748
+ "gap": "md",
749
+ "children": [
750
+ {
751
+ "children": [
752
+ {
753
+ "name": "x-circle",
754
+ "type": "icon"
755
+ },
756
+ {
757
+ "type": "typography",
758
+ "content": "Schedule Ended",
759
+ "variant": "h3"
760
+ }
761
+ ],
762
+ "direction": "horizontal",
763
+ "type": "stack",
764
+ "gap": "sm",
765
+ "align": "center"
766
+ },
767
+ {
768
+ "type": "divider"
769
+ },
770
+ {
771
+ "type": "typography",
772
+ "variant": "body",
773
+ "content": "This recurring schedule has been cancelled."
774
+ },
775
+ {
776
+ "action": "RESTART",
777
+ "label": "Restart",
778
+ "type": "button",
779
+ "variant": "secondary",
780
+ "icon": "rotate-ccw"
781
+ }
782
+ ],
783
+ "direction": "vertical",
784
+ "type": "stack"
785
+ }
786
+ ]
787
+ ]
788
+ },
789
+ {
790
+ "from": "defining_rule",
791
+ "to": "loading",
792
+ "event": "SAVE_RULE",
793
+ "effects": [
794
+ [
795
+ "render-ui",
796
+ "main",
797
+ {
798
+ "type": "loading-state",
799
+ "title": "Saving rule…"
800
+ }
801
+ ]
802
+ ]
803
+ },
804
+ {
805
+ "from": "defining_rule",
806
+ "to": "viewing_calendar",
807
+ "event": "CANCEL_RULE",
808
+ "effects": [
809
+ [
810
+ "render-ui",
811
+ "main",
812
+ {
813
+ "title": "Cancelling edit…",
814
+ "type": "loading-state"
815
+ }
816
+ ]
817
+ ]
818
+ },
819
+ {
820
+ "from": "awaiting_exception_decision",
821
+ "to": "loading",
822
+ "event": "SKIP_OCCURRENCE",
823
+ "effects": [
824
+ [
825
+ "render-ui",
826
+ "main",
827
+ {
828
+ "type": "loading-state",
829
+ "title": "Skipping occurrence…"
830
+ }
831
+ ]
832
+ ]
833
+ },
834
+ {
835
+ "from": "awaiting_exception_decision",
836
+ "to": "loading",
837
+ "event": "RESCHEDULE_OCCURRENCE",
838
+ "effects": [
839
+ [
840
+ "set",
841
+ "@entity.rescheduleDate",
842
+ "@payload.newDate"
843
+ ],
844
+ [
845
+ "render-ui",
846
+ "main",
847
+ {
848
+ "type": "loading-state",
849
+ "title": "Rescheduling…"
850
+ }
851
+ ]
852
+ ]
853
+ },
854
+ {
855
+ "from": "awaiting_exception_decision",
856
+ "to": "viewing_calendar",
857
+ "event": "CLOSE_EXCEPTION",
858
+ "effects": [
859
+ [
860
+ "render-ui",
861
+ "main",
862
+ {
863
+ "title": "Closing…",
864
+ "type": "loading-state"
865
+ }
866
+ ]
867
+ ]
868
+ },
869
+ {
870
+ "from": "cancelled",
871
+ "to": "loading",
872
+ "event": "RESTART",
873
+ "effects": [
874
+ [
875
+ "render-ui",
876
+ "main",
877
+ {
878
+ "type": "loading-state",
879
+ "title": "Restarting…"
880
+ }
881
+ ]
882
+ ]
883
+ },
884
+ {
885
+ "from": "error",
886
+ "to": "loading",
887
+ "event": "INIT",
888
+ "effects": [
889
+ [
890
+ "render-ui",
891
+ "main",
892
+ {
893
+ "title": "Retrying…",
894
+ "type": "loading-state"
895
+ }
896
+ ]
897
+ ]
898
+ }
899
+ ]
900
+ },
901
+ "config": {
902
+ "title": {
903
+ "type": "string",
904
+ "default": "Recurring Schedule"
905
+ },
906
+ "formFields": {
907
+ "type": "[string]",
908
+ "default": [
909
+ "frequency",
910
+ "interval",
911
+ "startDate",
912
+ "endDate",
913
+ "endAfterCount"
914
+ ]
915
+ },
916
+ "itemLabelField": {
917
+ "type": "string",
918
+ "default": "label"
919
+ }
920
+ },
921
+ "scope": "instance"
922
+ }
923
+ ],
924
+ "pages": [
925
+ {
926
+ "name": "RecurrencePage",
927
+ "path": "/recurrence",
928
+ "traits": [
929
+ {
930
+ "ref": "RecurrenceEditor"
931
+ }
932
+ ]
933
+ }
934
+ ]
935
+ }
936
+ ]
937
+ }