@almadar/std 14.26.0 → 14.27.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 (151) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  3. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  4. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  5. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  6. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  7. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  8. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  9. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  10. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  11. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  12. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  13. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  14. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  15. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  16. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  17. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  18. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  19. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  20. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  21. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  22. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  23. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  24. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  25. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  26. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  27. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  28. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  29. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  30. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  31. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  32. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  33. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  34. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  35. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  36. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  37. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  38. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  39. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  40. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  41. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  42. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  43. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  44. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  45. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  46. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  47. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  48. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  49. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  50. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  51. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  52. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  53. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  54. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  55. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  56. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  57. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  58. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  59. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  60. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  61. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  62. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  63. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  64. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  65. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  66. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  67. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  68. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  69. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  70. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  71. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  72. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  73. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  74. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  75. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  76. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  77. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  78. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  79. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  80. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  81. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  82. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  83. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  84. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  85. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  86. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  87. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  88. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  89. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  90. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  91. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  92. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  93. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  94. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  95. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  96. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  97. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  98. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  99. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  100. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  101. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  102. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  103. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  104. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  105. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  106. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  107. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  108. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  109. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  110. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  111. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  112. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  113. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  114. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  115. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  116. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  117. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  118. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  119. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  120. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  121. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  122. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  123. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  124. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  125. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  126. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  127. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  128. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  129. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  130. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  131. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  132. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  133. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  134. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  135. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  136. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  137. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  138. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  139. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  140. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  141. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  142. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  143. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  144. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  145. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  146. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  147. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  148. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  149. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  150. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  151. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-version-history",
3
3
  "version": "1.0.0",
4
- "description": "std-version-history — wiki/CMS revision history with diff + rollback. Owns a Revision entity (one row per saved version of a document); browses revisions in a data-grid, opens a side-by-side version-diff for any two picks, and persists a rollback by re-saving the chosen revision's content as a new update on the source document.",
4
+ "description": "std-version-history — wiki/CMS revision history with diff + rollback. Browses revisions; opens detail in `viewing_single`; compares two revisions in `comparing` with intrinsic version-diff; persists rollback.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "RevisionOrbital",
@@ -59,10 +59,10 @@
59
59
  "linkedEntity": "Revision",
60
60
  "emits": [
61
61
  {
62
- "event": "VIEW",
62
+ "event": "OPEN_REVISION",
63
63
  "payloadSchema": [
64
64
  {
65
- "name": "revisionId",
65
+ "name": "id",
66
66
  "type": "string",
67
67
  "required": true
68
68
  },
@@ -108,99 +108,27 @@
108
108
  }
109
109
  ]
110
110
  },
