@almadar/std 16.230.0 → 16.232.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 (46) hide show
  1. package/behaviors/behaviors-registry.json +5214 -970
  2. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +36 -3
  3. package/behaviors/lolo/ui/core/atoms/std-language-picker.lolo +52 -0
  4. package/behaviors/lolo/ui/core/atoms/std-site-header.lolo +77 -15
  5. package/behaviors/lolo/ui/core/atoms/std-step-flow.lolo +1 -0
  6. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +38 -65
  7. package/behaviors/lolo/ui/core/molecules/ui-change-list.lolo +57 -0
  8. package/behaviors/lolo/ui/core/molecules/ui-commit-row.lolo +143 -0
  9. package/behaviors/lolo/ui/core/molecules/ui-header.lolo +1 -0
  10. package/behaviors/lolo/ui/core/molecules/ui-icon-button.lolo +105 -0
  11. package/behaviors/lolo/ui/core/molecules/ui-menu.lolo +1 -0
  12. package/behaviors/lolo/ui/core/molecules/ui-top-nav-item.lolo +53 -0
  13. package/behaviors/lolo/ui/core/molecules/ui-version-diff.lolo +19 -3
  14. package/behaviors/lolo/ui/core/organisms/ui-dock-layout.lolo +35 -5
  15. package/behaviors/lolo/ui/game/atoms/ui-canvas.lolo +1 -0
  16. package/behaviors/lolo-behavior-contracts.json +1 -1
  17. package/behaviors/registry/factory-signatures.json +1 -1
  18. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +52 -3
  19. package/behaviors/registry/ui/core/atoms/std-language-picker.orb +285 -0
  20. package/behaviors/registry/ui/core/atoms/std-site-header.orb +348 -74
  21. package/behaviors/registry/ui/core/atoms/std-step-flow.orb +2 -1
  22. package/behaviors/registry/ui/core/atoms/std-version-history.orb +470 -346
  23. package/behaviors/registry/ui/core/molecules/ui-change-list.orb +290 -0
  24. package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +441 -0
  25. package/behaviors/registry/ui/core/molecules/ui-header.orb +43 -0
  26. package/behaviors/registry/ui/core/molecules/ui-icon-button.orb +418 -0
  27. package/behaviors/registry/ui/core/molecules/ui-menu.orb +13 -0
  28. package/behaviors/registry/ui/core/molecules/ui-top-nav-item.orb +277 -0
  29. package/behaviors/registry/ui/core/molecules/ui-version-diff.orb +109 -18
  30. package/behaviors/registry/ui/core/organisms/ui-dock-layout.orb +43 -5
  31. package/behaviors/registry/ui/game/atoms/ui-canvas.orb +8 -0
  32. package/dist/behaviors/exports-reader.js +3116 -2657
  33. package/dist/behaviors/functions/index.d.ts +437 -35
  34. package/dist/behaviors/functions/index.js +3100 -2657
  35. package/dist/behaviors/index.d.ts +1 -1
  36. package/dist/behaviors/index.js +3117 -2658
  37. package/dist/behaviors/query.js +3116 -2657
  38. package/dist/behaviors-embeddings.hash.json +3 -3
  39. package/dist/behaviors-embeddings.json +39 -7
  40. package/dist/behaviors-registry.json +5214 -970
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +3117 -2658
  43. package/dist/knob-embeddings.hash.json +3 -3
  44. package/dist/knob-embeddings.json +217 -13
  45. package/dist/registry/factory-signatures.json +1 -1
  46. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "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. `RevisionManage` is a rebindable single-entity trait: a consumer rebinds it to its own entity via `linkedEntity`. `config.scopeField` names the Revision field holding the parent document id; a page-mounted `{id}` route param scopes INIT's own fetch, and a consumer forwards SHOW_HISTORY { key } (via a `listens` override) to rescope the feed to one document — empty scopeField (default) or no id keeps today's unfiltered global feed. Rollback and retry refetches stay scoped.",
