@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
@@ -56,6 +56,49 @@
56
56
  "category": "interaction",
57
57
  "linkedEntity": "ModifierGroupRecord",
58
58
  "emits": [
59
+ {
60
+ "event": "OPEN_GROUP",
61
+ "payloadSchema": [
62
+ {
63
+ "name": "id",
64
+ "type": "string",
65
+ "required": true
66
+ },
67
+ {
68
+ "name": "row.id",
69
+ "type": "string",
70
+ "required": true
71
+ },
72
+ {
73
+ "name": "row.name",
74
+ "type": "string",
75
+ "required": true
76
+ },
77
+ {
78
+ "name": "row.constraintType",
79
+ "type": "string"
80
+ },
81
+ {
82
+ "name": "row.required",
83
+ "type": "boolean"
84
+ },
85
+ {
86
+ "name": "row.minSelect",
87
+ "type": "number"
88
+ },
89
+ {
90
+ "name": "row.maxSelect",
91
+ "type": "number"
92
+ },
93
+ {
94
+ "name": "row.optionsJson",
95
+ "type": "string"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "event": "CLOSE_VIEW"
101
+ },
59
102
  {
60
103
  "event": "CREATE",
61
104
  "payloadSchema": [
@@ -301,6 +344,9 @@
301
344
  {
302
345
  "name": "browsing"
303
346
  },
347
+ {
348
+ "name": "viewing_single"
349
+ },
304
350
  {
305
351
  "name": "error"
306
352
  }
@@ -335,33 +381,17 @@
335
381
  ]
336
382
  },
337
383
  {
338
- "key": "CREATE",
339
- "name": "Create",
340
- "payloadSchema": [
341
- {
342
- "name": "data",
343
- "type": "object",
344
- "required": true
345
- }
346
- ]
347
- },
348
- {
349
- "key": "UPDATE",
350
- "name": "Update",
384
+ "key": "OPEN_GROUP",
385
+ "name": "Open Group",
351
386
  "payloadSchema": [
352
387
  {
353
- "name": "groupId",
388
+ "name": "id",
354
389
  "type": "string",
355
390
  "required": true
356
391
  },
357
392
  {
358
393
  "name": "row",
359
394
  "type": "ModifierGroupRecord"
360
- },
361
- {
362
- "name": "data",
363
- "type": "object",
364
- "required": true
365
395
  }
366
396
  ]
367
397
  },
@@ -423,6 +453,41 @@
423
453
  "type": "string"
424
454
  }
425
455
  ]
456
+ },
457
+ {
458
+ "key": "CLOSE_VIEW",
459
+ "name": "Close View"
460
+ },
461
+ {
462
+ "key": "CREATE",
463
+ "name": "Create",
464
+ "payloadSchema": [
465
+ {
466
+ "name": "data",
467
+ "type": "object",
468
+ "required": true
469
+ }
470
+ ]
471
+ },
472
+ {
473
+ "key": "UPDATE",
474
+ "name": "Update",
475
+ "payloadSchema": [
476
+ {
477
+ "name": "groupId",
478
+ "type": "string",
479
+ "required": true
480
+ },
481
+ {
482
+ "name": "row",
483
+ "type": "ModifierGroupRecord"
484
+ },
485
+ {
486
+ "name": "data",
487
+ "type": "object",
488
+ "required": true
489
+ }
490
+ ]
426
491
  }
427
492
  ],
428
493
  "transitions": [
@@ -445,22 +510,22 @@
445
510
  "render-ui",
446
511
  "main",
447
512
  {
448
- "align": "center",
449
- "direction": "vertical",
450
- "gap": "md",
513
+ "type": "stack",
451
514
  "children": [
452
515
  {
453
516
  "type": "spinner"
454
517
  },
455
518
  {
456
- "content": "Loading modifier groups…",
519
+ "color": "muted",
457
520
  "type": "typography",
458
- "variant": "caption",
459
- "color": "muted"
521
+ "content": "Loading modifier groups…",
522
+ "variant": "caption"
460
523
  }
461
524
  ],
462
- "type": "stack",
463
- "className": "py-12"
525
+ "align": "center",
526
+ "className": "py-12",
527
+ "direction": "vertical",
528
+ "gap": "md"
464
529
  }
465
530
  ]
466
531
  ]
