@almadar/std 11.3.0 → 11.4.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.
@@ -68,6 +68,126 @@
68
68
  }
69
69
  ]
70
70
  },
71
+ {
72
+ "event": "CREATE"
73
+ },
74
+ {
75
+ "event": "VIEW",
76
+ "payloadSchema": [
77
+ {
78
+ "name": "id",
79
+ "type": "string",
80
+ "required": true
81
+ },
82
+ {
83
+ "name": "row.id",
84
+ "type": "string",
85
+ "required": true
86
+ },
87
+ {
88
+ "name": "row.name",
89
+ "type": "string"
90
+ },
91
+ {
92
+ "name": "row.company",
93
+ "type": "string"
94
+ },
95
+ {
96
+ "name": "row.email",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "row.phone",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "name": "row.status",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "row.pendingId",
109
+ "type": "string"
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "event": "EDIT",
115
+ "payloadSchema": [
116
+ {
117
+ "name": "id",
118
+ "type": "string",
119
+ "required": true
120
+ },
121
+ {
122
+ "name": "row.id",
123
+ "type": "string",
124
+ "required": true
125
+ },
126
+ {
127
+ "name": "row.name",
128
+ "type": "string"
129
+ },
130
+ {
131
+ "name": "row.company",
132
+ "type": "string"
133
+ },
134
+ {
135
+ "name": "row.email",
136
+ "type": "string"
137
+ },
138
+ {
139
+ "name": "row.phone",
140
+ "type": "string"
141
+ },
142
+ {
143
+ "name": "row.status",
144
+ "type": "string"
145
+ },
146
+ {
147
+ "name": "row.pendingId",
148
+ "type": "string"
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "event": "DELETE",
154
+ "payloadSchema": [
155
+ {
156
+ "name": "id",
157
+ "type": "string",
158
+ "required": true
159
+ },
160
+ {
161
+ "name": "row.id",
162
+ "type": "string",
163
+ "required": true
164
+ },
165
+ {
166
+ "name": "row.name",
167
+ "type": "string"
168
+ },
169
+ {
170
+ "name": "row.company",
171
+ "type": "string"
172
+ },
173
+ {
174
+ "name": "row.email",
175
+ "type": "string"
176
+ },
177
+ {
178
+ "name": "row.phone",
179
+ "type": "string"
180
+ },
181
+ {
182
+ "name": "row.status",
183
+ "type": "string"
184
+ },
185
+ {
186
+ "name": "row.pendingId",
187
+ "type": "string"
188
+ }
189
+ ]
190
+ },
71
191
  {
72
192
  "event": "ContactLoaded",
73
193
  "description": "Fired when Contact finishes loading",
@@ -329,6 +449,22 @@
329
449
  "key": "CONVERT_LEAD",
330
450
  "name": "Convert Lead"
331
451
  },
452
+ {
453
+ "key": "CREATE",
454
+ "name": "Create"
455
+ },
456
+ {
457
+ "key": "VIEW",
458
+ "name": "View"
459
+ },
460
+ {
461
+ "key": "EDIT",
462
+ "name": "Edit"
463
+ },
464
+ {
465
+ "key": "DELETE",
466
+ "name": "Delete"
467
+ },
332
468
  {
333
469
  "key": "ContactSaved",
334
470
  "name": "Contact saved",
@@ -496,51 +632,6 @@
496
632
  "type": "string"
497
633
  }
498
634
  ]
499
- },
500
- {
501
- "key": "VIEW",
502
- "name": "View",
503
- "payloadSchema": [
504
- {
505
- "name": "id",
506
- "type": "string",
507
- "required": true
508
- },
509
- {
510
- "name": "row",
511
- "type": "Contact"
512
- }
513
- ]
514
- },
515
- {
516
- "key": "EDIT",
517
- "name": "Edit",
518
- "payloadSchema": [
519
- {
520
- "name": "id",
521
- "type": "string",
522
- "required": true
523
- },
524
- {
525
- "name": "row",
526
- "type": "Contact"
527
- }
528
- ]
529
- },
530
- {
531
- "key": "DELETE",
532
- "name": "Delete",
533
- "payloadSchema": [
534
- {
535
- "name": "id",
536
- "type": "string",
537
- "required": true
538
- },
539
- {
540
- "name": "row",
541
- "type": "Contact"
542
- }
543
- ]
544
635
  }
545
636
  ],
546
637
  "transitions": [
@@ -563,22 +654,22 @@
563
654
  "render-ui",
564
655
  "main",
565
656
  {
657
+ "type": "stack",
566
658
  "direction": "vertical",
659
+ "gap": "md",
567
660
  "align": "center",
568
- "type": "stack",
661
+ "className": "py-12",
569
662
  "children": [
570
663
  {
571
664
  "type": "spinner"
572
665
  },
573
666
  {
667
+ "variant": "caption",
574
668
  "type": "typography",
575
669
  "color": "muted",
576
- "content": "Loading…",
577
- "variant": "caption"
670
+ "content": "Loading…"
578
671
  }
579
- ],
580
- "gap": "md",
581
- "className": "py-12"
672
+ ]
582
673
  }
583
674
  ]
584
675
  ]
@@ -593,39 +684,14 @@
593
684
  "main",
594
685
  {
595
686
  "appName": "CRM",
596
- "navItems": [
597
- {
598
- "href": "/contacts",
599
- "icon": "users",
600
- "label": "Contacts"
601
- },
602
- {
603
- "icon": "briefcase",
604
- "href": "/deals",
605
- "label": "Deals"
606
- },
607
- {
608
- "icon": "bar-chart-2",
609
- "label": "Pipeline",
610
- "href": "/pipeline"
611
- },
612
- {
613
- "icon": "file-text",
614
- "label": "Notes",
615
- "href": "/notes"
616
- }
617
- ],
618
687
  "children": [
619
688
  {
620
- "direction": "vertical",
621
689
  "children": [
622
690
  {
623
- "direction": "horizontal",
624
691
  "children": [
625
692
  {
626
- "gap": "sm",
627
- "direction": "horizontal",
628
693
  "type": "stack",
694
+ "gap": "sm",
629
695
  "align": "center",
630
696
  "children": [
631
697
  {
@@ -633,30 +699,32 @@
633
699
  "type": "icon"
634
700
  },
635
701
  {
636
- "type": "typography",
637
702
  "content": "Contacts",
703
+ "type": "typography",
638
704
  "variant": "h2"
639
705
  }
640
- ]
706
+ ],
707
+ "direction": "horizontal"
641
708
  },
642
709
  {
643
710
  "type": "stack",
644
711
  "children": [
645
712
  {
646
713
  "action": "CREATE",
714
+ "label": "Add Contact",
647
715
  "variant": "primary",
648
- "type": "button",
649
716
  "icon": "plus",
650
- "label": "Add Contact"
717
+ "type": "button"
651
718
  }
652
719
  ],
653
720
  "gap": "sm",
654
721
  "direction": "horizontal"
655
722
  }
656
723
  ],
724
+ "type": "stack",
657
725
  "justify": "between",
658
726
  "align": "center",
659
- "type": "stack",
727
+ "direction": "horizontal",
660
728
  "gap": "md"
661
729
  },
662
730
  {
@@ -666,10 +734,10 @@
666
734
  "cols": 1.0,
667
735
  "children": [
668
736
  {
669
- "icon": "users",
670
- "value": "@payload.data.length",
737
+ "type": "stat-display",
671
738
  "label": "Total Contacts",
672
- "type": "stat-display"
739
+ "value": "@payload.data.length",
740
+ "icon": "users"
673
741
  }
674
742
  ],
675
743
  "type": "simple-grid"
@@ -678,8 +746,25 @@
678
746
  "type": "divider"
679
747
  },
680
748
  {
681
- "gap": "sm",
682
749
  "type": "data-list",
750
+ "itemActions": [
751
+ {
752
+ "variant": "ghost",
753
+ "label": "View",
754
+ "event": "VIEW"
755
+ },
756
+ {
757
+ "event": "EDIT",
758
+ "variant": "ghost",
759
+ "label": "Edit"
760
+ },
761
+ {
762
+ "label": "Delete",
763
+ "variant": "danger",
764
+ "event": "DELETE"
765
+ }
766
+ ],
767
+ "variant": "card",
683
768
  "fields": [
684
769
  {
685
770
  "name": "name",
@@ -687,92 +772,98 @@
687
772
  "icon": "user"
688
773
  },
689
774
  {
690
- "variant": "badge",
691
- "name": "status"
775
+ "name": "status",
776
+ "variant": "badge"
692
777
  },
693
778
  {
694
779
  "variant": "body",
695
780
  "name": "company"
696
781
  },
697
782
  {
698
- "name": "email",
699
- "variant": "caption"
700
- },
701
- {
702
- "name": "phone",
703
- "variant": "caption"
704
- }
705
- ],
706
- "entity": "@payload.data",
707
- "itemActions": [
708
- {
709
- "label": "View",
710
- "variant": "ghost",
711
- "event": "VIEW"
712
- },
713
- {
714
- "label": "Edit",
715
- "variant": "ghost",
716
- "event": "EDIT"
783
+ "variant": "caption",
784
+ "name": "email"
717
785
  },
718
786
  {
719
- "label": "Delete",
720
- "event": "DELETE",
721
- "variant": "danger"
787
+ "variant": "caption",
788
+ "name": "phone"
722
789
  }
723
790
  ],
724
- "variant": "card"
791
+ "gap": "sm",
792
+ "entity": "@payload.data"
725
793
  }
726
794
  ],
727
- "className": "max-w-5xl mx-auto w-full",
795
+ "gap": "lg",
796
+ "direction": "vertical",
728
797
  "type": "stack",
729
- "gap": "lg"
798
+ "className": "max-w-5xl mx-auto w-full"
730
799
  }
731
800
  ],
732
- "type": "dashboard-layout"
733
- }
734
- ]
735
- ]
736
- },
737
- {
738
- "from": "browsing",
739
- "to": "browsing",
740
- "event": "ContactLoadFailed",
741
- "effects": [
742
- [
743
- "render-ui",
744
- "main",
745
- {
746
- "align": "center",
747
- "direction": "vertical",
748
- "className": "py-12",
749
- "type": "stack",
750
- "children": [
801
+ "navItems": [
802
+ {
803
+ "label": "Contacts",
804
+ "href": "/contacts",
805
+ "icon": "users"
806
+ },
807
+ {
808
+ "href": "/deals",
809
+ "icon": "briefcase",
810
+ "label": "Deals"
811
+ },
812
+ {
813
+ "href": "/pipeline",
814
+ "icon": "bar-chart-2",
815
+ "label": "Pipeline"
816
+ },
817
+ {
818
+ "label": "Notes",
819
+ "href": "/notes",
820
+ "icon": "file-text"
821
+ }
822
+ ],
823
+ "type": "dashboard-layout"
824
+ }
825
+ ]
826
+ ]
827
+ },
828
+ {
829
+ "from": "browsing",
830
+ "to": "browsing",
831
+ "event": "ContactLoadFailed",
832
+ "effects": [
833
+ [
834
+ "render-ui",
835
+ "main",
836
+ {
837
+ "gap": "md",
838
+ "children": [
751
839
  {
752
- "name": "alert-triangle",
753
840
  "color": "destructive",
754
- "type": "icon"
841
+ "type": "icon",
842
+ "name": "alert-triangle"
755
843
  },
756
844
  {
845
+ "type": "typography",
757
846
  "variant": "h3",
758
- "content": "Failed to load contact",
759
- "type": "typography"
847
+ "content": "Failed to load contact"
760
848
  },
761
849
  {
762
- "type": "typography",
763
- "content": "@payload.error",
764
850
  "color": "muted",
851
+ "content": "@payload.error",
852
+ "type": "typography",
765
853
  "variant": "body"
766
854
  },
767
855
  {
856
+ "variant": "primary",
768
857
  "icon": "rotate-ccw",
769
858
  "action": "INIT",
770
- "variant": "primary",
771
859
  "label": "Retry",
772
860
  "type": "button"
773
861
  }
774
862
  ],
775
- "gap": "md"
863
+ "direction": "vertical",
864
+ "className": "py-12",
865
+ "type": "stack",
866
+ "align": "center"
776
867
  }
777
868
  ]
778
869
  ]
@@ -847,6 +938,16 @@
847
938
  ]
848
939
  }
849
940
  ],
941
+ "listens": [
942
+ {
943
+ "event": "CREATE",
944
+ "triggers": "CREATE",
945
+ "source": {
946
+ "kind": "trait",
947
+ "trait": "ContactBrowse"
948
+ }
949
+ }
950
+ ],
850
951
  "stateMachine": {
851
952
  "states": [
852
953
  {
@@ -971,11 +1072,11 @@
971
1072
  "render-ui",
972
1073
  "modal",
973
1074
  {
974
- "gap": "md",
975
- "direction": "vertical",
976
1075
  "type": "stack",
1076
+ "direction": "vertical",
977
1077
  "children": [
978
1078
  {
1079
+ "gap": "sm",
979
1080
  "type": "stack",
980
1081
  "children": [
981
1082
  {
@@ -988,8 +1089,7 @@
988
1089
  "variant": "h3"
989
1090
  }
990
1091
  ],
991
- "direction": "horizontal",
992
- "gap": "sm"
1092
+ "direction": "horizontal"
993
1093
  },
994
1094
  {
995
1095
  "type": "divider"
@@ -1002,12 +1102,13 @@
1002
1102
  "phone",
1003
1103
  "status"
1004
1104
  ],
1105
+ "cancelEvent": "CLOSE",
1005
1106
  "type": "form-section",
1006
- "submitEvent": "SAVE",
1007
1107
  "mode": "create",
1008
- "cancelEvent": "CLOSE"
1108
+ "submitEvent": "SAVE"
1009
1109
  }
1010
- ]
1110
+ ],
1111
+ "gap": "md"
1011
1112
  }
1012
1113
  ]
1013
1114
  ]
@@ -1141,6 +1242,24 @@
1141
1242
  ]
1142
1243
  }
1143
1244
  ],