2
+ "description": "std-version-history — wiki/CMS revision history with diff + rollback. Browses revisions; opens detail in `viewing_single`; compares the opened revision with the newest in `comparing`; Rollback emits RevisionRolledBack { row } for the consumer to restore onto its source document. `RevisionManage` is a rebindable single-entity trait: a consumer rebinds it to its own entity via `linkedEntity`. `config.scopeField` names the Revision field holding the parent document id; a page-mounted `{id}` route param scopes INIT's own fetch, and a consumer forwards SHOW_HISTORY { key } (via a `listens` override) to rescope the feed to one document — empty scopeField (default) or no id keeps today's unfiltered global feed. Rollback and retry refetches stay scoped.",
3
3
  "ledger": {
4
4
  "entries": {
5
5
  "ent_01KXG04HV98PSNYWMGHCREKPA4": {
@@ -55,15 +55,6 @@
55
55
  "parent": "trt_01KXG04HV9PK97EVFG9ZP3V3V4",
56
56
  "renames": []
57
57
  },
58
- "evt_01KXG04HVBH229SNRGQZE7P45W": {
59
- "bakedName": "RevisionRollbackFailed",
60
- "curName": "RevisionRollbackFailed",
61
- "id": "evt_01KXG04HVBH229SNRGQZE7P45W",
62
- "kind": "event",
63
- "owner": "workspace",
64
- "parent": "trt_01KXG04HV9PK97EVFG9ZP3V3V4",
65
- "renames": []
66
- },
67
58
  "evt_01KXG04HVBM6NSHVBM3KEDER8C": {
68
59
  "bakedName": "CLOSE_VIEW",
69
60
  "curName": "CLOSE_VIEW",
@@ -172,7 +163,7 @@
172
163
  "type": "string"
173
164
  },
174
165
  {
175
- "description": "The snapshotted body of the revision — plain text or the rich-text HTML a document-look record carries. Rollback hands the whole row back to the host, which restores content onto the source document.",
166
+ "description": "The snapshotted body of the revision — plain text or the rich-text HTML a document-look record carries. Rollback emits RevisionRolledBack { row }; the consumer restores row.content onto its source document.",
176
167
  "name": "content",
177
168
  "synonyms": "text, body, data, value",
178
169
  "type": "string"
@@ -202,6 +193,19 @@
202
193
  "name": "scopeKey",
203
194
  "synonyms": "scope, filter key, document scope",
204
195
  "type": "string"
196
+ },
197
+ {
198
+ "default": [],
199
+ "description": "The loaded revisions, newest first — what Compare diffs against.",
200
+ "intrinsic": true,
201
+ "name": "revisions",
202
+ "relation": {
203
+ "cardinality": "many",
204
+ "entity": "Revision",
205
+ "entityId": "ent_01KXG04HV98PSNYWMGHCREKPA4"
206
+ },
207
+ "synonyms": "versions, history",
208
+ "type": "relation"
205
209
  }
206
210
  ],
207
211
  "id": "ent_01KXG04HV98PSNYWMGHCREKPA4",
@@ -272,11 +276,11 @@
272
276
  },
273
277
  "effectRow": [
274
278
  {
275
- "kind": "fetch",
276
- "resource": "Revision"
279
+ "kind": "emit",
280
+ "resource": "RevisionRolledBack"
277
281
  },
278
282
  {
279
- "kind": "persist",
283
+ "kind": "fetch",
280
284
  "resource": "Revision"
281
285
  },
282
286
  {
@@ -311,6 +315,10 @@
311
315
  "kind": "set",
312
316
  "resource": "@entity.id"
313
317
  },
318
+ {
319
+ "kind": "set",
320
+ "resource": "@entity.revisions"
321
+ },
314
322
  {
315
323
  "kind": "set",
316
324
  "resource": "@entity.scopeKey"
@@ -386,6 +394,10 @@
386
394
  {
387
395
  "name": "scopeKey",
388
396
  "type": "string"
397
+ },
398
+ {
399
+ "name": "revisions",
400
+ "type": "[Revision]"
389
401
  }
390
402
  ],
391
403
  "type": "object"
@@ -402,7 +414,7 @@
402
414
  "tier": "domain"
403
415
  },
