@almadar/std 14.7.0 → 14.7.2

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,20 +69,26 @@
69
69
  "ref": "AppShell.traits.AppLayout",
70
70
  "name": "ProductAppLayout",
71
71
  "config": {
72
- "contentTrait": "@trait.ProductCatalog",
73
- "searchEvent": "PRODUCT_SEARCH",
74
72
  "notifications": [],
75
- "appName": "EcommerceApp",
76
73
  "notificationClickEvent": "PRODUCT_NOTIFICATIONS_OPEN",
74
+ "topBarActions": [
75
+ {
76
+ "icon": "shopping-cart",
77
+ "event": "CART_OPEN",
78
+ "label": "Cart"
79
+ }
80
+ ],
81
+ "contentTrait": "@trait.ProductCatalog",
82
+ "appName": "EcommerceApp",
77
83
  "navItems": [
78
84
  {
79
- "href": "/products",
85
+ "label": "Products",
80
86
  "icon": "package",
81
- "label": "Products"
87
+ "href": "/products"
82
88
  },
83
89
  {
84
- "label": "Cart",
85
90
  "href": "/cart",
91
+ "label": "Cart",
86
92
  "icon": "shopping-cart"
87
93
  },
88
94
  {
@@ -91,22 +97,16 @@
91
97
  "icon": "credit-card"
92
98
  },
93
99
  {
94
- "href": "/orders",
100
+ "label": "Orders",
95
101
  "icon": "clipboard-list",
96
- "label": "Orders"
102
+ "href": "/orders"
97
103
  }
98
104
  ],
99
- "topBarActions": [
100
- {
101
- "icon": "shopping-cart",
102
- "event": "CART_OPEN",
103
- "label": "Cart"
104
- }
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
  {
@@ -189,53 +189,53 @@
189
189
  "render-ui",
190
190
  "main",
191
191
  {
192
- "gap": "lg",
193
192
  "children": [
194
193
  {
195
- "align": "center",
196
194
  "gap": "md",
197
195
  "type": "stack",
196
+ "direction": "horizontal",
197
+ "justify": "between",
198
+ "align": "center",
198
199
  "children": [
199
200
  {
201
+ "direction": "horizontal",
202
+ "type": "stack",
200
203
  "children": [
201
204
  {
202
205
  "type": "icon",
203
206
  "name": "package"
204
207
  },
205
208
  {
206
- "content": "Products",
207
209
  "type": "typography",
210
+ "content": "Products",
208
211
  "variant": "h2"
209
212
  }
210
213
  ],
211
- "align": "center",
212
- "direction": "horizontal",
213
- "type": "stack",
214
- "gap": "sm"
214
+ "gap": "sm",
215
+ "align": "center"
215
216
  },
216
217
  {
218
+ "type": "stack",
217
219
  "gap": "sm",
220
+ "direction": "horizontal",
218
221
  "children": [
219
222
  {
220
- "type": "button",
221
- "label": "Create Product",
222
223
  "variant": "primary",
224
+ "label": "Create Product",
225
+ "action": "CREATE",
223
226
  "icon": "plus",
224
- "action": "CREATE"
227
+ "type": "button"
225
228
  }
226
- ],
227
- "type": "stack",
228
- "direction": "horizontal"
229
+ ]
229
230
  }
230
- ],
231
- "direction": "horizontal",
232
- "justify": "between"
231
+ ]
233
232
  },
234
233
  {
235
234
  "type": "divider"
236
235
  },
237
236
  "@trait.ProductBrowseList"
238
237
  ],
238
+ "gap": "lg",
239
239
  "direction": "vertical",
240
240
  "type": "stack"
241
241
  }
@@ -256,34 +256,34 @@
256
256
  "render-ui",
257
257
  "main",
258
258
  {
259
+ "align": "center",
259
260
  "className": "py-8",
261
+ "gap": "md",
260
262
  "children": [
261
263
  {
262
- "type": "icon",
263
- "name": "bell"
264
+ "name": "bell",
265
+ "type": "icon"
264
266
  },
265
267
  {
268
+ "variant": "h3",
266
269
  "content": "No notifications",
267
- "type": "typography",
268
- "variant": "h3"
270
+ "type": "typography"
269
271
  },
270
272
  {
271
- "type": "typography",
272
273
  "content": "You're all caught up.",
273
274
  "variant": "caption",
274
- "color": "muted"
275
+ "color": "muted",
276
+ "type": "typography"
275
277
  },
276
278
  {
277
- "label": "Back to products",
278
- "action": "INIT",
279
279
  "type": "button",
280
- "variant": "ghost"
280
+ "variant": "ghost",
281
+ "label": "Back to products",
282
+ "action": "INIT"
281
283
  }
282
284
  ],
283
- "gap": "md",
284
285
  "type": "stack",
285
- "direction": "vertical",
286
- "align": "center"
286
+ "direction": "vertical"
287
287
  }
288
288
  ]
289
289
  ]
@@ -297,20 +297,19 @@
297
297
  "name": "ProductBrowseList",
298
298
  "linkedEntity": "Product",
299
299
  "config": {
300
- "imageField": "imageUrl",
301
300
  "fields": [
302
301
  {
303
- "name": "name",
304
302
  "variant": "h3",
303
+ "name": "name",
305
304
  "icon": "package"
306
305
  },
307
306
  {
308
- "name": "category",
309
- "variant": "badge"
307
+ "variant": "badge",
308
+ "name": "category"
310
309
  },
311
310
  {
312
- "variant": "h4",
313
311
  "name": "price",
312
+ "variant": "h4",
314
313
  "format": "currency"
315
314
  },
316
315
  {
@@ -318,31 +317,32 @@
318
317
  "variant": "caption"
319
318
  },
320
319
  {
321
- "format": "boolean",
322
- "name": "inStock",
320
+ "label": "In Stock",
323
321
  "variant": "body",
324
- "label": "In Stock"
322
+ "name": "inStock",
323
+ "format": "boolean"
325
324
  }
326
325
  ],
327
- "cols": 3.0,
326
+ "imageField": "imageUrl",
328
327
  "gap": "md",
329
328
  "itemActions": [
330
329
  {
331
- "label": "View",
332
330
  "event": "VIEW",
333
- "variant": "ghost"
331
+ "variant": "ghost",
332
+ "label": "View"
334
333
  },
335
334
  {
336
- "variant": "ghost",
337
335
  "event": "EDIT",
336
+ "variant": "ghost",
338
337
  "label": "Edit"
339
338
  },
340
339
  {
340
+ "variant": "danger",
341
341
  "label": "Delete",
342
- "event": "DELETE",
343
- "variant": "danger"
342
+ "event": "DELETE"
344
343
  }
345
- ]
344
+ ],
345
+ "cols": 3.0
346
346
  },
347
347
  "listens": [
348
348
  {
@@ -562,8 +562,8 @@
562
562
  "Product",
563
563
  {
564
564
  "emit": {
565
- "success": "ProductLoaded",
566
- "failure": "ProductLoadFailed"
565
+ "failure": "ProductLoadFailed",
566
+ "success": "ProductLoaded"
567
567
  }
568
568
  }
569
569
  ],
@@ -572,27 +572,30 @@
572
572
  "modal",
573
573
  {
574
574
  "direction": "vertical",
575
+ "gap": "md",
576
+ "type": "stack",
575
577
  "children": [
576
578
  {
577
579
  "gap": "sm",
578
580
  "direction": "horizontal",
579
- "type": "stack",
580
581
  "children": [
581
582
  {
582
583
  "name": "plus-circle",
583
584
  "type": "icon"
584
585
  },
585
586
  {
586
- "type": "typography",
587
587
  "variant": "h3",
588
+ "type": "typography",
588
589
  "content": "Create Product"
589
590
  }
590
- ]
591
+ ],
592
+ "type": "stack"
591
593
  },
592
594
  {
593
595
  "type": "divider"
594
596
  },
595
597
  {
598
+ "submitEvent": "SAVE",
596
599
  "cancelEvent": "CLOSE",
597
600
  "fields": [
598
601
  "name",
@@ -603,12 +606,9 @@
603
606
  "inStock"
604
607
  ],
605
608
  "mode": "create",
606
- "type": "form-section",
607
- "submitEvent": "SAVE"
609
+ "type": "form-section"
608
610
  }
609
- ],
610
- "gap": "md",
611
- "type": "stack"
611
+ ]
612
612
  }
613
613
  ]
614
614
  ]
@@ -885,21 +885,24 @@
885
885
  "fetch",
886
886
  "Product",
887
887
  {
888
+ "id": "@payload.id",
888
889
  "emit": {
889
890
  "failure": "ProductLoadFailed",
890
891
  "success": "ProductLoaded"
891
- },
892
- "id": "@payload.id"
892
+ }
893
893
  }
894
894
  ],
895
895
  [
896
896
  "render-ui",
897
897
  "modal",
898
898
  {
899
- "type": "stack",
899
+ "gap": "md",
900
900
  "direction": "vertical",
901
901
  "children": [
902
902
  {
903
+ "direction": "horizontal",
904
+ "gap": "sm",
905
+ "type": "stack",
903
906
  "children": [
904
907
  {
905
908
  "name": "edit",
@@ -907,20 +910,17 @@
907
910
  },
908
911
  {
909
912
  "type": "typography",
910
- "variant": "h3",
911
- "content": "Edit Product"
913
+ "content": "Edit Product",
914
+ "variant": "h3"
912
915
  }
913
- ],
914
- "type": "stack",
915
- "direction": "horizontal",
916
- "gap": "sm"
916
+ ]
917
917
  },
918
918
  {
919
919
  "type": "divider"
920
920
  },
921
921
  {
922
- "type": "form-section",
923
922
  "submitEvent": "SAVE",
923
+ "cancelEvent": "CLOSE",
924
924
  "fields": [
925
925
  "name",
926
926
  "description",
@@ -929,12 +929,12 @@
929
929
  "sku",
930
930
  "inStock"
931
931
  ],
932
+ "type": "form-section",
932
933
  "entity": "@payload.row",
933
- "cancelEvent": "CLOSE",
934
934
  "mode": "edit"
935
935
  }
936
936
  ],
937
- "gap": "md"
937
+ "type": "stack"
938
938
  }
939
939
  ]
940
940
  ]
@@ -1180,19 +1180,21 @@
1180
1180
  "fetch",
1181
1181
  "Product",
1182
1182
  {
1183
+ "id": "@payload.id",
1183
1184
  "emit": {
1184
- "failure": "ProductLoadFailed",
1185
- "success": "ProductLoaded"
1186
- },
1187
- "id": "@payload.id"
1185
+ "success": "ProductLoaded",
1186
+ "failure": "ProductLoadFailed"
1187
+ }
1188
1188
  }
1189
1189
  ],