1245
+ "listens": [
1246
+ {
1247
+ "event": "EDIT",
1248
+ "triggers": "EDIT",
1249
+ "source": {
1250
+ "kind": "trait",
1251
+ "trait": "ContactBrowse"
1252
+ }
1253
+ },
1254
+ {
1255
+ "event": "EDIT",
1256
+ "triggers": "EDIT",
1257
+ "source": {
1258
+ "kind": "trait",
1259
+ "trait": "ContactView"
1260
+ }
1261
+ }
1262
+ ],
1144
1263
  "stateMachine": {
1145
1264
  "states": [
1146
1265
  {
@@ -1268,8 +1387,8 @@
1268
1387
  {
1269
1388
  "id": "@payload.id",
1270
1389
  "emit": {
1271
- "failure": "ContactLoadFailed",
1272
- "success": "ContactLoaded"
1390
+ "success": "ContactLoaded",
1391
+ "failure": "ContactLoadFailed"
1273
1392
  }
1274
1393
  }
1275
1394
  ],
@@ -1277,31 +1396,32 @@
1277
1396
  "render-ui",
1278
1397
  "modal",
1279
1398
  {
1399
+ "type": "stack",
1400
+ "direction": "vertical",
1280
1401
  "children": [
1281
1402
  {
1282
1403
  "gap": "sm",
1283
- "direction": "horizontal",
1284
1404
  "type": "stack",
1285
1405
  "children": [
1286
1406
  {
1287
- "type": "icon",
1288
- "name": "edit"
1407
+ "name": "edit",
1408
+ "type": "icon"
1289
1409
  },
1290
1410
  {
1291
1411
  "type": "typography",
1292
1412
  "content": "Edit Contact",
1293
1413
  "variant": "h3"
1294
1414
  }
1295
- ]
1415
+ ],
1416
+ "direction": "horizontal"
1296
1417
  },
1297
1418
  {
1298
1419
  "type": "divider"
1299
1420
  },
1300
1421
  {
1422
+ "type": "form-section",
1301
1423
  "entity": "@payload.row",
1302
1424
  "mode": "edit",
1303
- "type": "form-section",
1304
- "cancelEvent": "CLOSE",
1305
1425
  "fields": [
1306
1426
  "name",
1307
1427
  "company",
@@ -1309,12 +1429,11 @@
1309
1429
  "phone",
1310
1430
  "status"
1311
1431
  ],
1432
+ "cancelEvent": "CLOSE",
1312
1433
  "submitEvent": "SAVE"
1313
1434
  }
1314
1435
  ],
1315
- "type": "stack",
1316
- "gap": "md",
1317
- "direction": "vertical"
1436
+ "gap": "md"
1318
1437
  }
1319
1438
  ]
1320
1439
  ]
@@ -1355,8 +1474,8 @@
1355
1474
  "@payload.data",
1356
1475
  {
1357
1476
  "emit": {
1358
- "success": "ContactUpdated",
1359
- "failure": "ContactUpdateFailed"
1477
+ "failure": "ContactUpdateFailed",
1478
+ "success": "ContactUpdated"
1360
1479
  }
1361
1480
  }
1362
1481
  ],
@@ -1387,6 +1506,45 @@
1387
1506
  "category": "interaction",
1388
1507
  "linkedEntity": "Contact",
1389
1508
  "emits": [
1509
+ {
1510
+ "event": "EDIT",
1511
+ "payloadSchema": [
1512
+ {
1513
+ "name": "id",
1514
+ "type": "string",
1515
+ "required": true
1516
+ },
1517
+ {
1518
+ "name": "row.id",
1519
+ "type": "string",
1520
+ "required": true
1521
+ },
1522
+ {
1523
+ "name": "row.name",
1524
+ "type": "string"
1525
+ },
1526
+ {
1527
+ "name": "row.company",
1528
+ "type": "string"
1529
+ },
1530
+ {
1531
+ "name": "row.email",
1532
+ "type": "string"
1533
+ },
1534
+ {
1535
+ "name": "row.phone",
1536
+ "type": "string"
1537
+ },
1538
+ {
1539
+ "name": "row.status",
1540
+ "type": "string"
1541
+ },
1542
+ {
1543
+ "name": "row.pendingId",
1544
+ "type": "string"
1545
+ }
1546
+ ]
1547
+ },
1390
1548
  {
1391
1549
  "event": "ContactLoaded",
1392
1550
  "description": "Fired when Contact finishes loading",
@@ -1414,6 +1572,16 @@
1414
1572
  ]
1415
1573
  }
1416
1574
  ],
1575
+ "listens": [
1576
+ {
1577
+ "event": "VIEW",
1578
+ "triggers": "VIEW",
1579
+ "source": {
1580
+ "kind": "trait",
1581
+ "trait": "ContactBrowse"
1582
+ }
1583
+ }
1584
+ ],
1417
1585
  "stateMachine": {
1418
1586
  "states": [
1419
1587
  {
@@ -1455,6 +1623,10 @@
1455
1623
  }
1456
1624
  ]
1457
1625
  },
1626
+ {
1627
+ "key": "EDIT",
1628
+ "name": "Edit"
1629
+ },
1458
1630
  {
1459
1631
  "key": "ContactLoaded",
1460
1632
  "name": "Contact loaded",
@@ -1524,132 +1696,132 @@
1524
1696
  "children": [
1525
1697
  {
1526
1698
  "direction": "horizontal",
1699
+ "gap": "sm",
1700
+ "type": "stack",
1701
+ "align": "center",
1527
1702
  "children": [
1528
1703
  {
1529
1704
  "type": "icon",
1530
1705
  "name": "eye"
1531
1706
  },
1532
1707
  {
1533
- "type": "typography",
1708
+ "variant": "h3",
1534
1709
  "content": "@entity.name",
1535
- "variant": "h3"
1710
+ "type": "typography"
1536
1711
  }
1537
- ],
1538
- "gap": "sm",
1539
- "type": "stack",
1540
- "align": "center"
1712
+ ]
1541
1713
  },
1542
1714
  {
1543
1715
  "type": "divider"
1544
1716
  },
1545
1717
  {
1718
+ "direction": "horizontal",
1546
1719
  "children": [
1547
1720
  {
1548
1721
  "variant": "caption",
1549
- "content": "Name",
1550
- "type": "typography"
1722
+ "type": "typography",
1723
+ "content": "Name"
1551
1724
  },
1552
1725
  {
1553
- "variant": "body",
1554
1726
  "content": "@entity.name",
1555
- "type": "typography"
1727
+ "type": "typography",
1728
+ "variant": "body"
1556
1729
  }
1557
1730
  ],
1558
1731
  "type": "stack",
1559
- "direction": "horizontal",
1560
1732
  "gap": "md"
1561
1733
  },
1562
1734
  {
1563
1735
  "direction": "horizontal",
1564
- "gap": "md",
1565
- "type": "stack",
1566
1736
  "children": [
1567
1737
  {
1738
+ "type": "typography",
1568
1739
  "variant": "caption",
1569
- "content": "Company",
1570
- "type": "typography"
1740
+ "content": "Company"
1571
1741
  },
1572
1742
  {
1743
+ "content": "@entity.company",
1573
1744
  "variant": "body",
1574
- "type": "typography",
1575
- "content": "@entity.company"
1745
+ "type": "typography"
1576
1746
  }
1577
- ]
1747
+ ],
1748
+ "type": "stack",
1749
+ "gap": "md"
1578
1750
  },
1579
1751
  {
1580
- "gap": "md",
1581
- "direction": "horizontal",
1582
1752
  "children": [
1583
1753
  {
1584
1754
  "type": "typography",
1585
- "content": "Email",
1586
- "variant": "caption"
1755
+ "variant": "caption",
1756
+ "content": "Email"
1587
1757
  },
1588
1758
  {
1589
- "variant": "body",
1759
+ "type": "typography",
1590
1760
  "content": "@entity.email",
1591
- "type": "typography"
1761
+ "variant": "body"
1592
1762
  }
1593
1763
  ],
1594
- "type": "stack"
1764
+ "gap": "md",
1765
+ "type": "stack",
1766
+ "direction": "horizontal"
1595
1767
  },
1596
1768
  {
1769
+ "direction": "horizontal",
1597
1770
  "children": [
1598
1771
  {
1772
+ "content": "Phone",
1599
1773
  "type": "typography",
1600
- "variant": "caption",
1601
- "content": "Phone"
1774
+ "variant": "caption"
1602
1775
  },
1603
1776
  {
1604
- "content": "@entity.phone",
1605
1777
  "type": "typography",
1606
- "variant": "body"
1778
+ "variant": "body",
1779
+ "content": "@entity.phone"
1607
1780
  }
1608
1781
  ],
1609
- "type": "stack",
1610
- "direction": "horizontal",
1611
- "gap": "md"
1782
+ "gap": "md",
1783
+ "type": "stack"
1612
1784
  },
1613
1785
  {
1614
- "type": "stack",
1615
1786
  "children": [
1616
1787
  {
1788
+ "content": "Status",
1617
1789
  "type": "typography",
1618
- "variant": "caption",
1619
- "content": "Status"
1790
+ "variant": "caption"
1620
1791
  },
1621
1792
  {
1622
- "content": "@entity.status",
1793
+ "type": "typography",
1623
1794
  "variant": "body",
1624
- "type": "typography"
1795
+ "content": "@entity.status"
1625
1796
  }
1626
1797
  ],
1627
- "gap": "md",
1628
- "direction": "horizontal"
1798
+ "type": "stack",
1799
+ "direction": "horizontal",
1800
+ "gap": "md"
1629
1801
  },
1630
1802
  {
1631
1803
  "type": "divider"
1632
1804
  },
1633
1805
  {
1806
+ "justify": "end",
1807
+ "gap": "sm",
1634
1808
  "direction": "horizontal",
1809
+ "type": "stack",
1635
1810
  "children": [
1636
1811
  {
1637
- "icon": "edit",
1638
- "type": "button",
1639
1812
  "variant": "primary",
1640
1813
  "action": "EDIT",
1814
+ "type": "button",
1815
+ "icon": "edit",
1641
1816
  "label": "Edit"
1642
1817
  },
1643
1818
  {
1644
- "label": "Close",
1819
+ "variant": "ghost",
1645
1820
  "action": "CLOSE",
1646
1821
  "type": "button",
1647
- "variant": "ghost"
1822
+ "label": "Close"
1648
1823
  }
1649
- ],
1650
- "justify": "end",
1651
- "gap": "sm",
1652
- "type": "stack"
1824
+ ]
1653
1825
  }
1654
1826
  ]
1655
1827
  }
@@ -1769,6 +1941,16 @@
1769
1941
  ]
1770
1942
  }
1771
1943
  ],
1944
+ "listens": [
1945
+ {
1946
+ "event": "DELETE",
1947
+ "triggers": "DELETE",
1948
+ "source": {
1949
+ "kind": "trait",
1950
+ "trait": "ContactBrowse"
1951
+ }
1952
+ }
1953
+ ],
1772
1954
  "stateMachine": {
1773
1955
  "states": [
1774
1956
  {
@@ -1871,8 +2053,8 @@
1871
2053
  "Contact",
1872
2054
  {
1873
2055
  "emit": {
1874
- "failure": "ContactLoadFailed",
1875
- "success": "ContactLoaded"
2056
+ "success": "ContactLoaded",
2057
+ "failure": "ContactLoadFailed"
1876
2058
  }
1877
2059
  }
1878
2060
  ]
@@ -1892,35 +2074,34 @@
1892
2074
  "fetch",
1893
2075
  "Contact",
1894
2076
  {
2077
+ "id": "@payload.id",
1895
2078
  "emit": {
1896
- "failure": "ContactLoadFailed",
1897
- "success": "ContactLoaded"
1898
- },
1899
- "id": "@payload.id"
2079
+ "success": "ContactLoaded",
2080
+ "failure": "ContactLoadFailed"
2081
+ }
1900
2082
  }
1901
2083
  ],
1902
2084
  [
1903
2085
  "render-ui",
1904
2086
  "modal",
1905
2087
  {
1906
- "gap": "md",
1907
2088
  "children": [
1908
2089
  {
1909
- "gap": "sm",
1910
2090
  "type": "stack",
1911
- "align": "center",
1912
2091
  "direction": "horizontal",
1913
2092
  "children": [
1914
2093
  {
1915
- "type": "icon",
1916
- "name": "alert-triangle"
2094
+ "name": "alert-triangle",
2095
+ "type": "icon"
1917
2096
  },
1918
2097
  {
1919
2098
  "type": "typography",
1920
- "variant": "h3",
1921
- "content": "Delete Contact"
2099
+ "content": "Delete Contact",
2100
+ "variant": "h3"
1922
2101
  }
1923
- ]
2102
+ ],
2103
+ "align": "center",
2104
+ "gap": "sm"
1924
2105
  },
1925
2106
  {
1926
2107
  "type": "divider"
@@ -1931,29 +2112,30 @@
1931
2112
  "message": "This action cannot be undone."
1932
2113
  },
1933
2114
  {
2115
+ "type": "stack",
1934
2116
  "justify": "end",
2117
+ "gap": "sm",
1935
2118
  "children": [
1936
2119
  {
1937
2120
  "variant": "ghost",
1938
- "label": "Cancel",
1939
2121
  "type": "button",
1940
- "action": "CANCEL"
2122
+ "action": "CANCEL",
2123
+ "label": "Cancel"
1941
2124
  },
1942
2125
  {
1943
- "action": "CONFIRM_DELETE",
1944
- "variant": "danger",
1945
2126
  "icon": "check",
1946
2127
  "type": "button",
2128
+ "action": "CONFIRM_DELETE",
2129
+ "variant": "danger",
1947
2130
  "label": "Delete"
1948
2131
  }
1949
2132
  ],
1950
- "gap": "sm",
1951
- "type": "stack",
1952
2133
  "direction": "horizontal"
1953
2134
  }
1954
2135
  ],
1955
2136
  "direction": "vertical",
1956
- "type": "stack"
2137
+ "type": "stack",
2138
+ "gap": "md"
1957
2139
  }
1958
2140
  ]
1959
2141
  ]
@@ -2025,8 +2207,8 @@
2025
2207
  "Contact",
2026
2208
  {
2027
2209
  "emit": {
2028
- "success": "ContactLoaded",
2029
- "failure": "ContactLoadFailed"
2210
+ "failure": "ContactLoadFailed",
2211
+ "success": "ContactLoaded"
2030
2212
  }
2031
2213
  }
2032
2214
  ]
@@ -2054,8 +2236,8 @@
2054
2236
  "Contact",
2055
2237
  {
2056
2238
  "emit": {
2057
- "success": "ContactLoaded",
2058
- "failure": "ContactLoadFailed"
2239
+ "failure": "ContactLoadFailed",
2240
+ "success": "ContactLoaded"
2059
2241
  }
2060
2242
  }
2061
2243
  ]
@@ -2144,6 +2326,126 @@
2144
2326
  }
2145
2327
  ]
2146
2328
  },