404
416
  {
405
- "description": "Signals a request to compare two versions.",
417
+ "description": "Signals a request to compare the opened revision with the newest one.",
406
418
  "event": "COMPARE",
407
419
  "eventId": "evt_01KXG04HVBEZ06BVBH4XD7GTKS",
408
420
  "payloadSchema": [
@@ -410,20 +422,19 @@
410
422
  "name": "id",
411
423
  "required": true,
412
424
  "type": "string"
413
- },
414
- {
415
- "name": "beforeId",
416
- "required": true,
417
- "type": "string"
418
- },
419
- {
420
- "name": "afterId",
421
- "required": true,
422
- "type": "string"
423
- },
425
+ }
426
+ ],
427
+ "synonyms": "compare, diff, contrast",
428
+ "tier": "presentation"
429
+ },
430
+ {
431
+ "description": "Requests a rollback to this revision.",
432
+ "event": "ROLLBACK",
433
+ "eventId": "evt_01KXG04HVB3W2EFBR9ZX8EZ233",
434
+ "payloadSchema": [
424
435
  {
425
436
  "entity": "Revision",
426
- "name": "revisions",
437
+ "name": "row",
427
438
  "properties": [
428
439
  {
429
440
  "name": "id",
@@ -472,23 +483,14 @@
472
483
  {
473
484
  "name": "scopeKey",
474
485
  "type": "string"
486
+ },
487
+ {
488
+ "name": "revisions",
489
+ "type": "[Revision]"
475
490
  }
476
491
  ],
477
- "type": "[object]"
478
- }
479
- ],
480
- "synonyms": "compare, diff, contrast",
481
- "tier": "presentation"
482
- },
483
- {
484
- "description": "Indicates a revision has been successfully reverted.",
485
- "event": "ROLLBACK",
486
- "eventId": "evt_01KXG04HVB3W2EFBR9ZX8EZ233",
487
- "payloadSchema": [
488
- {
489
- "name": "id",
490
492
  "required": true,
491
- "type": "string"
493
+ "type": "object"
492
494
  }
493
495
  ],
494
496
  "synonyms": "reverted, undone, restored",
@@ -550,6 +552,10 @@
550
552
  {
551
553
  "name": "scopeKey",
552
554
  "type": "string"
555
+ },
556
+ {
557
+ "name": "revisions",
558
+ "type": "[Revision]"
553
559
  }
554
560
  ],
555
561
  "type": "[object]"
@@ -576,80 +582,74 @@
576
582
  "tier": "internal"
577
583
  },
578
584
  {
579
- "description": "Indicates a revision has been successfully restored to a previous state.",
585
+ "description": "The revision to roll back to; the consumer restores row.content onto its source document.",
580
586
  "event": "RevisionRolledBack",
581
587
  "eventId": "evt_01KXG04HVBATTVD4EEQ7M0KAJR",
582
- "payloadEntity": "Revision",
583
588
  "payloadSchema": [
584
589
  {
585
- "name": "id",
586
- "required": true,
587
- "type": "string"
588
- },
589
- {
590
- "name": "documentId",
591
- "required": true,
592
- "type": "string"
593
- },
594
- {
595
- "name": "documentType",
596
- "required": true,
597
- "type": "string"
598
- },
599
- {
600
- "name": "versionNumber",
590
+ "entity": "Revision",
591
+ "name": "row",
592
+ "properties": [
593
+ {
594
+ "name": "id",
595
+ "required": true,
596
+ "type": "string"
597
+ },
598
+ {
599
+ "name": "documentId",
600
+ "required": true,
601
+ "type": "string"
602
+ },
603
+ {
604
+ "name": "documentType",
605
+ "required": true,
606
+ "type": "string"
607
+ },
608
+ {
609
+ "name": "versionNumber",
610
+ "required": true,
611
+ "type": "number"
612
+ },
613
+ {
614
+ "name": "authorId",
615
+ "type": "string"
616
+ },
617
+ {
618
+ "name": "authorName",
619
+ "type": "string"
620
+ },
621
+ {
622
+ "name": "content",
623
+ "type": "string"
624
+ },
625
+ {
626
+ "name": "summary",
627
+ "type": "string"
628
+ },
629
+ {
630
+ "name": "searchTerm",
631
+ "type": "string"
632
+ },
633
+ {
634
+ "name": "createdAt",
635
+ "type": "string"
636
+ },
637
+ {
638
+ "name": "scopeKey",
639
+ "type": "string"
640
+ },
641
+ {
642
+ "name": "revisions",
643
+ "type": "[Revision]"
644
+ }
645
+ ],
601
646
  "required": true,
602
- "type": "number"
603
- },
604
- {
605
- "name": "authorId",
606
- "type": "string"
607
- },
608
- {
609
- "name": "authorName",
610
- "type": "string"
611
- },
612
- {
613
- "name": "content",
614
- "type": "string"
615
- },
616
- {
617
- "name": "summary",
618
- "type": "string"
619
- },
620
- {
621
- "name": "searchTerm",
622
- "type": "string"
623
- },
624
- {
625
- "name": "createdAt",
626
- "type": "string"
627
- },
628
- {
629
- "name": "scopeKey",
630
- "type": "string"
647
+ "type": "object"
631
648
  }
632
649
  ],
633
- "scope": "internal",
650
+ "scope": "external",
634
651
  "synonyms": "restored, reverted, undone",
635
- "tier": "presentation"
636
- },
637
- {
638
- "description": "Indicates that a revision rollback operation was unsuccessful.",
639
- "event": "RevisionRollbackFailed",
640
- "eventId": "evt_01KXG04HVBH229SNRGQZE7P45W",
641
- "payloadSchema": [
642
- {
643
- "name": "error",
644
- "type": "string"
645
- },
646
- {
647
- "name": "code",
648
- "type": "string"
649
- }
650
- ],
651
- "synonyms": "rollback failed, revert error, undo failure",
652
- "tier": "internal"
652
+ "tier": "domain"
653
653
  }