111
+ {
112
+ "event": "CLOSE_VIEW"
113
+ },
111
114
  {
112
115
  "event": "COMPARE",
113
116
  "payloadSchema": [
114
117
  {
115
- "name": "beforeId",
116
- "type": "string",
117
- "required": true
118
- },
119
- {
120
- "name": "afterId",
121
- "type": "string",
122
- "required": true
123
- },
124
- {
125
- "name": "beforeRow.id",
126
- "type": "string",
127
- "required": true
128
- },
129
- {
130
- "name": "beforeRow.documentId",
131
- "type": "string",
132
- "required": true
133
- },
134
- {
135
- "name": "beforeRow.documentType",
136
- "type": "string",
137
- "required": true
138
- },
139
- {
140
- "name": "beforeRow.versionNumber",
141
- "type": "number",
142
- "required": true
143
- },
144
- {
145
- "name": "beforeRow.authorId",
146
- "type": "string"
147
- },
148
- {
149
- "name": "beforeRow.authorName",
150
- "type": "string"
151
- },
152
- {
153
- "name": "beforeRow.content",
154
- "type": "string"
155
- },
156
- {
157
- "name": "beforeRow.summary",
158
- "type": "string"
159
- },
160
- {
161
- "name": "beforeRow.createdAt",
162
- "type": "string"
163
- },
164
- {
165
- "name": "afterRow.id",
118
+ "name": "id",
166
119
  "type": "string",
167
120
  "required": true
168
121
  },
169
122
  {
170
- "name": "afterRow.documentId",
123
+ "name": "beforeId",
171
124
  "type": "string",
172
125
  "required": true
173
126
  },
174
127
  {
175
- "name": "afterRow.documentType",
128
+ "name": "afterId",
176
129
  "type": "string",
177
130
  "required": true
178
131
  },
179
- {
180
- "name": "afterRow.versionNumber",
181
- "type": "number",
182
- "required": true
183
- },
184
- {
185
- "name": "afterRow.authorId",
186
- "type": "string"
187
- },
188
- {
189
- "name": "afterRow.authorName",
190
- "type": "string"
191
- },
192
- {
193
- "name": "afterRow.content",
194
- "type": "string"
195
- },
196
- {
197
- "name": "afterRow.summary",
198
- "type": "string"
199
- },
200
- {
201
- "name": "afterRow.createdAt",
202
- "type": "string"
203
- },
204
132
  {
205
133
  "name": "revisions",
206
134
  "type": "[Revision]"
@@ -214,51 +142,6 @@
214
142
  "name": "id",
215
143
  "type": "string",
216
144
  "required": true
217
- },
218
- {
219
- "name": "revisionId",
220
- "type": "string",
221
- "required": true
222
- },
223
- {
224
- "name": "row.id",
225
- "type": "string",
226
- "required": true
227
- },
228
- {
229
- "name": "row.documentId",
230
- "type": "string",
231
- "required": true
232
- },
233
- {
234
- "name": "row.documentType",
235
- "type": "string",
236
- "required": true
237
- },
238
- {
239
- "name": "row.versionNumber",
240
- "type": "number",
241
- "required": true
242
- },
243
- {
244
- "name": "row.authorId",
245
- "type": "string"
246
- },
247
- {
248
- "name": "row.authorName",
249
- "type": "string"
250
- },
251
- {
252
- "name": "row.content",
253
- "type": "string"
254
- },
255
- {
256
- "name": "row.summary",
257
- "type": "string"
258
- },
259
- {
260
- "name": "row.createdAt",
261
- "type": "string"
262
145
  }
263
146
  ]
264
147
  },
@@ -352,6 +235,9 @@
352
235
  {
353
236
  "name": "browsing"
354
237
  },
238
+ {
239
+ "name": "viewing_single"
240
+ },
355
241
  {
356
242
  "name": "comparing"
357
243
  },
@@ -375,8 +261,18 @@
375
261
  ]
376
262
  },
377
263
  {
378
- "key": "RevisionLoadFailed",
379
- "name": "Revision load failed",
264
+ "key": "RevisionRolledBack",
265
+ "name": "Revision rolled back",
266
+ "payloadSchema": [
267
+ {
268
+ "name": "row",
269
+ "type": "Revision"
270
+ }
271
+ ]
272
+ },
273
+ {
274
+ "key": "RevisionRollbackFailed",
275
+ "name": "Revision rollback failed",
380
276
  "payloadSchema": [
381
277
  {
382
278
  "name": "error",
@@ -389,45 +285,31 @@
389
285
  ]
390
286
  },
391
287
  {
392
- "key": "VIEW",
393
- "name": "View",
288
+ "key": "RevisionLoadFailed",
289
+ "name": "Revision load failed",
394
290
  "payloadSchema": [
395
291
  {
396
- "name": "revisionId",
397
- "type": "string",
398
- "required": true
292
+ "name": "error",
293
+ "type": "string"
399
294
  },
400
295
  {
401
- "name": "row",
402
- "type": "Revision"
296
+ "name": "code",
297
+ "type": "string"
403
298
  }
404
299
  ]
405
300
  },
406
301
  {
407
- "key": "COMPARE",
408
- "name": "Compare",
302
+ "key": "OPEN_REVISION",
303
+ "name": "Open Revision",
409
304
  "payloadSchema": [
410
305
  {
411
- "name": "beforeId",
412
- "type": "string",
413
- "required": true
414
- },
415
- {
416
- "name": "afterId",
306
+ "name": "id",
417
307
  "type": "string",
418
308
  "required": true
419
309
  },
420
310
  {
421
- "name": "beforeRow",
422
- "type": "Revision"
423
- },
424
- {
425
- "name": "afterRow",
311
+ "name": "row",
426
312
  "type": "Revision"
427
- },
428
- {
429
- "name": "revisions",
430
- "type": "[Revision]"
431
313
  }
432
314
  ]
433
315
  },
@@ -439,39 +321,35 @@
439
321
  "name": "id",
440
322
  "type": "string",
441
323
  "required": true
442
- },
443
- {
444
- "name": "revisionId",
445
- "type": "string",
446
- "required": true
447
- },
448
- {
449
- "name": "row",
450
- "type": "Revision"
451
324
  }
