@almadar/std 14.47.1 → 14.48.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.
@@ -69,44 +69,44 @@
69
69
  "ref": "AppShell.traits.AppLayout",
70
70
  "name": "ProductAppLayout",
71
71
  "config": {
72
- "topBarActions": [
73
- {
74
- "label": "Cart",
75
- "event": "CART_OPEN",
76
- "icon": "shopping-cart"
77
- }
78
- ],
79
- "notifications": [],
80
- "contentTrait": "@trait.ProductCatalog",
81
- "appName": "EcommerceApp",
82
72
  "navItems": [
83
73
  {
84
- "icon": "package",
85
74
  "href": "/products",
75
+ "icon": "package",
86
76
  "label": "Products"
87
77
  },
88
78
  {
89
- "label": "Cart",
90
79
  "href": "/cart",
91
- "icon": "shopping-cart"
80
+ "icon": "shopping-cart",
81
+ "label": "Cart"
92
82
  },
93
83
  {
94
84
  "label": "Checkout",
95
- "href": "/checkout",
96
- "icon": "credit-card"
85
+ "icon": "credit-card",
86
+ "href": "/checkout"
97
87
  },
98
88
  {
89
+ "href": "/orders",
99
90
  "icon": "clipboard-list",
100
- "label": "Orders",
101
- "href": "/orders"
91
+ "label": "Orders"
92
+ }
93
+ ],
94
+ "topBarActions": [
95
+ {
96
+ "label": "Cart",
97
+ "event": "CART_OPEN",
98
+ "icon": "shopping-cart"
102
99
  }
103
100
  ],
101
+ "notifications": [],
102
+ "appName": "EcommerceApp",
104
103
  "notificationClickEvent": "PRODUCT_NOTIFICATIONS_OPEN",
104
+ "contentTrait": "@trait.ProductCatalog",
105
105
  "searchEvent": "PRODUCT_SEARCH"
106
106
  },
107
107
  "events": {
108
- "NOTIFY_CLICK": "PRODUCT_NOTIFICATIONS_OPEN",
109
- "SEARCH": "PRODUCT_SEARCH"
108
+ "SEARCH": "PRODUCT_SEARCH",
109
+ "NOTIFY_CLICK": "PRODUCT_NOTIFICATIONS_OPEN"
110
110
  }
111
111
  },
112
112
  {
@@ -190,54 +190,54 @@
190
190
  "main",
191
191
  {
192
192
  "type": "stack",
193
- "gap": "lg",
194
193
  "direction": "vertical",
195
194
  "children": [
196
195
  {
197
- "direction": "horizontal",
198
- "gap": "md",
199
196
  "justify": "between",
197
+ "type": "stack",
200
198
  "align": "center",
201
199
  "children": [
202
200
  {
203
201
  "align": "center",
202
+ "gap": "sm",
204
203
  "children": [
205
204
  {
206
205
  "name": "package",
207
206
  "type": "icon"
208
207
  },
209
208
  {
210
- "content": "Products",
211
209
  "type": "typography",
210
+ "content": "Products",
212
211
  "variant": "h2"
213
212
  }
214
213
  ],
215
- "type": "stack",
216
214
  "direction": "horizontal",
217
- "gap": "sm"
215
+ "type": "stack"
218
216
  },
219
217
  {
220
- "type": "stack",
221
218
  "direction": "horizontal",
219
+ "type": "stack",
222
220
  "children": [
223
221
  {
224
- "icon": "plus",
225
- "action": "CREATE",
226
- "type": "button",
227
222
  "label": "Create Product",
228
- "variant": "primary"
223
+ "variant": "primary",
224
+ "type": "button",
225
+ "action": "CREATE",
226
+ "icon": "plus"
229
227
  }
230
228
  ],
231
229
  "gap": "sm"
232
230
  }
233
231
  ],
234
- "type": "stack"
232
+ "direction": "horizontal",
233
+ "gap": "md"
235
234
  },
236
235
  {
237
236
  "type": "divider"
238
237
  },
239
238
  "@trait.ProductBrowseList"
240
- ]
239
+ ],
240
+ "gap": "lg"
241
241
  }
242
242
  ]
243
243
  ]
@@ -256,34 +256,34 @@
256
256
  "render-ui",
257
257
  "main",
258
258
  {
259
- "className": "py-8",
260
259
  "type": "stack",
261
260
  "gap": "md",
262
261
  "align": "center",
262
+ "className": "py-8",
263
+ "direction": "vertical",
263
264
  "children": [
264
265
  {
265
- "name": "bell",
266
- "type": "icon"
266
+ "type": "icon",
267
+ "name": "bell"
267
268
  },
268
269
  {
269
- "content": "No notifications",
270
270
  "type": "typography",
271
+ "content": "No notifications",
271
272
  "variant": "h3"
272
273
  },
273
274
  {
274
275
  "content": "You're all caught up.",
276
+ "color": "muted",
275
277
  "type": "typography",
276
- "variant": "caption",
277
- "color": "muted"
278
+ "variant": "caption"
278
279
  },
279
280
  {
280
- "type": "button",
281
281
  "label": "Back to products",
282
- "variant": "ghost",
283
- "action": "INIT"
282
+ "action": "INIT",
283
+ "type": "button",
284
+ "variant": "ghost"
284
285
  }
285
- ],
286
- "direction": "vertical"
286
+ ]
287
287
  }
288
288
  ]
289
289
  ]
@@ -297,13 +297,12 @@
297
297
  "name": "ProductBrowseList",
298
298
  "linkedEntity": "Product",
299
299
  "config": {
300
- "gap": "md",
301
- "imageField": "imageUrl",
300
+ "cols": 3.0,
302
301
  "fields": [
303
302
  {
303
+ "name": "name",
304
304
  "variant": "h3",
305
- "icon": "package",
306
- "name": "name"
305
+ "icon": "package"
307
306
  },
308
307
  {
309
308
  "name": "category",
@@ -321,28 +320,29 @@
321
320
  {
322
321
  "name": "inStock",
323
322
  "label": "In Stock",
324
- "format": "boolean",
325
- "variant": "body"
323
+ "variant": "body",
324
+ "format": "boolean"
326
325
  }
327
326
  ],
328
327
  "itemActions": [
329
328
  {
330
329
  "event": "VIEW",
331
- "label": "View",
332
- "variant": "ghost"
330
+ "variant": "ghost",
331
+ "label": "View"
333
332
  },
334
333
  {
335
- "variant": "ghost",
336
334
  "label": "Edit",
335
+ "variant": "ghost",
337
336
  "event": "EDIT"
338
337
  },
339
338
  {
340
339
  "variant": "danger",
341
- "event": "DELETE",
342
- "label": "Delete"
340
+ "label": "Delete",
341
+ "event": "DELETE"
343
342
  }
344
343
  ],
345
- "cols": 3.0
344
+ "gap": "md",
345
+ "imageField": "imageUrl"
346
346
  },
347
347
  "listens": [
348
348
  {
@@ -545,8 +545,8 @@
545
545
  "Product",
546
546
  {
547
547
  "emit": {
548
- "success": "ProductLoaded",
549
- "failure": "ProductLoadFailed"
548
+ "failure": "ProductLoadFailed",
549
+ "success": "ProductLoaded"
550
550
  }
551
551
  }
552
552
  ]
@@ -562,8 +562,8 @@
562
562
  "Product",
563
563
  {
564
564
  "emit": {
565
- "failure": "ProductLoadFailed",
566
- "success": "ProductLoaded"
565
+ "success": "ProductLoaded",
566
+ "failure": "ProductLoadFailed"
567
567
  }
568
568
  }
569
569
  ],
@@ -571,25 +571,23 @@
571
571
  "render-ui",
572
572
  "modal",
573
573
  {
574
- "gap": "md",
575
- "direction": "vertical",
576
574
  "type": "stack",
577
575
  "children": [
578
576
  {
579
- "direction": "horizontal",
577
+ "type": "stack",
580
578
  "children": [
581
579
  {
582
- "name": "plus-circle",
583
- "type": "icon"
580
+ "type": "icon",
581
+ "name": "plus-circle"
584
582
  },
585
583
  {
584
+ "content": "Create Product",
586
585
  "variant": "h3",
587
- "type": "typography",
588
- "content": "Create Product"
586
+ "type": "typography"
589
587
  }
590
588
  ],
591
- "gap": "sm",
592
- "type": "stack"
589
+ "direction": "horizontal",
590
+ "gap": "sm"
593
591
  },
594
592
  {
595
593
  "type": "divider"
@@ -608,7 +606,9 @@
608
606
  "inStock"
609
607
  ]
610
608
  }
611
- ]
609
+ ],
610
+ "gap": "md",
611
+ "direction": "vertical"
612
612
  }
613
613
  ]
614
614
  ]
@@ -869,8 +869,8 @@
869
869
  "Product",
870
870
  {
871
871
  "emit": {
872
- "success": "ProductLoaded",
873
- "failure": "ProductLoadFailed"
872
+ "failure": "ProductLoadFailed",
873
+ "success": "ProductLoaded"
874
874
  }
875
875
  }
876
876
  ]
@@ -887,8 +887,8 @@
887
887
  {
888
888
  "id": "@payload.id",
889
889
  "emit": {
890
- "failure": "ProductLoadFailed",
891
- "success": "ProductLoaded"
890
+ "success": "ProductLoaded",
891
+ "failure": "ProductLoadFailed"
892
892
  }
893
893
  }
894
894
  ],
@@ -896,14 +896,16 @@
896
896
  "render-ui",
897
897
  "modal",
898
898
  {
899
+ "type": "stack",
900
+ "direction": "vertical",
899
901
  "children": [
900
902
  {
901
- "gap": "sm",
902
903
  "type": "stack",
904
+ "direction": "horizontal",
903
905
  "children": [
904
906
  {
905
- "type": "icon",
906
- "name": "edit"
907
+ "name": "edit",
908
+ "type": "icon"
907
909
  },
908
910
  {
909
911
  "variant": "h3",
@@ -911,15 +913,15 @@
911
913
  "content": "Edit Product"
912
914
  }
913
915
  ],
914
- "direction": "horizontal"
916
+ "gap": "sm"
915
917
  },
916
918
  {
917
919
  "type": "divider"
918
920
  },
919
921
  {
920
- "cancelEvent": "CLOSE",
921
922
  "type": "form-section",
922
923
  "entity": "@payload.row",
924
+ "mode": "edit",
923
925
  "fields": [
924
926
  "name",
925
927
  "description",
@@ -928,12 +930,10 @@
928
930
  "sku",
929
931
  "inStock"
930
932
  ],
931
- "mode": "edit",
932
- "submitEvent": "SAVE"
933
+ "submitEvent": "SAVE",
934
+ "cancelEvent": "CLOSE"
933
935
  }
934
936
  ],
935
- "direction": "vertical",
936
- "type": "stack",
937
937
  "gap": "md"
938
938
  }
939
939
  ]
@@ -1076,6 +1076,10 @@
1076
1076
  "name": "id",
1077
1077
  "type": "string",
1078
1078
  "required": true
1079
+ },
1080
+ {
1081
+ "name": "row",
1082
+ "type": "Product"
1079
1083
  }
1080
1084
  ]
1081
1085
  },
@@ -1176,6 +1180,36 @@
1176
1180
  "to": "open",
1177
1181
  "event": "VIEW",
