@waggylabs/yumekit 0.5.1-beta.5 → 0.5.1-beta.6
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/CHANGELOG.md +3 -3
- package/dist/components/y-checkbox.js +1 -0
- package/dist/components/y-data-grid/y-data-grid.d.ts +121 -74
- package/dist/components/y-data-grid.d.ts +121 -74
- package/dist/components/y-data-grid.js +1053 -350
- package/dist/components/y-theme.js +69 -1
- package/dist/index.js +1122 -351
- package/dist/styles/ant-blue-dark.css +221 -0
- package/dist/styles/ant-blue-light.css +221 -0
- package/dist/styles/bootstrap-dark.css +221 -0
- package/dist/styles/bootstrap-light.css +221 -0
- package/dist/styles/catppuccin-frappe.css +211 -0
- package/dist/styles/catppuccin-latte.css +211 -0
- package/dist/styles/catppuccin-macchiato.css +211 -0
- package/dist/styles/catppuccin-mocha.css +211 -0
- package/dist/styles/mono-dark.css +215 -0
- package/dist/styles/mono-light.css +215 -0
- package/dist/styles/primer-dark-dimmed.css +221 -0
- package/dist/styles/primer-dark.css +221 -0
- package/dist/styles/primer-light.css +221 -0
- package/dist/styles/shadcn-blue-dark.css +221 -0
- package/dist/styles/shadcn-blue-light.css +221 -0
- package/dist/styles/shadcn-dark.css +221 -0
- package/dist/styles/shadcn-light.css +221 -0
- package/dist/yumekit.min.js +1 -1
- package/llm.txt +9 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -35,9 +35,7 @@ Delete any empty sections before publishing.
|
|
|
35
35
|
|
|
36
36
|
### Added
|
|
37
37
|
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
- Two new built-in themes, `carbon-light` and `carbon-dark`, applying IBM Carbon — the Carbon palette (Interactive Blue `#0f62fe`, IBM gray surfaces, Carbon status colors), IBM Plex Sans typography, and Carbon's sharp shape language (0px radii, 1px borders). `y-theme` loads the IBM Plex Sans webfont automatically when one of these themes is active.
|
|
38
|
+
- Several theme color variations including the `Catppuccin` color schemes, as well as several new themes based on some of the most popular design systems. This includes Material, Carbon, Ant, Shadcn, Primer, and Bootstrap.
|
|
41
39
|
|
|
42
40
|
- `y-tabs` — new `variant="accent"` style: minimal tabs where the active tab shows a primary-colored indicator border on its content-facing edge (bottom for top tabs, etc.). The default bordered style is unchanged. Adds `--component-tabs-accent-width` (indicator thickness). The border-width token is normalized to `--component-tabs-border-width` (matching `--component-tabs-border-color`); the legacy `--component-tab-border-width` is still honored as a fallback.
|
|
43
41
|
|
|
@@ -73,6 +71,8 @@ Delete any empty sections before publishing.
|
|
|
73
71
|
|
|
74
72
|
### Fixed
|
|
75
73
|
|
|
74
|
+
- `y-data-grid` — selected-row colors are now readable in every theme. The row used a near-surface tint (`--primary-background-component`) for its background but the white `--primary-content-inverse` for text, so text was invisible on light themes and the background was indistinguishable from the surface on dark themes. Selected rows now use the `--primary-background-active` tint with the normal `--base-content` text (override via `--component-data-grid-row-selected-bg` / `--component-data-grid-row-selected-text`). The multi-sort priority badge and group-toggle focus ring, which shared the same mistake, now use `--primary-content`.
|
|
75
|
+
|
|
76
76
|
- Form field components now share one field background. `y-select` (trigger and dropdown) used `base.background.app` while `y-input` / `y-textarea` / `y-color` / `y-date` used `base.background.component`; `select.background` is now `base.background.component` across all themes, so fields match when placed together on a form (most visible in the Material and Carbon themes). The select dropdown panel now also matches menus/popovers.
|
|
77
77
|
|
|
78
78
|
- `y-avatar` — the three `shape` values are now visually distinct. Added a `--component-avatar-border-radius-rounded` token (medium radius) and changed `square` to a zero radius (sharp corners); `circle` is unchanged.
|
|
@@ -24,42 +24,78 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
24
24
|
_scrollTop: number;
|
|
25
25
|
_viewportHeight: number;
|
|
26
26
|
_resizeObserver: ResizeObserver;
|
|
27
|
+
_resizeState: {
|
|
28
|
+
col: any;
|
|
29
|
+
handle: any;
|
|
30
|
+
colEl: any;
|
|
31
|
+
pointerId: any;
|
|
32
|
+
startX: any;
|
|
33
|
+
startWidth: any;
|
|
34
|
+
width: any;
|
|
35
|
+
};
|
|
36
|
+
_reorderState: {
|
|
37
|
+
col: any;
|
|
38
|
+
th: any;
|
|
39
|
+
pointerId: any;
|
|
40
|
+
startX: any;
|
|
41
|
+
startY: any;
|
|
42
|
+
dragging: boolean;
|
|
43
|
+
targetKey: any;
|
|
44
|
+
placeAfter: boolean;
|
|
45
|
+
};
|
|
46
|
+
_suppressHeaderClick: boolean;
|
|
27
47
|
_onPaginatorChange(e: any): void;
|
|
28
48
|
_onPaginatorPageSize(e: any): void;
|
|
29
49
|
_onScroll(e: any): void;
|
|
50
|
+
_onColumnResizeMove(e: any): void;
|
|
51
|
+
_onColumnResizeEnd(): void;
|
|
52
|
+
_onColumnReorderMove(e: any): void;
|
|
53
|
+
_onColumnReorderEnd(): void;
|
|
30
54
|
connectedCallback(): void;
|
|
31
55
|
disconnectedCallback(): void;
|
|
32
56
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
57
|
+
set aggregates(obj: any);
|
|
58
|
+
/** Per-column aggregate config — `{ columnKey: "sum" | "avg" | "min" | "max" | "count" }`. */
|
|
59
|
+
get aggregates(): any;
|
|
60
|
+
set bufferSize(val: number);
|
|
61
|
+
/** Extra rows rendered above and below the viewport when virtualizing. */
|
|
62
|
+
get bufferSize(): number;
|
|
33
63
|
set columns(val: string);
|
|
34
64
|
/** Column schema as JSON string or array of column definition objects. */
|
|
35
65
|
get columns(): string;
|
|
36
|
-
set data(val: string);
|
|
37
|
-
/** Row data as JSON string or array of objects keyed by column key. */
|
|
38
|
-
get data(): string;
|
|
39
|
-
set mode(val: string);
|
|
40
|
-
/** Operating mode: "client" performs sort/filter/page locally, "server" emits events. */
|
|
41
|
-
get mode(): string;
|
|
42
|
-
set pageSize(val: number);
|
|
43
|
-
/** Rows per page. */
|
|
44
|
-
get pageSize(): number;
|
|
45
66
|
set currentPage(val: number);
|
|
46
67
|
/** Current 1-based page index. */
|
|
47
68
|
get currentPage(): number;
|
|
48
|
-
set
|
|
49
|
-
/**
|
|
50
|
-
get
|
|
51
|
-
set
|
|
52
|
-
/**
|
|
53
|
-
get
|
|
54
|
-
set
|
|
55
|
-
/**
|
|
56
|
-
get
|
|
57
|
-
set
|
|
58
|
-
/**
|
|
59
|
-
get
|
|
60
|
-
set
|
|
61
|
-
/**
|
|
62
|
-
get
|
|
69
|
+
set data(val: string);
|
|
70
|
+
/** Row data as JSON string or array of objects keyed by column key. */
|
|
71
|
+
get data(): string;
|
|
72
|
+
set editOn(val: string);
|
|
73
|
+
/** Edit trigger: "click" (single click on cell) or "focus" (default "click"). */
|
|
74
|
+
get editOn(): string;
|
|
75
|
+
set emptyMessage(val: string);
|
|
76
|
+
/** Empty-state message text. */
|
|
77
|
+
get emptyMessage(): string;
|
|
78
|
+
set enableColumnReorder(val: boolean);
|
|
79
|
+
/** When set, leaf headers can be dragged to a new position to reorder columns. Opt out per column with `reorderable: false`. */
|
|
80
|
+
get enableColumnReorder(): boolean;
|
|
81
|
+
set enableColumnResize(val: boolean);
|
|
82
|
+
/** When set, leaf headers expose a drag handle on their inline (right) edge for resizing. Opt out per column with `resizable: false`. */
|
|
83
|
+
get enableColumnResize(): boolean;
|
|
84
|
+
set enableEditing(val: boolean);
|
|
85
|
+
/** Enables inline cell editing. */
|
|
86
|
+
get enableEditing(): boolean;
|
|
87
|
+
set enableHeaderMenu(val: boolean);
|
|
88
|
+
/** When set, leaf headers expose a kebab menu for filter / sort / column visibility / move actions. */
|
|
89
|
+
get enableHeaderMenu(): boolean;
|
|
90
|
+
set enablePagination(val: boolean);
|
|
91
|
+
/** Pagination controls. Defaults to true unless attribute set to "false". */
|
|
92
|
+
get enablePagination(): boolean;
|
|
93
|
+
set enableSelection(val: boolean);
|
|
94
|
+
/** Renders a checkbox column and enables row-selection interactions. */
|
|
95
|
+
get enableSelection(): boolean;
|
|
96
|
+
set enableSorting(val: boolean);
|
|
97
|
+
/** Sorting via header click. Defaults to true unless attribute set to "false". */
|
|
98
|
+
get enableSorting(): boolean;
|
|
63
99
|
set filtering(val: "inline" | "advanced");
|
|
64
100
|
/**
|
|
65
101
|
* Filtering UI mode: `"inline"` renders the per-column filter row beneath
|
|
@@ -68,68 +104,62 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
68
104
|
* filtering UI; column filters can still be set programmatically.
|
|
69
105
|
*/
|
|
70
106
|
get filtering(): "inline" | "advanced";
|
|
71
|
-
set enableSorting(val: boolean);
|
|
72
|
-
/** Sorting via header click. Defaults to true unless attribute set to "false". */
|
|
73
|
-
get enableSorting(): boolean;
|
|
74
|
-
set enablePagination(val: boolean);
|
|
75
|
-
/** Pagination controls. Defaults to true unless attribute set to "false". */
|
|
76
|
-
get enablePagination(): boolean;
|
|
77
|
-
set showItemCount(val: boolean);
|
|
78
|
-
/** Show the item count in the footer's right side. Defaults to false; add the attribute (or `show-item-count="true"`) to enable. */
|
|
79
|
-
get showItemCount(): boolean;
|
|
80
|
-
set emptyMessage(val: string);
|
|
81
|
-
/** Empty-state message text. */
|
|
82
|
-
get emptyMessage(): string;
|
|
83
|
-
set rowHeight(val: number);
|
|
84
|
-
/** Row height in pixels (used by virtual scrolling in a later phase). */
|
|
85
|
-
get rowHeight(): number;
|
|
86
|
-
set globalSearch(val: string);
|
|
87
|
-
/** Current global search string. */
|
|
88
|
-
get globalSearch(): string;
|
|
89
107
|
set filters(obj: {});
|
|
90
108
|
/** Current column filters as a `{ [key]: value }` object. */
|
|
91
109
|
get filters(): {};
|
|
92
|
-
set
|
|
93
|
-
/**
|
|
94
|
-
get
|
|
95
|
-
set
|
|
96
|
-
/**
|
|
97
|
-
get
|
|
98
|
-
set
|
|
99
|
-
/**
|
|
100
|
-
get
|
|
110
|
+
set fixedHeader(val: boolean);
|
|
111
|
+
/** Sticky header during vertical scroll. Defaults to true unless attribute set to "false". */
|
|
112
|
+
get fixedHeader(): boolean;
|
|
113
|
+
set globalSearch(val: string);
|
|
114
|
+
/** Current global search string. */
|
|
115
|
+
get globalSearch(): string;
|
|
116
|
+
set groupBy(val: string[]);
|
|
117
|
+
/** Column keys to group rows by (nested when more than one). */
|
|
118
|
+
get groupBy(): string[];
|
|
119
|
+
set hover(val: boolean);
|
|
120
|
+
/** Row hover highlight. Defaults to true unless attribute set to "false". */
|
|
121
|
+
get hover(): boolean;
|
|
122
|
+
set loading(val: boolean);
|
|
123
|
+
/** When true, a loading overlay is shown. */
|
|
124
|
+
get loading(): boolean;
|
|
125
|
+
set mode(val: string);
|
|
126
|
+
/** Operating mode: "client" performs sort/filter/page locally, "server" emits events. */
|
|
127
|
+
get mode(): string;
|
|
128
|
+
set pageSize(val: number);
|
|
129
|
+
/** Rows per page. */
|
|
130
|
+
get pageSize(): number;
|
|
131
|
+
set rowHeight(val: number);
|
|
132
|
+
/** Row height in pixels (used by virtual scrolling in a later phase). */
|
|
133
|
+
get rowHeight(): number;
|
|
101
134
|
set rowKey(val: string);
|
|
102
135
|
/** Column key used as a stable per-row identifier. Falls back to the row's array index. */
|
|
103
136
|
get rowKey(): string;
|
|
104
|
-
/** Array of selected row objects (resolved from current `_selectedKeys`). */
|
|
105
|
-
get selectedRows(): any[];
|
|
106
137
|
set selectedKeys(arr: any[]);
|
|
107
138
|
/** Array of selected row keys. */
|
|
108
139
|
get selectedKeys(): any[];
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
set
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
/** Array of selected row objects (resolved from current `_selectedKeys`). */
|
|
141
|
+
get selectedRows(): any[];
|
|
142
|
+
set selectionMode(val: string);
|
|
143
|
+
/** Selection mode: "single" or "multi" (default "multi"). */
|
|
144
|
+
get selectionMode(): string;
|
|
145
|
+
set showItemCount(val: boolean);
|
|
146
|
+
/** Show the item count in the footer's right side. Defaults to false; add the attribute (or `show-item-count="true"`) to enable. */
|
|
147
|
+
get showItemCount(): boolean;
|
|
148
|
+
set sortState(arr: any[]);
|
|
149
|
+
/** Current sort stack as an array of `{ column, direction }`. */
|
|
150
|
+
get sortState(): any[];
|
|
151
|
+
set striped(val: boolean);
|
|
152
|
+
/** Alternating row backgrounds. Defaults to false; set the attribute (or `striped="true"`) to enable. */
|
|
153
|
+
get striped(): boolean;
|
|
154
|
+
set totalRows(val: number);
|
|
155
|
+
/** Total row count, required for server-mode pagination. */
|
|
156
|
+
get totalRows(): number;
|
|
124
157
|
set viewportHeight(val: number);
|
|
125
158
|
/** Scrollable viewport height in pixels — required for virtualization. */
|
|
126
159
|
get viewportHeight(): number;
|
|
127
|
-
set
|
|
128
|
-
/**
|
|
129
|
-
get
|
|
130
|
-
set enableHeaderMenu(val: boolean);
|
|
131
|
-
/** When set, leaf headers expose a kebab menu for filter / sort / column visibility / move actions. */
|
|
132
|
-
get enableHeaderMenu(): boolean;
|
|
160
|
+
set virtual(val: boolean);
|
|
161
|
+
/** Enable virtual scrolling (only render visible rows). */
|
|
162
|
+
get virtual(): boolean;
|
|
133
163
|
/** Cancel the active edit (if any) without committing. */
|
|
134
164
|
cancelEdit(): void;
|
|
135
165
|
/** Clear all per-column filters and the global search query. */
|
|
@@ -155,10 +185,14 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
155
185
|
_absoluteRowIndex(displayIdx: any): any;
|
|
156
186
|
_applyClientFilters(rows: any): any;
|
|
157
187
|
_applyClientSort(rows: any): any;
|
|
188
|
+
_applyColumnReorder(sourceKey: any, targetKey: any, placeAfter: any): void;
|
|
158
189
|
_applyPendingColumnVisibility(): void;
|
|
190
|
+
_autoSizeColumn(col: any): void;
|
|
159
191
|
_beginEdit(row: any, rowKey: any, col: any): void;
|
|
160
192
|
_buildBody(columns: any, entries: any, leadingSpacerPx: any, trailingSpacerPx: any): HTMLElement;
|
|
161
193
|
_buildCell(row: any, rowKey: any, col: any): HTMLElement;
|
|
194
|
+
_buildColgroup(columns: any): HTMLElement;
|
|
195
|
+
_buildColumnResizeHandle(col: any): HTMLElement;
|
|
162
196
|
_buildColumnsSubmenuItem(): HTMLElement;
|
|
163
197
|
_buildColumnsSubmenuPopover(): HTMLElement;
|
|
164
198
|
_buildDataRow(columns: any, entry: any, displayIdx: any): HTMLElement;
|
|
@@ -202,11 +236,14 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
202
236
|
_cancelEdit(row: any, rowKey: any, col: any): void;
|
|
203
237
|
_clearSortFor(key: any): void;
|
|
204
238
|
_cloneColumnTree(tree: any): any;
|
|
239
|
+
_colElementFor(key: any): any;
|
|
205
240
|
_collectValidators(col: any): any[];
|
|
206
241
|
_commitActiveEditor(): void;
|
|
207
242
|
_commitEdit(row: any, rowKey: any, col: any, value: any, validators: any): void;
|
|
208
243
|
_computeAggregates(rows: any): {};
|
|
209
244
|
_defaultOperatorFor(col: any): "contains" | "equals";
|
|
245
|
+
_emitColumnReorder(column: any, fromIndex: any, toIndex: any): void;
|
|
246
|
+
_emitColumnResize(column: any, width: any): void;
|
|
210
247
|
_emitFilterChange(): boolean;
|
|
211
248
|
_emitGroupToggle(path: any, expanded: any): void;
|
|
212
249
|
_emitPageChange(page: any): boolean;
|
|
@@ -225,13 +262,17 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
225
262
|
_leafCount(node: any): any;
|
|
226
263
|
_matchesFilter(cellValue: any, filterValue: any, op: any, col: any): boolean;
|
|
227
264
|
_maxColumnDepth(tree: any): number;
|
|
265
|
+
_minWidthFor(col: any): number;
|
|
228
266
|
_moveColumn(key: any, direction: any): void;
|
|
267
|
+
_onColumnReorderStart(e: any, col: any, th: any): void;
|
|
268
|
+
_onColumnResizeStart(e: any, col: any, handle: any): void;
|
|
229
269
|
_onHeaderClick(key: any, event: any): void;
|
|
230
270
|
_onRowClick(row: any, rowKey: any, event: any): void;
|
|
231
271
|
_onRowDblClick(row: any, event: any): void;
|
|
232
272
|
_openColumnsSubmenu(triggerBtn: any): void;
|
|
233
273
|
_openFilterPopover(col: any, triggerBtn: any): void;
|
|
234
274
|
_openHeaderMenu(col: any, triggerBtn: any): void;
|
|
275
|
+
_paintDropIndicator(target: any): void;
|
|
235
276
|
_parseAttributes(): void;
|
|
236
277
|
_readEditorValue(editor: any, type: any): any;
|
|
237
278
|
_render(): void;
|
|
@@ -239,9 +280,15 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
239
280
|
_columnsSubmenuPopover: HTMLElement;
|
|
240
281
|
_filterPopover: HTMLElement;
|
|
241
282
|
_renderCellValue(col: any, value: any): HTMLElement;
|
|
283
|
+
_reorderTargetAt(clientX: any, sourceKey: any): {
|
|
284
|
+
key: any;
|
|
285
|
+
th: any;
|
|
286
|
+
placeAfter: boolean;
|
|
287
|
+
};
|
|
242
288
|
_rowKeyFor(row: any, idx: any): string;
|
|
243
289
|
_sameTreeShape(a: any, b: any): boolean;
|
|
244
290
|
_setColumnFilter(key: any, value: any): void;
|
|
291
|
+
_setColumnWidth(col: any, width: any): void;
|
|
245
292
|
_setSortFromMenu(key: any, direction: any): void;
|
|
246
293
|
_setupVirtualScroll(scrollEl: any): void;
|
|
247
294
|
_scrollEl: any;
|
|
@@ -24,42 +24,78 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
24
24
|
_scrollTop: number;
|
|
25
25
|
_viewportHeight: number;
|
|
26
26
|
_resizeObserver: ResizeObserver;
|
|
27
|
+
_resizeState: {
|
|
28
|
+
col: any;
|
|
29
|
+
handle: any;
|
|
30
|
+
colEl: any;
|
|
31
|
+
pointerId: any;
|
|
32
|
+
startX: any;
|
|
33
|
+
startWidth: any;
|
|
34
|
+
width: any;
|
|
35
|
+
};
|
|
36
|
+
_reorderState: {
|
|
37
|
+
col: any;
|
|
38
|
+
th: any;
|
|
39
|
+
pointerId: any;
|
|
40
|
+
startX: any;
|
|
41
|
+
startY: any;
|
|
42
|
+
dragging: boolean;
|
|
43
|
+
targetKey: any;
|
|
44
|
+
placeAfter: boolean;
|
|
45
|
+
};
|
|
46
|
+
_suppressHeaderClick: boolean;
|
|
27
47
|
_onPaginatorChange(e: any): void;
|
|
28
48
|
_onPaginatorPageSize(e: any): void;
|
|
29
49
|
_onScroll(e: any): void;
|
|
50
|
+
_onColumnResizeMove(e: any): void;
|
|
51
|
+
_onColumnResizeEnd(): void;
|
|
52
|
+
_onColumnReorderMove(e: any): void;
|
|
53
|
+
_onColumnReorderEnd(): void;
|
|
30
54
|
connectedCallback(): void;
|
|
31
55
|
disconnectedCallback(): void;
|
|
32
56
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
57
|
+
set aggregates(obj: any);
|
|
58
|
+
/** Per-column aggregate config — `{ columnKey: "sum" | "avg" | "min" | "max" | "count" }`. */
|
|
59
|
+
get aggregates(): any;
|
|
60
|
+
set bufferSize(val: number);
|
|
61
|
+
/** Extra rows rendered above and below the viewport when virtualizing. */
|
|
62
|
+
get bufferSize(): number;
|
|
33
63
|
set columns(val: string);
|
|
34
64
|
/** Column schema as JSON string or array of column definition objects. */
|
|
35
65
|
get columns(): string;
|
|
36
|
-
set data(val: string);
|
|
37
|
-
/** Row data as JSON string or array of objects keyed by column key. */
|
|
38
|
-
get data(): string;
|
|
39
|
-
set mode(val: string);
|
|
40
|
-
/** Operating mode: "client" performs sort/filter/page locally, "server" emits events. */
|
|
41
|
-
get mode(): string;
|
|
42
|
-
set pageSize(val: number);
|
|
43
|
-
/** Rows per page. */
|
|
44
|
-
get pageSize(): number;
|
|
45
66
|
set currentPage(val: number);
|
|
46
67
|
/** Current 1-based page index. */
|
|
47
68
|
get currentPage(): number;
|
|
48
|
-
set
|
|
49
|
-
/**
|
|
50
|
-
get
|
|
51
|
-
set
|
|
52
|
-
/**
|
|
53
|
-
get
|
|
54
|
-
set
|
|
55
|
-
/**
|
|
56
|
-
get
|
|
57
|
-
set
|
|
58
|
-
/**
|
|
59
|
-
get
|
|
60
|
-
set
|
|
61
|
-
/**
|
|
62
|
-
get
|
|
69
|
+
set data(val: string);
|
|
70
|
+
/** Row data as JSON string or array of objects keyed by column key. */
|
|
71
|
+
get data(): string;
|
|
72
|
+
set editOn(val: string);
|
|
73
|
+
/** Edit trigger: "click" (single click on cell) or "focus" (default "click"). */
|
|
74
|
+
get editOn(): string;
|
|
75
|
+
set emptyMessage(val: string);
|
|
76
|
+
/** Empty-state message text. */
|
|
77
|
+
get emptyMessage(): string;
|
|
78
|
+
set enableColumnReorder(val: boolean);
|
|
79
|
+
/** When set, leaf headers can be dragged to a new position to reorder columns. Opt out per column with `reorderable: false`. */
|
|
80
|
+
get enableColumnReorder(): boolean;
|
|
81
|
+
set enableColumnResize(val: boolean);
|
|
82
|
+
/** When set, leaf headers expose a drag handle on their inline (right) edge for resizing. Opt out per column with `resizable: false`. */
|
|
83
|
+
get enableColumnResize(): boolean;
|
|
84
|
+
set enableEditing(val: boolean);
|
|
85
|
+
/** Enables inline cell editing. */
|
|
86
|
+
get enableEditing(): boolean;
|
|
87
|
+
set enableHeaderMenu(val: boolean);
|
|
88
|
+
/** When set, leaf headers expose a kebab menu for filter / sort / column visibility / move actions. */
|
|
89
|
+
get enableHeaderMenu(): boolean;
|
|
90
|
+
set enablePagination(val: boolean);
|
|
91
|
+
/** Pagination controls. Defaults to true unless attribute set to "false". */
|
|
92
|
+
get enablePagination(): boolean;
|
|
93
|
+
set enableSelection(val: boolean);
|
|
94
|
+
/** Renders a checkbox column and enables row-selection interactions. */
|
|
95
|
+
get enableSelection(): boolean;
|
|
96
|
+
set enableSorting(val: boolean);
|
|
97
|
+
/** Sorting via header click. Defaults to true unless attribute set to "false". */
|
|
98
|
+
get enableSorting(): boolean;
|
|
63
99
|
set filtering(val: "inline" | "advanced");
|
|
64
100
|
/**
|
|
65
101
|
* Filtering UI mode: `"inline"` renders the per-column filter row beneath
|
|
@@ -68,68 +104,62 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
68
104
|
* filtering UI; column filters can still be set programmatically.
|
|
69
105
|
*/
|
|
70
106
|
get filtering(): "inline" | "advanced";
|
|
71
|
-
set enableSorting(val: boolean);
|
|
72
|
-
/** Sorting via header click. Defaults to true unless attribute set to "false". */
|
|
73
|
-
get enableSorting(): boolean;
|
|
74
|
-
set enablePagination(val: boolean);
|
|
75
|
-
/** Pagination controls. Defaults to true unless attribute set to "false". */
|
|
76
|
-
get enablePagination(): boolean;
|
|
77
|
-
set showItemCount(val: boolean);
|
|
78
|
-
/** Show the item count in the footer's right side. Defaults to false; add the attribute (or `show-item-count="true"`) to enable. */
|
|
79
|
-
get showItemCount(): boolean;
|
|
80
|
-
set emptyMessage(val: string);
|
|
81
|
-
/** Empty-state message text. */
|
|
82
|
-
get emptyMessage(): string;
|
|
83
|
-
set rowHeight(val: number);
|
|
84
|
-
/** Row height in pixels (used by virtual scrolling in a later phase). */
|
|
85
|
-
get rowHeight(): number;
|
|
86
|
-
set globalSearch(val: string);
|
|
87
|
-
/** Current global search string. */
|
|
88
|
-
get globalSearch(): string;
|
|
89
107
|
set filters(obj: {});
|
|
90
108
|
/** Current column filters as a `{ [key]: value }` object. */
|
|
91
109
|
get filters(): {};
|
|
92
|
-
set
|
|
93
|
-
/**
|
|
94
|
-
get
|
|
95
|
-
set
|
|
96
|
-
/**
|
|
97
|
-
get
|
|
98
|
-
set
|
|
99
|
-
/**
|
|
100
|
-
get
|
|
110
|
+
set fixedHeader(val: boolean);
|
|
111
|
+
/** Sticky header during vertical scroll. Defaults to true unless attribute set to "false". */
|
|
112
|
+
get fixedHeader(): boolean;
|
|
113
|
+
set globalSearch(val: string);
|
|
114
|
+
/** Current global search string. */
|
|
115
|
+
get globalSearch(): string;
|
|
116
|
+
set groupBy(val: string[]);
|
|
117
|
+
/** Column keys to group rows by (nested when more than one). */
|
|
118
|
+
get groupBy(): string[];
|
|
119
|
+
set hover(val: boolean);
|
|
120
|
+
/** Row hover highlight. Defaults to true unless attribute set to "false". */
|
|
121
|
+
get hover(): boolean;
|
|
122
|
+
set loading(val: boolean);
|
|
123
|
+
/** When true, a loading overlay is shown. */
|
|
124
|
+
get loading(): boolean;
|
|
125
|
+
set mode(val: string);
|
|
126
|
+
/** Operating mode: "client" performs sort/filter/page locally, "server" emits events. */
|
|
127
|
+
get mode(): string;
|
|
128
|
+
set pageSize(val: number);
|
|
129
|
+
/** Rows per page. */
|
|
130
|
+
get pageSize(): number;
|
|
131
|
+
set rowHeight(val: number);
|
|
132
|
+
/** Row height in pixels (used by virtual scrolling in a later phase). */
|
|
133
|
+
get rowHeight(): number;
|
|
101
134
|
set rowKey(val: string);
|
|
102
135
|
/** Column key used as a stable per-row identifier. Falls back to the row's array index. */
|
|
103
136
|
get rowKey(): string;
|
|
104
|
-
/** Array of selected row objects (resolved from current `_selectedKeys`). */
|
|
105
|
-
get selectedRows(): any[];
|
|
106
137
|
set selectedKeys(arr: any[]);
|
|
107
138
|
/** Array of selected row keys. */
|
|
108
139
|
get selectedKeys(): any[];
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
set
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
/** Array of selected row objects (resolved from current `_selectedKeys`). */
|
|
141
|
+
get selectedRows(): any[];
|
|
142
|
+
set selectionMode(val: string);
|
|
143
|
+
/** Selection mode: "single" or "multi" (default "multi"). */
|
|
144
|
+
get selectionMode(): string;
|
|
145
|
+
set showItemCount(val: boolean);
|
|
146
|
+
/** Show the item count in the footer's right side. Defaults to false; add the attribute (or `show-item-count="true"`) to enable. */
|
|
147
|
+
get showItemCount(): boolean;
|
|
148
|
+
set sortState(arr: any[]);
|
|
149
|
+
/** Current sort stack as an array of `{ column, direction }`. */
|
|
150
|
+
get sortState(): any[];
|
|
151
|
+
set striped(val: boolean);
|
|
152
|
+
/** Alternating row backgrounds. Defaults to false; set the attribute (or `striped="true"`) to enable. */
|
|
153
|
+
get striped(): boolean;
|
|
154
|
+
set totalRows(val: number);
|
|
155
|
+
/** Total row count, required for server-mode pagination. */
|
|
156
|
+
get totalRows(): number;
|
|
124
157
|
set viewportHeight(val: number);
|
|
125
158
|
/** Scrollable viewport height in pixels — required for virtualization. */
|
|
126
159
|
get viewportHeight(): number;
|
|
127
|
-
set
|
|
128
|
-
/**
|
|
129
|
-
get
|
|
130
|
-
set enableHeaderMenu(val: boolean);
|
|
131
|
-
/** When set, leaf headers expose a kebab menu for filter / sort / column visibility / move actions. */
|
|
132
|
-
get enableHeaderMenu(): boolean;
|
|
160
|
+
set virtual(val: boolean);
|
|
161
|
+
/** Enable virtual scrolling (only render visible rows). */
|
|
162
|
+
get virtual(): boolean;
|
|
133
163
|
/** Cancel the active edit (if any) without committing. */
|
|
134
164
|
cancelEdit(): void;
|
|
135
165
|
/** Clear all per-column filters and the global search query. */
|
|
@@ -155,10 +185,14 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
155
185
|
_absoluteRowIndex(displayIdx: any): any;
|
|
156
186
|
_applyClientFilters(rows: any): any;
|
|
157
187
|
_applyClientSort(rows: any): any;
|
|
188
|
+
_applyColumnReorder(sourceKey: any, targetKey: any, placeAfter: any): void;
|
|
158
189
|
_applyPendingColumnVisibility(): void;
|
|
190
|
+
_autoSizeColumn(col: any): void;
|
|
159
191
|
_beginEdit(row: any, rowKey: any, col: any): void;
|
|
160
192
|
_buildBody(columns: any, entries: any, leadingSpacerPx: any, trailingSpacerPx: any): HTMLElement;
|
|
161
193
|
_buildCell(row: any, rowKey: any, col: any): HTMLElement;
|
|
194
|
+
_buildColgroup(columns: any): HTMLElement;
|
|
195
|
+
_buildColumnResizeHandle(col: any): HTMLElement;
|
|
162
196
|
_buildColumnsSubmenuItem(): HTMLElement;
|
|
163
197
|
_buildColumnsSubmenuPopover(): HTMLElement;
|
|
164
198
|
_buildDataRow(columns: any, entry: any, displayIdx: any): HTMLElement;
|
|
@@ -202,11 +236,14 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
202
236
|
_cancelEdit(row: any, rowKey: any, col: any): void;
|
|
203
237
|
_clearSortFor(key: any): void;
|
|
204
238
|
_cloneColumnTree(tree: any): any;
|
|
239
|
+
_colElementFor(key: any): any;
|
|
205
240
|
_collectValidators(col: any): any[];
|
|
206
241
|
_commitActiveEditor(): void;
|
|
207
242
|
_commitEdit(row: any, rowKey: any, col: any, value: any, validators: any): void;
|
|
208
243
|
_computeAggregates(rows: any): {};
|
|
209
244
|
_defaultOperatorFor(col: any): "contains" | "equals";
|
|
245
|
+
_emitColumnReorder(column: any, fromIndex: any, toIndex: any): void;
|
|
246
|
+
_emitColumnResize(column: any, width: any): void;
|
|
210
247
|
_emitFilterChange(): boolean;
|
|
211
248
|
_emitGroupToggle(path: any, expanded: any): void;
|
|
212
249
|
_emitPageChange(page: any): boolean;
|
|
@@ -225,13 +262,17 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
225
262
|
_leafCount(node: any): any;
|
|
226
263
|
_matchesFilter(cellValue: any, filterValue: any, op: any, col: any): boolean;
|
|
227
264
|
_maxColumnDepth(tree: any): number;
|
|
265
|
+
_minWidthFor(col: any): number;
|
|
228
266
|
_moveColumn(key: any, direction: any): void;
|
|
267
|
+
_onColumnReorderStart(e: any, col: any, th: any): void;
|
|
268
|
+
_onColumnResizeStart(e: any, col: any, handle: any): void;
|
|
229
269
|
_onHeaderClick(key: any, event: any): void;
|
|
230
270
|
_onRowClick(row: any, rowKey: any, event: any): void;
|
|
231
271
|
_onRowDblClick(row: any, event: any): void;
|
|
232
272
|
_openColumnsSubmenu(triggerBtn: any): void;
|
|
233
273
|
_openFilterPopover(col: any, triggerBtn: any): void;
|
|
234
274
|
_openHeaderMenu(col: any, triggerBtn: any): void;
|
|
275
|
+
_paintDropIndicator(target: any): void;
|
|
235
276
|
_parseAttributes(): void;
|
|
236
277
|
_readEditorValue(editor: any, type: any): any;
|
|
237
278
|
_render(): void;
|
|
@@ -239,9 +280,15 @@ export class YumeDataGrid extends HTMLElement {
|
|
|
239
280
|
_columnsSubmenuPopover: HTMLElement;
|
|
240
281
|
_filterPopover: HTMLElement;
|
|
241
282
|
_renderCellValue(col: any, value: any): HTMLElement;
|
|
283
|
+
_reorderTargetAt(clientX: any, sourceKey: any): {
|
|
284
|
+
key: any;
|
|
285
|
+
th: any;
|
|
286
|
+
placeAfter: boolean;
|
|
287
|
+
};
|
|
242
288
|
_rowKeyFor(row: any, idx: any): string;
|
|
243
289
|
_sameTreeShape(a: any, b: any): boolean;
|
|
244
290
|
_setColumnFilter(key: any, value: any): void;
|
|
291
|
+
_setColumnWidth(col: any, width: any): void;
|
|
245
292
|
_setSortFromMenu(key: any, direction: any): void;
|
|
246
293
|
_setupVirtualScroll(scrollEl: any): void;
|
|
247
294
|
_scrollEl: any;
|