1190
1190
  [
1191
1191
  "render-ui",
1192
1192
  "modal",
1193
1193
  {
1194
+ "gap": "md",
1194
1195
  "children": [
1195
1196
  {
1197
+ "gap": "sm",
1196
1198
  "children": [
1197
1199
  {
1198
1200
  "type": "icon",
@@ -1200,42 +1202,42 @@
1200
1202
  },
1201
1203
  {
1202
1204
  "variant": "h3",
1203
- "content": "@entity.name",
1204
- "type": "typography"
1205
+ "type": "typography",
1206
+ "content": "@entity.name"
1205
1207
  }
1206
1208
  ],
1207
- "type": "stack",
1208
- "gap": "sm",
1209
1209
  "align": "center",
1210
- "direction": "horizontal"
1210
+ "direction": "horizontal",
1211
+ "type": "stack"
1211
1212
  },
1212
1213
  {
1213
1214
  "type": "divider"
1214
1215
  },
1215
1216
  {
1216
1217
  "type": "stack",
1217
- "gap": "md",
1218
- "direction": "horizontal",
1219
1218
  "children": [
1220
1219
  {
1221
- "variant": "caption",
1222
1220
  "content": "Name",
1223
- "type": "typography"
1221
+ "type": "typography",
1222
+ "variant": "caption"
1224
1223
  },
1225
1224
  {
1226
1225
  "type": "typography",
1227
1226
  "variant": "body",
1228
1227
  "content": "@entity.name"
1229
1228
  }
1230
- ]
1229
+ ],
1230
+ "direction": "horizontal",
1231
+ "gap": "md"
1231
1232
  },
1232
1233
  {
1233
1234
  "direction": "horizontal",
1235
+ "gap": "md",
1234
1236
  "children": [
1235
1237
  {
1236
1238
  "variant": "caption",
1237
- "content": "Description",
1238
- "type": "typography"
1239
+ "type": "typography",
1240
+ "content": "Description"
1239
1241
  },
1240
1242
  {
1241
1243
  "content": "@entity.description",
@@ -1243,42 +1245,41 @@
1243
1245
  "variant": "body"
1244
1246
  }
1245
1247
  ],
1246
- "type": "stack",
1247
- "gap": "md"
1248
+ "type": "stack"
1248
1249
  },
1249
1250
  {
1251
+ "gap": "md",
1252
+ "type": "stack",
1253
+ "direction": "horizontal",
1250
1254
  "children": [
1251
1255
  {
1252
- "type": "typography",
1253
1256
  "variant": "caption",
1254
- "content": "Price"
1257
+ "content": "Price",
1258
+ "type": "typography"
1255
1259
  },
1256
1260
  {
1261
+ "type": "typography",
1257
1262
  "variant": "body",
1258
- "content": "@entity.price",
1259
- "type": "typography"
1263
+ "content": "@entity.price"
1260
1264
  }
1261
- ],
1262
- "type": "stack",
1263
- "direction": "horizontal",
1264
- "gap": "md"
1265
+ ]
1265
1266
  },
1266
1267
  {
1267
1268
  "type": "stack",
1268
1269
  "direction": "horizontal",
1270
+ "gap": "md",
1269
1271
  "children": [
1270
1272
  {
1271
1273
  "type": "typography",
1272
- "content": "Category",
1273
- "variant": "caption"
1274
+ "variant": "caption",
1275
+ "content": "Category"
1274
1276
  },
1275
1277
  {
1276
1278
  "variant": "body",
1277
1279
  "type": "typography",
1278
1280
  "content": "@entity.category"
1279
1281
  }
1280
- ],
1281
- "gap": "md"
1282
+ ]
1282
1283
  },
1283
1284
  {
1284
1285
  "children": [
@@ -1288,9 +1289,9 @@
1288
1289
  "type": "typography"
1289
1290
  },
1290
1291
  {
1292
+ "content": "@entity.sku",
1291
1293
  "variant": "body",
1292
- "type": "typography",
1293
- "content": "@entity.sku"
1294
+ "type": "typography"
1294
1295
  }
1295
1296
  ],
1296
1297
  "type": "stack",
@@ -1298,19 +1299,19 @@
1298
1299
  "direction": "horizontal"
1299
1300
  },
1300
1301
  {
1301
- "type": "stack",
1302
1302
  "direction": "horizontal",
1303
+ "type": "stack",
1303
1304
  "gap": "md",
1304
1305
  "children": [
1305
1306
  {
1306
- "variant": "caption",
1307
1307
  "type": "typography",
1308
+ "variant": "caption",
1308
1309
  "content": "In Stock"
1309
1310
  },
1310
1311
  {
1311
1312
  "type": "typography",
1312
- "content": "@entity.inStock",
1313
- "variant": "body"
1313
+ "variant": "body",
1314
+ "content": "@entity.inStock"
1314
1315
  }
1315
1316
  ]
1316
1317
  },
@@ -1324,22 +1325,21 @@
1324
1325
  "gap": "sm",
1325
1326
  "children": [
1326
1327
  {
1327
- "variant": "primary",
1328
+ "type": "button",
1328
1329
  "icon": "edit",
1329
1330
  "action": "EDIT",
1330
- "type": "button",
1331
+ "variant": "primary",
1331
1332
  "label": "Edit"
1332
1333
  },
1333
1334
  {
1334
- "variant": "ghost",
1335
- "type": "button",
1336
1335
  "action": "CLOSE",
1337
- "label": "Close"
1336
+ "label": "Close",
1337
+ "variant": "ghost",
1338
+ "type": "button"
1338
1339
  }
1339
1340
  ]
1340
1341
  }
1341
1342
  ],
1342
- "gap": "md",
1343
1343
  "type": "stack",
1344
1344
  "direction": "vertical"
1345
1345
  }
@@ -1571,8 +1571,8 @@
1571
1571
  "Product",
1572
1572
  {
1573
1573
  "emit": {
1574
- "failure": "ProductLoadFailed",
1575
- "success": "ProductLoaded"
1574
+ "success": "ProductLoaded",
1575
+ "failure": "ProductLoadFailed"
1576
1576
  }
1577
1577
  }
1578
1578
  ]
@@ -1605,21 +1605,21 @@
1605
1605
  {
1606
1606
  "children": [
1607
1607
  {
1608
- "direction": "horizontal",
1609
1608
  "align": "center",
1609
+ "type": "stack",
1610
+ "gap": "sm",
1611
+ "direction": "horizontal",
1610
1612
  "children": [
1611
1613
  {
1612
1614
  "name": "alert-triangle",
1613
1615
  "type": "icon"
1614
1616
  },
1615
1617
  {
1616
- "type": "typography",
1617
1618
  "content": "Delete Product",
1619
+ "type": "typography",
1618
1620
  "variant": "h3"
1619
1621
  }
1620
- ],
1621
- "type": "stack",
1622
- "gap": "sm"
1622
+ ]
1623
1623
  },
1624
1624
  {
1625
1625
  "type": "divider"
@@ -1630,15 +1630,14 @@
1630
1630
  "type": "alert"
1631
1631
  },
1632
1632
  {
1633
+ "justify": "end",
1633
1634
  "type": "stack",
1634
- "direction": "horizontal",
1635
- "gap": "sm",
1636
1635
  "children": [
1637
1636
  {
1638
1637
  "label": "Cancel",
1639
1638
  "type": "button",
1640
- "action": "CANCEL",
1641
- "variant": "ghost"
1639
+ "variant": "ghost",
1640
+ "action": "CANCEL"
1642
1641
  },
1643
1642
  {
1644
1643
  "type": "button",
@@ -1648,12 +1647,13 @@
1648
1647
  "icon": "check"
1649
1648
  }
1650
1649
  ],
1651
- "justify": "end"
1650
+ "direction": "horizontal",
1651
+ "gap": "sm"
1652
1652
  }
1653
1653
  ],
1654
- "gap": "md",
1654
+ "type": "stack",
1655
1655
  "direction": "vertical",
1656
- "type": "stack"
1656
+ "gap": "md"
1657
1657
  }
1658
1658
  ]
1659
1659
  ]
@@ -1670,8 +1670,8 @@
1670
1670
  "@entity.pendingId",
1671
1671
  {
1672
1672
  "emit": {
1673
- "failure": "ProductDeleteFailed",
1674
- "success": "ProductDeleted"
1673
+ "success": "ProductDeleted",
1674
+ "failure": "ProductDeleteFailed"
1675
1675
  }
1676
1676
  }
1677
1677
  ],
@@ -1692,8 +1692,8 @@
1692
1692
  "Product",
1693
1693
  {
1694
1694
  "emit": {
1695
- "success": "ProductLoaded",
1696
- "failure": "ProductLoadFailed"
1695
+ "failure": "ProductLoadFailed",
1696
+ "success": "ProductLoaded"
1697
1697
  }
1698
1698
  }
1699
1699
  ],
@@ -1754,8 +1754,8 @@
1754
1754
  "Product",
1755
1755
  {
1756
1756
  "emit": {
1757
- "success": "ProductLoaded",
1758
- "failure": "ProductLoadFailed"
1757
+ "failure": "ProductLoadFailed",
1758
+ "success": "ProductLoaded"
1759
1759
  }
1760
1760
  }
1761
1761
  ]
@@ -2002,22 +2002,22 @@
2002
2002
  "render-ui",
2003
2003
  "main",
2004
2004
  {
2005
- "align": "center",
2006
- "gap": "md",
2007
2005
  "children": [
2008
2006
  {
2009
2007
  "type": "spinner"
2010
2008
  },
2011
2009
  {
2010
+ "type": "typography",
2012
2011
  "color": "muted",
2013
- "variant": "caption",
2014
2012
  "content": "Loading…",
2015
- "type": "typography"
2013
+ "variant": "caption"
2016
2014
  }
2017
2015
  ],
2016
+ "direction": "vertical",
2017
+ "align": "center",
2018
2018
  "className": "py-12",
2019
- "type": "stack",
2020
- "direction": "vertical"
2019
+ "gap": "md",
2020
+ "type": "stack"
2021
2021
  }
2022
2022
  ]
2023
2023
  ]
@@ -2031,11 +2031,13 @@
2031
2031
  "render-ui",
2032
2032
  "main",