1178
1182
  "effects": [
1183
+ [
1184
+ "set",
1185
+ "@entity.name",
1186
+ "@payload.row.name"
1187
+ ],
1188
+ [
1189
+ "set",
1190
+ "@entity.description",
1191
+ "@payload.row.description"
1192
+ ],
1193
+ [
1194
+ "set",
1195
+ "@entity.price",
1196
+ "@payload.row.price"
1197
+ ],
1198
+ [
1199
+ "set",
1200
+ "@entity.category",
1201
+ "@payload.row.category"
1202
+ ],
1203
+ [
1204
+ "set",
1205
+ "@entity.sku",
1206
+ "@payload.row.sku"
1207
+ ],
1208
+ [
1209
+ "set",
1210
+ "@entity.inStock",
1211
+ "@payload.row.inStock"
1212
+ ],
1179
1213
  [
1180
1214
  "fetch",
1181
1215
  "Product",
@@ -1191,26 +1225,25 @@
1191
1225
  "render-ui",
1192
1226
  "modal",
1193
1227
  {
1194
- "type": "stack",
1195
1228
  "direction": "vertical",
1196
- "gap": "md",
1229
+ "type": "stack",
1197
1230
  "children": [
1198
1231
  {
1199
1232
  "type": "stack",
1200
- "align": "center",
1201
- "direction": "horizontal",
1202
1233
  "children": [
1203
1234
  {
1204
- "type": "icon",
1205
- "name": "eye"
1235
+ "name": "eye",
1236
+ "type": "icon"
1206
1237
  },
1207
1238
  {
1239
+ "variant": "h3",
1208
1240
  "type": "typography",
1209
- "content": "@entity.name",
1210
- "variant": "h3"
1241
+ "content": "@entity.name"
1211
1242
  }
1212
1243
  ],
1213
- "gap": "sm"
1244
+ "gap": "sm",
1245
+ "align": "center",
1246
+ "direction": "horizontal"
1214
1247
  },
1215
1248
  {
1216
1249
  "type": "divider"
@@ -1218,9 +1251,9 @@
1218
1251
  {
1219
1252
  "children": [
1220
1253
  {
1254
+ "content": "Name",
1221
1255
  "variant": "caption",
1222
- "type": "typography",
1223
- "content": "Name"
1256
+ "type": "typography"
1224
1257
  },
1225
1258
  {
1226
1259
  "variant": "body",
@@ -1228,63 +1261,63 @@
1228
1261
  "type": "typography"
1229
1262
  }
1230
1263
  ],
1231
- "type": "stack",
1232
1264
  "direction": "horizontal",
1233
- "gap": "md"
1265
+ "gap": "md",
1266
+ "type": "stack"
1234
1267
  },
1235
1268
  {
1236
1269
  "children": [
1237
1270
  {
1238
1271
  "type": "typography",
1239
- "content": "Description",
1240
- "variant": "caption"
1272
+ "variant": "caption",
1273
+ "content": "Description"
1241
1274
  },
1242
1275
  {
1243
- "type": "typography",
1244
1276
  "variant": "body",
1245
- "content": "@entity.description"
1277
+ "content": "@entity.description",
1278
+ "type": "typography"
1246
1279
  }
1247
1280
  ],
1248
1281
  "gap": "md",
1249
- "type": "stack",
1250
- "direction": "horizontal"
1282
+ "direction": "horizontal",
1283
+ "type": "stack"
1251
1284
  },
1252
1285
  {
1253
1286
  "type": "stack",
1287
+ "direction": "horizontal",
1254
1288
  "children": [
1255
1289
  {
1256
- "type": "typography",
1257
1290
  "variant": "caption",
1258
- "content": "Price"
1291
+ "content": "Price",
1292
+ "type": "typography"
1259
1293
  },
1260
1294
  {
1261
1295
  "variant": "body",
1262
- "content": "@entity.price",
1263
- "type": "typography"
1296
+ "type": "typography",
1297
+ "content": "@entity.price"
1264
1298
  }
1265
1299
  ],
1266
- "gap": "md",
1267
- "direction": "horizontal"
1300
+ "gap": "md"
1268
1301
  },
1269
1302
  {
1270
- "gap": "md",
1271
- "direction": "horizontal",
1272
- "type": "stack",
1273
1303
  "children": [
1274
1304
  {
1275
- "variant": "caption",
1305
+ "content": "Category",
1276
1306
  "type": "typography",
1277
- "content": "Category"
1307
+ "variant": "caption"
1278
1308
  },
1279
1309
  {
1280
1310
  "variant": "body",
1281
- "type": "typography",
1282
- "content": "@entity.category"
1311
+ "content": "@entity.category",
1312
+ "type": "typography"
1283
1313
  }
1284
- ]
1314
+ ],
1315
+ "gap": "md",
1316
+ "type": "stack",
1317
+ "direction": "horizontal"
1285
1318
  },
1286
1319
  {
1287
- "direction": "horizontal",
1320
+ "type": "stack",
1288
1321
  "children": [
1289
1322
  {
1290
1323
  "type": "typography",
@@ -1292,25 +1325,25 @@
1292
1325
  "content": "Sku"
1293
1326
  },
1294
1327
  {
1295
- "type": "typography",
1328
+ "variant": "body",
1296
1329
  "content": "@entity.sku",
1297
- "variant": "body"
1330
+ "type": "typography"
1298
1331
  }
1299
1332
  ],
1300
1333
  "gap": "md",
1301
- "type": "stack"
1334
+ "direction": "horizontal"
1302
1335
  },
1303
1336
  {
1304
1337
  "children": [
1305
1338
  {
1306
- "content": "In Stock",
1307
1339
  "type": "typography",
1308
- "variant": "caption"
1340
+ "variant": "caption",
1341
+ "content": "In Stock"
1309
1342
  },
1310
1343
  {
1311
- "content": "@entity.inStock",
1312
1344
  "type": "typography",
1313
- "variant": "body"
1345
+ "variant": "body",
1346
+ "content": "@entity.inStock"
1314
1347
  }
1315
1348
  ],
1316
1349
  "direction": "horizontal",
@@ -1322,26 +1355,27 @@
1322
1355
  },
1323
1356
  {
1324
1357
  "gap": "sm",
1325
- "justify": "end",
1326
- "type": "stack",
1327
1358
  "children": [
1328
1359
  {
1329
- "action": "EDIT",
1330
- "type": "button",
1331
- "label": "Edit",
1360
+ "icon": "edit",
1332
1361
  "variant": "primary",
1333
- "icon": "edit"
1362
+ "label": "Edit",
1363
+ "action": "EDIT",
1364
+ "type": "button"
1334
1365
  },
1335
1366
  {
1336
1367
  "type": "button",
1337
- "label": "Close",
1368
+ "variant": "ghost",
1338
1369
  "action": "CLOSE",
1339
- "variant": "ghost"
1370
+ "label": "Close"
1340
1371
  }
1341
1372
  ],
1342
- "direction": "horizontal"
1373
+ "direction": "horizontal",
1374
+ "type": "stack",
1375
+ "justify": "end"
1343
1376
  }
1344
- ]
1377
+ ],
1378
+ "gap": "md"
1345
1379
  }
1346
1380
  ]
1347
1381
  ]
@@ -1592,22 +1626,22 @@
1592
1626
  "fetch",
1593
1627
  "Product",
1594
1628
  {
1595
- "id": "@payload.id",
1596
1629
  "emit": {
1597
- "success": "ProductLoaded",
1598
- "failure": "ProductLoadFailed"
1599
- }
1630
+ "failure": "ProductLoadFailed",
1631
+ "success": "ProductLoaded"
1632
+ },
1633
+ "id": "@payload.id"
1600
1634
  }
1601
1635
  ],
1602
1636
  [
1603
1637
  "render-ui",
1604
1638
  "modal",
1605
1639
  {
1640
+ "type": "stack",
1606
1641
  "gap": "md",
1642
+ "direction": "vertical",
1607
1643
  "children": [
1608
1644
  {
1609
- "direction": "horizontal",
1610
- "type": "stack",
1611
1645
  "align": "center",
1612
1646
  "children": [
1613
1647
  {
@@ -1616,10 +1650,12 @@
1616
1650
  },
1617
1651
  {
1618
1652
  "content": "Delete Product",
1619
- "type": "typography",
1620
- "variant": "h3"
1653
+ "variant": "h3",
1654
+ "type": "typography"
1621
1655
  }
1622
1656
  ],
1657
+ "type": "stack",
1658
+ "direction": "horizontal",
1623
1659
  "gap": "sm"
1624
1660
  },
1625
1661
  {
@@ -1627,33 +1663,31 @@
1627
1663
  },
1628
1664
  {
1629
1665
  "type": "alert",
1630
- "message": "This action cannot be undone.",
1631
- "variant": "error"
1666
+ "variant": "error",
1667
+ "message": "This action cannot be undone."
1632
1668
  },
1633
1669
  {
1670
+ "type": "stack",
1671
+ "gap": "sm",
1634
1672
  "direction": "horizontal",
1635
1673
  "children": [
1636
1674
  {
1637
- "action": "CANCEL",
1675
+ "variant": "ghost",
1638
1676
  "label": "Cancel",
1639
- "type": "button",
1640
- "variant": "ghost"
1677
+ "action": "CANCEL",
1678
+ "type": "button"
1641
1679
  },
1642
1680
  {
1643
1681
  "variant": "danger",
1682
+ "action": "CONFIRM_DELETE",
1644
1683
  "type": "button",
1645
1684
  "icon": "check",
1646
- "action": "CONFIRM_DELETE",
1647
1685
  "label": "Delete"
1648
1686
  }
1649
1687
  ],
1650
- "gap": "sm",
1651
- "type": "stack",
1652
1688
  "justify": "end"
1653
1689
  }
1654
- ],
1655
- "type": "stack",
1656
- "direction": "vertical"
1690
+ ]
1657
1691
  }
1658
1692
  ]
1659
1693
  ]
@@ -1670,8 +1704,8 @@
1670
1704
  "@entity.pendingId",
1671
1705
  {
1672
1706
  "emit": {
1673
- "failure": "ProductDeleteFailed",
1674
- "success": "ProductDeleted"
1707
+ "success": "ProductDeleted",
1708
+ "failure": "ProductDeleteFailed"
1675
1709
  }
1676
1710
  }
1677
1711
  ],
@@ -1692,8 +1726,8 @@
1692
1726
  "Product",
1693
1727
  {
1694
1728
  "emit": {
1695
- "success": "ProductLoaded",
1696
- "failure": "ProductLoadFailed"
1729
+ "failure": "ProductLoadFailed",
1730
+ "success": "ProductLoaded"
1697
1731
  }
1698
1732
  }
1699
1733
  ],
@@ -2002,22 +2036,22 @@
2002
2036
  "render-ui",
2003
2037
  "main",
2004
2038
  {
2005
- "className": "py-12",
2006
2039
  "type": "stack",
2007
- "align": "center",
2008
2040
  "gap": "md",
2041
+ "direction": "vertical",
2009
2042
  "children": [
2010
2043
  {
2011
2044
  "type": "spinner"
2012
2045
  },
2013
2046
  {
2014
- "type": "typography",
2015
2047
  "content": "Loading…",
2048
+ "color": "muted",
2016
2049
  "variant": "caption",
2017
- "color": "muted"
2050
+ "type": "typography"
2018
2051
  }
2019
2052
  ],
2020
- "direction": "vertical"
2053
+ "align": "center",
2054
+ "className": "py-12"
2021
2055
  }
2022
2056
  ]
2023
2057
  ]
@@ -2031,42 +2065,64 @@
2031
2065
  "render-ui",
2032
2066
  "main",
