@vaadin/grid-pro 24.4.14 → 24.4.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/grid-pro",
|
|
3
|
-
"version": "24.4.
|
|
3
|
+
"version": "24.4.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/checkbox": "~24.4.
|
|
43
|
-
"@vaadin/component-base": "~24.4.
|
|
44
|
-
"@vaadin/grid": "~24.4.
|
|
45
|
-
"@vaadin/lit-renderer": "~24.4.
|
|
46
|
-
"@vaadin/select": "~24.4.
|
|
47
|
-
"@vaadin/text-field": "~24.4.
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "~24.4.
|
|
49
|
-
"@vaadin/vaadin-material-styles": "~24.4.
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "~24.4.
|
|
42
|
+
"@vaadin/checkbox": "~24.4.16",
|
|
43
|
+
"@vaadin/component-base": "~24.4.16",
|
|
44
|
+
"@vaadin/grid": "~24.4.16",
|
|
45
|
+
"@vaadin/lit-renderer": "~24.4.16",
|
|
46
|
+
"@vaadin/select": "~24.4.16",
|
|
47
|
+
"@vaadin/text-field": "~24.4.16",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "~24.4.16",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "~24.4.16",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "~24.4.16",
|
|
51
51
|
"lit": "^3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"web-types.json",
|
|
61
61
|
"web-types.lit.json"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "f21deed6fb2f251b85ab88e89a7a4799f7bc4768"
|
|
64
64
|
}
|
|
@@ -12,6 +12,20 @@ import { animationFrame } from '@vaadin/component-base/src/async.js';
|
|
|
12
12
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
13
13
|
import { get, set } from '@vaadin/component-base/src/path-utils.js';
|
|
14
14
|
import { iterateRowCells, updatePart } from '@vaadin/grid/src/vaadin-grid-helpers.js';
|
|
15
|
+
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
16
|
+
|
|
17
|
+
registerStyles(
|
|
18
|
+
'vaadin-grid-pro',
|
|
19
|
+
css`
|
|
20
|
+
:host([loading-editor]) [part~='focused-cell'] ::slotted(vaadin-grid-cell-content) {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
`,
|
|
25
|
+
{
|
|
26
|
+
moduleId: 'vaadin-grid-pro-styles',
|
|
27
|
+
},
|
|
28
|
+
);
|
|
15
29
|
|
|
16
30
|
/**
|
|
17
31
|
* @polymerMixin
|
|
@@ -82,6 +96,19 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
82
96
|
|
|
83
97
|
/** @protected */
|
|
84
98
|
ready() {
|
|
99
|
+
this.addEventListener(
|
|
100
|
+
'keydown',
|
|
101
|
+
(e) => {
|
|
102
|
+
if (this.hasAttribute('loading-editor') && !['Tab', 'Escape', 'Enter'].includes(e.key)) {
|
|
103
|
+
// If an editor is focused while it's loading, prevent default keydown behavior
|
|
104
|
+
// to avoid user interaction with the editor before it's fully loaded
|
|
105
|
+
// Used by Flow GridPro
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
e.stopPropagation();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
true,
|
|
111
|
+
);
|
|
85
112
|
// Add listener before `vaadin-grid` interaction mode listener
|
|
86
113
|
this.addEventListener('keydown', (e) => {
|
|
87
114
|
switch (e.keyCode) {
|
|
@@ -200,7 +227,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
200
227
|
}
|
|
201
228
|
|
|
202
229
|
/** @private */
|
|
203
|
-
_applyEdit({ path, value,
|
|
230
|
+
_applyEdit({ path, value, _, item }) {
|
|
204
231
|
set(path, value, item);
|
|
205
232
|
this.requestContentUpdate();
|
|
206
233
|
}
|
|
@@ -246,6 +273,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
246
273
|
}
|
|
247
274
|
|
|
248
275
|
/** @private */
|
|
276
|
+
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
249
277
|
_isEditColumn(column) {
|
|
250
278
|
return column && column.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
|
|
251
279
|
}
|
|
@@ -378,7 +406,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
378
406
|
}
|
|
379
407
|
const { cell, column, model } = this.__edited;
|
|
380
408
|
|
|
381
|
-
if (!shouldCancel) {
|
|
409
|
+
if (!shouldCancel && !this.hasAttribute('loading-editor')) {
|
|
382
410
|
const editor = column._getEditorComponent(cell);
|
|
383
411
|
if (editor) {
|
|
384
412
|
const value = column._getEditorValue(editor);
|
|
@@ -46,6 +46,22 @@ registerStyles(
|
|
|
46
46
|
var(--lumo-contrast-5pct) 14px
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
/* Loading editor cell styles are used by Flow GridPro */
|
|
51
|
+
:host([loading-editor]) [part~='focused-cell']::before {
|
|
52
|
+
content: '';
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 0;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
box-shadow: inset 0 0 0 var(--_focus-ring-width) transparent;
|
|
57
|
+
animation: vaadin-grid-pro-loading-editor 1.4s infinite;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes vaadin-grid-pro-loading-editor {
|
|
61
|
+
50% {
|
|
62
|
+
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
49
65
|
`,
|
|
50
66
|
{ moduleId: 'lumo-grid-pro' },
|
|
51
67
|
);
|
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.4.
|
|
4
|
+
"version": "24.4.16",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
"name": "vaadin-grid-pro",
|
|
404
|
-
"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.4.
|
|
404
|
+
"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.4.16/#/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.4.16/#/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.4.16/#/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.4.16/#/elements/vaadin-select).",
|
|
405
405
|
"attributes": [
|
|
406
406
|
{
|
|
407
407
|
"name": "size",
|
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/grid-pro",
|
|
4
|
-
"version": "24.4.
|
|
4
|
+
"version": "24.4.16",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"name": "vaadin-grid-pro",
|
|
180
|
-
"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.4.
|
|
180
|
+
"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.4.16/#/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.4.16/#/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.4.16/#/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.4.16/#/elements/vaadin-select).",
|
|
181
181
|
"extension": true,
|
|
182
182
|
"attributes": [
|
|
183
183
|
{
|