2033
2033
  {
2034
+ "appName": "EcommerceApp",
2035
+ "type": "dashboard-layout",
2034
2036
  "navItems": [
2035
2037
  {
2036
- "icon": "package",
2038
+ "href": "/products",
2037
2039
  "label": "Products",
2038
- "href": "/products"
2040
+ "icon": "package"
2039
2041
  },
2040
2042
  {
2041
2043
  "label": "Cart",
@@ -2053,115 +2055,113 @@
2053
2055
  "href": "/orders"
2054
2056
  }
2055
2057
  ],
2056
- "type": "dashboard-layout",
2057
2058
  "children": [
2058
2059
  {
2059
- "direction": "vertical",
2060
2060
  "gap": "lg",
2061
+ "type": "stack",
2062
+ "direction": "vertical",
2061
2063
  "children": [
2062
2064
  {
2063
- "justify": "between",
2064
- "type": "stack",
2065
2065
  "children": [
2066
2066
  {
2067
+ "direction": "horizontal",
2067
2068
  "type": "stack",
2068
2069
  "gap": "md",
2069
- "direction": "horizontal",
2070
2070
  "children": [
2071
2071
  {
2072
- "type": "icon",
2073
- "name": "shopping-cart"
2072
+ "name": "shopping-cart",
2073
+ "type": "icon"
2074
2074
  },
2075
2075
  {
2076
- "content": "Shopping Cart",
2076
+ "variant": "h2",
2077
2077
  "type": "typography",
2078
- "variant": "h2"
2078
+ "content": "Shopping Cart"
2079
2079
  }
2080
2080
  ]
2081
2081
  },
2082
2082
  {
2083
- "icon": "plus",
2084
2083
  "action": "ADD_ITEM",
2084
+ "variant": "primary",
2085
2085
  "type": "button",
2086
2086
  "label": "Add Item",
2087
- "variant": "primary"
2087
+ "icon": "plus"
2088
2088
  }
2089
2089
  ],
2090
2090
  "direction": "horizontal",
2091
- "gap": "md"
2091
+ "type": "stack",
2092
+ "gap": "md",
2093
+ "justify": "between"
2092
2094
  },
2093
2095
  {
2094
2096
  "type": "divider"
2095
2097
  },
2096
2098
  {
2099
+ "type": "simple-grid",
2097
2100
  "cols": 3.0,
2098
2101
  "children": [
2099
2102
  {
2100
- "label": "Items",
2101
- "icon": "package",
2102
2103
  "type": "stat-display",
2103
- "value": "@payload.data.length"
2104
+ "label": "Items",
2105
+ "value": "@payload.data.length",
2106
+ "icon": "package"
2104
2107
  },
2105
2108
  {
2106
2109
  "icon": "dollar-sign",
2107
- "value": "@payload.data.length",
2108
2110
  "label": "Subtotal",
2109
- "type": "stat-display"
2111
+ "type": "stat-display",
2112
+ "value": "@payload.data.length"
2110
2113
  },
2111
2114
  {
2112
- "type": "stat-display",
2113
2115
  "label": "Total",
2114
- "icon": "receipt",
2115
- "value": "@payload.data.length"
2116
+ "type": "stat-display",
2117
+ "value": "@payload.data.length",
2118
+ "icon": "receipt"
2116
2119
  }
2117
- ],
2118
- "type": "simple-grid"
2120
+ ]
2119
2121
  },
2120
2122
  {
2121
2123
  "type": "divider"
2122
2124
  },
2123
2125
  {
2126
+ "itemActions": [
2127
+ {
2128
+ "label": "Remove",
2129
+ "event": "REQUEST_REMOVE",
2130
+ "variant": "danger"
2131
+ }
2132
+ ],
2133
+ "entity": "@payload.data",
2124
2134
  "type": "data-grid",
2125
2135
  "fields": [
2126
2136
  {
2127
- "variant": "h4",
2137
+ "name": "productName",
2128
2138
  "label": "Product Name",
2129
2139
  "icon": "shopping-cart",
2130
- "name": "productName"
2140
+ "variant": "h4"
2131
2141
  },
2132
2142
  {
2133
- "label": "Quantity",
2134
- "name": "quantity",
2135
2143
  "format": "currency",
2136
- "variant": "caption"
2144
+ "name": "quantity",
2145
+ "variant": "caption",
2146
+ "label": "Quantity"
2137
2147
  },
2138
2148
  {
2139
2149
  "name": "unitPrice",
2140
2150
  "label": "Unit Price",
2141
2151
  "variant": "badge"
2142
2152
  }
2143
- ],
2144
- "entity": "@payload.data",
2145
- "itemActions": [
2146
- {
2147
- "label": "Remove",
2148
- "variant": "danger",
2149
- "event": "REQUEST_REMOVE"
2150
- }
2151
2153
  ]
2152
2154
  },
2153
2155
  {
2154
- "icon": "arrow-right",
2155
2156
  "variant": "primary",
2156
- "label": "Proceed to Checkout",
2157
2157
  "action": "PROCEED_CHECKOUT",
2158
+ "icon": "arrow-right",
2159
+ "label": "Proceed to Checkout",
2158
2160
  "type": "button"
2159
2161
  }
2160
- ],
2161
- "type": "stack"
2162
+ ]
2162
2163
  }
2163
- ],
2164
- "appName": "EcommerceApp"
2164
+ ]
2165
2165
  }
2166
2166
  ]
2167
2167
  ]
@@ -2175,36 +2175,36 @@
2175
2175
  "render-ui",
2176
2176
  "main",
2177
2177
  {
2178
+ "direction": "vertical",
2179
+ "align": "center",
2180
+ "className": "py-12",
2181
+ "type": "stack",
2182
+ "gap": "md",
2178
2183
  "children": [
2179
2184
  {
2180
- "name": "alert-triangle",
2181
2185
  "type": "icon",
2182
- "color": "destructive"
2186
+ "color": "destructive",
2187
+ "name": "alert-triangle"
2183
2188
  },
2184
2189
  {
2185
- "variant": "h3",
2186
2190
  "content": "Failed to load cartitem",
2187
- "type": "typography"
2191
+ "type": "typography",
2192
+ "variant": "h3"
2188
2193
  },
2189
2194
  {
2190
- "variant": "body",
2191
2195
  "content": "@payload.error",
2196
+ "variant": "body",
2192
2197
  "type": "typography",
2193
2198
  "color": "muted"
2194
2199
  },
2195
2200
  {
2196
2201
  "type": "button",
2197
- "icon": "rotate-ccw",
2202
+ "label": "Retry",
2198
2203
  "action": "INIT",
2199
- "variant": "primary",
2200
- "label": "Retry"
2204
+ "icon": "rotate-ccw",
2205
+ "variant": "primary"
2201
2206
  }
2202
- ],
2203
- "className": "py-12",
2204
- "direction": "vertical",
2205
- "gap": "md",
2206
- "type": "stack",
2207
- "align": "center"
2207
+ ]
2208
2208
  }
2209
2209
  ]
2210
2210
  ]
@@ -2228,22 +2228,22 @@
2228
2228
  "render-ui",
2229
2229
  "main",
2230
2230
  {
2231
- "direction": "vertical",
2232
- "gap": "md",
2233
- "className": "py-12",
2234
2231
  "type": "stack",
2232
+ "gap": "md",
2235
2233
  "align": "center",
2234
+ "className": "py-12",
2236
2235
  "children": [
2237
2236
  {
2238
2237
  "type": "spinner"
2239
2238
  },
2240
2239
  {
2240
+ "type": "typography",
2241
2241
  "variant": "caption",
2242
- "color": "muted",
2243
2242
  "content": "Preparing checkout…",
2244
- "type": "typography"
2243
+ "color": "muted"
2245
2244
  }
2246
- ]
2245
+ ],
2246
+ "direction": "vertical"
2247
2247
  }
2248
2248
  ]
2249
2249
  ]
@@ -2258,14 +2258,36 @@
2258
2258
  "main",
2259
2259
  {
2260
2260
  "type": "dashboard-layout",
2261
+ "navItems": [
2262
+ {
2263
+ "icon": "package",
2264
+ "label": "Products",
2265
+ "href": "/products"
2266
+ },
2267
+ {
2268
+ "label": "Cart",
2269
+ "href": "/cart",
2270
+ "icon": "shopping-cart"
2271
+ },
2272
+ {
2273
+ "label": "Checkout",
2274
+ "href": "/checkout",
2275
+ "icon": "credit-card"
2276
+ },
2277
+ {
2278
+ "icon": "clipboard-list",
2279
+ "href": "/orders",
2280
+ "label": "Orders"
2281
+ }
2282
+ ],
2283
+ "appName": "EcommerceApp",
2261
2284
  "children": [
2262
2285
  {
2263
- "type": "stack",
2264
2286
  "gap": "lg",
2265
- "direction": "vertical",
2287
+ "type": "stack",
2266
2288
  "children": [
2267
2289
  {
2268
- "type": "stack",
2290
+ "direction": "horizontal",
2269
2291
  "children": [
2270
2292
  {
2271
2293
  "type": "icon",
@@ -2273,94 +2295,72 @@
2273
2295
  },
2274
2296
  {
2275
2297
  "variant": "h2",
2276
- "type": "typography",
2277
- "content": "Checkout"
2298
+ "content": "Checkout",
2299
+ "type": "typography"
2278
2300
  }
2279
2301
  ],
2280
- "gap": "sm",
2281
- "direction": "horizontal"
2302
+ "type": "stack",
2303
+ "gap": "sm"
2282
2304
  },
2283
2305
  {
2284
2306
  "type": "divider"
2285
2307
  },
2286
2308
  {
2287
- "type": "data-grid",
2309
+ "entity": "@payload.data",
2288
2310
  "itemActions": [
2289
2311
  {
2290
2312
  "event": "REQUEST_REMOVE",
2291
- "variant": "danger",
2292
- "label": "Remove"
2313
+ "label": "Remove",
2314
+ "variant": "danger"
2293
2315
  }
2294
2316
  ],
2317
+ "type": "data-grid",
2295
2318
  "fields": [
2296
2319
  {
2297
- "variant": "h4",
2298
- "icon": "shopping-cart",
2299
2320
  "label": "Product Name",
2300
- "name": "productName"
2321
+ "name": "productName",
2322
+ "icon": "shopping-cart",
2323
+ "variant": "h4"
2301
2324
  },
2302
2325
  {
2303
- "format": "currency",
2304
2326
  "variant": "caption",
2305
2327
  "name": "quantity",
2328
+ "format": "currency",
2306
2329
  "label": "Quantity"
2307
2330
  },
2308
2331
  {
2309
- "label": "Unit Price",
2310
2332
  "name": "unitPrice",
2333
+ "label": "Unit Price",
2311
2334
  "variant": "badge"
2312
2335
  }
2313
- ],
2314
- "entity": "@payload.data"
2336
+ ]
2315
2337
  },
2316
2338
  {
2317
- "direction": "horizontal",
2318
- "justify": "end",
2319
2339
  "type": "stack",
2320
2340
  "gap": "sm",
2321
2341
  "children": [
2322
2342
  {
2323
- "label": "Back to Cart",
2324
- "variant": "ghost",
2325
2343
  "icon": "arrow-left",
2326
2344
  "action": "BACK_TO_CART",
2327
- "type": "button"
2345
+ "label": "Back to Cart",
2346
+ "type": "button",
2347
+ "variant": "ghost"
2328
2348
  },
2329
2349
  {
2330
- "action": "CONFIRM_ORDER",
2331
2350
  "type": "button",
2351
+ "action": "CONFIRM_ORDER",
2352
+ "label": "Confirm Order",
2332
2353
  "variant": "primary",
2333
- "icon": "check",
2334
- "label": "Confirm Order"
2354
+ "icon": "check"
2335
2355
  }
2336
- ]
2356
+ ],
2357
+ "justify": "end",
2358
+ "direction": "horizontal"
2337
2359
  }
2338
- ]
2339
- }
2340
- ],
2341
- "navItems": [
2342
- {
2343
- "href": "/products",
2344
- "icon": "package",
2345
- "label": "Products"
2346
- },
2347
- {
2348
- "icon": "shopping-cart",
2349
- "href": "/cart",
2350
- "label": "Cart"
2351
- },
2352
- {
2353
- "icon": "credit-card",
2354
- "href": "/checkout",
2355
- "label": "Checkout"
2356
- },
2357
- {
2358
- "label": "Orders",
2359
- "href": "/orders",
2360
- "icon": "clipboard-list"
2360
+ ],
2361
+ "direction": "vertical"
2361
2362
  }
2362
- ],
2363
- "appName": "EcommerceApp"
2363
+ ]
2364
2364
  }
2365
2365
  ]
2366
2366
  ]
@@ -2392,8 +2392,8 @@
2392
2392
  "CartItem",
2393
2393
  {
2394
2394
  "emit": {
2395
- "failure": "CartItemLoadFailed",
2396
- "success": "CartItemLoaded"
2395
+ "success": "CartItemLoaded",
2396
+ "failure": "CartItemLoadFailed"
2397
2397
  }
2398
2398
  }
2399
2399
  ],
@@ -2401,60 +2401,60 @@
2401
2401
  "render-ui",
2402
2402
  "main",
