@uzum-tech/ui 1.13.2 → 1.14.1
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 +1848 -1664
- package/dist/index.prod.js +3 -3
- package/es/_mixins/use-css-vars-class.js +5 -3
- package/es/_mixins/use-rtl.js +5 -2
- package/es/_mixins/use-style.js +4 -2
- package/es/_mixins/use-theme.js +4 -2
- package/es/auto-complete/src/AutoComplete.d.ts +70 -0
- package/es/auto-complete/styles/light.d.ts +7 -0
- package/es/chat/src/Chat.d.ts +70 -0
- package/es/chat/src/ChatListItems.d.ts +77 -0
- package/es/chat/src/ChatMessages.d.ts +77 -0
- package/es/chat/src/ChatParts/MainArea.js +47 -54
- package/es/chat/src/ChatParts/Sidebar.d.ts +7 -0
- package/es/chat/src/styles/index.cssr.js +12 -7
- package/es/chat/styles/dark.d.ts +7 -0
- package/es/chat/styles/light.d.ts +7 -0
- package/es/color-picker/src/ColorInputUnit.d.ts +7 -0
- package/es/color-picker/src/ColorPicker.d.ts +63 -0
- package/es/color-picker/styles/light.d.ts +7 -0
- package/es/config-provider/src/ConfigProvider.d.ts +3 -0
- package/es/config-provider/src/ConfigProvider.js +4 -1
- package/es/config-provider/src/internal-interface.d.ts +1 -0
- package/es/data-table/src/DataTable.d.ts +58 -0
- package/es/data-table/src/DataTable.js +71 -4
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +14 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/es/data-table/src/TableParts/Body.d.ts +14 -0
- package/es/data-table/src/TableParts/Body.js +6 -2
- package/es/data-table/src/TableParts/Header.d.ts +14 -0
- package/es/data-table/src/TableParts/Header.js +17 -5
- package/es/data-table/src/interface.d.ts +34 -0
- package/es/data-table/src/interface.js +1 -1
- package/es/data-table/src/use-resizable.d.ts +1 -0
- package/es/data-table/src/use-resizable.js +2 -1
- package/es/data-table/src/use-sorter.d.ts +1 -0
- package/es/data-table/src/use-sorter.js +2 -1
- package/es/data-table/src/use-table-data.d.ts +3 -2
- package/es/data-table/src/use-table-data.js +5 -1
- package/es/data-table/src/use-table-storage.d.ts +4 -0
- package/es/data-table/src/use-table-storage.js +43 -0
- package/es/data-table/src/utils.js +39 -5
- package/es/data-table/styles/light.d.ts +7 -0
- package/es/date-picker/src/DatePicker.d.ts +147 -0
- package/es/date-picker/src/panel/date.d.ts +21 -0
- package/es/date-picker/src/panel/daterange.d.ts +21 -0
- package/es/date-picker/src/panel/datetime.d.ts +21 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +21 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +42 -0
- package/es/date-picker/src/panel/panelMonthContent.d.ts +21 -0
- package/es/date-picker/src/panel/panelYear.d.ts +42 -0
- package/es/date-picker/src/panel/panelYearContent.d.ts +21 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +21 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +21 -0
- package/es/date-picker/styles/light.d.ts +14 -0
- package/es/date-picker-v2/src/DatePickerV2.d.ts +70 -0
- package/es/date-picker-v2/styles/dark.d.ts +7 -0
- package/es/date-picker-v2/styles/light.d.ts +7 -0
- package/es/dynamic-input/src/DynamicInput.d.ts +70 -0
- package/es/dynamic-input/src/InputPreset.d.ts +7 -0
- package/es/dynamic-input/src/PairPreset.d.ts +7 -0
- package/es/dynamic-input/styles/light.d.ts +7 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +70 -0
- package/es/dynamic-tags/styles/light.d.ts +7 -0
- package/es/input/src/Input.d.ts +77 -0
- package/es/input/src/Input.js +9 -1
- package/es/input/src/InputGroupLabel.d.ts +63 -0
- package/es/input/src/styles/input.cssr.js +1 -1
- package/es/input/styles/light.d.ts +7 -0
- package/es/input/styles/light.js +11 -1
- package/es/input-number/src/InputNumber.d.ts +70 -0
- package/es/input-number/styles/light.d.ts +7 -0
- package/es/input-otp/src/InputOtp.d.ts +70 -0
- package/es/input-otp/styles/light.d.ts +7 -0
- package/es/legacy-transfer/src/Transfer.d.ts +70 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +7 -0
- package/es/legacy-transfer/src/TransferList.d.ts +7 -0
- package/es/legacy-transfer/src/TransferListItem.d.ts +7 -0
- package/es/legacy-transfer/styles/light.d.ts +7 -0
- package/es/locales/date/enUS.js +1 -1
- package/es/mention/src/Mention.d.ts +70 -0
- package/es/mention/styles/light.d.ts +7 -0
- package/es/pagination/src/Pagination.d.ts +70 -0
- package/es/pagination/styles/light.d.ts +7 -0
- package/es/time-picker/src/Panel.d.ts +7 -0
- package/es/time-picker/src/TimePicker.d.ts +70 -0
- package/es/time-picker/styles/light.d.ts +7 -0
- package/es/transfer/src/Transfer.d.ts +70 -0
- package/es/transfer/src/TransferFilter.d.ts +7 -0
- package/es/transfer/src/TransferList.d.ts +7 -0
- package/es/transfer/src/TransferListItem.d.ts +7 -0
- package/es/transfer/styles/light.d.ts +7 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_mixins/use-css-vars-class.js +5 -3
- package/lib/_mixins/use-rtl.js +4 -1
- package/lib/_mixins/use-style.js +4 -2
- package/lib/_mixins/use-theme.js +4 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +70 -0
- package/lib/auto-complete/styles/light.d.ts +7 -0
- package/lib/chat/src/Chat.d.ts +70 -0
- package/lib/chat/src/ChatListItems.d.ts +77 -0
- package/lib/chat/src/ChatMessages.d.ts +77 -0
- package/lib/chat/src/ChatParts/MainArea.js +47 -54
- package/lib/chat/src/ChatParts/Sidebar.d.ts +7 -0
- package/lib/chat/src/styles/index.cssr.js +12 -7
- package/lib/chat/styles/dark.d.ts +7 -0
- package/lib/chat/styles/light.d.ts +7 -0
- package/lib/color-picker/src/ColorInputUnit.d.ts +7 -0
- package/lib/color-picker/src/ColorPicker.d.ts +63 -0
- package/lib/color-picker/styles/light.d.ts +7 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +3 -0
- package/lib/config-provider/src/ConfigProvider.js +4 -1
- package/lib/config-provider/src/internal-interface.d.ts +1 -0
- package/lib/data-table/src/DataTable.d.ts +58 -0
- package/lib/data-table/src/DataTable.js +70 -3
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +14 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/lib/data-table/src/TableParts/Body.d.ts +14 -0
- package/lib/data-table/src/TableParts/Body.js +6 -2
- package/lib/data-table/src/TableParts/Header.d.ts +14 -0
- package/lib/data-table/src/TableParts/Header.js +16 -4
- package/lib/data-table/src/interface.d.ts +34 -0
- package/lib/data-table/src/interface.js +1 -1
- package/lib/data-table/src/use-resizable.d.ts +1 -0
- package/lib/data-table/src/use-resizable.js +2 -1
- package/lib/data-table/src/use-sorter.d.ts +1 -0
- package/lib/data-table/src/use-sorter.js +2 -1
- package/lib/data-table/src/use-table-data.d.ts +3 -2
- package/lib/data-table/src/use-table-data.js +5 -1
- package/lib/data-table/src/use-table-storage.d.ts +4 -0
- package/lib/data-table/src/use-table-storage.js +48 -0
- package/lib/data-table/src/utils.js +39 -5
- package/lib/data-table/styles/light.d.ts +7 -0
- package/lib/date-picker/src/DatePicker.d.ts +147 -0
- package/lib/date-picker/src/panel/date.d.ts +21 -0
- package/lib/date-picker/src/panel/daterange.d.ts +21 -0
- package/lib/date-picker/src/panel/datetime.d.ts +21 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +21 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +42 -0
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +21 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +42 -0
- package/lib/date-picker/src/panel/panelYearContent.d.ts +21 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +21 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -0
- package/lib/date-picker/styles/light.d.ts +14 -0
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +70 -0
- package/lib/date-picker-v2/styles/dark.d.ts +7 -0
- package/lib/date-picker-v2/styles/light.d.ts +7 -0
- package/lib/dynamic-input/src/DynamicInput.d.ts +70 -0
- package/lib/dynamic-input/src/InputPreset.d.ts +7 -0
- package/lib/dynamic-input/src/PairPreset.d.ts +7 -0
- package/lib/dynamic-input/styles/light.d.ts +7 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +70 -0
- package/lib/dynamic-tags/styles/light.d.ts +7 -0
- package/lib/input/src/Input.d.ts +77 -0
- package/lib/input/src/Input.js +9 -1
- package/lib/input/src/InputGroupLabel.d.ts +63 -0
- package/lib/input/src/styles/input.cssr.js +1 -1
- package/lib/input/styles/light.d.ts +7 -0
- package/lib/input/styles/light.js +11 -1
- package/lib/input-number/src/InputNumber.d.ts +70 -0
- package/lib/input-number/styles/light.d.ts +7 -0
- package/lib/input-otp/src/InputOtp.d.ts +70 -0
- package/lib/input-otp/styles/light.d.ts +7 -0
- package/lib/legacy-transfer/src/Transfer.d.ts +70 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +7 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +7 -0
- package/lib/legacy-transfer/src/TransferListItem.d.ts +7 -0
- package/lib/legacy-transfer/styles/light.d.ts +7 -0
- package/lib/locales/date/enUS.js +2 -2
- package/lib/mention/src/Mention.d.ts +70 -0
- package/lib/mention/styles/light.d.ts +7 -0
- package/lib/pagination/src/Pagination.d.ts +70 -0
- package/lib/pagination/styles/light.d.ts +7 -0
- package/lib/time-picker/src/Panel.d.ts +7 -0
- package/lib/time-picker/src/TimePicker.d.ts +70 -0
- package/lib/time-picker/styles/light.d.ts +7 -0
- package/lib/transfer/src/Transfer.d.ts +70 -0
- package/lib/transfer/src/TransferFilter.d.ts +7 -0
- package/lib/transfer/src/TransferList.d.ts +7 -0
- package/lib/transfer/src/TransferListItem.d.ts +7 -0
- package/lib/transfer/styles/light.d.ts +7 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +18 -1
|
@@ -36,6 +36,7 @@ export declare const configProviderProps: {
|
|
|
36
36
|
readonly default: "desktop-first";
|
|
37
37
|
};
|
|
38
38
|
readonly preflightStyleDisabled: BooleanConstructor;
|
|
39
|
+
readonly styleMountTarget: PropType<ParentNode | null>;
|
|
39
40
|
readonly inlineThemeDisabled: {
|
|
40
41
|
readonly type: BooleanConstructor;
|
|
41
42
|
readonly default: undefined;
|
|
@@ -79,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
80
|
readonly default: "desktop-first";
|
|
80
81
|
};
|
|
81
82
|
readonly preflightStyleDisabled: BooleanConstructor;
|
|
83
|
+
readonly styleMountTarget: PropType<ParentNode | null>;
|
|
82
84
|
readonly inlineThemeDisabled: {
|
|
83
85
|
readonly type: BooleanConstructor;
|
|
84
86
|
readonly default: undefined;
|
|
@@ -126,6 +128,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
128
|
readonly default: "desktop-first";
|
|
127
129
|
};
|
|
128
130
|
readonly preflightStyleDisabled: BooleanConstructor;
|
|
131
|
+
readonly styleMountTarget: PropType<ParentNode | null>;
|
|
129
132
|
readonly inlineThemeDisabled: {
|
|
130
133
|
readonly type: BooleanConstructor;
|
|
131
134
|
readonly default: undefined;
|
|
@@ -37,6 +37,7 @@ exports.configProviderProps = {
|
|
|
37
37
|
default: 'desktop-first'
|
|
38
38
|
},
|
|
39
39
|
preflightStyleDisabled: Boolean,
|
|
40
|
+
styleMountTarget: Object,
|
|
40
41
|
inlineThemeDisabled: {
|
|
41
42
|
type: Boolean,
|
|
42
43
|
default: undefined
|
|
@@ -246,6 +247,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
246
247
|
});
|
|
247
248
|
const inlineThemeDisabled = props.inlineThemeDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.inlineThemeDisabled);
|
|
248
249
|
const preflightStyleDisabled = props.preflightStyleDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.preflightStyleDisabled);
|
|
250
|
+
const styleMountTarget = props.styleMountTarget || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.styleMountTarget);
|
|
249
251
|
const mergedThemeHashRef = (0, vue_1.computed)(() => {
|
|
250
252
|
const { value: theme } = mergedThemeRef;
|
|
251
253
|
const { value: mergedThemeOverrides } = mergedThemeOverridesRef;
|
|
@@ -307,7 +309,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
307
309
|
mergedThemeRef,
|
|
308
310
|
mergedThemeOverridesRef,
|
|
309
311
|
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
310
|
-
preflightStyleDisabled: preflightStyleDisabled || false
|
|
312
|
+
preflightStyleDisabled: preflightStyleDisabled || false,
|
|
313
|
+
styleMountTarget
|
|
311
314
|
});
|
|
312
315
|
return {
|
|
313
316
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
85
|
readonly default: "current";
|
|
86
86
|
};
|
|
87
87
|
readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
|
|
88
|
+
readonly localStorageKey: StringConstructor;
|
|
88
89
|
readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
|
|
89
90
|
readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
|
|
90
91
|
readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
|
|
@@ -801,6 +802,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
801
802
|
borderFocus: string;
|
|
802
803
|
boxShadowFocus: string;
|
|
803
804
|
loadingColor: string;
|
|
805
|
+
loadingColorSuccess: string;
|
|
806
|
+
borderSuccess: string;
|
|
807
|
+
borderHoverSuccess: string;
|
|
808
|
+
colorFocusSuccess: string;
|
|
809
|
+
borderFocusSuccess: string;
|
|
810
|
+
boxShadowFocusSuccess: string;
|
|
811
|
+
caretColorSuccess: string;
|
|
804
812
|
loadingColorWarning: string;
|
|
805
813
|
borderWarning: string;
|
|
806
814
|
borderHoverWarning: string;
|
|
@@ -1749,6 +1757,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1749
1757
|
borderFocus: string;
|
|
1750
1758
|
boxShadowFocus: string;
|
|
1751
1759
|
loadingColor: string;
|
|
1760
|
+
loadingColorSuccess: string;
|
|
1761
|
+
borderSuccess: string;
|
|
1762
|
+
borderHoverSuccess: string;
|
|
1763
|
+
colorFocusSuccess: string;
|
|
1764
|
+
borderFocusSuccess: string;
|
|
1765
|
+
boxShadowFocusSuccess: string;
|
|
1766
|
+
caretColorSuccess: string;
|
|
1752
1767
|
loadingColorWarning: string;
|
|
1753
1768
|
borderWarning: string;
|
|
1754
1769
|
borderHoverWarning: string;
|
|
@@ -2697,6 +2712,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2697
2712
|
borderFocus: string;
|
|
2698
2713
|
boxShadowFocus: string;
|
|
2699
2714
|
loadingColor: string;
|
|
2715
|
+
loadingColorSuccess: string;
|
|
2716
|
+
borderSuccess: string;
|
|
2717
|
+
borderHoverSuccess: string;
|
|
2718
|
+
colorFocusSuccess: string;
|
|
2719
|
+
borderFocusSuccess: string;
|
|
2720
|
+
boxShadowFocusSuccess: string;
|
|
2721
|
+
caretColorSuccess: string;
|
|
2700
2722
|
loadingColorWarning: string;
|
|
2701
2723
|
borderWarning: string;
|
|
2702
2724
|
borderHoverWarning: string;
|
|
@@ -3668,6 +3690,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3668
3690
|
borderFocus: string;
|
|
3669
3691
|
boxShadowFocus: string;
|
|
3670
3692
|
loadingColor: string;
|
|
3693
|
+
loadingColorSuccess: string;
|
|
3694
|
+
borderSuccess: string;
|
|
3695
|
+
borderHoverSuccess: string;
|
|
3696
|
+
colorFocusSuccess: string;
|
|
3697
|
+
borderFocusSuccess: string;
|
|
3698
|
+
boxShadowFocusSuccess: string;
|
|
3699
|
+
caretColorSuccess: string;
|
|
3671
3700
|
loadingColorWarning: string;
|
|
3672
3701
|
borderWarning: string;
|
|
3673
3702
|
borderHoverWarning: string;
|
|
@@ -4177,6 +4206,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4177
4206
|
borderFocus: string;
|
|
4178
4207
|
boxShadowFocus: string;
|
|
4179
4208
|
loadingColor: string;
|
|
4209
|
+
loadingColorSuccess: string;
|
|
4210
|
+
borderSuccess: string;
|
|
4211
|
+
borderHoverSuccess: string;
|
|
4212
|
+
colorFocusSuccess: string;
|
|
4213
|
+
borderFocusSuccess: string;
|
|
4214
|
+
boxShadowFocusSuccess: string;
|
|
4215
|
+
caretColorSuccess: string;
|
|
4180
4216
|
loadingColorWarning: string;
|
|
4181
4217
|
borderWarning: string;
|
|
4182
4218
|
borderHoverWarning: string;
|
|
@@ -4498,6 +4534,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4498
4534
|
readonly default: "current";
|
|
4499
4535
|
};
|
|
4500
4536
|
readonly scrollbarProps: import("vue").PropType<import("../..").ScrollbarProps>;
|
|
4537
|
+
readonly localStorageKey: StringConstructor;
|
|
4501
4538
|
readonly renderCell: import("vue").PropType<(value: any, rowData: object, column: TableBaseColumn) => import("vue").VNodeChild>;
|
|
4502
4539
|
readonly defaultEmptyValue: import("vue").PropType<string | (() => import("vue").VNodeChild) | undefined>;
|
|
4503
4540
|
readonly renderExpandIcon: import("vue").PropType<import("./interface").RenderExpandIcon>;
|
|
@@ -5214,6 +5251,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5214
5251
|
borderFocus: string;
|
|
5215
5252
|
boxShadowFocus: string;
|
|
5216
5253
|
loadingColor: string;
|
|
5254
|
+
loadingColorSuccess: string;
|
|
5255
|
+
borderSuccess: string;
|
|
5256
|
+
borderHoverSuccess: string;
|
|
5257
|
+
colorFocusSuccess: string;
|
|
5258
|
+
borderFocusSuccess: string;
|
|
5259
|
+
boxShadowFocusSuccess: string;
|
|
5260
|
+
caretColorSuccess: string;
|
|
5217
5261
|
loadingColorWarning: string;
|
|
5218
5262
|
borderWarning: string;
|
|
5219
5263
|
borderHoverWarning: string;
|
|
@@ -6162,6 +6206,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6162
6206
|
borderFocus: string;
|
|
6163
6207
|
boxShadowFocus: string;
|
|
6164
6208
|
loadingColor: string;
|
|
6209
|
+
loadingColorSuccess: string;
|
|
6210
|
+
borderSuccess: string;
|
|
6211
|
+
borderHoverSuccess: string;
|
|
6212
|
+
colorFocusSuccess: string;
|
|
6213
|
+
borderFocusSuccess: string;
|
|
6214
|
+
boxShadowFocusSuccess: string;
|
|
6215
|
+
caretColorSuccess: string;
|
|
6165
6216
|
loadingColorWarning: string;
|
|
6166
6217
|
borderWarning: string;
|
|
6167
6218
|
borderHoverWarning: string;
|
|
@@ -7110,6 +7161,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7110
7161
|
borderFocus: string;
|
|
7111
7162
|
boxShadowFocus: string;
|
|
7112
7163
|
loadingColor: string;
|
|
7164
|
+
loadingColorSuccess: string;
|
|
7165
|
+
borderSuccess: string;
|
|
7166
|
+
borderHoverSuccess: string;
|
|
7167
|
+
colorFocusSuccess: string;
|
|
7168
|
+
borderFocusSuccess: string;
|
|
7169
|
+
boxShadowFocusSuccess: string;
|
|
7170
|
+
caretColorSuccess: string;
|
|
7113
7171
|
loadingColorWarning: string;
|
|
7114
7172
|
borderWarning: string;
|
|
7115
7173
|
borderHoverWarning: string;
|
|
@@ -18,6 +18,7 @@ const use_resizable_1 = require("./use-resizable");
|
|
|
18
18
|
const interface_1 = require("./interface");
|
|
19
19
|
const use_group_header_1 = require("./use-group-header");
|
|
20
20
|
const use_expand_1 = require("./use-expand");
|
|
21
|
+
const use_table_storage_1 = require("./use-table-storage");
|
|
21
22
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
22
23
|
exports.default = (0, vue_1.defineComponent)({
|
|
23
24
|
name: 'DataTable',
|
|
@@ -58,10 +59,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
59
|
const themeRef = (0, _mixins_1.useTheme)('DataTable', '-data-table', index_cssr_1.default, styles_1.dataTableLight, props, mergedClsPrefixRef);
|
|
59
60
|
const bodyWidthRef = (0, vue_1.ref)(null);
|
|
60
61
|
const mainTableInstRef = (0, vue_1.ref)(null);
|
|
61
|
-
const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth } = (0, use_resizable_1.useResizable)();
|
|
62
|
+
const { getResizableWidth, clearResizableWidth, doUpdateResizableWidth, resizableWidthsRef } = (0, use_resizable_1.useResizable)();
|
|
62
63
|
const { rowsRef, colsRef, dataRelatedColsRef, hasEllipsisRef } = (0, use_group_header_1.useGroupHeader)(props, getResizableWidth);
|
|
63
|
-
const { treeMateRef, mergedCurrentPageRef, paginatedDataRef, rawPaginatedDataRef, selectionColumnRef, hoverKeyRef, mergedPaginationRef, mergedFilterStateRef, mergedSortStateRef, childTriggerColIndexRef, doUpdatePage, doUpdateFilters, onUnstableColumnResize, deriveNextSorter, filter, filters, clearFilter, clearFilters, clearSorter, page, sort } = (0, use_table_data_1.useTableData)(props, { dataRelatedColsRef });
|
|
64
|
-
const { doCheckAll, doUncheckAll, doCheck, doUncheck, headerCheckboxDisabledRef, someRowsCheckedRef, allRowsCheckedRef, mergedCheckedRowKeySetRef, mergedInderminateRowKeySetRef } = (0, use_check_1.useCheck)(props, {
|
|
64
|
+
const { treeMateRef, mergedCurrentPageRef, paginatedDataRef, rawPaginatedDataRef, selectionColumnRef, hoverKeyRef, mergedPaginationRef, mergedFilterStateRef, mergedSortStateRef, childTriggerColIndexRef, doUpdatePage, doUpdatePageSize, doUpdateFilters, onUnstableColumnResize, deriveNextSorter, restoreSortState, filter, filters, clearFilter, clearFilters, clearSorter, page, sort } = (0, use_table_data_1.useTableData)(props, { dataRelatedColsRef });
|
|
65
|
+
const { doCheckAll, doUncheckAll, doCheck, doUncheck, doUpdateCheckedRowKeys, mergedCheckedRowKeysRef, headerCheckboxDisabledRef, someRowsCheckedRef, allRowsCheckedRef, mergedCheckedRowKeySetRef, mergedInderminateRowKeySetRef } = (0, use_check_1.useCheck)(props, {
|
|
65
66
|
selectionColumnRef,
|
|
66
67
|
treeMateRef,
|
|
67
68
|
paginatedDataRef
|
|
@@ -72,6 +73,72 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
72
73
|
mainTableInstRef,
|
|
73
74
|
mergedCurrentPageRef
|
|
74
75
|
});
|
|
76
|
+
(0, vue_1.onMounted)(() => {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const key = props.localStorageKey;
|
|
79
|
+
if (!key)
|
|
80
|
+
return;
|
|
81
|
+
const stored = (0, use_table_storage_1.loadTableState)(key);
|
|
82
|
+
if (!stored)
|
|
83
|
+
return;
|
|
84
|
+
if (stored.columnWidths && Object.keys(stored.columnWidths).length > 0) {
|
|
85
|
+
resizableWidthsRef.value = Object.assign(Object.assign({}, resizableWidthsRef.value), stored.columnWidths);
|
|
86
|
+
}
|
|
87
|
+
if (props.pagination && stored.page != null) {
|
|
88
|
+
doUpdatePage(stored.page);
|
|
89
|
+
}
|
|
90
|
+
if (props.pagination && stored.pageSize != null) {
|
|
91
|
+
doUpdatePageSize(stored.pageSize);
|
|
92
|
+
}
|
|
93
|
+
if (stored.filters) {
|
|
94
|
+
filter(stored.filters);
|
|
95
|
+
}
|
|
96
|
+
const sortToRestore = (0, use_table_storage_1.restoreSortStateFromStored)(stored.sortState, dataRelatedColsRef.value);
|
|
97
|
+
if (sortToRestore === null || sortToRestore === void 0 ? void 0 : sortToRestore.length) {
|
|
98
|
+
restoreSortState(sortToRestore);
|
|
99
|
+
}
|
|
100
|
+
if ((_a = stored.checkedRowKeys) === null || _a === void 0 ? void 0 : _a.length) {
|
|
101
|
+
doUpdateCheckedRowKeys(stored.checkedRowKeys, undefined, 'check');
|
|
102
|
+
}
|
|
103
|
+
if ((_b = stored.expandedRowKeys) === null || _b === void 0 ? void 0 : _b.length) {
|
|
104
|
+
doUpdateExpandedRowKeys(stored.expandedRowKeys);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
(0, vue_1.watch)(() => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
return props.localStorageKey
|
|
110
|
+
? {
|
|
111
|
+
key: props.localStorageKey,
|
|
112
|
+
columnWidths: resizableWidthsRef.value,
|
|
113
|
+
page: (_a = mergedPaginationRef.value) === null || _a === void 0 ? void 0 : _a.page,
|
|
114
|
+
pageSize: (_b = mergedPaginationRef.value) === null || _b === void 0 ? void 0 : _b.pageSize,
|
|
115
|
+
filters: mergedFilterStateRef.value,
|
|
116
|
+
sortState: mergedSortStateRef.value.map((s) => ({
|
|
117
|
+
columnKey: s.columnKey,
|
|
118
|
+
order: s.order
|
|
119
|
+
})),
|
|
120
|
+
checkedRowKeys: mergedCheckedRowKeysRef.value,
|
|
121
|
+
expandedRowKeys: mergedExpandedRowKeysRef.value
|
|
122
|
+
}
|
|
123
|
+
: null;
|
|
124
|
+
}, (state) => {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
if (!(state === null || state === void 0 ? void 0 : state.key))
|
|
127
|
+
return;
|
|
128
|
+
(0, use_table_storage_1.saveTableState)(state.key, {
|
|
129
|
+
columnWidths: state.columnWidths,
|
|
130
|
+
page: state.page,
|
|
131
|
+
pageSize: state.pageSize,
|
|
132
|
+
filters: state.filters,
|
|
133
|
+
sortState: state.sortState.length ? state.sortState : undefined,
|
|
134
|
+
checkedRowKeys: ((_a = state.checkedRowKeys) === null || _a === void 0 ? void 0 : _a.length)
|
|
135
|
+
? state.checkedRowKeys
|
|
136
|
+
: undefined,
|
|
137
|
+
expandedRowKeys: ((_b = state.expandedRowKeys) === null || _b === void 0 ? void 0 : _b.length)
|
|
138
|
+
? state.expandedRowKeys
|
|
139
|
+
: undefined
|
|
140
|
+
});
|
|
141
|
+
}, { deep: true });
|
|
75
142
|
const { localeRef } = (0, _mixins_1.useLocale)('DataTable');
|
|
76
143
|
const mergedTableLayoutRef = (0, vue_1.computed)(() => {
|
|
77
144
|
// Layout
|
|
@@ -702,6 +702,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
702
702
|
borderFocus: string;
|
|
703
703
|
boxShadowFocus: string;
|
|
704
704
|
loadingColor: string;
|
|
705
|
+
loadingColorSuccess: string;
|
|
706
|
+
borderSuccess: string;
|
|
707
|
+
borderHoverSuccess: string;
|
|
708
|
+
colorFocusSuccess: string;
|
|
709
|
+
borderFocusSuccess: string;
|
|
710
|
+
boxShadowFocusSuccess: string;
|
|
711
|
+
caretColorSuccess: string;
|
|
705
712
|
loadingColorWarning: string;
|
|
706
713
|
borderWarning: string;
|
|
707
714
|
borderHoverWarning: string;
|
|
@@ -1211,6 +1218,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1211
1218
|
borderFocus: string;
|
|
1212
1219
|
boxShadowFocus: string;
|
|
1213
1220
|
loadingColor: string;
|
|
1221
|
+
loadingColorSuccess: string;
|
|
1222
|
+
borderSuccess: string;
|
|
1223
|
+
borderHoverSuccess: string;
|
|
1224
|
+
colorFocusSuccess: string;
|
|
1225
|
+
borderFocusSuccess: string;
|
|
1226
|
+
boxShadowFocusSuccess: string;
|
|
1227
|
+
caretColorSuccess: string;
|
|
1214
1228
|
loadingColorWarning: string;
|
|
1215
1229
|
borderWarning: string;
|
|
1216
1230
|
borderHoverWarning: string;
|
|
@@ -727,6 +727,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
727
727
|
borderFocus: string;
|
|
728
728
|
boxShadowFocus: string;
|
|
729
729
|
loadingColor: string;
|
|
730
|
+
loadingColorSuccess: string;
|
|
731
|
+
borderSuccess: string;
|
|
732
|
+
borderHoverSuccess: string;
|
|
733
|
+
colorFocusSuccess: string;
|
|
734
|
+
borderFocusSuccess: string;
|
|
735
|
+
boxShadowFocusSuccess: string;
|
|
736
|
+
caretColorSuccess: string;
|
|
730
737
|
loadingColorWarning: string;
|
|
731
738
|
borderWarning: string;
|
|
732
739
|
borderHoverWarning: string;
|
|
@@ -1236,6 +1243,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1236
1243
|
borderFocus: string;
|
|
1237
1244
|
boxShadowFocus: string;
|
|
1238
1245
|
loadingColor: string;
|
|
1246
|
+
loadingColorSuccess: string;
|
|
1247
|
+
borderSuccess: string;
|
|
1248
|
+
borderHoverSuccess: string;
|
|
1249
|
+
colorFocusSuccess: string;
|
|
1250
|
+
borderFocusSuccess: string;
|
|
1251
|
+
boxShadowFocusSuccess: string;
|
|
1252
|
+
caretColorSuccess: string;
|
|
1239
1253
|
loadingColorWarning: string;
|
|
1240
1254
|
borderWarning: string;
|
|
1241
1255
|
borderHoverWarning: string;
|
|
@@ -728,6 +728,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
728
728
|
borderFocus: string;
|
|
729
729
|
boxShadowFocus: string;
|
|
730
730
|
loadingColor: string;
|
|
731
|
+
loadingColorSuccess: string;
|
|
732
|
+
borderSuccess: string;
|
|
733
|
+
borderHoverSuccess: string;
|
|
734
|
+
colorFocusSuccess: string;
|
|
735
|
+
borderFocusSuccess: string;
|
|
736
|
+
boxShadowFocusSuccess: string;
|
|
737
|
+
caretColorSuccess: string;
|
|
731
738
|
loadingColorWarning: string;
|
|
732
739
|
borderWarning: string;
|
|
733
740
|
borderHoverWarning: string;
|
|
@@ -1237,6 +1244,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1237
1244
|
borderFocus: string;
|
|
1238
1245
|
boxShadowFocus: string;
|
|
1239
1246
|
loadingColor: string;
|
|
1247
|
+
loadingColorSuccess: string;
|
|
1248
|
+
borderSuccess: string;
|
|
1249
|
+
borderHoverSuccess: string;
|
|
1250
|
+
colorFocusSuccess: string;
|
|
1251
|
+
borderFocusSuccess: string;
|
|
1252
|
+
boxShadowFocusSuccess: string;
|
|
1253
|
+
caretColorSuccess: string;
|
|
1240
1254
|
loadingColorWarning: string;
|
|
1241
1255
|
borderWarning: string;
|
|
1242
1256
|
borderHoverWarning: string;
|
|
@@ -20,6 +20,7 @@ const seemly_1 = require("seemly");
|
|
|
20
20
|
const vueuc_1 = require("vueuc");
|
|
21
21
|
const vooks_1 = require("vooks");
|
|
22
22
|
const common_1 = require("../../../_mixins/common");
|
|
23
|
+
const context_1 = require("../../../config-provider/src/context");
|
|
23
24
|
const cssr_1 = require("../../../_utils/cssr");
|
|
24
25
|
const _internal_1 = require("../../../_internal");
|
|
25
26
|
const _utils_1 = require("../../../_utils");
|
|
@@ -102,6 +103,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
102
103
|
const { slots: dataTableSlots, bodyWidthRef, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, mergedTableLayoutRef, childTriggerColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, loadingSkeletonRef, onLoadRef, loadingKeySetRef, expandableRef, stickyExpandedRowsRef, renderExpandIconRef, summaryPlacementRef, treeMateRef, scrollbarPropsRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck, renderCell, defaultEmptyValueRef, emptyPropsRef
|
|
103
104
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
104
105
|
} = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
|
|
106
|
+
const UConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
105
107
|
const scrollbarInstRef = (0, vue_1.ref)(null);
|
|
106
108
|
const virtualListRef = (0, vue_1.ref)(null);
|
|
107
109
|
const emptyElRef = (0, vue_1.ref)(null);
|
|
@@ -296,13 +298,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
296
298
|
id: `u-${componentId}`,
|
|
297
299
|
force: true,
|
|
298
300
|
props: cProps,
|
|
299
|
-
anchorMetaName: common_1.cssrAnchorMetaName
|
|
301
|
+
anchorMetaName: common_1.cssrAnchorMetaName,
|
|
302
|
+
parent: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.styleMountTarget
|
|
300
303
|
});
|
|
301
304
|
fixedStyleMounted = true;
|
|
302
305
|
});
|
|
303
306
|
(0, vue_1.onUnmounted)(() => {
|
|
304
307
|
style.unmount({
|
|
305
|
-
id: `u-${componentId}
|
|
308
|
+
id: `u-${componentId}`,
|
|
309
|
+
parent: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.styleMountTarget
|
|
306
310
|
});
|
|
307
311
|
});
|
|
308
312
|
return Object.assign({ bodyWidth: bodyWidthRef, summaryPlacement: summaryPlacementRef, dataTableSlots,
|
|
@@ -715,6 +715,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
715
715
|
borderFocus: string;
|
|
716
716
|
boxShadowFocus: string;
|
|
717
717
|
loadingColor: string;
|
|
718
|
+
loadingColorSuccess: string;
|
|
719
|
+
borderSuccess: string;
|
|
720
|
+
borderHoverSuccess: string;
|
|
721
|
+
colorFocusSuccess: string;
|
|
722
|
+
borderFocusSuccess: string;
|
|
723
|
+
boxShadowFocusSuccess: string;
|
|
724
|
+
caretColorSuccess: string;
|
|
718
725
|
loadingColorWarning: string;
|
|
719
726
|
borderWarning: string;
|
|
720
727
|
borderHoverWarning: string;
|
|
@@ -1224,6 +1231,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1224
1231
|
borderFocus: string;
|
|
1225
1232
|
boxShadowFocus: string;
|
|
1226
1233
|
loadingColor: string;
|
|
1234
|
+
loadingColorSuccess: string;
|
|
1235
|
+
borderSuccess: string;
|
|
1236
|
+
borderHoverSuccess: string;
|
|
1237
|
+
colorFocusSuccess: string;
|
|
1238
|
+
borderFocusSuccess: string;
|
|
1239
|
+
boxShadowFocusSuccess: string;
|
|
1240
|
+
caretColorSuccess: string;
|
|
1227
1241
|
loadingColorWarning: string;
|
|
1228
1242
|
borderWarning: string;
|
|
1229
1243
|
borderHoverWarning: string;
|
|
@@ -28,7 +28,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
setup() {
|
|
31
|
-
const { mergedClsPrefixRef, scrollXRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, allRowsCheckedRef, someRowsCheckedRef, rowsRef, colsRef, mergedThemeRef, checkOptionsRef, mergedSortStateRef, componentId, mergedTableLayoutRef, headerCheckboxDisabledRef, sizeRef, onUnstableColumnResize, doUpdateResizableWidth, handleTableHeaderScroll, deriveNextSorter, doUncheckAll, doCheckAll
|
|
31
|
+
const { mergedClsPrefixRef, scrollXRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, allRowsCheckedRef, someRowsCheckedRef, rowsRef, colsRef, mergedThemeRef, checkOptionsRef, mergedSortStateRef, componentId, mergedTableLayoutRef, headerCheckboxDisabledRef, sizeRef, onUnstableColumnResize, getResizableWidth, doUpdateResizableWidth, handleTableHeaderScroll, deriveNextSorter, doUncheckAll, doCheckAll
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
33
33
|
} = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
|
|
34
34
|
const cellElsRef = (0, vue_1.ref)({});
|
|
@@ -56,13 +56,25 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
56
56
|
deriveNextSorter(nextSorter);
|
|
57
57
|
}
|
|
58
58
|
const resizeStartWidthMap = new Map();
|
|
59
|
+
function getColumnStartWidth(column) {
|
|
60
|
+
const actual = getCellActualWidth(column.key);
|
|
61
|
+
if (actual !== undefined && actual > 0)
|
|
62
|
+
return actual;
|
|
63
|
+
const resized = getResizableWidth(column.key);
|
|
64
|
+
if (resized !== undefined && resized > 0)
|
|
65
|
+
return resized;
|
|
66
|
+
return (0, utils_1.getNumberColWidth)(column);
|
|
67
|
+
}
|
|
59
68
|
function handleColumnResizeStart(column) {
|
|
60
|
-
resizeStartWidthMap.set(column.key,
|
|
69
|
+
resizeStartWidthMap.set(column.key, getColumnStartWidth(column));
|
|
61
70
|
}
|
|
62
71
|
function handleColumnResize(column, displacementX) {
|
|
63
|
-
|
|
72
|
+
let startWidth = resizeStartWidthMap.get(column.key);
|
|
64
73
|
if (startWidth === undefined) {
|
|
65
|
-
|
|
74
|
+
startWidth = getColumnStartWidth(column);
|
|
75
|
+
if (startWidth === undefined)
|
|
76
|
+
return;
|
|
77
|
+
resizeStartWidthMap.set(column.key, startWidth);
|
|
66
78
|
}
|
|
67
79
|
const widthAfterResize = startWidth + displacementX;
|
|
68
80
|
const limitWidth = (0, utils_1.clampValueFollowCSSRules)(widthAfterResize, column.minWidth, column.maxWidth);
|
|
@@ -96,6 +96,7 @@ export declare const dataTableProps: {
|
|
|
96
96
|
readonly default: "current";
|
|
97
97
|
};
|
|
98
98
|
readonly scrollbarProps: PropType<ScrollbarProps>;
|
|
99
|
+
readonly localStorageKey: StringConstructor;
|
|
99
100
|
readonly renderCell: PropType<(value: any, rowData: object, column: TableBaseColumn) => VNodeChild>;
|
|
100
101
|
readonly defaultEmptyValue: PropType<string | (() => VNodeChild) | undefined>;
|
|
101
102
|
readonly renderExpandIcon: PropType<RenderExpandIcon>;
|
|
@@ -812,6 +813,13 @@ export declare const dataTableProps: {
|
|
|
812
813
|
borderFocus: string;
|
|
813
814
|
boxShadowFocus: string;
|
|
814
815
|
loadingColor: string;
|
|
816
|
+
loadingColorSuccess: string;
|
|
817
|
+
borderSuccess: string;
|
|
818
|
+
borderHoverSuccess: string;
|
|
819
|
+
colorFocusSuccess: string;
|
|
820
|
+
borderFocusSuccess: string;
|
|
821
|
+
boxShadowFocusSuccess: string;
|
|
822
|
+
caretColorSuccess: string;
|
|
815
823
|
loadingColorWarning: string;
|
|
816
824
|
borderWarning: string;
|
|
817
825
|
borderHoverWarning: string;
|
|
@@ -1760,6 +1768,13 @@ export declare const dataTableProps: {
|
|
|
1760
1768
|
borderFocus: string;
|
|
1761
1769
|
boxShadowFocus: string;
|
|
1762
1770
|
loadingColor: string;
|
|
1771
|
+
loadingColorSuccess: string;
|
|
1772
|
+
borderSuccess: string;
|
|
1773
|
+
borderHoverSuccess: string;
|
|
1774
|
+
colorFocusSuccess: string;
|
|
1775
|
+
borderFocusSuccess: string;
|
|
1776
|
+
boxShadowFocusSuccess: string;
|
|
1777
|
+
caretColorSuccess: string;
|
|
1763
1778
|
loadingColorWarning: string;
|
|
1764
1779
|
borderWarning: string;
|
|
1765
1780
|
borderHoverWarning: string;
|
|
@@ -2708,6 +2723,13 @@ export declare const dataTableProps: {
|
|
|
2708
2723
|
borderFocus: string;
|
|
2709
2724
|
boxShadowFocus: string;
|
|
2710
2725
|
loadingColor: string;
|
|
2726
|
+
loadingColorSuccess: string;
|
|
2727
|
+
borderSuccess: string;
|
|
2728
|
+
borderHoverSuccess: string;
|
|
2729
|
+
colorFocusSuccess: string;
|
|
2730
|
+
borderFocusSuccess: string;
|
|
2731
|
+
boxShadowFocusSuccess: string;
|
|
2732
|
+
caretColorSuccess: string;
|
|
2711
2733
|
loadingColorWarning: string;
|
|
2712
2734
|
borderWarning: string;
|
|
2713
2735
|
borderHoverWarning: string;
|
|
@@ -3185,6 +3207,18 @@ export interface MainTableInjection {
|
|
|
3185
3207
|
leftActiveFixedColKey: ColumnKey | null;
|
|
3186
3208
|
rightActiveFixedColKey: ColumnKey | null;
|
|
3187
3209
|
}
|
|
3210
|
+
export interface DataTableStorageState {
|
|
3211
|
+
columnWidths?: Record<string, number>;
|
|
3212
|
+
page?: number;
|
|
3213
|
+
pageSize?: number;
|
|
3214
|
+
filters?: FilterState;
|
|
3215
|
+
sortState?: Array<{
|
|
3216
|
+
columnKey: ColumnKey;
|
|
3217
|
+
order: SortState['order'];
|
|
3218
|
+
}>;
|
|
3219
|
+
checkedRowKeys?: RowKey[];
|
|
3220
|
+
expandedRowKeys?: RowKey[];
|
|
3221
|
+
}
|
|
3188
3222
|
export type RenderFilter = (props: {
|
|
3189
3223
|
active: boolean;
|
|
3190
3224
|
show: boolean;
|
|
@@ -53,7 +53,7 @@ exports.dataTableProps = Object.assign(Object.assign({}, _mixins_1.useTheme.prop
|
|
|
53
53
|
}, paginationBehaviorOnFilter: {
|
|
54
54
|
type: String,
|
|
55
55
|
default: 'current'
|
|
56
|
-
}, scrollbarProps: Object, renderCell: Function, defaultEmptyValue: [String, Function], renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, 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,
|
|
56
|
+
}, scrollbarProps: Object, localStorageKey: String, renderCell: Function, defaultEmptyValue: [String, Function], renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, 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,
|
|
57
57
|
// deprecated
|
|
58
58
|
onPageChange: [Function, Array], onPageSizeChange: [Function, Array], onSorterChange: [Function, Array], onFiltersChange: [Function, Array], onCheckedRowKeysChange: [Function, Array] });
|
|
59
59
|
exports.dataTableInjectionKey = (0, _utils_1.createInjectionKey)('u-data-table');
|
|
@@ -3,4 +3,5 @@ export declare function useResizable(): {
|
|
|
3
3
|
getResizableWidth: (key: ColumnKey) => number | undefined;
|
|
4
4
|
doUpdateResizableWidth: (column: TableColumn, width: number) => void;
|
|
5
5
|
clearResizableWidth: () => void;
|
|
6
|
+
resizableWidthsRef: import("vue").Ref<Record<ColumnKey, number>>;
|
|
6
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComputedRef } from 'vue';
|
|
2
2
|
import type { PaginationProps } from '../../pagination/src/Pagination';
|
|
3
|
-
import type { ColumnKey, FilterState, TableBaseColumn, TableSelectionColumn, InternalRowData, TmNode, TableExpandColumn, RowKey, DataTableSetupProps } from './interface';
|
|
3
|
+
import type { ColumnKey, FilterState, SortState, TableBaseColumn, TableSelectionColumn, InternalRowData, TmNode, TableExpandColumn, RowKey, DataTableSetupProps } from './interface';
|
|
4
4
|
export declare function useTableData(props: DataTableSetupProps, { dataRelatedColsRef }: {
|
|
5
5
|
dataRelatedColsRef: ComputedRef<Array<TableSelectionColumn | TableBaseColumn | TableExpandColumn>>;
|
|
6
6
|
}): {
|
|
@@ -22,10 +22,11 @@ export declare function useTableData(props: DataTableSetupProps, { dataRelatedCo
|
|
|
22
22
|
selectionColumnRef: ComputedRef<TableSelectionColumn | null>;
|
|
23
23
|
childTriggerColIndexRef: ComputedRef<number>;
|
|
24
24
|
doUpdateFilters: (filters: FilterState, sourceColumn: TableBaseColumn) => void;
|
|
25
|
-
deriveNextSorter: (sortState:
|
|
25
|
+
deriveNextSorter: (sortState: SortState | null) => void;
|
|
26
26
|
doUpdatePageSize: (pageSize: number) => void;
|
|
27
27
|
doUpdatePage: (page: number) => void;
|
|
28
28
|
onUnstableColumnResize: (resizedWidth: number, limitedWidth: number, column: TableBaseColumn, getColumnWidth: (key: ColumnKey) => number | undefined) => void;
|
|
29
|
+
restoreSortState: (sortState: SortState | SortState[] | null) => void;
|
|
29
30
|
filter: (filters: FilterState | null) => void;
|
|
30
31
|
filters: (filters: FilterState | null) => void;
|
|
31
32
|
clearFilter: () => void;
|
|
@@ -131,7 +131,7 @@ function useTableData(props, { dataRelatedColsRef }) {
|
|
|
131
131
|
})
|
|
132
132
|
: [];
|
|
133
133
|
});
|
|
134
|
-
const { sortedDataRef, deriveNextSorter, mergedSortStateRef, sort, clearSorter } = (0, use_sorter_1.useSorter)(props, {
|
|
134
|
+
const { sortedDataRef, deriveNextSorter, mergedSortStateRef, sort, clearSorter, doUpdateSorter } = (0, use_sorter_1.useSorter)(props, {
|
|
135
135
|
dataRelatedColsRef,
|
|
136
136
|
filteredDataRef
|
|
137
137
|
});
|
|
@@ -302,6 +302,9 @@ function useTableData(props, { dataRelatedColsRef }) {
|
|
|
302
302
|
(0, _utils_1.warn)('data-table', '`filters` is not an object');
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
+
function restoreSortState(sortState) {
|
|
306
|
+
doUpdateSorter(sortState);
|
|
307
|
+
}
|
|
305
308
|
return {
|
|
306
309
|
treeMateRef,
|
|
307
310
|
mergedCurrentPageRef: boundedMergedCurrentPageRef,
|
|
@@ -318,6 +321,7 @@ function useTableData(props, { dataRelatedColsRef }) {
|
|
|
318
321
|
doUpdatePageSize,
|
|
319
322
|
doUpdatePage,
|
|
320
323
|
onUnstableColumnResize,
|
|
324
|
+
restoreSortState,
|
|
321
325
|
// exported methods
|
|
322
326
|
filter,
|
|
323
327
|
filters,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DataTableStorageState, SortState, TableBaseColumn, TableExpandColumn, TableSelectionColumn } from './interface';
|
|
2
|
+
export declare function loadTableState(localStorageKey: string): DataTableStorageState | null;
|
|
3
|
+
export declare function saveTableState(localStorageKey: string, state: DataTableStorageState): void;
|
|
4
|
+
export declare function restoreSortStateFromStored(stored: DataTableStorageState['sortState'], dataRelatedCols: Array<TableSelectionColumn | TableBaseColumn | TableExpandColumn>): SortState[] | null;
|