2033
2067
  {
2034
- "appName": "EcommerceApp",
2068
+ "navItems": [
2069
+ {
2070
+ "label": "Products",
2071
+ "href": "/products",
2072
+ "icon": "package"
2073
+ },
2074
+ {
2075
+ "icon": "shopping-cart",
2076
+ "href": "/cart",
2077
+ "label": "Cart"
2078
+ },
2079
+ {
2080
+ "href": "/checkout",
2081
+ "icon": "credit-card",
2082
+ "label": "Checkout"
2083
+ },
2084
+ {
2085
+ "icon": "clipboard-list",
2086
+ "href": "/orders",
2087
+ "label": "Orders"
2088
+ }
2089
+ ],
2035
2090
  "type": "dashboard-layout",
2091
+ "appName": "EcommerceApp",
2036
2092
  "children": [
2037
2093
  {
2038
2094
  "type": "stack",
2039
- "gap": "lg",
2095
+ "direction": "vertical",
2040
2096
  "children": [
2041
2097
  {
2042
- "gap": "md",
2043
2098
  "type": "stack",
2044
2099
  "justify": "between",
2045
2100
  "children": [
2046
2101
  {
2047
2102
  "type": "stack",
2103
+ "direction": "horizontal",
2104
+ "gap": "md",
2048
2105
  "children": [
2049
2106
  {
2050
2107
  "name": "shopping-cart",
2051
2108
  "type": "icon"
2052
2109
  },
2053
2110
  {
2111
+ "variant": "h2",
2054
2112
  "content": "Shopping Cart",
2055
- "type": "typography",
2056
- "variant": "h2"
2113
+ "type": "typography"
2057
2114
  }
2058
- ],
2059
- "gap": "md",
2060
- "direction": "horizontal"
2115
+ ]
2061
2116
  },
2062
2117
  {
2063
- "icon": "plus",
2064
- "action": "ADD_ITEM",
2065
2118
  "variant": "primary",
2119
+ "action": "ADD_ITEM",
2120
+ "label": "Add Item",
2066
2121
  "type": "button",
2067
- "label": "Add Item"
2122
+ "icon": "plus"
2068
2123
  }
2069
2124
  ],
2125
+ "gap": "md",
2070
2126
  "direction": "horizontal"
2071
2127
  },
2072
2128
  {
@@ -2078,20 +2134,20 @@
2078
2134
  "children": [
2079
2135
  {
2080
2136
  "type": "stat-display",
2081
- "value": "@payload.data.length",
2082
2137
  "label": "Items",
2083
- "icon": "package"
2138
+ "icon": "package",
2139
+ "value": "@payload.data.length"
2084
2140
  },
2085
2141
  {
2086
- "icon": "dollar-sign",
2087
- "label": "Subtotal",
2088
2142
  "value": "@payload.data.length",
2089
- "type": "stat-display"
2143
+ "label": "Subtotal",
2144
+ "type": "stat-display",
2145
+ "icon": "dollar-sign"
2090
2146
  },
2091
2147
  {
2092
2148
  "label": "Total",
2093
- "value": "@payload.data.length",
2094
2149
  "type": "stat-display",
2150
+ "value": "@payload.data.length",
2095
2151
  "icon": "receipt"
2096
2152
  }
2097
2153
  ]
@@ -2100,27 +2156,27 @@
2100
2156
  "type": "divider"
2101
2157
  },
2102
2158
  {
2159
+ "type": "data-grid",
2160
+ "entity": "@payload.data",
2103
2161
  "itemActions": [
2104
2162
  {
2105
- "variant": "danger",
2163
+ "event": "REQUEST_REMOVE",
2106
2164
  "label": "Remove",
2107
- "event": "REQUEST_REMOVE"
2165
+ "variant": "danger"
2108
2166
  }
2109
2167
  ],
2110
- "type": "data-grid",
2111
- "entity": "@payload.data",
2112
2168
  "fields": [
2113
2169
  {
2114
- "label": "Product Name",
2115
- "variant": "h4",
2170
+ "name": "productName",
2116
2171
  "icon": "shopping-cart",
2117
- "name": "productName"
2172
+ "label": "Product Name",
2173
+ "variant": "h4"
2118
2174
  },
2119
2175
  {
2120
- "label": "Quantity",
2121
2176
  "name": "quantity",
2177
+ "variant": "caption",
2122
2178
  "format": "currency",
2123
- "variant": "caption"
2179
+ "label": "Quantity"
2124
2180
  },
2125
2181
  {
2126
2182
  "name": "unitPrice",
@@ -2131,35 +2187,13 @@
2131
2187
  },
2132
2188
  {
2133
2189
  "type": "button",
2134
- "label": "Proceed to Checkout",
2135
2190
  "variant": "primary",
2136
- "icon": "arrow-right",
2137
- "action": "PROCEED_CHECKOUT"
2191
+ "label": "Proceed to Checkout",
2192
+ "action": "PROCEED_CHECKOUT",
2193
+ "icon": "arrow-right"
2138
2194
  }
2139
2195
  ],
2140
- "direction": "vertical"
2141
- }
2142
- ],
2143
- "navItems": [
2144
- {
2145
- "label": "Products",
2146
- "href": "/products",
2147
- "icon": "package"
2148
- },
2149
- {
2150
- "icon": "shopping-cart",
2151
- "href": "/cart",
2152
- "label": "Cart"
2153
- },
2154
- {
2155
- "label": "Checkout",
2156
- "icon": "credit-card",
2157
- "href": "/checkout"
2158
- },
2159
- {
2160
- "label": "Orders",
2161
- "href": "/orders",
2162
- "icon": "clipboard-list"
2196
+ "gap": "lg"
2163
2197
  }
2164
2198
  ]
2165
2199
  }
@@ -2175,15 +2209,13 @@
2175
2209
  "render-ui",
2176
2210
  "main",
2177
2211
  {
2178
- "type": "stack",
2179
- "direction": "vertical",
2212
+ "gap": "md",
2180
2213
  "className": "py-12",
2181
- "align": "center",
2182
2214
  "children": [
2183
2215
  {
2184
- "type": "icon",
2185
2216
  "name": "alert-triangle",
2186
- "color": "destructive"
2217
+ "color": "destructive",
2218
+ "type": "icon"
2187
2219
  },
2188
2220
  {
2189
2221
  "content": "Failed to load cartitem",
@@ -2191,20 +2223,22 @@
2191
2223
  "variant": "h3"
2192
2224
  },
2193
2225
  {
2194
- "content": "@payload.error",
2195
- "type": "typography",
2226
+ "variant": "body",
2196
2227
  "color": "muted",
2197
- "variant": "body"
2228
+ "content": "@payload.error",
2229
+ "type": "typography"
2198
2230
  },
2199
2231
  {
2200
2232
  "icon": "rotate-ccw",
2201
2233
  "variant": "primary",
2202
2234
  "type": "button",
2203
- "action": "INIT",
2204
- "label": "Retry"
2235
+ "label": "Retry",
2236
+ "action": "INIT"
2205
2237
  }
2206
2238
  ],
2207
- "gap": "md"
2239
+ "align": "center",
2240
+ "type": "stack",
2241
+ "direction": "vertical"
2208
2242
  }
2209
2243
  ]
2210
2244
  ]
@@ -2228,19 +2262,19 @@
2228
2262
  "render-ui",
2229
2263
  "main",
2230
2264
  {
2231
- "className": "py-12",
2232
- "align": "center",
2233
2265
  "direction": "vertical",
2234
2266
  "type": "stack",
2235
2267
  "gap": "md",
2268
+ "className": "py-12",
2269
+ "align": "center",
2236
2270
  "children": [
2237
2271
  {
2238
2272
  "type": "spinner"
2239
2273
  },
2240
2274
  {
2241
2275
  "variant": "caption",
2242
- "color": "muted",
2243
2276
  "type": "typography",
2277
+ "color": "muted",
2244
2278
  "content": "Preparing checkout…"
2245
2279
  }
2246
2280
  ]
@@ -2257,36 +2291,12 @@
2257
2291
  "render-ui",
2258
2292
  "main",
2259
2293
  {
2260
- "type": "dashboard-layout",
2261
- "navItems": [
2262
- {
2263
- "label": "Products",
2264
- "icon": "package",
2265
- "href": "/products"
2266
- },
2267
- {
2268
- "href": "/cart",
2269
- "label": "Cart",
2270
- "icon": "shopping-cart"
2271
- },
2272
- {
2273
- "href": "/checkout",
2274
- "icon": "credit-card",
2275
- "label": "Checkout"
2276
- },
2277
- {
2278
- "label": "Orders",
2279
- "href": "/orders",
2280
- "icon": "clipboard-list"
2281
- }
2282
- ],
2283
2294
  "children": [
2284
2295
  {
2296
+ "direction": "vertical",
2285
2297
  "children": [
2286
2298
  {
2287
2299
  "type": "stack",
2288
- "direction": "horizontal",
2289
- "gap": "sm",
2290
2300
  "children": [
2291
2301
  {
2292
2302
  "type": "icon",
@@ -2294,72 +2304,96 @@
2294
2304
  },
2295
2305
  {
2296
2306
  "variant": "h2",
2297
- "type": "typography",
2298
- "content": "Checkout"
2307
+ "content": "Checkout",
2308
+ "type": "typography"
2299
2309
  }
2300
- ]
2310
+ ],
2311
+ "gap": "sm",
2312
+ "direction": "horizontal"
2301
2313
  },
2302
2314
  {
2303
2315
  "type": "divider"
2304
2316
  },
2305
2317
  {
2306
- "entity": "@payload.data",
2307
2318
  "type": "data-grid",
2308
2319
  "itemActions": [
2309
2320
  {
2310
- "label": "Remove",
2321
+ "variant": "danger",
2311
2322
  "event": "REQUEST_REMOVE",
2312
- "variant": "danger"
2323
+ "label": "Remove"
2313
2324
  }
2314
2325
  ],
2326
+ "entity": "@payload.data",
2315
2327
  "fields": [
2316
2328
  {
2317
- "label": "Product Name",
2318
- "variant": "h4",
2329
+ "icon": "shopping-cart",
2319
2330
  "name": "productName",
2320
- "icon": "shopping-cart"
2331
+ "label": "Product Name",
2332
+ "variant": "h4"
2321
2333
  },
2322
2334
  {
2323
2335
  "label": "Quantity",
2324
- "name": "quantity",
2325
2336
  "format": "currency",
2337
+ "name": "quantity",
2326
2338
  "variant": "caption"
2327
2339
  },
2328
2340
  {
2329
- "variant": "badge",
2330
2341
  "name": "unitPrice",
2342
+ "variant": "badge",
2331
2343
  "label": "Unit Price"
2332
2344
  }
2333
2345
  ]
2334
2346
  },
2335
2347
  {
2348
+ "direction": "horizontal",
2336
2349
  "gap": "sm",
2337
2350
  "children": [
2338
2351
  {
2339
- "type": "button",
2340
2352
  "action": "BACK_TO_CART",
2353
+ "type": "button",
2354
+ "variant": "ghost",
2341
2355
  "icon": "arrow-left",
2342
- "label": "Back to Cart",
2343
- "variant": "ghost"
2356
+ "label": "Back to Cart"
2344
2357
  },
2345
2358
  {
2346
- "type": "button",
2347
- "action": "CONFIRM_ORDER",
2348
- "label": "Confirm Order",
2349
2359
  "icon": "check",
2350
- "variant": "primary"
2360
+ "variant": "primary",
2361
+ "label": "Confirm Order",
2362
+ "type": "button",
2363
+ "action": "CONFIRM_ORDER"
2351
2364
  }
2352
2365
  ],
2353
2366
  "type": "stack",
2354
- "direction": "horizontal",
2355
2367
  "justify": "end"
2356
2368
  }
2357
2369
  ],
2358
- "type": "stack",
2359
- "direction": "vertical",
2360
- "gap": "lg"
2370
+ "gap": "lg",
2371
+ "type": "stack"
2372
+ }
2373
+ ],
2374
+ "navItems": [
2375
+ {
2376
+ "icon": "package",
2377
+ "href": "/products",
2378
+ "label": "Products"
2379
+ },
2380
+ {
2381
+ "label": "Cart",
2382
+ "href": "/cart",
2383
+ "icon": "shopping-cart"
2384
+ },
2385
+ {
2386
+ "label": "Checkout",
2387
+ "href": "/checkout",
2388
+ "icon": "credit-card"
2389
+ },
2390
+ {
2391
+ "href": "/orders",
2392
+ "icon": "clipboard-list",
2393
+ "label": "Orders"
2361
2394
  }
2362
2395
  ],
2396
+ "type": "dashboard-layout",
2363
2397
  "appName": "EcommerceApp"
2364
2398
  }