2403
2403
  {
2404
- "navItems": [
2405
- {
2406
- "icon": "package",
2407
- "label": "Products",
2408
- "href": "/products"
2409
- },
2410
- {
2411
- "icon": "shopping-cart",
2412
- "href": "/cart",
2413
- "label": "Cart"
2414
- },
2415
- {
2416
- "href": "/checkout",
2417
- "icon": "credit-card",
2418
- "label": "Checkout"
2419
- },
2420
- {
2421
- "icon": "clipboard-list",
2422
- "href": "/orders",
2423
- "label": "Orders"
2424
- }
2425
- ],
2426
- "appName": "EcommerceApp",
2404
+ "type": "dashboard-layout",
2427
2405
  "children": [
2428
2406
  {
2429
2407
  "type": "stack",
2430
- "direction": "vertical",
2431
- "gap": "lg",
2408
+ "align": "center",
2432
2409
  "children": [
2433
2410
  {
2434
- "name": "check-circle",
2435
- "type": "icon"
2411
+ "type": "icon",
2412
+ "name": "check-circle"
2436
2413
  },
2437
2414
  {
2438
2415
  "type": "typography",
2439
- "content": "Order Confirmed",
2440
- "variant": "h2"
2416
+ "variant": "h2",
2417
+ "content": "Order Confirmed"
2441
2418
  },
2442
2419
  {
2443
- "content": "Your order has been placed successfully.",
2444
2420
  "variant": "body",
2445
- "type": "typography"
2421
+ "type": "typography",
2422
+ "content": "Your order has been placed successfully."
2446
2423
  },
2447
2424
  {
2448
- "label": "Continue Shopping",
2449
2425
  "action": "INIT",
2426
+ "label": "Continue Shopping",
2450
2427
  "type": "button",
2451
2428
  "variant": "primary"
2452
2429
  }
2453
2430
  ],
2454
- "align": "center"
2431
+ "gap": "lg",
2432
+ "direction": "vertical"
2433
+ }
2434
+ ],
2435
+ "navItems": [
2436
+ {
2437
+ "label": "Products",
2438
+ "href": "/products",
2439
+ "icon": "package"
2440
+ },
2441
+ {
2442
+ "label": "Cart",
2443
+ "href": "/cart",
2444
+ "icon": "shopping-cart"
2445
+ },
2446
+ {
2447
+ "icon": "credit-card",
2448
+ "href": "/checkout",
2449
+ "label": "Checkout"
2450
+ },
2451
+ {
2452
+ "href": "/orders",
2453
+ "label": "Orders",
2454
+ "icon": "clipboard-list"
2455
2455
  }
2456
2456
  ],
2457
- "type": "dashboard-layout"
2457
+ "appName": "EcommerceApp"
2458
2458
  }
2459
2459
  ]
2460
2460
  ]
@@ -2622,8 +2622,8 @@
2622
2622
  "CartItem",
2623
2623
  {
2624
2624
  "emit": {
2625
- "failure": "CartItemLoadFailed",
2626
- "success": "CartItemLoaded"
2625
+ "success": "CartItemLoaded",
2626
+ "failure": "CartItemLoadFailed"
2627
2627
  }
2628
2628
  }
2629
2629
  ]
@@ -2639,8 +2639,8 @@
2639
2639
  "CartItem",
2640
2640
  {
2641
2641
  "emit": {
2642
- "failure": "CartItemLoadFailed",
2643
- "success": "CartItemLoaded"
2642
+ "success": "CartItemLoaded",
2643
+ "failure": "CartItemLoadFailed"
2644
2644
  }
2645
2645
  }
2646
2646
  ],
@@ -2648,25 +2648,25 @@
2648
2648
  "render-ui",
2649
2649
  "modal",
2650
2650
  {
2651
- "gap": "md",
2652
2651
  "direction": "vertical",
2652
+ "gap": "md",
2653
2653
  "type": "stack",
2654
2654
  "children": [
2655
2655
  {
2656
+ "type": "stack",
2656
2657
  "direction": "horizontal",
2658
+ "gap": "sm",
2657
2659
  "children": [
2658
2660
  {
2659
2661
  "type": "icon",
2660
2662
  "name": "plus-circle"
2661
2663
  },
2662
2664
  {
2663
- "type": "typography",
2665
+ "variant": "h3",
2664
2666
  "content": "Add Item",
2665
- "variant": "h3"
2667
+ "type": "typography"
2666
2668
  }
2667
- ],
2668
- "gap": "sm",
2669
- "type": "stack"
2669
+ ]
2670
2670
  },
2671
2671
  {
2672
2672
  "type": "divider"
@@ -2680,8 +2680,8 @@
2680
2680
  "totalPrice"
2681
2681
  ],
2682
2682
  "type": "form-section",
2683
- "mode": "create",
2684
- "submitEvent": "SAVE"
2683
+ "submitEvent": "SAVE",
2684
+ "mode": "create"
2685
2685
  }
2686
2686
  ]
2687
2687
  }
@@ -2724,8 +2724,8 @@
2724
2724
  "@payload.data",
2725
2725
  {
2726
2726
  "emit": {
2727
- "success": "CartItemSaved",
2728
- "failure": "CartItemSaveFailed"
2727
+ "failure": "CartItemSaveFailed",
2728
+ "success": "CartItemSaved"
2729
2729
  }
2730
2730
  }
2731
2731
  ],
@@ -2942,56 +2942,56 @@
2942
2942
  "render-ui",
2943
2943
  "modal",
2944
2944
  {
2945
- "direction": "vertical",
2945
+ "gap": "md",
2946
2946
  "children": [
2947
2947
  {
2948
- "direction": "horizontal",
2949
- "align": "center",
2950
- "gap": "sm",
2951
2948
  "type": "stack",
2949
+ "gap": "sm",
2950
+ "direction": "horizontal",
2952
2951
  "children": [
2953
2952
  {
2954
- "name": "alert-triangle",
2955
- "type": "icon"
2953
+ "type": "icon",
2954
+ "name": "alert-triangle"
2956
2955
  },
2957
2956
  {
2958
2957
  "variant": "h3",
2959
- "type": "typography",
2960
- "content": "Remove Item"
2958
+ "content": "Remove Item",
2959
+ "type": "typography"
2961
2960
  }
2962
- ]
2961
+ ],
2962
+ "align": "center"
2963
2963
  },
2964
2964
  {
2965
2965
  "type": "divider"
2966
2966
  },
2967
2967
  {
2968
- "message": "Are you sure you want to remove this item from your cart?",
2969
2968
  "type": "alert",
2970
- "variant": "error"
2969
+ "variant": "error",
2970
+ "message": "Are you sure you want to remove this item from your cart?"
2971
2971
  },
2972
2972
  {
2973
2973
  "direction": "horizontal",
2974
- "justify": "end",
2974
+ "type": "stack",
2975
2975
  "children": [
2976
2976
  {
2977
2977
  "label": "Cancel",
2978
+ "action": "CANCEL",
2978
2979
  "variant": "ghost",
2979
- "type": "button",
2980
- "action": "CANCEL"
2980
+ "type": "button"
2981
2981
  },
2982
2982
  {
2983
- "label": "Remove",
2984
2983
  "action": "CONFIRM_REMOVE",
2984
+ "label": "Remove",
2985
+ "variant": "danger",
2985
2986
  "type": "button",
2986
- "icon": "check",
2987
- "variant": "danger"
2987
+ "icon": "check"
2988
2988
  }
2989
2989
  ],
2990
- "type": "stack",
2991
- "gap": "sm"
2990
+ "gap": "sm",
2991
+ "justify": "end"
2992
2992
  }
2993
2993
  ],
2994
- "gap": "md",
2994
+ "direction": "vertical",
2995
2995
  "type": "stack"
2996
2996
  }
2997
2997
  ]
@@ -3031,8 +3031,8 @@
3031
3031
  "CartItem",
3032
3032
  {
3033
3033
  "emit": {
3034
- "failure": "CartItemLoadFailed",
3035
- "success": "CartItemLoaded"
3034
+ "success": "CartItemLoaded",
3035
+ "failure": "CartItemLoadFailed"
3036
3036
  }
3037
3037
  }
3038
3038
  ]
@@ -3089,8 +3089,8 @@
3089
3089
  "CartItem",
3090
3090
  {
3091
3091
  "emit": {
3092
- "success": "CartItemLoaded",
3093
- "failure": "CartItemLoadFailed"
3092
+ "failure": "CartItemLoadFailed",
3093
+ "success": "CartItemLoaded"
3094
3094
  }
3095
3095
  }
3096
3096
  ]
@@ -3166,9 +3166,9 @@
3166
3166
  "name": "CheckoutPayment",
3167
3167
  "config": {
3168
3168
  "currency": "usd",
3169
- "amount": 0.0,
3170
3169
  "metadata": {},
3171
- "uiTrait": "@trait.CheckoutPaymentForm"
3170
+ "uiTrait": "@trait.CheckoutPaymentForm",
3171
+ "amount": 0.0
3172
3172
  },
3173
3173
  "listens": [
3174
3174
  {
@@ -3223,45 +3223,45 @@
3223
3223
  "render-ui",
3224
3224
  "main",
3225
3225
  {
3226
- "gap": "md",
3226
+ "type": "stack",
3227
3227
  "direction": "vertical",
3228
+ "gap": "md",
3228
3229
  "children": [
3229
3230
  {
3230
- "type": "alert",
3231
3231
  "variant": "info",
3232
- "message": "Enter card details to complete your order."
3232
+ "message": "Enter card details to complete your order.",
3233
+ "type": "alert"
3233
3234
  },
3234
3235
  {
3236
+ "placeholder": "Card number",
3235
3237
  "inputType": "text",
3236
- "type": "input",
3237
- "placeholder": "Card number"
3238
+ "type": "input"
3238
3239
  },
3239
3240
  {
3240
3241
  "type": "stack",
3241
3242
  "children": [
3242
3243
  {
3243
- "inputType": "text",
3244
3244
  "placeholder": "MM/YY",
3245
- "type": "input"
3245
+ "type": "input",
3246
+ "inputType": "text"
3246
3247
  },
3247
3248
  {
3249
+ "placeholder": "CVC",
3248
3250
  "type": "input",
3249
- "inputType": "text",
3250
- "placeholder": "CVC"
3251
+ "inputType": "text"
3251
3252
  }
3252
3253
  ],
3253
- "gap": "sm",
3254
- "direction": "horizontal"
3254
+ "direction": "horizontal",
3255
+ "gap": "sm"
3255
3256
  },
3256
3257
  {
3257
- "icon": "credit-card",
3258
- "variant": "primary",
3259
- "label": "Pay now",
3260
3258
  "action": "CREATE_PAYMENT",
3261
- "type": "button"
3259
+ "label": "Pay now",
3260
+ "type": "button",
3261
+ "variant": "primary",
3262
+ "icon": "credit-card"
3262
3263
  }
3263
- ],
3264
- "type": "stack"
3264
+ ]
3265
3265
  }
3266
3266
  ]
3267
3267
  ]
@@ -3502,11 +3502,15 @@
3502
3502
  "render-ui",
3503
3503
  "main",