2329
+ {
2330
+ "event": "CREATE"
2331
+ },
2332
+ {
2333
+ "event": "VIEW",
2334
+ "payloadSchema": [
2335
+ {
2336
+ "name": "id",
2337
+ "type": "string",
2338
+ "required": true
2339
+ },
2340
+ {
2341
+ "name": "row.id",
2342
+ "type": "string",
2343
+ "required": true
2344
+ },
2345
+ {
2346
+ "name": "row.title",
2347
+ "type": "string"
2348
+ },
2349
+ {
2350
+ "name": "row.contactId",
2351
+ "type": "string"
2352
+ },
2353
+ {
2354
+ "name": "row.value",
2355
+ "type": "number"
2356
+ },
2357
+ {
2358
+ "name": "row.stage",
2359
+ "type": "string"
2360
+ },
2361
+ {
2362
+ "name": "row.closedAt",
2363
+ "type": "datetime"
2364
+ },
2365
+ {
2366
+ "name": "row.pendingId",
2367
+ "type": "string"
2368
+ }
2369
+ ]
2370
+ },
2371
+ {
2372
+ "event": "EDIT",
2373
+ "payloadSchema": [
2374
+ {
2375
+ "name": "id",
2376
+ "type": "string",
2377
+ "required": true
2378
+ },
2379
+ {
2380
+ "name": "row.id",
2381
+ "type": "string",
2382
+ "required": true
2383
+ },
2384
+ {
2385
+ "name": "row.title",
2386
+ "type": "string"
2387
+ },
2388
+ {
2389
+ "name": "row.contactId",
2390
+ "type": "string"
2391
+ },
2392
+ {
2393
+ "name": "row.value",
2394
+ "type": "number"
2395
+ },
2396
+ {
2397
+ "name": "row.stage",
2398
+ "type": "string"
2399
+ },
2400
+ {
2401
+ "name": "row.closedAt",
2402
+ "type": "datetime"
2403
+ },
2404
+ {
2405
+ "name": "row.pendingId",
2406
+ "type": "string"
2407
+ }
2408
+ ]
2409
+ },
2410
+ {
2411
+ "event": "DELETE",
2412
+ "payloadSchema": [
2413
+ {
2414
+ "name": "id",
2415
+ "type": "string",
2416
+ "required": true
2417
+ },
2418
+ {
2419
+ "name": "row.id",
2420
+ "type": "string",
2421
+ "required": true
2422
+ },
2423
+ {
2424
+ "name": "row.title",
2425
+ "type": "string"
2426
+ },
2427
+ {
2428
+ "name": "row.contactId",
2429
+ "type": "string"
2430
+ },
2431
+ {
2432
+ "name": "row.value",
2433
+ "type": "number"
2434
+ },
2435
+ {
2436
+ "name": "row.stage",
2437
+ "type": "string"
2438
+ },
2439
+ {
2440
+ "name": "row.closedAt",
2441
+ "type": "datetime"
2442
+ },
2443
+ {
2444
+ "name": "row.pendingId",
2445
+ "type": "string"
2446
+ }
2447
+ ]
2448
+ },
2147
2449
  {
2148
2450
  "event": "DealLoaded",
2149
2451
  "description": "Fired when Deal finishes loading",
@@ -2243,6 +2545,22 @@
2243
2545
  {
2244
2546
  "key": "CLOSE_DEAL",
2245
2547
  "name": "Close Deal"
2548
+ },
2549
+ {
2550
+ "key": "CREATE",
2551
+ "name": "Create"
2552
+ },
2553
+ {
2554
+ "key": "VIEW",
2555
+ "name": "View"
2556
+ },
2557
+ {
2558
+ "key": "EDIT",
2559
+ "name": "Edit"
2560
+ },
2561
+ {
2562
+ "key": "DELETE",
2563
+ "name": "Delete"
2246
2564
  }
2247
2565
  ],
2248
2566
  "transitions": [
@@ -2256,8 +2574,8 @@
2256
2574
  "Deal",
2257
2575
  {
2258
2576
  "emit": {
2259
- "success": "DealLoaded",
2260
- "failure": "DealLoadFailed"
2577
+ "failure": "DealLoadFailed",
2578
+ "success": "DealLoaded"
2261
2579
  }
2262
2580
  }
2263
2581
  ],
@@ -2270,17 +2588,17 @@
2270
2588
  "type": "spinner"
2271
2589
  },
2272
2590
  {
2591
+ "color": "muted",
2273
2592
  "type": "typography",
2274
- "variant": "caption",
2275
2593
  "content": "Loading…",
2276
- "color": "muted"
2594
+ "variant": "caption"
2277
2595
  }
2278
2596
  ],
2279
- "direction": "vertical",
2280
2597
  "gap": "md",
2598
+ "direction": "vertical",
2599
+ "type": "stack",
2281
2600
  "align": "center",
2282
- "className": "py-12",
2283
- "type": "stack"
2601
+ "className": "py-12"
2284
2602
  }
2285
2603
  ]
2286
2604
  ]
@@ -2294,86 +2612,103 @@
2294
2612
  "render-ui",
2295
2613
  "main",
2296
2614
  {
2615
+ "type": "dashboard-layout",
2616
+ "appName": "CRM",
2297
2617
  "navItems": [
2298
2618
  {
2299
- "label": "Contacts",
2619
+ "icon": "users",
2300
2620
  "href": "/contacts",
2301
- "icon": "users"
2621
+ "label": "Contacts"
2302
2622
  },
2303
2623
  {
2304
2624
  "icon": "briefcase",
2305
- "href": "/deals",
2306
- "label": "Deals"
2625
+ "label": "Deals",
2626
+ "href": "/deals"
2307
2627
  },
2308
2628
  {
2629
+ "icon": "bar-chart-2",
2309
2630
  "label": "Pipeline",
2310
- "href": "/pipeline",
2311
- "icon": "bar-chart-2"
2631
+ "href": "/pipeline"
2312
2632
  },
2313
2633
  {
2634
+ "icon": "file-text",
2314
2635
  "label": "Notes",
2315
- "href": "/notes",
2316
- "icon": "file-text"
2636
+ "href": "/notes"
2317
2637
  }
2318
2638
  ],
2319
- "type": "dashboard-layout",
2320
- "appName": "CRM",
2321
2639
  "children": [
2322
2640
  {
2641
+ "direction": "vertical",
2642
+ "type": "stack",
2643
+ "className": "max-w-5xl mx-auto w-full",
2323
2644
  "children": [
2324
2645
  {
2325
- "gap": "md",
2326
- "align": "center",
2327
2646
  "type": "stack",
2647
+ "gap": "md",
2328
2648
  "justify": "between",
2649
+ "direction": "horizontal",
2650
+ "align": "center",
2329
2651
  "children": [
2330
2652
  {
2331
- "type": "stack",
2332
- "gap": "sm",
2333
- "direction": "horizontal",
2334
- "align": "center",
2335
2653
  "children": [
2336
2654
  {
2337
- "type": "icon",
2338
- "name": "briefcase"
2655
+ "name": "briefcase",
2656
+ "type": "icon"
2339
2657
  },
2340
2658
  {
2341
2659
  "variant": "h2",
2342
- "type": "typography",
2343
- "content": "Deals"
2660
+ "content": "Deals",
2661
+ "type": "typography"
2344
2662
  }
2345
- ]
2663
+ ],
2664
+ "align": "center",
2665
+ "gap": "sm",
2666
+ "type": "stack",
2667
+ "direction": "horizontal"
2346
2668
  },
2347
2669
  {
2670
+ "direction": "horizontal",
2348
2671
  "gap": "sm",
2349
2672
  "type": "stack",
2350
2673
  "children": [
2351
2674
  {
2352
2675
  "type": "button",
2353
- "label": "New Deal",
2354
- "variant": "primary",
2676
+ "action": "CREATE",
2355
2677
  "icon": "plus",
2356
- "action": "CREATE"
2678
+ "label": "New Deal",
2679
+ "variant": "primary"
2357
2680
  }
2358
- ],
2359
- "direction": "horizontal"
2681
+ ]
2360
2682
  }
2361
- ],
2362
- "direction": "horizontal"
2683
+ ]
2363
2684
  },
2364
2685
  {
2365
2686
  "type": "divider"
2366
2687
  },
2367
2688
  {
2368
- "cols": 2.0,
2369
- "gap": "md",
2370
2689
  "entity": "@payload.data",
2371
- "type": "data-grid",
2690
+ "itemActions": [
2691
+ {
2692
+ "label": "View",
2693
+ "event": "VIEW",
2694
+ "variant": "ghost"
2695
+ },
2696
+ {
2697
+ "variant": "ghost",
2698
+ "label": "Edit",
2699
+ "event": "EDIT"
2700
+ },
2701
+ {
2702
+ "label": "Delete",
2703
+ "variant": "danger",
2704
+ "event": "DELETE"
2705
+ }
2706
+ ],
2372
2707
  "fields": [
2373
2708
  {
2374
2709
  "variant": "h3",
2375
- "icon": "briefcase",
2376
- "name": "title"
2710
+ "name": "title",
2711
+ "icon": "briefcase"
2377
2712
  },
2378
2713
  {
2379
2714
  "name": "stage",
@@ -2381,8 +2716,8 @@
2381
2716
  },
2382
2717
  {
2383
2718
  "format": "currency",
2384
- "variant": "h4",
2385
- "name": "value"
2719
+ "name": "value",
2720
+ "variant": "h4"
2386
2721
  },
2387
2722
  {
2388
2723
  "label": "Contact",
@@ -2390,29 +2725,12 @@
2390
2725
  "name": "contactId"
2391
2726
  }
2392
2727
  ],
2393
- "itemActions": [
2394
- {
2395
- "variant": "ghost",
2396
- "label": "View",
2397
- "event": "VIEW"
2398
- },
2399
- {
2400
- "event": "EDIT",
2401
- "label": "Edit",
2402
- "variant": "ghost"
2403
- },
2404
- {
2405
- "event": "DELETE",
2406
- "variant": "danger",
2407
- "label": "Delete"
2408
- }
2409
- ]
2728
+ "cols": 2.0,
2729
+ "type": "data-grid",
2730
+ "gap": "md"
2410
2731
  }
2411
2732
  ],
2412
- "type": "stack",
2413
- "direction": "vertical",
2414
- "gap": "lg",
2415
- "className": "max-w-5xl mx-auto w-full"
2733
+ "gap": "lg"
2416
2734
  }
2417
2735
  ]
2418
2736
  }
@@ -2428,36 +2746,36 @@
2428
2746
  "render-ui",
2429
2747
  "main",
2430
2748
  {
2749
+ "type": "stack",
2431
2750
  "align": "center",
2432
2751
  "className": "py-12",
2752
+ "direction": "vertical",
2433
2753
  "children": [
2434
2754
  {
2435
- "color": "destructive",
2436
2755
  "type": "icon",
2437
- "name": "alert-triangle"
2756
+ "name": "alert-triangle",
2757
+ "color": "destructive"
2438
2758
  },
2439
2759
  {
2440
- "content": "Failed to load deal",
2441
2760
  "type": "typography",
2442
- "variant": "h3"
2761
+ "variant": "h3",
2762
+ "content": "Failed to load deal"
2443
2763
  },
2444
2764
  {
2445
2765
  "color": "muted",
2446
- "content": "@payload.error",
2766
+ "variant": "body",
2447
2767
  "type": "typography",
2448
- "variant": "body"
2768
+ "content": "@payload.error"
2449
2769
  },
2450
2770
  {
2451
- "label": "Retry",
2452
- "type": "button",
2453
2771
  "variant": "primary",
2454
2772
  "icon": "rotate-ccw",
2773
+ "type": "button",
2774
+ "label": "Retry",
2455
2775
  "action": "INIT"
2456
2776
  }
2457
2777
  ],
2458
- "type": "stack",
2459
- "gap": "md",
2460
- "direction": "vertical"
2778
+ "gap": "md"
2461
2779
  }
2462
2780
  ]
2463
2781
  ]
@@ -2525,6 +2843,16 @@
2525
2843
  ]
2526
2844
  }
2527
2845
  ],
2846
+ "listens": [
2847
+ {
2848
+ "event": "CREATE",
2849
+ "triggers": "CREATE",
2850
+ "source": {
2851
+ "kind": "trait",
2852
+ "trait": "DealBrowse"
2853
+ }
2854
+ }
2855
+ ],
2528
2856
  "stateMachine": {
2529
2857
  "states": [
2530
2858
  {
@@ -2622,8 +2950,8 @@
2622
2950
  "Deal",
2623
2951
  {
2624
2952
  "emit": {
2625
- "success": "DealLoaded",
2626
- "failure": "DealLoadFailed"
2953
+ "failure": "DealLoadFailed",
2954
+ "success": "DealLoaded"
2627
2955
  }
2628
2956
  }
2629
2957
  ]
@@ -2639,8 +2967,8 @@
2639
2967
  "Deal",
2640
2968
  {
2641
2969
  "emit": {
2642
- "success": "DealLoaded",
2643
- "failure": "DealLoadFailed"
2970
+ "failure": "DealLoadFailed",
2971
+ "success": "DealLoaded"
2644
2972
  }
2645
2973
  }
2646
2974
  ],
@@ -2651,6 +2979,8 @@
2651
2979
  "children": [
2652
2980
  {
2653
2981
  "gap": "sm",
2982
+ "direction": "horizontal",
2983
+ "type": "stack",
2654
2984
  "children": [
2655
2985
  {
2656
2986
  "type": "icon",
@@ -2658,33 +2988,31 @@
2658
2988
  },
2659
2989
  {
2660
2990
  "type": "typography",
2661
- "variant": "h3",
2662
- "content": "Create Deal"
2991
+ "content": "Create Deal",
2992
+ "variant": "h3"
2663
2993
  }
2664
- ],
2665
- "direction": "horizontal",
2666
- "type": "stack"
2994
+ ]
2667
2995
  },
2668
2996
  {
2669
2997
  "type": "divider"
2670
2998
  },
2671
2999
  {
3000
+ "submitEvent": "SAVE",
3001
+ "type": "form-section",
3002
+ "cancelEvent": "CLOSE",
3003
+ "mode": "create",
2672
3004
  "fields": [
2673
3005
  "title",
2674
3006
  "contactId",
2675
3007
  "value",
2676
3008
  "stage",
2677
3009
  "closedAt"
2678
- ],
2679
- "submitEvent": "SAVE",
2680
- "type": "form-section",
2681
- "mode": "create",
2682
- "cancelEvent": "CLOSE"
3010
+ ]
2683
3011
  }
2684
3012
  ],
2685
3013
  "type": "stack",
2686
- "gap": "md",
2687
- "direction": "vertical"
3014
+ "direction": "vertical",
3015
+ "gap": "md"
2688
3016
  }
2689
3017
  ]
2690
3018
  ]
@@ -2725,8 +3053,8 @@
2725
3053
  "@payload.data",
2726
3054
  {
2727
3055
  "emit": {
2728
- "failure": "DealSaveFailed",
2729
- "success": "DealSaved"
3056
+ "success": "DealSaved",
3057
+ "failure": "DealSaveFailed"
2730
3058
  }
2731
3059
  }
2732
3060
  ],
@@ -2811,6 +3139,24 @@
2811
3139
  ]
2812
3140
  }
2813
3141
  ],
