@vaadin/grid 24.2.3 → 24.3.0-alpha10
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 +18 -13
- package/src/vaadin-grid-a11y-mixin.js +1 -1
- package/src/vaadin-grid-active-item-mixin.js +1 -0
- package/src/vaadin-grid-array-data-provider-mixin.js +14 -17
- package/src/vaadin-grid-column-group-mixin.d.ts +20 -0
- package/src/vaadin-grid-column-group-mixin.js +364 -0
- package/src/vaadin-grid-column-group.d.ts +4 -14
- package/src/vaadin-grid-column-group.js +5 -355
- package/src/vaadin-grid-column-mixin.d.ts +170 -0
- package/src/vaadin-grid-column-mixin.js +958 -0
- package/src/vaadin-grid-column.d.ts +11 -138
- package/src/vaadin-grid-column.js +5 -876
- package/src/vaadin-grid-data-provider-mixin.d.ts +6 -30
- package/src/vaadin-grid-data-provider-mixin.js +122 -246
- package/src/vaadin-grid-drag-and-drop-mixin.js +17 -5
- package/src/vaadin-grid-dynamic-columns-mixin.js +22 -17
- package/src/vaadin-grid-filter-column-mixin.d.ts +22 -0
- package/src/vaadin-grid-filter-column-mixin.js +106 -0
- package/src/vaadin-grid-filter-column.d.ts +9 -11
- package/src/vaadin-grid-filter-column.js +3 -90
- package/src/vaadin-grid-filter-element-mixin.d.ts +34 -0
- package/src/vaadin-grid-filter-element-mixin.js +108 -0
- package/src/vaadin-grid-filter-mixin.js +4 -4
- package/src/vaadin-grid-filter.d.ts +4 -21
- package/src/vaadin-grid-filter.js +5 -84
- package/src/vaadin-grid-helpers.js +94 -0
- package/src/vaadin-grid-keyboard-navigation-mixin.js +11 -4
- package/src/vaadin-grid-mixin.js +21 -37
- package/src/vaadin-grid-row-details-mixin.js +7 -8
- package/src/vaadin-grid-scroll-mixin.js +2 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +12 -4
- package/src/vaadin-grid-selection-column-mixin.d.ts +24 -0
- package/src/vaadin-grid-selection-column-mixin.js +194 -0
- package/src/vaadin-grid-selection-column.d.ts +13 -17
- package/src/vaadin-grid-selection-column.js +4 -186
- package/src/vaadin-grid-selection-mixin.js +4 -3
- package/src/vaadin-grid-sort-column-mixin.d.ts +36 -0
- package/src/vaadin-grid-sort-column-mixin.js +101 -0
- package/src/vaadin-grid-sort-column.d.ts +8 -26
- package/src/vaadin-grid-sort-column.js +3 -87
- package/src/vaadin-grid-sorter-mixin.d.ts +44 -0
- package/src/vaadin-grid-sorter-mixin.js +200 -0
- package/src/vaadin-grid-sorter.d.ts +3 -32
- package/src/vaadin-grid-sorter.js +5 -181
- package/src/vaadin-grid-styles.js +341 -345
- package/src/vaadin-grid-styling-mixin.js +8 -2
- package/src/vaadin-grid-tree-column-mixin.d.ts +18 -0
- package/src/vaadin-grid-tree-column-mixin.js +99 -0
- package/src/vaadin-grid-tree-column.d.ts +9 -7
- package/src/vaadin-grid-tree-column.js +3 -82
- package/src/vaadin-grid-tree-toggle-mixin.d.ts +39 -0
- package/src/vaadin-grid-tree-toggle-mixin.js +153 -0
- package/src/vaadin-grid-tree-toggle.d.ts +4 -27
- package/src/vaadin-grid-tree-toggle.js +9 -141
- package/src/vaadin-grid.d.ts +3 -0
- package/src/vaadin-grid.js +7 -2
- package/theme/lumo/vaadin-grid-sorter-styles.js +1 -1
- package/theme/lumo/vaadin-grid-styles.js +15 -14
- package/theme/material/vaadin-grid-styles.js +15 -10
- package/web-types.json +331 -126
- package/web-types.lit.json +114 -58
|
@@ -3,92 +3,17 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
-
import type { GridDefaultItem, GridItemModel } from './vaadin-grid.js';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import type { GridDefaultItem } from './vaadin-grid.js';
|
|
8
|
+
import type {
|
|
9
|
+
GridBodyRenderer as GridMixinBodyRenderer,
|
|
10
|
+
GridColumnMixin,
|
|
11
|
+
GridHeaderFooterRenderer as GridMixinHeaderFooterRenderer,
|
|
12
|
+
} from './vaadin-grid-column-mixin.js';
|
|
14
13
|
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
export type GridHeaderFooterRenderer<TItem> =
|
|
18
|
-
|
|
19
|
-
export declare function ColumnBaseMixin<TItem, T extends Constructor<HTMLElement>>(
|
|
20
|
-
base: T,
|
|
21
|
-
): Constructor<ColumnBaseMixinClass<TItem>> & T;
|
|
22
|
-
|
|
23
|
-
export declare class ColumnBaseMixinClass<TItem> {
|
|
24
|
-
/**
|
|
25
|
-
* When set to true, the column is user-resizable.
|
|
26
|
-
*/
|
|
27
|
-
resizable: boolean | null | undefined;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* When true, the column is frozen. When a column inside of a column group is frozen,
|
|
31
|
-
* all of the sibling columns inside the group will get frozen also.
|
|
32
|
-
*/
|
|
33
|
-
frozen: boolean;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* When true, the column is frozen to end of grid.
|
|
37
|
-
*
|
|
38
|
-
* When a column inside of a column group is frozen to end, all of the sibling columns
|
|
39
|
-
* inside the group will get frozen to end also.
|
|
40
|
-
*
|
|
41
|
-
* Column can not be set as `frozen` and `frozenToEnd` at the same time.
|
|
42
|
-
* @attr {boolean} frozen-to-end
|
|
43
|
-
*/
|
|
44
|
-
frozenToEnd: boolean;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* When true, the cells for this column will be rendered with the `role` attribute
|
|
48
|
-
* set as `rowheader`, instead of the `gridcell` role value used by default.
|
|
49
|
-
*
|
|
50
|
-
* When a column is set as row header, its cells will be announced by screen readers
|
|
51
|
-
* while navigating to help user identify the current row as uniquely as possible.
|
|
52
|
-
*
|
|
53
|
-
* @attr {boolean} row-header
|
|
54
|
-
*/
|
|
55
|
-
rowHeader: boolean;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* When set to true, the cells for this column are hidden.
|
|
59
|
-
*/
|
|
60
|
-
hidden: boolean;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Text content to display in the header cell of the column.
|
|
64
|
-
*/
|
|
65
|
-
header: string | null | undefined;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Aligns the columns cell content horizontally.
|
|
69
|
-
* Supported values: "start", "center" and "end".
|
|
70
|
-
* @attr {start|center|end} text-align
|
|
71
|
-
*/
|
|
72
|
-
textAlign: GridColumnTextAlign | null | undefined;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Custom function for rendering the header content.
|
|
76
|
-
* Receives two arguments:
|
|
77
|
-
*
|
|
78
|
-
* - `root` The header cell content DOM element. Append your content to it.
|
|
79
|
-
* - `column` The `<vaadin-grid-column>` element.
|
|
80
|
-
*/
|
|
81
|
-
headerRenderer: GridHeaderFooterRenderer<TItem> | null | undefined;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Custom function for rendering the footer content.
|
|
85
|
-
* Receives two arguments:
|
|
86
|
-
*
|
|
87
|
-
* - `root` The footer cell content DOM element. Append your content to it.
|
|
88
|
-
* - `column` The `<vaadin-grid-column>` element.
|
|
89
|
-
*/
|
|
90
|
-
footerRenderer: GridHeaderFooterRenderer<TItem> | null | undefined;
|
|
91
|
-
}
|
|
14
|
+
export * from './vaadin-grid-column-mixin.js';
|
|
15
|
+
export type GridBodyRenderer<TItem = GridDefaultItem> = GridMixinBodyRenderer<TItem, GridColumn<TItem>>;
|
|
16
|
+
export type GridHeaderFooterRenderer<TItem = GridDefaultItem> = GridMixinHeaderFooterRenderer<TItem, GridColumn<TItem>>;
|
|
92
17
|
|
|
93
18
|
/**
|
|
94
19
|
* A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`
|
|
@@ -97,61 +22,9 @@ export declare class ColumnBaseMixinClass<TItem> {
|
|
|
97
22
|
* See [`<vaadin-grid>`](#/elements/vaadin-grid) documentation for instructions on how
|
|
98
23
|
* to configure the `<vaadin-grid-column>`.
|
|
99
24
|
*/
|
|
100
|
-
declare class GridColumn<TItem = GridDefaultItem> extends HTMLElement {
|
|
101
|
-
/**
|
|
102
|
-
* Width of the cells for this column.
|
|
103
|
-
*/
|
|
104
|
-
width: string | null | undefined;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Flex grow ratio for the cell widths. When set to 0, cell width is fixed.
|
|
108
|
-
* @attr {number} flex-grow
|
|
109
|
-
*/
|
|
110
|
-
flexGrow: number;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Custom function for rendering the cell content.
|
|
114
|
-
* Receives three arguments:
|
|
115
|
-
*
|
|
116
|
-
* - `root` The cell content DOM element. Append your content to it.
|
|
117
|
-
* - `column` The `<vaadin-grid-column>` element.
|
|
118
|
-
* - `model` The object with the properties related with
|
|
119
|
-
* the rendered item, contains:
|
|
120
|
-
* - `model.index` The index of the item.
|
|
121
|
-
* - `model.item` The item.
|
|
122
|
-
* - `model.expanded` Sublevel toggle state.
|
|
123
|
-
* - `model.level` Level of the tree represented with a horizontal offset of the toggle button.
|
|
124
|
-
* - `model.selected` Selected state.
|
|
125
|
-
* - `model.detailsOpened` Details opened state.
|
|
126
|
-
*/
|
|
127
|
-
renderer: GridBodyRenderer<TItem> | null | undefined;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Path to an item sub-property whose value gets displayed in the column body cells.
|
|
131
|
-
* The property name is also shown in the column header if an explicit header or renderer isn't defined.
|
|
132
|
-
*/
|
|
133
|
-
path: string | null | undefined;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Automatically sets the width of the column based on the column contents when this is set to `true`.
|
|
137
|
-
*
|
|
138
|
-
* For performance reasons the column width is calculated automatically only once when the grid items
|
|
139
|
-
* are rendered for the first time and the calculation only considers the rows which are currently
|
|
140
|
-
* rendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell
|
|
141
|
-
* content changes, the column width might not match the contents anymore.
|
|
142
|
-
*
|
|
143
|
-
* Hidden columns are ignored in the calculation and their widths are not automatically updated when
|
|
144
|
-
* you show a column that was initially hidden.
|
|
145
|
-
*
|
|
146
|
-
* You can manually trigger the auto sizing behavior again by calling `grid.recalculateColumnWidths()`.
|
|
147
|
-
*
|
|
148
|
-
* The column width may still grow larger when `flexGrow` is not 0.
|
|
149
|
-
* @attr {boolean} auto-width
|
|
150
|
-
*/
|
|
151
|
-
autoWidth: boolean;
|
|
152
|
-
}
|
|
25
|
+
declare class GridColumn<TItem = GridDefaultItem> extends HTMLElement {}
|
|
153
26
|
|
|
154
|
-
interface GridColumn<TItem = GridDefaultItem> extends
|
|
27
|
+
interface GridColumn<TItem = GridDefaultItem> extends GridColumnMixin<TItem, GridColumn<TItem>>, HTMLElement {}
|
|
155
28
|
|
|
156
29
|
declare global {
|
|
157
30
|
interface HTMLElementTagNameMap {
|