@@ -474,40 +539,87 @@
474
539
  "render-ui",
475
540
  "main",
476
541
  {
542
+ "gap": "md",
477
543
  "type": "stack",
544
+ "direction": "vertical",
478
545
  "children": [
479
546
  {
547
+ "align": "center",
548
+ "direction": "horizontal",
480
549
  "type": "stack",
481
550
  "gap": "sm",
482
- "direction": "horizontal",
483
551
  "children": [
484
552
  {
485
553
  "type": "icon",
486
554
  "name": "list-checks"
487
555
  },
488
556
  {
489
- "type": "typography",
490
557
  "content": "@config.title",
491
- "variant": "h3"
558
+ "variant": "h3",
559
+ "type": "typography"
492
560
  }
493
561
  ]
494
562
  },
563
+ {
564
+ "children": [
565
+ {
566
+ "type": "stat-display",
567
+ "value": "@payload.data.length",
568
+ "icon": "list-checks",
569
+ "label": "Total groups"
570
+ },
571
+ {
572
+ "value": "12",
573
+ "type": "stat-display",
574
+ "icon": "asterisk",
575
+ "label": "Required"
576
+ },
577
+ {
578
+ "value": "9",
579
+ "type": "stat-display",
580
+ "label": "Multi-select",
581
+ "icon": "check-square"
582
+ },
583
+ {
584
+ "icon": "list",
585
+ "type": "stat-display",
586
+ "label": "Avg options",
587
+ "value": "5"
588
+ }
589
+ ],
590
+ "type": "simple-grid",
591
+ "cols": 4.0
592
+ },
495
593
  {
496
594
  "type": "divider"
497
595
  },
498
596
  {
499
- "entity": "@payload.data",
500
597
  "type": "data-grid",
598
+ "entity": "@payload.data",
599
+ "itemActions": [
600
+ {
601
+ "icon": "arrow-right",
602
+ "label": "Open",
603
+ "variant": "primary",
604
+ "event": "OPEN_GROUP"
605
+ },
606
+ {
607
+ "label": "Delete",
608
+ "event": "DELETE",
609
+ "variant": "danger",
610
+ "icon": "trash"
611
+ }
612
+ ],
501
613
  "fields": [
502
614
  {
615
+ "variant": "caption",
503
616
  "label": "Group",
504
- "variant": "badge",
505
617
  "name": "name"
506
618
  },
507
619
  {
508
- "label": "Constraint",
509
620
  "variant": "badge",
510
- "name": "constraintType"
621
+ "name": "constraintType",
622
+ "label": "Constraint"
511
623
  },
512
624
  {
513
625
  "name": "required",
@@ -515,43 +627,20 @@
515
627
  "variant": "badge"
516
628
  },
517
629
  {
518
- "name": "minSelect",
630
+ "label": "Min",
519
631
  "variant": "caption",
520
- "label": "Min"
632
+ "name": "minSelect"
521
633
  },
522
634
  {
523
635
  "variant": "caption",
524
- "label": "Max",
525
- "name": "maxSelect"
636
+ "name": "maxSelect",
637
+ "label": "Max"
526
638
  }
527
639
  ],
528
640
  "cols": 1.0,
529
- "gap": "sm",
530
- "itemActions": [
531
- {
532
- "label": "Update",
533
- "variant": "secondary",
534
- "icon": "edit",
535
- "event": "UPDATE"
536
- },
537
- {
538
- "icon": "trash",
539
- "event": "DELETE",
540
- "label": "Delete",
541
- "variant": "danger"
542
- }
543
- ]
544
- },
545
- {
546
- "label": "New Group",
547
- "action": "CREATE",
548
- "variant": "primary",
549
- "icon": "plus",
550
- "type": "button"
641
+ "gap": "sm"
551
642
  }
552
- ],
553
- "direction": "vertical",
554
- "gap": "md"
643
+ ]
555
644
  }
556
645
  ]
557
646
  ]
@@ -565,8 +654,8 @@
565
654
  "render-ui",
566
655
  "main",
567
656
  {
568
- "variant": "error",
569
657
  "message": "@payload.error",
658
+ "variant": "error",
570
659
  "type": "alert"
571
660
  }
572
661
  ]
@@ -574,32 +663,13 @@
574
663
  },