3142
+ "listens": [
3143
+ {
3144
+ "event": "EDIT",
3145
+ "triggers": "EDIT",
3146
+ "source": {
3147
+ "kind": "trait",
3148
+ "trait": "DealBrowse"
3149
+ }
3150
+ },
3151
+ {
3152
+ "event": "EDIT",
3153
+ "triggers": "EDIT",
3154
+ "source": {
3155
+ "kind": "trait",
3156
+ "trait": "DealView"
3157
+ }
3158
+ }
3159
+ ],
2814
3160
  "stateMachine": {
2815
3161
  "states": [
2816
3162
  {
@@ -2918,8 +3264,8 @@
2918
3264
  "Deal",
2919
3265
  {
2920
3266
  "emit": {
2921
- "failure": "DealLoadFailed",
2922
- "success": "DealLoaded"
3267
+ "success": "DealLoaded",
3268
+ "failure": "DealLoadFailed"
2923
3269
  }
2924
3270
  }
2925
3271
  ]
@@ -2947,18 +3293,18 @@
2947
3293
  {
2948
3294
  "children": [
2949
3295
  {
2950
- "direction": "horizontal",
2951
3296
  "type": "stack",
3297
+ "direction": "horizontal",
2952
3298
  "gap": "sm",
2953
3299
  "children": [
2954
3300
  {
2955
- "name": "edit",
2956
- "type": "icon"
3301
+ "type": "icon",
3302
+ "name": "edit"
2957
3303
  },
2958
3304
  {
2959
3305
  "content": "Edit Deal",
2960
- "type": "typography",
2961
- "variant": "h3"
3306
+ "variant": "h3",
3307
+ "type": "typography"
2962
3308
  }
2963
3309
  ]
2964
3310
  },
@@ -2966,18 +3312,18 @@
2966
3312
  "type": "divider"
2967
3313
  },
2968
3314
  {
2969
- "type": "form-section",
2970
- "cancelEvent": "CLOSE",
2971
- "mode": "edit",
2972
- "entity": "@payload.row",
2973
- "submitEvent": "SAVE",
2974
3315
  "fields": [
2975
3316
  "title",
2976
3317
  "contactId",
2977
3318
  "value",
2978
3319
  "stage",
2979
3320
  "closedAt"
2980
- ]
3321
+ ],
3322
+ "mode": "edit",
3323
+ "type": "form-section",
3324
+ "cancelEvent": "CLOSE",
3325
+ "entity": "@payload.row",
3326
+ "submitEvent": "SAVE"
2981
3327
  }
2982
3328
  ],
2983
3329
  "gap": "md",
@@ -3055,6 +3401,45 @@
3055
3401
  "category": "interaction",
3056
3402
  "linkedEntity": "Deal",
3057
3403
  "emits": [
3404
+ {
3405
+ "event": "EDIT",
3406
+ "payloadSchema": [
3407
+ {
3408
+ "name": "id",
3409
+ "type": "string",
3410
+ "required": true
3411
+ },
3412
+ {
3413
+ "name": "row.id",
3414
+ "type": "string",
3415
+ "required": true
3416
+ },
3417
+ {
3418
+ "name": "row.title",
3419
+ "type": "string"
3420
+ },
3421
+ {
3422
+ "name": "row.contactId",
3423
+ "type": "string"
3424
+ },
3425
+ {
3426
+ "name": "row.value",
3427
+ "type": "number"
3428
+ },
3429
+ {
3430
+ "name": "row.stage",
3431
+ "type": "string"
3432
+ },
3433
+ {
3434
+ "name": "row.closedAt",
3435
+ "type": "datetime"
3436
+ },
3437
+ {
3438
+ "name": "row.pendingId",
3439
+ "type": "string"
3440
+ }
3441
+ ]
3442
+ },
3058
3443
  {
3059
3444
  "event": "DealLoaded",
3060
3445
  "description": "Fired when Deal finishes loading",
@@ -3082,6 +3467,16 @@
3082
3467
  ]
3083
3468
  }
3084
3469
  ],
3470
+ "listens": [
3471
+ {
3472
+ "event": "VIEW",
3473
+ "triggers": "VIEW",
3474
+ "source": {
3475
+ "kind": "trait",
3476
+ "trait": "DealBrowse"
3477
+ }
3478
+ }
3479
+ ],
3085
3480
  "stateMachine": {
3086
3481
  "states": [
3087
3482
  {
@@ -3115,6 +3510,10 @@
3115
3510
  "key": "SAVE",
3116
3511
  "name": "Save"
3117
3512
  },
3513
+ {
3514
+ "key": "EDIT",
3515
+ "name": "Edit"
3516
+ },
3118
3517
  {
3119
3518
  "key": "DealLoaded",
3120
3519
  "name": "Deal loaded",
@@ -3167,34 +3566,37 @@
3167
3566
  "fetch",
3168
3567
  "Deal",
3169
3568
  {
3569
+ "id": "@payload.id",
3170
3570
  "emit": {
3171
- "success": "DealLoaded",
3172
- "failure": "DealLoadFailed"
3173
- },
3174
- "id": "@payload.id"
3571
+ "failure": "DealLoadFailed",
3572
+ "success": "DealLoaded"
3573
+ }
3175
3574
  }
3176
3575
  ],
3177
3576
  [
3178
3577
  "render-ui",
3179
3578
  "modal",
3180
3579
  {
3580
+ "type": "stack",
3581
+ "direction": "vertical",
3582
+ "gap": "md",
3181
3583
  "children": [
3182
3584
  {
3585
+ "type": "stack",
3183
3586
  "direction": "horizontal",
3587
+ "align": "center",
3184
3588
  "children": [
3185
3589
  {
3186
3590
  "type": "icon",
3187
3591
  "name": "eye"
3188
3592
  },
3189
3593
  {
3594
+ "type": "typography",
3190
3595
  "variant": "h3",
3191
- "content": "@entity.title",
3192
- "type": "typography"
3596
+ "content": "@entity.title"
3193
3597
  }
3194
3598
  ],
3195
- "type": "stack",
3196
- "gap": "sm",
3197
- "align": "center"
3599
+ "gap": "sm"
3198
3600
  },
3199
3601
  {
3200
3602
  "type": "divider"
@@ -3202,65 +3604,65 @@
3202
3604
  {
3203
3605
  "children": [
3204
3606
  {
3205
- "variant": "caption",
3206
3607
  "type": "typography",
3207
- "content": "Title"
3608
+ "content": "Title",
3609
+ "variant": "caption"
3208
3610
  },
3209
3611
  {
3210
- "variant": "body",
3211
3612
  "type": "typography",
3613
+ "variant": "body",
3212
3614
  "content": "@entity.title"
3213
3615
  }
3214
3616
  ],
3215
3617
  "gap": "md",
3216
- "direction": "horizontal",
3217
- "type": "stack"
3618
+ "type": "stack",
3619
+ "direction": "horizontal"
3218
3620
  },
3219
3621
  {
3220
- "type": "stack",
3221
3622
  "direction": "horizontal",
3623
+ "type": "stack",
3222
3624
  "children": [
3223
3625
  {
3626
+ "type": "typography",
3224
3627
  "content": "Contact ID",
3225
- "variant": "caption",
3226
- "type": "typography"
3628
+ "variant": "caption"
3227
3629
  },
3228
3630
  {
3631
+ "content": "@entity.contactId",
3229
3632
  "type": "typography",
3230
- "variant": "body",
3231
- "content": "@entity.contactId"
3633
+ "variant": "body"
3232
3634
  }
3233
3635
  ],
3234
3636
  "gap": "md"
3235
3637
  },
3236
3638
  {
3237
3639
  "type": "stack",
3238
- "direction": "horizontal",
3239
3640
  "gap": "md",
3240
3641
  "children": [
3241
3642
  {
3242
- "variant": "caption",
3243
3643
  "type": "typography",
3644
+ "variant": "caption",
3244
3645
  "content": "Value"
3245
3646
  },
3246
3647
  {
3247
- "type": "typography",
3648
+ "content": "@entity.value",
3248
3649
  "variant": "body",
3249
- "content": "@entity.value"
3650
+ "type": "typography"
3250
3651
  }
3251
- ]
3652
+ ],
3653
+ "direction": "horizontal"
3252
3654
  },
3253
3655
  {
3254
3656
  "type": "stack",
3255
3657
  "children": [
3256
3658
  {
3659
+ "variant": "caption",
3257
3660
  "type": "typography",
3258
- "content": "Stage",
3259
- "variant": "caption"
3661
+ "content": "Stage"
3260
3662
  },
3261
3663
  {
3262
- "type": "typography",
3263
3664
  "content": "@entity.stage",
3665
+ "type": "typography",
3264
3666
  "variant": "body"
3265
3667
  }
3266
3668
  ],
@@ -3268,50 +3670,47 @@
3268
3670
  "gap": "md"
3269
3671
  },
3270
3672
  {
3271
- "type": "stack",
3272
3673
  "direction": "horizontal",
3273
- "gap": "md",
3274
3674
  "children": [
3275
3675
  {
3276
- "type": "typography",
3277
3676
  "variant": "caption",
3278
- "content": "Closed At"
3677
+ "content": "Closed At",
3678
+ "type": "typography"
3279
3679
  },
3280
3680
  {
3281
3681
  "variant": "body",
3282
3682
  "type": "typography",
3283
3683
  "content": "@entity.closedAt"
3284
3684
  }
3285
- ]
3685
+ ],
3686
+ "type": "stack",
3687
+ "gap": "md"
3286
3688
  },
3287
3689
  {
3288
3690
  "type": "divider"
3289
3691
  },
3290
3692
  {
3693
+ "gap": "sm",
3694
+ "direction": "horizontal",
3291
3695
  "type": "stack",
3292
3696
  "justify": "end",
3293
3697
  "children": [
3294
3698
  {
3699
+ "type": "button",
3700
+ "label": "Edit",
3295
3701
  "variant": "primary",
3296
3702
  "action": "EDIT",
3297
- "type": "button",
3298
- "icon": "edit",
3299
- "label": "Edit"
3703
+ "icon": "edit"
3300
3704
  },
3301
3705
  {
3302
- "label": "Close",
3706
+ "type": "button",
3303
3707
  "variant": "ghost",
3304
- "action": "CLOSE",
3305
- "type": "button"
3708
+ "label": "Close",
3709
+ "action": "CLOSE"
3306
3710
  }
3307
- ],
3308
- "gap": "sm",
3309
- "direction": "horizontal"
3711
+ ]
3310
3712
  }
3311
- ],
3312
- "direction": "vertical",
3313
- "type": "stack",
3314
- "gap": "md"
3713
+ ]
3315
3714
  }
3316
3715
  ]
3317
3716
  ]
@@ -3422,6 +3821,16 @@
3422
3821
  ]
3423
3822
  }
3424
3823
  ],
3824
+ "listens": [
3825
+ {
3826
+ "event": "DELETE",
3827
+ "triggers": "DELETE",
3828
+ "source": {
3829
+ "kind": "trait",
3830
+ "trait": "DealBrowse"
3831
+ }
3832
+ }
3833
+ ],
3425
3834
  "stateMachine": {
3426
3835
  "states": [
3427
3836
  {
@@ -3545,8 +3954,8 @@
3545
3954
  "Deal",
3546
3955
  {
3547
3956
  "emit": {
3548
- "failure": "DealLoadFailed",
3549
- "success": "DealLoaded"
3957
+ "success": "DealLoaded",
3958
+ "failure": "DealLoadFailed"
3550
3959
  },
3551
3960
  "id": "@payload.id"
3552
3961
  }
@@ -3555,15 +3964,12 @@
3555
3964
  "render-ui",
3556
3965
  "modal",
3557
3966
  {
3558
- "type": "stack",
3559
3967
  "gap": "md",
3968
+ "type": "stack",
3560
3969
  "direction": "vertical",
3561
3970
  "children": [
3562
3971
  {
3563
- "direction": "horizontal",
3564
- "gap": "sm",
3565
3972
  "align": "center",
3566
- "type": "stack",
3567
3973
  "children": [
3568
3974
  {
3569
3975
  "type": "icon",
@@ -3574,36 +3980,39 @@
3574
3980
  "type": "typography",
3575
3981
  "content": "Delete Deal"
3576
3982
  }
3577
- ]
3983
+ ],
3984
+ "gap": "sm",
3985
+ "direction": "horizontal",
3986
+ "type": "stack"
3578
3987
  },
3579
3988
  {
3580
3989
  "type": "divider"
3581
3990
  },
3582
3991
  {
3583
3992
  "variant": "error",
3584
- "type": "alert",
3585
- "message": "This action cannot be undone."
3993
+ "message": "This action cannot be undone.",
3994
+ "type": "alert"
3586
3995
  },
3587
3996
  {
3588
- "gap": "sm",
3589
- "type": "stack",
3590
3997
  "children": [
3591
3998
  {
3592
- "action": "CANCEL",
3593
3999
  "type": "button",
3594
- "label": "Cancel",
3595
- "variant": "ghost"
4000
+ "action": "CANCEL",
4001
+ "variant": "ghost",
4002
+ "label": "Cancel"
3596
4003
  },
3597
4004
  {
4005
+ "label": "Delete",
3598
4006
  "type": "button",
4007
+ "variant": "danger",
3599
4008
  "icon": "check",
3600
- "label": "Delete",
3601
- "action": "CONFIRM_DELETE",
3602
- "variant": "danger"
4009
+ "action": "CONFIRM_DELETE"
3603
4010
  }
3604
4011
  ],
3605
4012
  "justify": "end",
3606
- "direction": "horizontal"
4013
+ "direction": "horizontal",
4014
+ "type": "stack",
4015
+ "gap": "sm"
3607
4016
  }
3608
4017
  ]
3609
4018
  }
@@ -3622,8 +4031,8 @@
3622
4031
  "@entity.pendingId",
3623
4032
  {
3624
4033
  "emit": {
3625
- "failure": "DealDeleteFailed",
3626
- "success": "DealDeleted"
4034
+ "success": "DealDeleted",
4035
+ "failure": "DealDeleteFailed"
3627
4036
  }
3628
4037
  }
3629
4038
  ],
@@ -3644,8 +4053,8 @@
3644
4053
  "Deal",
3645
4054
  {
3646
4055
  "emit": {
3647
- "failure": "DealLoadFailed",
3648
- "success": "DealLoaded"
4056
+ "success": "DealLoaded",
4057
+ "failure": "DealLoadFailed"
3649
4058
  }
3650
4059
  }
3651
4060
  ],
@@ -3883,8 +4292,8 @@
3883
4292
  "Pipeline",
3884
4293
  {
3885
4294
  "emit": {
3886
- "failure": "PipelineLoadFailed",
3887
- "success": "PipelineLoaded"
4295
+ "success": "PipelineLoaded",
4296
+ "failure": "PipelineLoadFailed"
3888
4297
  }
3889
4298
  }