3504
3504
  {
3505
+ "className": "max-w-xl mx-auto w-full",
3506
+ "gap": "lg",
3507
+ "type": "stack",
3508
+ "direction": "vertical",
3505
3509
  "children": [
3506
3510
  {
3507
- "type": "typography",
3508
3511
  "variant": "h2",
3509
- "content": "Checkout"
3512
+ "content": "Checkout",
3513
+ "type": "typography"
3510
3514
  },
3511
3515
  {
3512
3516
  "steps": [
@@ -3523,33 +3527,29 @@
3523
3527
  },
3524
3528
  {
3525
3529
  "type": "typography",
3526
- "variant": "h3",
3527
- "content": "Customer Info"
3530
+ "content": "Customer Info",
3531
+ "variant": "h3"
3528
3532
  },
3529
3533
  {
3530
3534
  "showCancel": false,
3531
- "submitLabel": "Continue",
3532
- "mode": "create",
3533
3535
  "fields": [
3534
3536
  {
3535
- "name": "customerName",
3536
3537
  "required": true,
3537
- "min": 2.0
3538
+ "min": 2.0,
3539
+ "name": "customerName"
3538
3540
  },
3539
3541
  {
3540
- "name": "email",
3541
3542
  "type": "email",
3542
- "required": true
3543
+ "required": true,
3544
+ "name": "email"
3543
3545
  }
3544
3546
  ],
3545
- "type": "form-section",
3546
- "submitEvent": "NEXT"
3547
+ "submitLabel": "Continue",
3548
+ "mode": "create",
3549
+ "submitEvent": "NEXT",
3550
+ "type": "form-section"
3547
3551
  }
3548
- ],
3549
- "gap": "lg",
3550
- "className": "max-w-xl mx-auto w-full",
3551
- "direction": "vertical",
3552
- "type": "stack"
3552
+ ]
3553
3553
  }
3554
3554
  ]
3555
3555
  ]
@@ -3558,6 +3558,11 @@
3558
3558
  "from": "step1",
3559
3559
  "to": "step2",
3560
3560
  "event": "NEXT",
3561
+ "guard": [
3562
+ "and",
3563
+ "@payload.data.customerName",
3564
+ "@payload.data.email"
3565
+ ],
3561
3566
  "effects": [
3562
3567
  [
3563
3568
  "set",
@@ -3573,9 +3578,10 @@
3573
3578
  "render-ui",
3574
3579
  "main",
3575
3580
  {
3576
- "type": "stack",
3577
3581
  "className": "max-w-xl mx-auto w-full",
3578
3582
  "gap": "lg",
3583
+ "type": "stack",
3584
+ "direction": "vertical",
3579
3585
  "children": [
3580
3586
  {
3581
3587
  "variant": "h2",
@@ -3601,23 +3607,22 @@
3601
3607
  "content": "Shipping Address"
3602
3608
  },
3603
3609
  {
3604
- "entity": "@entity",
3605
- "submitEvent": "NEXT",
3610
+ "type": "form-section",
3606
3611
  "submitLabel": "Continue",
3607
3612
  "cancelLabel": "Back",
3608
3613
  "cancelEvent": "PREV",
3609
- "mode": "edit",
3614
+ "submitEvent": "NEXT",
3610
3615
  "fields": [
3611
3616
  {
3612
- "required": true,
3613
3617
  "min": 5.0,
3618
+ "required": true,
3614
3619
  "name": "shippingAddress"
3615
3620
  }
3616
3621
  ],
3617
- "type": "form-section"
3622
+ "entity": "@entity",
3623
+ "mode": "edit"
3618
3624
  }
3619
- ],
3620
- "direction": "vertical"
3625
+ ]
3621
3626
  }
3622
3627
  ]
3623
3628
  ]
@@ -3626,6 +3631,12 @@
3626
3631
  "from": "step2",
3627
3632
  "to": "step3",
3628
3633
  "event": "NEXT",
3634
+ "guard": [
3635
+ "and",
3636
+ "@entity.customerName",
3637
+ "@entity.email",
3638
+ "@payload.data.shippingAddress"
3639
+ ],
3629
3640
  "effects": [
3630
3641
  [
3631
3642
  "set",
@@ -3636,51 +3647,51 @@
3636
3647
  "render-ui",
3637
3648
  "main",
3638
3649
  {
3650
+ "className": "max-w-xl mx-auto w-full",
3639
3651
  "children": [
3640
3652
  {
3641
- "content": "Checkout",
3642
3653
  "type": "typography",
3654
+ "content": "Checkout",
3643
3655
  "variant": "h2"
3644
3656
  },
3645
3657
  {
3658
+ "currentStep": 2.0,
3659
+ "type": "wizard-progress",
3646
3660
  "steps": [
3647
3661
  "Customer Info",
3648
3662
  "Shipping",
3649
3663
  "Payment",
3650
3664
  "Review"
3651
- ],
3652
- "currentStep": 2.0,
3653
- "type": "wizard-progress"
3665
+ ]
3654
3666
  },
3655
3667
  {
3656
3668
  "type": "divider"
3657
3669
  },
3658
3670
  {
3659
- "variant": "h3",
3660
3671
  "content": "Payment",
3661
- "type": "typography"
3672
+ "type": "typography",
3673
+ "variant": "h3"
3662
3674
  },
3663
3675
  "@trait.CheckoutPayment",
3664
3676
  {
3677
+ "direction": "horizontal",
3665
3678
  "gap": "sm",
3666
3679
  "type": "stack",
3667
- "justify": "start",
3668
3680
  "children": [
3669
3681
  {
3670
- "action": "PREV",
3682
+ "variant": "ghost",
3671
3683
  "type": "button",
3684
+ "icon": "arrow-left",
3672
3685
  "label": "Back",
3673
- "variant": "ghost",
3674
- "icon": "arrow-left"
3686
+ "action": "PREV"
3675
3687
  }
3676
3688
  ],
3677
- "direction": "horizontal"
3689
+ "justify": "start"
3678
3690
  }
3679
3691
  ],
3680
- "direction": "vertical",
3681
- "gap": "lg",
3682
3692
  "type": "stack",
3683
- "className": "max-w-xl mx-auto w-full"
3693
+ "direction": "vertical",
3694
+ "gap": "lg"
3684
3695
  }
3685
3696
  ]
3686
3697
  ]
@@ -3694,8 +3705,9 @@
3694
3705
  "render-ui",
3695
3706
  "main",
3696
3707
  {
3697
- "gap": "lg",
3698
3708
  "type": "stack",
3709
+ "gap": "lg",
3710
+ "direction": "vertical",
3699
3711
  "className": "max-w-xl mx-auto w-full",
3700
3712
  "children": [
3701
3713
  {
@@ -3717,32 +3729,31 @@
3717
3729
  "type": "divider"
3718
3730
  },
3719
3731
  {
3720
- "variant": "h3",
3721
3732
  "type": "typography",
3722
- "content": "Customer Info"
3733
+ "content": "Customer Info",
3734
+ "variant": "h3"
3723
3735
  },
3724
3736
  {
3725
- "type": "form-section",
3726
- "entity": "@entity",
3737
+ "mode": "edit",
3738
+ "submitLabel": "Continue",
3739
+ "showCancel": false,
3727
3740
  "fields": [
3728
3741
  {
3742
+ "name": "customerName",
3729
3743
  "required": true,
3730
- "min": 2.0,
3731
- "name": "customerName"
3744
+ "min": 2.0
3732
3745
  },
3733
3746
  {
3734
3747
  "name": "email",
3735
- "type": "email",
3736
- "required": true
3748
+ "required": true,
3749
+ "type": "email"
3737
3750
  }
3738
3751
  ],
3739
- "mode": "edit",
3740
- "showCancel": false,
3741
- "submitLabel": "Continue",
3752
+ "type": "form-section",
3753
+ "entity": "@entity",
3742
3754
  "submitEvent": "NEXT"
3743
3755
  }
3744
- ],
3745
- "direction": "vertical"
3756
+ ]
3746
3757
  }
3747
3758
  ]
3748
3759
  ]
@@ -3751,6 +3762,12 @@
3751
3762
  "from": "step3",
3752
3763
  "to": "review",
3753
3764
  "event": "PAYMENT_DONE",
3765
+ "guard": [
3766
+ "and",
3767
+ "@entity.customerName",
3768
+ "@entity.email",
3769
+ "@entity.shippingAddress"
3770
+ ],
3754
3771
  "effects": [
3755
3772
  [
3756
3773
  "render-ui",
@@ -3758,7 +3775,6 @@
3758
3775
  {
3759
3776
  "type": "stack",
3760
3777
  "direction": "vertical",
3761
- "className": "max-w-xl mx-auto w-full",
3762
3778
  "children": [
3763
3779
  {
3764
3780
  "variant": "h2",
@@ -3779,14 +3795,13 @@
3779
3795
  "type": "divider"
3780
3796
  },
3781
3797
  {
3782
- "direction": "vertical",
3783
3798
  "gap": "sm",
3784
3799
  "type": "stack",
3800
+ "direction": "vertical",
3785
3801
  "children": [
3786
3802
  {
3803
+ "gap": "md",
3787
3804
  "type": "stack",
3788
- "direction": "horizontal",
3789
- "justify": "between",
3790
3805
  "children": [
3791
3806
  {
3792
3807
  "type": "typography",
@@ -3794,17 +3809,18 @@
3794
3809
  "content": "Customer"
3795
3810
  },
3796
3811
  {
3812
+ "content": "@entity.customerName",
3797
3813
  "variant": "body",
3798
- "type": "typography",
3799
- "content": "@entity.customerName"
3814
+ "type": "typography"
3800
3815
  }
3801
3816
  ],
3802
- "gap": "md"
3817
+ "justify": "between",
3818
+ "direction": "horizontal"
3803
3819
  },
3804
3820
  {
3805
3821
  "type": "stack",
3806
3822
  "gap": "md",
3807
- "direction": "horizontal",
3823
+ "justify": "between",
3808
3824
  "children": [
3809
3825
  {
3810
3826
  "type": "typography",
@@ -3812,48 +3828,48 @@
3812
3828
  "variant": "caption"
3813
3829
  },
3814
3830
  {
3815
- "type": "typography",
3816
3831
  "variant": "body",
3817
- "content": "@entity.email"
3832
+ "content": "@entity.email",
3833
+ "type": "typography"
3818
3834
  }
3819
3835
  ],
3820
- "justify": "between"
3836
+ "direction": "horizontal"
3821
3837
  },
3822
3838
  {
3823
- "type": "stack",
3824
3839
  "direction": "horizontal",
3825
- "justify": "between",
3826
- "gap": "md",
3827
3840
  "children": [
3828
3841
  {
3842
+ "content": "Shipping",
3829
3843
  "variant": "caption",
3830
- "type": "typography",
3831
- "content": "Shipping"
3844
+ "type": "typography"
3832
3845
  },
3833
3846
  {
3834
- "variant": "body",
3847
+ "type": "typography",
3835
3848
  "content": "@entity.shippingAddress",
3836
- "type": "typography"
3849
+ "variant": "body"
3837
3850
  }
3838
- ]
3851
+ ],
3852
+ "type": "stack",
3853
+ "justify": "between",
3854
+ "gap": "md"
3839
3855
  },
3840
3856
  {
3857
+ "justify": "between",
3858
+ "direction": "horizontal",
3841
3859
  "children": [
3842
3860
  {
3843
- "content": "Order total",
3844
3861
  "variant": "caption",
3845
- "type": "typography"
3862
+ "type": "typography",
3863
+ "content": "Order total"
3846
3864
  },
3847
3865
  {
3866
+ "type": "typography",
3848
3867
  "variant": "body",
3849
- "content": "@entity.orderTotal",
3850
- "type": "typography"
3868
+ "content": "@entity.orderTotal"
3851
3869
  }
3852
3870
  ],
3853
- "type": "stack",
3854
- "direction": "horizontal",
3855
3871
  "gap": "md",
3856
- "justify": "between"
3872
+ "type": "stack"
3857
3873
  }
3858
3874
  ]
3859
3875
  },
@@ -3861,29 +3877,30 @@
3861
3877
  "type": "divider"
3862
3878
  },
3863
3879
  {
3864
- "type": "stack",
3865
- "gap": "sm",
3880
+ "direction": "horizontal",
3881
+ "justify": "between",
3866
3882
  "children": [
3867
3883
  {
3868
- "action": "PREV",
3869
3884
  "label": "Back",
3870
3885
  "type": "button",
3886
+ "icon": "arrow-left",
3871
3887
  "variant": "ghost",
3872
- "icon": "arrow-left"
3888
+ "action": "PREV"
3873
3889
  },
3874
3890
  {
3875
- "icon": "check",
3876
- "type": "button",
3877
3891
  "action": "COMPLETE",
3892
+ "type": "button",
3878
3893
  "label": "Place order",
3894
+ "icon": "check",
3879
3895
  "variant": "primary"
3880
3896
  }
3881
3897
  ],
3882
- "justify": "between",
3883
- "direction": "horizontal"
3898
+ "type": "stack",
3899
+ "gap": "sm"
3884
3900
  }
3885
3901
  ],
3886
- "gap": "lg"
3902
+ "gap": "lg",
3903
+ "className": "max-w-xl mx-auto w-full"
3887
3904
  }