2365
2399
  ]
@@ -2375,8 +2409,8 @@
2375
2409
  "CartItem",
2376
2410
  {
2377
2411
  "emit": {
2378
- "success": "CartItemLoaded",
2379
- "failure": "CartItemLoadFailed"
2412
+ "failure": "CartItemLoadFailed",
2413
+ "success": "CartItemLoaded"
2380
2414
  }
2381
2415
  }
2382
2416
  ]
@@ -2392,8 +2426,8 @@
2392
2426
  "CartItem",
2393
2427
  {
2394
2428
  "emit": {
2395
- "failure": "CartItemLoadFailed",
2396
- "success": "CartItemLoaded"
2429
+ "success": "CartItemLoaded",
2430
+ "failure": "CartItemLoadFailed"
2397
2431
  }
2398
2432
  }
2399
2433
  ],
@@ -2402,17 +2436,16 @@
2402
2436
  "main",
2403
2437
  {
2404
2438
  "appName": "EcommerceApp",
2405
- "type": "dashboard-layout",
2406
2439
  "navItems": [
2407
2440
  {
2441
+ "href": "/products",
2408
2442
  "icon": "package",
2409
- "label": "Products",
2410
- "href": "/products"
2443
+ "label": "Products"
2411
2444
  },
2412
2445
  {
2413
- "icon": "shopping-cart",
2446
+ "href": "/cart",
2414
2447
  "label": "Cart",
2415
- "href": "/cart"
2448
+ "icon": "shopping-cart"
2416
2449
  },
2417
2450
  {
2418
2451
  "icon": "credit-card",
@@ -2420,29 +2453,32 @@
2420
2453
  "href": "/checkout"
2421
2454
  },
2422
2455
  {
2423
- "label": "Orders",
2424
2456
  "href": "/orders",
2457
+ "label": "Orders",
2425
2458
  "icon": "clipboard-list"
2426
2459
  }
2427
2460
  ],
2461
+ "type": "dashboard-layout",
2428
2462
  "children": [
2429
2463
  {
2430
2464
  "direction": "vertical",
2465
+ "gap": "lg",
2431
2466
  "type": "stack",
2467
+ "align": "center",
2432
2468
  "children": [
2433
2469
  {
2434
- "name": "check-circle",
2435
- "type": "icon"
2470
+ "type": "icon",
2471
+ "name": "check-circle"
2436
2472
  },
2437
2473
  {
2438
- "type": "typography",
2439
2474
  "variant": "h2",
2440
- "content": "Order Confirmed"
2475
+ "content": "Order Confirmed",
2476
+ "type": "typography"
2441
2477
  },
2442
2478
  {
2443
- "type": "typography",
2444
2479
  "content": "Your order has been placed successfully.",
2445
- "variant": "body"
2480
+ "variant": "body",
2481
+ "type": "typography"
2446
2482
  },
2447
2483
  {
2448
2484
  "label": "Continue Shopping",
@@ -2450,9 +2486,7 @@
2450
2486
  "type": "button",
2451
2487
  "variant": "primary"
2452
2488
  }
2453
- ],
2454
- "align": "center",
2455
- "gap": "lg"
2489
+ ]
2456
2490
  }
2457
2491
  ]
2458
2492
  }
@@ -2622,8 +2656,8 @@
2622
2656
  "CartItem",
2623
2657
  {
2624
2658
  "emit": {
2625
- "success": "CartItemLoaded",
2626
- "failure": "CartItemLoadFailed"
2659
+ "failure": "CartItemLoadFailed",
2660
+ "success": "CartItemLoaded"
2627
2661
  }
2628
2662
  }
2629
2663
  ]
@@ -2639,8 +2673,8 @@
2639
2673
  "CartItem",
2640
2674
  {
2641
2675
  "emit": {
2642
- "failure": "CartItemLoadFailed",
2643
- "success": "CartItemLoaded"
2676
+ "success": "CartItemLoaded",
2677
+ "failure": "CartItemLoadFailed"
2644
2678
  }
2645
2679
  }
2646
2680
  ],
@@ -2650,11 +2684,11 @@
2650
2684
  {
2651
2685
  "type": "stack",
2652
2686
  "direction": "vertical",
2653
- "gap": "md",
2654
2687
  "children": [
2655
2688
  {
2656
- "direction": "horizontal",
2657
2689
  "type": "stack",
2690
+ "direction": "horizontal",
2691
+ "gap": "sm",
2658
2692
  "children": [
2659
2693
  {
2660
2694
  "name": "plus-circle",
@@ -2662,28 +2696,28 @@
2662
2696
  },
2663
2697
  {
2664
2698
  "variant": "h3",
2665
- "content": "Add Item",
2666
- "type": "typography"
2699
+ "type": "typography",
2700
+ "content": "Add Item"
2667
2701
  }
2668
- ],
2669
- "gap": "sm"
2702
+ ]
2670
2703
  },
2671
2704
  {
2672
2705
  "type": "divider"
2673
2706
  },
2674
2707
  {
2708
+ "submitEvent": "SAVE",
2675
2709
  "cancelEvent": "CLOSE",
2710
+ "type": "form-section",
2711
+ "mode": "create",
2676
2712
  "fields": [
2677
2713
  "productName",
2678
2714
  "quantity",
2679
2715
  "unitPrice",
2680
2716
  "totalPrice"
2681
- ],
2682
- "type": "form-section",
2683
- "mode": "create",
2684
- "submitEvent": "SAVE"
2717
+ ]
2685
2718
  }
2686
- ]
2719
+ ],
2720
+ "gap": "md"
2687
2721
  }
2688
2722
  ]
2689
2723
  ]
@@ -2724,8 +2758,8 @@
2724
2758
  "@payload.data",
2725
2759
  {
2726
2760
  "emit": {
2727
- "success": "CartItemSaved",
2728
- "failure": "CartItemSaveFailed"
2761
+ "failure": "CartItemSaveFailed",
2762
+ "success": "CartItemSaved"
2729
2763
  }
2730
2764
  }
2731
2765
  ],
@@ -2933,8 +2967,8 @@
2933
2967
  {
2934
2968
  "id": "@payload.id",
2935
2969
  "emit": {
2936
- "success": "CartItemLoaded",
2937
- "failure": "CartItemLoadFailed"
2970
+ "failure": "CartItemLoadFailed",
2971
+ "success": "CartItemLoaded"
2938
2972
  }
2939
2973
  }
2940
2974
  ],
@@ -2942,55 +2976,55 @@
2942
2976
  "render-ui",
2943
2977
  "modal",
2944
2978
  {
2945
- "direction": "vertical",
2946
2979
  "type": "stack",
2980
+ "direction": "vertical",
2947
2981
  "gap": "md",
2948
2982
  "children": [
2949
2983
  {
2984
+ "align": "center",
2950
2985
  "children": [
2951
2986
  {
2952
2987
  "type": "icon",
2953
2988
  "name": "alert-triangle"
2954
2989
  },
2955
2990
  {
2956
- "type": "typography",
2991
+ "content": "Remove Item",
2957
2992
  "variant": "h3",
2958
- "content": "Remove Item"
2993
+ "type": "typography"
2959
2994
  }
2960
2995
  ],
2961
- "direction": "horizontal",
2962
- "align": "center",
2996
+ "type": "stack",
2963
2997
  "gap": "sm",
2964
- "type": "stack"
2998
+ "direction": "horizontal"
2965
2999
  },
2966
3000
  {
2967
3001
  "type": "divider"
2968
3002
  },
2969
3003
  {
2970
3004
  "variant": "error",
2971
- "type": "alert",
2972
- "message": "Are you sure you want to remove this item from your cart?"
3005
+ "message": "Are you sure you want to remove this item from your cart?",
3006
+ "type": "alert"
2973
3007
  },
2974
3008
  {
2975
- "justify": "end",
2976
- "direction": "horizontal",
2977
3009
  "type": "stack",
3010
+ "gap": "sm",
3011
+ "direction": "horizontal",
3012
+ "justify": "end",
2978
3013
  "children": [
2979
3014
  {
2980
- "action": "CANCEL",
2981
- "label": "Cancel",
2982
3015
  "type": "button",
3016
+ "label": "Cancel",
3017
+ "action": "CANCEL",
2983
3018
  "variant": "ghost"
2984
3019
  },
2985
3020
  {
2986
- "label": "Remove",
2987
- "type": "button",
2988
- "variant": "danger",
2989
3021
  "action": "CONFIRM_REMOVE",
2990
- "icon": "check"
3022
+ "type": "button",
3023
+ "label": "Remove",
3024
+ "icon": "check",
3025
+ "variant": "danger"
2991
3026
  }
2992
- ],
2993
- "gap": "sm"
3027
+ ]
2994
3028
  }
2995
3029
  ]
2996
3030
  }
@@ -3009,8 +3043,8 @@
3009
3043
  "@entity.pendingId",
3010
3044
  {
3011
3045
  "emit": {
3012
- "success": "CartItemDeleted",
3013
- "failure": "CartItemDeleteFailed"
3046
+ "failure": "CartItemDeleteFailed",
3047
+ "success": "CartItemDeleted"
3014
3048
  }
3015
3049
  }
3016
3050
  ],
@@ -3089,8 +3123,8 @@
3089
3123
  "CartItem",
3090
3124
  {
3091
3125
  "emit": {
3092
- "failure": "CartItemLoadFailed",
3093
- "success": "CartItemLoaded"
3126
+ "success": "CartItemLoaded",
3127
+ "failure": "CartItemLoadFailed"
3094
3128
  }
3095
3129
  }
3096
3130
  ]
@@ -3165,9 +3199,9 @@
3165
3199
  "ref": "Stripe.traits.ServiceStripeStripe",
3166
3200
  "name": "CheckoutPayment",
3167
3201
  "config": {
3168
- "metadata": {},
3169
3202
  "amount": 0.0,
3170
3203
  "currency": "usd",
3204
+ "metadata": {},
3171
3205
  "uiTrait": "@trait.CheckoutPaymentForm"
3172
3206
  },
3173
3207
  "listens": [
@@ -3223,45 +3257,45 @@
3223
3257
  "render-ui",
3224
3258
  "main",
3225
3259
  {
3260
+ "direction": "vertical",
3261
+ "gap": "md",
3226
3262
  "children": [
3227
3263
  {
3228
- "type": "alert",
3229
3264
  "message": "Enter card details to complete your order.",
3230
- "variant": "info"
3265
+ "variant": "info",
3266
+ "type": "alert"
3231
3267
  },
3232
3268
  {
3233
- "type": "input",
3234
3269
  "placeholder": "Card number",
3270
+ "type": "input",
3235
3271
  "inputType": "text"
3236
3272
  },
3237
3273
  {
3274
+ "type": "stack",
3238
3275
  "gap": "sm",
3239
3276
  "direction": "horizontal",
3240
3277
  "children": [
3241
3278
  {
3242
3279
  "placeholder": "MM/YY",
3243
- "inputType": "text",
3244
- "type": "input"
3280
+ "type": "input",
3281
+ "inputType": "text"
3245
3282
  },
3246
3283
  {
3247
3284
  "type": "input",
3248
- "inputType": "text",
3249
- "placeholder": "CVC"
3285
+ "placeholder": "CVC",
3286
+ "inputType": "text"
3250
3287
  }
3251
- ],
3252
- "type": "stack"
3288
+ ]
3253
3289
  },
3254
3290
  {
3255
- "type": "button",
3256
- "action": "CREATE_PAYMENT",
3291
+ "variant": "primary",
3257
3292
  "label": "Pay now",
3258
- "icon": "credit-card",
3259
- "variant": "primary"
3293
+ "action": "CREATE_PAYMENT",
3294
+ "type": "button",
3295
+ "icon": "credit-card"
3260
3296
  }
3261
3297
  ],
3262
- "direction": "vertical",
3263
- "type": "stack",
3264
- "gap": "md"
3298
+ "type": "stack"
3265
3299
  }