3890
4299
  ],
@@ -3893,7 +4302,6 @@
3893
4302
  "main",
3894
4303
  {
3895
4304
  "type": "dashboard-layout",
3896
- "appName": "CRM",
3897
4305
  "navItems": [
3898
4306
  {
3899
4307
  "href": "/contacts",
@@ -3902,17 +4310,17 @@
3902
4310
  },
3903
4311
  {
3904
4312
  "icon": "briefcase",
3905
- "href": "/deals",
3906
- "label": "Deals"
4313
+ "label": "Deals",
4314
+ "href": "/deals"
3907
4315
  },
3908
4316
  {
4317
+ "label": "Pipeline",
3909
4318
  "href": "/pipeline",
3910
- "icon": "bar-chart-2",
3911
- "label": "Pipeline"
4319
+ "icon": "bar-chart-2"
3912
4320
  },
3913
4321
  {
3914
- "icon": "file-text",
3915
4322
  "href": "/notes",
4323
+ "icon": "file-text",
3916
4324
  "label": "Notes"
3917
4325
  }
3918
4326
  ],
@@ -3923,9 +4331,9 @@
3923
4331
  {
3924
4332
  "gap": "lg",
3925
4333
  "type": "stack",
3926
- "direction": "vertical",
3927
4334
  "children": [
3928
4335
  {
4336
+ "type": "breadcrumb",
3929
4337
  "items": [
3930
4338
  {
3931
4339
  "label": "Home",
@@ -3934,14 +4342,17 @@
3934
4342
  {
3935
4343
  "label": "Pipeline"
3936
4344
  }
3937
- ],
3938
- "type": "breadcrumb"
4345
+ ]
3939
4346
  },
3940
4347
  {
3941
4348
  "direction": "horizontal",
4349
+ "justify": "between",
4350
+ "type": "stack",
4351
+ "gap": "md",
3942
4352
  "children": [
3943
4353
  {
3944
4354
  "type": "stack",
4355
+ "direction": "horizontal",
3945
4356
  "gap": "md",
3946
4357
  "children": [
3947
4358
  {
@@ -3949,40 +4360,40 @@
3949
4360
  "type": "icon"
3950
4361
  },
3951
4362
  {
3952
- "type": "typography",
3953
4363
  "content": "Pipeline",
3954
- "variant": "h2"
4364
+ "variant": "h2",
4365
+ "type": "typography"
3955
4366
  }
3956
- ],
3957
- "direction": "horizontal"
4367
+ ]
3958
4368
  },
3959
4369
  {
3960
4370
  "type": "button",
3961
- "icon": "refresh-cw",
3962
4371
  "action": "REFRESH",
4372
+ "variant": "secondary",
3963
4373
  "label": "Refresh",
3964
- "variant": "secondary"
4374
+ "icon": "refresh-cw"
3965
4375
  }
3966
- ],
3967
- "gap": "md",
3968
- "type": "stack",
3969
- "justify": "between"
4376
+ ]
3970
4377
  },
3971
4378
  {
3972
4379
  "type": "divider"
3973
4380
  },
3974
4381
  {
4382
+ "type": "box",
4383
+ "padding": "md",
3975
4384
  "children": [
3976
4385
  {
4386
+ "cols": 3.0,
4387
+ "type": "simple-grid",
3977
4388
  "children": [
3978
4389
  {
3979
4390
  "type": "stat-display",
3980
- "label": "TotalDeals",
3981
- "value": "@entity.totalDeals"
4391
+ "value": "@entity.totalDeals",
4392
+ "label": "TotalDeals"
3982
4393
  },
3983
4394
  {
3984
- "value": "@entity.totalValue",
3985
4395
  "label": "TotalValue",
4396
+ "value": "@entity.totalValue",
3986
4397
  "type": "stat-display"
3987
4398
  },
3988
4399
  {
@@ -3991,35 +4402,33 @@
3991
4402
  "type": "stat-display"
3992
4403
  },
3993
4404
  {
3994
- "type": "stat-display",
3995
4405
  "value": "@entity.lostDeals",
4406
+ "type": "stat-display",
3996
4407
  "label": "LostDeals"
3997
4408
  },
3998
4409
  {
3999
- "value": "@entity.conversionRate",
4000
4410
  "label": "ConversionRate",
4411
+ "value": "@entity.conversionRate",
4001
4412
  "type": "stat-display"
4002
4413
  }
4003
- ],
4004
- "cols": 3.0,
4005
- "type": "simple-grid"
4414
+ ]
4006
4415
  }
4007
- ],
4008
- "padding": "md",
4009
- "type": "box"
4416
+ ]
4010
4417
  },
4011
4418
  {
4012
4419
  "type": "divider"
4013
4420
  },
4014
4421
  {
4422
+ "gap": "md",
4423
+ "cols": 2.0,
4015
4424
  "children": [
4016
4425
  {
4017
4426
  "type": "card",
4018
4427
  "children": [
4019
4428
  {
4020
- "type": "typography",
4021
4429
  "variant": "caption",
4022
- "content": "Chart View"
4430
+ "content": "Chart View",
4431
+ "type": "typography"
4023
4432
  }
4024
4433
  ]
4025
4434
  },
@@ -4034,27 +4443,26 @@
4034
4443
  "type": "card"
4035
4444
  }
4036
4445
  ],
4037
- "gap": "md",
4038
- "type": "grid",
4039
- "cols": 2.0
4446
+ "type": "grid"
4040
4447
  },
4041
4448
  {
4449
+ "type": "line-chart",
4042
4450
  "data": [
4043
4451
  {
4044
4452
  "date": "Jan",
4045
4453
  "value": 12.0
4046
4454
  },
4047
4455
  {
4048
- "value": 19.0,
4049
- "date": "Feb"
4456
+ "date": "Feb",
4457
+ "value": 19.0
4050
4458
  },
4051
4459
  {
4052
- "value": 15.0,
4053
- "date": "Mar"
4460
+ "date": "Mar",
4461
+ "value": 15.0
4054
4462
  },
4055
4463
  {
4056
- "date": "Apr",
4057
- "value": 25.0
4464
+ "value": 25.0,
4465
+ "date": "Apr"
4058
4466
  },
4059
4467
  {
4060
4468
  "date": "May",
@@ -4064,14 +4472,13 @@
4064
4472
  "date": "Jun",
4065
4473
  "value": 30.0
4066
4474
  }
4067
- ],
4068
- "type": "line-chart"
4475
+ ]
4069
4476
  },
4070
4477
  {
4071
4478
  "items": [
4072
4479
  {
4073
- "label": "Current",
4074
- "color": "primary"
4480
+ "color": "primary",
4481
+ "label": "Current"
4075
4482
  },
4076
4483
  {
4077
4484
  "label": "Previous",
@@ -4083,37 +4490,39 @@
4083
4490
  {
4084
4491
  "edges": [
4085
4492
  {
4086
- "target": "b",
4087
- "source": "a"
4493
+ "source": "a",
4494
+ "target": "b"
4088
4495
  },
4089
4496
  {
4090
4497
  "target": "c",
4091
4498
  "source": "b"
4092
4499
  }
4093
4500
  ],
4094
- "type": "graph-view",
4095
- "width": 400.0,
4096
4501
  "nodes": [
4097
4502
  {
4098
- "label": "Start",
4099
- "id": "a"
4503
+ "id": "a",
4504
+ "label": "Start"
4100
4505
  },
4101
4506
  {
4102
4507
  "id": "b",
4103
4508
  "label": "Process"
4104
4509
  },
4105
4510
  {
4106
- "label": "End",
4107
- "id": "c"
4511
+ "id": "c",
4512
+ "label": "End"
4108
4513
  }
4109
4514
  ],
4515
+ "type": "graph-view",
4516
+ "width": 400.0,
4110
4517
  "height": 200.0
4111
4518
  }
4112
- ]
4519
+ ],
4520
+ "direction": "vertical"
4113
4521
  }
4114
4522
  ]
4115
4523
  }
4116
- ]
4524
+ ],
4525
+ "appName": "CRM"
4117
4526
  }
4118
4527
  ]
4119
4528
  ]
@@ -4128,8 +4537,8 @@
4128
4537
  "Pipeline",
4129
4538
  {
4130
4539
  "emit": {
4131
- "failure": "PipelineLoadFailed",
4132
- "success": "PipelineLoaded"
4540
+ "success": "PipelineLoaded",
4541
+ "failure": "PipelineLoadFailed"
4133
4542
  }
4134
4543
  }
4135
4544
  ],
@@ -4137,17 +4546,12 @@
4137
4546
  "render-ui",
4138
4547
  "main",
4139
4548
  {
4140
- "appName": "CRM",
4141
- "type": "dashboard-layout",
4142
4549
  "children": [
4143
4550
  {
4144
- "type": "scaled-diagram",
4145
4551
  "children": [
4146
4552
  {
4147
- "type": "stack",
4148
4553
  "children": [
4149
4554
  {
4150
- "type": "breadcrumb",
4151
4555
  "items": [
4152
4556
  {
4153
4557
  "label": "Home",
@@ -4156,57 +4560,59 @@
4156
4560
  {
4157
4561
  "label": "Pipeline"
4158
4562
  }
4159
- ]
4563
+ ],
4564
+ "type": "breadcrumb"
4160
4565
  },
4161
4566
  {
4567
+ "justify": "between",
4162
4568
  "direction": "horizontal",
4569
+ "gap": "md",
4570
+ "type": "stack",
4163
4571
  "children": [
4164
4572
  {
4165
- "type": "stack",
4166
4573
  "direction": "horizontal",
4167
- "gap": "md",
4168
4574
  "children": [
4169
4575
  {
4170
- "type": "icon",
4171
- "name": "bar-chart-2"
4576
+ "name": "bar-chart-2",
4577
+ "type": "icon"
4172
4578
  },
4173
4579
  {
4580
+ "content": "Pipeline",
4174
4581
  "type": "typography",
4175
- "variant": "h2",
4176
- "content": "Pipeline"
4582
+ "variant": "h2"
4177
4583
  }
4178
- ]
4584
+ ],
4585
+ "gap": "md",
4586
+ "type": "stack"
4179
4587
  },
4180
4588
  {
4181
- "label": "Refresh",
4182
- "type": "button",
4183
4589
  "action": "REFRESH",
4184
- "icon": "refresh-cw",
4185
- "variant": "secondary"
4590
+ "type": "button",
4591
+ "variant": "secondary",
4592
+ "label": "Refresh",
4593
+ "icon": "refresh-cw"
4186
4594
  }
4187
- ],
4188
- "justify": "between",
4189
- "type": "stack",
4190
- "gap": "md"
4595
+ ]
4191
4596
  },
4192
4597
  {
4193
4598
  "type": "divider"
4194
4599
  },
4195
4600
  {
4601
+ "type": "box",
4196
4602
  "padding": "md",
4197
4603
  "children": [
4198
4604
  {
4199
4605
  "cols": 3.0,
4200
4606
  "children": [
4201
4607
  {
4202
- "type": "stat-display",
4203
4608
  "label": "TotalDeals",
4609
+ "type": "stat-display",
4204
4610
  "value": "@entity.totalDeals"
4205
4611
  },
4206
4612
  {
4207
4613
  "label": "TotalValue",
4208
- "value": "@entity.totalValue",
4209
- "type": "stat-display"
4614
+ "type": "stat-display",
4615
+ "value": "@entity.totalValue"
4210
4616
  },
4211
4617
  {
4212
4618
  "value": "@entity.wonDeals",
@@ -4214,9 +4620,9 @@
4214
4620
  "label": "WonDeals"
4215
4621
  },
4216
4622
  {
4217
- "value": "@entity.lostDeals",
4218
4623
  "type": "stat-display",
4219
- "label": "LostDeals"
4624
+ "label": "LostDeals",
4625
+ "value": "@entity.lostDeals"
4220
4626
  },
4221
4627
  {
4222
4628
  "label": "ConversionRate",
@@ -4226,23 +4632,21 @@
4226
4632
  ],
4227
4633
  "type": "simple-grid"
4228
4634
  }
4229
- ],
4230
- "type": "box"
4635
+ ]
4231
4636
  },
4232
4637
  {
4233
4638
  "type": "divider"
4234
4639
  },
4235
4640
  {
4236
4641
  "gap": "md",
4237
- "type": "grid",
4238
4642
  "cols": 2.0,
4239
4643
  "children": [
4240
4644
  {
4241
4645
  "children": [
4242
4646
  {
4243
4647
  "type": "typography",
4244
- "variant": "caption",
4245
- "content": "Chart View"
4648
+ "content": "Chart View",
4649
+ "variant": "caption"
4246
4650
  }
4247
4651
  ],
4248
4652
  "type": "card"
@@ -4250,33 +4654,34 @@
4250
4654
  {
4251
4655
  "children": [
4252
4656
  {
4253
- "variant": "caption",
4657
+ "content": "Graph View",
4254
4658
  "type": "typography",
4255
- "content": "Graph View"
4659
+ "variant": "caption"
4256
4660
  }
4257
4661
  ],
4258
4662
  "type": "card"
4259
4663
  }
4260
- ]
4664
+ ],
4665
+ "type": "grid"
4261
4666
  },
4262
4667
  {
4263
4668
  "type": "line-chart",
4264
4669
  "data": [
4265
4670
  {
4266
- "value": 12.0,
4267
- "date": "Jan"
4671
+ "date": "Jan",
4672
+ "value": 12.0
4268
4673
  },
4269
4674
  {
4270
4675
  "date": "Feb",
4271
4676
  "value": 19.0
4272
4677
  },
4273
4678
  {
4274
- "date": "Mar",
4275
- "value": 15.0
4679
+ "value": 15.0,
4680
+ "date": "Mar"
4276
4681
  },
4277
4682
  {
4278
- "value": 25.0,
4279
- "date": "Apr"
4683
+ "date": "Apr",
4684
+ "value": 25.0
4280
4685
  },
4281
4686
  {
4282
4687
  "date": "May",
@@ -4291,8 +4696,8 @@
4291
4696
  {
4292
4697
  "items": [
4293
4698
  {
4294
- "label": "Current",
4295
- "color": "primary"
4699
+ "color": "primary",
4700
+ "label": "Current"
4296
4701
  },
4297
4702
  {
4298
4703
  "label": "Previous",
@@ -4303,50 +4708,53 @@
4303
4708
  },
4304
4709
  {
4305
4710
  "height": 200.0,
4306
- "edges": [
4307
- {
4308
- "target": "b",
4309
- "source": "a"
4310
- },
4311
- {
4312
- "target": "c",
4313
- "source": "b"
4314
- }
4315
- ],
4316
- "type": "graph-view",
4317
- "width": 400.0,
4318
4711
  "nodes": [
4319
4712
  {
4320
4713
  "id": "a",
4321
4714
  "label": "Start"
4322
4715
  },
4323
4716
  {
4324
- "label": "Process",
4325
- "id": "b"
4717
+ "id": "b",
4718
+ "label": "Process"
4326
4719
  },
4327
4720
  {
4328
4721
  "id": "c",
4329
4722
  "label": "End"
4330
4723
  }
4331
- ]
4724
+ ],
4725
+ "width": 400.0,
4726
+ "edges": [
4727
+ {
4728
+ "source": "a",
4729
+ "target": "b"
4730
+ },
4731
+ {
4732
+ "target": "c",
4733
+ "source": "b"
4734
+ }
4735
+ ],
4736
+ "type": "graph-view"
4332
4737
  }
4333
4738
  ],
4334
4739
  "gap": "lg",
4335
- "direction": "vertical"
4740
+ "direction": "vertical",
4741
+ "type": "stack"
4336
4742
  }
4337
- ]
4743
+ ],
4744
+ "type": "scaled-diagram"
4338
4745
  }
4339
4746
  ],
4747
+ "appName": "CRM",
4340
4748
  "navItems": [
4341
4749
  {
4342
- "href": "/contacts",
4343
4750
  "icon": "users",
4344
- "label": "Contacts"
4751
+ "label": "Contacts",
4752
+ "href": "/contacts"
4345
4753
  },
4346
4754
  {
4347
- "icon": "briefcase",
4755
+ "href": "/deals",
4348
4756
  "label": "Deals",
4349
- "href": "/deals"
4757
+ "icon": "briefcase"
4350
4758
  },
4351
4759
  {
4352
4760
  "icon": "bar-chart-2",
@@ -4355,10 +4763,11 @@
4355
4763
  },
4356
4764
  {
4357
4765
  "label": "Notes",
4358
- "icon": "file-text",
4359
- "href": "/notes"
4766
+ "href": "/notes",
4767
+ "icon": "file-text"
4360
4768
  }
4361
- ]
4769
+ ],
4770
+ "type": "dashboard-layout"
4362
4771
  }