3888
3905
  ]
3889
3906
  ]
@@ -3897,23 +3914,20 @@
3897
3914
  "render-ui",
3898
3915
  "main",
3899
3916
  {
3900
- "direction": "vertical",
3901
- "className": "max-w-xl mx-auto w-full",
3902
- "type": "stack",
3903
3917
  "children": [
3904
3918
  {
3905
3919
  "content": "Checkout",
3906
- "type": "typography",
3907
- "variant": "h2"
3920
+ "variant": "h2",
3921
+ "type": "typography"
3908
3922
  },
3909
3923
  {
3924
+ "currentStep": 1.0,
3910
3925
  "steps": [
3911
3926
  "Customer Info",
3912
3927
  "Shipping",
3913
3928
  "Payment",
3914
3929
  "Review"
3915
3930
  ],
3916
- "currentStep": 1.0,
3917
3931
  "type": "wizard-progress"
3918
3932
  },
3919
3933
  {
@@ -3925,22 +3939,25 @@
3925
3939
  "type": "typography"
3926
3940
  },
3927
3941
  {
3928
- "type": "form-section",
3942
+ "cancelLabel": "Back",
3943
+ "cancelEvent": "PREV",
3929
3944
  "submitLabel": "Continue",
3945
+ "type": "form-section",
3946
+ "entity": "@entity",
3947
+ "mode": "edit",
3930
3948
  "fields": [
3931
3949
  {
3932
3950
  "min": 5.0,
3933
- "name": "shippingAddress",
3934
- "required": true
3951
+ "required": true,
3952
+ "name": "shippingAddress"
3935
3953
  }
3936
3954
  ],
3937
- "mode": "edit",
3938
- "entity": "@entity",
3939
- "cancelLabel": "Back",
3940
- "submitEvent": "NEXT",
3941
- "cancelEvent": "PREV"
3955
+ "submitEvent": "NEXT"
3942
3956
  }
3943
3957
  ],
3958
+ "className": "max-w-xl mx-auto w-full",
3959
+ "type": "stack",
3960
+ "direction": "vertical",
3944
3961
  "gap": "lg"
3945
3962
  }
3946
3963
  ]
@@ -3950,6 +3967,12 @@
3950
3967
  "from": "review",
3951
3968
  "to": "complete",
3952
3969
  "event": "COMPLETE",
3970
+ "guard": [
3971
+ "and",
3972
+ "@entity.customerName",
3973
+ "@entity.email",
3974
+ "@entity.shippingAddress"
3975
+ ],
3953
3976
  "effects": [
3954
3977
  [
3955
3978
  "set",
@@ -3963,8 +3986,8 @@
3963
3986
  "@entity",
3964
3987
  {
3965
3988
  "emit": {
3966
- "failure": "CheckoutSaveFailed",
3967
- "success": "CheckoutSaved"
3989
+ "success": "CheckoutSaved",
3990
+ "failure": "CheckoutSaveFailed"
3968
3991
  }
3969
3992
  }
3970
3993
  ],
@@ -3984,35 +4007,35 @@
3984
4007
  "render-ui",
3985
4008
  "main",
3986
4009
  {
4010
+ "className": "max-w-xl mx-auto w-full py-12",
3987
4011
  "gap": "lg",
4012
+ "direction": "vertical",
4013
+ "align": "center",
3988
4014
  "children": [
3989
4015
  {
3990
4016
  "type": "icon",
3991
4017
  "name": "check-circle"
3992
4018
  },
3993
4019
  {
3994
- "variant": "h2",
3995
4020
  "content": "Order placed",
4021
+ "variant": "h2",
3996
4022
  "type": "typography"
3997
4023
  },
3998
4024
  {
3999
- "type": "typography",
4000
4025
  "color": "muted",
4001
- "variant": "body",
4002
- "content": "Your order is confirmed and on its way."
4026
+ "content": "Your order is confirmed and on its way.",
4027
+ "type": "typography",
4028
+ "variant": "body"
4003
4029
  },
4004
4030
  {
4005
4031
  "action": "RESTART",
4006
- "icon": "rotate-ccw",
4007
- "type": "button",
4032
+ "label": "Start new order",
4008
4033
  "variant": "ghost",
4009
- "label": "Start new order"
4034
+ "type": "button",
4035
+ "icon": "rotate-ccw"
4010
4036
  }
4011
4037
  ],
4012
- "type": "stack",
4013
- "direction": "vertical",
4014
- "align": "center",
4015
- "className": "max-w-xl mx-auto w-full py-12"
4038
+ "type": "stack"
4016
4039
  }
4017
4040
  ]
4018
4041
  ]
@@ -4026,24 +4049,21 @@
4026
4049
  "render-ui",
4027
4050
  "main",
4028
4051
  {
4029
- "type": "stack",
4030
- "direction": "vertical",
4031
- "className": "max-w-xl mx-auto w-full",
4032
4052
  "children": [
4033
4053
  {
4034
- "type": "typography",
4054
+ "content": "Checkout",
4035
4055
  "variant": "h2",
4036
- "content": "Checkout"
4056
+ "type": "typography"
4037
4057
  },
4038
4058
  {
4059
+ "currentStep": 2.0,
4060
+ "type": "wizard-progress",
4039
4061
  "steps": [
4040
4062
  "Customer Info",
4041
4063
  "Shipping",
4042
4064
  "Payment",
4043
4065
  "Review"
4044
- ],
4045
- "type": "wizard-progress",
4046
- "currentStep": 2.0
4066
+ ]
4047
4067
  },
4048
4068
  {
4049
4069
  "type": "divider"
@@ -4055,22 +4075,25 @@
4055
4075
  },
4056
4076
  "@trait.CheckoutPayment",
4057
4077
  {
4058
- "direction": "horizontal",
4059
- "type": "stack",
4060
4078
  "gap": "sm",
4079
+ "direction": "horizontal",
4061
4080
  "justify": "start",
4081
+ "type": "stack",
4062
4082
  "children": [
4063
4083
  {
4064
4084
  "type": "button",
4065
- "label": "Back",
4066
4085
  "variant": "ghost",
4086
+ "label": "Back",
4067
4087
  "action": "PREV",
4068
4088
  "icon": "arrow-left"
4069
4089
  }
4070
4090
  ]
4071
4091
  }
4072
4092
  ],
4073
- "gap": "lg"
4093
+ "gap": "lg",
4094
+ "direction": "vertical",
4095
+ "className": "max-w-xl mx-auto w-full",
4096
+ "type": "stack"
4074
4097
  }
4075
4098
  ]
4076
4099
  ]
@@ -4109,54 +4132,54 @@
4109
4132
  "render-ui",
4110
4133
  "main",
4111
4134
  {
4112
- "direction": "vertical",
4113
- "className": "max-w-xl mx-auto w-full",
4114
- "type": "stack",
4115
4135
  "gap": "lg",
4136
+ "className": "max-w-xl mx-auto w-full",
4116
4137
  "children": [
4117
4138
  {
4118
- "variant": "h2",
4119
4139
  "type": "typography",
4120
- "content": "Checkout"
4140
+ "content": "Checkout",
4141
+ "variant": "h2"
4121
4142
  },
4122
4143
  {
4123
4144
  "type": "wizard-progress",
4145
+ "currentStep": 0.0,
4124
4146
  "steps": [
4125
4147
  "Customer Info",
4126
4148
  "Shipping",
4127
4149
  "Payment",
4128
4150
  "Review"
4129
- ],
4130
- "currentStep": 0.0
4151
+ ]
4131
4152
  },
4132
4153
  {
4133
4154
  "type": "divider"
4134
4155
  },
4135
4156
  {
4136
- "content": "Customer Info",
4157
+ "variant": "h3",
4137
4158
  "type": "typography",
4138
- "variant": "h3"
4159
+ "content": "Customer Info"
4139
4160
  },
4140
4161
  {
4141
4162
  "type": "form-section",
4142
- "submitLabel": "Continue",
4163
+ "showCancel": false,
4164
+ "mode": "create",
4143
4165
  "fields": [
4144
4166
  {
4145
- "min": 2.0,
4167
+ "name": "customerName",
4146
4168
  "required": true,
4147
- "name": "customerName"
4169
+ "min": 2.0
4148
4170
  },
4149
4171
  {
4150
- "required": true,
4151
4172
  "type": "email",
4152
- "name": "email"
4173
+ "name": "email",
4174
+ "required": true
4153
4175
  }
4154
4176
  ],
4155
- "mode": "create",
4156
- "showCancel": false,
4157
- "submitEvent": "NEXT"
4177
+ "submitEvent": "NEXT",
4178
+ "submitLabel": "Continue"
4158
4179
  }
4159
- ]
4180
+ ],
4181
+ "direction": "vertical",
4182
+ "type": "stack"
4160
4183
  }
4161
4184
  ]
4162
4185
  ]
@@ -4507,8 +4530,8 @@
4507
4530
  "OrderRecord",
4508
4531
  {
4509
4532
  "emit": {
4510
- "success": "OrderRecordLoaded",
4511
- "failure": "OrderRecordLoadFailed"
4533
+ "failure": "OrderRecordLoadFailed",
4534
+ "success": "OrderRecordLoaded"
4512
4535
  }
4513
4536
  }
4514
4537
  ],
@@ -4521,17 +4544,17 @@
4521
4544
  "type": "spinner"
4522
4545
  },
4523
4546
  {
4524
- "type": "typography",
4525
4547
  "variant": "caption",
4526
4548
  "content": "Loading…",
4527
- "color": "muted"
4549
+ "color": "muted",
4550
+ "type": "typography"
4528
4551
  }
4529
4552
  ],
4530
- "className": "py-12",
4531
- "type": "stack",
4532
- "direction": "vertical",
4533
4553
  "gap": "md",
4534
- "align": "center"
4554
+ "align": "center",
4555
+ "direction": "vertical",
4556
+ "className": "py-12",
4557
+ "type": "stack"
4535
4558
  }
4536
4559
  ]
4537
4560
  ]