654
654
  ],
655
655
  "entityContract": {
@@ -659,6 +659,7 @@
659
659
  "content",
660
660
  "documentId",
661
661
  "documentType",
662
+ "revisions",
662
663
  "scopeKey",
663
664
  "summary",
664
665
  "versionNumber"
@@ -747,6 +748,10 @@
747
748
  {
748
749
  "name": "scopeKey",
749
750
  "type": "string"
751
+ },
752
+ {
753
+ "name": "revisions",
754
+ "type": "[Revision]"
750
755
  }
751
756
  ],
752
757
  "type": "[object]"
@@ -755,83 +760,6 @@
755
760
  "synonyms": "loaded, fetched, retrieved, available",
756
761
  "tier": "domain"
757
762
  },
758
- {
759
- "description": "Indicates a revision has been successfully restored to a previous state.",
760
- "id": "evt_01KXG04HVBATTVD4EEQ7M0KAJR",
761
- "key": "RevisionRolledBack",
762
- "name": "Revision rolled back",
763
- "payloadEntity": "Revision",
764
- "payloadSchema": [
765
- {
766
- "name": "id",
767
- "required": true,
768
- "type": "string"
769
- },
770
- {
771
- "name": "documentId",
772
- "required": true,
773
- "type": "string"
774
- },
775
- {
776
- "name": "documentType",
777
- "required": true,
778
- "type": "string"
779
- },
780
- {
781
- "name": "versionNumber",
782
- "required": true,
783
- "type": "number"
784
- },
785
- {
786
- "name": "authorId",
787
- "type": "string"
788
- },
789
- {
790
- "name": "authorName",
791
- "type": "string"
792
- },
793
- {
794
- "name": "content",
795
- "type": "string"
796
- },
797
- {
798
- "name": "summary",
799
- "type": "string"
800
- },
801
- {
802
- "name": "searchTerm",
803
- "type": "string"
804
- },
805
- {
806
- "name": "createdAt",
807
- "type": "string"
808
- },
809
- {
810
- "name": "scopeKey",
811
- "type": "string"
812
- }
813
- ],
814
- "synonyms": "restored, reverted, undone",
815
- "tier": "presentation"
816
- },
817
- {
818
- "description": "Indicates that a revision rollback operation was unsuccessful.",
819
- "id": "evt_01KXG04HVBH229SNRGQZE7P45W",
820
- "key": "RevisionRollbackFailed",
821
- "name": "Revision rollback failed",
822
- "payloadSchema": [
823
- {
824
- "name": "error",
825
- "type": "string"
826
- },
827
- {
828
- "name": "code",
829
- "type": "string"
830
- }
831
- ],
832
- "synonyms": "rollback failed, revert error, undo failure",
833
- "tier": "internal"
834
- },
835
763
  {
836
764
  "description": "Indicates a failure to load revision data.",
837
765
  "id": "evt_01KXG04HVBZ24ADMJNJ02VY298",
@@ -927,6 +855,10 @@
927
855
  {
928
856
  "name": "scopeKey",
929
857
  "type": "string"
858
+ },
859
+ {
860
+ "name": "revisions",
861
+ "type": "[Revision]"
930
862
  }
931
863
  ],
932
864
  "type": "object"
@@ -936,15 +868,70 @@
936
868
  "tier": "domain"
937
869
  },