3266
3300
  ]
3267
3301
  ]
@@ -3502,53 +3536,53 @@
3502
3536
  "render-ui",
3503
3537
  "main",
3504
3538
  {
3505
- "type": "stack",
3506
- "direction": "vertical",
3539
+ "className": "max-w-xl mx-auto w-full",
3507
3540
  "children": [
3508
3541
  {
3542
+ "variant": "h2",
3509
3543
  "content": "Checkout",
3510
- "type": "typography",
3511
- "variant": "h2"
3544
+ "type": "typography"
3512
3545
  },
3513
3546
  {
3514
3547
  "currentStep": 0.0,
3515
- "type": "wizard-progress",
3516
3548
  "steps": [
3517
3549
  "Customer Info",
3518
3550
  "Shipping",
3519
3551
  "Payment",
3520
3552
  "Review"
3521
- ]
3553
+ ],
3554
+ "type": "wizard-progress"
3522
3555
  },
3523
3556
  {
3524
3557
  "type": "divider"
3525
3558
  },
3526
3559
  {
3560
+ "content": "Customer Info",
3527
3561
  "type": "typography",
3528
- "variant": "h3",
3529
- "content": "Customer Info"
3562
+ "variant": "h3"
3530
3563
  },
3531
3564
  {
3532
3565
  "submitLabel": "Continue",
3566
+ "showCancel": false,
3533
3567
  "fields": [
3534
3568
  {
3535
- "name": "customerName",
3569
+ "min": 2.0,
3536
3570
  "required": true,
3537
- "min": 2.0
3571
+ "name": "customerName"
3538
3572
  },
3539
3573
  {
3540
- "name": "email",
3574
+ "required": true,
3541
3575
  "type": "email",
3542
- "required": true
3576
+ "name": "email"
3543
3577
  }
3544
3578
  ],
3545
- "showCancel": false,
3546
- "submitEvent": "NEXT",
3547
3579
  "type": "form-section",
3580
+ "submitEvent": "NEXT",
3548
3581
  "mode": "create"
3549
3582
  }
3550
3583
  ],
3551
- "className": "max-w-xl mx-auto w-full",
3584
+ "direction": "vertical",
3585
+ "type": "stack",
3552
3586
  "gap": "lg"
3553
3587
  }
3554
3588
  ]
@@ -3578,51 +3612,51 @@
3578
3612
  "render-ui",
3579
3613
  "main",
3580
3614
  {
3615
+ "direction": "vertical",
3616
+ "type": "stack",
3581
3617
  "gap": "lg",
3582
3618
  "className": "max-w-xl mx-auto w-full",
3583
3619
  "children": [
3584
3620
  {
3621
+ "content": "Checkout",
3585
3622
  "type": "typography",
3586
- "variant": "h2",
3587
- "content": "Checkout"
3623
+ "variant": "h2"
3588
3624
  },
3589
3625
  {
3590
- "type": "wizard-progress",
3591
3626
  "steps": [
3592
3627
  "Customer Info",
3593
3628
  "Shipping",
3594
3629
  "Payment",
3595
3630
  "Review"
3596
3631
  ],
3632
+ "type": "wizard-progress",
3597
3633
  "currentStep": 1.0
3598
3634
  },
3599
3635
  {
3600
3636
  "type": "divider"
3601
3637
  },
3602
3638
  {
3603
- "content": "Shipping Address",
3604
3639
  "variant": "h3",
3640
+ "content": "Shipping Address",
3605
3641
  "type": "typography"
3606
3642
  },
3607
3643
  {
3644
+ "mode": "edit",
3645
+ "submitLabel": "Continue",
3646
+ "type": "form-section",
3608
3647
  "fields": [
3609
3648
  {
3610
- "name": "shippingAddress",
3611
3649
  "min": 5.0,
3650
+ "name": "shippingAddress",
3612
3651
  "required": true
3613
3652
  }
3614
3653
  ],
3615
- "submitLabel": "Continue",
3616
- "mode": "edit",
3654
+ "entity": "@entity",
3617
3655
  "cancelLabel": "Back",
3618
3656
  "submitEvent": "NEXT",
3619
- "type": "form-section",
3620
- "cancelEvent": "PREV",
3621
- "entity": "@entity"
3657
+ "cancelEvent": "PREV"
3622
3658
  }
3623
- ],
3624
- "type": "stack",
3625
- "direction": "vertical"
3659
+ ]
3626
3660
  }
3627
3661
  ]
3628
3662
  ]
@@ -3649,49 +3683,49 @@
3649
3683
  {
3650
3684
  "direction": "vertical",
3651
3685
  "gap": "lg",
3686
+ "type": "stack",
3687
+ "className": "max-w-xl mx-auto w-full",
3652
3688
  "children": [
3653
3689
  {
3654
- "content": "Checkout",
3655
3690
  "variant": "h2",
3691
+ "content": "Checkout",
3656
3692
  "type": "typography"
3657
3693
  },
3658
3694
  {
3695
+ "currentStep": 2.0,
3659
3696
  "type": "wizard-progress",
3660
3697
  "steps": [
3661
3698
  "Customer Info",
3662
3699
  "Shipping",
3663
3700
  "Payment",
3664
3701
  "Review"
3665
- ],
3666
- "currentStep": 2.0
3702
+ ]
3667
3703
  },
3668
3704
  {
3669
3705
  "type": "divider"
3670
3706
  },
3671
3707
  {
3708
+ "type": "typography",
3672
3709
  "variant": "h3",
3673
- "content": "Payment",
3674
- "type": "typography"
3710
+ "content": "Payment"
3675
3711
  },
3676
3712
  "@trait.CheckoutPayment",
3677
3713
  {
3678
- "justify": "start",
3679
3714
  "type": "stack",
3680
3715
  "direction": "horizontal",
3681
- "gap": "sm",
3682
3716
  "children": [
3683
3717
  {
3684
3718
  "variant": "ghost",
3685
- "action": "PREV",
3686
- "icon": "arrow-left",
3687
3719
  "type": "button",
3688
- "label": "Back"
3720
+ "label": "Back",
3721
+ "action": "PREV",
3722
+ "icon": "arrow-left"
3689
3723
  }
3690
- ]
3724
+ ],
3725
+ "gap": "sm",
3726
+ "justify": "start"
3691
3727
  }
3692
- ],
3693
- "type": "stack",
3694
- "className": "max-w-xl mx-auto w-full"
3728
+ ]
3695
3729
  }
3696
3730
  ]
3697
3731
  ]
@@ -3707,13 +3741,12 @@
3707
3741
  {
3708
3742
  "type": "stack",
3709
3743
  "direction": "vertical",
3710
- "gap": "lg",
3711
3744
  "className": "max-w-xl mx-auto w-full",
3712
3745
  "children": [
3713
3746
  {
3714
- "content": "Checkout",
3715
3747
  "type": "typography",
3716
- "variant": "h2"
3748
+ "variant": "h2",
3749
+ "content": "Checkout"
3717
3750
  },
3718
3751
  {
3719
3752
  "steps": [
@@ -3729,31 +3762,32 @@
3729
3762
  "type": "divider"
3730
3763
  },
3731
3764
  {
3765
+ "content": "Customer Info",
3732
3766
  "variant": "h3",
3733
- "type": "typography",
3734
- "content": "Customer Info"
3767
+ "type": "typography"
3735
3768
  },
3736
3769
  {
3737
- "mode": "edit",
3770
+ "type": "form-section",
3771
+ "submitLabel": "Continue",
3772
+ "submitEvent": "NEXT",
3738
3773
  "fields": [
3739
3774
  {
3740
3775
  "name": "customerName",
3741
- "min": 2.0,
3742
- "required": true
3776
+ "required": true,
3777
+ "min": 2.0
3743
3778
  },
3744
3779
  {
3745
- "name": "email",
3746
3780
  "type": "email",
3747
- "required": true
3781
+ "required": true,
3782
+ "name": "email"
3748
3783
  }
3749
3784
  ],
3750
- "submitLabel": "Continue",
3751
- "submitEvent": "NEXT",
3785
+ "showCancel": false,
3752
3786
  "entity": "@entity",
3753
- "type": "form-section",
3754
- "showCancel": false
3787
+ "mode": "edit"
3755
3788
  }
3756
- ]
3789
+ ],
3790
+ "gap": "lg"
3757
3791
  }
3758
3792
  ]
3759
3793
  ]
@@ -3773,134 +3807,134 @@
3773
3807
  "render-ui",
3774
3808
  "main",
3775
3809
  {
3776
- "className": "max-w-xl mx-auto w-full",
3777
3810
  "direction": "vertical",
3778
- "type": "stack",
3779
- "gap": "lg",
3780
3811
  "children": [
3781
3812
  {
3782
- "type": "typography",
3813
+ "content": "Review your order",
3783
3814
  "variant": "h2",
3784
- "content": "Review your order"
3815
+ "type": "typography"
3785
3816
  },
3786
3817
  {
3787
- "currentStep": 3.0,
3788
- "type": "wizard-progress",
3789
3818
  "steps": [
3790
3819
  "Customer Info",
3791
3820
  "Shipping",
3792
3821
  "Payment",
3793
3822
  "Review"
3794
- ]
3823
+ ],
3824
+ "type": "wizard-progress",
3825
+ "currentStep": 3.0
3795
3826
  },
3796
3827
  {
3797
3828
  "type": "divider"
3798
3829
  },
3799
3830
  {
3800
- "type": "stack",
3801
3831
  "children": [
3802
3832
  {
3803
- "justify": "between",
3804
- "gap": "md",
3805
3833
  "type": "stack",
3834
+ "gap": "md",
3806
3835
  "direction": "horizontal",
3807
3836
  "children": [
3808
3837
  {
3809
3838
  "content": "Customer",
3810
- "type": "typography",
3811
- "variant": "caption"
3839
+ "variant": "caption",
3840
+ "type": "typography"
3812
3841
  },
3813
3842
  {
3814
- "content": "@entity.customerName",
3843
+ "variant": "body",
3815
3844
  "type": "typography",
3816
- "variant": "body"
3845
+ "content": "@entity.customerName"
3817
3846
  }
3818
- ]
3847
+ ],
3848
+ "justify": "between"
3819
3849
  },
3820
3850
  {
3821
- "direction": "horizontal",
3822
- "gap": "md",
3823
3851
  "type": "stack",
3824
- "justify": "between",
3852
+ "direction": "horizontal",
3825
3853
  "children": [
3826
3854
  {
3855
+ "variant": "caption",
3827
3856
  "content": "Email",
3828
- "type": "typography",
3829
- "variant": "caption"
3857
+ "type": "typography"
3830
3858
  },
3831
3859
  {
3832
3860
  "variant": "body",
3833
3861
  "type": "typography",
3834
3862
  "content": "@entity.email"
3835
3863
  }
3836
- ]
3864
+ ],
3865
+ "justify": "between",
3866
+ "gap": "md"
3837
3867
  },
3838
3868
  {
3839
- "direction": "horizontal",
3840
- "gap": "md",
3841
3869
  "type": "stack",
3870
+ "gap": "md",
3842
3871
  "justify": "between",
3843
3872
  "children": [
3844
3873
  {
3874
+ "variant": "caption",
3845
3875
  "content": "Shipping",
3846
- "type": "typography",
3847
- "variant": "caption"
3876
+ "type": "typography"
3848
3877
  },
3849
3878
  {
3850
- "content": "@entity.shippingAddress",
3851
3879
  "type": "typography",
3852
- "variant": "body"
3880
+ "variant": "body",
3881
+ "content": "@entity.shippingAddress"
3853
3882
  }
3854
- ]
3883
+ ],
3884
+ "direction": "horizontal"
3855
3885
  },
