@uzum-tech/ui 2.4.3 → 2.4.5
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/dist/index.js +274 -84
- package/dist/index.mjs +274 -84
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +21 -0
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.mjs +14 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +21 -0
- package/es/_internal/scrollbar/src/Scrollbar.mjs +14 -1
- package/es/_internal/select-menu/src/SelectMenuParts/List.d.ts +2 -0
- package/es/_utils/composable/use-scroll-edge-detector.d.ts +9 -0
- package/es/_utils/composable/use-scroll-edge-detector.mjs +44 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/es/chat/src/Chat.d.ts +12 -24
- package/es/chat/src/ChatMainArea.d.ts +4 -7
- package/es/chat/src/ChatMainArea.mjs +12 -37
- package/es/chat/src/interface.d.ts +2 -0
- package/es/components.d.ts +109 -31
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +1 -1
- package/es/data-table/src/DataTable.d.ts +14 -0
- package/es/data-table/src/DataTable.mjs +18 -13
- package/es/data-table/src/TableParts/Body.d.ts +2 -0
- package/es/data-table/src/interface.d.ts +160 -151
- package/es/data-table/src/interface.mjs +13 -7
- package/es/data-table/src/use-column-settings.mjs +4 -1
- package/es/data-table/src/use-resizable.d.ts +2 -0
- package/es/data-table/src/use-resizable.mjs +9 -1
- package/es/data-table/src/use-scroll.d.ts +1 -0
- package/es/data-table/src/use-scroll.mjs +8 -1
- package/es/date-picker/src/DatePicker.d.ts +11 -0
- package/es/date-picker/src/DatePicker.mjs +8 -4
- package/es/date-picker-v2/src/DatePickerV2.d.ts +1 -0
- package/es/date-picker-v2/src/DatePickerV2.mjs +6 -2
- package/es/date-picker-v2/src/composables/useCalendarScroll.d.ts +96 -0
- package/es/date-picker-v2/src/panel/CalendarPanel.d.ts +96 -0
- package/es/date-picker-v2/src/panel/CalendarRangePanel.d.ts +96 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +2 -0
- package/es/infinite-scroll/src/InfiniteScroll.d.ts +2 -0
- package/es/input/src/Input.d.ts +2 -0
- package/es/kanban/src/Kanban.d.ts +1 -1
- package/es/layout/src/Layout.d.ts +4 -0
- package/es/layout/src/LayoutContent.d.ts +2 -0
- package/es/layout/src/LayoutSider.d.ts +2 -0
- package/es/legacy-transfer/src/TransferList.d.ts +2 -0
- package/es/locales/common/ruRU.mjs +1 -1
- package/es/log/src/Log.d.ts +2 -0
- package/es/modal/src/BodyWrapper.d.ts +2 -0
- package/es/modal-fullscreen/src/ModalFull.d.ts +2 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +13 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.mjs +7 -0
- package/es/scrollbar/src/Scrollbar.d.ts +13 -0
- package/es/scrollbar/src/Scrollbar.mjs +7 -0
- package/es/time-picker/src/TimePicker.d.ts +8 -0
- package/es/transfer/src/TransferList.d.ts +2 -0
- package/es/tree/src/Tree.d.ts +2 -0
- package/es/upload/src/Upload.d.ts +21 -0
- package/es/upload/src/Upload.mjs +7 -1
- package/es/upload/src/UploadFile.d.ts +6 -0
- package/es/upload/src/UploadFile.mjs +12 -8
- package/es/upload/src/UploadFileList.mjs +3 -2
- package/es/upload/src/UploadProgress.d.ts +6 -0
- package/es/upload/src/interface.d.ts +10 -1
- package/es/upload/src/styles/index.cssr.mjs +84 -1
- package/es/upload/src/useUploadActionsRender.mjs +10 -5
- package/es/upload/styles/light.d.ts +6 -0
- package/es/upload/styles/light.mjs +4 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +2 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +21 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.js +9 -2
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +21 -0
- package/lib/_internal/scrollbar/src/Scrollbar.js +9 -2
- package/lib/_internal/select-menu/src/SelectMenuParts/List.d.ts +2 -0
- package/lib/_utils/composable/use-scroll-edge-detector.d.ts +9 -0
- package/lib/_utils/composable/use-scroll-edge-detector.js +42 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/lib/chat/src/Chat.d.ts +12 -24
- package/lib/chat/src/ChatMainArea.d.ts +4 -7
- package/lib/chat/src/ChatMainArea.js +6 -36
- package/lib/chat/src/interface.d.ts +2 -0
- package/lib/components.d.ts +109 -31
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +1 -1
- package/lib/data-table/src/DataTable.d.ts +14 -0
- package/lib/data-table/src/DataTable.js +16 -14
- package/lib/data-table/src/TableParts/Body.d.ts +2 -0
- package/lib/data-table/src/interface.d.ts +160 -151
- package/lib/data-table/src/interface.js +11 -8
- package/lib/data-table/src/use-column-settings.js +6 -1
- package/lib/data-table/src/use-resizable.d.ts +2 -0
- package/lib/data-table/src/use-resizable.js +9 -1
- package/lib/data-table/src/use-scroll.d.ts +1 -0
- package/lib/data-table/src/use-scroll.js +5 -1
- package/lib/date-picker/src/DatePicker.d.ts +11 -0
- package/lib/date-picker/src/DatePicker.js +6 -2
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +1 -0
- package/lib/date-picker-v2/src/DatePickerV2.js +6 -2
- package/lib/date-picker-v2/src/composables/useCalendarScroll.d.ts +96 -0
- package/lib/date-picker-v2/src/panel/CalendarPanel.d.ts +96 -0
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.d.ts +96 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +2 -0
- package/lib/infinite-scroll/src/InfiniteScroll.d.ts +2 -0
- package/lib/input/src/Input.d.ts +2 -0
- package/lib/kanban/src/Kanban.d.ts +1 -1
- package/lib/layout/src/Layout.d.ts +4 -0
- package/lib/layout/src/LayoutContent.d.ts +2 -0
- package/lib/layout/src/LayoutSider.d.ts +2 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +2 -0
- package/lib/locales/common/ruRU.js +1 -1
- package/lib/log/src/Log.d.ts +2 -0
- package/lib/modal/src/BodyWrapper.d.ts +2 -0
- package/lib/modal-fullscreen/src/ModalFull.d.ts +2 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +13 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.js +5 -1
- package/lib/scrollbar/src/Scrollbar.d.ts +13 -0
- package/lib/scrollbar/src/Scrollbar.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +8 -0
- package/lib/transfer/src/TransferList.d.ts +2 -0
- package/lib/tree/src/Tree.d.ts +2 -0
- package/lib/upload/src/Upload.d.ts +21 -0
- package/lib/upload/src/Upload.js +5 -2
- package/lib/upload/src/UploadFile.d.ts +6 -0
- package/lib/upload/src/UploadFile.js +19 -11
- package/lib/upload/src/UploadFileList.js +5 -1
- package/lib/upload/src/UploadProgress.d.ts +6 -0
- package/lib/upload/src/interface.d.ts +10 -1
- package/lib/upload/src/styles/index.cssr.js +84 -1
- package/lib/upload/src/useUploadActionsRender.js +17 -7
- package/lib/upload/styles/light.d.ts +6 -0
- package/lib/upload/styles/light.js +4 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +2 -0
- package/package.json +1 -1
- package/web-types.json +73 -10
|
@@ -130,6 +130,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
130
130
|
readonly 'onUpdate:expandedRowKeys': import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateExpandedRowKeys>>;
|
|
131
131
|
readonly onUpdateExpandedRowKeys: import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateExpandedRowKeys>>;
|
|
132
132
|
readonly onScroll: import("vue").PropType<(e: Event) => void>;
|
|
133
|
+
readonly onScrollToTop: import("vue").PropType<() => void>;
|
|
134
|
+
readonly onScrollToBottom: import("vue").PropType<() => void>;
|
|
135
|
+
readonly scrollThreshold: {
|
|
136
|
+
readonly type: NumberConstructor;
|
|
137
|
+
readonly default: 5;
|
|
138
|
+
};
|
|
133
139
|
readonly onPageChange: import("vue").PropType<import("../..").PaginationProps["onUpdate:page"]>;
|
|
134
140
|
readonly onPageSizeChange: import("vue").PropType<import("../..").PaginationProps["onUpdate:pageSize"]>;
|
|
135
141
|
readonly onSorterChange: import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateSorter> | undefined>;
|
|
@@ -3764,6 +3770,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3764
3770
|
page: (page: number) => void;
|
|
3765
3771
|
sort: (columnKey: ColumnKey, order: import("./interface").SortOrder) => void;
|
|
3766
3772
|
scrollTo: import("../../scrollbar/src/Scrollbar").ScrollTo;
|
|
3773
|
+
resetScrollEdgeState: () => void;
|
|
3767
3774
|
downloadCsv: (options?: CsvOptionsType) => void;
|
|
3768
3775
|
getData: () => {
|
|
3769
3776
|
data: import("./interface").InternalRowData[];
|
|
@@ -5899,6 +5906,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
5899
5906
|
readonly 'onUpdate:expandedRowKeys': import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateExpandedRowKeys>>;
|
|
5900
5907
|
readonly onUpdateExpandedRowKeys: import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateExpandedRowKeys>>;
|
|
5901
5908
|
readonly onScroll: import("vue").PropType<(e: Event) => void>;
|
|
5909
|
+
readonly onScrollToTop: import("vue").PropType<() => void>;
|
|
5910
|
+
readonly onScrollToBottom: import("vue").PropType<() => void>;
|
|
5911
|
+
readonly scrollThreshold: {
|
|
5912
|
+
readonly type: NumberConstructor;
|
|
5913
|
+
readonly default: 5;
|
|
5914
|
+
};
|
|
5902
5915
|
readonly onPageChange: import("vue").PropType<import("../..").PaginationProps["onUpdate:page"]>;
|
|
5903
5916
|
readonly onPageSizeChange: import("vue").PropType<import("../..").PaginationProps["onUpdate:pageSize"]>;
|
|
5904
5917
|
readonly onSorterChange: import("vue").PropType<import("../../_utils").MaybeArray<import("./interface").OnUpdateSorter> | undefined>;
|
|
@@ -9530,6 +9543,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9530
9543
|
}>, {
|
|
9531
9544
|
readonly bordered: boolean | undefined;
|
|
9532
9545
|
readonly loading: boolean;
|
|
9546
|
+
readonly scrollThreshold: number;
|
|
9533
9547
|
readonly size: import("./public-types").DataTableSize;
|
|
9534
9548
|
readonly data: import("./interface").RowData[];
|
|
9535
9549
|
readonly loadingSkeleton: boolean;
|
|
@@ -74,12 +74,15 @@ export default defineComponent({
|
|
|
74
74
|
clearResizableWidth,
|
|
75
75
|
doUpdateResizableWidth,
|
|
76
76
|
setResizableWidths,
|
|
77
|
-
|
|
77
|
+
setPreferredWidths,
|
|
78
|
+
resizableWidthsRef,
|
|
79
|
+
preferredWidthsRef
|
|
78
80
|
} = useResizable();
|
|
79
81
|
if (props.localStorageKey && props.resizableStorage !== false) {
|
|
80
82
|
const storedWidths = (_a = loadTableState(props.localStorageKey)) === null || _a === void 0 ? void 0 : _a.columnWidths;
|
|
81
83
|
if (storedWidths && Object.keys(storedWidths).length > 0) {
|
|
82
|
-
|
|
84
|
+
setPreferredWidths(Object.assign({}, storedWidths));
|
|
85
|
+
setResizableWidths(Object.assign({}, storedWidths));
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
const {
|
|
@@ -193,6 +196,7 @@ export default defineComponent({
|
|
|
193
196
|
handleTableHeaderScroll,
|
|
194
197
|
syncScrollState,
|
|
195
198
|
setHeaderScrollLeft,
|
|
199
|
+
resetScrollEdgeState,
|
|
196
200
|
leftActiveFixedColKeyRef,
|
|
197
201
|
leftActiveFixedChildrenColKeysRef,
|
|
198
202
|
rightActiveFixedColKeyRef,
|
|
@@ -237,7 +241,7 @@ export default defineComponent({
|
|
|
237
241
|
var _a, _b;
|
|
238
242
|
return props.localStorageKey ? {
|
|
239
243
|
key: props.localStorageKey,
|
|
240
|
-
columnWidths:
|
|
244
|
+
columnWidths: preferredWidthsRef.value,
|
|
241
245
|
columnsConfig: columnsConfigRef.value,
|
|
242
246
|
page: (_a = mergedPaginationRef.value) === null || _a === void 0 ? void 0 : _a.page,
|
|
243
247
|
pageSize: (_b = mergedPaginationRef.value) === null || _b === void 0 ? void 0 : _b.pageSize,
|
|
@@ -311,7 +315,7 @@ export default defineComponent({
|
|
|
311
315
|
systemMaxWidth: props.resizableMaxWidth
|
|
312
316
|
};
|
|
313
317
|
});
|
|
314
|
-
function buildNonFixedModeWidthMap(
|
|
318
|
+
function buildNonFixedModeWidthMap(preferredWidths, resizableColumns) {
|
|
315
319
|
const {
|
|
316
320
|
systemMinWidth,
|
|
317
321
|
systemMaxWidth
|
|
@@ -321,11 +325,11 @@ export default defineComponent({
|
|
|
321
325
|
widthMap: sanitizeColumnWidthMap(resizableColumns, {
|
|
322
326
|
systemMinWidth,
|
|
323
327
|
systemMaxWidth,
|
|
324
|
-
source:
|
|
328
|
+
source: preferredWidths
|
|
325
329
|
})
|
|
326
330
|
};
|
|
327
331
|
}
|
|
328
|
-
function buildFixedModeWidthMap(visibleLeafColumns,
|
|
332
|
+
function buildFixedModeWidthMap(visibleLeafColumns, sourceWidths) {
|
|
329
333
|
const {
|
|
330
334
|
systemMinWidth,
|
|
331
335
|
systemMaxWidth
|
|
@@ -333,7 +337,7 @@ export default defineComponent({
|
|
|
333
337
|
const preferredWidths = sanitizeColumnWidthMap(visibleLeafColumns, {
|
|
334
338
|
systemMinWidth,
|
|
335
339
|
systemMaxWidth,
|
|
336
|
-
source:
|
|
340
|
+
source: sourceWidths
|
|
337
341
|
});
|
|
338
342
|
const containerWidth = containerWidthSignalRef.value;
|
|
339
343
|
if (containerWidth === undefined) {
|
|
@@ -357,10 +361,10 @@ export default defineComponent({
|
|
|
357
361
|
}
|
|
358
362
|
function reconcileResizableWidths(_reason) {
|
|
359
363
|
const visibleLeafColumns = visibleLeafColumnsSignalRef.value;
|
|
360
|
-
const
|
|
364
|
+
const preferredWidths = preferredWidthsRef.value;
|
|
361
365
|
if (!visibleLeafColumns.length || !resizableColumnPresentRef.value) {
|
|
362
|
-
if (Object.keys(
|
|
363
|
-
|
|
366
|
+
if (Object.keys(resizableWidthsRef.value).length) {
|
|
367
|
+
setResizableWidths({});
|
|
364
368
|
}
|
|
365
369
|
return;
|
|
366
370
|
}
|
|
@@ -368,12 +372,12 @@ export default defineComponent({
|
|
|
368
372
|
const {
|
|
369
373
|
widthMap,
|
|
370
374
|
keys
|
|
371
|
-
} = buildNonFixedModeWidthMap(
|
|
375
|
+
} = buildNonFixedModeWidthMap(preferredWidths, resizableColumnsSignalRef.value);
|
|
372
376
|
syncResizableWidths(widthMap, keys);
|
|
373
377
|
return;
|
|
374
378
|
}
|
|
375
379
|
const visibleLeafKeys = visibleLeafColumns.map(column => column.key);
|
|
376
|
-
const nextWidths = buildFixedModeWidthMap(visibleLeafColumns,
|
|
380
|
+
const nextWidths = buildFixedModeWidthMap(visibleLeafColumns, preferredWidths);
|
|
377
381
|
syncResizableWidths(nextWidths, visibleLeafKeys);
|
|
378
382
|
}
|
|
379
383
|
function registerResizableWidthReconcileWatches() {
|
|
@@ -388,7 +392,7 @@ export default defineComponent({
|
|
|
388
392
|
watch(() => [containerWidthSignalRef.value, widthConstraintSignalRef.value.systemMinWidth, widthConstraintSignalRef.value.systemMaxWidth], () => {
|
|
389
393
|
reconcileResizableWidths('environment');
|
|
390
394
|
});
|
|
391
|
-
watch(() =>
|
|
395
|
+
watch(() => preferredWidthsRef.value, () => {
|
|
392
396
|
reconcileResizableWidths('width-state');
|
|
393
397
|
}, {
|
|
394
398
|
deep: true
|
|
@@ -656,6 +660,7 @@ export default defineComponent({
|
|
|
656
660
|
var _a;
|
|
657
661
|
(_a = mainTableInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg0, arg1);
|
|
658
662
|
},
|
|
663
|
+
resetScrollEdgeState,
|
|
659
664
|
getData: () => {
|
|
660
665
|
const originalData = props.data || [];
|
|
661
666
|
const totalRowData = autoSummaryRef.value && rawPaginatedDataRef.value ? autoSummaryRef.value(rawPaginatedDataRef.value) : null;
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
28
|
sync: () => void;
|
|
29
29
|
handleMouseEnterWrapper: () => void;
|
|
30
30
|
handleMouseLeaveWrapper: () => void;
|
|
31
|
+
resetScrollEdgeState: () => void;
|
|
31
32
|
} | null, ScrollbarInst | {
|
|
32
33
|
$el: HTMLElement;
|
|
33
34
|
containerRef: HTMLElement | null;
|
|
@@ -39,6 +40,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
40
|
sync: () => void;
|
|
40
41
|
handleMouseEnterWrapper: () => void;
|
|
41
42
|
handleMouseLeaveWrapper: () => void;
|
|
43
|
+
resetScrollEdgeState: () => void;
|
|
42
44
|
} | null>;
|
|
43
45
|
virtualListRef: import("vue").Ref<{
|
|
44
46
|
listElRef: HTMLElement;
|
|
@@ -12,11 +12,6 @@ import type { ScrollbarProps, ScrollTo } from '../../scrollbar/src/Scrollbar';
|
|
|
12
12
|
import type { DataTableTheme } from '../styles';
|
|
13
13
|
import type { DataTableGetCsvCell, DataTableGetCsvHeader, DataTableSize } from './public-types';
|
|
14
14
|
import type { ColItem, RowItem } from './use-group-header';
|
|
15
|
-
export declare enum TableColumnType {
|
|
16
|
-
SELECTION = "selection",
|
|
17
|
-
EXPAND = "expand",
|
|
18
|
-
DRAGGABLE = "draggable"
|
|
19
|
-
}
|
|
20
15
|
export declare const dataTableProps: {
|
|
21
16
|
readonly onUnstableColumnResize: PropType<(resizedWidth: number, limitedWidth: number, column: TableBaseColumn, getColumnWidth: (key: ColumnKey) => number | undefined) => void>;
|
|
22
17
|
readonly pagination: {
|
|
@@ -148,6 +143,12 @@ export declare const dataTableProps: {
|
|
|
148
143
|
readonly 'onUpdate:expandedRowKeys': PropType<MaybeArray<OnUpdateExpandedRowKeys>>;
|
|
149
144
|
readonly onUpdateExpandedRowKeys: PropType<MaybeArray<OnUpdateExpandedRowKeys>>;
|
|
150
145
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
146
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
147
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
148
|
+
readonly scrollThreshold: {
|
|
149
|
+
readonly type: NumberConstructor;
|
|
150
|
+
readonly default: 5;
|
|
151
|
+
};
|
|
151
152
|
readonly onPageChange: PropType<PaginationProps["onUpdate:page"]>;
|
|
152
153
|
readonly onPageSizeChange: PropType<PaginationProps["onUpdate:pageSize"]>;
|
|
153
154
|
readonly onSorterChange: PropType<MaybeArray<OnUpdateSorter> | undefined>;
|
|
@@ -3775,16 +3776,18 @@ export declare const dataTableProps: {
|
|
|
3775
3776
|
}>;
|
|
3776
3777
|
}>>>;
|
|
3777
3778
|
};
|
|
3778
|
-
export
|
|
3779
|
-
export
|
|
3780
|
-
|
|
3779
|
+
export declare const dataTableInjectionKey: import("vue").InjectionKey<DataTableInjection>;
|
|
3780
|
+
export declare enum TableColumnType {
|
|
3781
|
+
SELECTION = "selection",
|
|
3782
|
+
EXPAND = "expand",
|
|
3783
|
+
DRAGGABLE = "draggable"
|
|
3784
|
+
}
|
|
3781
3785
|
export interface ColumnWidthComputationItem {
|
|
3782
3786
|
key: ColumnKey;
|
|
3783
3787
|
width?: number | string;
|
|
3784
3788
|
minWidth?: number | string;
|
|
3785
3789
|
maxWidth?: number | string;
|
|
3786
3790
|
}
|
|
3787
|
-
export type SortOrderFlag = 1 | -1 | 0;
|
|
3788
3791
|
export interface DataTableSlots {
|
|
3789
3792
|
default?: () => VNode[];
|
|
3790
3793
|
empty?: () => VNode[];
|
|
@@ -3793,28 +3796,14 @@ export interface DataTableSlots {
|
|
|
3793
3796
|
filters?: () => VNode[];
|
|
3794
3797
|
'column-settings-trigger'?: () => VNode[];
|
|
3795
3798
|
}
|
|
3796
|
-
export type RowData = Record<string, any>;
|
|
3797
|
-
export type InternalRowData = Record<string, unknown>;
|
|
3798
|
-
export type CreateRowKey<T = InternalRowData> = (row: T) => RowKey;
|
|
3799
|
-
export type CreateRowClassName<T = InternalRowData> = (row: T, index: number) => string;
|
|
3800
|
-
export type CreateRowProps<T = InternalRowData> = (row: T, index: number) => HTMLAttributes;
|
|
3801
|
-
export type CreateCellProps<T = InternalRowData> = (row: T, index: number) => HTMLAttributes;
|
|
3802
|
-
export type CompareFn<T = InternalRowData> = (row1: T, row2: T) => number;
|
|
3803
|
-
export type Sorter<T = InternalRowData> = CompareFn<T> | SorterMultiple<T>;
|
|
3804
3799
|
export interface SorterMultiple<T = InternalRowData> {
|
|
3805
3800
|
multiple: number;
|
|
3806
3801
|
compare?: CompareFn<T> | 'default';
|
|
3807
3802
|
}
|
|
3808
|
-
export type Filter<T = InternalRowData> = (filterOptionValue: FilterOptionValue, row: T) => boolean;
|
|
3809
3803
|
export interface FilterOption {
|
|
3810
3804
|
label: string;
|
|
3811
3805
|
value: FilterOptionValue;
|
|
3812
3806
|
}
|
|
3813
|
-
export type TmNode = TreeNode<InternalRowData>;
|
|
3814
|
-
export type SortOrder = 'ascend' | 'descend' | false;
|
|
3815
|
-
export type Ellipsis = boolean | (EllipsisProps & {
|
|
3816
|
-
style?: CSSProperties;
|
|
3817
|
-
});
|
|
3818
3807
|
export interface CommonColumnInfo<T = InternalRowData> {
|
|
3819
3808
|
fixed?: 'left' | 'right';
|
|
3820
3809
|
width?: number | string;
|
|
@@ -3828,82 +3817,11 @@ export interface CommonColumnInfo<T = InternalRowData> {
|
|
|
3828
3817
|
allowExport?: boolean;
|
|
3829
3818
|
visible?: boolean;
|
|
3830
3819
|
required?: boolean;
|
|
3820
|
+
settingsTitle?: string;
|
|
3831
3821
|
}
|
|
3832
3822
|
export interface TableColumnMaskObject {
|
|
3833
3823
|
postProcess: (value: string) => string;
|
|
3834
3824
|
}
|
|
3835
|
-
export type TableColumnMask = string | ((value: string) => string) | TableColumnMaskObject;
|
|
3836
|
-
export type TableColumnTitle = string | ((column: TableBaseColumn) => VNodeChild);
|
|
3837
|
-
export type TableExpandColumnTitle = string | ((column: TableExpandColumn) => VNodeChild);
|
|
3838
|
-
export type TableColumnGroupTitle = string | ((column: TableColumnGroup) => VNodeChild);
|
|
3839
|
-
export type TableColumnGroup<T = InternalRowData> = {
|
|
3840
|
-
title?: TableColumnGroupTitle;
|
|
3841
|
-
subtitle?: string;
|
|
3842
|
-
type?: never;
|
|
3843
|
-
key: ColumnKey;
|
|
3844
|
-
children: Array<TableBaseColumn<T>>;
|
|
3845
|
-
resizable?: boolean;
|
|
3846
|
-
filterOptions?: never;
|
|
3847
|
-
} & CommonColumnInfo<T>;
|
|
3848
|
-
export type TableBaseColumn<T = InternalRowData> = {
|
|
3849
|
-
title?: TableColumnTitle;
|
|
3850
|
-
subtitle?: string;
|
|
3851
|
-
titleColSpan?: number;
|
|
3852
|
-
type?: never;
|
|
3853
|
-
key: ColumnKey;
|
|
3854
|
-
editable?: boolean | ((rowData: T) => boolean);
|
|
3855
|
-
mask?: TableColumnMask;
|
|
3856
|
-
numeric?: boolean;
|
|
3857
|
-
placeholder?: string;
|
|
3858
|
-
totalRow?: {
|
|
3859
|
-
type: 'sum' | 'default' | 'diff' | 'multiply' | 'divide' | 'percentage' | 'function';
|
|
3860
|
-
value?: string;
|
|
3861
|
-
fields?: string[];
|
|
3862
|
-
function?: (values: number[]) => number;
|
|
3863
|
-
};
|
|
3864
|
-
tree?: boolean;
|
|
3865
|
-
sorter?: boolean | Sorter<T> | 'default';
|
|
3866
|
-
defaultSortOrder?: SortOrder;
|
|
3867
|
-
sortOrder?: SortOrder;
|
|
3868
|
-
resizable?: boolean;
|
|
3869
|
-
minWidth?: string | number;
|
|
3870
|
-
maxWidth?: string | number;
|
|
3871
|
-
filter?: 'default' | boolean | Filter<T>;
|
|
3872
|
-
filterOptions?: FilterOption[];
|
|
3873
|
-
filterOptionValues?: FilterOptionValue[] | null;
|
|
3874
|
-
filterOptionValue?: FilterOptionValue | null;
|
|
3875
|
-
filterMode?: 'or' | 'and';
|
|
3876
|
-
defaultFilterOptionValues?: FilterOptionValue[] | null;
|
|
3877
|
-
defaultFilterOptionValue?: FilterOptionValue | null;
|
|
3878
|
-
filterMultiple?: boolean;
|
|
3879
|
-
render?: (rowData: T, rowIndex: number) => VNodeChild;
|
|
3880
|
-
renderFilter?: RenderFilter;
|
|
3881
|
-
renderFilterIcon?: RenderFilterIcon;
|
|
3882
|
-
renderSorter?: RenderSorter;
|
|
3883
|
-
renderSorterIcon?: RenderSorterIcon;
|
|
3884
|
-
renderFilterMenu?: RenderFilterMenu;
|
|
3885
|
-
colSpan?: (rowData: T, rowIndex: number) => number;
|
|
3886
|
-
rowSpan?: (rowData: T, rowIndex: number) => number;
|
|
3887
|
-
} & CommonColumnInfo<T>;
|
|
3888
|
-
export type TableSelectionColumn<T = InternalRowData> = {
|
|
3889
|
-
type: 'selection';
|
|
3890
|
-
multiple?: boolean;
|
|
3891
|
-
disabled?: (row: T) => boolean;
|
|
3892
|
-
options?: DataTableSelectionOptions<T>;
|
|
3893
|
-
sorter?: never;
|
|
3894
|
-
resizable?: boolean;
|
|
3895
|
-
filter?: never;
|
|
3896
|
-
filterOptions?: never;
|
|
3897
|
-
filterOptionValues?: never;
|
|
3898
|
-
filterOptionValue?: never;
|
|
3899
|
-
colSpan?: never;
|
|
3900
|
-
rowSpan?: never;
|
|
3901
|
-
} & CommonColumnInfo<T>;
|
|
3902
|
-
export type RenderExpand<T = InternalRowData> = (row: T, index: number) => VNodeChild;
|
|
3903
|
-
export type RenderExpandIcon = ({ expanded }: {
|
|
3904
|
-
expanded: boolean;
|
|
3905
|
-
}) => VNodeChild;
|
|
3906
|
-
export type Expandable<T = InternalRowData> = (row: T) => boolean;
|
|
3907
3825
|
export interface TableExpandColumn<T = InternalRowData> extends Omit<TableSelectionColumn<T>, 'type'> {
|
|
3908
3826
|
type: 'expand';
|
|
3909
3827
|
title?: TableExpandColumnTitle;
|
|
@@ -4009,30 +3927,6 @@ export interface FixedShadowStyleProps {
|
|
|
4009
3927
|
rightActiveFixedChildrenColKeys: ColumnKey[];
|
|
4010
3928
|
componentId: string;
|
|
4011
3929
|
}
|
|
4012
|
-
export type RowDropPosition = 'before' | 'after';
|
|
4013
|
-
export type TableDraggableColumn<T = InternalRowData> = {
|
|
4014
|
-
type: 'draggable';
|
|
4015
|
-
key: ColumnKey;
|
|
4016
|
-
draggable?: (row: T) => boolean;
|
|
4017
|
-
onDragEnd?: (row: T, options: RowDragEndOptions) => void;
|
|
4018
|
-
sortByKey?: boolean;
|
|
4019
|
-
sorter?: never;
|
|
4020
|
-
filter?: never;
|
|
4021
|
-
filterOptions?: never;
|
|
4022
|
-
filterOptionValues?: never;
|
|
4023
|
-
filterOptionValue?: never;
|
|
4024
|
-
resizable?: never;
|
|
4025
|
-
colSpan?: never;
|
|
4026
|
-
rowSpan?: never;
|
|
4027
|
-
} & CommonColumnInfo<T>;
|
|
4028
|
-
export type TableColumn<T = InternalRowData> = TableColumnGroup<T> | TableBaseColumn<T> | TableSelectionColumn<T> | TableExpandColumn<T> | TableDraggableColumn<T>;
|
|
4029
|
-
export type TableColumns<T = InternalRowData> = Array<TableColumn<T>>;
|
|
4030
|
-
export type DataRelatedColumn<T = InternalRowData> = TableSelectionColumn<T> | TableBaseColumn<T> | TableExpandColumn<T> | TableDraggableColumn<T>;
|
|
4031
|
-
export type DataTableSelectionOptions<T = InternalRowData> = Array<DataTableSelectionOption | {
|
|
4032
|
-
label: string;
|
|
4033
|
-
key: string | number;
|
|
4034
|
-
onSelect: (pageData: T[]) => void;
|
|
4035
|
-
}>;
|
|
4036
3930
|
export interface DataTableInjection {
|
|
4037
3931
|
props: DataTableSetupProps;
|
|
4038
3932
|
slots: Slots;
|
|
@@ -4128,7 +4022,6 @@ export interface DataTableInjection {
|
|
|
4128
4022
|
handleRowDragEnd: UseRowDragReturn['handleRowDragEnd'];
|
|
4129
4023
|
handleRowDrop: UseRowDragReturn['handleRowDrop'];
|
|
4130
4024
|
}
|
|
4131
|
-
export declare const dataTableInjectionKey: import("vue").InjectionKey<DataTableInjection>;
|
|
4132
4025
|
export interface MainTableInjection {
|
|
4133
4026
|
leftActiveFixedColKey: ColumnKey | null;
|
|
4134
4027
|
rightActiveFixedColKey: ColumnKey | null;
|
|
@@ -4140,14 +4033,11 @@ export interface DataTableColumnConfigState {
|
|
|
4140
4033
|
}
|
|
4141
4034
|
export interface DataTableColumnSettingsItem {
|
|
4142
4035
|
key: string;
|
|
4143
|
-
title:
|
|
4036
|
+
title: DataTableColumnTitle;
|
|
4144
4037
|
visible: boolean;
|
|
4145
4038
|
required: boolean;
|
|
4146
4039
|
sortOrder: number;
|
|
4147
4040
|
}
|
|
4148
|
-
export type DataTableConfigurableColumn = TableBaseColumn & {
|
|
4149
|
-
key: string | number;
|
|
4150
|
-
};
|
|
4151
4041
|
export interface UseColumnSettingsReturn {
|
|
4152
4042
|
enabledRef: ComputedRef<boolean>;
|
|
4153
4043
|
resolvedColumnsRef: ComputedRef<TableColumns>;
|
|
@@ -4174,32 +4064,11 @@ export interface DataTableStorageState {
|
|
|
4174
4064
|
checkedRowKeys?: RowKey[];
|
|
4175
4065
|
expandedRowKeys?: RowKey[];
|
|
4176
4066
|
}
|
|
4177
|
-
export type RenderFilter = (props: {
|
|
4178
|
-
active: boolean;
|
|
4179
|
-
show: boolean;
|
|
4180
|
-
}) => VNodeChild;
|
|
4181
|
-
export type RenderFilterIcon = RenderFilter;
|
|
4182
|
-
export type RenderSorter = (props: {
|
|
4183
|
-
order: SortOrder;
|
|
4184
|
-
}) => VNodeChild;
|
|
4185
|
-
export type RenderSorterIcon = RenderSorter;
|
|
4186
|
-
export type RenderFilterMenu = (actions: {
|
|
4187
|
-
hide: () => void;
|
|
4188
|
-
}) => VNodeChild;
|
|
4189
|
-
export type OnUpdateExpandedRowKeys = (keys: RowKey[]) => void;
|
|
4190
|
-
export type OnUpdateCheckedRowKeys = (keys: RowKey[], rows: InternalRowData[], meta: {
|
|
4191
|
-
row: InternalRowData | undefined;
|
|
4192
|
-
action: 'check' | 'uncheck' | 'checkAll' | 'uncheckAll';
|
|
4193
|
-
}) => void;
|
|
4194
|
-
export type OnUpdateSorter = (sortState: SortState & SortState[] & null) => void;
|
|
4195
|
-
export type OnUpdateSorterImpl = (sortState: SortState | SortState[] | null) => void;
|
|
4196
|
-
export type OnUpdateFilters = (filterState: FilterState, sourceColumn: TableBaseColumn) => void;
|
|
4197
4067
|
export interface SortState {
|
|
4198
4068
|
columnKey: ColumnKey;
|
|
4199
4069
|
order: SortOrder;
|
|
4200
4070
|
sorter: Sorter | boolean | 'default';
|
|
4201
4071
|
}
|
|
4202
|
-
export type FilterState = Record<string, FilterOptionValue[] | FilterOptionValue | null | undefined>;
|
|
4203
4072
|
export interface MainTableRef {
|
|
4204
4073
|
getHeaderElement: () => HTMLElement | null;
|
|
4205
4074
|
getBodyElement: () => HTMLElement | null;
|
|
@@ -4212,8 +4081,6 @@ export interface MainTableBodyRef {
|
|
|
4212
4081
|
export interface MainTableHeaderRef {
|
|
4213
4082
|
$el: HTMLElement | null;
|
|
4214
4083
|
}
|
|
4215
|
-
export type OnFilterMenuChange = <T extends FilterOptionValue[] & (FilterOptionValue | null)>(value: T) => void;
|
|
4216
|
-
export type OnFilterMenuChangeImpl = (value: FilterOptionValue[] | FilterOptionValue | null) => void;
|
|
4217
4084
|
export interface DataTableInst {
|
|
4218
4085
|
filter: (filters: FilterState | null) => void;
|
|
4219
4086
|
filters: (filters: FilterState | null) => void;
|
|
@@ -4222,6 +4089,7 @@ export interface DataTableInst {
|
|
|
4222
4089
|
page: (page: number) => void;
|
|
4223
4090
|
sort: (columnKey: ColumnKey, order: SortOrder) => void;
|
|
4224
4091
|
scrollTo: ScrollTo;
|
|
4092
|
+
resetScrollEdgeState: () => void;
|
|
4225
4093
|
downloadCsv: (options?: CsvOptionsType) => void;
|
|
4226
4094
|
getData: () => {
|
|
4227
4095
|
data: InternalRowData[];
|
|
@@ -4234,15 +4102,11 @@ export interface DataTableInst {
|
|
|
4234
4102
|
/** @deprecated it but just leave it here, it does no harm */
|
|
4235
4103
|
clearFilter: () => void;
|
|
4236
4104
|
}
|
|
4237
|
-
export type CreateSummary<T = InternalRowData> = (pageData: T[]) => SummaryRowData | SummaryRowData[];
|
|
4238
4105
|
export interface SummaryCell {
|
|
4239
4106
|
value?: VNodeChild;
|
|
4240
4107
|
colSpan?: number;
|
|
4241
4108
|
rowSpan?: number;
|
|
4242
4109
|
}
|
|
4243
|
-
export type SummaryRowData = Record<string, SummaryCell>;
|
|
4244
|
-
export type DataTableOnLoad = (node: RowData) => Promise<void>;
|
|
4245
|
-
export type DataTableSelectionOption = 'all' | 'none';
|
|
4246
4110
|
export interface CsvOptionsType {
|
|
4247
4111
|
fileName?: string;
|
|
4248
4112
|
keepOriginalData?: boolean;
|
|
@@ -4257,6 +4121,151 @@ export interface WidthConstraintSignal {
|
|
|
4257
4121
|
systemMinWidth: number | string;
|
|
4258
4122
|
systemMaxWidth?: number | string;
|
|
4259
4123
|
}
|
|
4124
|
+
export type FilterOptionValue = string | number;
|
|
4125
|
+
export type ColumnKey = string | number;
|
|
4126
|
+
export type RowKey = string | number;
|
|
4127
|
+
export type SortOrderFlag = 1 | -1 | 0;
|
|
4128
|
+
export type RowData = Record<string, any>;
|
|
4129
|
+
export type InternalRowData = Record<string, unknown>;
|
|
4130
|
+
export type CreateRowKey<T = InternalRowData> = (row: T) => RowKey;
|
|
4131
|
+
export type CreateRowClassName<T = InternalRowData> = (row: T, index: number) => string;
|
|
4132
|
+
export type CreateRowProps<T = InternalRowData> = (row: T, index: number) => HTMLAttributes;
|
|
4133
|
+
export type CreateCellProps<T = InternalRowData> = (row: T, index: number) => HTMLAttributes;
|
|
4134
|
+
export type CompareFn<T = InternalRowData> = (row1: T, row2: T) => number;
|
|
4135
|
+
export type Sorter<T = InternalRowData> = CompareFn<T> | SorterMultiple<T>;
|
|
4136
|
+
export type Filter<T = InternalRowData> = (filterOptionValue: FilterOptionValue, row: T) => boolean;
|
|
4137
|
+
export type TmNode = TreeNode<InternalRowData>;
|
|
4138
|
+
export type SortOrder = 'ascend' | 'descend' | false;
|
|
4139
|
+
export type Ellipsis = boolean | (EllipsisProps & {
|
|
4140
|
+
style?: CSSProperties;
|
|
4141
|
+
});
|
|
4142
|
+
export type TableColumnMask = string | ((value: string) => string) | TableColumnMaskObject;
|
|
4143
|
+
export type TableColumnTitle = string | ((column: TableBaseColumn) => VNodeChild);
|
|
4144
|
+
export type TableExpandColumnTitle = string | ((column: TableExpandColumn) => VNodeChild);
|
|
4145
|
+
export type TableColumnGroupTitle = string | ((column: TableColumnGroup) => VNodeChild);
|
|
4146
|
+
export type DataTableColumnTitle = string | (() => VNodeChild);
|
|
4147
|
+
export type TableColumnGroup<T = InternalRowData> = {
|
|
4148
|
+
title?: TableColumnGroupTitle;
|
|
4149
|
+
subtitle?: string;
|
|
4150
|
+
type?: never;
|
|
4151
|
+
key: ColumnKey;
|
|
4152
|
+
children: Array<TableBaseColumn<T>>;
|
|
4153
|
+
resizable?: boolean;
|
|
4154
|
+
filterOptions?: never;
|
|
4155
|
+
} & CommonColumnInfo<T>;
|
|
4156
|
+
export type TableBaseColumn<T = InternalRowData> = {
|
|
4157
|
+
title?: TableColumnTitle;
|
|
4158
|
+
subtitle?: string;
|
|
4159
|
+
titleColSpan?: number;
|
|
4160
|
+
type?: never;
|
|
4161
|
+
key: ColumnKey;
|
|
4162
|
+
editable?: boolean | ((rowData: T) => boolean);
|
|
4163
|
+
mask?: TableColumnMask;
|
|
4164
|
+
numeric?: boolean;
|
|
4165
|
+
placeholder?: string;
|
|
4166
|
+
totalRow?: {
|
|
4167
|
+
type: 'sum' | 'default' | 'diff' | 'multiply' | 'divide' | 'percentage' | 'function';
|
|
4168
|
+
value?: string;
|
|
4169
|
+
fields?: string[];
|
|
4170
|
+
function?: (values: number[]) => number;
|
|
4171
|
+
};
|
|
4172
|
+
tree?: boolean;
|
|
4173
|
+
sorter?: boolean | Sorter<T> | 'default';
|
|
4174
|
+
defaultSortOrder?: SortOrder;
|
|
4175
|
+
sortOrder?: SortOrder;
|
|
4176
|
+
resizable?: boolean;
|
|
4177
|
+
minWidth?: string | number;
|
|
4178
|
+
maxWidth?: string | number;
|
|
4179
|
+
filter?: 'default' | boolean | Filter<T>;
|
|
4180
|
+
filterOptions?: FilterOption[];
|
|
4181
|
+
filterOptionValues?: FilterOptionValue[] | null;
|
|
4182
|
+
filterOptionValue?: FilterOptionValue | null;
|
|
4183
|
+
filterMode?: 'or' | 'and';
|
|
4184
|
+
defaultFilterOptionValues?: FilterOptionValue[] | null;
|
|
4185
|
+
defaultFilterOptionValue?: FilterOptionValue | null;
|
|
4186
|
+
filterMultiple?: boolean;
|
|
4187
|
+
render?: (rowData: T, rowIndex: number) => VNodeChild;
|
|
4188
|
+
renderFilter?: RenderFilter;
|
|
4189
|
+
renderFilterIcon?: RenderFilterIcon;
|
|
4190
|
+
renderSorter?: RenderSorter;
|
|
4191
|
+
renderSorterIcon?: RenderSorterIcon;
|
|
4192
|
+
renderFilterMenu?: RenderFilterMenu;
|
|
4193
|
+
colSpan?: (rowData: T, rowIndex: number) => number;
|
|
4194
|
+
rowSpan?: (rowData: T, rowIndex: number) => number;
|
|
4195
|
+
} & CommonColumnInfo<T>;
|
|
4196
|
+
export type TableSelectionColumn<T = InternalRowData> = {
|
|
4197
|
+
type: 'selection';
|
|
4198
|
+
multiple?: boolean;
|
|
4199
|
+
disabled?: (row: T) => boolean;
|
|
4200
|
+
options?: DataTableSelectionOptions<T>;
|
|
4201
|
+
sorter?: never;
|
|
4202
|
+
resizable?: boolean;
|
|
4203
|
+
filter?: never;
|
|
4204
|
+
filterOptions?: never;
|
|
4205
|
+
filterOptionValues?: never;
|
|
4206
|
+
filterOptionValue?: never;
|
|
4207
|
+
colSpan?: never;
|
|
4208
|
+
rowSpan?: never;
|
|
4209
|
+
} & CommonColumnInfo<T>;
|
|
4210
|
+
export type RenderExpand<T = InternalRowData> = (row: T, index: number) => VNodeChild;
|
|
4211
|
+
export type RenderExpandIcon = ({ expanded }: {
|
|
4212
|
+
expanded: boolean;
|
|
4213
|
+
}) => VNodeChild;
|
|
4214
|
+
export type Expandable<T = InternalRowData> = (row: T) => boolean;
|
|
4215
|
+
export type RowDropPosition = 'before' | 'after';
|
|
4216
|
+
export type TableDraggableColumn<T = InternalRowData> = {
|
|
4217
|
+
type: 'draggable';
|
|
4218
|
+
key: ColumnKey;
|
|
4219
|
+
draggable?: (row: T) => boolean;
|
|
4220
|
+
onDragEnd?: (row: T, options: RowDragEndOptions) => void;
|
|
4221
|
+
sortByKey?: boolean;
|
|
4222
|
+
sorter?: never;
|
|
4223
|
+
filter?: never;
|
|
4224
|
+
filterOptions?: never;
|
|
4225
|
+
filterOptionValues?: never;
|
|
4226
|
+
filterOptionValue?: never;
|
|
4227
|
+
resizable?: never;
|
|
4228
|
+
colSpan?: never;
|
|
4229
|
+
rowSpan?: never;
|
|
4230
|
+
} & CommonColumnInfo<T>;
|
|
4231
|
+
export type TableColumn<T = InternalRowData> = TableColumnGroup<T> | TableBaseColumn<T> | TableSelectionColumn<T> | TableExpandColumn<T> | TableDraggableColumn<T>;
|
|
4232
|
+
export type TableColumns<T = InternalRowData> = Array<TableColumn<T>>;
|
|
4233
|
+
export type DataRelatedColumn<T = InternalRowData> = TableSelectionColumn<T> | TableBaseColumn<T> | TableExpandColumn<T> | TableDraggableColumn<T>;
|
|
4234
|
+
export type DataTableSelectionOptions<T = InternalRowData> = Array<DataTableSelectionOption | {
|
|
4235
|
+
label: string;
|
|
4236
|
+
key: string | number;
|
|
4237
|
+
onSelect: (pageData: T[]) => void;
|
|
4238
|
+
}>;
|
|
4239
|
+
export type DataTableConfigurableColumn = TableBaseColumn & {
|
|
4240
|
+
key: string | number;
|
|
4241
|
+
};
|
|
4242
|
+
export type RenderFilter = (props: {
|
|
4243
|
+
active: boolean;
|
|
4244
|
+
show: boolean;
|
|
4245
|
+
}) => VNodeChild;
|
|
4246
|
+
export type RenderFilterIcon = RenderFilter;
|
|
4247
|
+
export type RenderSorter = (props: {
|
|
4248
|
+
order: SortOrder;
|
|
4249
|
+
}) => VNodeChild;
|
|
4250
|
+
export type RenderSorterIcon = RenderSorter;
|
|
4251
|
+
export type RenderFilterMenu = (actions: {
|
|
4252
|
+
hide: () => void;
|
|
4253
|
+
}) => VNodeChild;
|
|
4254
|
+
export type OnUpdateExpandedRowKeys = (keys: RowKey[]) => void;
|
|
4255
|
+
export type OnUpdateCheckedRowKeys = (keys: RowKey[], rows: InternalRowData[], meta: {
|
|
4256
|
+
row: InternalRowData | undefined;
|
|
4257
|
+
action: 'check' | 'uncheck' | 'checkAll' | 'uncheckAll';
|
|
4258
|
+
}) => void;
|
|
4259
|
+
export type OnUpdateSorter = (sortState: SortState & SortState[] & null) => void;
|
|
4260
|
+
export type OnUpdateSorterImpl = (sortState: SortState | SortState[] | null) => void;
|
|
4261
|
+
export type OnUpdateFilters = (filterState: FilterState, sourceColumn: TableBaseColumn) => void;
|
|
4262
|
+
export type FilterState = Record<string, FilterOptionValue[] | FilterOptionValue | null | undefined>;
|
|
4263
|
+
export type OnFilterMenuChange = <T extends FilterOptionValue[] & (FilterOptionValue | null)>(value: T) => void;
|
|
4264
|
+
export type OnFilterMenuChangeImpl = (value: FilterOptionValue[] | FilterOptionValue | null) => void;
|
|
4265
|
+
export type CreateSummary<T = InternalRowData> = (pageData: T[]) => SummaryRowData | SummaryRowData[];
|
|
4266
|
+
export type SummaryRowData = Record<string, SummaryCell>;
|
|
4267
|
+
export type DataTableOnLoad = (node: RowData) => Promise<void>;
|
|
4268
|
+
export type DataTableSelectionOption = 'all' | 'none';
|
|
4260
4269
|
export type RowRenderInfo = {
|
|
4261
4270
|
isSummaryRow: true;
|
|
4262
4271
|
key: RowKey;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { useTheme } from "../../_mixins/index.mjs";
|
|
2
2
|
import { createInjectionKey } from "../../_utils/index.mjs";
|
|
3
|
-
export var TableColumnType;
|
|
4
|
-
(function (TableColumnType) {
|
|
5
|
-
TableColumnType["SELECTION"] = "selection";
|
|
6
|
-
TableColumnType["EXPAND"] = "expand";
|
|
7
|
-
TableColumnType["DRAGGABLE"] = "draggable";
|
|
8
|
-
})(TableColumnType || (TableColumnType = {}));
|
|
9
3
|
export const dataTableProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
10
4
|
onUnstableColumnResize: Function,
|
|
11
5
|
pagination: {
|
|
@@ -138,6 +132,12 @@ export const dataTableProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
138
132
|
'onUpdate:expandedRowKeys': [Function, Array],
|
|
139
133
|
onUpdateExpandedRowKeys: [Function, Array],
|
|
140
134
|
onScroll: Function,
|
|
135
|
+
onScrollToTop: Function,
|
|
136
|
+
onScrollToBottom: Function,
|
|
137
|
+
scrollThreshold: {
|
|
138
|
+
type: Number,
|
|
139
|
+
default: 5
|
|
140
|
+
},
|
|
141
141
|
// deprecated
|
|
142
142
|
onPageChange: [Function, Array],
|
|
143
143
|
onPageSizeChange: [Function, Array],
|
|
@@ -145,4 +145,10 @@ export const dataTableProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
145
145
|
onFiltersChange: [Function, Array],
|
|
146
146
|
onCheckedRowKeysChange: [Function, Array]
|
|
147
147
|
});
|
|
148
|
-
export const dataTableInjectionKey = createInjectionKey('u-data-table');
|
|
148
|
+
export const dataTableInjectionKey = createInjectionKey('u-data-table');
|
|
149
|
+
export var TableColumnType;
|
|
150
|
+
(function (TableColumnType) {
|
|
151
|
+
TableColumnType["SELECTION"] = "selection";
|
|
152
|
+
TableColumnType["EXPAND"] = "expand";
|
|
153
|
+
TableColumnType["DRAGGABLE"] = "draggable";
|
|
154
|
+
})(TableColumnType || (TableColumnType = {}));
|
|
@@ -10,7 +10,10 @@ function isConfigurableColumn(column) {
|
|
|
10
10
|
return column.visible !== false;
|
|
11
11
|
}
|
|
12
12
|
function toColumnTitle(column) {
|
|
13
|
-
|
|
13
|
+
if (column.settingsTitle !== undefined) return column.settingsTitle;
|
|
14
|
+
const title = column.title;
|
|
15
|
+
if (typeof title === 'function') return () => title(column);
|
|
16
|
+
return title !== null && title !== void 0 ? title : String(column.key);
|
|
14
17
|
}
|
|
15
18
|
function calcColumnsScrollX(columns, getResizableWidth) {
|
|
16
19
|
let total = 0;
|
|
@@ -3,6 +3,8 @@ export declare function useResizable(): {
|
|
|
3
3
|
getResizableWidth: (key: ColumnKey) => number | undefined;
|
|
4
4
|
doUpdateResizableWidth: (column: TableColumn, width: number) => void;
|
|
5
5
|
setResizableWidths: (widths: Record<ColumnKey, number>) => void;
|
|
6
|
+
setPreferredWidths: (widths: Record<ColumnKey, number>) => void;
|
|
6
7
|
clearResizableWidth: () => void;
|
|
7
8
|
resizableWidthsRef: import("vue").Ref<Record<ColumnKey, number>, Record<ColumnKey, number>>;
|
|
9
|
+
preferredWidthsRef: import("vue").Ref<Record<ColumnKey, number>, Record<ColumnKey, number>>;
|
|
8
10
|
};
|