938
870
  {
939
- "description": "Indicates a revision has been successfully reverted.",
871
+ "description": "Requests a rollback to this revision.",
940
872
  "id": "evt_01KXG04HVB3W2EFBR9ZX8EZ233",
941
873
  "key": "ROLLBACK",
942
874
  "name": "Rollback",
943
875
  "payloadSchema": [
944
876
  {
945
- "name": "id",
877
+ "entity": "Revision",
878
+ "name": "row",
879
+ "properties": [
880
+ {
881
+ "name": "id",
882
+ "required": true,
883
+ "type": "string"
884
+ },
885
+ {
886
+ "name": "documentId",
887
+ "required": true,
888
+ "type": "string"
889
+ },
890
+ {
891
+ "name": "documentType",
892
+ "required": true,
893
+ "type": "string"
894
+ },
895
+ {
896
+ "name": "versionNumber",
897
+ "required": true,
898
+ "type": "number"
899
+ },
900
+ {
901
+ "name": "authorId",
902
+ "type": "string"
903
+ },
904
+ {
905
+ "name": "authorName",
906
+ "type": "string"
907
+ },
908
+ {
909
+ "name": "content",
910
+ "type": "string"
911
+ },
912
+ {
913
+ "name": "summary",
914
+ "type": "string"
915
+ },
916
+ {
917
+ "name": "searchTerm",
918
+ "type": "string"
919
+ },
920
+ {
921
+ "name": "createdAt",
922
+ "type": "string"
923
+ },
924
+ {
925
+ "name": "scopeKey",
926
+ "type": "string"
927
+ },
928
+ {
929
+ "name": "revisions",
930
+ "type": "[Revision]"
931
+ }
932
+ ],
946
933
  "required": true,
947
- "type": "string"
934
+ "type": "object"
948
935
  }
949
936
  ],
950
937
  "synonyms": "reverted, undone, restored",
@@ -959,7 +946,7 @@
959
946
  "tier": "domain"
960
947
  },
961
948
  {
962
- "description": "Signals a request to compare two versions.",
949
+ "description": "Signals a request to compare the opened revision with the newest one.",
963
950
  "id": "evt_01KXG04HVBEZ06BVBH4XD7GTKS",
964
951
  "key": "COMPARE",
965
952
  "name": "Compare",
@@ -968,20 +955,20 @@
968
955
  "name": "id",
969
956
  "required": true,
970
957
  "type": "string"
971
- },
972
- {
973
- "name": "beforeId",
974
- "required": true,
975
- "type": "string"
976
- },
977
- {
978
- "name": "afterId",
979
- "required": true,
980
- "type": "string"
981
- },
958
+ }
959
+ ],
960
+ "synonyms": "compare, diff, contrast",
961
+ "tier": "presentation"
962
+ },
963
+ {
964
+ "description": "The revision to roll back to; the consumer restores row.content onto its source document.",
965
+ "id": "evt_01KXG04HVBATTVD4EEQ7M0KAJR",
966
+ "key": "RevisionRolledBack",
967
+ "name": "Revision rolled back",
968
+ "payloadSchema": [
982
969
  {
983
970
  "entity": "Revision",
984
- "name": "revisions",
971
+ "name": "row",
985
972
  "properties": [
986
973
  {
987
974
  "name": "id",
@@ -1030,13 +1017,18 @@
1030
1017
  {
1031
1018
  "name": "scopeKey",
1032
1019
  "type": "string"
1020
+ },
1021
+ {
1022
+ "name": "revisions",
1023
+ "type": "[Revision]"
1033
1024
  }
1034
1025
  ],
1035
- "type": "[object]"
1026
+ "required": true,
1027
+ "type": "object"
1036
1028
  }
1037
1029
  ],
1038
- "synonyms": "compare, diff, contrast",
1039
- "tier": "presentation"
1030
+ "synonyms": "restored, reverted, undone",
1031
+ "tier": "domain"
1040
1032
  }
1041
1033
  ],
1042
1034
  "states": [
@@ -1135,6 +1127,16 @@
1135
1127
  },
