@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("../../pagination").PaginationProps["onUpdate:page"]>;
|
|
134
140
|
readonly onPageSizeChange: import("vue").PropType<import("../../pagination").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("../../pagination").PaginationProps["onUpdate:page"]>;
|
|
5903
5916
|
readonly onPageSizeChange: import("vue").PropType<import("../../pagination").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;
|
|
@@ -67,11 +67,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
67
|
const themeRef = (0, _mixins_1.useTheme)('DataTable', '-data-table', index_cssr_1.default, styles_1.dataTableLight, props, mergedClsPrefixRef);
|
|
68
68
|
const bodyWidthRef = (0, vue_1.ref)(null);
|
|
69
69
|
const mainTableInstRef = (0, vue_1.ref)(null);
|
|
70
|
-
const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth, setResizableWidths, resizableWidthsRef } = (0, use_resizable_1.useResizable)();
|
|
70
|
+
const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth, setResizableWidths, setPreferredWidths, resizableWidthsRef, preferredWidthsRef } = (0, use_resizable_1.useResizable)();
|
|
71
71
|
if (props.localStorageKey && props.resizableStorage !== false) {
|
|
72
72
|
const storedWidths = (_a = (0, use_table_storage_1.loadTableState)(props.localStorageKey)) === null || _a === void 0 ? void 0 : _a.columnWidths;
|
|
73
73
|
if (storedWidths && Object.keys(storedWidths).length > 0) {
|
|
74
|
-
|
|
74
|
+
setPreferredWidths(Object.assign({}, storedWidths));
|
|
75
|
+
setResizableWidths(Object.assign({}, storedWidths));
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
const { enabledRef: columnSettingsEnabledRef, resolvedColumnsRef, scrollXRef: columnSettingsScrollXRef, columnsConfigRef, drawerOpenRef, drawerItemsRef, defaultDrawerItemsRef, openDrawer: openColumnSettings, resetConfig: resetColumnSettings, applyConfig: applyColumnSettings, applyConfigFromKeys: applyColumnSettingsFromKeys } = (0, use_column_settings_1.useColumnSettings)(props, getResizableWidth);
|
|
@@ -106,7 +107,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
106
107
|
mergedCheckedRowKeySetRef,
|
|
107
108
|
mergedClsPrefixRef
|
|
108
109
|
});
|
|
109
|
-
const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(columnsProps, {
|
|
110
|
+
const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, resetScrollEdgeState, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(columnsProps, {
|
|
110
111
|
bodyWidthRef,
|
|
111
112
|
mainTableInstRef,
|
|
112
113
|
mergedCurrentPageRef,
|
|
@@ -145,7 +146,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
145
146
|
return props.localStorageKey
|
|
146
147
|
? {
|
|
147
148
|
key: props.localStorageKey,
|
|
148
|
-
columnWidths:
|
|
149
|
+
columnWidths: preferredWidthsRef.value,
|
|
149
150
|
columnsConfig: columnsConfigRef.value,
|
|
150
151
|
page: (_a = mergedPaginationRef.value) === null || _a === void 0 ? void 0 : _a.page,
|
|
151
152
|
pageSize: (_b = mergedPaginationRef.value) === null || _b === void 0 ? void 0 : _b.pageSize,
|
|
@@ -235,23 +236,23 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
235
236
|
systemMaxWidth: props.resizableMaxWidth
|
|
236
237
|
};
|
|
237
238
|
});
|
|
238
|
-
function buildNonFixedModeWidthMap(
|
|
239
|
+
function buildNonFixedModeWidthMap(preferredWidths, resizableColumns) {
|
|
239
240
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
240
241
|
return {
|
|
241
242
|
keys: resizableColumns.map(column => column.key),
|
|
242
243
|
widthMap: (0, utils_1.sanitizeColumnWidthMap)(resizableColumns, {
|
|
243
244
|
systemMinWidth,
|
|
244
245
|
systemMaxWidth,
|
|
245
|
-
source:
|
|
246
|
+
source: preferredWidths
|
|
246
247
|
})
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
|
-
function buildFixedModeWidthMap(visibleLeafColumns,
|
|
250
|
+
function buildFixedModeWidthMap(visibleLeafColumns, sourceWidths) {
|
|
250
251
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
251
252
|
const preferredWidths = (0, utils_1.sanitizeColumnWidthMap)(visibleLeafColumns, {
|
|
252
253
|
systemMinWidth,
|
|
253
254
|
systemMaxWidth,
|
|
254
|
-
source:
|
|
255
|
+
source: sourceWidths
|
|
255
256
|
});
|
|
256
257
|
const containerWidth = containerWidthSignalRef.value;
|
|
257
258
|
if (containerWidth === undefined) {
|
|
@@ -276,20 +277,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
276
277
|
}
|
|
277
278
|
function reconcileResizableWidths(_reason) {
|
|
278
279
|
const visibleLeafColumns = visibleLeafColumnsSignalRef.value;
|
|
279
|
-
const
|
|
280
|
+
const preferredWidths = preferredWidthsRef.value;
|
|
280
281
|
if (!visibleLeafColumns.length || !resizableColumnPresentRef.value) {
|
|
281
|
-
if (Object.keys(
|
|
282
|
-
|
|
282
|
+
if (Object.keys(resizableWidthsRef.value).length) {
|
|
283
|
+
setResizableWidths({});
|
|
283
284
|
}
|
|
284
285
|
return;
|
|
285
286
|
}
|
|
286
287
|
if (modeSignalRef.value !== 'fixed') {
|
|
287
|
-
const { widthMap, keys } = buildNonFixedModeWidthMap(
|
|
288
|
+
const { widthMap, keys } = buildNonFixedModeWidthMap(preferredWidths, resizableColumnsSignalRef.value);
|
|
288
289
|
syncResizableWidths(widthMap, keys);
|
|
289
290
|
return;
|
|
290
291
|
}
|
|
291
292
|
const visibleLeafKeys = visibleLeafColumns.map(column => column.key);
|
|
292
|
-
const nextWidths = buildFixedModeWidthMap(visibleLeafColumns,
|
|
293
|
+
const nextWidths = buildFixedModeWidthMap(visibleLeafColumns, preferredWidths);
|
|
293
294
|
syncResizableWidths(nextWidths, visibleLeafKeys);
|
|
294
295
|
}
|
|
295
296
|
function registerResizableWidthReconcileWatches() {
|
|
@@ -311,7 +312,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
311
312
|
], () => {
|
|
312
313
|
reconcileResizableWidths('environment');
|
|
313
314
|
});
|
|
314
|
-
(0, vue_1.watch)(() =>
|
|
315
|
+
(0, vue_1.watch)(() => preferredWidthsRef.value, () => {
|
|
315
316
|
reconcileResizableWidths('width-state');
|
|
316
317
|
}, { deep: true });
|
|
317
318
|
}
|
|
@@ -562,6 +563,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
562
563
|
var _a;
|
|
563
564
|
(_a = mainTableInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg0, arg1);
|
|
564
565
|
},
|
|
566
|
+
resetScrollEdgeState,
|
|
565
567
|
getData: () => {
|
|
566
568
|
const originalData = props.data || [];
|
|
567
569
|
const totalRowData = autoSummaryRef.value && rawPaginatedDataRef.value
|
|
@@ -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,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TableColumnType = exports.dataTableInjectionKey = exports.dataTableProps = void 0;
|
|
4
4
|
const _mixins_1 = require("../../_mixins");
|
|
5
5
|
const _utils_1 = require("../../_utils");
|
|
6
|
-
var TableColumnType;
|
|
7
|
-
(function (TableColumnType) {
|
|
8
|
-
TableColumnType["SELECTION"] = "selection";
|
|
9
|
-
TableColumnType["EXPAND"] = "expand";
|
|
10
|
-
TableColumnType["DRAGGABLE"] = "draggable";
|
|
11
|
-
})(TableColumnType || (exports.TableColumnType = TableColumnType = {}));
|
|
12
6
|
exports.dataTableProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { onUnstableColumnResize: Function, pagination: {
|
|
13
7
|
type: [Object, Boolean],
|
|
14
8
|
default: false
|
|
@@ -74,7 +68,16 @@ exports.dataTableProps = Object.assign(Object.assign({}, _mixins_1.useTheme.prop
|
|
|
74
68
|
}, columnSettingsTriggerProps: {
|
|
75
69
|
type: Object,
|
|
76
70
|
default: undefined
|
|
77
|
-
}, renderCell: Function, defaultEmptyValue: [String, Function], renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, getCsvCell: Function, getCsvHeader: Function, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function,
|
|
71
|
+
}, renderCell: Function, defaultEmptyValue: [String, Function], renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, getCsvCell: Function, getCsvHeader: Function, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function, onScrollToTop: Function, onScrollToBottom: Function, scrollThreshold: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 5
|
|
74
|
+
},
|
|
78
75
|
// deprecated
|
|
79
76
|
onPageChange: [Function, Array], onPageSizeChange: [Function, Array], onSorterChange: [Function, Array], onFiltersChange: [Function, Array], onCheckedRowKeysChange: [Function, Array] });
|
|
80
77
|
exports.dataTableInjectionKey = (0, _utils_1.createInjectionKey)('u-data-table');
|
|
78
|
+
var TableColumnType;
|
|
79
|
+
(function (TableColumnType) {
|
|
80
|
+
TableColumnType["SELECTION"] = "selection";
|
|
81
|
+
TableColumnType["EXPAND"] = "expand";
|
|
82
|
+
TableColumnType["DRAGGABLE"] = "draggable";
|
|
83
|
+
})(TableColumnType || (exports.TableColumnType = TableColumnType = {}));
|
|
@@ -16,7 +16,12 @@ function isConfigurableColumn(column) {
|
|
|
16
16
|
return column.visible !== false;
|
|
17
17
|
}
|
|
18
18
|
function toColumnTitle(column) {
|
|
19
|
-
|
|
19
|
+
if (column.settingsTitle !== undefined)
|
|
20
|
+
return column.settingsTitle;
|
|
21
|
+
const title = column.title;
|
|
22
|
+
if (typeof title === 'function')
|
|
23
|
+
return () => title(column);
|
|
24
|
+
return title !== null && title !== void 0 ? title : String(column.key);
|
|
20
25
|
}
|
|
21
26
|
function calcColumnsScrollX(columns, getResizableWidth) {
|
|
22
27
|
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
|
};
|