452
325
  ]
453
326
  },
454
327
  {
455
- "key": "RevisionRolledBack",
456
- "name": "Revision rolled back",
457
- "payloadSchema": [
458
- {
459
- "name": "row",
460
- "type": "Revision"
461
- }
462
- ]
328
+ "key": "CLOSE_VIEW",
329
+ "name": "Close View"
463
330
  },
464
331
  {
465
- "key": "RevisionRollbackFailed",
466
- "name": "Revision rollback failed",
332
+ "key": "COMPARE",
333
+ "name": "Compare",
467
334
  "payloadSchema": [
468
335
  {
469
- "name": "error",
470
- "type": "string"
336
+ "name": "id",
337
+ "type": "string",
338
+ "required": true
471
339
  },
472
340
  {
473
- "name": "code",
474
- "type": "string"
341
+ "name": "beforeId",
342
+ "type": "string",
343
+ "required": true
344
+ },
345
+ {
346
+ "name": "afterId",
347
+ "type": "string",
348
+ "required": true
349
+ },
350
+ {
351
+ "name": "revisions",
352
+ "type": "[Revision]"
475
353
  }
476
354
  ]
477
355
  }
@@ -487,8 +365,8 @@
487
365
  "Revision",
488
366
  {
489
367
  "emit": {
490
- "failure": "RevisionLoadFailed",
491
- "success": "RevisionLoaded"
368
+ "success": "RevisionLoaded",
369
+ "failure": "RevisionLoadFailed"
492
370
  }
493
371
  }
494
372
  ],
@@ -496,22 +374,22 @@
496
374
  "render-ui",
497
375
  "main",
498
376
  {
499
- "gap": "md",
500
- "type": "stack",
377
+ "direction": "vertical",
501
378
  "className": "py-12",
502
379
  "children": [
503
380
  {
504
381
  "type": "spinner"
505
382
  },
506
383
  {
507
- "type": "typography",
508
384
  "content": "Loading version history…",
509
- "variant": "caption",
510
- "color": "muted"
385
+ "type": "typography",
386
+ "color": "muted",
387
+ "variant": "caption"
511
388
  }
512
389
  ],
513
- "direction": "vertical",
514
- "align": "center"
390
+ "align": "center",
391
+ "gap": "md",
392
+ "type": "stack"
515
393
  }
516
394
  ]
517
395
  ]
@@ -525,24 +403,56 @@
525
403
  "render-ui",
526
404
  "main",