1136
1128
  {
1137
1129
  "effects": [
1130
+ [
1131
+ "set",
1132
+ "@entity.revisions",
1133
+ [
1134
+ "array/sort",
1135
+ "@payload.data",
1136
+ "versionNumber",
1137
+ "desc"
1138
+ ]
1139
+ ],
1138
1140
  [
1139
1141
  "render-ui",
1140
1142
  "main",
@@ -1172,123 +1174,46 @@
1172
1174
  "name": "authorName",
1173
1175
  "variant": "caption"
1174
1176
  },
1175
- {
1176
- "label": "Summary",
1177
- "name": "summary",
1178
- "variant": "caption"
1179
- },
1180
- {
1181
- "label": "Saved",
1182
- "name": "createdAt",
1183
- "variant": "caption"
1184
- }
1185
- ],
1186
- "gap": "sm",
1187
- "itemActions": [
1188
- {
1189
- "event": "OPEN_REVISION",
1190
- "icon": "arrow-right",
1191
- "label": "Open",
1192
- "variant": "ghost"
1193
- },
1194
- {
1195
- "event": "ROLLBACK",
1196
- "icon": "rotate-ccw",
1197
- "label": "Rollback",
1198
- "variant": "danger"
1199
- }
1200
- ],
1201
- "look": "@config.tableLook",
1202
- "type": "data-grid"
1203
- }
1204
- ],
1205
- "direction": "vertical",
1206
- "gap": "md",
1207
- "type": "stack"
1208
- }
1209
- ]
1210
- ],
1211
- "event": "RevisionLoaded",
1212
- "eventId": "evt_01KXG04HVBDSC5Z57AVTE0FN13",
1213
- "from": "loading",
1214
- "to": "browsing"
1215
- },
1216
- {
1217
- "effects": [
1218
- [
1219
- "set",
1220
- "@entity.scopeKey",
1221
- [
1222
- "object/get",
1223
- "@payload",
1224
- "@config.scopeField",
1225
- ""
1226
- ]
1227
- ],
1228
- [
1229
- "fetch",
1230
- "Revision",
1231
- {
1232
- "emit": {
1233
- "failure": "RevisionLoadFailed",
1234
- "success": "RevisionLoaded"
1235
- },
1236
- "filter": [
1237
- "or",
1238
- [
1239
- "=",
1240
- "@config.scopeField",
1241
- ""
1242
- ],
1243
- [
1244
- "=",
1245
- [
1246
- "object/get",
1247
- "@payload",
1248
- "@config.scopeField",
1249
- ""
1177
+ {
1178
+ "label": "Summary",
1179
+ "name": "summary",
1180
+ "variant": "caption"
1181
+ },
1182
+ {
1183
+ "label": "Saved",
1184
+ "name": "createdAt",
1185
+ "variant": "caption"
1186
+ }
1250
1187
  ],
1251
- ""
1252
- ],
1253
- [
1254
- "=",
1255
- [
1256
- "object/get",
1257
- "@entity",
1258
- "@config.scopeField"
1188
+ "gap": "sm",
1189
+ "itemActions": [
1190
+ {
1191
+ "event": "OPEN_REVISION",
1192
+ "icon": "arrow-right",
1193
+ "label": "Open",
1194
+ "variant": "ghost"
1195
+ },
1196
+ {
1197
+ "event": "ROLLBACK",
1198
+ "icon": "rotate-ccw",
1199
+ "label": "Rollback",
1200
+ "variant": "danger"
1201
+ }
1259
1202
  ],
1260
- [
1261
- "object/get",
1262
- "@payload",
1263
- "@config.scopeField",
1264
- ""
1265
- ]
1266
- ]
1267
- ]
1268
- }
1269
- ]
1270
- ],
1271
- "event": "RevisionRolledBack",
1272
- "eventId": "evt_01KXG04HVBATTVD4EEQ7M0KAJR",
1273
- "from": "loading",
1274
- "to": "loading"
1275
- },
1276
- {
1277
- "effects": [
1278
- [
1279
- "render-ui",
1280
- "main",
1281
- {
1282
- "message": "@payload.error",
1283
- "type": "alert",
1284
- "variant": "error"
1203
+ "look": "@config.tableLook",
1204
+ "type": "data-grid"
1205
+ }
1206
+ ],
1207
+ "direction": "vertical",
1208
+ "gap": "md",
1209
+ "type": "stack"
1285
1210
  }
1286
1211
  ]
1287
1212
  ],
1288
- "event": "RevisionRollbackFailed",
1289
- "eventId": "evt_01KXG04HVBH229SNRGQZE7P45W",
1213
+ "event": "RevisionLoaded",
1214
+ "eventId": "evt_01KXG04HVBDSC5Z57AVTE0FN13",
1290
1215
  "from": "loading",
1291
- "to": "error"
1216
+ "to": "browsing"
1292
1217
  },
