@vaadin/grid-pro 24.3.0-alpha1 → 24.3.0-alpha11

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.
Files changed (33) hide show
  1. package/package.json +13 -15
  2. package/src/vaadin-grid-pro-edit-column-mixin.d.ts +68 -0
  3. package/src/vaadin-grid-pro-edit-column-mixin.js +284 -0
  4. package/src/vaadin-grid-pro-edit-column.d.ts +9 -56
  5. package/src/vaadin-grid-pro-edit-column.js +3 -263
  6. package/src/vaadin-grid-pro-edit-select-mixin.js +119 -0
  7. package/src/vaadin-grid-pro-edit-select.js +3 -115
  8. package/src/vaadin-grid-pro-inline-editing-mixin.js +4 -3
  9. package/src/vaadin-lit-grid-pro-edit-checkbox.js +28 -0
  10. package/src/vaadin-lit-grid-pro-edit-column.js +34 -0
  11. package/src/vaadin-lit-grid-pro-edit-select.js +29 -0
  12. package/src/vaadin-lit-grid-pro-edit-text-field.js +33 -0
  13. package/src/vaadin-lit-grid-pro.js +35 -0
  14. package/theme/lumo/vaadin-grid-pro-edit-select.js +0 -2
  15. package/theme/lumo/vaadin-grid-pro-editor-styles.js +1 -1
  16. package/theme/lumo/vaadin-grid-pro-styles.js +1 -1
  17. package/theme/lumo/vaadin-lit-grid-pro-edit-checkbox.js +2 -0
  18. package/theme/lumo/vaadin-lit-grid-pro-edit-column.js +4 -0
  19. package/theme/lumo/vaadin-lit-grid-pro-edit-select.js +3 -0
  20. package/theme/lumo/vaadin-lit-grid-pro-edit-text-field.js +3 -0
  21. package/theme/lumo/vaadin-lit-grid-pro.js +3 -0
  22. package/theme/material/vaadin-grid-pro-edit-select.js +0 -2
  23. package/theme/material/vaadin-lit-grid-pro-edit-checkbox.js +2 -0
  24. package/theme/material/vaadin-lit-grid-pro-edit-column.js +4 -0
  25. package/theme/material/vaadin-lit-grid-pro-edit-select.js +3 -0
  26. package/theme/material/vaadin-lit-grid-pro-edit-text-field.js +3 -0
  27. package/theme/material/vaadin-lit-grid-pro.js +3 -0
  28. package/vaadin-lit-grid-pro-edit-column.d.ts +1 -0
  29. package/vaadin-lit-grid-pro-edit-column.js +3 -0
  30. package/vaadin-lit-grid-pro.d.ts +1 -0
  31. package/vaadin-lit-grid-pro.js +3 -0
  32. package/web-types.json +46 -2
  33. package/web-types.lit.json +16 -2
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2023 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
+ import { Grid } from '@vaadin/grid/src/vaadin-lit-grid.js';
13
+ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
14
+
15
+ /**
16
+ * LitElement based version of `<vaadin-grid-pro>` web component.
17
+ *
18
+ * ## Disclaimer
19
+ *
20
+ * This component is an experiment not intended for publishing to npm.
21
+ * There is no ETA regarding specific Vaadin version where it'll land.
22
+ */
23
+ class GridPro extends InlineEditingMixin(Grid) {
24
+ static get is() {
25
+ return 'vaadin-grid-pro';
26
+ }
27
+
28
+ static get cvdlName() {
29
+ return 'vaadin-grid-pro';
30
+ }
31
+ }
32
+
33
+ defineCustomElement(GridPro);
34
+
35
+ export { GridPro };
@@ -1,5 +1,3 @@
1
- import '@vaadin/item/theme/lumo/vaadin-item.js';
2
- import '@vaadin/list-box/theme/lumo/vaadin-list-box.js';
3
1
  import '@vaadin/select/theme/lumo/vaadin-select.js';
4
2
  import './vaadin-grid-pro-edit-select-styles.js';
5
3
  import '../../src/vaadin-grid-pro-edit-select.js';