3856
3886
  {
3857
- "justify": "between",
3858
3887
  "type": "stack",
3888
+ "justify": "between",
3889
+ "direction": "horizontal",
3859
3890
  "children": [
3860
3891
  {
3861
- "variant": "caption",
3862
3892
  "content": "Order total",
3863
- "type": "typography"
3893
+ "type": "typography",
3894
+ "variant": "caption"
3864
3895
  },
3865
3896
  {
3866
- "type": "typography",
3897
+ "variant": "body",
3867
3898
  "content": "@entity.orderTotal",
3868
- "variant": "body"
3899
+ "type": "typography"
3869
3900
  }
3870
3901
  ],
3871
- "direction": "horizontal",
3872
3902
  "gap": "md"
3873
3903
  }
3874
3904
  ],
3875
- "gap": "sm",
3876
- "direction": "vertical"
3905
+ "direction": "vertical",
3906
+ "type": "stack",
3907
+ "gap": "sm"
3877
3908
  },
3878
3909
  {
3879
3910
  "type": "divider"
3880
3911
  },
3881
3912
  {
3882
- "type": "stack",
3883
3913
  "justify": "between",
3914
+ "type": "stack",
3915
+ "direction": "horizontal",
3916
+ "gap": "sm",
3884
3917
  "children": [
3885
3918
  {
3886
- "action": "PREV",
3887
- "variant": "ghost",
3888
3919
  "icon": "arrow-left",
3889
3920
  "type": "button",
3890
- "label": "Back"
3921
+ "label": "Back",
3922
+ "action": "PREV",
3923
+ "variant": "ghost"
3891
3924
  },
3892
3925
  {
3926
+ "label": "Place order",
3893
3927
  "variant": "primary",
3894
3928
  "icon": "check",
3895
3929
  "type": "button",
3896
- "label": "Place order",
3897
3930
  "action": "COMPLETE"
3898
3931
  }
3899
- ],
3900
- "gap": "sm",
3901
- "direction": "horizontal"
3932
+ ]
3902
3933
  }
3903
- ]
3934
+ ],
3935
+ "gap": "lg",
3936
+ "type": "stack",
3937
+ "className": "max-w-xl mx-auto w-full"
3904
3938
  }
3905
3939
  ]
3906
3940
  ]
@@ -3914,49 +3948,49 @@
3914
3948
  "render-ui",
3915
3949
  "main",
3916
3950
  {
3917
- "direction": "vertical",
3918
- "className": "max-w-xl mx-auto w-full",
3919
3951
  "type": "stack",
3920
3952
  "gap": "lg",
3953
+ "direction": "vertical",
3954
+ "className": "max-w-xl mx-auto w-full",
3921
3955
  "children": [
3922
3956
  {
3923
3957
  "content": "Checkout",
3924
- "type": "typography",
3925
- "variant": "h2"
3958
+ "variant": "h2",
3959
+ "type": "typography"
3926
3960
  },
3927
3961
  {
3928
- "currentStep": 1.0,
3962
+ "type": "wizard-progress",
3929
3963
  "steps": [
3930
3964
  "Customer Info",
3931
3965
  "Shipping",
3932
3966
  "Payment",
3933
3967
  "Review"
3934
3968
  ],
3935
- "type": "wizard-progress"
3969
+ "currentStep": 1.0
3936
3970
  },
3937
3971
  {
3938
3972
  "type": "divider"
3939
3973
  },
3940
3974
  {
3941
3975
  "variant": "h3",
3942
- "type": "typography",
3943
- "content": "Shipping Address"
3976
+ "content": "Shipping Address",
3977
+ "type": "typography"
3944
3978
  },
3945
3979
  {
3946
- "submitEvent": "NEXT",
3947
- "submitLabel": "Continue",
3948
3980
  "cancelLabel": "Back",
3949
- "type": "form-section",
3950
- "mode": "edit",
3951
- "entity": "@entity",
3981
+ "cancelEvent": "PREV",
3952
3982
  "fields": [
3953
3983
  {
3954
3984
  "required": true,
3955
- "min": 5.0,
3956
- "name": "shippingAddress"
3985
+ "name": "shippingAddress",
3986
+ "min": 5.0
3957
3987
  }
3958
3988
  ],
3959
- "cancelEvent": "PREV"
3989
+ "submitLabel": "Continue",
3990
+ "type": "form-section",
3991
+ "submitEvent": "NEXT",
3992
+ "mode": "edit",
3993
+ "entity": "@entity"
3960
3994
  }
3961
3995
  ]
3962
3996
  }
@@ -4007,9 +4041,8 @@
4007
4041
  "render-ui",
4008
4042
  "main",
4009
4043
  {
4010
- "gap": "lg",
4011
4044
  "type": "stack",
4012
- "className": "max-w-xl mx-auto w-full py-12",
4045
+ "gap": "lg",
4013
4046
  "align": "center",
4014
4047
  "children": [
4015
4048
  {
@@ -4017,24 +4050,25 @@
4017
4050
  "type": "icon"
4018
4051
  },
4019
4052
  {
4020
- "type": "typography",
4021
4053
  "variant": "h2",
4054
+ "type": "typography",
4022
4055
  "content": "Order placed"
4023
4056
  },
4024
4057
  {
4025
- "type": "typography",
4026
- "color": "muted",
4027
4058
  "content": "Your order is confirmed and on its way.",
4028
- "variant": "body"
4059
+ "variant": "body",
4060
+ "color": "muted",
4061
+ "type": "typography"
4029
4062
  },
4030
4063
  {
4031
- "type": "button",
4032
- "action": "RESTART",
4033
4064
  "variant": "ghost",
4034
4065
  "icon": "rotate-ccw",
4035
- "label": "Start new order"
4066
+ "type": "button",
4067
+ "label": "Start new order",
4068
+ "action": "RESTART"
4036
4069
  }
4037
4070
  ],
4071
+ "className": "max-w-xl mx-auto w-full py-12",
4038
4072
  "direction": "vertical"
4039
4073
  }
4040
4074
  ]
@@ -4049,22 +4083,25 @@
4049
4083
  "render-ui",
4050
4084
  "main",
4051
4085
  {
4086
+ "gap": "lg",
4087
+ "className": "max-w-xl mx-auto w-full",
4052
4088
  "type": "stack",
4089
+ "direction": "vertical",
4053
4090
  "children": [
4054
4091
  {
4055
- "content": "Checkout",
4092
+ "type": "typography",
4056
4093
  "variant": "h2",
4057
- "type": "typography"
4094
+ "content": "Checkout"
4058
4095
  },
4059
4096
  {
4060
4097
  "currentStep": 2.0,
4061
- "type": "wizard-progress",
4062
4098
  "steps": [
4063
4099
  "Customer Info",
4064
4100
  "Shipping",
4065
4101
  "Payment",
4066
4102
  "Review"
4067
- ]
4103
+ ],
4104
+ "type": "wizard-progress"
4068
4105
  },
4069
4106
  {
4070
4107
  "type": "divider"
@@ -4077,23 +4114,20 @@
4077
4114
  "@trait.CheckoutPayment",
4078
4115
  {
4079
4116
  "direction": "horizontal",
4080
- "justify": "start",
4081
4117
  "children": [
4082
4118
  {
4119
+ "variant": "ghost",
4120
+ "label": "Back",
4083
4121
  "action": "PREV",
4084
- "icon": "arrow-left",
4085
4122
  "type": "button",
4086
- "variant": "ghost",
4087
- "label": "Back"
4123
+ "icon": "arrow-left"
4088
4124
  }
4089
4125
  ],
4090
4126
  "type": "stack",
4091
- "gap": "sm"
4127
+ "gap": "sm",
4128
+ "justify": "start"
4092
4129
  }
4093
- ],
4094
- "direction": "vertical",
4095
- "className": "max-w-xl mx-auto w-full",
4096
- "gap": "lg"
4130
+ ]
4097
4131
  }
4098
4132
  ]
4099
4133
  ]
@@ -4132,9 +4166,8 @@
4132
4166
  "render-ui",
4133
4167
  "main",
4134
4168
  {
4169
+ "className": "max-w-xl mx-auto w-full",
4135
4170
  "direction": "vertical",
4136
- "gap": "lg",
4137
- "type": "stack",
4138
4171
  "children": [
4139
4172
  {
4140
4173
  "type": "typography",
@@ -4142,8 +4175,8 @@
4142
4175
  "content": "Checkout"
4143
4176
  },
4144
4177
  {
4145
- "type": "wizard-progress",
4146
4178
  "currentStep": 0.0,
4179
+ "type": "wizard-progress",
4147
4180
  "steps": [
4148
4181
  "Customer Info",
4149
4182
  "Shipping",
@@ -4161,25 +4194,26 @@
4161
4194
  },
4162
4195
  {
4163
4196
  "mode": "create",
4164
- "type": "form-section",
4165
- "showCancel": false,
4197
+ "submitLabel": "Continue",
4166
4198
  "submitEvent": "NEXT",
4199
+ "showCancel": false,
4200
+ "type": "form-section",
4167
4201
  "fields": [
4168
4202
  {
4169
- "min": 2.0,
4170
4203
  "required": true,
4171
- "name": "customerName"
4204
+ "name": "customerName",
4205
+ "min": 2.0
4172
4206
  },
4173
4207
  {
4208
+ "required": true,
4174
4209
  "type": "email",
4175
- "name": "email",
4176
- "required": true
4210
+ "name": "email"
4177
4211
  }
4178
- ],
4179
- "submitLabel": "Continue"
4212
+ ]
4180
4213
  }
4181
4214
  ],
4182
- "className": "max-w-xl mx-auto w-full"
4215
+ "type": "stack",
4216
+ "gap": "lg"
4183
4217
  }
4184
4218
  ]
4185
4219
  ]
@@ -4530,8 +4564,8 @@
4530
4564
  "OrderRecord",
4531
4565
  {
4532
4566
  "emit": {
4533
- "success": "OrderRecordLoaded",
4534
- "failure": "OrderRecordLoadFailed"
4567
+ "failure": "OrderRecordLoadFailed",
4568
+ "success": "OrderRecordLoaded"
4535
4569
  }
4536
4570
  }
4537
4571
  ],
@@ -4540,8 +4574,8 @@
4540
4574
  "main",
4541
4575
  {
4542
4576
  "type": "stack",
4543
- "gap": "md",
4544
4577
  "direction": "vertical",
4578
+ "gap": "md",
4545
4579
  "align": "center",
4546
4580
  "className": "py-12",
4547
4581
  "children": [
@@ -4550,9 +4584,9 @@
4550
4584
  },
4551
4585
  {
4552
4586
  "type": "typography",
4587
+ "variant": "caption",
4553
4588
  "color": "muted",
4554
- "content": "Loading…",
4555
- "variant": "caption"
4589
+ "content": "Loading…"
4556
4590
  }
4557
4591
  ]
4558
4592
  }
@@ -4568,52 +4602,71 @@
4568
4602
  "render-ui",
4569
4603
  "main",