527
405
  {
406
+ "type": "stack",
528
407
  "direction": "vertical",
529
408
  "gap": "md",
530
409
  "children": [
531
410
  {
532
- "gap": "sm",
533
411
  "direction": "horizontal",
534
- "type": "stack",
412
+ "gap": "sm",
413
+ "align": "center",
535
414
  "children": [
536
415
  {
537
416
  "name": "history",
538
417
  "type": "icon"
539
418
  },
540
419
  {
420
+ "content": "@config.title",
541
421
  "type": "typography",
542
- "variant": "h3",
543
- "content": "@config.title"
422
+ "variant": "h3"
544
423
  }
545
- ]
424
+ ],
425
+ "type": "stack"
426
+ },
427
+ {
428
+ "children": [
429
+ {
430
+ "type": "stat-display",
431
+ "value": "@payload.data.length",
432
+ "icon": "history",
433
+ "label": "Total revisions"
434
+ },
435
+ {
436
+ "value": "6",
437
+ "icon": "users",
438
+ "type": "stat-display",
439
+ "label": "Authors"
440
+ },
441
+ {
442
+ "value": "14",
443
+ "label": "Saves this week",
444
+ "icon": "save",
445
+ "type": "stat-display"
446
+ },
447
+ {
448
+ "label": "Rollbacks",
449
+ "type": "stat-display",
450
+ "icon": "rotate-ccw",
451
+ "value": "2"
452
+ }
453
+ ],
454
+ "cols": 4.0,
455
+ "type": "simple-grid"
546
456
  },
547
457
  {
548
458
  "type": "divider"
@@ -551,40 +461,34 @@
551
461
  "gap": "sm",
552
462
  "itemActions": [
553
463
  {
554
- "event": "VIEW",
555
- "label": "View",
556
- "variant": "secondary",
557
- "icon": "eye"
558
- },
559
- {
560
- "label": "Compare",
561
- "event": "COMPARE",
562
- "icon": "git-compare",
563
- "variant": "secondary"
464
+ "variant": "primary",
465
+ "label": "Open",
466
+ "event": "OPEN_REVISION",
467
+ "icon": "arrow-right"
564
468
  },
565
469
  {
566
- "label": "Rollback",
567
- "variant": "primary",
470
+ "variant": "danger",
568
471
  "icon": "rotate-ccw",
472
+ "label": "Rollback",
569
473
  "event": "ROLLBACK"
570
474
  }
571
475
  ],
572
- "type": "data-grid",
476
+ "cols": 1.0,
573
477
  "fields": [
574
478
  {
575
- "variant": "badge",
479
+ "name": "versionNumber",
576
480
  "label": "Version",
577
- "name": "versionNumber"
481
+ "variant": "badge"
578
482
  },
579
483
  {
580
- "label": "Author",
581
484
  "variant": "caption",
582
- "name": "authorName"
485
+ "name": "authorName",
486
+ "label": "Author"
583
487
  },
584
488
  {
585
489
  "variant": "caption",
586
- "name": "summary",
587
- "label": "Summary"
490
+ "label": "Summary",
491
+ "name": "summary"
588
492
  },
589
493
  {
590
494
  "label": "Saved",
@@ -592,35 +496,67 @@
592
496
  "name": "createdAt"
593
497
  }
594
498
  ],
595
- "cols": 1.0,
499
+ "type": "data-grid",
596
500
  "entity": "@payload.data"
597
501
  }
598
- ],
599
- "type": "stack"
502
+ ]
600
503
  }
601
504
  ]
602
505
  ]
603
506
  },
604
507
  {
605
508
  "from": "loading",
606
- "to": "error",
607
- "event": "RevisionLoadFailed",
509
+ "to": "loading",
510
+ "event": "RevisionRolledBack",
608
511
  "effects": [
609
512
  [
610
- "render-ui",
611
- "main",
513
+ "fetch",
514
+ "Revision",
612
515
  {
613
- "variant": "error",
614
- "type": "alert",
615
- "message": "@payload.error"
616
- }
617
- ]
618
- ]
516
+ "emit": {
517
+ "success": "RevisionLoaded",
518
+ "failure": "RevisionLoadFailed"
519
+ }
520
+ }
521
+ ]
522
+ ]
523
+ },
524
+ {
525
+ "from": "loading",
526
+ "to": "error",
527
+ "event": "RevisionRollbackFailed",
528
+ "effects": [
529
+ [
530
+ "render-ui",
531
+ "main",
532
+ {
533
+ "variant": "error",
534
+ "message": "@payload.error",
535
+ "type": "alert"
536
+ }
537
+ ]
538
+ ]
539
+ },
540
+ {
541
+ "from": "loading",
542
+ "to": "error",
543
+ "event": "RevisionLoadFailed",
544
+ "effects": [
545
+ [
546
+ "render-ui",
547
+ "main",
548
+ {
549
+ "type": "alert",
550
+ "variant": "error",
551
+ "message": "@payload.error"
552
+ }
553
+ ]
554
+ ]
619
555
  },
