@almadar/std 16.98.0 → 16.99.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.
@@ -32,6 +32,31 @@
32
32
  "name": "label",
33
33
  "required": false,
34
34
  "type": "string"
35
+ },
36
+ "options": {
37
+ "items": {
38
+ "properties": {
39
+ "categoryId": {
40
+ "name": "categoryId",
41
+ "required": true,
42
+ "type": "string"
43
+ },
44
+ "itemId": {
45
+ "name": "itemId",
46
+ "required": true,
47
+ "type": "string"
48
+ },
49
+ "label": {
50
+ "name": "label",
51
+ "required": false,
52
+ "type": "string"
53
+ }
54
+ },
55
+ "type": "object"
56
+ },
57
+ "name": "options",
58
+ "required": false,
59
+ "type": "array"
35
60
  }
36
61
  },
37
62
  "type": "object"
@@ -256,6 +281,31 @@
256
281
  "name": "label",
257
282
  "required": false,
258
283
  "type": "string"
284
+ },
285
+ "options": {
286
+ "items": {
287
+ "properties": {
288
+ "categoryId": {
289
+ "name": "categoryId",
290
+ "required": true,
291
+ "type": "string"
292
+ },
293
+ "itemId": {
294
+ "name": "itemId",
295
+ "required": true,
296
+ "type": "string"
297
+ },
298
+ "label": {
299
+ "name": "label",
300
+ "required": false,
301
+ "type": "string"
302
+ }
303
+ },
304
+ "type": "object"
305
+ },
306
+ "name": "options",
307
+ "required": false,
308
+ "type": "array"
259
309
  }
260
310
  },
261
311
  "type": "object"
@@ -496,7 +546,45 @@
496
546
  [
497
547
  "set",
498
548
  "@entity.items",
499
- "@config.items"
549
+ [
550
+ "array/map",
551
+ "@config.items",
552
+ [
553
+ "fn",
554
+ "i",
555
+ [
556
+ "object/merge",
557
+ "@i",
558
+ {
559
+ "options": [
560
+ "array/map",
561
+ "@config.categories",
562
+ [
563
+ "fn",
564
+ "c",
565
+ {
566
+ "categoryId": [
567
+ "object/get",
568
+ "@c",
569
+ "id"
570
+ ],
571
+ "itemId": [
572
+ "object/get",
573
+ "@i",
574
+ "id"
575
+ ],
576
+ "label": [
577
+ "object/get",
578
+ "@c",
579
+ "label"
580
+ ]
581
+ }
582
+ ]
583
+ ]
584
+ }
585
+ ]
586
+ ]
587
+ ]
500
588
  ],
501
589
  [
502
590
  "set",
@@ -577,30 +665,21 @@
577
665
  "type": "stack"
578
666
  },
