@vaadin/crud 23.1.14 → 23.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/crud",
3
- "version": "23.1.14",
3
+ "version": "23.1.16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,22 +36,22 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "~23.1.14",
40
- "@vaadin/component-base": "~23.1.14",
41
- "@vaadin/confirm-dialog": "~23.1.14",
42
- "@vaadin/dialog": "~23.1.14",
43
- "@vaadin/form-layout": "~23.1.14",
44
- "@vaadin/grid": "~23.1.14",
45
- "@vaadin/text-field": "~23.1.14",
39
+ "@vaadin/button": "~23.1.16",
40
+ "@vaadin/component-base": "~23.1.16",
41
+ "@vaadin/confirm-dialog": "~23.1.16",
42
+ "@vaadin/dialog": "~23.1.16",
43
+ "@vaadin/form-layout": "~23.1.16",
44
+ "@vaadin/grid": "~23.1.16",
45
+ "@vaadin/text-field": "~23.1.16",
46
46
  "@vaadin/vaadin-license-checker": "^2.1.0",
47
- "@vaadin/vaadin-lumo-styles": "~23.1.14",
48
- "@vaadin/vaadin-material-styles": "~23.1.14",
49
- "@vaadin/vaadin-themable-mixin": "~23.1.14"
47
+ "@vaadin/vaadin-lumo-styles": "~23.1.16",
48
+ "@vaadin/vaadin-material-styles": "~23.1.16",
49
+ "@vaadin/vaadin-themable-mixin": "~23.1.16"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@esm-bundle/chai": "^4.3.4",
53
53
  "@vaadin/testing-helpers": "^0.3.2",
54
54
  "sinon": "^13.0.2"
55
55
  },
56
- "gitHead": "3065d26b1e7417c4efed0eb72c54e429031dc86c"
56
+ "gitHead": "812fc86f6c7581dfac7839f9ca7e535b87205732"
57
57
  }
@@ -124,23 +124,34 @@ export type CrudEventMap<T> = CrudCustomEventMap<T> & HTMLElementEventMap;
124
124
  *
125
125
  * A grid and an editor will be automatically generated and configured based on the data structure provided.
126
126
  *
127
- * #### Example:
128
127
  * ```html
129
- * <vaadin-crud items='[{"name": "John", "surname": "Lennon", "role": "singer"},
130
- * {"name": "Ringo", "surname": "Starr", "role": "drums"}]'></vaadin-crud>
128
+ * <vaadin-crud></vaadin-crud>
129
+ * ```
130
+ *
131
+ * ```js
132
+ * const crud = document.querySelector('vaadin-crud');
133
+ *
134
+ * crud.items = [
135
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
136
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
137
+ * // ... more items
138
+ * ];
131
139
  * ```
132
140
  *
133
141
  * ### Data Provider Function
134
142
  *
135
143
  * Otherwise, you can provide a [`dataProvider`](#/elements/vaadin-crud#property-dataProvider) function.
136
- * #### Example:
137
- * ```html
138
- * <vaadin-crud></vaadin-crud>
139
- * ```
144
+ *
140
145
  * ```js
141
146
  * const crud = document.querySelector('vaadin-crud');
142
- * const users = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'}, ...];
143
- * crud.dataProvider = function(params, callback) {
147
+ *
148
+ * const users = [
149
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
150
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
151
+ * // ... more items
152
+ * ];
153
+ *
154
+ * crud.dataProvider = (params, callback) => {
144
155
  * const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);
145
156
  * callback(chunk, people.length);
146
157
  * };
@@ -165,11 +176,7 @@ export type CrudEventMap<T> = CrudCustomEventMap<T> & HTMLElementEventMap;
165
176
  * #### Example:
166
177
  *
167
178
  * ```html
168
- * <vaadin-crud
169
- * id="crud"
170
- * items='[{"name": "John", "surname": "Lennon", "role": "singer"},
171
- * {"name": "Ringo", "surname": "Starr", "role": "drums"}]'
172
- * >
179
+ * <vaadin-crud id="crud">
173
180
  * <vaadin-grid slot="grid">
174
181
  * <vaadin-crud-edit-column></vaadin-crud-edit-column>
175
182
  * <vaadin-grid-column id="column1"></vaadin-grid-column>
@@ -209,6 +216,12 @@ export type CrudEventMap<T> = CrudCustomEventMap<T> & HTMLElementEventMap;
209
216
  * column2.renderer = (root, column, model) => {
210
217
  * root.textContent = model.item.surname;
211
218
  * };
219
+ *
220
+ * crud.items = [
221
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
222
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
223
+ * // ... more items
224
+ * ];
212
225
  * ```
213
226
  *
214
227
  * ### Helpers
@@ -28,23 +28,34 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
28
28
  *
29
29
  * A grid and an editor will be automatically generated and configured based on the data structure provided.
30
30
  *
31
- * #### Example:
32
31
  * ```html
33
- * <vaadin-crud items='[{"name": "John", "surname": "Lennon", "role": "singer"},
34
- * {"name": "Ringo", "surname": "Starr", "role": "drums"}]'></vaadin-crud>
32
+ * <vaadin-crud></vaadin-crud>
33
+ * ```
34
+ *
35
+ * ```js
36
+ * const crud = document.querySelector('vaadin-crud');
37
+ *
38
+ * crud.items = [
39
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
40
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
41
+ * // ... more items
42
+ * ];
35
43
  * ```
36
44
  *
37
45
  * ### Data Provider Function
38
46
  *
39
47
  * Otherwise, you can provide a [`dataProvider`](#/elements/vaadin-crud#property-dataProvider) function.
40
- * #### Example:
41
- * ```html
42
- * <vaadin-crud></vaadin-crud>
43
- * ```
48
+ *
44
49
  * ```js
45
50
  * const crud = document.querySelector('vaadin-crud');
46
- * const users = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'}, ...];
47
- * crud.dataProvider = function(params, callback) {
51
+ *
52
+ * const users = [
53
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
54
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
55
+ * // ... more items
56
+ * ];
57
+ *
58
+ * crud.dataProvider = (params, callback) => {
48
59
  * const chunk = users.slice(params.page * params.pageSize, params.page * params.pageSize + params.pageSize);
49
60
  * callback(chunk, people.length);
50
61
  * };
@@ -69,11 +80,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
69
80
  * #### Example:
70
81
  *
71
82
  * ```html
72
- * <vaadin-crud
73
- * id="crud"
74
- * items='[{"name": "John", "surname": "Lennon", "role": "singer"},
75
- * {"name": "Ringo", "surname": "Starr", "role": "drums"}]'
76
- * >
83
+ * <vaadin-crud id="crud">
77
84
  * <vaadin-grid slot="grid">
78
85
  * <vaadin-crud-edit-column></vaadin-crud-edit-column>
79
86
  * <vaadin-grid-column id="column1"></vaadin-grid-column>
@@ -113,6 +120,12 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
113
120
  * column2.renderer = (root, column, model) => {
114
121
  * root.textContent = model.item.surname;
115
122
  * };
123
+ *
124
+ * crud.items = [
125
+ * { name: 'John', surname: 'Lennon', role: 'singer' },
126
+ * { name: 'Ringo', surname: 'Starr', role: 'drums' },
127
+ * // ... more items
128
+ * ];
116
129
  * ```
117
130
  *
118
131
  * ### Helpers