4570
4604
  {
4605
+ "navItems": [
4606
+ {
4607
+ "label": "Products",
4608
+ "href": "/products",
4609
+ "icon": "package"
4610
+ },
4611
+ {
4612
+ "href": "/cart",
4613
+ "icon": "shopping-cart",
4614
+ "label": "Cart"
4615
+ },
4616
+ {
4617
+ "href": "/checkout",
4618
+ "label": "Checkout",
4619
+ "icon": "credit-card"
4620
+ },
4621
+ {
4622
+ "icon": "clipboard-list",
4623
+ "href": "/orders",
4624
+ "label": "Orders"
4625
+ }
4626
+ ],
4627
+ "type": "dashboard-layout",
4571
4628
  "children": [
4572
4629
  {
4573
- "className": "max-w-5xl mx-auto w-full",
4574
- "direction": "vertical",
4575
- "type": "stack",
4576
- "gap": "lg",
4577
4630
  "children": [
4578
4631
  {
4579
4632
  "direction": "horizontal",
4580
- "gap": "md",
4581
4633
  "align": "center",
4634
+ "gap": "md",
4582
4635
  "justify": "between",
4583
- "type": "stack",
4584
4636
  "children": [
4585
4637
  {
4586
4638
  "direction": "horizontal",
4587
4639
  "children": [
4588
4640
  {
4589
- "type": "icon",
4590
- "name": "clipboard-list"
4641
+ "name": "clipboard-list",
4642
+ "type": "icon"
4591
4643
  },
4592
4644
  {
4593
- "content": "Order History",
4594
4645
  "variant": "h2",
4595
- "type": "typography"
4646
+ "type": "typography",
4647
+ "content": "Order History"
4596
4648
  }
4597
4649
  ],
4598
- "align": "center",
4599
4650
  "gap": "sm",
4600
- "type": "stack"
4651
+ "type": "stack",
4652
+ "align": "center"
4601
4653
  },
4602
4654
  {
4655
+ "gap": "sm",
4603
4656
  "direction": "horizontal",
4604
4657
  "type": "stack",
4605
4658
  "children": [
4606
4659
  {
4660
+ "type": "button",
4607
4661
  "action": "CREATE",
4608
4662
  "variant": "primary",
4609
- "label": "Create OrderRecord",
4610
4663
  "icon": "plus",
4611
- "type": "button"
4664
+ "label": "Create OrderRecord"
4612
4665
  }
4613
- ],
4614
- "gap": "sm"
4666
+ ]
4615
4667
  }
4616
- ]
4668
+ ],
4669
+ "type": "stack"
4617
4670
  },
4618
4671
  {
4619
4672
  "type": "divider"
@@ -4622,37 +4675,37 @@
4622
4675
  "itemActions": [
4623
4676
  {
4624
4677
  "variant": "ghost",
4625
- "label": "View",
4626
- "event": "VIEW"
4678
+ "event": "VIEW",
4679
+ "label": "View"
4627
4680
  },
4628
4681
  {
4629
4682
  "event": "EDIT",
4630
- "variant": "ghost",
4631
- "label": "Edit"
4683
+ "label": "Edit",
4684
+ "variant": "ghost"
4632
4685
  },
4633
4686
  {
4687
+ "label": "Delete",
4634
4688
  "event": "DELETE",
4635
- "variant": "danger",
4636
- "label": "Delete"
4689
+ "variant": "danger"
4637
4690
  }
4638
4691
  ],
4639
4692
  "entity": "@payload.data",
4640
4693
  "type": "data-list",
4641
4694
  "fields": [
4642
4695
  {
4696
+ "label": "Customer",
4643
4697
  "variant": "h3",
4644
4698
  "name": "customerName",
4645
- "icon": "clipboard-list",
4646
- "label": "Customer"
4699
+ "icon": "clipboard-list"
4647
4700
  },
4648
4701
  {
4649
- "name": "status",
4650
- "variant": "badge"
4702
+ "variant": "badge",
4703
+ "name": "status"
4651
4704
  },
4652
4705
  {
4653
- "label": "Total",
4654
4706
  "variant": "h4",
4655
4707
  "format": "currency",
4708
+ "label": "Total",
4656
4709
  "name": "orderTotal"
4657
4710
  },
4658
4711
  {
@@ -4660,41 +4713,22 @@
4660
4713
  "variant": "caption"
4661
4714
  },
4662
4715
  {
4663
- "name": "shippingAddress",
4664
4716
  "label": "Address",
4665
- "variant": "caption"
4717
+ "variant": "caption",
4718
+ "name": "shippingAddress"
4666
4719
  }
4667
4720
  ],
4668
4721
  "variant": "card",
4669
4722
  "gap": "sm"
4670
4723
  }
4671
- ]
4724
+ ],
4725
+ "type": "stack",
4726
+ "direction": "vertical",
4727
+ "gap": "lg",
4728
+ "className": "max-w-5xl mx-auto w-full"
4672
4729
  }
4673
4730
  ],
4674
- "appName": "EcommerceApp",
4675
- "type": "dashboard-layout",
4676
- "navItems": [
4677
- {
4678
- "label": "Products",
4679
- "href": "/products",
4680
- "icon": "package"
4681
- },
4682
- {
4683
- "icon": "shopping-cart",
4684
- "label": "Cart",
4685
- "href": "/cart"
4686
- },
4687
- {
4688
- "icon": "credit-card",
4689
- "label": "Checkout",
4690
- "href": "/checkout"
4691
- },
4692
- {
4693
- "href": "/orders",
4694
- "label": "Orders",
4695
- "icon": "clipboard-list"
4696
- }
4697
- ]
4731
+ "appName": "EcommerceApp"
4698
4732
  }
4699
4733
  ]
4700
4734
  ]
@@ -4708,10 +4742,6 @@
4708
4742
  "render-ui",
4709
4743
  "main",
4710
4744
  {
4711
- "gap": "md",
4712
- "type": "stack",
4713
- "align": "center",
4714
- "className": "py-12",
4715
4745
  "children": [
4716
4746
  {
4717
4747
  "color": "destructive",
@@ -4720,24 +4750,28 @@
4720
4750
  },
4721
4751
  {
4722
4752
  "content": "Failed to load orderrecord",
4723
- "type": "typography",
4724
- "variant": "h3"
4753
+ "variant": "h3",
4754
+ "type": "typography"
4725
4755
  },
4726
4756
  {
4757
+ "type": "typography",
4727
4758
  "content": "@payload.error",
4728
4759
  "variant": "body",
4729
- "type": "typography",
4730
4760
  "color": "muted"
4731
4761
  },
4732
4762
  {
4733
- "type": "button",
4734
4763
  "action": "INIT",
4735
- "label": "Retry",
4764
+ "type": "button",
4736
4765
  "variant": "primary",
4737
- "icon": "rotate-ccw"
4766
+ "icon": "rotate-ccw",
4767
+ "label": "Retry"
4738
4768
  }
4739
4769
  ],
4740
- "direction": "vertical"
4770
+ "align": "center",
4771
+ "direction": "vertical",
4772
+ "type": "stack",
4773
+ "gap": "md",
4774
+ "className": "py-12"
4741
4775
  }
4742
4776
  ]
4743
4777
  ]
@@ -4929,8 +4963,8 @@
4929
4963
  "OrderRecord",
4930
4964
  {
4931
4965
  "emit": {
4932
- "success": "OrderRecordLoaded",
4933
- "failure": "OrderRecordLoadFailed"
4966
+ "failure": "OrderRecordLoadFailed",
4967
+ "success": "OrderRecordLoaded"
4934
4968
  }
4935
4969
  }
4936
4970
  ],
@@ -4938,31 +4972,30 @@
4938
4972
  "render-ui",
4939
4973
  "modal",
4940
4974
  {
4941
- "direction": "vertical",
4975
+ "type": "stack",
4976
+ "gap": "md",
4942
4977
  "children": [
4943
4978
  {
4944
- "gap": "sm",
4945
4979
  "type": "stack",
4946
4980
  "direction": "horizontal",
4947
4981
  "children": [
4948
4982
  {
4949
- "type": "icon",
4950
- "name": "plus-circle"
4983
+ "name": "plus-circle",
4984
+ "type": "icon"
4951
4985
  },
4952
4986
  {
4953
4987
  "variant": "h3",
4954
4988
  "type": "typography",
4955
4989
  "content": "Create OrderRecord"
4956
4990
  }
4957
- ]
4991
+ ],
4992
+ "gap": "sm"
4958
4993
  },
4959
4994
  {
4960
4995
  "type": "divider"
4961
4996
  },
4962
4997
  {
4963
4998
  "mode": "create",
4964
- "type": "form-section",
4965
- "submitEvent": "SAVE",
4966
4999
  "fields": [
4967
5000
  "customerName",
4968
5001
  "email",
@@ -4971,11 +5004,12 @@
4971
5004
  "orderTotal",
4972
5005
  "status"
4973
5006
  ],
4974
- "cancelEvent": "CLOSE"
5007
+ "cancelEvent": "CLOSE",
5008
+ "submitEvent": "SAVE",
5009
+ "type": "form-section"
4975
5010
  }
4976
5011
  ],
4977
- "type": "stack",
4978
- "gap": "md"
5012
+ "direction": "vertical"
4979
5013
  }
4980
5014
  ]
4981
5015
  ]
@@ -5245,8 +5279,8 @@
5245
5279
  {
5246
5280
  "id": "@payload.id",
5247
5281
  "emit": {
5248
- "success": "OrderRecordLoaded",
5249
- "failure": "OrderRecordLoadFailed"
5282
+ "failure": "OrderRecordLoadFailed",
5283
+ "success": "OrderRecordLoaded"
5250
5284
  }
5251
5285
  }
5252
5286
  ],
@@ -5254,29 +5288,31 @@
5254
5288
  "render-ui",
5255
5289
  "modal",
5256
5290
  {
5291
+ "direction": "vertical",
5257
5292
  "children": [
5258
5293
  {
5259
- "direction": "horizontal",
5260
- "gap": "sm",
5261
- "type": "stack",
5262
5294
  "children": [
5263
5295
  {
5264
5296
  "type": "icon",
5265
5297
  "name": "edit"
5266
5298
  },
5267
5299
  {
5268
- "variant": "h3",
5269
5300
  "type": "typography",
5270
- "content": "Edit OrderRecord"
5301
+ "content": "Edit OrderRecord",
5302
+ "variant": "h3"
5271
5303
  }
5272
- ]
5304
+ ],
5305
+ "direction": "horizontal",
5306
+ "gap": "sm",
5307
+ "type": "stack"
5273
5308
  },
5274
5309
  {
5275
5310
  "type": "divider"
5276
5311
  },
5277
5312
  {
5278
- "entity": "@payload.row",
5313
+ "type": "form-section",
5279
5314
  "cancelEvent": "CLOSE",
5315
+ "mode": "edit",
5280
5316
  "fields": [
5281
5317
  "customerName",
5282
5318
  "email",
@@ -5285,14 +5321,12 @@
5285
5321
  "orderTotal",
5286
5322
  "status"
5287
5323
  ],
5288
- "submitEvent": "SAVE",
5289
- "mode": "edit",
5290
- "type": "form-section"
5324
+ "entity": "@payload.row",
5325
+ "submitEvent": "SAVE"
5291
5326
  }
5292
5327
  ],
5293
- "type": "stack",
5294
- "direction": "vertical",
5295
- "gap": "md"
5328
+ "gap": "md",
5329
+ "type": "stack"
5296
5330
  }
5297
5331
  ]
5298
5332
  ]
@@ -5333,8 +5367,8 @@
5333
5367
  "@payload.data",
5334
5368
  {
5335
5369
  "emit": {
5336
- "failure": "OrderRecordUpdateFailed",
5337
- "success": "OrderRecordUpdated"
5370
+ "success": "OrderRecordUpdated",
5371
+ "failure": "OrderRecordUpdateFailed"
5338
5372
  }
5339
5373
  }
5340
5374
  ],
@@ -5433,6 +5467,10 @@
5433
5467
  {
5434
5468
  "name": "id",
5435
5469
  "type": "string"
5470
+ },
5471
+ {
5472
+ "name": "row",
5473
+ "type": "OrderRecord"
5436
5474
  }