575
664
  {
576
665
  "from": "browsing",
577
- "to": "loading",
578
- "event": "CREATE",
579
- "effects": [
580
- [
581
- "persist",
582
- "create",
583
- "ModifierGroupRecord",
584
- "@payload.data",
585
- {
586
- "emit": {
587
- "success": "ModifierGroupCreated",
588
- "failure": "ModifierGroupWriteFailed"
589
- }
590
- }
591
- ]
592
- ]
593
- },
594
- {
595
- "from": "browsing",
596
- "to": "loading",
597
- "event": "UPDATE",
666
+ "to": "viewing_single",
667
+ "event": "OPEN_GROUP",
598
668
  "effects": [
599
669
  [
600
670
  "set",
601
671
  "@entity.id",
602
- "@payload.groupId"
672
+ "@payload.row.id"
603
673
  ],
604
674
  [
605
675
  "set",
@@ -632,15 +702,109 @@
632
702
  "@payload.row.optionsJson"
633
703
  ],
634
704
  [
635
- "persist",
636
- "update",
637
- "ModifierGroupRecord",
638
- "@entity",
705
+ "render-ui",
706
+ "main",
639
707
  {
640
- "emit": {
641
- "failure": "ModifierGroupWriteFailed",
642
- "success": "ModifierGroupUpdated"
643
- }
708
+ "type": "stack",
709
+ "gap": "md",
710
+ "children": [
711
+ {
712
+ "direction": "horizontal",
713
+ "gap": "sm",
714
+ "type": "stack",
715
+ "align": "center",
716
+ "children": [
717
+ {
718
+ "label": "Back",
719
+ "type": "button",
720
+ "action": "CLOSE_VIEW",
721
+ "variant": "ghost"
722
+ },
723
+ {
724
+ "name": "list-checks",
725
+ "type": "icon"
726
+ },
727
+ {
728
+ "type": "typography",
729
+ "variant": "h3",
730
+ "content": "@entity.name"
731
+ },
732
+ {
733
+ "variant": "primary",
734
+ "type": "badge",
735
+ "label": "@entity.constraintType"
736
+ }
737
+ ]
738
+ },
739
+ {
740
+ "type": "divider"
741
+ },
742
+ {
743
+ "direction": "vertical",
744
+ "children": [
745
+ {
746
+ "direction": "horizontal",
747
+ "children": [
748
+ {
749
+ "variant": "caption",
750
+ "color": "muted",
751
+ "type": "typography",
752
+ "content": "Options JSON"
753
+ },
754
+ {
755
+ "content": "@entity.optionsJson",
756
+ "type": "typography",
757
+ "variant": "body"
758
+ }
759
+ ],
760
+ "gap": "md",
761
+ "type": "stack"
762
+ }
763
+ ],
764
+ "gap": "sm",
765
+ "type": "stack"
766
+ },
767
+ {
768
+ "type": "divider"
769
+ },
770
+ {
771
+ "type": "simple-grid",
772
+ "cols": 2.0,
773
+ "children": [
774
+ {
775
+ "type": "stat-display",
776
+ "value": "@entity.minSelect",
777
+ "label": "Min select",
778
+ "icon": "minus"
779
+ },
780
+ {
781
+ "label": "Max select",
782
+ "value": "@entity.maxSelect",
783
+ "type": "stat-display",
784
+ "icon": "plus"
785
+ }
786
+ ]
787
+ },
788
+ {
789
+ "direction": "horizontal",
790
+ "align": "center",
791
+ "children": [
792
+ {
793
+ "actionPayload": {
794
+ "row": "@entity",
795
+ "groupId": "@entity.id"
796
+ },
797
+ "label": "Delete",
798
+ "type": "button",
799
+ "action": "DELETE",
800
+ "variant": "danger"
801
+ }
802
+ ],
803
+ "gap": "sm",
804
+ "type": "stack"
805
+ }
806
+ ],
807
+ "direction": "vertical"
644
808
  }
645
809
  ]
646
810
  ]
@@ -692,10 +856,32 @@
692
856
  "@entity",
693
857
  {
694
858
  "emit": {
695
- "success": "ModifierGroupDeleted",
696
- "failure": "ModifierGroupWriteFailed"
859
+ "failure": "ModifierGroupWriteFailed",
860
+ "success": "ModifierGroupDeleted"
697
861
  }
698
862
  }
863
+ ],
864
+ [
865
+ "render-ui",
866
+ "main",
867
+ {
868
+ "direction": "vertical",
869
+ "align": "center",
870
+ "type": "stack",
871
+ "gap": "md",
872
+ "className": "py-12",
873
+ "children": [
874
+ {
875
+ "type": "spinner"
876
+ },
877
+ {
878
+ "variant": "caption",
879
+ "type": "typography",
880
+ "content": "Deleting modifier group…",
881
+ "color": "muted"
882
+ }
883
+ ]
884
+ }
699
885
  ]
