@vaadin/vaadin-grid-pro 22.0.0-alpha5 → 22.0.0-alpha9
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 +23 -39
- package/src/vaadin-grid-pro-edit-checkbox.js +1 -15
- package/src/vaadin-grid-pro-edit-column.d.ts +15 -80
- package/src/vaadin-grid-pro-edit-column.js +4 -272
- package/src/vaadin-grid-pro-edit-select.js +1 -122
- package/src/vaadin-grid-pro-edit-text-field.js +1 -20
- package/src/vaadin-grid-pro.d.ts +11 -86
- package/src/vaadin-grid-pro.js +4 -58
- package/theme/lumo/vaadin-grid-pro-edit-checkbox.js +1 -2
- package/theme/lumo/vaadin-grid-pro-edit-column.js +1 -4
- package/theme/lumo/vaadin-grid-pro-edit-select.js +1 -5
- package/theme/lumo/vaadin-grid-pro-edit-text-field.js +1 -3
- package/theme/lumo/vaadin-grid-pro.js +1 -3
- package/theme/material/vaadin-grid-pro-edit-checkbox.js +1 -2
- package/theme/material/vaadin-grid-pro-edit-column.js +1 -4
- package/theme/material/vaadin-grid-pro-edit-select.js +1 -5
- package/theme/material/vaadin-grid-pro-edit-text-field.js +1 -3
- package/theme/material/vaadin-grid-pro.js +1 -3
- package/vaadin-grid-pro.d.ts +0 -1
- package/src/interfaces.d.ts +0 -1
- package/src/vaadin-grid-pro-inline-editing-mixin.d.ts +0 -40
- package/src/vaadin-grid-pro-inline-editing-mixin.js +0 -477
- package/theme/lumo/vaadin-grid-pro-edit-select-styles.js +0 -24
- package/theme/lumo/vaadin-grid-pro-edit-text-field-styles.js +0 -6
- package/theme/lumo/vaadin-grid-pro-editor-styles.js +0 -41
- package/theme/lumo/vaadin-grid-pro-styles.js +0 -19
- package/theme/material/vaadin-grid-pro-edit-select-styles.js +0 -17
- package/theme/material/vaadin-grid-pro-edit-text-field-styles.js +0 -6
- package/theme/material/vaadin-grid-pro-editor-styles.js +0 -21
- package/theme/material/vaadin-grid-pro-styles.js +0 -13
package/src/vaadin-grid-pro.d.ts
CHANGED
|
@@ -1,95 +1,20 @@
|
|
|
1
|
-
import { GridDefaultItem, GridElement, GridElementEventMap } from '@vaadin/vaadin-grid';
|
|
2
|
-
|
|
3
|
-
import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
|
-
*
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2019 - 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Commercial Vaadin Developer License 4.0 (CVDLv4).
|
|
5
|
+
* See <a href="https://vaadin.com/license/cvdl-4.0">the website</a> for the complete license.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
index: number;
|
|
11
|
-
item: TItem;
|
|
12
|
-
path: string;
|
|
13
|
-
};
|
|
14
|
-
}>;
|
|
7
|
+
import { GridDefaultItem } from '@vaadin/grid/src/vaadin-grid.js';
|
|
8
|
+
import { GridPro } from '@vaadin/grid-pro/src/vaadin-grid-pro.js';
|
|
15
9
|
|
|
16
10
|
/**
|
|
17
|
-
*
|
|
11
|
+
* @deprecated Import `GridPro` from `@vaadin/grid-pro` instead.
|
|
18
12
|
*/
|
|
19
|
-
export type
|
|
20
|
-
value: {
|
|
21
|
-
index: number;
|
|
22
|
-
item: TItem;
|
|
23
|
-
path: string;
|
|
24
|
-
value: string | boolean;
|
|
25
|
-
};
|
|
26
|
-
}>;
|
|
27
|
-
|
|
28
|
-
export interface GridProElementEventMap<TItem> {
|
|
29
|
-
'cell-edit-started': GridProCellEditStartedEvent<TItem>;
|
|
30
|
-
|
|
31
|
-
'item-property-changed': GridProItemPropertyChangedEvent<TItem>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface GridProEventMap<TItem>
|
|
35
|
-
extends HTMLElementEventMap,
|
|
36
|
-
GridProElementEventMap<TItem>,
|
|
37
|
-
GridElementEventMap<TItem> {}
|
|
13
|
+
export type GridProElement<TItem = GridDefaultItem> = GridPro<TItem>;
|
|
38
14
|
|
|
39
15
|
/**
|
|
40
|
-
*
|
|
41
|
-
* It extends `<vaadin-grid>` and adds extra features on top of the basic ones.
|
|
42
|
-
*
|
|
43
|
-
* See [`<vaadin-grid>`](#/elements/vaadin-grid) documentation for details.
|
|
44
|
-
*
|
|
45
|
-
* ```
|
|
46
|
-
* <vaadin-grid-pro></vaadin-grid-pro>
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* ### Internal components
|
|
50
|
-
*
|
|
51
|
-
* In addition to `<vaadin-grid-pro>` itself, the following internal
|
|
52
|
-
* components are themable:
|
|
53
|
-
*
|
|
54
|
-
* - `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](#/elements/vaadin-checkbox).
|
|
55
|
-
* - `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).
|
|
56
|
-
* - `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](#/elements/vaadin-select).
|
|
57
|
-
*
|
|
58
|
-
* @fires {CustomEvent} active-item-changed - Fired when the `activeItem` property changes.
|
|
59
|
-
* @fires {CustomEvent} cell-activate - Fired when the cell is activated with click or keyboard.
|
|
60
|
-
* @fires {CustomEvent} cell-edit-started - Fired when the user starts editing a grid cell.
|
|
61
|
-
* @fires {CustomEvent} column-reorder - Fired when the columns in the grid are reordered.
|
|
62
|
-
* @fires {CustomEvent} column-resize - Fired when the grid column resize is finished.
|
|
63
|
-
* @fires {CustomEvent} expanded-items-changed - Fired when the `expandedItems` property changes.
|
|
64
|
-
* @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
|
|
65
|
-
* @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
|
|
66
|
-
* @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
|
|
67
|
-
* @fires {CustomEvent} item-property-changed - Fired before exiting the cell edit mode, if the value has been changed.
|
|
68
|
-
* @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
|
|
69
|
-
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
|
|
16
|
+
* @deprecated Import `GridPro` from `@vaadin/grid-pro` instead.
|
|
70
17
|
*/
|
|
71
|
-
|
|
72
|
-
static _finalizeClass(): void;
|
|
73
|
-
|
|
74
|
-
addEventListener<K extends keyof GridProEventMap<TItem>>(
|
|
75
|
-
type: K,
|
|
76
|
-
listener: (this: GridProElement<TItem>, ev: GridProEventMap<TItem>[K]) => void,
|
|
77
|
-
options?: boolean | AddEventListenerOptions
|
|
78
|
-
): void;
|
|
79
|
-
|
|
80
|
-
removeEventListener<K extends keyof GridProEventMap<TItem>>(
|
|
81
|
-
type: K,
|
|
82
|
-
listener: (this: GridProElement<TItem>, ev: GridProEventMap<TItem>[K]) => void,
|
|
83
|
-
options?: boolean | EventListenerOptions
|
|
84
|
-
): void;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface GridProElement extends InlineEditingMixin {}
|
|
88
|
-
|
|
89
|
-
declare global {
|
|
90
|
-
interface HTMLElementTagNameMap {
|
|
91
|
-
'vaadin-grid-pro': GridProElement<GridDefaultItem>;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
18
|
+
export const GridProElement: typeof GridPro;
|
|
94
19
|
|
|
95
|
-
export
|
|
20
|
+
export * from '@vaadin/grid-pro/src/vaadin-grid-pro.js';
|
package/src/vaadin-grid-pro.js
CHANGED
|
@@ -4,65 +4,11 @@
|
|
|
4
4
|
* This program is available under Commercial Vaadin Developer License 4.0 (CVDLv4).
|
|
5
5
|
* See <a href="https://vaadin.com/license/cvdl-4.0">the website</a> for the complete license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
|
|
9
|
-
import '@vaadin/vaadin-license-checker/vaadin-license-checker.js';
|
|
7
|
+
import { GridPro } from '@vaadin/grid-pro/src/vaadin-grid-pro.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
13
|
-
* `<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.
|
|
14
|
-
* It extends `<vaadin-grid>` and adds extra features on top of the basic ones.
|
|
15
|
-
*
|
|
16
|
-
* See [`<vaadin-grid>`](#/elements/vaadin-grid) documentation for details.
|
|
17
|
-
*
|
|
18
|
-
* ```
|
|
19
|
-
* <vaadin-grid-pro></vaadin-grid-pro>
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* ### Internal components
|
|
23
|
-
*
|
|
24
|
-
* In addition to `<vaadin-grid-pro>` itself, the following internal
|
|
25
|
-
* components are themable:
|
|
26
|
-
*
|
|
27
|
-
* - `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](#/elements/vaadin-checkbox).
|
|
28
|
-
* - `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).
|
|
29
|
-
* - `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](#/elements/vaadin-select).
|
|
30
|
-
*
|
|
31
|
-
* @fires {CustomEvent} active-item-changed - Fired when the `activeItem` property changes.
|
|
32
|
-
* @fires {CustomEvent} cell-activate - Fired when the cell is activated with click or keyboard.
|
|
33
|
-
* @fires {CustomEvent} cell-edit-started - Fired when the user starts editing a grid cell.
|
|
34
|
-
* @fires {CustomEvent} column-reorder - Fired when the columns in the grid are reordered.
|
|
35
|
-
* @fires {CustomEvent} column-resize - Fired when the grid column resize is finished.
|
|
36
|
-
* @fires {CustomEvent} expanded-items-changed - Fired when the `expandedItems` property changes.
|
|
37
|
-
* @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
|
|
38
|
-
* @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
|
|
39
|
-
* @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
|
|
40
|
-
* @fires {CustomEvent} item-property-changed - Fired before exiting the cell edit mode, if the value has been changed.
|
|
41
|
-
* @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
|
|
42
|
-
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
|
|
43
|
-
*
|
|
44
|
-
* @extends GridElement
|
|
45
|
-
* @mixes InlineEditingMixin
|
|
10
|
+
* @deprecated Import `GridPro` from `@vaadin/grid-pro` instead.
|
|
46
11
|
*/
|
|
47
|
-
|
|
48
|
-
static get is() {
|
|
49
|
-
return 'vaadin-grid-pro';
|
|
50
|
-
}
|
|
12
|
+
export const GridProElement = GridPro;
|
|
51
13
|
|
|
52
|
-
|
|
53
|
-
* @protected
|
|
54
|
-
*/
|
|
55
|
-
static _finalizeClass() {
|
|
56
|
-
super._finalizeClass();
|
|
57
|
-
|
|
58
|
-
const devModeCallback = window.Vaadin.developmentModeCallback;
|
|
59
|
-
const licenseChecker = devModeCallback && devModeCallback['vaadin-license-checker'];
|
|
60
|
-
if (typeof licenseChecker === 'function') {
|
|
61
|
-
licenseChecker(GridProElement);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
customElements.define(GridProElement.is, GridProElement);
|
|
67
|
-
|
|
68
|
-
export { GridProElement };
|
|
14
|
+
export * from '@vaadin/grid-pro/src/vaadin-grid-pro.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import '@vaadin/
|
|
2
|
-
import '../../src/vaadin-grid-pro-edit-checkbox.js';
|
|
1
|
+
import '@vaadin/grid-pro/theme/lumo/vaadin-grid-pro-edit-checkbox.js';
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import '@vaadin/
|
|
2
|
-
import '@vaadin/vaadin-list-box/theme/lumo/vaadin-list-box.js';
|
|
3
|
-
import '@vaadin/vaadin-item/theme/lumo/vaadin-item.js';
|
|
4
|
-
import './vaadin-grid-pro-edit-select-styles.js';
|
|
5
|
-
import '../../src/vaadin-grid-pro-edit-select.js';
|
|
1
|
+
import '@vaadin/grid-pro/theme/lumo/vaadin-grid-pro-edit-select.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import '@vaadin/
|
|
2
|
-
import '../../src/vaadin-grid-pro-edit-checkbox.js';
|
|
1
|
+
import '@vaadin/grid-pro/theme/material/vaadin-grid-pro-edit-checkbox.js';
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import '@vaadin/
|
|
2
|
-
import '@vaadin/vaadin-list-box/theme/material/vaadin-list-box.js';
|
|
3
|
-
import '@vaadin/vaadin-item/theme/material/vaadin-item.js';
|
|
4
|
-
import './vaadin-grid-pro-edit-select-styles.js';
|
|
5
|
-
import '../../src/vaadin-grid-pro-edit-select.js';
|
|
1
|
+
import '@vaadin/grid-pro/theme/material/vaadin-grid-pro-edit-select.js';
|
package/vaadin-grid-pro.d.ts
CHANGED
package/src/interfaces.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type GridProEditorType = 'text' | 'checkbox' | 'select' | 'custom';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
declare function InlineEditingMixin<T extends new (...args: any[]) => {}>(base: T): T & InlineEditingMixinConstructor;
|
|
2
|
-
|
|
3
|
-
interface InlineEditingMixinConstructor {
|
|
4
|
-
new (...args: any[]): InlineEditingMixin;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface InlineEditingMixin {
|
|
8
|
-
/**
|
|
9
|
-
* When true, pressing Enter while in cell edit mode
|
|
10
|
-
* will move focus to the editable cell in the next row
|
|
11
|
-
* (Shift + Enter - same, but for previous row).
|
|
12
|
-
* @attr {boolean} enter-next-row
|
|
13
|
-
*/
|
|
14
|
-
enterNextRow: boolean | null | undefined;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* When true, after moving to next or previous editable cell using
|
|
18
|
-
* Tab / Shift+Tab, it will be focused without edit mode.
|
|
19
|
-
*
|
|
20
|
-
* When `enterNextRow` is true, pressing Enter will also
|
|
21
|
-
* preserve edit mode, otherwise, it will have no effect.
|
|
22
|
-
* @attr {boolean} single-cell-edit
|
|
23
|
-
*/
|
|
24
|
-
singleCellEdit: boolean | null | undefined;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* When true, the grid enters cell edit mode on a single click
|
|
28
|
-
* instead of the default double click.
|
|
29
|
-
* @attr {boolean} edit-on-click
|
|
30
|
-
*/
|
|
31
|
-
editOnClick: boolean | null | undefined;
|
|
32
|
-
|
|
33
|
-
_checkImports(): void;
|
|
34
|
-
|
|
35
|
-
_stopEdit(shouldCancel?: boolean, shouldRestoreFocus?: boolean): void;
|
|
36
|
-
|
|
37
|
-
_switchEditCell(e: KeyboardEvent): void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { InlineEditingMixin, InlineEditingMixinConstructor };
|