620
556
  {
621
557
  "from": "browsing",
622
- "to": "browsing",
623
- "event": "VIEW",
558
+ "to": "viewing_single",
559
+ "event": "OPEN_REVISION",
624
560
  "effects": [
625
561
  [
626
562
  "set",
@@ -672,124 +608,267 @@
672
608
  "main",
673
609
  {
674
610
  "type": "stack",
675
- "direction": "vertical",
676
611
  "children": [
677
612
  {
678
613
  "direction": "horizontal",
679
614
  "gap": "sm",
615
+ "align": "center",
616
+ "type": "stack",
680
617
  "children": [
618
+ {
619
+ "variant": "ghost",
620
+ "type": "button",
621
+ "label": "Back",
622
+ "action": "CLOSE_VIEW"
623
+ },
681
624
  {
682
625
  "type": "icon",
683
626
  "name": "file-text"
684
627
  },
685
628
  {
686
- "type": "typography",
687
629
  "variant": "h3",
688
- "content": "@entity.summary"
630
+ "content": "@entity.summary",
631
+ "type": "typography"
632
+ },
633
+ {
634
+ "type": "badge",
635
+ "label": "@entity.versionNumber",
636
+ "variant": "default"
689
637
  }
690
- ],
691
- "type": "stack"
638
+ ]
639
+ },
640
+ {
641
+ "type": "divider"
692
642
  },
693
643
  {
644
+ "direction": "vertical",
694
645
  "type": "stack",
695
- "direction": "horizontal",
696
646
  "children": [
697
647
  {
698
- "content": "@entity.authorName",
699
- "variant": "caption",
700
- "type": "typography",
701
- "color": "muted"
648
+ "children": [
649
+ {
650
+ "content": "Author",
651
+ "color": "muted",
652
+ "type": "typography",
653
+ "variant": "caption"
654
+ },
655
+ {
656
+ "content": "@entity.authorName",
657
+ "type": "typography",
658
+ "variant": "body"
659
+ }
660
+ ],
661
+ "direction": "horizontal",
662
+ "gap": "md",
663
+ "type": "stack"
702
664
  },
703
665
  {
704
- "content": "@entity.createdAt",
705
- "variant": "caption",
706
- "color": "muted",
707
- "type": "typography"
666
+ "direction": "horizontal",
667
+ "gap": "md",
668
+ "type": "stack",
669
+ "children": [
670
+ {
671
+ "variant": "caption",
672
+ "content": "Saved",
673
+ "type": "typography",
674
+ "color": "muted"
675
+ },
676
+ {
677
+ "variant": "body",
678
+ "type": "typography",
679
+ "content": "@entity.createdAt"
680
+ }
681
+ ]
682
+ },
683
+ {
684
+ "children": [
685
+ {
686
+ "content": "Content",
687
+ "variant": "caption",
688
+ "color": "muted",
689
+ "type": "typography"
690
+ },
691
+ {
692
+ "content": "@entity.content",
693
+ "variant": "body",
694
+ "type": "typography"
695
+ }
696
+ ],
697
+ "type": "stack",
698
+ "direction": "horizontal",
699
+ "gap": "md"
708
700
  }
709
701
  ],
710
- "gap": "md"
702
+ "gap": "sm"
711
703
  },
712
704
  {
713
705
  "type": "divider"
714
706
  },
715
707
  {
716
- "variant": "body",
717
- "type": "typography",
718
- "content": "@entity.content"
708
+ "children": [
709
+ {
710
+ "type": "stat-display",
711
+ "value": "@entity.versionNumber",
712
+ "icon": "tag",
713
+ "label": "Version"
714
+ },
715
+ {
716
+ "value": "@entity.documentId",
717
+ "label": "Document",
718
+ "icon": "file",
719
+ "type": "stat-display"
720
+ },
721
+ {
722
+ "label": "Type",
723
+ "type": "stat-display",
724
+ "value": "@entity.documentType",
725
+ "icon": "layers"
726
+ }
727
+ ],
728
+ "cols": 3.0,
729
+ "type": "simple-grid"
719
730
  },
720
731
  {
721
- "label": "Back",
722
- "variant": "secondary",
723
- "type": "button",
724
- "action": "INIT",
725
- "icon": "arrow-left"
732
+ "gap": "sm",
733
+ "align": "center",
734
+ "direction": "horizontal",
735
+ "type": "stack",
736
+ "children": [
737
+ {
738
+ "type": "button",
739
+ "variant": "secondary",
740
+ "label": "Compare",
741
+ "action": "COMPARE",
742
+ "actionPayload": {
743
+ "id": "@entity.id"
744
+ }
745
+ },
746
+ {
747
+ "actionPayload": {
748
+ "id": "@entity.id"
749
+ },
750
+ "label": "Rollback",
751
+ "action": "ROLLBACK",
752
+ "type": "button",
753
+ "variant": "danger"
754
+ }
755
+ ]
726
756
  }
727
757
  ],
728
- "gap": "md"
758
+ "gap": "md",
759
+ "direction": "vertical"
729
760
  }
730
761
  ]
731
762
  ]