5437
5475
  ]
5438
5476
  },
@@ -5514,8 +5552,8 @@
5514
5552
  "OrderRecord",
5515
5553
  {
5516
5554
  "emit": {
5517
- "success": "OrderRecordLoaded",
5518
- "failure": "OrderRecordLoadFailed"
5555
+ "failure": "OrderRecordLoadFailed",
5556
+ "success": "OrderRecordLoaded"
5519
5557
  }
5520
5558
  }
5521
5559
  ]
@@ -5526,6 +5564,36 @@
5526
5564
  "to": "open",
5527
5565
  "event": "VIEW",
5528
5566
  "effects": [
5567
+ [
5568
+ "set",
5569
+ "@entity.customerName",
5570
+ "@payload.row.customerName"
5571
+ ],
5572
+ [
5573
+ "set",
5574
+ "@entity.email",
5575
+ "@payload.row.email"
5576
+ ],
5577
+ [
5578
+ "set",
5579
+ "@entity.shippingAddress",
5580
+ "@payload.row.shippingAddress"
5581
+ ],
5582
+ [
5583
+ "set",
5584
+ "@entity.paymentMethod",
5585
+ "@payload.row.paymentMethod"
5586
+ ],
5587
+ [
5588
+ "set",
5589
+ "@entity.orderTotal",
5590
+ "@payload.row.orderTotal"
5591
+ ],
5592
+ [
5593
+ "set",
5594
+ "@entity.status",
5595
+ "@payload.row.status"
5596
+ ],
5529
5597
  [
5530
5598
  "fetch",
5531
5599
  "OrderRecord",
@@ -5542,12 +5610,15 @@
5542
5610
  "modal",
5543
5611
  {
5544
5612
  "gap": "md",
5613
+ "type": "stack",
5545
5614
  "children": [
5546
5615
  {
5616
+ "gap": "sm",
5617
+ "type": "stack",
5547
5618
  "children": [
5548
5619
  {
5549
- "type": "icon",
5550
- "name": "eye"
5620
+ "name": "eye",
5621
+ "type": "icon"
5551
5622
  },
5552
5623
  {
5553
5624
  "type": "typography",
@@ -5555,8 +5626,6 @@
5555
5626
  "content": "@entity.customerName"
5556
5627
  }
5557
5628
  ],
5558
- "type": "stack",
5559
- "gap": "sm",
5560
5629
  "align": "center",
5561
5630
  "direction": "horizontal"
5562
5631
  },
@@ -5564,40 +5633,42 @@
5564
5633
  "type": "divider"
5565
5634
  },
5566
5635
  {
5567
- "direction": "horizontal",
5568
- "type": "stack",
5569
5636
  "gap": "md",
5637
+ "type": "stack",
5570
5638
  "children": [
5571
5639
  {
5572
- "type": "typography",
5573
5640
  "variant": "caption",
5641
+ "type": "typography",
5574
5642
  "content": "Customer Name"
5575
5643
  },
5576
5644
  {
5577
- "variant": "body",
5645
+ "content": "@entity.customerName",
5578
5646
  "type": "typography",
5579
- "content": "@entity.customerName"
5647
+ "variant": "body"
5580
5648
  }
5581
- ]
5649
+ ],
5650
+ "direction": "horizontal"
5582
5651
  },
5583
5652
  {
5653
+ "gap": "md",
5584
5654
  "type": "stack",
5655
+ "direction": "horizontal",
5585
5656
  "children": [
5586
5657
  {
5587
5658
  "type": "typography",
5588
- "content": "Email",
5589
- "variant": "caption"
5659
+ "variant": "caption",
5660
+ "content": "Email"
5590
5661
  },
5591
5662
  {
5592
5663
  "content": "@entity.email",
5593
- "variant": "body",
5594
- "type": "typography"
5664
+ "type": "typography",
5665
+ "variant": "body"
5595
5666
  }
5596
- ],
5597
- "direction": "horizontal",
5598
- "gap": "md"
5667
+ ]
5599
5668
  },
5600
5669
  {
5670
+ "direction": "horizontal",
5671
+ "gap": "md",
5601
5672
  "children": [
5602
5673
  {
5603
5674
  "content": "Shipping Address",
@@ -5606,23 +5677,21 @@
5606
5677
  },
5607
5678
  {
5608
5679
  "variant": "body",
5609
- "content": "@entity.shippingAddress",
5610
- "type": "typography"
5680
+ "type": "typography",
5681
+ "content": "@entity.shippingAddress"
5611
5682
  }
5612
5683
  ],
5613
- "type": "stack",
5614
- "direction": "horizontal",
5615
- "gap": "md"
5684
+ "type": "stack"
5616
5685
  },
5617
5686
  {
5618
- "gap": "md",
5619
- "direction": "horizontal",
5620
5687
  "type": "stack",
5688
+ "direction": "horizontal",
5689
+ "gap": "md",
5621
5690
  "children": [
5622
5691
  {
5623
- "type": "typography",
5692
+ "content": "Payment Method",
5624
5693
  "variant": "caption",
5625
- "content": "Payment Method"
5694
+ "type": "typography"
5626
5695
  },
5627
5696
  {
5628
5697
  "type": "typography",
@@ -5633,24 +5702,24 @@
5633
5702
  },
5634
5703
  {
5635
5704
  "direction": "horizontal",
5636
- "type": "stack",
5637
5705
  "children": [
5638
5706
  {
5639
- "variant": "caption",
5640
5707
  "content": "Order Total",
5708
+ "variant": "caption",
5641
5709
  "type": "typography"
5642
5710
  },
5643
5711
  {
5644
5712
  "variant": "body",
5645
- "content": "@entity.orderTotal",
5646
- "type": "typography"
5713
+ "type": "typography",
5714
+ "content": "@entity.orderTotal"
5647
5715
  }
5648
5716
  ],
5717
+ "type": "stack",
5649
5718
  "gap": "md"
5650
5719
  },
5651
5720
  {
5721
+ "type": "stack",
5652
5722
  "direction": "horizontal",
5653
- "gap": "md",
5654
5723
  "children": [
5655
5724
  {
5656
5725
  "type": "typography",
@@ -5658,40 +5727,39 @@
5658
5727
  "content": "Status"
5659
5728
  },
5660
5729
  {
5661
- "type": "typography",
5662
5730
  "variant": "body",
5663
- "content": "@entity.status"
5731
+ "content": "@entity.status",
5732
+ "type": "typography"
5664
5733
  }
5665
5734
  ],
5666
- "type": "stack"
5735
+ "gap": "md"
5667
5736
  },
5668
5737
  {
5669
5738
  "type": "divider"
5670
5739
  },
5671
5740
  {
5741
+ "type": "stack",
5742
+ "direction": "horizontal",
5672
5743
  "justify": "end",
5673
5744
  "gap": "sm",
5674
- "direction": "horizontal",
5675
- "type": "stack",
5676
5745
  "children": [
5677
5746
  {
5747
+ "label": "Edit",
5678
5748
  "type": "button",
5679
5749
  "action": "EDIT",
5680
- "variant": "primary",
5681
5750
  "icon": "edit",
5682
- "label": "Edit"
5751
+ "variant": "primary"
5683
5752
  },
5684
5753
  {
5685
- "action": "CLOSE",
5686
- "type": "button",
5754
+ "variant": "ghost",
5687
5755
  "label": "Close",
5688
- "variant": "ghost"
5756
+ "type": "button",
5757
+ "action": "CLOSE"
5689
5758
  }
5690
5759
  ]
5691
5760
  }
5692
5761
  ],
5693
- "direction": "vertical",
5694
- "type": "stack"
5762
+ "direction": "vertical"
5695
5763
  }
5696
5764
  ]
5697
5765
  ]
@@ -5936,8 +6004,8 @@
5936
6004
  {
5937
6005
  "id": "@payload.id",
5938
6006
  "emit": {
5939
- "success": "OrderRecordLoaded",
5940
- "failure": "OrderRecordLoadFailed"
6007
+ "failure": "OrderRecordLoadFailed",
6008
+ "success": "OrderRecordLoaded"
5941
6009
  }
5942
6010
  }
5943
6011
  ],
@@ -5945,20 +6013,21 @@
5945
6013
  "render-ui",
5946
6014
  "modal",
5947
6015
  {
6016
+ "gap": "md",
5948
6017
  "children": [
5949
6018
  {
5950
- "type": "stack",
5951
6019
  "direction": "horizontal",
5952
- "align": "center",
5953
6020
  "gap": "sm",
6021
+ "type": "stack",
6022
+ "align": "center",
5954
6023
  "children": [
5955
6024
  {
5956
6025
  "name": "alert-triangle",
5957
6026
  "type": "icon"
5958
6027
  },
5959
6028
  {
5960
- "content": "Delete OrderRecord",
5961
6029
  "variant": "h3",
6030
+ "content": "Delete OrderRecord",
5962
6031
  "type": "typography"
5963
6032
  }
5964
6033
  ]
@@ -5967,35 +6036,34 @@
5967
6036
  "type": "divider"
5968
6037
  },
5969
6038
  {
5970
- "message": "This action cannot be undone.",
5971
6039
  "variant": "error",
6040
+ "message": "This action cannot be undone.",
5972
6041
  "type": "alert"
5973
6042
  },
5974
6043
  {
5975
6044
  "type": "stack",
5976
- "direction": "horizontal",
5977
- "gap": "sm",
5978
- "justify": "end",
5979
6045
  "children": [
5980
6046
  {
5981
6047
  "label": "Cancel",
5982
6048
  "action": "CANCEL",
5983
- "variant": "ghost",
5984
- "type": "button"
6049
+ "type": "button",
6050
+ "variant": "ghost"
5985
6051
  },
5986
6052
  {
5987
- "type": "button",
5988
- "label": "Delete",
5989
6053
  "variant": "danger",
6054
+ "label": "Delete",
6055
+ "icon": "check",
5990
6056
  "action": "CONFIRM_DELETE",
5991
- "icon": "check"
6057
+ "type": "button"
5992
6058
  }
5993
- ]
6059
+ ],
6060
+ "gap": "sm",
6061
+ "justify": "end",
6062
+ "direction": "horizontal"
5994
6063
  }
5995
6064
  ],
5996
- "gap": "md",
5997
- "type": "stack",
5998
- "direction": "vertical"
6065
+ "direction": "vertical",
6066
+ "type": "stack"
5999
6067
  }
6000
6068
  ]
6001
6069
  ]
@@ -6012,8 +6080,8 @@
6012
6080
  "@entity.pendingId",
6013
6081
  {
6014
6082
  "emit": {
6015
- "success": "OrderRecordDeleted",
6016
- "failure": "OrderRecordDeleteFailed"
6083
+ "failure": "OrderRecordDeleteFailed",
6084
+ "success": "OrderRecordDeleted"
6017
6085
  }
6018
6086
  }
6019
6087
  ],
@@ -6034,8 +6102,8 @@
6034
6102
  "OrderRecord",
6035
6103
  {
6036
6104
  "emit": {
6037
- "success": "OrderRecordLoaded",
6038
- "failure": "OrderRecordLoadFailed"
6105
+ "failure": "OrderRecordLoadFailed",
6106
+ "success": "OrderRecordLoaded"
6039
6107
  }
6040
6108
  }
6041
6109
  ],
@@ -6067,8 +6135,8 @@
6067
6135
  "OrderRecord",
6068
6136
  {
6069
6137
  "emit": {
6070
- "success": "OrderRecordLoaded",
6071
- "failure": "OrderRecordLoadFailed"
6138
+ "failure": "OrderRecordLoadFailed",
6139
+ "success": "OrderRecordLoaded"
6072
6140
  }
6073
6141
  }
6074
6142
  ]