4363
4772
  ]
4364
4773
  ]
@@ -4382,42 +4791,44 @@
4382
4791
  "render-ui",
4383
4792
  "main",
4384
4793
  {
4794
+ "type": "dashboard-layout",
4385
4795
  "navItems": [
4386
4796
  {
4387
- "href": "/contacts",
4797
+ "icon": "users",
4388
4798
  "label": "Contacts",
4389
- "icon": "users"
4799
+ "href": "/contacts"
4390
4800
  },
4391
4801
  {
4392
4802
  "href": "/deals",
4393
- "label": "Deals",
4394
- "icon": "briefcase"
4803
+ "icon": "briefcase",
4804
+ "label": "Deals"
4395
4805
  },
4396
4806
  {
4397
4807
  "label": "Pipeline",
4398
- "icon": "bar-chart-2",
4399
- "href": "/pipeline"
4808
+ "href": "/pipeline",
4809
+ "icon": "bar-chart-2"
4400
4810
  },
4401
4811
  {
4402
- "icon": "file-text",
4812
+ "label": "Notes",
4403
4813
  "href": "/notes",
4404
- "label": "Notes"
4814
+ "icon": "file-text"
4405
4815
  }
4406
4816
  ],
4407
- "type": "dashboard-layout",
4408
4817
  "appName": "CRM",
4409
4818
  "children": [
4410
4819
  {
4411
4820
  "type": "scaled-diagram",
4412
4821
  "children": [
4413
4822
  {
4823
+ "type": "stack",
4414
4824
  "direction": "vertical",
4825
+ "gap": "lg",
4415
4826
  "children": [
4416
4827
  {
4417
4828
  "items": [
4418
4829
  {
4419
- "href": "/",
4420
- "label": "Home"
4830
+ "label": "Home",
4831
+ "href": "/"
4421
4832
  },
4422
4833
  {
4423
4834
  "label": "Pipeline"
@@ -4426,6 +4837,8 @@
4426
4837
  "type": "breadcrumb"
4427
4838
  },
4428
4839
  {
4840
+ "gap": "md",
4841
+ "type": "stack",
4429
4842
  "justify": "between",
4430
4843
  "children": [
4431
4844
  {
@@ -4438,43 +4851,41 @@
4438
4851
  "type": "icon"
4439
4852
  },
4440
4853
  {
4441
- "content": "Pipeline",
4442
4854
  "variant": "h2",
4443
- "type": "typography"
4855
+ "type": "typography",
4856
+ "content": "Pipeline"
4444
4857
  }
4445
4858
  ]
4446
4859
  },
4447
4860
  {
4448
4861
  "variant": "secondary",
4449
- "label": "Refresh",
4450
4862
  "icon": "refresh-cw",
4451
- "type": "button",
4452
- "action": "REFRESH"
4863
+ "label": "Refresh",
4864
+ "action": "REFRESH",
4865
+ "type": "button"
4453
4866
  }
4454
4867
  ],
4455
- "direction": "horizontal",
4456
- "gap": "md",
4457
- "type": "stack"
4868
+ "direction": "horizontal"
4458
4869
  },
4459
4870
  {
4460
4871
  "type": "divider"
4461
4872
  },
4462
4873
  {
4463
4874
  "type": "box",
4464
- "padding": "md",
4465
4875
  "children": [
4466
4876
  {
4467
4877
  "cols": 3.0,
4878
+ "type": "simple-grid",
4468
4879
  "children": [
4469
4880
  {
4881
+ "value": "@entity.totalDeals",
4470
4882
  "type": "stat-display",
4471
- "label": "TotalDeals",
4472
- "value": "@entity.totalDeals"
4883
+ "label": "TotalDeals"
4473
4884
  },
4474
4885
  {
4886
+ "type": "stat-display",
4475
4887
  "label": "TotalValue",
4476
- "value": "@entity.totalValue",
4477
- "type": "stat-display"
4888
+ "value": "@entity.totalValue"
4478
4889
  },
4479
4890
  {
4480
4891
  "label": "WonDeals",
@@ -4482,33 +4893,34 @@
4482
4893
  "value": "@entity.wonDeals"
4483
4894
  },
4484
4895
  {
4485
- "value": "@entity.lostDeals",
4896
+ "type": "stat-display",
4486
4897
  "label": "LostDeals",
4487
- "type": "stat-display"
4898
+ "value": "@entity.lostDeals"
4488
4899
  },
4489
4900
  {
4901
+ "value": "@entity.conversionRate",
4490
4902
  "label": "ConversionRate",
4491
- "type": "stat-display",
4492
- "value": "@entity.conversionRate"
4903
+ "type": "stat-display"
4493
4904
  }
4494
- ],
4495
- "type": "simple-grid"
4905
+ ]
4496
4906
  }
4497
- ]
4907
+ ],
4908
+ "padding": "md"
4498
4909
  },
4499
4910
  {
4500
4911
  "type": "divider"
4501
4912
  },
4502
4913
  {
4503
4914
  "type": "grid",
4915
+ "cols": 2.0,
4504
4916
  "gap": "md",
4505
4917
  "children": [
4506
4918
  {
4507
4919
  "type": "card",
4508
4920
  "children": [
4509
4921
  {
4510
- "content": "Chart View",
4511
4922
  "variant": "caption",
4923
+ "content": "Chart View",
4512
4924
  "type": "typography"
4513
4925
  }
4514
4926
  ]
@@ -4517,34 +4929,33 @@
4517
4929
  "type": "card",
4518
4930
  "children": [
4519
4931
  {
4520
- "variant": "caption",
4521
4932
  "content": "Graph View",
4522
- "type": "typography"
4933
+ "type": "typography",
4934
+ "variant": "caption"
4523
4935
  }
4524
4936
  ]
4525
4937
  }
4526
- ],
4527
- "cols": 2.0
4938
+ ]
4528
4939
  },
4529
4940
  {
4530
4941
  "type": "line-chart",
4531
4942
  "data": [
4532
4943
  {
4533
- "value": 12.0,
4534
- "date": "Jan"
4944
+ "date": "Jan",
4945
+ "value": 12.0
4535
4946
  },
4536
4947
  {
4537
- "date": "Feb",
4538
- "value": 19.0
4948
+ "value": 19.0,
4949
+ "date": "Feb"
4539
4950
  },
4540
4951
  {
4541
4952
  "date": "Mar",
4542
4953
  "value": 15.0
4543
4954
  },
4544
4955
  {
4545
- "date": "Apr",
4546
- "value": 25.0
4547
- },
4956
+ "value": 25.0,
4957
+ "date": "Apr"
4958
+ },
4548
4959
  {
4549
4960
  "value": 22.0,
4550
4961
  "date": "May"
@@ -4558,34 +4969,20 @@
4558
4969
  {
4559
4970
  "items": [
4560
4971
  {
4561
- "color": "primary",
4562
- "label": "Current"
4972
+ "label": "Current",
4973
+ "color": "primary"
4563
4974
  },
4564
4975
  {
4565
- "label": "Previous",
4566
- "color": "muted"
4976
+ "color": "muted",
4977
+ "label": "Previous"
4567
4978
  }
4568
4979
  ],
4569
4980
  "type": "chart-legend"
4570
4981
  },
4571
4982
  {
4572
4983
  "type": "graph-view",
4573
- "nodes": [
4574
- {
4575
- "label": "Start",
4576
- "id": "a"
4577
- },
4578
- {
4579
- "label": "Process",
4580
- "id": "b"
4581
- },
4582
- {
4583
- "id": "c",
4584
- "label": "End"
4585
- }
4586
- ],
4587
- "width": 400.0,
4588
4984
  "height": 200.0,
4985
+ "width": 400.0,
4589
4986
  "edges": [
4590
4987
  {
4591
4988
  "target": "b",
@@ -4595,11 +4992,23 @@
4595
4992
  "source": "b",
4596
4993
  "target": "c"
4597
4994
  }
4995
+ ],
4996
+ "nodes": [
4997
+ {
4998
+ "id": "a",
4999
+ "label": "Start"
5000
+ },
5001
+ {
5002
+ "id": "b",
5003
+ "label": "Process"
5004
+ },
5005
+ {
5006
+ "id": "c",
5007
+ "label": "End"
5008
+ }
4598
5009
  ]
4599
5010
  }
4600
- ],
4601
- "type": "stack",
4602
- "gap": "lg"
5011
+ ]
4603
5012
  }
4604
5013
  ]
4605
5014
  }
@@ -4618,8 +5027,8 @@
4618
5027
  "Pipeline",
4619
5028
  {
4620
5029
  "emit": {
4621
- "success": "PipelineLoaded",
4622
- "failure": "PipelineLoadFailed"
5030
+ "failure": "PipelineLoadFailed",
5031
+ "success": "PipelineLoaded"
4623
5032
  }
4624
5033
  }
4625
5034
  ],
@@ -4627,28 +5036,6 @@
4627
5036
  "render-ui",
4628
5037
  "main",
4629
5038
  {
4630
- "navItems": [
4631
- {
4632
- "icon": "users",
4633
- "label": "Contacts",
4634
- "href": "/contacts"
4635
- },
4636
- {
4637
- "icon": "briefcase",
4638
- "label": "Deals",
4639
- "href": "/deals"
4640
- },
4641
- {
4642
- "href": "/pipeline",
4643
- "label": "Pipeline",
4644
- "icon": "bar-chart-2"
4645
- },
4646
- {
4647
- "href": "/notes",
4648
- "label": "Notes",
4649
- "icon": "file-text"
4650
- }
4651
- ],
4652
5039
  "type": "dashboard-layout",
4653
5040
  "children": [
4654
5041
  {
@@ -4656,10 +5043,9 @@
4656
5043
  "children": [
4657
5044
  {
4658
5045
  "direction": "vertical",
4659
- "gap": "lg",
5046
+ "type": "stack",
4660
5047
  "children": [
4661
5048
  {
4662
- "type": "breadcrumb",
4663
5049
  "items": [
4664
5050
  {
4665
5051
  "label": "Home",
@@ -4668,38 +5054,39 @@
4668
5054
  {
4669
5055
  "label": "Pipeline"
4670
5056
  }
4671
- ]
5057
+ ],
5058
+ "type": "breadcrumb"
4672
5059
  },
4673
5060
  {
4674
- "gap": "md",
4675
- "type": "stack",
5061
+ "direction": "horizontal",
4676
5062
  "justify": "between",
4677
5063
  "children": [
4678
5064
  {
4679
- "type": "stack",
4680
5065
  "children": [
4681
5066
  {
4682
5067
  "type": "icon",
4683
5068
  "name": "bar-chart-2"
4684
5069
  },
4685
5070
  {
4686
- "type": "typography",
4687
5071
  "variant": "h2",
4688
- "content": "Pipeline"
5072
+ "content": "Pipeline",
5073
+ "type": "typography"
4689
5074
  }
4690
5075
  ],
5076
+ "type": "stack",
4691
5077
  "gap": "md",
4692
5078
  "direction": "horizontal"
4693
5079
  },
4694
5080
  {
4695
- "label": "Refresh",
4696
- "type": "button",
4697
5081
  "variant": "secondary",
4698
5082
  "icon": "refresh-cw",
5083
+ "type": "button",
5084
+ "label": "Refresh",
4699
5085
  "action": "REFRESH"
4700
5086
  }
4701
5087
  ],
4702
- "direction": "horizontal"
5088
+ "type": "stack",
5089
+ "gap": "md"
4703
5090
  },
4704
5091
  {
4705
5092
  "type": "divider"
@@ -4712,28 +5099,28 @@
4712
5099
  "type": "simple-grid",
4713
5100
  "children": [
4714
5101
  {
4715
- "value": "@entity.totalDeals",
5102
+ "label": "TotalDeals",
4716
5103
  "type": "stat-display",
4717
- "label": "TotalDeals"
5104
+ "value": "@entity.totalDeals"
4718
5105
  },
4719
5106
  {
4720
- "type": "stat-display",
5107
+ "label": "TotalValue",
4721
5108
  "value": "@entity.totalValue",
4722
- "label": "TotalValue"
5109
+ "type": "stat-display"
4723
5110
  },
4724
5111
  {
4725
- "value": "@entity.wonDeals",
4726
5112
  "type": "stat-display",
4727
- "label": "WonDeals"
5113
+ "label": "WonDeals",
5114
+ "value": "@entity.wonDeals"
4728
5115
  },
4729
5116
  {
5117
+ "type": "stat-display",
4730
5118
  "label": "LostDeals",
4731
- "value": "@entity.lostDeals",
4732
- "type": "stat-display"
5119
+ "value": "@entity.lostDeals"
4733
5120
  },
4734
5121
  {
4735
- "value": "@entity.conversionRate",
4736
5122
  "type": "stat-display",
5123
+ "value": "@entity.conversionRate",
4737
5124
  "label": "ConversionRate"
4738
5125
  }
4739
5126
  ],
@@ -4745,41 +5132,42 @@
4745
5132
  "type": "divider"
4746
5133
  },
4747
5134
  {
4748
- "type": "grid",
5135
+ "gap": "md",
5136
+ "cols": 2.0,
4749
5137
  "children": [
4750
5138
  {
4751
- "type": "card",
4752
5139
  "children": [
4753
5140
  {
5141
+ "variant": "caption",
4754
5142
  "content": "Chart View",
4755
- "type": "typography",
4756
- "variant": "caption"
5143
+ "type": "typography"
4757
5144
  }
4758
- ]
5145
+ ],
5146
+ "type": "card"
4759
5147
  },
4760
5148
  {
4761
5149
  "type": "card",
4762
5150
  "children": [
4763
5151
  {
4764
- "content": "Graph View",
5152
+ "type": "typography",
4765
5153
  "variant": "caption",
4766
- "type": "typography"
5154
+ "content": "Graph View"
4767
5155
  }
4768
5156
  ]
4769
5157
  }
4770
5158
  ],
4771
- "cols": 2.0,
4772
- "gap": "md"
5159
+ "type": "grid"
4773
5160
  },
4774
5161
  {
5162
+ "type": "line-chart",
4775
5163
  "data": [
4776
5164
  {
4777
- "date": "Jan",
4778
- "value": 12.0
5165
+ "value": 12.0,
5166
+ "date": "Jan"
4779
5167
  },
4780
5168
  {
4781
- "value": 19.0,
4782
- "date": "Feb"
5169
+ "date": "Feb",
5170
+ "value": 19.0
4783
5171
  },
4784
5172
  {
4785
5173
  "date": "Mar",
@@ -4790,32 +5178,29 @@
4790
5178
  "value": 25.0
4791
5179
  },
4792
5180
  {
4793
- "value": 22.0,
4794
- "date": "May"
5181
+ "date": "May",
5182
+ "value": 22.0
4795
5183
  },
4796
5184
  {
4797
- "value": 30.0,
4798
- "date": "Jun"
5185
+ "date": "Jun",
5186
+ "value": 30.0
4799
5187
  }
4800
- ],
4801
- "type": "line-chart"
5188
+ ]
4802
5189
  },
4803
5190
  {
5191
+ "type": "chart-legend",
4804
5192
  "items": [
4805
5193
  {
4806
- "color": "primary",
4807
- "label": "Current"
5194
+ "label": "Current",
5195
+ "color": "primary"
4808
5196
  },
4809
5197
  {
4810
- "label": "Previous",
4811
- "color": "muted"
5198
+ "color": "muted",
5199
+ "label": "Previous"
4812
5200
  }
4813
- ],
4814
- "type": "chart-legend"
5201
+ ]
4815
5202
  },
4816
5203
  {
4817
- "height": 200.0,
4818
- "type": "graph-view",
4819
5204
  "nodes": [
4820
5205
  {
4821
5206
  "id": "a",
@@ -4830,7 +5215,6 @@
4830
5215
  "label": "End"
4831
5216
  }
4832
5217
  ],
4833
- "width": 400.0,
4834
5218
  "edges": [
4835
5219
  {
4836
5220
  "source": "a",
@@ -4840,15 +5224,40 @@
4840
5224
  "source": "b",
4841
5225
  "target": "c"
4842
5226
  }
4843
- ]
5227
+ ],
5228
+ "type": "graph-view",
5229
+ "height": 200.0,
5230
+ "width": 400.0
4844
5231
  }
4845
5232
  ],
4846
- "type": "stack"
5233
+ "gap": "lg"
4847
5234
  }
