@vaadin/crud 25.1.0-beta2 → 25.1.0-beta4
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.
- package/custom-elements.json +136 -18
- package/package.json +17 -17
- package/src/vaadin-crud-edit-column.js +6 -2
- package/src/vaadin-crud-grid-mixin.js +9 -3
- package/src/vaadin-crud-include-mixin.js +2 -0
- package/src/vaadin-crud-mixin.js +15 -8
- package/web-types.json +30 -12
- package/web-types.lit.json +4 -4
package/custom-elements.json
CHANGED
|
@@ -60,6 +60,9 @@
|
|
|
60
60
|
"kind": "field",
|
|
61
61
|
"name": "ariaLabel",
|
|
62
62
|
"privacy": "public",
|
|
63
|
+
"type": {
|
|
64
|
+
"text": "string"
|
|
65
|
+
},
|
|
63
66
|
"description": "The arial-label for the edit button",
|
|
64
67
|
"attribute": "aria-label"
|
|
65
68
|
},
|
|
@@ -265,7 +268,7 @@
|
|
|
265
268
|
"name": "textAlign",
|
|
266
269
|
"privacy": "public",
|
|
267
270
|
"type": {
|
|
268
|
-
"text": "
|
|
271
|
+
"text": "string"
|
|
269
272
|
},
|
|
270
273
|
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
271
274
|
"attribute": "text-align",
|
|
@@ -292,6 +295,9 @@
|
|
|
292
295
|
"attributes": [
|
|
293
296
|
{
|
|
294
297
|
"name": "aria-label",
|
|
298
|
+
"type": {
|
|
299
|
+
"text": "string"
|
|
300
|
+
},
|
|
295
301
|
"description": "The arial-label for the edit button",
|
|
296
302
|
"fieldName": "ariaLabel"
|
|
297
303
|
},
|
|
@@ -467,7 +473,7 @@
|
|
|
467
473
|
{
|
|
468
474
|
"name": "text-align",
|
|
469
475
|
"type": {
|
|
470
|
-
"text": "
|
|
476
|
+
"text": "string"
|
|
471
477
|
},
|
|
472
478
|
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
473
479
|
"fieldName": "textAlign",
|
|
@@ -580,10 +586,10 @@
|
|
|
580
586
|
"kind": "field",
|
|
581
587
|
"name": "exclude",
|
|
582
588
|
"privacy": "public",
|
|
583
|
-
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
584
589
|
"type": {
|
|
585
590
|
"text": "string | RegExp"
|
|
586
591
|
},
|
|
592
|
+
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
587
593
|
"attribute": "exclude",
|
|
588
594
|
"inheritedFrom": {
|
|
589
595
|
"name": "IncludedMixin",
|
|
@@ -604,10 +610,10 @@
|
|
|
604
610
|
"kind": "field",
|
|
605
611
|
"name": "include",
|
|
606
612
|
"privacy": "public",
|
|
607
|
-
"description": "A list of item properties that should be mapped to form fields.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud-form#property-exclude) is ignored.",
|
|
608
613
|
"type": {
|
|
609
614
|
"text": "string | !Array<string> | undefined"
|
|
610
615
|
},
|
|
616
|
+
"description": "A list of item properties that should be mapped to form fields.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud-form#property-exclude) is ignored.",
|
|
611
617
|
"attribute": "include",
|
|
612
618
|
"inheritedFrom": {
|
|
613
619
|
"name": "IncludedMixin",
|
|
@@ -618,6 +624,9 @@
|
|
|
618
624
|
"kind": "field",
|
|
619
625
|
"name": "noFilter",
|
|
620
626
|
"privacy": "public",
|
|
627
|
+
"type": {
|
|
628
|
+
"text": "boolean"
|
|
629
|
+
},
|
|
621
630
|
"description": "Disable filtering in the generated columns.",
|
|
622
631
|
"attribute": "no-filter"
|
|
623
632
|
},
|
|
@@ -625,6 +634,9 @@
|
|
|
625
634
|
"kind": "field",
|
|
626
635
|
"name": "noHead",
|
|
627
636
|
"privacy": "public",
|
|
637
|
+
"type": {
|
|
638
|
+
"text": "boolean"
|
|
639
|
+
},
|
|
628
640
|
"description": "Do not add headers to columns.",
|
|
629
641
|
"attribute": "no-head"
|
|
630
642
|
},
|
|
@@ -632,6 +644,9 @@
|
|
|
632
644
|
"kind": "field",
|
|
633
645
|
"name": "noSort",
|
|
634
646
|
"privacy": "public",
|
|
647
|
+
"type": {
|
|
648
|
+
"text": "boolean"
|
|
649
|
+
},
|
|
635
650
|
"description": "Disable sorting in the generated columns.",
|
|
636
651
|
"attribute": "no-sort"
|
|
637
652
|
}
|
|
@@ -639,10 +654,10 @@
|
|
|
639
654
|
"attributes": [
|
|
640
655
|
{
|
|
641
656
|
"name": "exclude",
|
|
642
|
-
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
643
657
|
"type": {
|
|
644
658
|
"text": "string | RegExp"
|
|
645
659
|
},
|
|
660
|
+
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
646
661
|
"fieldName": "exclude",
|
|
647
662
|
"inheritedFrom": {
|
|
648
663
|
"name": "IncludedMixin",
|
|
@@ -659,16 +674,25 @@
|
|
|
659
674
|
},
|
|
660
675
|
{
|
|
661
676
|
"name": "no-filter",
|
|
677
|
+
"type": {
|
|
678
|
+
"text": "boolean"
|
|
679
|
+
},
|
|
662
680
|
"description": "Disable filtering in the generated columns.",
|
|
663
681
|
"fieldName": "noFilter"
|
|
664
682
|
},
|
|
665
683
|
{
|
|
666
684
|
"name": "no-head",
|
|
685
|
+
"type": {
|
|
686
|
+
"text": "boolean"
|
|
687
|
+
},
|
|
667
688
|
"description": "Do not add headers to columns.",
|
|
668
689
|
"fieldName": "noHead"
|
|
669
690
|
},
|
|
670
691
|
{
|
|
671
692
|
"name": "no-sort",
|
|
693
|
+
"type": {
|
|
694
|
+
"text": "boolean"
|
|
695
|
+
},
|
|
672
696
|
"description": "Disable sorting in the generated columns.",
|
|
673
697
|
"fieldName": "noSort"
|
|
674
698
|
}
|
|
@@ -895,30 +919,30 @@
|
|
|
895
919
|
"kind": "field",
|
|
896
920
|
"name": "exclude",
|
|
897
921
|
"privacy": "public",
|
|
898
|
-
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
899
922
|
"type": {
|
|
900
923
|
"text": "string | RegExp"
|
|
901
924
|
},
|
|
925
|
+
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
902
926
|
"attribute": "exclude"
|
|
903
927
|
},
|
|
904
928
|
{
|
|
905
929
|
"kind": "field",
|
|
906
930
|
"name": "include",
|
|
907
931
|
"privacy": "public",
|
|
908
|
-
"description": "A list of item properties that should be mapped to form fields.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud-form#property-exclude) is ignored.",
|
|
909
932
|
"type": {
|
|
910
933
|
"text": "string | !Array<string> | undefined"
|
|
911
934
|
},
|
|
935
|
+
"description": "A list of item properties that should be mapped to form fields.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud-form#property-exclude) is ignored.",
|
|
912
936
|
"attribute": "include"
|
|
913
937
|
}
|
|
914
938
|
],
|
|
915
939
|
"attributes": [
|
|
916
940
|
{
|
|
917
941
|
"name": "exclude",
|
|
918
|
-
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
919
942
|
"type": {
|
|
920
943
|
"text": "string | RegExp"
|
|
921
944
|
},
|
|
945
|
+
"description": "A list of item fields that should not be mapped to form fields.\n\nWhen [`include`](#/elements/vaadin-crud-form#property-include) is defined, this property is ignored.\n\nDefault is to exclude any private property.",
|
|
922
946
|
"fieldName": "exclude"
|
|
923
947
|
}
|
|
924
948
|
],
|
|
@@ -964,7 +988,7 @@
|
|
|
964
988
|
"name": "editedItem",
|
|
965
989
|
"privacy": "public",
|
|
966
990
|
"type": {
|
|
967
|
-
"text": "
|
|
991
|
+
"text": "object"
|
|
968
992
|
},
|
|
969
993
|
"description": "The item being edited in the dialog.",
|
|
970
994
|
"attribute": "edited-item"
|
|
@@ -994,7 +1018,7 @@
|
|
|
994
1018
|
"name": "editorPosition",
|
|
995
1019
|
"privacy": "public",
|
|
996
1020
|
"type": {
|
|
997
|
-
"text": "
|
|
1021
|
+
"text": "string"
|
|
998
1022
|
},
|
|
999
1023
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
1000
1024
|
"attribute": "editor-position"
|
|
@@ -1003,16 +1027,21 @@
|
|
|
1003
1027
|
"kind": "field",
|
|
1004
1028
|
"name": "exclude",
|
|
1005
1029
|
"privacy": "public",
|
|
1030
|
+
"type": {
|
|
1031
|
+
"text": "string"
|
|
1032
|
+
},
|
|
1006
1033
|
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
1007
1034
|
"attribute": "exclude"
|
|
1008
1035
|
},
|
|
1009
1036
|
{
|
|
1010
1037
|
"kind": "field",
|
|
1011
1038
|
"name": "i18n",
|
|
1012
|
-
"
|
|
1039
|
+
"privacy": "public",
|
|
1013
1040
|
"type": {
|
|
1014
1041
|
"text": "Object"
|
|
1015
1042
|
},
|
|
1043
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n newItem: 'New item',\n editItem: 'Edit item',\n saveItem: 'Save',\n cancel: 'Cancel',\n deleteItem: 'Delete...',\n editLabel: 'Edit',\n confirm: {\n delete: {\n title: 'Confirm delete',\n content: 'Are you sure you want to delete the selected item? This action cannot be undone.',\n button: {\n confirm: 'Delete',\n dismiss: 'Cancel'\n }\n },\n cancel: {\n title: 'Unsaved changes',\n content: 'There are unsaved modifications to the item.',\n button: {\n confirm: 'Discard',\n dismiss: 'Continue editing'\n }\n }\n }\n}\n```",
|
|
1044
|
+
"attribute": "i18n",
|
|
1016
1045
|
"inheritedFrom": {
|
|
1017
1046
|
"name": "I18nMixin",
|
|
1018
1047
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -1022,6 +1051,9 @@
|
|
|
1022
1051
|
"kind": "field",
|
|
1023
1052
|
"name": "include",
|
|
1024
1053
|
"privacy": "public",
|
|
1054
|
+
"type": {
|
|
1055
|
+
"text": "string"
|
|
1056
|
+
},
|
|
1025
1057
|
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
1026
1058
|
"attribute": "include"
|
|
1027
1059
|
},
|
|
@@ -1030,7 +1062,7 @@
|
|
|
1030
1062
|
"name": "items",
|
|
1031
1063
|
"privacy": "public",
|
|
1032
1064
|
"type": {
|
|
1033
|
-
"text": "
|
|
1065
|
+
"text": "array"
|
|
1034
1066
|
},
|
|
1035
1067
|
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
1036
1068
|
"attribute": "items"
|
|
@@ -1039,6 +1071,9 @@
|
|
|
1039
1071
|
"kind": "field",
|
|
1040
1072
|
"name": "noFilter",
|
|
1041
1073
|
"privacy": "public",
|
|
1074
|
+
"type": {
|
|
1075
|
+
"text": "boolean"
|
|
1076
|
+
},
|
|
1042
1077
|
"description": "Disable filtering when grid is autoconfigured.",
|
|
1043
1078
|
"attribute": "no-filter"
|
|
1044
1079
|
},
|
|
@@ -1046,6 +1081,9 @@
|
|
|
1046
1081
|
"kind": "field",
|
|
1047
1082
|
"name": "noHead",
|
|
1048
1083
|
"privacy": "public",
|
|
1084
|
+
"type": {
|
|
1085
|
+
"text": "boolean"
|
|
1086
|
+
},
|
|
1049
1087
|
"description": "Remove grid headers when it is autoconfigured.",
|
|
1050
1088
|
"attribute": "no-head"
|
|
1051
1089
|
},
|
|
@@ -1053,6 +1091,9 @@
|
|
|
1053
1091
|
"kind": "field",
|
|
1054
1092
|
"name": "noSort",
|
|
1055
1093
|
"privacy": "public",
|
|
1094
|
+
"type": {
|
|
1095
|
+
"text": "boolean"
|
|
1096
|
+
},
|
|
1056
1097
|
"description": "Disable sorting when grid is autoconfigured.",
|
|
1057
1098
|
"attribute": "no-sort"
|
|
1058
1099
|
},
|
|
@@ -1106,18 +1147,26 @@
|
|
|
1106
1147
|
{
|
|
1107
1148
|
"name": "editor-position",
|
|
1108
1149
|
"type": {
|
|
1109
|
-
"text": "
|
|
1150
|
+
"text": "string"
|
|
1110
1151
|
},
|
|
1111
1152
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
1112
1153
|
"fieldName": "editorPosition"
|
|
1113
1154
|
},
|
|
1114
1155
|
{
|
|
1115
1156
|
"name": "exclude",
|
|
1157
|
+
"type": {
|
|
1158
|
+
"text": "string"
|
|
1159
|
+
},
|
|
1116
1160
|
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
1117
1161
|
"fieldName": "exclude"
|
|
1118
1162
|
},
|
|
1119
1163
|
{
|
|
1120
1164
|
"name": "i18n",
|
|
1165
|
+
"type": {
|
|
1166
|
+
"text": "Object"
|
|
1167
|
+
},
|
|
1168
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
1169
|
+
"fieldName": "i18n",
|
|
1121
1170
|
"inheritedFrom": {
|
|
1122
1171
|
"name": "I18nMixin",
|
|
1123
1172
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -1125,21 +1174,41 @@
|
|
|
1125
1174
|
},
|
|
1126
1175
|
{
|
|
1127
1176
|
"name": "include",
|
|
1177
|
+
"type": {
|
|
1178
|
+
"text": "string"
|
|
1179
|
+
},
|
|
1128
1180
|
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
1129
1181
|
"fieldName": "include"
|
|
1130
1182
|
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "items",
|
|
1185
|
+
"type": {
|
|
1186
|
+
"text": "array"
|
|
1187
|
+
},
|
|
1188
|
+
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
1189
|
+
"fieldName": "items"
|
|
1190
|
+
},
|
|
1131
1191
|
{
|
|
1132
1192
|
"name": "no-filter",
|
|
1193
|
+
"type": {
|
|
1194
|
+
"text": "boolean"
|
|
1195
|
+
},
|
|
1133
1196
|
"description": "Disable filtering when grid is autoconfigured.",
|
|
1134
1197
|
"fieldName": "noFilter"
|
|
1135
1198
|
},
|
|
1136
1199
|
{
|
|
1137
1200
|
"name": "no-head",
|
|
1201
|
+
"type": {
|
|
1202
|
+
"text": "boolean"
|
|
1203
|
+
},
|
|
1138
1204
|
"description": "Remove grid headers when it is autoconfigured.",
|
|
1139
1205
|
"fieldName": "noHead"
|
|
1140
1206
|
},
|
|
1141
1207
|
{
|
|
1142
1208
|
"name": "no-sort",
|
|
1209
|
+
"type": {
|
|
1210
|
+
"text": "boolean"
|
|
1211
|
+
},
|
|
1143
1212
|
"description": "Disable sorting when grid is autoconfigured.",
|
|
1144
1213
|
"fieldName": "noSort"
|
|
1145
1214
|
},
|
|
@@ -1212,7 +1281,7 @@
|
|
|
1212
1281
|
"name": "editedItem",
|
|
1213
1282
|
"privacy": "public",
|
|
1214
1283
|
"type": {
|
|
1215
|
-
"text": "
|
|
1284
|
+
"text": "object"
|
|
1216
1285
|
},
|
|
1217
1286
|
"description": "The item being edited in the dialog.",
|
|
1218
1287
|
"attribute": "edited-item",
|
|
@@ -1254,7 +1323,7 @@
|
|
|
1254
1323
|
"name": "editorPosition",
|
|
1255
1324
|
"privacy": "public",
|
|
1256
1325
|
"type": {
|
|
1257
|
-
"text": "
|
|
1326
|
+
"text": "string"
|
|
1258
1327
|
},
|
|
1259
1328
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
1260
1329
|
"attribute": "editor-position",
|
|
@@ -1267,6 +1336,9 @@
|
|
|
1267
1336
|
"kind": "field",
|
|
1268
1337
|
"name": "exclude",
|
|
1269
1338
|
"privacy": "public",
|
|
1339
|
+
"type": {
|
|
1340
|
+
"text": "string"
|
|
1341
|
+
},
|
|
1270
1342
|
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
1271
1343
|
"attribute": "exclude",
|
|
1272
1344
|
"inheritedFrom": {
|
|
@@ -1277,10 +1349,12 @@
|
|
|
1277
1349
|
{
|
|
1278
1350
|
"kind": "field",
|
|
1279
1351
|
"name": "i18n",
|
|
1280
|
-
"
|
|
1352
|
+
"privacy": "public",
|
|
1281
1353
|
"type": {
|
|
1282
1354
|
"text": "Object"
|
|
1283
1355
|
},
|
|
1356
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n newItem: 'New item',\n editItem: 'Edit item',\n saveItem: 'Save',\n cancel: 'Cancel',\n deleteItem: 'Delete...',\n editLabel: 'Edit',\n confirm: {\n delete: {\n title: 'Confirm delete',\n content: 'Are you sure you want to delete the selected item? This action cannot be undone.',\n button: {\n confirm: 'Delete',\n dismiss: 'Cancel'\n }\n },\n cancel: {\n title: 'Unsaved changes',\n content: 'There are unsaved modifications to the item.',\n button: {\n confirm: 'Discard',\n dismiss: 'Continue editing'\n }\n }\n }\n}\n```",
|
|
1357
|
+
"attribute": "i18n",
|
|
1284
1358
|
"inheritedFrom": {
|
|
1285
1359
|
"name": "I18nMixin",
|
|
1286
1360
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -1290,6 +1364,9 @@
|
|
|
1290
1364
|
"kind": "field",
|
|
1291
1365
|
"name": "include",
|
|
1292
1366
|
"privacy": "public",
|
|
1367
|
+
"type": {
|
|
1368
|
+
"text": "string"
|
|
1369
|
+
},
|
|
1293
1370
|
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
1294
1371
|
"attribute": "include",
|
|
1295
1372
|
"inheritedFrom": {
|
|
@@ -1302,7 +1379,7 @@
|
|
|
1302
1379
|
"name": "items",
|
|
1303
1380
|
"privacy": "public",
|
|
1304
1381
|
"type": {
|
|
1305
|
-
"text": "
|
|
1382
|
+
"text": "array"
|
|
1306
1383
|
},
|
|
1307
1384
|
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
1308
1385
|
"attribute": "items",
|
|
@@ -1315,6 +1392,9 @@
|
|
|
1315
1392
|
"kind": "field",
|
|
1316
1393
|
"name": "noFilter",
|
|
1317
1394
|
"privacy": "public",
|
|
1395
|
+
"type": {
|
|
1396
|
+
"text": "boolean"
|
|
1397
|
+
},
|
|
1318
1398
|
"description": "Disable filtering when grid is autoconfigured.",
|
|
1319
1399
|
"attribute": "no-filter",
|
|
1320
1400
|
"inheritedFrom": {
|
|
@@ -1326,6 +1406,9 @@
|
|
|
1326
1406
|
"kind": "field",
|
|
1327
1407
|
"name": "noHead",
|
|
1328
1408
|
"privacy": "public",
|
|
1409
|
+
"type": {
|
|
1410
|
+
"text": "boolean"
|
|
1411
|
+
},
|
|
1329
1412
|
"description": "Remove grid headers when it is autoconfigured.",
|
|
1330
1413
|
"attribute": "no-head",
|
|
1331
1414
|
"inheritedFrom": {
|
|
@@ -1337,6 +1420,9 @@
|
|
|
1337
1420
|
"kind": "field",
|
|
1338
1421
|
"name": "noSort",
|
|
1339
1422
|
"privacy": "public",
|
|
1423
|
+
"type": {
|
|
1424
|
+
"text": "boolean"
|
|
1425
|
+
},
|
|
1340
1426
|
"description": "Disable sorting when grid is autoconfigured.",
|
|
1341
1427
|
"attribute": "no-sort",
|
|
1342
1428
|
"inheritedFrom": {
|
|
@@ -1507,7 +1593,7 @@
|
|
|
1507
1593
|
{
|
|
1508
1594
|
"name": "editor-position",
|
|
1509
1595
|
"type": {
|
|
1510
|
-
"text": "
|
|
1596
|
+
"text": "string"
|
|
1511
1597
|
},
|
|
1512
1598
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
1513
1599
|
"fieldName": "editorPosition",
|
|
@@ -1518,6 +1604,9 @@
|
|
|
1518
1604
|
},
|
|
1519
1605
|
{
|
|
1520
1606
|
"name": "exclude",
|
|
1607
|
+
"type": {
|
|
1608
|
+
"text": "string"
|
|
1609
|
+
},
|
|
1521
1610
|
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
1522
1611
|
"fieldName": "exclude",
|
|
1523
1612
|
"inheritedFrom": {
|
|
@@ -1527,6 +1616,11 @@
|
|
|
1527
1616
|
},
|
|
1528
1617
|
{
|
|
1529
1618
|
"name": "i18n",
|
|
1619
|
+
"type": {
|
|
1620
|
+
"text": "Object"
|
|
1621
|
+
},
|
|
1622
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
1623
|
+
"fieldName": "i18n",
|
|
1530
1624
|
"inheritedFrom": {
|
|
1531
1625
|
"name": "I18nMixin",
|
|
1532
1626
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -1534,6 +1628,9 @@
|
|
|
1534
1628
|
},
|
|
1535
1629
|
{
|
|
1536
1630
|
"name": "include",
|
|
1631
|
+
"type": {
|
|
1632
|
+
"text": "string"
|
|
1633
|
+
},
|
|
1537
1634
|
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
1538
1635
|
"fieldName": "include",
|
|
1539
1636
|
"inheritedFrom": {
|
|
@@ -1541,8 +1638,23 @@
|
|
|
1541
1638
|
"module": "src/vaadin-crud-mixin.js"
|
|
1542
1639
|
}
|
|
1543
1640
|
},
|
|
1641
|
+
{
|
|
1642
|
+
"name": "items",
|
|
1643
|
+
"type": {
|
|
1644
|
+
"text": "array"
|
|
1645
|
+
},
|
|
1646
|
+
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
1647
|
+
"fieldName": "items",
|
|
1648
|
+
"inheritedFrom": {
|
|
1649
|
+
"name": "CrudMixin",
|
|
1650
|
+
"module": "src/vaadin-crud-mixin.js"
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1544
1653
|
{
|
|
1545
1654
|
"name": "no-filter",
|
|
1655
|
+
"type": {
|
|
1656
|
+
"text": "boolean"
|
|
1657
|
+
},
|
|
1546
1658
|
"description": "Disable filtering when grid is autoconfigured.",
|
|
1547
1659
|
"fieldName": "noFilter",
|
|
1548
1660
|
"inheritedFrom": {
|
|
@@ -1552,6 +1664,9 @@
|
|
|
1552
1664
|
},
|
|
1553
1665
|
{
|
|
1554
1666
|
"name": "no-head",
|
|
1667
|
+
"type": {
|
|
1668
|
+
"text": "boolean"
|
|
1669
|
+
},
|
|
1555
1670
|
"description": "Remove grid headers when it is autoconfigured.",
|
|
1556
1671
|
"fieldName": "noHead",
|
|
1557
1672
|
"inheritedFrom": {
|
|
@@ -1561,6 +1676,9 @@
|
|
|
1561
1676
|
},
|
|
1562
1677
|
{
|
|
1563
1678
|
"name": "no-sort",
|
|
1679
|
+
"type": {
|
|
1680
|
+
"text": "boolean"
|
|
1681
|
+
},
|
|
1564
1682
|
"description": "Disable sorting when grid is autoconfigured.",
|
|
1565
1683
|
"fieldName": "noSort",
|
|
1566
1684
|
"inheritedFrom": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/crud",
|
|
3
|
-
"version": "25.1.0-
|
|
3
|
+
"version": "25.1.0-beta4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.1.0-
|
|
39
|
-
"@vaadin/button": "25.1.0-
|
|
40
|
-
"@vaadin/component-base": "25.1.0-
|
|
41
|
-
"@vaadin/confirm-dialog": "25.1.0-
|
|
42
|
-
"@vaadin/dialog": "25.1.0-
|
|
43
|
-
"@vaadin/form-layout": "25.1.0-
|
|
44
|
-
"@vaadin/grid": "25.1.0-
|
|
45
|
-
"@vaadin/overlay": "25.1.0-
|
|
46
|
-
"@vaadin/text-field": "25.1.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.1.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.1.0-beta4",
|
|
39
|
+
"@vaadin/button": "25.1.0-beta4",
|
|
40
|
+
"@vaadin/component-base": "25.1.0-beta4",
|
|
41
|
+
"@vaadin/confirm-dialog": "25.1.0-beta4",
|
|
42
|
+
"@vaadin/dialog": "25.1.0-beta4",
|
|
43
|
+
"@vaadin/form-layout": "25.1.0-beta4",
|
|
44
|
+
"@vaadin/grid": "25.1.0-beta4",
|
|
45
|
+
"@vaadin/overlay": "25.1.0-beta4",
|
|
46
|
+
"@vaadin/text-field": "25.1.0-beta4",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.1.0-beta4",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/aura": "25.1.0-
|
|
52
|
-
"@vaadin/chai-plugins": "25.1.0-
|
|
53
|
-
"@vaadin/test-runner-commands": "25.1.0-
|
|
51
|
+
"@vaadin/aura": "25.1.0-beta4",
|
|
52
|
+
"@vaadin/chai-plugins": "25.1.0-beta4",
|
|
53
|
+
"@vaadin/test-runner-commands": "25.1.0-beta4",
|
|
54
54
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
55
|
-
"@vaadin/vaadin-lumo-styles": "25.1.0-
|
|
56
|
-
"sinon": "^21.0.
|
|
55
|
+
"@vaadin/vaadin-lumo-styles": "25.1.0-beta4",
|
|
56
|
+
"sinon": "^21.0.2"
|
|
57
57
|
},
|
|
58
58
|
"cvdlName": "vaadin-crud",
|
|
59
59
|
"customElements": "custom-elements.json",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b27f6706a2b5c07cedec353fccbdecee95d53024"
|
|
65
65
|
}
|
|
@@ -25,19 +25,25 @@ export const CrudGridMixin = (superClass) =>
|
|
|
25
25
|
* Disable filtering in the generated columns.
|
|
26
26
|
* @attr {boolean} no-filter
|
|
27
27
|
*/
|
|
28
|
-
noFilter:
|
|
28
|
+
noFilter: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
},
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Disable sorting in the generated columns.
|
|
32
34
|
* @attr {boolean} no-sort
|
|
33
35
|
*/
|
|
34
|
-
noSort:
|
|
36
|
+
noSort: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
},
|
|
35
39
|
|
|
36
40
|
/**
|
|
37
41
|
* Do not add headers to columns.
|
|
38
42
|
* @attr {boolean} no-head
|
|
39
43
|
*/
|
|
40
|
-
noHead:
|
|
44
|
+
noHead: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
},
|
|
41
47
|
|
|
42
48
|
/**
|
|
43
49
|
* Determines whether the edit column should be hidden.
|
|
@@ -27,6 +27,7 @@ export const IncludedMixin = (superClass) =>
|
|
|
27
27
|
* @type {string | RegExp}
|
|
28
28
|
*/
|
|
29
29
|
exclude: {
|
|
30
|
+
type: String,
|
|
30
31
|
value: '^_',
|
|
31
32
|
observer: '__onExcludeChange',
|
|
32
33
|
sync: true,
|
|
@@ -40,6 +41,7 @@ export const IncludedMixin = (superClass) =>
|
|
|
40
41
|
* @type {string | !Array<string> | undefined}
|
|
41
42
|
*/
|
|
42
43
|
include: {
|
|
44
|
+
type: String,
|
|
43
45
|
observer: '__onIncludeChange',
|
|
44
46
|
sync: true,
|
|
45
47
|
},
|
package/src/vaadin-crud-mixin.js
CHANGED
|
@@ -112,7 +112,6 @@ export const CrudMixin = (superClass) =>
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* An array containing the items which will be stamped to the column template instances.
|
|
115
|
-
* @type {Array<unknown> | undefined}
|
|
116
115
|
*/
|
|
117
116
|
items: {
|
|
118
117
|
type: Array,
|
|
@@ -123,7 +122,6 @@ export const CrudMixin = (superClass) =>
|
|
|
123
122
|
|
|
124
123
|
/**
|
|
125
124
|
* The item being edited in the dialog.
|
|
126
|
-
* @type {unknown}
|
|
127
125
|
*/
|
|
128
126
|
editedItem: {
|
|
129
127
|
type: Object,
|
|
@@ -140,7 +138,6 @@ export const CrudMixin = (superClass) =>
|
|
|
140
138
|
* - `bottom` - form will open below the grid
|
|
141
139
|
* - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)
|
|
142
140
|
* @attr {bottom|aside} editor-position
|
|
143
|
-
* @type {!CrudEditorPosition}
|
|
144
141
|
*/
|
|
145
142
|
editorPosition: {
|
|
146
143
|
type: String,
|
|
@@ -183,19 +180,25 @@ export const CrudMixin = (superClass) =>
|
|
|
183
180
|
* Disable filtering when grid is autoconfigured.
|
|
184
181
|
* @attr {boolean} no-filter
|
|
185
182
|
*/
|
|
186
|
-
noFilter:
|
|
183
|
+
noFilter: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
},
|
|
187
186
|
|
|
188
187
|
/**
|
|
189
188
|
* Disable sorting when grid is autoconfigured.
|
|
190
189
|
* @attr {boolean} no-sort
|
|
191
190
|
*/
|
|
192
|
-
noSort:
|
|
191
|
+
noSort: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
},
|
|
193
194
|
|
|
194
195
|
/**
|
|
195
196
|
* Remove grid headers when it is autoconfigured.
|
|
196
197
|
* @attr {boolean} no-head
|
|
197
198
|
*/
|
|
198
|
-
noHead:
|
|
199
|
+
noHead: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
},
|
|
199
202
|
|
|
200
203
|
/**
|
|
201
204
|
* A comma-separated list of fields to include in the generated grid and the generated editor.
|
|
@@ -206,7 +209,9 @@ export const CrudMixin = (superClass) =>
|
|
|
206
209
|
*
|
|
207
210
|
* Default is undefined meaning that all properties in the object should be mapped to fields.
|
|
208
211
|
*/
|
|
209
|
-
include:
|
|
212
|
+
include: {
|
|
213
|
+
type: String,
|
|
214
|
+
},
|
|
210
215
|
|
|
211
216
|
/**
|
|
212
217
|
* A comma-separated list of fields to be excluded from the generated grid and the generated editor.
|
|
@@ -215,7 +220,9 @@ export const CrudMixin = (superClass) =>
|
|
|
215
220
|
*
|
|
216
221
|
* Default is to exclude all private fields (those properties starting with underscore)
|
|
217
222
|
*/
|
|
218
|
-
exclude:
|
|
223
|
+
exclude: {
|
|
224
|
+
type: String,
|
|
225
|
+
},
|
|
219
226
|
|
|
220
227
|
/**
|
|
221
228
|
* Reflects the opened status of the editor.
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/crud",
|
|
4
|
-
"version": "25.1.0-
|
|
4
|
+
"version": "25.1.0-beta4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
197
197
|
"value": {
|
|
198
198
|
"type": [
|
|
199
|
-
"
|
|
199
|
+
"string",
|
|
200
200
|
"null",
|
|
201
201
|
"undefined"
|
|
202
202
|
]
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
"description": "Aligns the columns cell content horizontally.\nSupported values: \"start\", \"center\" and \"end\".",
|
|
376
376
|
"value": {
|
|
377
377
|
"type": [
|
|
378
|
-
"
|
|
378
|
+
"string",
|
|
379
379
|
"null",
|
|
380
380
|
"undefined"
|
|
381
381
|
]
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
400
|
"name": "vaadin-crud",
|
|
401
|
-
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
401
|
+
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-items) property.\n\nA grid and an editor will be automatically generated and configured based on the data structure provided.\n\n```html\n<vaadin-crud></vaadin-crud>\n```\n```js\nconst crud = document.querySelector('vaadin-crud');\n\ncrud.items = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n```\n\n### Data Provider Function\n\nOtherwise, you can provide a [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-dataProvider) function.\n\n```js\nconst crud = document.querySelector('vaadin-crud');\n\nconst users = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n\ncrud.dataProvider = (params, callback) => {\n const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);\n callback(chunk, people.length);\n};\n```\n\nNOTE: The auto-generated editor only supports string types. If you need to handle special cases\ncustomizing the editor is discussed below.\n\n### Customization\n\nAlternatively you can fully configure the component by using `slot` names.\n\nSlot name | Description\n---------------|----------------\n`grid` | To replace the auto-generated grid with a custom one.\n`form` | To replace the auto-generated form.\n`save-button` | To replace the \"Save\" button.\n`cancel-button`| To replace the \"Cancel\" button.\n`delete-button`| To replace the \"Delete\" button.\n`toolbar` | To provide the toolbar content (by default, it's empty).\n`new-button` | To replace the \"New item\" button.\n\n#### Example:\n\n```html\n<vaadin-crud id=\"crud\">\n <vaadin-grid slot=\"grid\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n <vaadin-grid-column id=\"column1\"></vaadin-grid-column>\n <vaadin-grid-column id=\"column2\"></vaadin-grid-column>\n </vaadin-grid>\n\n <vaadin-form-layout slot=\"form\">\n <vaadin-text-field label=\"First\" path=\"name\"></vaadin-text-field>\n <vaadin-text-field label=\"Surname\" path=\"surname\"></vaadin-text-field>\n </vaadin-form-layout>\n\n <div slot=\"toolbar\">Total singers: 2</div>\n <button slot=\"new-button\">New singer</button>\n\n <button slot=\"save-button\">Save changes</button>\n <button slot=\"cancel-button\">Discard changes</button>\n <button slot=\"delete-button\">Delete singer</button>\n</vaadin-crud>\n```\n```js\nconst crud = document.querySelector('#crud');\n\nconst column1 = document.querySelector('#column1');\ncolumn1.headerRenderer = (root, column) => {\n root.textContent = 'Name';\n};\ncolumn1.renderer = (root, column, model) => {\n root.textContent = model.item.name;\n};\n\nconst column2 = document.querySelector('#column2');\ncolumn2.headerRenderer = (root, column) => {\n root.textContent = 'Surname';\n};\ncolumn2.renderer = (root, column, model) => {\n root.textContent = model.item.surname;\n};\n\ncrud.items = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n```\n\n### Helpers\n\nThe following elements are used to auto-configure the grid and the editor\n- [`<vaadin-crud-edit-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud-edit-column)\n- `<vaadin-crud-grid>` - can be replaced with custom [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-grid)\n- `<vaadin-crud-form>` - can be replaced with custom [`<vaadin-form-layout>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-form-layout)\n\n### Styling\n\nThe following shadow DOM parts are available for styling when the editor is rendered next to, or below, the grid:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom of the grid. By default, it contains the `new` button\n`editor` | The editor container\n`scroller` | The wrapper for the header and the form\n`header` | The header of the editor\n`footer` | The footer of the editor\n\nThe following shadow DOM parts are available for styling when the editor renders as a dialog:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom of the grid. By default, it contains the `new` button\n`overlay` | The dialog overlay\n`backdrop` | The dialog backdrop\n`header` | The header of the dialog\n`footer` | The footer of the dialog\n`content` | The wrapper for the form\n\nThe following custom properties are available:\n\nCustom Property | Description | Default\n----------------|----------------\n--vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%\n--vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
402
402
|
"attributes": [
|
|
403
403
|
{
|
|
404
404
|
"name": "edit-on-click",
|
|
@@ -427,13 +427,15 @@
|
|
|
427
427
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
428
428
|
"value": {
|
|
429
429
|
"type": [
|
|
430
|
-
"
|
|
430
|
+
"string",
|
|
431
|
+
"null",
|
|
432
|
+
"undefined"
|
|
431
433
|
]
|
|
432
434
|
}
|
|
433
435
|
},
|
|
434
436
|
{
|
|
435
437
|
"name": "exclude",
|
|
436
|
-
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
438
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
437
439
|
"value": {
|
|
438
440
|
"type": [
|
|
439
441
|
"string",
|
|
@@ -442,9 +444,20 @@
|
|
|
442
444
|
]
|
|
443
445
|
}
|
|
444
446
|
},
|
|
447
|
+
{
|
|
448
|
+
"name": "i18n",
|
|
449
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
450
|
+
"value": {
|
|
451
|
+
"type": [
|
|
452
|
+
"Object",
|
|
453
|
+
"null",
|
|
454
|
+
"undefined"
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
},
|
|
445
458
|
{
|
|
446
459
|
"name": "include",
|
|
447
|
-
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
460
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
448
461
|
"value": {
|
|
449
462
|
"type": [
|
|
450
463
|
"string",
|
|
@@ -526,7 +539,9 @@
|
|
|
526
539
|
"description": "The item being edited in the dialog.",
|
|
527
540
|
"value": {
|
|
528
541
|
"type": [
|
|
529
|
-
"
|
|
542
|
+
"Object",
|
|
543
|
+
"null",
|
|
544
|
+
"undefined"
|
|
530
545
|
]
|
|
531
546
|
}
|
|
532
547
|
},
|
|
@@ -557,13 +572,15 @@
|
|
|
557
572
|
"description": "Sets how editor will be presented on desktop screen.\n\nAccepted values are:\n - `` (default) - form will open as overlay\n - `bottom` - form will open below the grid\n - `aside` - form will open on the grid side (_right_, if lft and _left_ if rtl)",
|
|
558
573
|
"value": {
|
|
559
574
|
"type": [
|
|
560
|
-
"
|
|
575
|
+
"string",
|
|
576
|
+
"null",
|
|
577
|
+
"undefined"
|
|
561
578
|
]
|
|
562
579
|
}
|
|
563
580
|
},
|
|
564
581
|
{
|
|
565
582
|
"name": "exclude",
|
|
566
|
-
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
583
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
567
584
|
"value": {
|
|
568
585
|
"type": [
|
|
569
586
|
"string",
|
|
@@ -583,7 +600,7 @@
|
|
|
583
600
|
},
|
|
584
601
|
{
|
|
585
602
|
"name": "include",
|
|
586
|
-
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
603
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
587
604
|
"value": {
|
|
588
605
|
"type": [
|
|
589
606
|
"string",
|
|
@@ -597,7 +614,8 @@
|
|
|
597
614
|
"description": "An array containing the items which will be stamped to the column template instances.",
|
|
598
615
|
"value": {
|
|
599
616
|
"type": [
|
|
600
|
-
"Array
|
|
617
|
+
"Array",
|
|
618
|
+
"null",
|
|
601
619
|
"undefined"
|
|
602
620
|
]
|
|
603
621
|
}
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/crud",
|
|
4
|
-
"version": "25.1.0-
|
|
4
|
+
"version": "25.1.0-beta4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"name": "vaadin-crud",
|
|
152
|
-
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
152
|
+
"description": "`<vaadin-crud>` is a Web Component for [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations.\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-items) property.\n\nA grid and an editor will be automatically generated and configured based on the data structure provided.\n\n```html\n<vaadin-crud></vaadin-crud>\n```\n```js\nconst crud = document.querySelector('vaadin-crud');\n\ncrud.items = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n```\n\n### Data Provider Function\n\nOtherwise, you can provide a [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-dataProvider) function.\n\n```js\nconst crud = document.querySelector('vaadin-crud');\n\nconst users = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n\ncrud.dataProvider = (params, callback) => {\n const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);\n callback(chunk, people.length);\n};\n```\n\nNOTE: The auto-generated editor only supports string types. If you need to handle special cases\ncustomizing the editor is discussed below.\n\n### Customization\n\nAlternatively you can fully configure the component by using `slot` names.\n\nSlot name | Description\n---------------|----------------\n`grid` | To replace the auto-generated grid with a custom one.\n`form` | To replace the auto-generated form.\n`save-button` | To replace the \"Save\" button.\n`cancel-button`| To replace the \"Cancel\" button.\n`delete-button`| To replace the \"Delete\" button.\n`toolbar` | To provide the toolbar content (by default, it's empty).\n`new-button` | To replace the \"New item\" button.\n\n#### Example:\n\n```html\n<vaadin-crud id=\"crud\">\n <vaadin-grid slot=\"grid\">\n <vaadin-crud-edit-column></vaadin-crud-edit-column>\n <vaadin-grid-column id=\"column1\"></vaadin-grid-column>\n <vaadin-grid-column id=\"column2\"></vaadin-grid-column>\n </vaadin-grid>\n\n <vaadin-form-layout slot=\"form\">\n <vaadin-text-field label=\"First\" path=\"name\"></vaadin-text-field>\n <vaadin-text-field label=\"Surname\" path=\"surname\"></vaadin-text-field>\n </vaadin-form-layout>\n\n <div slot=\"toolbar\">Total singers: 2</div>\n <button slot=\"new-button\">New singer</button>\n\n <button slot=\"save-button\">Save changes</button>\n <button slot=\"cancel-button\">Discard changes</button>\n <button slot=\"delete-button\">Delete singer</button>\n</vaadin-crud>\n```\n```js\nconst crud = document.querySelector('#crud');\n\nconst column1 = document.querySelector('#column1');\ncolumn1.headerRenderer = (root, column) => {\n root.textContent = 'Name';\n};\ncolumn1.renderer = (root, column, model) => {\n root.textContent = model.item.name;\n};\n\nconst column2 = document.querySelector('#column2');\ncolumn2.headerRenderer = (root, column) => {\n root.textContent = 'Surname';\n};\ncolumn2.renderer = (root, column, model) => {\n root.textContent = model.item.surname;\n};\n\ncrud.items = [\n { name: 'John', surname: 'Lennon', role: 'singer' },\n { name: 'Ringo', surname: 'Starr', role: 'drums' },\n // ... more items\n];\n```\n\n### Helpers\n\nThe following elements are used to auto-configure the grid and the editor\n- [`<vaadin-crud-edit-column>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud-edit-column)\n- `<vaadin-crud-grid>` - can be replaced with custom [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-grid)\n- `<vaadin-crud-form>` - can be replaced with custom [`<vaadin-form-layout>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-form-layout)\n\n### Styling\n\nThe following shadow DOM parts are available for styling when the editor is rendered next to, or below, the grid:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom of the grid. By default, it contains the `new` button\n`editor` | The editor container\n`scroller` | The wrapper for the header and the form\n`header` | The header of the editor\n`footer` | The footer of the editor\n\nThe following shadow DOM parts are available for styling when the editor renders as a dialog:\n\nPart name | Description\n----------------|----------------\n`toolbar` | Toolbar container at the bottom of the grid. By default, it contains the `new` button\n`overlay` | The dialog overlay\n`backdrop` | The dialog backdrop\n`header` | The header of the dialog\n`footer` | The footer of the dialog\n`content` | The wrapper for the form\n\nThe following custom properties are available:\n\nCustom Property | Description | Default\n----------------|----------------\n--vaadin-crud-editor-max-height | max height of editor when opened on the bottom | 40%\n--vaadin-crud-editor-max-width | max width of editor when opened on the side | 40%\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
153
153
|
"extension": true,
|
|
154
154
|
"attributes": [
|
|
155
155
|
{
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
"name": ".exclude",
|
|
220
|
-
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
220
|
+
"description": "A comma-separated list of fields to be excluded from the generated grid and the generated editor.\n\nWhen [`include`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-include) is defined, this parameter is ignored.\n\nDefault is to exclude all private fields (those properties starting with underscore)",
|
|
221
221
|
"value": {
|
|
222
222
|
"kind": "expression"
|
|
223
223
|
}
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"name": ".include",
|
|
234
|
-
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
234
|
+
"description": "A comma-separated list of fields to include in the generated grid and the generated editor.\n\nIt can be used to explicitly define the field order.\n\nWhen it is defined [`exclude`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-crud#property-exclude) is ignored.\n\nDefault is undefined meaning that all properties in the object should be mapped to fields.",
|
|
235
235
|
"value": {
|
|
236
236
|
"kind": "expression"
|
|
237
237
|
}
|