579
667
  {
580
- "entity": "@entity.categories",
668
+ "entity": "@i.options",
581
669
  "fields": [],
582
670
  "gap": "xs",
583
671
  "renderItem": [
584
672
  "fn",
585
- "c",
673
+ "opt",
586
674
  {
587
675
  "action": "ASSIGN",
588
676
  "actionPayload": {
589
- "categoryId": "@c.id",
590
- "itemId": "@i.id"
677
+ "categoryId": "@opt.categoryId",
678
+ "itemId": "@opt.itemId"
591
679
  },
592
- "label": "@c.label",
680
+ "label": "@opt.label",
593
681
  "type": "button",
594
- "variant": [
595
- "if",
596
- [
597
- "==",
598
- "@i.assignedCategory",
599
- "@c.id"
600
- ],
601
- "success",
602
- "ghost"
603
- ]
682
+ "variant": "primary"
604
683
  }
605
684
  ],
606
685
  "type": "data-list"
@@ -668,7 +747,45 @@
668
747
  [
669
748
  "set",
670
749
  "@entity.items",
671
- "@config.items"
750
+ [
751
+ "array/map",
752
+ "@config.items",
753
+ [
754
+ "fn",
755
+ "i",
756
+ [
757
+ "object/merge",
758
+ "@i",
759
+ {
760
+ "options": [
761
+ "array/map",
762
+ "@config.categories",
763
+ [
764
+ "fn",
765
+ "c",
766
+ {
767
+ "categoryId": [
768
+ "object/get",
769
+ "@c",
770
+ "id"
771
+ ],
772
+ "itemId": [
773
+ "object/get",
774
+ "@i",
775
+ "id"
776
+ ],
777
+ "label": [
778
+ "object/get",
779
+ "@c",
780
+ "label"
781
+ ]
782
+ }
783
+ ]
784
+ ]
785
+ }
786
+ ]
787
+ ]
788
+ ]
672
789
  ],
673
790
  [
674
791
  "set",
@@ -749,30 +866,21 @@
749
866
  "type": "stack"
750
867
  },
751
868
  {
752
- "entity": "@entity.categories",
869
+ "entity": "@i.options",
753
870
  "fields": [],
754
871
  "gap": "xs",
755
872
  "renderItem": [
756
873
  "fn",
757
- "c",
874
+ "opt",
758
875
  {
759
876
  "action": "ASSIGN",
760
877
  "actionPayload": {
761
- "categoryId": "@c.id",
762
- "itemId": "@i.id"
878
+ "categoryId": "@opt.categoryId",
879
+ "itemId": "@opt.itemId"
763
880
  },
764
- "label": "@c.label",
881
+ "label": "@opt.label",
765
882
  "type": "button",
766
- "variant": [
767
- "if",
768
- [
769
- "==",
770
- "@i.assignedCategory",
771
- "@c.id"
772
- ],
773
- "success",
774
- "ghost"
775
- ]
883
+ "variant": "primary"
776
884
  }
777
885
  ],
778
886
  "type": "data-list"
@@ -914,30 +1022,21 @@
914
1022
  "type": "stack"
915
1023
  },
916
1024
  {
917
- "entity": "@entity.categories",
1025
+ "entity": "@i.options",
918
1026
  "fields": [],
919
1027
  "gap": "xs",
920
1028
  "renderItem": [
921
1029
  "fn",
922
- "c",
1030
+ "opt",
923
1031
  {
924
1032
  "action": "ASSIGN",
925
1033
  "actionPayload": {
926
- "categoryId": "@c.id",
927
- "itemId": "@i.id"
1034
+ "categoryId": "@opt.categoryId",
1035
+ "itemId": "@opt.itemId"
928
1036
  },
929
- "label": "@c.label",
1037
+ "label": "@opt.label",
930
1038
  "type": "button",
931
- "variant": [
932
- "if",
933
- [
934
- "==",
935
- "@i.assignedCategory",
936
- "@c.id"
937
- ],
938
- "success",
939
- "ghost"
940
- ]
1039
+ "variant": "primary"
941
1040
  }
942
1041
  ],
943
1042
  "type": "data-list"
@@ -1065,30 +1164,21 @@
1065
1164
  "type": "stack"
1066
1165
  },
1067
1166
  {
1068
- "entity": "@entity.categories",
1167
+ "entity": "@i.options",
1069
1168
  "fields": [],
1070
1169
  "gap": "xs",
1071
1170
  "renderItem": [
1072
1171
  "fn",
1073
- "c",
1172
+ "opt",
1074
1173
  {
1075
1174
  "action": "ASSIGN",
1076
1175
  "actionPayload": {
1077
- "categoryId": "@c.id",
1078
- "itemId": "@i.id"
1176
+ "categoryId": "@opt.categoryId",
1177
+ "itemId": "@opt.itemId"
1079
1178
  },
1080
- "label": "@c.label",
1179
+ "label": "@opt.label",
1081
1180
  "type": "button",
1082
- "variant": [
1083
- "if",
1084
- [
1085
- "==",
1086
- "@i.assignedCategory",
1087
- "@c.id"
1088
- ],
1089
- "success",
1090
- "ghost"
1091
- ]
1181
+ "variant": "primary"
1092
1182
  }
1093
1183
  ],
1094
1184
  "type": "data-list"
@@ -1239,30 +1329,21 @@
1239
1329
  "type": "stack"
1240
1330
  },
1241
1331
  {
1242
- "entity": "@entity.categories",
1332
+ "entity": "@i.options",
1243
1333
  "fields": [],
1244
1334
  "gap": "xs",
1245
1335
  "renderItem": [
1246
1336
  "fn",
1247
- "c",
1337
+ "opt",
1248
1338
  {
1249
1339
  "action": "ASSIGN",
1250
1340
  "actionPayload": {
1251
- "categoryId": "@c.id",
1252
- "itemId": "@i.id"
1341
+ "categoryId": "@opt.categoryId",
1342
+ "itemId": "@opt.itemId"
1253
1343
  },
1254
- "label": "@c.label",
1344
+ "label": "@opt.label",
1255
1345
  "type": "button",
1256
- "variant": [
1257
- "if",
1258
- [
1259
- "==",
1260
- "@i.assignedCategory",
1261
- "@c.id"
1262
- ],
1263
- "success",
1264
- "ghost"
1265
- ]
1346
+ "variant": "primary"
1266
1347
  }
1267
1348
  ],
1268
1349
  "type": "data-list"
@@ -1358,7 +1439,45 @@
1358
1439
  [
1359
1440
  "set",
1360
1441
  "@entity.items",
1361
- "@config.items"
1442
+ [
1443
+ "array/map",
1444
+ "@config.items",
1445
+ [
1446
+ "fn",
1447
+ "i",
1448
+ [
1449
+ "object/merge",
1450
+ "@i",
1451
+ {
1452
+ "options": [
1453
+ "array/map",
1454
+ "@config.categories",
1455
+ [
1456
+ "fn",
1457
+ "c",
1458
+ {
1459
+ "categoryId": [
1460
+ "object/get",
1461
+ "@c",
1462
+ "id"
1463
+ ],
1464
+ "itemId": [
1465
+ "object/get",
1466
+ "@i",
1467
+ "id"
1468
+ ],
1469
+ "label": [
1470
+ "object/get",
1471
+ "@c",
1472
+ "label"
1473
+ ]
1474
+ }
1475
+ ]
1476
+ ]
1477
+ }
1478
+ ]
1479
+ ]
1480
+ ]
1362
1481
  ],
1363
1482
  [
1364
1483
  "set",
@@ -1439,30 +1558,21 @@
1439
1558
  "type": "stack"
1440
1559
  },
1441
1560
  {
1442
- "entity": "@entity.categories",
1561
+ "entity": "@i.options",
1443
1562
  "fields": [],
1444
1563
  "gap": "xs",
1445
1564
  "renderItem": [
1446
1565
  "fn",
1447
- "c",
1566
+ "opt",
1448
1567
  {
1449
1568
  "action": "ASSIGN",
1450
1569
  "actionPayload": {
1451
- "categoryId": "@c.id",
1452
- "itemId": "@i.id"
1570
+ "categoryId": "@opt.categoryId",
1571
+ "itemId": "@opt.itemId"
1453
1572
  },
1454
- "label": "@c.label",
1573
+ "label": "@opt.label",
1455
1574
  "type": "button",
1456
- "variant": [
1457
- "if",
1458
- [
1459
- "==",
1460
- "@i.assignedCategory",
1461
- "@c.id"
1462
- ],
1463
- "success",
1464
- "ghost"
1465
- ]
1575
+ "variant": "primary"
1466
1576
  }
1467
1577
  ],
1468
1578
  "type": "data-list"