700
886
  ]
701
887
  },
@@ -709,8 +895,8 @@
709
895
  "ModifierGroupRecord",
710
896
  {
711
897
  "emit": {
712
- "success": "ModifierGroupLoaded",
713
- "failure": "ModifierGroupLoadFailed"
898
+ "failure": "ModifierGroupLoadFailed",
899
+ "success": "ModifierGroupLoaded"
714
900
  }
715
901
  }
716
902
  ]
@@ -726,8 +912,8 @@
726
912
  "ModifierGroupRecord",
727
913
  {
728
914
  "emit": {
729
- "success": "ModifierGroupLoaded",
730
- "failure": "ModifierGroupLoadFailed"
915
+ "failure": "ModifierGroupLoadFailed",
916
+ "success": "ModifierGroupLoaded"
731
917
  }
732
918
  }
733
919
  ]
@@ -759,17 +945,17 @@
759
945
  "render-ui",
760
946
  "main",
761
947
  {
948
+ "message": "@payload.error",
762
949
  "type": "alert",
763
- "variant": "error",
764
- "message": "@payload.error"
950
+ "variant": "error"
765
951
  }
766
952
  ]
767
953
  ]
768
954
  },
769
955
  {
770
- "from": "error",
956
+ "from": "viewing_single",
771
957
  "to": "loading",
772
- "event": "INIT",
958
+ "event": "CLOSE_VIEW",
773
959
  "effects": [
774
960
  [
775
961
  "fetch",
@@ -781,6 +967,238 @@
781
967
  }
782
968
  }
783
969
  ],