4848
5235
  ]
4849
5236
  }
4850
5237
  ],
4851
- "appName": "CRM"
5238
+ "appName": "CRM",
5239
+ "navItems": [
5240
+ {
5241
+ "href": "/contacts",
5242
+ "icon": "users",
5243
+ "label": "Contacts"
5244
+ },
5245
+ {
5246
+ "label": "Deals",
5247
+ "href": "/deals",
5248
+ "icon": "briefcase"
5249
+ },
5250
+ {
5251
+ "href": "/pipeline",
5252
+ "label": "Pipeline",
5253
+ "icon": "bar-chart-2"
5254
+ },
5255
+ {
5256
+ "href": "/notes",
5257
+ "icon": "file-text",
5258
+ "label": "Notes"
5259
+ }
5260
+ ]
4852
5261
  }
4853
5262
  ]
4854
5263
  ]
@@ -4863,8 +5272,8 @@
4863
5272
  "Pipeline",
4864
5273
  {
4865
5274
  "emit": {
4866
- "failure": "PipelineLoadFailed",
4867
- "success": "PipelineLoaded"
5275
+ "success": "PipelineLoaded",
5276
+ "failure": "PipelineLoadFailed"
4868
5277
  }
4869
5278
  }
4870
5279
  ],
@@ -4874,9 +5283,9 @@
4874
5283
  {
4875
5284
  "navItems": [
4876
5285
  {
4877
- "icon": "users",
5286
+ "label": "Contacts",
4878
5287
  "href": "/contacts",
4879
- "label": "Contacts"
5288
+ "icon": "users"
4880
5289
  },
4881
5290
  {
4882
5291
  "label": "Deals",
@@ -4884,9 +5293,9 @@
4884
5293
  "href": "/deals"
4885
5294
  },
4886
5295
  {
4887
- "icon": "bar-chart-2",
4888
5296
  "label": "Pipeline",
4889
- "href": "/pipeline"
5297
+ "href": "/pipeline",
5298
+ "icon": "bar-chart-2"
4890
5299
  },
4891
5300
  {
4892
5301
  "href": "/notes",
@@ -4895,13 +5304,17 @@
4895
5304
  }
4896
5305
  ],
4897
5306
  "appName": "CRM",
4898
- "type": "dashboard-layout",
4899
5307
  "children": [
4900
5308
  {
5309
+ "type": "scaled-diagram",
4901
5310
  "children": [
4902
5311
  {
5312
+ "gap": "lg",
5313
+ "direction": "vertical",
5314
+ "type": "stack",
4903
5315
  "children": [
4904
5316
  {
5317
+ "type": "breadcrumb",
4905
5318
  "items": [
4906
5319
  {
4907
5320
  "href": "/",
@@ -4910,15 +5323,16 @@
4910
5323
  {
4911
5324
  "label": "Pipeline"
4912
5325
  }
4913
- ],
4914
- "type": "breadcrumb"
5326
+ ]
4915
5327
  },
4916
5328
  {
5329
+ "type": "stack",
4917
5330
  "direction": "horizontal",
5331
+ "justify": "between",
4918
5332
  "children": [
4919
5333
  {
4920
- "gap": "md",
4921
5334
  "type": "stack",
5335
+ "direction": "horizontal",
4922
5336
  "children": [
4923
5337
  {
4924
5338
  "type": "icon",
@@ -4930,38 +5344,37 @@
4930
5344
  "variant": "h2"
4931
5345
  }
4932
5346
  ],
4933
- "direction": "horizontal"
5347
+ "gap": "md"
4934
5348
  },
4935
5349
  {
4936
- "icon": "refresh-cw",
4937
5350
  "label": "Refresh",
4938
- "action": "REFRESH",
4939
5351
  "type": "button",
4940
- "variant": "secondary"
5352
+ "variant": "secondary",
5353
+ "action": "REFRESH",
5354
+ "icon": "refresh-cw"
4941
5355
  }
4942
5356
  ],
4943
- "type": "stack",
4944
- "gap": "md",
4945
- "justify": "between"
5357
+ "gap": "md"
4946
5358
  },
4947
5359
  {
4948
5360
  "type": "divider"
4949
5361
  },
4950
5362
  {
5363
+ "type": "box",
4951
5364
  "padding": "md",
4952
5365
  "children": [
4953
5366
  {
4954
5367
  "cols": 3.0,
4955
5368
  "children": [
4956
5369
  {
4957
- "type": "stat-display",
4958
5370
  "value": "@entity.totalDeals",
4959
- "label": "TotalDeals"
5371
+ "label": "TotalDeals",
5372
+ "type": "stat-display"
4960
5373
  },
4961
5374
  {
4962
- "label": "TotalValue",
4963
5375
  "value": "@entity.totalValue",
4964
- "type": "stat-display"
5376
+ "type": "stat-display",
5377
+ "label": "TotalValue"
4965
5378
  },
4966
5379
  {
4967
5380
  "value": "@entity.wonDeals",
@@ -4970,25 +5383,23 @@
4970
5383
  },
4971
5384
  {
4972
5385
  "value": "@entity.lostDeals",
4973
- "type": "stat-display",
4974
- "label": "LostDeals"
5386
+ "label": "LostDeals",
5387
+ "type": "stat-display"
4975
5388
  },
4976
5389
  {
5390
+ "label": "ConversionRate",
4977
5391
  "type": "stat-display",
4978
- "value": "@entity.conversionRate",
4979
- "label": "ConversionRate"
5392
+ "value": "@entity.conversionRate"
4980
5393
  }
4981
5394
  ],
4982
5395
  "type": "simple-grid"
4983
5396
  }
4984
- ],
4985
- "type": "box"
5397
+ ]
4986
5398
  },
4987
5399
  {
4988
5400
  "type": "divider"
4989
5401
  },
4990
5402
  {
4991
- "cols": 2.0,
4992
5403
  "gap": "md",
4993
5404
  "type": "grid",
4994
5405
  "children": [
@@ -5005,74 +5416,59 @@
5005
5416
  {
5006
5417
  "children": [
5007
5418
  {
5008
- "variant": "caption",
5419
+ "content": "Graph View",
5009
5420
  "type": "typography",
5010
- "content": "Graph View"
5421
+ "variant": "caption"
5011
5422
  }
5012
5423
  ],
5013
5424
  "type": "card"
5014
5425
  }
5015
- ]
5426
+ ],
5427
+ "cols": 2.0
5016
5428
  },
5017
5429
  {
5430
+ "type": "line-chart",
5018
5431
  "data": [
5019
5432
  {
5020
5433
  "date": "Jan",
5021
5434
  "value": 12.0
5022
5435
  },
5023
5436
  {
5024
- "date": "Feb",
5025
- "value": 19.0
5437
+ "value": 19.0,
5438
+ "date": "Feb"
5026
5439
  },
5027
5440
  {
5028
- "date": "Mar",
5029
- "value": 15.0
5441
+ "value": 15.0,
5442
+ "date": "Mar"
5030
5443
  },
5031
5444
  {
5032
- "date": "Apr",
5033
- "value": 25.0
5445
+ "value": 25.0,
5446
+ "date": "Apr"
5034
5447
  },
5035
5448
  {
5036
- "value": 22.0,
5037
- "date": "May"
5449
+ "date": "May",
5450
+ "value": 22.0
5038
5451
  },
5039
5452
  {
5040
- "date": "Jun",
5041
- "value": 30.0
5453
+ "value": 30.0,
5454
+ "date": "Jun"
5042
5455
  }
5043
- ],
5044
- "type": "line-chart"
5456
+ ]
5045
5457
  },
5046
5458
  {
5459
+ "type": "chart-legend",
5047
5460
  "items": [
5048
5461
  {
5049
5462
  "color": "primary",
5050
5463
  "label": "Current"
5051
5464
  },
5052
5465
  {
5053
- "color": "muted",
5054
- "label": "Previous"
5466
+ "label": "Previous",
5467
+ "color": "muted"
5055
5468
  }
5056
- ],
5057
- "type": "chart-legend"
5469
+ ]
5058
5470
  },
5059
5471
  {
5060
- "height": 200.0,
5061
- "width": 400.0,
5062
- "nodes": [
5063
- {
5064
- "id": "a",
5065
- "label": "Start"
5066
- },
5067
- {
5068
- "id": "b",
5069
- "label": "Process"
5070
- },
5071
- {
5072
- "id": "c",
5073
- "label": "End"
5074
- }
5075
- ],
5076
5472
  "type": "graph-view",
5077
5473
  "edges": [
5078
5474
  {
@@ -5083,17 +5479,30 @@
5083
5479
  "target": "c",
5084
5480
  "source": "b"
5085
5481
  }
5086
- ]
5482
+ ],
5483
+ "nodes": [
5484
+ {
5485
+ "label": "Start",
5486
+ "id": "a"
5487
+ },
5488
+ {
5489
+ "id": "b",
5490
+ "label": "Process"
5491
+ },
5492
+ {
5493
+ "label": "End",
5494
+ "id": "c"
5495
+ }
5496
+ ],
5497
+ "height": 200.0,
5498
+ "width": 400.0
5087
5499
  }
5088
- ],
5089
- "direction": "vertical",
5090
- "gap": "lg",
5091
- "type": "stack"
5500
+ ]
5092
5501
  }
5093
- ],
5094
- "type": "scaled-diagram"
5502
+ ]
5095
5503
  }
5096
- ]
5504
+ ],
5505
+ "type": "dashboard-layout"
5097
5506
  }
5098
5507
  ]
5099
5508
  ]
@@ -5150,6 +5559,40 @@
5150
5559
  "category": "interaction",
5151
5560
  "linkedEntity": "Note",
5152
5561
  "emits": [
5562
+ {
5563
+ "event": "COMPOSE"
5564
+ },
5565
+ {
5566
+ "event": "VIEW",
5567
+ "payloadSchema": [
5568
+ {
5569
+ "name": "id",
5570
+ "type": "string",
5571
+ "required": true
5572
+ },
5573
+ {
5574
+ "name": "row.id",
5575
+ "type": "string",
5576
+ "required": true
5577
+ },
5578
+ {
5579
+ "name": "row.subject",
5580
+ "type": "string"
5581
+ },
5582
+ {
5583
+ "name": "row.body",
5584
+ "type": "string"
5585
+ },
5586
+ {
5587
+ "name": "row.author",
5588
+ "type": "string"
5589
+ },
5590
+ {
5591
+ "name": "row.createdAt",
5592
+ "type": "datetime"
5593
+ }
5594
+ ]
5595
+ },
5153
5596
  {
5154
5597
  "event": "NoteLoaded",
5155
5598
  "description": "Fired when Note finishes loading",
@@ -5222,6 +5665,14 @@
5222
5665
  "type": "string"
5223
5666
  }
5224
5667
  ]
5668
+ },
5669
+ {
5670
+ "key": "COMPOSE",
5671
+ "name": "Compose"
5672
+ },
5673
+ {
5674
+ "key": "VIEW",
5675
+ "name": "View"
5225
5676
  }
5226
5677
  ],
5227
5678
  "transitions": [
@@ -5235,8 +5686,8 @@
5235
5686
  "Note",
5236
5687
  {
5237
5688
  "emit": {
5238
- "success": "NoteLoaded",
5239
- "failure": "NoteLoadFailed"
5689
+ "failure": "NoteLoadFailed",
5690
+ "success": "NoteLoaded"
5240
5691
  }
5241
5692
  }
5242
5693
  ],