732
763
  },
733
764
  {
734
765
  "from": "browsing",
735
- "to": "comparing",
736
- "event": "COMPARE",
766
+ "to": "loading",
767
+ "event": "ROLLBACK",
737
768
  "effects": [
738
769
  [
739
770
  "set",
740
771
  "@entity.id",
741
- "@payload.afterRow.id"
772
+ "@payload.id"
742
773
  ],
743
774
  [
744
- "set",
745
- "@entity.documentId",
746
- "@payload.afterRow.documentId"
747
- ],
748
- [
749
- "set",
750
- "@entity.documentType",
751
- "@payload.afterRow.documentType"
752
- ],
753
- [
754
- "set",
755
- "@entity.versionNumber",
756
- "@payload.afterRow.versionNumber"
757
- ],
758
- [
759
- "set",
760
- "@entity.authorId",
761
- "@payload.afterRow.authorId"
775
+ "fetch",
776
+ "Revision",
777
+ {
778
+ "emit": {
779
+ "failure": "RevisionLoadFailed",
780
+ "success": "RevisionLoaded"
781
+ }
782
+ }
762
783
  ],
763
784
  [
764
- "set",
765
- "@entity.authorName",
766
- "@payload.afterRow.authorName"
767
- ],
785
+ "render-ui",
786
+ "main",
787
+ {
788
+ "align": "center",
789
+ "gap": "md",
790
+ "children": [
791
+ {
792
+ "type": "spinner"
793
+ },
794
+ {
795
+ "variant": "caption",
796
+ "content": "Rolling back…",
797
+ "color": "muted",
798
+ "type": "typography"
799
+ }
800
+ ],
801
+ "type": "stack",
802
+ "className": "py-12",
803
+ "direction": "vertical"
804
+ }
805
+ ]
806
+ ]
807
+ },
808
+ {
809
+ "from": "viewing_single",
810
+ "to": "loading",
811
+ "event": "CLOSE_VIEW",
812
+ "effects": [
768
813
  [
769
- "set",
770
- "@entity.content",
771
- "@payload.afterRow.content"
814
+ "fetch",
815
+ "Revision",
816
+ {
817
+ "emit": {
818
+ "success": "RevisionLoaded",
819
+ "failure": "RevisionLoadFailed"
820
+ }
821
+ }
772
822
  ],
773
823
  [
774
- "set",
775
- "@entity.summary",
776
- "@payload.afterRow.summary"
777
- ],
824
+ "render-ui",
825
+ "main",
826
+ {
827
+ "align": "center",
828
+ "gap": "md",
829
+ "className": "py-12",
830
+ "type": "stack",
831
+ "direction": "vertical",
832
+ "children": [
833
+ {
834
+ "type": "spinner"
835
+ },
836
+ {
837
+ "variant": "caption",
838
+ "type": "typography",
839
+ "content": "Loading version history…",
840
+ "color": "muted"
841
+ }
842
+ ]
843
+ }
844
+ ]
845
+ ]
846
+ },
847
+ {
848
+ "from": "viewing_single",
849
+ "to": "comparing",
850
+ "event": "COMPARE",
851
+ "effects": [
778
852
  [
779
853
  "set",
780
- "@entity.createdAt",
781
- "@payload.afterRow.createdAt"
854
+ "@entity.id",
855
+ "@payload.id"
782
856
  ],
783
857
  [
784
858
  "render-ui",
785
859
  "main",
786
860
  {
861
+ "type": "stack",
787
862
  "children": [
788
863
  {
789
- "gap": "sm",
790
- "type": "stack",
791
- "direction": "horizontal",
864
+ "align": "center",
792
865
  "children": [
866
+ {
867
+ "action": "CLOSE_VIEW",
868
+ "type": "button",
869
+ "label": "Back",
870
+ "variant": "ghost"
871
+ },
793
872
  {
794
873
  "type": "icon",
795
874
  "name": "git-compare"
@@ -799,102 +878,94 @@
799
878
  "variant": "h3",
800
879
  "content": "Compare versions"
801
880
  }
802
- ]
881
+ ],
882
+ "direction": "horizontal",
883
+ "type": "stack",
884
+ "gap": "sm"
803
885
  },
804
886
  {
805
887
  "type": "divider"
806
888
  },
807
889
  {
808
- "type": "version-diff",
809
890
  "afterId": "@payload.afterId",
810
- "view": "side-by-side",
811
- "revisions": "@payload.revisions",
891
+ "type": "version-diff",
892
+ "beforeId": "@payload.beforeId",
812
893
  "onRevert": "ROLLBACK",
813
- "beforeId": "@payload.beforeId"
894
+ "view": "side-by-side",
895
+ "revisions": "@payload.revisions"
814
896
  },
815
897
  {
816
- "action": "INIT",
817
- "icon": "arrow-left",
818
- "type": "button",
819
- "label": "Back",
820
- "variant": "secondary"
898
+ "type": "stack",
899
+ "align": "center",
900
+ "children": [
901
+ {
902
+ "type": "button",
903
+ "label": "Rollback",
904
+ "variant": "danger",
905
+ "action": "ROLLBACK",
906
+ "actionPayload": {
907
+ "id": "@entity.id"
908
+ }
909
+ }
910
+ ],
911
+ "direction": "horizontal",
912
+ "gap": "sm"
821
913
  }
822
914
  ],
823
- "gap": "md",
824
- "type": "stack",
825
- "direction": "vertical"
915
+ "direction": "vertical",
916
+ "gap": "md"
826
917
  }
827
918
  ]
828
919
  ]
