@rozie-ui/data-table-lit 0.7.1 → 0.7.3
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 +429 -0
- package/README.md +11 -11
- package/dist/index.cjs +97 -17
- package/dist/index.d.cts +174 -77
- package/dist/index.d.mts +174 -77
- package/dist/index.mjs +114 -34
- package/package.json +4 -3
- package/src/Column.ts +8 -6
- package/src/DataTable.ts +275 -206
- package/src/FilterNumberRange.ts +10 -1
- package/src/index.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -421,6 +421,7 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
|
|
|
421
421
|
this.__rozieWatchInitial_0 = true;
|
|
422
422
|
this.__rozieWatchInitial_1 = true;
|
|
423
423
|
this.__rozieWatchInitial_2 = true;
|
|
424
|
+
this.__rozieFirstUpdateDone = false;
|
|
424
425
|
this.__rozieCtxProvider_data_table_columns = new _lit_context.ContextProvider(this, {
|
|
425
426
|
context: __rozieCtx_data_table_columns$1,
|
|
426
427
|
initialValue: ((__rozieCtxHost) => ({
|
|
@@ -4664,8 +4665,31 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
|
|
|
4664
4665
|
});
|
|
4665
4666
|
}));
|
|
4666
4667
|
this._disconnectCleanups.push((0, _lit_labs_preact_signals.effect)(() => {
|
|
4667
|
-
|
|
4668
|
+
const __watchVal = [
|
|
4669
|
+
this.sorting,
|
|
4670
|
+
this.globalFilter,
|
|
4671
|
+
this.columnFilters,
|
|
4672
|
+
this.pagination,
|
|
4673
|
+
this.rowCount,
|
|
4674
|
+
this.pageCount,
|
|
4675
|
+
this.rowSelection,
|
|
4676
|
+
this.expanded,
|
|
4677
|
+
this.expandable,
|
|
4678
|
+
this.grouping,
|
|
4679
|
+
this.groupable,
|
|
4680
|
+
this.columnVisibility,
|
|
4681
|
+
this.columnSizing,
|
|
4682
|
+
this.columnOrder,
|
|
4683
|
+
this.columnPinning,
|
|
4684
|
+
this.selectionMode,
|
|
4685
|
+
(this.data || []).length,
|
|
4686
|
+
this.data,
|
|
4687
|
+
this._dataDefault.value,
|
|
4688
|
+
this.columns,
|
|
4689
|
+
this._colReg.value
|
|
4690
|
+
];
|
|
4668
4691
|
(0, _lit_labs_preact_signals.untracked)(() => {
|
|
4692
|
+
this.__rozieWatchPrev_1 = __watchVal;
|
|
4669
4693
|
if (this.__rozieWatchInitial_1) {
|
|
4670
4694
|
this.__rozieWatchInitial_1 = false;
|
|
4671
4695
|
return;
|
|
@@ -4833,15 +4857,51 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
|
|
|
4833
4857
|
this.announceState.globalFilter = this.effectiveGlobalFilter();
|
|
4834
4858
|
}
|
|
4835
4859
|
updated(changedProperties) {
|
|
4836
|
-
this.
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4860
|
+
if (this.__rozieFirstUpdateDone && (changedProperties.has("rowCount") || changedProperties.has("pageCount") || changedProperties.has("expandable") || changedProperties.has("groupable") || changedProperties.has("selectionMode") || changedProperties.has("columns"))) {
|
|
4861
|
+
const __watchVal = (0, _lit_labs_preact_signals.untracked)(() => [
|
|
4862
|
+
this.sorting,
|
|
4863
|
+
this.globalFilter,
|
|
4864
|
+
this.columnFilters,
|
|
4865
|
+
this.pagination,
|
|
4866
|
+
this.rowCount,
|
|
4867
|
+
this.pageCount,
|
|
4868
|
+
this.rowSelection,
|
|
4869
|
+
this.expanded,
|
|
4870
|
+
this.expandable,
|
|
4871
|
+
this.grouping,
|
|
4872
|
+
this.groupable,
|
|
4873
|
+
this.columnVisibility,
|
|
4874
|
+
this.columnSizing,
|
|
4875
|
+
this.columnOrder,
|
|
4876
|
+
this.columnPinning,
|
|
4877
|
+
this.selectionMode,
|
|
4878
|
+
(this.data || []).length,
|
|
4879
|
+
this.data,
|
|
4880
|
+
this._dataDefault.value,
|
|
4881
|
+
this.columns,
|
|
4882
|
+
this._colReg.value
|
|
4883
|
+
]);
|
|
4884
|
+
if (!Object.is(__watchVal, this.__rozieWatchPrev_1)) {
|
|
4885
|
+
this.__rozieWatchPrev_1 = __watchVal;
|
|
4886
|
+
(0, _lit_labs_preact_signals.untracked)(() => (() => {
|
|
4887
|
+
this.seedColumnPinning();
|
|
4888
|
+
this.reFeed();
|
|
4889
|
+
this.maybeClearHistoryOnExternalSwap();
|
|
4890
|
+
})());
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
this.__rozieFirstUpdateDone = true;
|
|
4894
|
+
(() => {
|
|
4895
|
+
this.maybeClearHistoryOnExternalSwap();
|
|
4896
|
+
this.emitVisibleRangeIfChanged();
|
|
4897
|
+
this.remeasureColumnSizes();
|
|
4898
|
+
if (!this.table) return;
|
|
4899
|
+
const d = this.currentData() || [];
|
|
4900
|
+
if (d === this.lastData && d.length === this.lastDataLen) return;
|
|
4901
|
+
this.lastData = d;
|
|
4902
|
+
this.lastDataLen = d.length;
|
|
4903
|
+
this.reFeed();
|
|
4904
|
+
})();
|
|
4845
4905
|
}
|
|
4846
4906
|
disconnectedCallback() {
|
|
4847
4907
|
super.disconnectedCallback();
|
|
@@ -5894,6 +5954,12 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
|
|
|
5894
5954
|
set columnPinning(v) {
|
|
5895
5955
|
this._columnPinningControllable.notifyPropertyWrite(v);
|
|
5896
5956
|
}
|
|
5957
|
+
addEventListener(type, listener, options) {
|
|
5958
|
+
super.addEventListener(type, listener, options);
|
|
5959
|
+
}
|
|
5960
|
+
removeEventListener(type, listener, options) {
|
|
5961
|
+
super.removeEventListener(type, listener, options);
|
|
5962
|
+
}
|
|
5897
5963
|
};
|
|
5898
5964
|
__decorate([(0, lit_decorators_js.property)({
|
|
5899
5965
|
type: Array,
|
|
@@ -6160,12 +6226,14 @@ let Column = class Column extends (0, _lit_labs_preact_signals.SignalWatcher)(li
|
|
|
6160
6226
|
})();
|
|
6161
6227
|
}
|
|
6162
6228
|
this.__rozieFirstUpdateDone = true;
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6229
|
+
(() => {
|
|
6230
|
+
if (this.registered) return;
|
|
6231
|
+
const live = this.registry;
|
|
6232
|
+
if (live == null) return;
|
|
6233
|
+
this.reg = live;
|
|
6234
|
+
this.registered = true;
|
|
6235
|
+
this.reg.registerColumn(this.colId(), this.buildSpec());
|
|
6236
|
+
})();
|
|
6169
6237
|
}
|
|
6170
6238
|
disconnectedCallback() {
|
|
6171
6239
|
super.disconnectedCallback();
|
|
@@ -6893,6 +6961,7 @@ let FilterNumberRange = class FilterNumberRange extends (0, _lit_labs_preact_sig
|
|
|
6893
6961
|
this._maxDraft = (0, _lit_labs_preact_signals.signal)("");
|
|
6894
6962
|
this._touched = (0, _lit_labs_preact_signals.signal)(false);
|
|
6895
6963
|
this.__rozieWatchInitial_0 = true;
|
|
6964
|
+
this.__rozieFirstUpdateDone = false;
|
|
6896
6965
|
this._disconnectCleanups = [];
|
|
6897
6966
|
this._rozieTornDown = false;
|
|
6898
6967
|
this.minDraftValue = () => this._touched.value ? this._minDraft.value : Array.isArray(this.value) && this.value[0] != null ? String(this.value[0]) : "";
|
|
@@ -6931,8 +7000,9 @@ let FilterNumberRange = class FilterNumberRange extends (0, _lit_labs_preact_sig
|
|
|
6931
7000
|
}
|
|
6932
7001
|
firstUpdated() {
|
|
6933
7002
|
this._disconnectCleanups.push((0, _lit_labs_preact_signals.effect)(() => {
|
|
6934
|
-
Array.isArray(this.value)
|
|
7003
|
+
const __watchVal = Array.isArray(this.value) ? String(this.value[0]) + "\0" + String(this.value[1]) : "";
|
|
6935
7004
|
(0, _lit_labs_preact_signals.untracked)(() => {
|
|
7005
|
+
this.__rozieWatchPrev_0 = __watchVal;
|
|
6936
7006
|
if (this.__rozieWatchInitial_0) {
|
|
6937
7007
|
this.__rozieWatchInitial_0 = false;
|
|
6938
7008
|
return;
|
|
@@ -6941,6 +7011,16 @@ let FilterNumberRange = class FilterNumberRange extends (0, _lit_labs_preact_sig
|
|
|
6941
7011
|
});
|
|
6942
7012
|
}));
|
|
6943
7013
|
}
|
|
7014
|
+
updated(changedProperties) {
|
|
7015
|
+
if (this.__rozieFirstUpdateDone && changedProperties.has("value")) {
|
|
7016
|
+
const __watchVal = (0, _lit_labs_preact_signals.untracked)(() => Array.isArray(this.value) ? String(this.value[0]) + "\0" + String(this.value[1]) : "");
|
|
7017
|
+
if (!Object.is(__watchVal, this.__rozieWatchPrev_0)) {
|
|
7018
|
+
this.__rozieWatchPrev_0 = __watchVal;
|
|
7019
|
+
(0, _lit_labs_preact_signals.untracked)(() => (this._touched.value = false, void 0));
|
|
7020
|
+
}
|
|
7021
|
+
}
|
|
7022
|
+
this.__rozieFirstUpdateDone = true;
|
|
7023
|
+
}
|
|
6944
7024
|
disconnectedCallback() {
|
|
6945
7025
|
super.disconnectedCallback();
|
|
6946
7026
|
queueMicrotask(() => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,107 @@
|
|
|
1
1
|
import * as _$lit from "lit";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
|
+
import { Column as Column$1, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/table-core";
|
|
4
|
+
|
|
3
5
|
//#region src/DataTable.d.ts
|
|
6
|
+
/** A cell position as integers over the visible (display-order) model. */
|
|
7
|
+
interface DataTableCellPosition {
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
colIndex: number;
|
|
10
|
+
}
|
|
11
|
+
/** The active (roving-focus) cell. A header cell reports `rowIndex: null` and `isHeader: true`. */
|
|
12
|
+
interface DataTableActiveCell {
|
|
13
|
+
rowIndex: number | null;
|
|
14
|
+
colIndex: number;
|
|
15
|
+
isHeader: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** The rectangular cell-range selection. Both corners are `null` when there is no range. */
|
|
18
|
+
interface DataTableRange {
|
|
19
|
+
anchor: DataTableCellPosition | null;
|
|
20
|
+
focus: DataTableCellPosition | null;
|
|
21
|
+
}
|
|
22
|
+
/** One data column offered to the `#groupBar` slot. */
|
|
23
|
+
interface DataTableGroupableColumn {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
27
|
+
/** One changed cell inside a row edit commit. */
|
|
28
|
+
interface DataTableCellChange {
|
|
29
|
+
columnId: string;
|
|
30
|
+
oldValue: any;
|
|
31
|
+
newValue: any;
|
|
32
|
+
}
|
|
33
|
+
/** The `activecell-change` payload. `isHeader` is set when the move landed on or left a header cell. */
|
|
34
|
+
interface DataTableActiveCellChangePayload {
|
|
35
|
+
rowIndex: number | null;
|
|
36
|
+
colIndex: number;
|
|
37
|
+
isHeader?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** The `cell-edit-commit` payload: one committed cell. */
|
|
40
|
+
interface DataTableCellEditCommitPayload {
|
|
41
|
+
rowId: string;
|
|
42
|
+
columnId: string;
|
|
43
|
+
oldValue: any;
|
|
44
|
+
newValue: any;
|
|
45
|
+
}
|
|
46
|
+
/** The `row-edit-commit` payload: the row and every cell the save changed. */
|
|
47
|
+
interface DataTableRowEditCommitPayload {
|
|
48
|
+
rowId: string;
|
|
49
|
+
changes: DataTableCellChange[];
|
|
50
|
+
}
|
|
51
|
+
/** The `filter-change` payload: `globalFilter` for the search box, `columnFilters` for a per-column filter. Exactly one key is set. */
|
|
52
|
+
interface DataTableFilterChangePayload {
|
|
53
|
+
globalFilter?: string;
|
|
54
|
+
columnFilters?: ColumnFiltersState;
|
|
55
|
+
}
|
|
56
|
+
/** The `history-change` payload: undo/redo availability. */
|
|
57
|
+
interface DataTableHistoryChangePayload {
|
|
58
|
+
canUndo: boolean;
|
|
59
|
+
canRedo: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** The `range-change` payload: the new range corners (both `null` when the range cleared). */
|
|
62
|
+
type DataTableRangeChangePayload = DataTableRange;
|
|
63
|
+
/** The `row-activate` payload. `row` is the original data object and `index` its position in the rendered model. */
|
|
64
|
+
interface DataTableRowActivatePayload {
|
|
65
|
+
row: any;
|
|
66
|
+
index: number;
|
|
67
|
+
trigger: 'keyboard' | 'click';
|
|
68
|
+
}
|
|
69
|
+
/** The `visible-range-change` payload: the rendered row window, `end` exclusive. */
|
|
70
|
+
interface DataTableVisibleRangeChangePayload {
|
|
71
|
+
start: number;
|
|
72
|
+
end: number;
|
|
73
|
+
}
|
|
74
|
+
interface RozieDataTableEventMap extends Omit<HTMLElementEventMap, 'activecell-change' | 'cell-edit-commit' | 'expand-change' | 'filter-change' | 'group-change' | 'history-change' | 'page-change' | 'pin-change' | 'range-change' | 'reorder-change' | 'resize-change' | 'row-activate' | 'row-edit-commit' | 'selection-change' | 'sort-change' | 'visibility-change' | 'visible-range-change' | 'data-change' | 'sorting-change' | 'global-filter-change' | 'column-filters-change' | 'pagination-change' | 'expanded-change' | 'grouping-change' | 'row-selection-change' | 'column-visibility-change' | 'column-sizing-change' | 'column-order-change' | 'column-pinning-change'> {
|
|
75
|
+
'activecell-change': CustomEvent<DataTableActiveCellChangePayload>;
|
|
76
|
+
'cell-edit-commit': CustomEvent<DataTableCellEditCommitPayload>;
|
|
77
|
+
'expand-change': CustomEvent<ExpandedState>;
|
|
78
|
+
'filter-change': CustomEvent<DataTableFilterChangePayload>;
|
|
79
|
+
'group-change': CustomEvent<GroupingState>;
|
|
80
|
+
'history-change': CustomEvent<DataTableHistoryChangePayload>;
|
|
81
|
+
'page-change': CustomEvent<PaginationState>;
|
|
82
|
+
'pin-change': CustomEvent<ColumnPinningState>;
|
|
83
|
+
'range-change': CustomEvent<DataTableRangeChangePayload>;
|
|
84
|
+
'reorder-change': CustomEvent<ColumnOrderState>;
|
|
85
|
+
'resize-change': CustomEvent<ColumnSizingState>;
|
|
86
|
+
'row-activate': CustomEvent<DataTableRowActivatePayload>;
|
|
87
|
+
'row-edit-commit': CustomEvent<DataTableRowEditCommitPayload>;
|
|
88
|
+
'selection-change': CustomEvent<RowSelectionState>;
|
|
89
|
+
'sort-change': CustomEvent<SortingState>;
|
|
90
|
+
'visibility-change': CustomEvent<VisibilityState>;
|
|
91
|
+
'visible-range-change': CustomEvent<DataTableVisibleRangeChangePayload>;
|
|
92
|
+
'data-change': CustomEvent<any[]>;
|
|
93
|
+
'sorting-change': CustomEvent<any[]>;
|
|
94
|
+
'global-filter-change': CustomEvent<string>;
|
|
95
|
+
'column-filters-change': CustomEvent<any[]>;
|
|
96
|
+
'pagination-change': CustomEvent<any>;
|
|
97
|
+
'expanded-change': CustomEvent<any | boolean>;
|
|
98
|
+
'grouping-change': CustomEvent<any[]>;
|
|
99
|
+
'row-selection-change': CustomEvent<any>;
|
|
100
|
+
'column-visibility-change': CustomEvent<any>;
|
|
101
|
+
'column-sizing-change': CustomEvent<any>;
|
|
102
|
+
'column-order-change': CustomEvent<any[]>;
|
|
103
|
+
'column-pinning-change': CustomEvent<any>;
|
|
104
|
+
}
|
|
4
105
|
declare const DataTable_base: typeof LitElement;
|
|
5
106
|
declare class DataTable extends DataTable_base {
|
|
6
107
|
static shadowRootOptions: ShadowRootInit;
|
|
@@ -177,8 +278,10 @@ declare class DataTable extends DataTable_base {
|
|
|
177
278
|
private _liveAnnounce;
|
|
178
279
|
private _ref__rozieRoot;
|
|
179
280
|
private __rozieWatchInitial_0;
|
|
281
|
+
private __rozieWatchPrev_1;
|
|
180
282
|
private __rozieWatchInitial_1;
|
|
181
283
|
private __rozieWatchInitial_2;
|
|
284
|
+
private __rozieFirstUpdateDone;
|
|
182
285
|
private __rozieCtxProvider_data_table_columns;
|
|
183
286
|
private _rozieSlotDistributor;
|
|
184
287
|
private _hasSlotDefault;
|
|
@@ -186,17 +289,17 @@ declare class DataTable extends DataTable_base {
|
|
|
186
289
|
private _hasSlotGroupBar;
|
|
187
290
|
private _slotGroupBarElements;
|
|
188
291
|
groupBar?: (scope: {
|
|
189
|
-
grouping:
|
|
190
|
-
groupableColumns:
|
|
191
|
-
applyGrouping:
|
|
192
|
-
clearGrouping:
|
|
292
|
+
grouping: string[];
|
|
293
|
+
groupableColumns: DataTableGroupableColumn[];
|
|
294
|
+
applyGrouping: (cols: string[]) => void;
|
|
295
|
+
clearGrouping: () => void;
|
|
193
296
|
}) => unknown;
|
|
194
297
|
private _hasSlotSelectAll;
|
|
195
298
|
private _slotSelectAllElements;
|
|
196
299
|
selectAll?: (scope: {
|
|
197
|
-
checked:
|
|
198
|
-
indeterminate:
|
|
199
|
-
toggle: any;
|
|
300
|
+
checked: boolean;
|
|
301
|
+
indeterminate: boolean;
|
|
302
|
+
toggle: (event: any) => void;
|
|
200
303
|
}) => unknown;
|
|
201
304
|
private _hasSlotDynamicColHeader;
|
|
202
305
|
private _slotDynamicColHeaderElements;
|
|
@@ -205,15 +308,15 @@ declare class DataTable extends DataTable_base {
|
|
|
205
308
|
private _hasSlotPlaceholder;
|
|
206
309
|
private _slotPlaceholderElements;
|
|
207
310
|
placeholder?: (scope: {
|
|
208
|
-
index:
|
|
209
|
-
columnId:
|
|
311
|
+
index: number;
|
|
312
|
+
columnId: string;
|
|
210
313
|
}) => unknown;
|
|
211
314
|
private _hasSlotSelectCell;
|
|
212
315
|
private _slotSelectCellElements;
|
|
213
316
|
selectCell?: (scope: {
|
|
214
317
|
row: any;
|
|
215
|
-
checked:
|
|
216
|
-
toggle: any;
|
|
318
|
+
checked: boolean;
|
|
319
|
+
toggle: (event: any) => void;
|
|
217
320
|
}) => unknown;
|
|
218
321
|
private _hasSlotDynamicCell;
|
|
219
322
|
private _slotDynamicCellElements;
|
|
@@ -227,69 +330,69 @@ declare class DataTable extends DataTable_base {
|
|
|
227
330
|
private _hasSlotColHeader;
|
|
228
331
|
private _slotColHeaderElements;
|
|
229
332
|
colHeader?: (scope: {
|
|
230
|
-
columnId:
|
|
231
|
-
column: any
|
|
232
|
-
label:
|
|
333
|
+
columnId: string;
|
|
334
|
+
column: Column$1<any, unknown>;
|
|
335
|
+
label: string;
|
|
233
336
|
}) => unknown;
|
|
234
337
|
private _hasSlotFilter;
|
|
235
338
|
private _slotFilterElements;
|
|
236
339
|
filter?: (scope: {
|
|
237
|
-
columnId:
|
|
340
|
+
columnId: string;
|
|
238
341
|
value: any;
|
|
239
|
-
uniqueValues: any;
|
|
240
|
-
minMax:
|
|
241
|
-
columnLabel:
|
|
242
|
-
setFilter: any;
|
|
342
|
+
uniqueValues: any[];
|
|
343
|
+
minMax: [number, number] | null;
|
|
344
|
+
columnLabel: string;
|
|
345
|
+
setFilter: (columnId: string, value: any) => void;
|
|
243
346
|
}) => unknown;
|
|
244
347
|
private _hasSlotCell;
|
|
245
348
|
private _slotCellElements;
|
|
246
349
|
cell?: (scope: {
|
|
247
|
-
columnId:
|
|
248
|
-
column: any
|
|
350
|
+
columnId: string;
|
|
351
|
+
column: Column$1<any, unknown>;
|
|
249
352
|
row: any;
|
|
250
353
|
value: any;
|
|
251
354
|
}) => unknown;
|
|
252
355
|
private _hasSlotEditor;
|
|
253
356
|
private _slotEditorElements;
|
|
254
357
|
editor?: (scope: {
|
|
255
|
-
columnId:
|
|
256
|
-
column: any
|
|
358
|
+
columnId: string;
|
|
359
|
+
column: Column$1<any, unknown>;
|
|
257
360
|
row: any;
|
|
258
361
|
value: any;
|
|
259
|
-
commit: any;
|
|
260
|
-
cancel:
|
|
261
|
-
columnLabel:
|
|
262
|
-
autofocus:
|
|
362
|
+
commit: (value: any) => void;
|
|
363
|
+
cancel: () => void;
|
|
364
|
+
columnLabel: string;
|
|
365
|
+
autofocus: boolean;
|
|
263
366
|
}) => unknown;
|
|
264
367
|
rozieSlots?: {
|
|
265
368
|
[key: `colHeader-${string}`]: (scope: {
|
|
266
|
-
columnId:
|
|
267
|
-
column: any
|
|
268
|
-
label:
|
|
369
|
+
columnId: string;
|
|
370
|
+
column: Column$1<any, unknown>;
|
|
371
|
+
label: string;
|
|
269
372
|
}) => unknown;
|
|
270
373
|
[key: `filter-${string}`]: (scope: {
|
|
271
|
-
columnId:
|
|
374
|
+
columnId: string;
|
|
272
375
|
value: any;
|
|
273
|
-
uniqueValues: any;
|
|
274
|
-
minMax:
|
|
275
|
-
columnLabel:
|
|
276
|
-
setFilter: any;
|
|
376
|
+
uniqueValues: any[];
|
|
377
|
+
minMax: [number, number] | null;
|
|
378
|
+
columnLabel: string;
|
|
379
|
+
setFilter: (columnId: string, value: any) => void;
|
|
277
380
|
}) => unknown;
|
|
278
381
|
[key: `cell-${string}`]: (scope: {
|
|
279
|
-
columnId:
|
|
280
|
-
column: any
|
|
382
|
+
columnId: string;
|
|
383
|
+
column: Column$1<any, unknown>;
|
|
281
384
|
row: any;
|
|
282
385
|
value: any;
|
|
283
386
|
}) => unknown;
|
|
284
387
|
[key: `editor-${string}`]: (scope: {
|
|
285
|
-
columnId:
|
|
286
|
-
column: any
|
|
388
|
+
columnId: string;
|
|
389
|
+
column: Column$1<any, unknown>;
|
|
287
390
|
row: any;
|
|
288
391
|
value: any;
|
|
289
|
-
commit: any;
|
|
290
|
-
cancel:
|
|
291
|
-
columnLabel:
|
|
292
|
-
autofocus:
|
|
392
|
+
commit: (value: any) => void;
|
|
393
|
+
cancel: () => void;
|
|
394
|
+
columnLabel: string;
|
|
395
|
+
autofocus: boolean;
|
|
293
396
|
}) => unknown;
|
|
294
397
|
} & Record<string, (scope: any) => unknown>;
|
|
295
398
|
private _disconnectCleanups;
|
|
@@ -451,7 +554,7 @@ declare class DataTable extends DataTable_base {
|
|
|
451
554
|
align?: "start" | "center" | "end" | "auto";
|
|
452
555
|
behavior?: "auto" | "smooth" | "instant";
|
|
453
556
|
}) => void;
|
|
454
|
-
getScrollElement: () =>
|
|
557
|
+
getScrollElement: () => HTMLElement | null;
|
|
455
558
|
virtualItemKey: (i: any) => any;
|
|
456
559
|
COL_OVERSCAN: number;
|
|
457
560
|
colRtlObserver: any;
|
|
@@ -567,19 +670,19 @@ declare class DataTable extends DataTable_base {
|
|
|
567
670
|
hasAnyFilterableColumn: () => boolean;
|
|
568
671
|
selectAllBox: any;
|
|
569
672
|
syncIndeterminate: () => void;
|
|
570
|
-
sortColumn: (colId:
|
|
673
|
+
sortColumn: (colId: string, desc?: boolean) => void;
|
|
571
674
|
clearSorting: () => void;
|
|
572
|
-
getColumnDefs: () => any[];
|
|
573
|
-
toggleAllRows: (value
|
|
675
|
+
getColumnDefs: () => ColumnDef<any, any>[];
|
|
676
|
+
toggleAllRows: (value?: boolean) => void;
|
|
574
677
|
clearSelection: () => void;
|
|
575
|
-
getSelectedRows: () => any;
|
|
576
|
-
setPage: (idx:
|
|
577
|
-
setRowsPerPage: (size:
|
|
578
|
-
toggleColumnVisibility: (colId:
|
|
579
|
-
applyColumnOrder: (order:
|
|
678
|
+
getSelectedRows: () => any[];
|
|
679
|
+
setPage: (idx: number) => void;
|
|
680
|
+
setRowsPerPage: (size: number) => void;
|
|
681
|
+
toggleColumnVisibility: (colId: string) => void;
|
|
682
|
+
applyColumnOrder: (order: string[]) => void;
|
|
580
683
|
resetColumnSizing: () => void;
|
|
581
|
-
pinColumn: (colId:
|
|
582
|
-
getRowIndexRelativeToPage: (absRow
|
|
684
|
+
pinColumn: (colId: string, side: 'left' | 'right' | false) => void;
|
|
685
|
+
getRowIndexRelativeToPage: (absRow?: number) => number;
|
|
583
686
|
cut: () => void;
|
|
584
687
|
isGrid: () => boolean;
|
|
585
688
|
tableRole: () => "grid" | "table";
|
|
@@ -650,16 +753,7 @@ declare class DataTable extends DataTable_base {
|
|
|
650
753
|
rangeClickPending: any;
|
|
651
754
|
rangeActive: boolean;
|
|
652
755
|
inRange: (rIdx: any, cIdx: any) => boolean;
|
|
653
|
-
getSelectedRange: () =>
|
|
654
|
-
anchor: {
|
|
655
|
-
rowIndex: any;
|
|
656
|
-
colIndex: any;
|
|
657
|
-
};
|
|
658
|
-
focus: {
|
|
659
|
-
rowIndex: any;
|
|
660
|
-
colIndex: any;
|
|
661
|
-
};
|
|
662
|
-
};
|
|
756
|
+
getSelectedRange: () => DataTableRange;
|
|
663
757
|
isFillHandleCell: (rIdx: any, cIdx: any) => boolean;
|
|
664
758
|
rangeSummary: (anchor: any, focus: any) => string;
|
|
665
759
|
emitRangeChange: (anchor: any, focus: any) => void;
|
|
@@ -781,25 +875,21 @@ declare class DataTable extends DataTable_base {
|
|
|
781
875
|
onEditorKeyDown: (e: any) => void;
|
|
782
876
|
onEditorDropinKeyDown: (e: any) => void;
|
|
783
877
|
onEditorBlur: (e: any) => void;
|
|
784
|
-
editCell: (rowIndex:
|
|
878
|
+
editCell: (rowIndex: number, colIndex: number) => void;
|
|
785
879
|
commitEditing: () => void;
|
|
786
|
-
editRow: (rowIndex:
|
|
880
|
+
editRow: (rowIndex: number) => void;
|
|
787
881
|
focusAbsCellWhenReady: (absRow: any, localRow: any, col: any) => void;
|
|
788
|
-
focusCell: (rowIndex:
|
|
789
|
-
getActiveCell: () =>
|
|
790
|
-
rowIndex: any;
|
|
791
|
-
colIndex: number;
|
|
792
|
-
isHeader: boolean;
|
|
793
|
-
};
|
|
882
|
+
focusCell: (rowIndex: number, colIndex: number) => void;
|
|
883
|
+
getActiveCell: () => DataTableActiveCell;
|
|
794
884
|
clearActiveCell: () => void;
|
|
795
|
-
toggleRowExpanded: (rowId:
|
|
885
|
+
toggleRowExpanded: (rowId: string | number) => void;
|
|
796
886
|
expandAll: () => void;
|
|
797
887
|
collapseAll: () => void;
|
|
798
888
|
getExpandedRows: () => any[];
|
|
799
|
-
applyGrouping: (cols:
|
|
889
|
+
applyGrouping: (cols: string[]) => void;
|
|
800
890
|
clearGrouping: () => void;
|
|
801
|
-
getFacetedUniqueValues: (colId:
|
|
802
|
-
getFacetedMinMaxValues: (colId:
|
|
891
|
+
getFacetedUniqueValues: (colId: string) => any[];
|
|
892
|
+
getFacetedMinMaxValues: (colId: string) => [number, number] | null;
|
|
803
893
|
get data(): any[];
|
|
804
894
|
set data(v: any[]);
|
|
805
895
|
get sorting(): any[];
|
|
@@ -824,6 +914,10 @@ declare class DataTable extends DataTable_base {
|
|
|
824
914
|
set columnOrder(v: any[]);
|
|
825
915
|
get columnPinning(): any;
|
|
826
916
|
set columnPinning(v: any);
|
|
917
|
+
addEventListener<K extends keyof RozieDataTableEventMap>(type: K, listener: (this: DataTable, ev: RozieDataTableEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
918
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
919
|
+
removeEventListener<K extends keyof RozieDataTableEventMap>(type: K, listener: (this: DataTable, ev: RozieDataTableEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
920
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
827
921
|
}
|
|
828
922
|
//#endregion
|
|
829
923
|
//#region src/Column.d.ts
|
|
@@ -1264,10 +1358,13 @@ declare class FilterNumberRange extends FilterNumberRange_base {
|
|
|
1264
1358
|
private _minDraft;
|
|
1265
1359
|
private _maxDraft;
|
|
1266
1360
|
private _touched;
|
|
1361
|
+
private __rozieWatchPrev_0;
|
|
1267
1362
|
private __rozieWatchInitial_0;
|
|
1363
|
+
private __rozieFirstUpdateDone;
|
|
1268
1364
|
private _disconnectCleanups;
|
|
1269
1365
|
private _rozieTornDown;
|
|
1270
1366
|
firstUpdated(): void;
|
|
1367
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
1271
1368
|
disconnectedCallback(): void;
|
|
1272
1369
|
render(): _$lit.TemplateResult<1>;
|
|
1273
1370
|
minDraftValue: () => string;
|
|
@@ -1381,4 +1478,4 @@ declare class DetailPanel extends DetailPanel_base {
|
|
|
1381
1478
|
}[];
|
|
1382
1479
|
}
|
|
1383
1480
|
//#endregion
|
|
1384
|
-
export { Column, DataTable, DataTable as default, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar };
|
|
1481
|
+
export { Column, DataTable, DataTable as default, DataTableActiveCell, DataTableActiveCellChangePayload, DataTableCellChange, DataTableCellEditCommitPayload, DataTableCellPosition, DataTableFilterChangePayload, DataTableGroupableColumn, DataTableHistoryChangePayload, DataTableRange, DataTableRangeChangePayload, DataTableRowActivatePayload, DataTableRowEditCommitPayload, DataTableVisibleRangeChangePayload, DetailPanel, EditorCheckbox, EditorDate, EditorNumber, EditorSelect, EditorText, FilterNumberRange, FilterSelect, FilterText, GroupBar, type RozieDataTableEventMap };
|