@@ -4545,76 +4568,75 @@
4545
4568
  "render-ui",
4546
4569
  "main",
4547
4570
  {
4548
- "appName": "EcommerceApp",
4549
- "type": "dashboard-layout",
4571
+ "navItems": [
4572
+ {
4573
+ "icon": "package",
4574
+ "label": "Products",
4575
+ "href": "/products"
4576
+ },
4577
+ {
4578
+ "label": "Cart",
4579
+ "icon": "shopping-cart",
4580
+ "href": "/cart"
4581
+ },
4582
+ {
4583
+ "href": "/checkout",
4584
+ "icon": "credit-card",
4585
+ "label": "Checkout"
4586
+ },
4587
+ {
4588
+ "icon": "clipboard-list",
4589
+ "label": "Orders",
4590
+ "href": "/orders"
4591
+ }
4592
+ ],
4550
4593
  "children": [
4551
4594
  {
4552
- "gap": "lg",
4553
4595
  "children": [
4554
4596
  {
4597
+ "align": "center",
4555
4598
  "gap": "md",
4556
- "direction": "horizontal",
4599
+ "justify": "between",
4557
4600
  "children": [
4558
4601
  {
4559
- "align": "center",
4560
4602
  "type": "stack",
4603
+ "gap": "sm",
4604
+ "direction": "horizontal",
4605
+ "align": "center",
4561
4606
  "children": [
4562
4607
  {
4563
4608
  "name": "clipboard-list",
4564
4609
  "type": "icon"
4565
4610
  },
4566
4611
  {
4567
- "type": "typography",
4612
+ "content": "Order History",
4568
4613
  "variant": "h2",
4569
- "content": "Order History"
4614
+ "type": "typography"
4570
4615
  }
4571
- ],
4572
- "gap": "sm",
4573
- "direction": "horizontal"
4616
+ ]
4574
4617
  },
4575
4618
  {
4576
4619
  "gap": "sm",
4577
- "type": "stack",
4578
4620
  "direction": "horizontal",
4621
+ "type": "stack",
4579
4622
  "children": [
4580
4623
  {
4581
4624
  "type": "button",
4582
- "variant": "primary",
4583
- "label": "Create OrderRecord",
4584
4625
  "action": "CREATE",
4626
+ "label": "Create OrderRecord",
4627
+ "variant": "primary",
4585
4628
  "icon": "plus"
4586
4629
  }
4587
4630
  ]
4588
4631
  }
4589
4632
  ],
4590
- "align": "center",
4591
4633
  "type": "stack",
4592
- "justify": "between"
4634
+ "direction": "horizontal"
4593
4635
  },
4594
4636
  {
4595
4637
  "type": "divider"
4596
4638
  },
4597
4639
  {
4598
- "itemActions": [
4599
- {
4600
- "event": "VIEW",
4601
- "label": "View",
4602
- "variant": "ghost"
4603
- },
4604
- {
4605
- "label": "Edit",
4606
- "event": "EDIT",
4607
- "variant": "ghost"
4608
- },
4609
- {
4610
- "variant": "danger",
4611
- "event": "DELETE",
4612
- "label": "Delete"
4613
- }
4614
- ],
4615
- "gap": "sm",
4616
- "entity": "@payload.data",
4617
- "variant": "card",
4618
4640
  "fields": [
4619
4641
  {
4620
4642
  "icon": "clipboard-list",
@@ -4623,55 +4645,56 @@
4623
4645
  "name": "customerName"
4624
4646
  },
4625
4647
  {
4626
- "name": "status",
4627
- "variant": "badge"
4648
+ "variant": "badge",
4649
+ "name": "status"
4628
4650
  },
4629
4651
  {
4630
- "format": "currency",
4631
- "name": "orderTotal",
4632
4652
  "label": "Total",
4633
- "variant": "h4"
4653
+ "variant": "h4",
4654
+ "format": "currency",
4655
+ "name": "orderTotal"
4656
+ },
4657
+ {
4658
+ "variant": "caption",
4659
+ "name": "email"
4660
+ },
4661
+ {
4662
+ "name": "shippingAddress",
4663
+ "label": "Address",
4664
+ "variant": "caption"
4665
+ }
4666
+ ],
4667
+ "gap": "sm",
4668
+ "type": "data-list",
4669
+ "variant": "card",
4670
+ "entity": "@payload.data",
4671
+ "itemActions": [
4672
+ {
4673
+ "variant": "ghost",
4674
+ "label": "View",
4675
+ "event": "VIEW"
4634
4676
  },
4635
4677
  {
4636
- "name": "email",
4637
- "variant": "caption"
4678
+ "variant": "ghost",
4679
+ "label": "Edit",
4680
+ "event": "EDIT"
4638
4681
  },
4639
4682
  {
4640
- "variant": "caption",
4641
- "label": "Address",
4642
- "name": "shippingAddress"
4683
+ "label": "Delete",
4684
+ "event": "DELETE",
4685
+ "variant": "danger"
4643
4686
  }
4644
- ],
4645
- "type": "data-list"
4687
+ ]
4646
4688
  }
4647
4689
  ],
4690
+ "gap": "lg",
4648
4691
  "direction": "vertical",
4649
- "type": "stack",
4650
- "className": "max-w-5xl mx-auto w-full"
4692
+ "className": "max-w-5xl mx-auto w-full",
4693
+ "type": "stack"
4651
4694
  }
4652
4695
  ],
4653
- "navItems": [
4654
- {
4655
- "icon": "package",
4656
- "label": "Products",
4657
- "href": "/products"
4658
- },
4659
- {
4660
- "href": "/cart",
4661
- "label": "Cart",
4662
- "icon": "shopping-cart"
4663
- },
4664
- {
4665
- "href": "/checkout",
4666
- "icon": "credit-card",
4667
- "label": "Checkout"
4668
- },
4669
- {
4670
- "icon": "clipboard-list",
4671
- "label": "Orders",
4672
- "href": "/orders"
4673
- }
4674
- ]
4696
+ "type": "dashboard-layout",
4697
+ "appName": "EcommerceApp"
4675
4698
  }
4676
4699
  ]
4677
4700
  ]
@@ -4686,35 +4709,35 @@
4686
4709
  "main",
4687
4710
  {
4688
4711
  "gap": "md",
4689
- "className": "py-12",
4690
- "direction": "vertical",
4712
+ "type": "stack",
4691
4713
  "align": "center",
4714
+ "direction": "vertical",
4715
+ "className": "py-12",
4692
4716
  "children": [
4693
4717
  {
4694
4718
  "color": "destructive",
4695
- "name": "alert-triangle",
4696
- "type": "icon"
4719
+ "type": "icon",
4720
+ "name": "alert-triangle"
4697
4721
  },
4698
4722
  {
4699
- "content": "Failed to load orderrecord",
4700
4723
  "type": "typography",
4701
- "variant": "h3"
4724
+ "variant": "h3",
4725
+ "content": "Failed to load orderrecord"
4702
4726
  },
4703
4727
  {
4728
+ "content": "@payload.error",
4704
4729
  "color": "muted",
4705
4730
  "variant": "body",
4706
- "type": "typography",
4707
- "content": "@payload.error"
4731
+ "type": "typography"
4708
4732
  },
4709
4733
  {
4710
- "icon": "rotate-ccw",
4734
+ "action": "INIT",
4711
4735
  "type": "button",
4712
- "variant": "primary",
4713
4736
  "label": "Retry",
4714
- "action": "INIT"
4737
+ "variant": "primary",
4738
+ "icon": "rotate-ccw"
4715
4739
  }
4716
- ],
4717
- "type": "stack"
4740
+ ]
4718
4741
  }
4719
4742
  ]
4720
4743
  ]
@@ -4889,8 +4912,8 @@
4889
4912
  "OrderRecord",
4890
4913
  {
4891
4914
  "emit": {
4892
- "success": "OrderRecordLoaded",
4893
- "failure": "OrderRecordLoadFailed"
4915
+ "failure": "OrderRecordLoadFailed",
4916
+ "success": "OrderRecordLoaded"
4894
4917
  }
4895
4918
  }
4896
4919
  ]
@@ -4906,8 +4929,8 @@
4906
4929
  "OrderRecord",
4907
4930
  {
4908
4931
  "emit": {
4909
- "success": "OrderRecordLoaded",
4910
- "failure": "OrderRecordLoadFailed"
4932
+ "failure": "OrderRecordLoadFailed",
4933
+ "success": "OrderRecordLoaded"
4911
4934
  }
4912
4935
  }
4913
4936
  ],
@@ -4915,31 +4938,30 @@
4915
4938
  "render-ui",
4916
4939
  "modal",
4917
4940
  {
4918
- "direction": "vertical",
4919
4941
  "type": "stack",
4942
+ "direction": "vertical",
4943
+ "gap": "md",
4920
4944
  "children": [
4921
4945
  {
4922
4946
  "gap": "sm",
4923
4947
  "direction": "horizontal",
4924
- "type": "stack",
4925
4948
  "children": [
4926
4949
  {
4927
- "name": "plus-circle",
4928
- "type": "icon"
4950
+ "type": "icon",
4951
+ "name": "plus-circle"
4929
4952
  },
4930
4953
  {
4931
- "content": "Create OrderRecord",
4932
4954
  "type": "typography",
4955
+ "content": "Create OrderRecord",
4933
4956
  "variant": "h3"
4934
4957
  }
4935
- ]
4958
+ ],
4959
+ "type": "stack"
4936
4960
  },
4937
4961
  {
4938
4962
  "type": "divider"
4939
4963
  },
4940
4964
  {
4941
- "cancelEvent": "CLOSE",
4942
- "type": "form-section",
4943
4965
  "submitEvent": "SAVE",
4944
4966
  "fields": [
4945
4967
  "customerName",
@@ -4949,10 +4971,11 @@
4949
4971
  "orderTotal",
4950
4972
  "status"
4951
4973
  ],
4952
- "mode": "create"
4974
+ "type": "form-section",
4975
+ "mode": "create",
4976
+ "cancelEvent": "CLOSE"
4953
4977
  }
4954
- ],
4955
- "gap": "md"
4978
+ ]
4956
4979
  }
4957
4980
  ]
4958
4981
  ]
@@ -4993,8 +5016,8 @@
4993
5016
  "@payload.data",
4994
5017
  {
4995
5018
  "emit": {
4996
- "success": "OrderRecordSaved",
4997
- "failure": "OrderRecordSaveFailed"
5019
+ "failure": "OrderRecordSaveFailed",
5020
+ "success": "OrderRecordSaved"
4998
5021
  }
4999
5022
  }
5000
5023
  ],
@@ -5204,8 +5227,8 @@
5204
5227
  "OrderRecord",
5205
5228
  {
5206
5229
  "emit": {
5207
- "failure": "OrderRecordLoadFailed",
5208
- "success": "OrderRecordLoaded"
5230
+ "success": "OrderRecordLoaded",
5231
+ "failure": "OrderRecordLoadFailed"
5209
5232
  }
5210
5233
  }
5211
5234
  ]
@@ -5231,23 +5254,21 @@
5231
5254
  "render-ui",
5232
5255
  "modal",