970
+ [
971
+ "render-ui",
972
+ "main",
973
+ {
974
+ "type": "stack",
975
+ "gap": "md",
976
+ "align": "center",
977
+ "className": "py-12",
978
+ "direction": "vertical",
979
+ "children": [
980
+ {
981
+ "type": "spinner"
982
+ },
983
+ {
984
+ "type": "typography",
985
+ "variant": "caption",
986
+ "content": "Loading modifier groups…",
987
+ "color": "muted"
988
+ }
989
+ ]
990
+ }
991
+ ]
992
+ ]
993
+ },
994
+ {
995
+ "from": "viewing_single",
996
+ "to": "loading",
997
+ "event": "CREATE",
998
+ "effects": [
999
+ [
1000
+ "persist",
1001
+ "create",
1002
+ "ModifierGroupRecord",
1003
+ "@payload.data",
1004
+ {
1005
+ "emit": {
1006
+ "success": "ModifierGroupCreated",
1007
+ "failure": "ModifierGroupWriteFailed"
1008
+ }
1009
+ }
1010
+ ],
1011
+ [
1012
+ "render-ui",
1013
+ "main",
1014
+ {
1015
+ "type": "stack",
1016
+ "gap": "md",
1017
+ "align": "center",
1018
+ "className": "py-12",
1019
+ "children": [
1020
+ {
1021
+ "type": "spinner"
1022
+ },
1023
+ {
1024
+ "content": "Creating modifier group…",
1025
+ "variant": "caption",
1026
+ "type": "typography",
1027
+ "color": "muted"
1028
+ }
1029
+ ],
1030
+ "direction": "vertical"
1031
+ }
1032
+ ]
1033
+ ]
1034
+ },
1035
+ {
1036
+ "from": "viewing_single",
1037
+ "to": "loading",
1038
+ "event": "UPDATE",
1039
+ "effects": [
1040
+ [
1041
+ "set",
1042
+ "@entity.id",
1043
+ "@payload.groupId"
1044
+ ],
1045
+ [
1046
+ "set",
1047
+ "@entity.name",
1048
+ "@payload.row.name"
1049
+ ],
1050
+ [
1051
+ "set",
1052
+ "@entity.constraintType",
1053
+ "@payload.row.constraintType"
1054
+ ],
1055
+ [
1056
+ "set",
1057
+ "@entity.required",
1058
+ "@payload.row.required"
1059
+ ],
1060
+ [
1061
+ "set",
1062
+ "@entity.minSelect",
1063
+ "@payload.row.minSelect"
1064
+ ],
1065
+ [
1066
+ "set",
1067
+ "@entity.maxSelect",
1068
+ "@payload.row.maxSelect"
1069
+ ],
1070
+ [
1071
+ "set",
1072
+ "@entity.optionsJson",
1073
+ "@payload.row.optionsJson"
1074
+ ],
1075
+ [
1076
+ "persist",
1077
+ "update",
1078
+ "ModifierGroupRecord",
1079
+ "@entity",
1080
+ {
1081
+ "emit": {
1082
+ "failure": "ModifierGroupWriteFailed",
1083
+ "success": "ModifierGroupUpdated"
1084
+ }
1085
+ }
1086
+ ],
1087
+ [
1088
+ "render-ui",
1089
+ "main",
1090
+ {
1091
+ "type": "stack",
1092
+ "children": [
1093
+ {
1094
+ "type": "spinner"
1095
+ },
1096
+ {
1097
+ "variant": "caption",
1098
+ "color": "muted",
1099
+ "content": "Updating modifier group…",
1100
+ "type": "typography"
1101
+ }
1102
+ ],
1103
+ "gap": "md",
1104
+ "className": "py-12",
1105
+ "align": "center",
1106
+ "direction": "vertical"
1107
+ }
1108
+ ]
1109
+ ]
1110
+ },
1111
+ {
1112
+ "from": "viewing_single",
1113
+ "to": "loading",
1114
+ "event": "DELETE",
1115
+ "effects": [
1116
+ [
1117
+ "set",
1118
+ "@entity.id",
1119
+ "@payload.groupId"
1120
+ ],
1121
+ [
1122
+ "set",
1123
+ "@entity.name",
1124
+ "@payload.row.name"
1125
+ ],
1126
+ [
1127
+ "set",
1128
+ "@entity.constraintType",
1129
+ "@payload.row.constraintType"
1130
+ ],
1131
+ [
1132
+ "set",
1133
+ "@entity.required",
1134
+ "@payload.row.required"
1135
+ ],
1136
+ [
1137
+ "set",
1138
+ "@entity.minSelect",
1139
+ "@payload.row.minSelect"
1140
+ ],
1141
+ [
1142
+ "set",
1143
+ "@entity.maxSelect",
1144
+ "@payload.row.maxSelect"
1145
+ ],
1146
+ [
1147
+ "set",
1148
+ "@entity.optionsJson",
1149
+ "@payload.row.optionsJson"
1150
+ ],
1151
+ [
1152
+ "persist",
1153
+ "delete",
1154
+ "ModifierGroupRecord",
1155
+ "@entity",
1156
+ {
1157
+ "emit": {
1158
+ "success": "ModifierGroupDeleted",
1159
+ "failure": "ModifierGroupWriteFailed"
1160
+ }
1161
+ }
1162
+ ],
1163
+ [
1164
+ "render-ui",
1165
+ "main",
1166
+ {
1167
+ "direction": "vertical",
1168
+ "children": [
1169
+ {
1170
+ "type": "spinner"
1171
+ },
1172
+ {
1173
+ "content": "Deleting modifier group…",
1174
+ "variant": "caption",
1175
+ "type": "typography",
1176
+ "color": "muted"
1177
+ }
1178
+ ],
1179
+ "className": "py-12",
1180
+ "gap": "md",
1181
+ "align": "center",
1182
+ "type": "stack"
1183
+ }
1184
+ ]
1185
+ ]
1186
+ },
1187
+ {
1188
+ "from": "error",
1189
+ "to": "loading",
1190
+ "event": "INIT",
1191
+ "effects": [
1192
+ [
1193
+ "fetch",
1194
+ "ModifierGroupRecord",
1195
+ {
1196
+ "emit": {
1197
+ "success": "ModifierGroupLoaded",
1198
+ "failure": "ModifierGroupLoadFailed"
1199
+ }
1200
+ }
1201
+ ],
784
1202
  [
785
1203
  "render-ui",
786
1204
  "main",