@@ -5245,6 +5696,8 @@
5245
5696
  "main",
5246
5697
  {
5247
5698
  "type": "stack",
5699
+ "direction": "vertical",
5700
+ "gap": "md",
5248
5701
  "align": "center",
5249
5702
  "className": "py-12",
5250
5703
  "children": [
@@ -5257,9 +5710,7 @@
5257
5710
  "type": "typography",
5258
5711
  "content": "Loading…"
5259
5712
  }
5260
- ],
5261
- "direction": "vertical",
5262
- "gap": "md"
5713
+ ]
5263
5714
  }
5264
5715
  ]
5265
5716
  ]
@@ -5274,109 +5725,109 @@
5274
5725
  "main",
5275
5726
  {
5276
5727
  "type": "dashboard-layout",
5728
+ "navItems": [
5729
+ {
5730
+ "icon": "users",
5731
+ "href": "/contacts",
5732
+ "label": "Contacts"
5733
+ },
5734
+ {
5735
+ "icon": "briefcase",
5736
+ "href": "/deals",
5737
+ "label": "Deals"
5738
+ },
5739
+ {
5740
+ "href": "/pipeline",
5741
+ "icon": "bar-chart-2",
5742
+ "label": "Pipeline"
5743
+ },
5744
+ {
5745
+ "icon": "file-text",
5746
+ "href": "/notes",
5747
+ "label": "Notes"
5748
+ }
5749
+ ],
5750
+ "appName": "CRM",
5277
5751
  "children": [
5278
5752
  {
5753
+ "direction": "vertical",
5279
5754
  "gap": "lg",
5755
+ "className": "max-w-5xl mx-auto w-full",
5756
+ "type": "stack",
5280
5757
  "children": [
5281
5758
  {
5282
- "type": "stack",
5283
- "justify": "between",
5284
- "direction": "horizontal",
5285
5759
  "align": "center",
5286
- "gap": "md",
5287
5760
  "children": [
5288
5761
  {
5762
+ "type": "stack",
5289
5763
  "align": "center",
5290
- "gap": "sm",
5291
5764
  "children": [
5292
5765
  {
5293
- "name": "file-text",
5294
- "type": "icon"
5766
+ "type": "icon",
5767
+ "name": "file-text"
5295
5768
  },
5296
5769
  {
5770
+ "type": "typography",
5297
5771
  "content": "Notes",
5298
- "variant": "h2",
5299
- "type": "typography"
5772
+ "variant": "h2"
5300
5773
  }
5301
5774
  ],
5302
- "direction": "horizontal",
5303
- "type": "stack"
5775
+ "gap": "sm",
5776
+ "direction": "horizontal"
5304
5777
  },
5305
5778
  {
5306
5779
  "direction": "horizontal",
5780
+ "type": "stack",
5307
5781
  "children": [
5308
5782
  {
5783
+ "type": "button",
5309
5784
  "variant": "primary",
5785
+ "icon": "edit",
5310
5786
  "action": "COMPOSE",
5311
- "type": "button",
5312
- "label": "Compose",
5313
- "icon": "edit"
5787
+ "label": "Compose"
5314
5788
  }
5315
5789
  ],
5316
- "gap": "sm",
5317
- "type": "stack"
5790
+ "gap": "sm"
5318
5791
  }
5319
- ]
5792
+ ],
5793
+ "gap": "md",
5794
+ "justify": "between",
5795
+ "type": "stack",
5796
+ "direction": "horizontal"
5320
5797
  },
5321
5798
  {
5322
5799
  "type": "divider"
5323
5800
  },
5324
5801
  {
5325
- "variant": "card",
5326
- "type": "data-list",
5327
- "itemActions": [
5328
- {
5329
- "event": "VIEW",
5330
- "variant": "ghost",
5331
- "label": "View"
5332
- }
5333
- ],
5802
+ "entity": "@payload.data",
5334
5803
  "fields": [
5335
5804
  {
5336
- "icon": "file-text",
5337
5805
  "name": "subject",
5806
+ "icon": "file-text",
5338
5807
  "variant": "h4"
5339
5808
  },
5340
5809
  {
5341
- "name": "author",
5342
- "variant": "caption"
5810
+ "variant": "caption",
5811
+ "name": "author"
5343
5812
  },
5344
5813
  {
5345
- "variant": "caption",
5346
5814
  "format": "date",
5347
- "name": "createdAt"
5815
+ "name": "createdAt",
5816
+ "variant": "caption"
5348
5817
  }
5349
5818
  ],
5350
- "entity": "@payload.data",
5351
- "gap": "sm"
5819
+ "gap": "sm",
5820
+ "itemActions": [
5821
+ {
5822
+ "label": "View",
5823
+ "event": "VIEW",
5824
+ "variant": "ghost"
5825
+ }
5826
+ ],
5827
+ "variant": "card",
5828
+ "type": "data-list"
5352
5829
  }
5353
- ],
5354
- "className": "max-w-5xl mx-auto w-full",
5355
- "type": "stack",
5356
- "direction": "vertical"
5357
- }
5358
- ],
5359
- "appName": "CRM",
5360
- "navItems": [
5361
- {
5362
- "href": "/contacts",
5363
- "icon": "users",
5364
- "label": "Contacts"
5365
- },
5366
- {
5367
- "icon": "briefcase",
5368
- "href": "/deals",
5369
- "label": "Deals"
5370
- },
5371
- {
5372
- "icon": "bar-chart-2",
5373
- "href": "/pipeline",
5374
- "label": "Pipeline"
5375
- },
5376
- {
5377
- "href": "/notes",
5378
- "icon": "file-text",
5379
- "label": "Notes"
5830
+ ]
5380
5831
  }
5381
5832
  ]
5382
5833
  }
@@ -5392,36 +5843,36 @@
5392
5843
  "render-ui",
5393
5844
  "main",
5394
5845
  {
5395
- "align": "center",
5396
- "className": "py-12",
5397
5846
  "direction": "vertical",
5398
5847
  "gap": "md",
5848
+ "align": "center",
5849
+ "type": "stack",
5850
+ "className": "py-12",
5399
5851
  "children": [
5400
5852
  {
5401
- "color": "destructive",
5402
5853
  "name": "alert-triangle",
5403
- "type": "icon"
5854
+ "type": "icon",
5855
+ "color": "destructive"
5404
5856
  },
5405
5857
  {
5858
+ "variant": "h3",
5406
5859
  "content": "Failed to load note",
5407
- "type": "typography",
5408
- "variant": "h3"
5860
+ "type": "typography"
5409
5861
  },
5410
5862
  {
5411
- "type": "typography",
5412
- "content": "@payload.error",
5413
5863
  "variant": "body",
5414
- "color": "muted"
5864
+ "color": "muted",
5865
+ "content": "@payload.error",
5866
+ "type": "typography"
5415
5867
  },
5416
5868
  {
5417
5869
  "variant": "primary",
5870
+ "type": "button",
5418
5871
  "icon": "rotate-ccw",
5419
5872
  "action": "INIT",
5420
- "label": "Retry",
5421
- "type": "button"
5873
+ "label": "Retry"
5422
5874
  }
5423
- ],
5424
- "type": "stack"
5875
+ ]
5425
5876
  }
5426
5877
  ]
5427
5878
  ]
@@ -5489,6 +5940,16 @@
5489
5940
  ]
5490
5941
  }
5491
5942
  ],
5943
+ "listens": [
5944
+ {
5945
+ "event": "COMPOSE",
5946
+ "triggers": "COMPOSE",
5947
+ "source": {
5948
+ "kind": "trait",
5949
+ "trait": "NoteBrowse"
5950
+ }
5951
+ }
5952
+ ],
5492
5953
  "stateMachine": {
5493
5954
  "states": [
5494
5955
  {
@@ -5582,8 +6043,8 @@
5582
6043
  "Note",
5583
6044
  {
5584
6045
  "emit": {
5585
- "failure": "NoteLoadFailed",
5586
- "success": "NoteLoaded"
6046
+ "success": "NoteLoaded",
6047
+ "failure": "NoteLoadFailed"
5587
6048
  }
5588
6049
  }
5589
6050
  ]
@@ -5599,15 +6060,16 @@
5599
6060
  "modal",
5600
6061
  {
5601
6062
  "gap": "md",
6063
+ "direction": "vertical",
5602
6064
  "children": [
5603
6065
  {
5604
- "type": "stack",
5605
6066
  "gap": "sm",
6067
+ "type": "stack",
5606
6068
  "direction": "horizontal",
5607
6069
  "children": [
5608
6070
  {
5609
- "name": "edit",
5610
- "type": "icon"
6071
+ "type": "icon",
6072
+ "name": "edit"
5611
6073
  },
5612
6074
  {
5613
6075
  "variant": "h3",
@@ -5620,18 +6082,17 @@
5620
6082
  "type": "divider"
5621
6083
  },
5622
6084
  {
6085
+ "submitEvent": "SEND",
6086
+ "cancelEvent": "CLOSE",
5623
6087
  "fields": [
5624
6088
  "subject",
5625
6089
  "body",
5626
6090
  "author"
5627
6091
  ],
5628
- "mode": "create",
5629
6092
  "type": "form-section",
5630
- "submitEvent": "SEND",
5631
- "cancelEvent": "CLOSE"
6093
+ "mode": "create"
5632
6094
  }
5633
6095
  ],
5634
- "direction": "vertical",
5635
6096
  "type": "stack"
5636
6097
  }
5637
6098
  ]
@@ -5673,8 +6134,8 @@
5673
6134
  "@payload.data",
5674
6135
  {
5675
6136
  "emit": {
5676
- "success": "NoteSaved",
5677
- "failure": "NoteSaveFailed"
6137
+ "failure": "NoteSaveFailed",
6138
+ "success": "NoteSaved"
5678
6139
  }
5679
6140
  }
5680
6141
  ],
@@ -5728,6 +6189,16 @@
5728
6189
  ]
5729
6190
  }
5730
6191
  ],
6192
+ "listens": [
6193
+ {
6194
+ "event": "VIEW",
6195
+ "triggers": "VIEW",
6196
+ "source": {
6197
+ "kind": "trait",
6198
+ "trait": "NoteBrowse"
6199
+ }
6200
+ }
6201
+ ],
5731
6202
  "stateMachine": {
5732
6203
  "states": [
5733
6204
  {
@@ -5824,21 +6295,23 @@
5824
6295
  "render-ui",
5825
6296
  "modal",
5826
6297
  {
6298
+ "type": "stack",
6299
+ "direction": "vertical",
5827
6300
  "children": [
5828
6301
  {
5829
- "gap": "sm",
5830
- "type": "stack",
5831
6302
  "direction": "horizontal",
6303
+ "type": "stack",
5832
6304
  "align": "center",
6305
+ "gap": "sm",
5833
6306
  "children": [
5834
6307
  {
5835
6308
  "name": "eye",
5836
6309
  "type": "icon"
5837
6310
  },
5838
6311
  {
6312
+ "type": "typography",
5839
6313
  "variant": "h3",
5840
- "content": "@entity.subject",
5841
- "type": "typography"
6314
+ "content": "@entity.subject"
5842
6315
  }
5843
6316
  ]
5844
6317
  },
@@ -5848,78 +6321,77 @@
5848
6321
  {
5849
6322
  "type": "stack",
5850
6323
  "direction": "horizontal",
5851
- "gap": "md",
5852
6324
  "children": [
5853
6325
  {
6326
+ "variant": "caption",
5854
6327
  "type": "typography",
5855
- "content": "Subject",
5856
- "variant": "caption"
6328
+ "content": "Subject"
5857
6329
  },
5858
6330
  {
5859
- "variant": "body",
5860
6331
  "content": "@entity.subject",
5861
- "type": "typography"
6332
+ "type": "typography",
6333
+ "variant": "body"
5862
6334
  }
5863
- ]
6335
+ ],
6336
+ "gap": "md"
5864
6337
  },
5865
6338
  {
5866
6339
  "gap": "md",
5867
- "type": "stack",
5868
6340
  "direction": "horizontal",
6341
+ "type": "stack",
5869
6342
  "children": [
5870
6343
  {
5871
- "type": "typography",
5872
6344
  "content": "Body",
6345
+ "type": "typography",
5873
6346
  "variant": "caption"
5874
6347
  },
5875
6348
  {
5876
- "content": "@entity.body",
5877
6349
  "type": "typography",
5878
- "variant": "body"
6350
+ "variant": "body",
6351
+ "content": "@entity.body"
5879
6352
  }
5880
6353
  ]
5881
6354
  },
5882
6355
  {
6356
+ "type": "stack",
5883
6357
  "children": [
5884
6358
  {
5885
- "content": "Author",
5886
6359
  "type": "typography",
5887
- "variant": "caption"
6360
+ "variant": "caption",
6361
+ "content": "Author"
5888
6362
  },
5889
6363
  {
5890
- "content": "@entity.author",
5891
6364
  "variant": "body",
6365
+ "content": "@entity.author",
5892
6366
  "type": "typography"
5893
6367
  }
5894
6368
  ],
5895
- "type": "stack",
5896
- "direction": "horizontal",
5897
- "gap": "md"
6369
+ "gap": "md",
6370
+ "direction": "horizontal"
5898
6371
  },
5899
6372
  {
6373
+ "direction": "horizontal",
5900
6374
  "children": [
5901
6375
  {
6376
+ "type": "typography",
5902
6377
  "variant": "caption",
5903
- "content": "Created At",
5904
- "type": "typography"
6378
+ "content": "Created At"
5905
6379
  },
5906
6380
  {
5907
- "variant": "body",
5908
6381
  "type": "typography",
6382
+ "variant": "body",
5909
6383
  "content": "@entity.createdAt"
5910
6384
  }
5911
6385
  ],
5912
6386
  "type": "stack",
5913
- "direction": "horizontal",
5914
6387
  "gap": "md"
5915
6388
  },
5916
6389
  {
5917
6390
  "type": "divider"
5918
6391
  },
5919
6392
  {
5920
- "direction": "horizontal",
5921
- "type": "stack",
5922
6393
  "justify": "end",
6394
+ "type": "stack",
5923
6395
  "children": [
5924
6396
  {
5925
6397
  "action": "CLOSE",
@@ -5928,12 +6400,11 @@
5928
6400
  "label": "Close"
5929
6401
  }
5930
6402
  ],
6403
+ "direction": "horizontal",
5931
6404
  "gap": "sm"
5932
6405
  }
5933
6406
  ],
5934
- "direction": "vertical",
5935
- "gap": "md",
5936
- "type": "stack"
6407
+ "gap": "md"
5937
6408
  }
5938
6409
  ]
5939
6410
  ]