829
920
  },
830
921
  {
831
- "from": "browsing",
832
- "to": "browsing",
922
+ "from": "viewing_single",
923
+ "to": "loading",
833
924
  "event": "ROLLBACK",
834
925
  "effects": [
835
926
  [
836
927
  "set",
837
928
  "@entity.id",
838
- "@payload.row.documentId"
839
- ],
840
- [
841
- "set",
842
- "@entity.documentId",
843
- "@payload.row.documentId"
844
- ],
845
- [
846
- "set",
847
- "@entity.documentType",
848
- "@payload.row.documentType"
849
- ],
850
- [
851
- "set",
852
- "@entity.versionNumber",
853
- "@payload.row.versionNumber"
854
- ],
855
- [
856
- "set",
857
- "@entity.authorId",
858
- "@payload.row.authorId"
929
+ "@payload.id"
859
930
  ],
860
931
  [
861
- "set",
862
- "@entity.authorName",
863
- "@payload.row.authorName"
864
- ],
865
- [
866
- "set",
867
- "@entity.content",
868
- "@payload.row.content"
869
- ],
870
- [
871
- "set",
872
- "@entity.summary",
873
- "@payload.row.summary"
874
- ],
875
- [
876
- "set",
877
- "@entity.createdAt",
878
- "@payload.row.createdAt"
879
- ],
880
- [
881
- "persist",
882
- "update",
932
+ "fetch",
883
933
  "Revision",
884
- "@entity",
885
934
  {
886
935
  "emit": {
887
- "success": "RevisionRolledBack",
888
- "failure": "RevisionRollbackFailed"
936
+ "success": "RevisionLoaded",
937
+ "failure": "RevisionLoadFailed"
889
938
  }
890
939
  }
940
+ ],
941
+ [
942
+ "render-ui",
943
+ "main",
944
+ {
945
+ "direction": "vertical",
946
+ "className": "py-12",
947
+ "gap": "md",
948
+ "children": [
949
+ {
950
+ "type": "spinner"
951
+ },
952
+ {
953
+ "variant": "caption",
954
+ "color": "muted",
955
+ "type": "typography",
956
+ "content": "Rolling back…"
957
+ }
958
+ ],
959
+ "type": "stack",
960
+ "align": "center"
961
+ }
891
962
  ]
892
963
  ]
893
964
  },