1293
1218
  {
1294
1219
  "effects": [
@@ -1630,7 +1555,7 @@
1630
1555
  {
1631
1556
  "action": "ROLLBACK",
1632
1557
  "actionPayload": {
1633
- "id": "@entity.id"
1558
+ "row": "@entity"
1634
1559
  },
1635
1560
  "label": "Rollback",
1636
1561
  "type": "button",
@@ -1655,21 +1580,63 @@
1655
1580
  },
1656
1581
  {
1657
1582
  "effects": [
1583
+ [
1584
+ "emit",
1585
+ "RevisionRolledBack",
1586
+ {
1587
+ "row": "@payload.row"
1588
+ }
1589
+ ],
1658
1590
  [
1659
1591
  "set",
1660
- "@entity.id",
1661
- "@payload.id"
1592
+ "@entity.scopeKey",
1593
+ [
1594
+ "object/get",
1595
+ "@payload.row",
1596
+ "@config.scopeField",
1597
+ ""
1598
+ ]
1662
1599
  ],
1663
1600
  [
1664
- "persist",
1665
- "update",
1601
+ "fetch",
1666
1602
  "Revision",
1667
- "@entity",
1668
1603
  {
1669
1604
  "emit": {
1670
- "failure": "RevisionRollbackFailed",
1671
- "success": "RevisionRolledBack"
1672
- }
1605
+ "failure": "RevisionLoadFailed",
1606
+ "success": "RevisionLoaded"
1607
+ },
1608
+ "filter": [
1609
+ "or",
1610
+ [
1611
+ "=",
1612
+ "@config.scopeField",
1613
+ ""
1614
+ ],
1615
+ [
1616
+ "=",
1617
+ [
1618
+ "object/get",
1619
+ "@payload.row",
1620
+ "@config.scopeField",
1621
+ ""
1622
+ ],
1623
+ ""
1624
+ ],
1625
+ [
1626
+ "=",
1627
+ [
1628
+ "object/get",
1629
+ "@entity",
1630
+ "@config.scopeField"
1631
+ ],
1632
+ [
1633
+ "object/get",
1634
+ "@payload.row",
1635
+ "@config.scopeField",
1636
+ ""
1637
+ ]
1638
+ ]
1639
+ ]
1673
1640
  }
1674
1641
  ],
1675
1642
  [
@@ -1763,7 +1730,29 @@
1763
1730
  "emit": {
1764
1731
  "failure": "RevisionLoadFailed",
1765
1732
  "success": "RevisionLoaded"
1766
- }
1733
+ },
1734
+ "filter": [
1735
+ "or",
1736
+ [
1737
+ "=",
1738
+ "@config.scopeField",
1739
+ ""
1740
+ ],
1741
+ [
1742
+ "=",
1743
+ "@entity.scopeKey",
1744
+ ""
1745
+ ],
1746
+ [
1747
+ "=",
1748
+ [
1749
+ "object/get",
1750
+ "@entity",
1751
+ "@config.scopeField"
1752
+ ],
1753
+ "@entity.scopeKey"
1754
+ ]
1755
+ ]
1767
1756
  }
1768
1757
  ],
1769
1758
  [
@@ -1834,10 +1823,39 @@
1834
1823
  "type": "divider"
1835
1824
  },
1836
1825
  {
1837
- "afterId": "@payload.afterId",
1838
- "beforeId": "@payload.beforeId",
1839
- "onRevert": "ROLLBACK",
1840
- "revisions": "@payload.revisions",
1826
+ "afterId": [
1827
+ "object/get",
1828
+ [
1829
+ "array/first",
1830
+ "@entity.revisions"
1831
+ ],
1832
+ "id",
1833
+ ""
1834
+ ],
1835
+ "beforeId": "@entity.id",
1836
+ "revisions": [
1837
+ "array/map",
1838
+ "@entity.revisions",
1839
+ [
1840
+ "fn",
1841
+ "r",
1842
+ {
1843
+ "author": "@r.authorName",
1844
+ "content": "@r.content",
1845
+ "id": "@r.id",
1846
+ "label": [
1847
+ "str/concat",
1848
+ "v",
1849
+ [
1850
+ "str/default",
1851
+ "@r.versionNumber",
1852
+ ""
1853
+ ]
1854
+ ],
1855
+ "timestamp": "@r.createdAt"
1856
+ }
1857
+ ]
1858
+ ],
1841
1859
  "type": "version-diff",
1842
1860
  "view": "side-by-side"
1843
1861
  },
@@ -1847,7 +1865,7 @@
1847
1865
  {
1848
1866
  "action": "ROLLBACK",
1849
1867
  "actionPayload": {
1850
- "id": "@entity.id"
1868
+ "row": "@entity"
1851
1869
  },
1852
1870
  "label": "Rollback",
1853
1871
  "type": "button",
@@ -1872,21 +1890,63 @@
1872
1890
  },
1873
1891
  {
1874
1892
  "effects": [
1893
+ [
1894
+ "emit",
1895
+ "RevisionRolledBack",
1896
+ {
1897
+ "row": "@payload.row"
1898
+ }
1899
+ ],
1875
1900
  [
1876
1901
  "set",
1877
- "@entity.id",
1878
- "@payload.id"
1902
+ "@entity.scopeKey",
1903
+ [
1904
+ "object/get",
1905
+ "@payload.row",
1906
+ "@config.scopeField",
1907
+ ""
1908
+ ]
1879
1909
  ],
1880
1910
  [
1881
- "persist",
1882
- "update",
1911
+ "fetch",
1883
1912
  "Revision",
1884
- "@entity",
1885
1913
  {
1886
1914
  "emit": {
1887
- "failure": "RevisionRollbackFailed",
1888
- "success": "RevisionRolledBack"
1889
- }
1915
+ "failure": "RevisionLoadFailed",
1916
+ "success": "RevisionLoaded"
1917
+ },
1918
+ "filter": [
1919
+ "or",
1920
+ [
1921
+ "=",
1922
+ "@config.scopeField",
1923
+ ""
1924
+ ],
1925
+ [
1926
+ "=",
1927
+ [
1928
+ "object/get",
1929
+ "@payload.row",
1930
+ "@config.scopeField",
1931
+ ""
1932
+ ],
1933
+ ""
1934
+ ],
1935
+ [
1936
+ "=",
1937
+ [
1938
+ "object/get",
1939
+ "@entity",
1940
+ "@config.scopeField"
1941
+ ],
1942
+ [
1943
+ "object/get",
1944
+ "@payload.row",
1945
+ "@config.scopeField",
1946
+ ""
1947
+ ]
1948
+ ]
1949
+ ]
1890
1950
  }
1891
1951
  ],
1892
1952
  [
@@ -1980,7 +2040,29 @@
1980
2040
  "emit": {
1981
2041
  "failure": "RevisionLoadFailed",
1982
2042
  "success": "RevisionLoaded"
1983
- }
2043
+ },
2044
+ "filter": [
2045
+ "or",
2046
+ [
2047
+ "=",
2048
+ "@config.scopeField",
2049
+ ""
2050
+ ],
2051
+ [
2052
+ "=",
2053
+ "@entity.scopeKey",
2054
+ ""
2055
+ ],
2056
+ [
2057
+ "=",
2058
+ [
2059
+ "object/get",
2060
+ "@entity",
2061
+ "@config.scopeField"
2062
+ ],
2063
+ "@entity.scopeKey"
2064
+ ]
2065
+ ]
1984
2066
  }
1985
2067
  ],
