@vaadin/grid 24.2.0-dev.f254716fe → 24.3.0-alpha2
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 +11 -11
- package/src/vaadin-grid-array-data-provider-mixin.js +1 -1
- package/src/vaadin-grid-column-group-mixin.d.ts +20 -0
- package/src/vaadin-grid-column-group-mixin.js +369 -0
- package/src/vaadin-grid-column-group.d.ts +4 -14
- package/src/vaadin-grid-column-group.js +8 -356
- package/src/vaadin-grid-column-mixin.d.ts +156 -0
- package/src/vaadin-grid-column-mixin.js +887 -0
- package/src/vaadin-grid-column.d.ts +11 -138
- package/src/vaadin-grid-column.js +6 -876
- package/src/vaadin-grid-data-provider-mixin.d.ts +6 -5
- package/src/vaadin-grid-data-provider-mixin.js +51 -20
- package/src/vaadin-grid-drag-and-drop-mixin.js +1 -1
- package/src/vaadin-grid-dynamic-columns-mixin.js +1 -1
- package/src/vaadin-grid-filter-column.js +5 -1
- package/src/vaadin-grid-filter-element-mixin.d.ts +34 -0
- package/src/vaadin-grid-filter-element-mixin.js +99 -0
- package/src/vaadin-grid-filter.d.ts +4 -21
- package/src/vaadin-grid-filter.js +8 -85
- package/src/vaadin-grid-keyboard-navigation-mixin.js +24 -4
- package/src/vaadin-grid-mixin.d.ts +218 -0
- package/src/vaadin-grid-mixin.js +1022 -0
- package/src/vaadin-grid-scroll-mixin.js +1 -1
- package/src/vaadin-grid-selection-column-base-mixin.d.ts +6 -0
- package/src/vaadin-grid-selection-column-base-mixin.js +151 -0
- package/src/vaadin-grid-selection-column.js +4 -1
- package/src/vaadin-grid-sort-column.js +5 -1
- package/src/vaadin-grid-sorter-mixin.d.ts +44 -0
- package/src/vaadin-grid-sorter-mixin.js +198 -0
- package/src/vaadin-grid-sorter.d.ts +3 -32
- package/src/vaadin-grid-sorter.js +8 -182
- package/src/vaadin-grid-tree-column-mixin.d.ts +19 -0
- package/src/vaadin-grid-tree-column-mixin.js +92 -0
- package/src/vaadin-grid-tree-column.d.ts +9 -7
- package/src/vaadin-grid-tree-column.js +7 -82
- package/src/vaadin-grid-tree-toggle.js +3 -1
- package/src/vaadin-grid.d.ts +5 -190
- package/src/vaadin-grid.js +7 -1018
- package/web-types.json +2311 -0
- package/web-types.lit.json +1007 -0
package/src/vaadin-grid.d.ts
CHANGED
|
@@ -4,165 +4,16 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
7
|
+
import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
8
|
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
9
|
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
10
|
import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
10
|
-
import type {
|
|
11
|
-
import type { ArrayDataProviderMixinClass } from './vaadin-grid-array-data-provider-mixin.js';
|
|
12
|
-
import type { GridColumn } from './vaadin-grid-column.js';
|
|
13
|
-
import { GridBodyRenderer, GridHeaderFooterRenderer } from './vaadin-grid-column.js';
|
|
14
|
-
import type { ColumnReorderingMixinClass } from './vaadin-grid-column-reordering-mixin.js';
|
|
15
|
-
import type { DataProviderMixinClass } from './vaadin-grid-data-provider-mixin.js';
|
|
16
|
-
import {
|
|
17
|
-
GridDataProvider,
|
|
18
|
-
GridDataProviderCallback,
|
|
19
|
-
GridDataProviderParams,
|
|
20
|
-
GridFilterDefinition,
|
|
21
|
-
GridSorterDefinition,
|
|
22
|
-
GridSorterDirection,
|
|
23
|
-
} from './vaadin-grid-data-provider-mixin.js';
|
|
24
|
-
import type { DragAndDropMixinClass } from './vaadin-grid-drag-and-drop-mixin.js';
|
|
25
|
-
import { GridDragAndDropFilter, GridDropLocation, GridDropMode } from './vaadin-grid-drag-and-drop-mixin.js';
|
|
26
|
-
import type { EventContextMixinClass } from './vaadin-grid-event-context-mixin.js';
|
|
27
|
-
import { GridEventContext } from './vaadin-grid-event-context-mixin.js';
|
|
28
|
-
import type { RowDetailsMixinClass } from './vaadin-grid-row-details-mixin.js';
|
|
29
|
-
import { GridRowDetailsRenderer } from './vaadin-grid-row-details-mixin.js';
|
|
30
|
-
import type { ScrollMixinClass } from './vaadin-grid-scroll-mixin.js';
|
|
31
|
-
import type { SelectionMixinClass } from './vaadin-grid-selection-mixin.js';
|
|
32
|
-
import type { SortMixinClass } from './vaadin-grid-sort-mixin.js';
|
|
33
|
-
import type {
|
|
34
|
-
GridCellClassNameGenerator,
|
|
35
|
-
GridCellPartNameGenerator,
|
|
36
|
-
StylingMixinClass,
|
|
37
|
-
} from './vaadin-grid-styling-mixin.js';
|
|
11
|
+
import type { GridEventMap, GridMixinClass } from './vaadin-grid-mixin.js';
|
|
38
12
|
|
|
39
|
-
export
|
|
40
|
-
GridBodyRenderer,
|
|
41
|
-
GridCellClassNameGenerator,
|
|
42
|
-
GridCellPartNameGenerator,
|
|
43
|
-
GridDataProvider,
|
|
44
|
-
GridDataProviderCallback,
|
|
45
|
-
GridDataProviderParams,
|
|
46
|
-
GridDragAndDropFilter,
|
|
47
|
-
GridDropLocation,
|
|
48
|
-
GridDropMode,
|
|
49
|
-
GridEventContext,
|
|
50
|
-
GridFilterDefinition,
|
|
51
|
-
GridHeaderFooterRenderer,
|
|
52
|
-
GridRowDetailsRenderer,
|
|
53
|
-
GridSorterDefinition,
|
|
54
|
-
GridSorterDirection,
|
|
55
|
-
};
|
|
13
|
+
export * from './vaadin-grid-mixin.js';
|
|
56
14
|
|
|
57
15
|
export type GridDefaultItem = any;
|
|
58
16
|
|
|
59
|
-
export interface GridItemModel<TItem> {
|
|
60
|
-
index: number;
|
|
61
|
-
item: TItem;
|
|
62
|
-
selected?: boolean;
|
|
63
|
-
expanded?: boolean;
|
|
64
|
-
level?: number;
|
|
65
|
-
detailsOpened?: boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Fired when the `activeItem` property changes.
|
|
70
|
-
*/
|
|
71
|
-
export type GridActiveItemChangedEvent<TItem> = CustomEvent<{ value: TItem | null | undefined }>;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Fired when the cell is activated with click or keyboard.
|
|
75
|
-
*/
|
|
76
|
-
export type GridCellActivateEvent<TItem> = CustomEvent<{ model: GridItemModel<TItem> }>;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Fired when a cell is focused with click or keyboard navigation.
|
|
80
|
-
*/
|
|
81
|
-
export type GridCellFocusEvent<TItem> = CustomEvent<{ context: GridEventContext<TItem> }>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Fired when the columns in the grid are reordered.
|
|
85
|
-
*/
|
|
86
|
-
export type GridColumnReorderEvent<TItem> = CustomEvent<{ columns: Array<GridColumn<TItem>> }>;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Fired when the grid column resize is finished.
|
|
90
|
-
*/
|
|
91
|
-
export type GridColumnResizeEvent<TItem> = CustomEvent<{ resizedColumn: GridColumn<TItem> }>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Fired when the `dataProvider` property changes.
|
|
95
|
-
*/
|
|
96
|
-
export type GridDataProviderChangedEvent<TItem> = CustomEvent<{ value: GridDataProvider<TItem> }>;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Fired when the `expandedItems` property changes.
|
|
100
|
-
*/
|
|
101
|
-
export type GridExpandedItemsChangedEvent<TItem> = CustomEvent<{ value: TItem[] }>;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Fired when starting to drag grid rows.
|
|
105
|
-
*/
|
|
106
|
-
export type GridDragStartEvent<TItem> = CustomEvent<{
|
|
107
|
-
draggedItems: TItem[];
|
|
108
|
-
setDraggedItemsCount(count: number): void;
|
|
109
|
-
setDragData(type: string, data: string): void;
|
|
110
|
-
}>;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Fired when a drop occurs on top of the grid.
|
|
114
|
-
*/
|
|
115
|
-
export type GridDropEvent<TItem> = CustomEvent<{
|
|
116
|
-
dropTargetItem: TItem;
|
|
117
|
-
dropLocation: GridDropLocation;
|
|
118
|
-
dragData: Array<{ type: string; data: string }>;
|
|
119
|
-
}>;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Fired when the `loading` property changes.
|
|
123
|
-
*/
|
|
124
|
-
export type GridLoadingChangedEvent = CustomEvent<{ value: boolean }>;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Fired when the `selectedItems` property changes.
|
|
128
|
-
*/
|
|
129
|
-
export type GridSelectedItemsChangedEvent<TItem> = CustomEvent<{ value: TItem[] }>;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Fired when the `size` property changes.
|
|
133
|
-
*/
|
|
134
|
-
export type GridSizeChangedEvent = CustomEvent<{ value: number }>;
|
|
135
|
-
|
|
136
|
-
export interface GridCustomEventMap<TItem> {
|
|
137
|
-
'active-item-changed': GridActiveItemChangedEvent<TItem>;
|
|
138
|
-
|
|
139
|
-
'cell-activate': GridCellActivateEvent<TItem>;
|
|
140
|
-
|
|
141
|
-
'cell-focus': GridCellFocusEvent<TItem>;
|
|
142
|
-
|
|
143
|
-
'column-reorder': GridColumnReorderEvent<TItem>;
|
|
144
|
-
|
|
145
|
-
'column-resize': GridColumnResizeEvent<TItem>;
|
|
146
|
-
|
|
147
|
-
'data-provider-changed': GridDataProviderChangedEvent<TItem>;
|
|
148
|
-
|
|
149
|
-
'expanded-items-changed': GridExpandedItemsChangedEvent<TItem>;
|
|
150
|
-
|
|
151
|
-
'grid-dragstart': GridDragStartEvent<TItem>;
|
|
152
|
-
|
|
153
|
-
'grid-dragend': Event;
|
|
154
|
-
|
|
155
|
-
'grid-drop': GridDropEvent<TItem>;
|
|
156
|
-
|
|
157
|
-
'loading-changed': GridLoadingChangedEvent;
|
|
158
|
-
|
|
159
|
-
'selected-items-changed': GridSelectedItemsChangedEvent<TItem>;
|
|
160
|
-
|
|
161
|
-
'size-changed': GridSizeChangedEvent;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface GridEventMap<TItem> extends HTMLElementEventMap, GridCustomEventMap<TItem> {}
|
|
165
|
-
|
|
166
17
|
/**
|
|
167
18
|
* `<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the
|
|
168
19
|
* the grid can be populated by using renderer callback function.
|
|
@@ -400,33 +251,6 @@ export interface GridEventMap<TItem> extends HTMLElementEventMap, GridCustomEven
|
|
|
400
251
|
* @fires {CustomEvent} size-changed - Fired when the `size` property changes.
|
|
401
252
|
*/
|
|
402
253
|
declare class Grid<TItem = GridDefaultItem> extends HTMLElement {
|
|
403
|
-
/**
|
|
404
|
-
* If true, the grid's height is defined by its rows.
|
|
405
|
-
*
|
|
406
|
-
* Effectively, this disables the grid's virtual scrolling so that all the rows are rendered in the DOM at once.
|
|
407
|
-
* If the grid has a large number of items, using the feature is discouraged to avoid performance issues.
|
|
408
|
-
* @attr {boolean} all-rows-visible
|
|
409
|
-
*/
|
|
410
|
-
allRowsVisible: boolean;
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Updates the `width` of all columns which have `autoWidth` set to `true`.
|
|
414
|
-
*/
|
|
415
|
-
recalculateColumnWidths(): void;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Requests an update for the content of cells.
|
|
419
|
-
*
|
|
420
|
-
* While performing the update, the following renderers are invoked:
|
|
421
|
-
* - `Grid.rowDetailsRenderer`
|
|
422
|
-
* - `GridColumn.renderer`
|
|
423
|
-
* - `GridColumn.headerRenderer`
|
|
424
|
-
* - `GridColumn.footerRenderer`
|
|
425
|
-
*
|
|
426
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
427
|
-
*/
|
|
428
|
-
requestContentUpdate(): void;
|
|
429
|
-
|
|
430
254
|
addEventListener<K extends keyof GridEventMap<TItem>>(
|
|
431
255
|
type: K,
|
|
432
256
|
listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
|
|
@@ -445,17 +269,8 @@ interface Grid<TItem = GridDefaultItem>
|
|
|
445
269
|
ElementMixinClass,
|
|
446
270
|
ThemableMixinClass,
|
|
447
271
|
ThemePropertyMixinClass,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
DataProviderMixinClass<TItem>,
|
|
451
|
-
RowDetailsMixinClass<TItem>,
|
|
452
|
-
ScrollMixinClass,
|
|
453
|
-
SelectionMixinClass<TItem>,
|
|
454
|
-
SortMixinClass,
|
|
455
|
-
ColumnReorderingMixinClass,
|
|
456
|
-
EventContextMixinClass<TItem>,
|
|
457
|
-
StylingMixinClass<TItem>,
|
|
458
|
-
DragAndDropMixinClass<TItem> {}
|
|
272
|
+
ControllerMixinClass,
|
|
273
|
+
GridMixinClass<TItem> {}
|
|
459
274
|
|
|
460
275
|
declare global {
|
|
461
276
|
interface HTMLElementTagNameMap {
|