894
965
  {
895
- "from": "browsing",
966
+ "from": "comparing",
896
967
  "to": "loading",
897
- "event": "RevisionRolledBack",
968
+ "event": "CLOSE_VIEW",
898
969
  "effects": [
899
970
  [
900
971
  "fetch",
@@ -905,94 +976,41 @@
905
976
  "failure": "RevisionLoadFailed"
906
977
  }
907
978
  }
908
- ]
909
- ]
910
- },
911
- {
912
- "from": "browsing",
913
- "to": "browsing",
914
- "event": "RevisionRollbackFailed",
915
- "effects": [
979
+ ],
916
980
  [
917
981
  "render-ui",
918
982
  "main",
919
983
  {
920
- "message": "@payload.error",
921
- "type": "alert",
922
- "variant": "error"
984
+ "type": "stack",
985
+ "direction": "vertical",
986
+ "align": "center",
987
+ "className": "py-12",
988
+ "children": [
989
+ {
990
+ "type": "spinner"
991
+ },
992
+ {
993
+ "type": "typography",
994
+ "color": "muted",
995
+ "variant": "caption",
996
+ "content": "Loading version history…"
997
+ }
998
+ ],
999
+ "gap": "md"
923
1000
  }
924
1001
  ]
925
1002
  ]
926
1003
  },
927
1004
  {
928
1005
  "from": "comparing",
929
- "to": "browsing",
1006
+ "to": "loading",
930
1007
  "event": "ROLLBACK",
931
1008
  "effects": [
932
1009
  [
933
1010
  "set",
934
1011
  "@entity.id",
935
- "@payload.row.documentId"
936
- ],
937
- [
938
- "set",
939
- "@entity.documentId",
940
- "@payload.row.documentId"
941
- ],
942
- [
943
- "set",
944
- "@entity.documentType",
945
- "@payload.row.documentType"
946
- ],
947
- [
948
- "set",
949
- "@entity.versionNumber",
950
- "@payload.row.versionNumber"
951
- ],
952
- [
953
- "set",
954
- "@entity.authorId",
955
- "@payload.row.authorId"
956
- ],
957
- [
958
- "set",
959
- "@entity.authorName",
960
- "@payload.row.authorName"
961
- ],
962
- [
963
- "set",
964
- "@entity.content",
965
- "@payload.row.content"
966
- ],
967
- [
968
- "set",
969
- "@entity.summary",
970
- "@payload.row.summary"
971
- ],
972
- [
973
- "set",
974
- "@entity.createdAt",
975
- "@payload.row.createdAt"
1012
+ "@payload.id"
976
1013
  ],
977
- [
978
- "persist",
979
- "update",
980
- "Revision",
981
- "@entity",
982
- {
983
- "emit": {
984
- "failure": "RevisionRollbackFailed",
985
- "success": "RevisionRolledBack"
986
- }
987
- }
988
- ]
989
- ]
990
- },
991
- {
992
- "from": "comparing",
993
- "to": "loading",
994
- "event": "RevisionRolledBack",
995
- "effects": [
996
1014
  [
997
1015
  "fetch",
998
1016
  "Revision",
@@ -1002,21 +1020,27 @@
1002
1020
  "success": "RevisionLoaded"
1003
1021
  }
1004
1022
  }
1005
- ]
1006
- ]
1007
- },
1008
- {
1009
- "from": "comparing",
1010
- "to": "comparing",
1011
- "event": "RevisionRollbackFailed",
1012
- "effects": [
1023
+ ],
1013
1024
  [
1014
1025
  "render-ui",
1015
1026
  "main",
1016
1027
  {
1017
- "variant": "error",
1018
- "type": "alert",
1019
- "message": "@payload.error"
1028
+ "className": "py-12",
1029
+ "align": "center",
1030
+ "gap": "md",
1031
+ "children": [
1032
+ {
1033
+ "type": "spinner"
1034
+ },
1035
+ {
1036
+ "content": "Rolling back…",
1037
+ "variant": "caption",
1038
+ "type": "typography",
1039
+ "color": "muted"
1040
+ }
1041
+ ],
1042
+ "direction": "vertical",
1043
+ "type": "stack"
1020
1044
  }
1021
1045
  ]
1022
1046
  ]