1986
2068
  [
@@ -2013,21 +2095,63 @@
2013
2095
  },
2014
2096
  {
2015
2097
  "effects": [
2098
+ [
2099
+ "emit",
2100
+ "RevisionRolledBack",
2101
+ {
2102
+ "row": "@payload.row"
2103
+ }
2104
+ ],
2016
2105
  [
2017
2106
  "set",
2018
- "@entity.id",
2019
- "@payload.id"
2107
+ "@entity.scopeKey",
2108
+ [
2109
+ "object/get",
2110
+ "@payload.row",
2111
+ "@config.scopeField",
2112
+ ""
2113
+ ]
2020
2114
  ],
2021
2115
  [
2022
- "persist",
2023
- "update",
2116
+ "fetch",
2024
2117
  "Revision",
2025
- "@entity",
2026
2118
  {
2027
2119
  "emit": {
2028
- "failure": "RevisionRollbackFailed",
2029
- "success": "RevisionRolledBack"
2030
- }
2120
+ "failure": "RevisionLoadFailed",
2121
+ "success": "RevisionLoaded"
2122
+ },
2123
+ "filter": [
2124
+ "or",
2125
+ [
2126
+ "=",
2127
+ "@config.scopeField",
2128
+ ""
2129
+ ],
2130
+ [
2131
+ "=",
2132
+ [
2133
+ "object/get",
2134
+ "@payload.row",
2135
+ "@config.scopeField",
2136
+ ""
2137
+ ],
2138
+ ""
2139
+ ],
2140
+ [
2141
+ "=",
2142
+ [
2143
+ "object/get",
2144
+ "@entity",
2145
+ "@config.scopeField"
2146
+ ],
2147
+ [
2148
+ "object/get",
2149
+ "@payload.row",
2150
+ "@config.scopeField",
2151
+ ""
2152
+ ]
2153
+ ]
2154
+ ]
2031
2155
  }
2032
2156
  ],
2033
2157
  [