@@ -12,7 +12,7 @@ const gridProEditor = css`
12
12
  font-size: inherit;
13
13
  --lumo-text-field-size: 27px;
14
14
  /* outline similar to what grid uses */
15
- box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
15
+ box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
16
16
  }
17
17
 
18
18
  :host([theme~='grid-pro-editor']) [part='input-field'] {
@@ -10,7 +10,7 @@ registerStyles(
10
10
  position: absolute;
11
11
  inset: 0;
12
12
  pointer-events: none;
13
- box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
13
+ box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
14
14
  }
15
15
 
16
16
  [part~='editable-cell'],
@@ -0,0 +1,2 @@
1
+ import '@vaadin/checkbox/theme/lumo/vaadin-checkbox-styles.js';
2
+ import '../../src/vaadin-lit-grid-pro-edit-checkbox.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-lit-grid-pro-edit-checkbox.js';
2
+ import './vaadin-lit-grid-pro-edit-select.js';
3
+ import './vaadin-lit-grid-pro-edit-text-field.js';
4
+ import '../../src/vaadin-lit-grid-pro-edit-column.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/select/theme/lumo/vaadin-select-styles.js';
2
+ import './vaadin-grid-pro-edit-select-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro-edit-select.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
2
+ import './vaadin-grid-pro-edit-text-field-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro-edit-text-field.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/grid/theme/lumo/vaadin-grid-styles.js';
2
+ import './vaadin-grid-pro-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro.js';
@@ -1,5 +1,3 @@
1
- import '@vaadin/item/theme/material/vaadin-item.js';
2
- import '@vaadin/list-box/theme/material/vaadin-list-box.js';
3
1
  import '@vaadin/select/theme/material/vaadin-select.js';
4
2
  import './vaadin-grid-pro-edit-select-styles.js';
5
3
  import '../../src/vaadin-grid-pro-edit-select.js';
@@ -0,0 +1,2 @@
1
+ import '@vaadin/checkbox/theme/material/vaadin-checkbox-styles.js';
2
+ import '../../src/vaadin-lit-grid-pro-edit-checkbox.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-lit-grid-pro-edit-checkbox.js';
2
+ import './vaadin-lit-grid-pro-edit-select.js';
3
+ import './vaadin-lit-grid-pro-edit-text-field.js';
4
+ import '../../src/vaadin-lit-grid-pro-edit-column.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/select/theme/material/vaadin-select-styles.js';
2
+ import './vaadin-grid-pro-edit-select-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro-edit-select.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
2
+ import './vaadin-grid-pro-edit-text-field-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro-edit-text-field.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/grid/theme/material/vaadin-grid-styles.js';
2
+ import './vaadin-grid-pro-styles.js';
3
+ import '../../src/vaadin-lit-grid-pro.js';
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-grid-pro-edit-column.js';
@@ -0,0 +1,3 @@
1
+ import './theme/lumo/vaadin-lit-grid-pro-edit-column.js';
2
+
3
+ export * from './src/vaadin-lit-grid-pro-edit-column.js';
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-grid-pro.js';
@@ -0,0 +1,3 @@
1
+ import './theme/lumo/vaadin-lit-grid-pro.js';
2
+
3
+ export * from './src/vaadin-lit-grid-pro.js';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -81,6 +81,28 @@
81
81
  ]
82
82
  }
83
83
  },
84
+ {
85
+ "name": "header-part-name",
86
+ "description": "Custom part name for the header cell.",
87
+ "value": {
88
+ "type": [
89
+ "string",
90
+ "null",
91
+ "undefined"
92
+ ]
93
+ }
94
+ },
95
+ {
96
+ "name": "footer-part-name",
97
+ "description": "Custom part name for the footer cell.",
98
+ "value": {
99
+ "type": [
100
+ "string",
101
+ "null",
102
+ "undefined"
103
+ ]
104
+ }
105
+ },
84
106
  {
85
107
  "name": "width",
86
108
  "description": "Width of the cells for this column.",
@@ -224,6 +246,28 @@
224
246
  ]
225
247
  }
226
248
  },
249
+ {
250
+ "name": "headerPartName",
251
+ "description": "Custom part name for the header cell.",
252
+ "value": {
253
+ "type": [
254
+ "string",
255
+ "null",
256
+ "undefined"
257
+ ]
258
+ }
259
+ },
260
+ {
261
+ "name": "footerPartName",
262
+ "description": "Custom part name for the footer cell.",
263
+ "value": {
264
+ "type": [
265
+ "string",
266
+ "null",
267
+ "undefined"
268
+ ]
269
+ }
270
+ },
227
271
  {
228
272
  "name": "headerRenderer",
229
273
  "description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
@@ -346,7 +390,7 @@
346
390
  },
347
391
  {
348
392
  "name": "vaadin-grid-pro",
349
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-select).",
393
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-select).",
350
394
  "attributes": [
351
395
  {
352
396
  "name": "size",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -75,6 +75,20 @@
75
75
  "kind": "expression"
76
76
  }
77
77
  },
78
+ {
79
+ "name": ".headerPartName",
80
+ "description": "Custom part name for the header cell.",
81
+ "value": {
82
+ "kind": "expression"
83
+ }
84
+ },
85
+ {
86
+ "name": ".footerPartName",
87
+ "description": "Custom part name for the footer cell.",
88
+ "value": {
89
+ "kind": "expression"
90
+ }
91
+ },
78
92
  {
79
93
  "name": ".headerRenderer",
80
94
  "description": "Custom function for rendering the header content.\nReceives two arguments:\n\n- `root` The header cell content DOM element. Append your content to it.\n- `column` The `<vaadin-grid-column>` element.",
@@ -156,7 +170,7 @@
156
170
  },
157
171
  {
158
172
  "name": "vaadin-grid-pro",
159
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-select).",
173
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-select).",
160
174
  "extension": true,
161
175
  "attributes": [
162
176
  {