5233
5256
  {
5234
- "direction": "vertical",
5235
5257
  "gap": "md",
5236
- "type": "stack",
5237
5258
  "children": [
5238
5259
  {
5239
- "type": "stack",
5240
- "gap": "sm",
5241
5260
  "direction": "horizontal",
5261
+ "gap": "sm",
5262
+ "type": "stack",
5242
5263
  "children": [
5243
5264
  {
5244
- "name": "edit",
5245
- "type": "icon"
5265
+ "type": "icon",
5266
+ "name": "edit"
5246
5267
  },
5247
5268
  {
5248
- "type": "typography",
5269
+ "variant": "h3",
5249
5270
  "content": "Edit OrderRecord",
5250
- "variant": "h3"
5271
+ "type": "typography"
5251
5272
  }
5252
5273
  ]
5253
5274
  },
@@ -5255,6 +5276,9 @@
5255
5276
  "type": "divider"
5256
5277
  },
5257
5278
  {
5279
+ "submitEvent": "SAVE",
5280
+ "mode": "edit",
5281
+ "cancelEvent": "CLOSE",
5258
5282
  "fields": [
5259
5283
  "customerName",
5260
5284
  "email",
@@ -5263,13 +5287,12 @@
5263
5287
  "orderTotal",
5264
5288
  "status"
5265
5289
  ],
5266
- "cancelEvent": "CLOSE",
5267
- "type": "form-section",
5268
- "mode": "edit",
5269
5290
  "entity": "@payload.row",
5270
- "submitEvent": "SAVE"
5291
+ "type": "form-section"
5271
5292
  }
5272
- ]
5293
+ ],
5294
+ "type": "stack",
5295
+ "direction": "vertical"
5273
5296
  }
5274
5297
  ]
5275
5298
  ]
@@ -5518,24 +5541,21 @@
5518
5541
  "render-ui",
5519
5542
  "modal",
5520
5543
  {
5521
- "gap": "md",
5522
- "direction": "vertical",
5523
- "type": "stack",
5524
5544
  "children": [
5525
5545
  {
5526
5546
  "type": "stack",
5527
- "direction": "horizontal",
5528
- "align": "center",
5529
5547
  "gap": "sm",
5548
+ "align": "center",
5549
+ "direction": "horizontal",
5530
5550
  "children": [
5531
5551
  {
5532
5552
  "type": "icon",
5533
5553
  "name": "eye"
5534
5554
  },
5535
5555
  {
5536
- "type": "typography",
5556
+ "content": "@entity.customerName",
5537
5557
  "variant": "h3",
5538
- "content": "@entity.customerName"
5558
+ "type": "typography"
5539
5559
  }
5540
5560
  ]
5541
5561
  },
@@ -5543,13 +5563,11 @@
5543
5563
  "type": "divider"
5544
5564
  },
5545
5565
  {
5546
- "gap": "md",
5547
- "type": "stack",
5548
5566
  "children": [
5549
5567
  {
5550
5568
  "content": "Customer Name",
5551
- "variant": "caption",
5552
- "type": "typography"
5569
+ "type": "typography",
5570
+ "variant": "caption"
5553
5571
  },
5554
5572
  {
5555
5573
  "type": "typography",
@@ -5557,9 +5575,14 @@
5557
5575
  "content": "@entity.customerName"
5558
5576
  }
5559
5577
  ],
5560
- "direction": "horizontal"
5578
+ "direction": "horizontal",
5579
+ "type": "stack",
5580
+ "gap": "md"
5561
5581
  },
5562
5582
  {
5583
+ "gap": "md",
5584
+ "type": "stack",
5585
+ "direction": "horizontal",
5563
5586
  "children": [
5564
5587
  {
5565
5588
  "type": "typography",
@@ -5568,78 +5591,75 @@
5568
5591
  },
5569
5592
  {
5570
5593
  "variant": "body",
5571
- "content": "@entity.email",
5572
- "type": "typography"
5594
+ "type": "typography",
5595
+ "content": "@entity.email"
5573
5596
  }
5574
- ],
5575
- "gap": "md",
5576
- "type": "stack",
5577
- "direction": "horizontal"
5597
+ ]
5578
5598
  },
5579
5599
  {
5580
- "gap": "md",
5581
- "type": "stack",
5582
- "direction": "horizontal",
5583
5600
  "children": [
5584
5601
  {
5585
- "type": "typography",
5602
+ "variant": "caption",
5586
5603
  "content": "Shipping Address",
5587
- "variant": "caption"
5604
+ "type": "typography"
5588
5605
  },
5589
5606
  {
5607
+ "type": "typography",
5590
5608
  "content": "@entity.shippingAddress",
5591
- "variant": "body",
5592
- "type": "typography"
5609
+ "variant": "body"
5593
5610
  }
5594
- ]
5595
- },
5596
- {
5611
+ ],
5597
5612
  "type": "stack",
5598
5613
  "direction": "horizontal",
5614
+ "gap": "md"
5615
+ },
5616
+ {
5617
+ "gap": "md",
5599
5618
  "children": [
5600
5619
  {
5601
- "variant": "caption",
5602
5620
  "content": "Payment Method",
5603
- "type": "typography"
5621
+ "type": "typography",
5622
+ "variant": "caption"
5604
5623
  },
5605
5624
  {
5606
- "variant": "body",
5625
+ "type": "typography",
5607
5626
  "content": "@entity.paymentMethod",
5608
- "type": "typography"
5627
+ "variant": "body"
5609
5628
  }
5610
5629
  ],
5611
- "gap": "md"
5630
+ "direction": "horizontal",
5631
+ "type": "stack"
5612
5632
  },
5613
5633
  {
5614
5634
  "children": [
5615
5635
  {
5616
- "type": "typography",
5617
5636
  "content": "Order Total",
5618
- "variant": "caption"
5637
+ "variant": "caption",
5638
+ "type": "typography"
5619
5639
  },
5620
5640
  {
5621
- "content": "@entity.orderTotal",
5622
5641
  "type": "typography",
5623
- "variant": "body"
5642
+ "variant": "body",
5643
+ "content": "@entity.orderTotal"
5624
5644
  }
5625
5645
  ],
5626
- "direction": "horizontal",
5627
5646
  "type": "stack",
5647
+ "direction": "horizontal",
5628
5648
  "gap": "md"
5629
5649
  },
5630
5650
  {
5631
- "gap": "md",
5632
5651
  "direction": "horizontal",
5652
+ "gap": "md",
5633
5653
  "children": [
5634
5654
  {
5635
- "content": "Status",
5636
5655
  "variant": "caption",
5637
- "type": "typography"
5656
+ "type": "typography",
5657
+ "content": "Status"
5638
5658
  },
5639
5659
  {
5640
- "content": "@entity.status",
5660
+ "type": "typography",
5641
5661
  "variant": "body",
5642
- "type": "typography"
5662
+ "content": "@entity.status"
5643
5663
  }
5644
5664
  ],
5645
5665
  "type": "stack"
@@ -5648,27 +5668,30 @@
5648
5668
  "type": "divider"
5649
5669
  },
5650
5670
  {
5651
- "type": "stack",
5652
- "direction": "horizontal",
5653
5671
  "children": [
5654
5672
  {
5655
- "type": "button",
5656
- "label": "Edit",
5657
- "action": "EDIT",
5658
5673
  "variant": "primary",
5659
- "icon": "edit"
5674
+ "action": "EDIT",
5675
+ "label": "Edit",
5676
+ "icon": "edit",
5677
+ "type": "button"
5660
5678
  },
5661
5679
  {
5662
5680
  "label": "Close",
5681
+ "action": "CLOSE",
5663
5682
  "variant": "ghost",
5664
- "type": "button",
5665
- "action": "CLOSE"
5683
+ "type": "button"
5666
5684
  }
5667
5685
  ],
5686
+ "direction": "horizontal",
5687
+ "type": "stack",
5668
5688
  "gap": "sm",
5669
5689
  "justify": "end"
5670
5690
  }
5671
- ]
5691
+ ],
5692
+ "type": "stack",
5693
+ "direction": "vertical",
5694
+ "gap": "md"
5672
5695
  }
5673
5696
  ]
5674
5697
  ]
@@ -5890,8 +5913,8 @@
5890
5913
  "OrderRecord",
5891
5914
  {
5892
5915
  "emit": {
5893
- "failure": "OrderRecordLoadFailed",
5894
- "success": "OrderRecordLoaded"
5916
+ "success": "OrderRecordLoaded",
5917
+ "failure": "OrderRecordLoadFailed"
5895
5918
  }
5896
5919
  }
5897
5920
  ]
@@ -5922,23 +5945,26 @@
5922
5945
  "render-ui",
5923
5946
  "modal",
5924
5947
  {
5948
+ "type": "stack",
5949
+ "gap": "md",
5950
+ "direction": "vertical",
5925
5951
  "children": [
5926
5952
  {
5927
- "type": "stack",
5928
- "align": "center",
5929
5953
  "direction": "horizontal",
5930
- "gap": "sm",
5931
5954
  "children": [
5932
5955
  {
5933
- "type": "icon",
5934
- "name": "alert-triangle"
5956
+ "name": "alert-triangle",
5957
+ "type": "icon"
5935
5958
  },
5936
5959
  {
5937
- "content": "Delete OrderRecord",
5960
+ "type": "typography",
5938
5961
  "variant": "h3",
5939
- "type": "typography"
5962
+ "content": "Delete OrderRecord"
5940
5963
  }
5941
- ]
5964
+ ],
5965
+ "type": "stack",
5966
+ "gap": "sm",
5967
+ "align": "center"
5942
5968
  },
5943
5969
  {
5944
5970
  "type": "divider"
@@ -5949,30 +5975,27 @@
5949
5975
  "message": "This action cannot be undone."
5950
5976
  },
5951
5977
  {
5952
- "direction": "horizontal",
5953
- "type": "stack",
5954
- "gap": "sm",
5955
5978
  "justify": "end",
5956
5979
  "children": [
5957
5980
  {
5958
- "variant": "ghost",
5959
5981
  "action": "CANCEL",
5982
+ "label": "Cancel",
5960
5983
  "type": "button",
5961
- "label": "Cancel"
5984
+ "variant": "ghost"
5962
5985
  },
5963
5986
  {
5964
- "type": "button",
5965
- "label": "Delete",
5987
+ "icon": "check",
5966
5988
  "action": "CONFIRM_DELETE",
5989
+ "label": "Delete",
5967
5990
  "variant": "danger",
5968
- "icon": "check"
5991
+ "type": "button"
5969
5992
  }
5970
- ]
5993
+ ],
5994
+ "gap": "sm",
5995
+ "type": "stack",
5996
+ "direction": "horizontal"
5971
5997
  }
5972
- ],
5973
- "direction": "vertical",
5974
- "type": "stack",
5975
- "gap": "md"
5998
+ ]
5976
5999
  }
5977
6000
  ]
5978
6001
  ]
@@ -5989,8 +6012,8 @@
5989
6012
  "@entity.pendingId",
5990
6013
  {
5991
6014
  "emit": {
5992
- "success": "OrderRecordDeleted",
5993
- "failure": "OrderRecordDeleteFailed"
6015
+ "failure": "OrderRecordDeleteFailed",
6016
+ "success": "OrderRecordDeleted"
5994
6017
  }
5995
6018
  }
5996
6019
  ],
@@ -6011,8 +6034,8 @@
6011
6034
  "OrderRecord",
6012
6035
  {
6013
6036
  "emit": {
6014
- "failure": "OrderRecordLoadFailed",
6015
- "success": "OrderRecordLoaded"
6037
+ "success": "OrderRecordLoaded",
6038
+ "failure": "OrderRecordLoadFailed"
6016
6039
  }
6017
6040
  }
6018
6041
  ],