naive-ui 2.30.3 → 2.30.4
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 +1385 -901
- package/dist/index.prod.js +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +5 -17
- package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -0
- package/es/_internal/select-menu/src/SelectGroupHeader.js +5 -3
- package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -3
- package/es/_internal/select-menu/src/SelectMenu.js +6 -8
- package/es/_internal/select-menu/src/SelectOption.d.ts +1 -0
- package/es/_internal/select-menu/src/SelectOption.js +11 -5
- package/es/_internal/select-menu/src/interface.d.ts +3 -1
- package/es/_internal/selection/src/Selection.d.ts +0 -2
- package/es/_internal/selection/src/Selection.js +2 -2
- package/es/_mixins/use-theme.js +1 -1
- package/es/_utils/composable/index.d.ts +3 -5
- package/es/_utils/composable/index.js +3 -111
- package/es/_utils/composable/use-collection.d.ts +4 -0
- package/es/_utils/composable/use-collection.js +87 -0
- package/es/_utils/composable/use-deferred-true.d.ts +2 -0
- package/es/_utils/composable/use-deferred-true.js +25 -0
- package/es/_utils/composable/use-reactivated.d.ts +3 -0
- package/es/_utils/composable/use-reactivated.js +20 -0
- package/es/_utils/event/index.d.ts +2 -0
- package/es/_utils/event/index.js +7 -0
- package/es/_utils/index.d.ts +2 -1
- package/es/_utils/index.js +2 -1
- package/es/_utils/vue/index.d.ts +1 -0
- package/es/_utils/vue/index.js +1 -0
- package/es/_utils/vue/merge-handlers.d.ts +1 -0
- package/es/_utils/vue/merge-handlers.js +15 -0
- package/es/button/src/Button.js +7 -2
- package/es/cascader/src/Cascader.d.ts +2 -3
- package/es/cascader/src/Cascader.js +26 -22
- package/es/cascader/src/CascaderMenu.d.ts +2 -2
- package/es/cascader/src/CascaderMenu.js +2 -4
- package/es/data-table/src/DataTable.d.ts +787 -0
- package/es/data-table/src/DataTable.js +7 -3
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +142 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +142 -0
- package/es/data-table/src/MainTable.d.ts +2 -0
- package/es/data-table/src/MainTable.js +5 -1
- package/es/data-table/src/TableParts/Body.d.ts +143 -0
- package/es/data-table/src/TableParts/Body.js +11 -2
- package/es/data-table/src/TableParts/Cell.d.ts +284 -0
- package/es/data-table/src/TableParts/Header.d.ts +143 -0
- package/es/data-table/src/TableParts/Header.js +6 -2
- package/es/data-table/src/interface.d.ts +9 -5
- package/es/data-table/src/use-expand.d.ts +5 -3
- package/es/data-table/src/use-expand.js +22 -2
- package/es/data-table/src/utils.d.ts +2 -2
- package/es/data-table/src/utils.js +10 -8
- package/es/data-table/styles/light.d.ts +71 -0
- package/es/date-picker/src/DatePicker.d.ts +2 -1
- package/es/date-picker/src/DatePicker.js +20 -9
- package/es/date-picker/src/panel/month.js +3 -2
- package/es/drawer/src/Drawer.d.ts +1 -1
- package/es/drawer/src/Drawer.js +3 -3
- package/es/drawer/src/DrawerBodyWrapper.d.ts +2 -2
- package/es/dropdown/src/Dropdown.d.ts +4 -0
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/input/src/Input.d.ts +6 -3
- package/es/input/src/Input.js +56 -31
- package/es/input/src/utils.d.ts +7 -1
- package/es/input/src/utils.js +57 -2
- package/es/layout/src/Layout.d.ts +3 -1
- package/es/layout/src/Layout.js +22 -4
- package/es/layout/src/LayoutContent.d.ts +1 -0
- package/es/layout/src/LayoutSider.d.ts +1 -0
- package/es/layout/src/LayoutSider.js +22 -3
- package/es/menu/src/Menu.d.ts +1 -1
- package/es/modal/src/BodyWrapper.d.ts +2 -2
- package/es/modal/src/Modal.js +2 -2
- package/es/pagination/src/Pagination.d.ts +806 -20
- package/es/pagination/src/Pagination.js +115 -52
- package/es/pagination/src/interface.d.ts +2 -2
- package/es/pagination/src/styles/index.cssr.js +12 -10
- package/es/pagination/src/utils.d.ts +15 -5
- package/es/pagination/src/utils.js +117 -50
- package/es/pagination/styles/dark.js +3 -1
- package/es/pagination/styles/light.d.ts +71 -0
- package/es/pagination/styles/light.js +3 -1
- package/es/popconfirm/src/Popconfirm.d.ts +4 -0
- package/es/popover/src/Popover.d.ts +5 -0
- package/es/popover/src/Popover.js +1 -0
- package/es/popover/src/PopoverBody.d.ts +4 -0
- package/es/popover/src/PopoverBody.js +18 -10
- package/es/popselect/src/Popselect.d.ts +24 -0
- package/es/popselect/src/Popselect.js +12 -7
- package/es/popselect/src/PopselectPanel.d.ts +22 -2
- package/es/popselect/src/PopselectPanel.js +12 -1
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +5 -2
- package/es/slider/src/Slider.d.ts +1 -1
- package/es/slider/src/Slider.js +13 -5
- package/es/slider/src/styles/index.cssr.js +26 -31
- package/es/time-picker/src/TimePicker.d.ts +2 -1
- package/es/time-picker/src/TimePicker.js +18 -8
- package/es/tooltip/src/Tooltip.d.ts +4 -0
- package/es/tree/src/Tree.d.ts +2 -3
- package/es/tree/src/Tree.js +6 -8
- package/es/tree/src/TreeNode.js +4 -1
- package/es/tree/src/interface.d.ts +0 -1
- package/es/tree/src/keyboard.d.ts +0 -1
- package/es/tree/src/keyboard.js +6 -9
- package/es/tree-select/src/TreeSelect.d.ts +1 -3
- package/es/tree-select/src/TreeSelect.js +14 -16
- package/es/upload/src/UploadDragger.js +2 -2
- package/es/upload/src/UploadFile.d.ts +2 -2
- package/es/upload/src/UploadFile.js +9 -4
- package/es/upload/src/UploadTrigger.js +4 -3
- package/es/upload/src/styles/index.cssr.js +2 -2
- package/es/upload/src/utils.js +1 -15
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +4 -16
- package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -0
- package/lib/_internal/select-menu/src/SelectGroupHeader.js +5 -3
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -3
- package/lib/_internal/select-menu/src/SelectMenu.js +5 -7
- package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -0
- package/lib/_internal/select-menu/src/SelectOption.js +10 -4
- package/lib/_internal/select-menu/src/interface.d.ts +3 -1
- package/lib/_internal/selection/src/Selection.d.ts +0 -2
- package/lib/_internal/selection/src/Selection.js +2 -2
- package/lib/_mixins/use-theme.js +1 -1
- package/lib/_utils/composable/index.d.ts +3 -5
- package/lib/_utils/composable/index.js +9 -116
- package/lib/_utils/composable/use-collection.d.ts +4 -0
- package/lib/_utils/composable/use-collection.js +93 -0
- package/lib/_utils/composable/use-deferred-true.d.ts +2 -0
- package/lib/_utils/composable/use-deferred-true.js +29 -0
- package/lib/_utils/composable/use-reactivated.d.ts +3 -0
- package/lib/_utils/composable/use-reactivated.js +24 -0
- package/lib/_utils/event/index.d.ts +2 -0
- package/lib/_utils/event/index.js +12 -0
- package/lib/_utils/index.d.ts +2 -1
- package/lib/_utils/index.js +5 -1
- package/lib/_utils/vue/index.d.ts +1 -0
- package/lib/_utils/vue/index.js +3 -1
- package/lib/_utils/vue/merge-handlers.d.ts +1 -0
- package/lib/_utils/vue/merge-handlers.js +19 -0
- package/lib/button/src/Button.js +7 -2
- package/lib/cascader/src/Cascader.d.ts +2 -3
- package/lib/cascader/src/Cascader.js +25 -21
- package/lib/cascader/src/CascaderMenu.d.ts +2 -2
- package/lib/cascader/src/CascaderMenu.js +2 -4
- package/lib/data-table/src/DataTable.d.ts +787 -0
- package/lib/data-table/src/DataTable.js +7 -3
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +142 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +142 -0
- package/lib/data-table/src/MainTable.d.ts +2 -0
- package/lib/data-table/src/MainTable.js +5 -1
- package/lib/data-table/src/TableParts/Body.d.ts +143 -0
- package/lib/data-table/src/TableParts/Body.js +11 -2
- package/lib/data-table/src/TableParts/Cell.d.ts +284 -0
- package/lib/data-table/src/TableParts/Header.d.ts +143 -0
- package/lib/data-table/src/TableParts/Header.js +6 -2
- package/lib/data-table/src/interface.d.ts +9 -5
- package/lib/data-table/src/use-expand.d.ts +5 -3
- package/lib/data-table/src/use-expand.js +22 -2
- package/lib/data-table/src/utils.d.ts +2 -2
- package/lib/data-table/src/utils.js +11 -9
- package/lib/data-table/styles/light.d.ts +71 -0
- package/lib/date-picker/src/DatePicker.d.ts +2 -1
- package/lib/date-picker/src/DatePicker.js +19 -8
- package/lib/date-picker/src/panel/month.js +3 -2
- package/lib/drawer/src/Drawer.d.ts +1 -1
- package/lib/drawer/src/Drawer.js +2 -2
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +2 -2
- package/lib/dropdown/src/Dropdown.d.ts +4 -0
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/input/src/Input.d.ts +6 -3
- package/lib/input/src/Input.js +55 -30
- package/lib/input/src/utils.d.ts +7 -1
- package/lib/input/src/utils.js +60 -4
- package/lib/layout/src/Layout.d.ts +3 -1
- package/lib/layout/src/Layout.js +22 -4
- package/lib/layout/src/LayoutContent.d.ts +1 -0
- package/lib/layout/src/LayoutSider.d.ts +1 -0
- package/lib/layout/src/LayoutSider.js +21 -2
- package/lib/menu/src/Menu.d.ts +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +2 -2
- package/lib/modal/src/Modal.js +1 -1
- package/lib/pagination/src/Pagination.d.ts +806 -20
- package/lib/pagination/src/Pagination.js +114 -51
- package/lib/pagination/src/interface.d.ts +2 -2
- package/lib/pagination/src/styles/index.cssr.js +13 -11
- package/lib/pagination/src/utils.d.ts +15 -5
- package/lib/pagination/src/utils.js +118 -53
- package/lib/pagination/styles/dark.js +6 -4
- package/lib/pagination/styles/light.d.ts +71 -0
- package/lib/pagination/styles/light.js +6 -4
- package/lib/popconfirm/src/Popconfirm.d.ts +4 -0
- package/lib/popover/src/Popover.d.ts +5 -0
- package/lib/popover/src/Popover.js +1 -0
- package/lib/popover/src/PopoverBody.d.ts +4 -0
- package/lib/popover/src/PopoverBody.js +18 -10
- package/lib/popselect/src/Popselect.d.ts +24 -0
- package/lib/popselect/src/Popselect.js +10 -5
- package/lib/popselect/src/PopselectPanel.d.ts +22 -2
- package/lib/popselect/src/PopselectPanel.js +12 -1
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +4 -1
- package/lib/slider/src/Slider.d.ts +1 -1
- package/lib/slider/src/Slider.js +12 -4
- package/lib/slider/src/styles/index.cssr.js +26 -31
- package/lib/time-picker/src/TimePicker.d.ts +2 -1
- package/lib/time-picker/src/TimePicker.js +17 -7
- package/lib/tooltip/src/Tooltip.d.ts +4 -0
- package/lib/tree/src/Tree.d.ts +2 -3
- package/lib/tree/src/Tree.js +6 -8
- package/lib/tree/src/TreeNode.js +4 -1
- package/lib/tree/src/interface.d.ts +0 -1
- package/lib/tree/src/keyboard.d.ts +0 -1
- package/lib/tree/src/keyboard.js +6 -9
- package/lib/tree-select/src/TreeSelect.d.ts +1 -3
- package/lib/tree-select/src/TreeSelect.js +13 -15
- package/lib/upload/src/UploadDragger.js +2 -2
- package/lib/upload/src/UploadFile.d.ts +2 -2
- package/lib/upload/src/UploadFile.js +9 -4
- package/lib/upload/src/UploadTrigger.js +3 -2
- package/lib/upload/src/styles/index.cssr.js +2 -2
- package/lib/upload/src/utils.js +1 -15
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/web-types.json +37 -1
|
@@ -699,6 +699,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
699
699
|
paddingLarge: string;
|
|
700
700
|
clearSize: string;
|
|
701
701
|
}, any>;
|
|
702
|
+
Popselect: import("../../../_mixins").Theme<"Popselect", {
|
|
703
|
+
menuBoxShadow: string;
|
|
704
|
+
}, {
|
|
705
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
706
|
+
fontSize: string;
|
|
707
|
+
borderRadius: string;
|
|
708
|
+
color: string;
|
|
709
|
+
dividerColor: string;
|
|
710
|
+
textColor: string;
|
|
711
|
+
boxShadow: string;
|
|
712
|
+
space: string;
|
|
713
|
+
spaceArrow: string;
|
|
714
|
+
arrowOffset: string;
|
|
715
|
+
arrowOffsetVertical: string;
|
|
716
|
+
arrowHeight: string;
|
|
717
|
+
padding: string;
|
|
718
|
+
}, any>;
|
|
719
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
720
|
+
optionFontSizeSmall: string;
|
|
721
|
+
optionFontSizeMedium: string;
|
|
722
|
+
optionFontSizeLarge: string;
|
|
723
|
+
optionFontSizeHuge: string;
|
|
724
|
+
optionHeightSmall: string;
|
|
725
|
+
optionHeightMedium: string;
|
|
726
|
+
optionHeightLarge: string;
|
|
727
|
+
optionHeightHuge: string;
|
|
728
|
+
borderRadius: string;
|
|
729
|
+
color: string;
|
|
730
|
+
groupHeaderTextColor: string;
|
|
731
|
+
actionDividerColor: string;
|
|
732
|
+
optionTextColor: string;
|
|
733
|
+
optionTextColorPressed: string;
|
|
734
|
+
optionTextColorDisabled: string;
|
|
735
|
+
optionTextColorActive: string;
|
|
736
|
+
optionOpacityDisabled: string;
|
|
737
|
+
optionCheckColor: string;
|
|
738
|
+
optionColorPending: string;
|
|
739
|
+
optionColorActive: string;
|
|
740
|
+
optionColorActivePending: string;
|
|
741
|
+
actionTextColor: string;
|
|
742
|
+
loadingColor: string;
|
|
743
|
+
height: string;
|
|
744
|
+
paddingSmall: string;
|
|
745
|
+
paddingMedium: string;
|
|
746
|
+
paddingLarge: string;
|
|
747
|
+
paddingHuge: string;
|
|
748
|
+
optionPaddingSmall: string;
|
|
749
|
+
optionPaddingMedium: string;
|
|
750
|
+
optionPaddingLarge: string;
|
|
751
|
+
optionPaddingHuge: string;
|
|
752
|
+
loadingSize: string;
|
|
753
|
+
}, {
|
|
754
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
755
|
+
color: string;
|
|
756
|
+
colorHover: string;
|
|
757
|
+
}, any>;
|
|
758
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
759
|
+
fontSizeSmall: string;
|
|
760
|
+
fontSizeMedium: string;
|
|
761
|
+
fontSizeLarge: string;
|
|
762
|
+
fontSizeHuge: string;
|
|
763
|
+
textColor: string;
|
|
764
|
+
iconColor: string;
|
|
765
|
+
extraTextColor: string;
|
|
766
|
+
iconSizeSmall: string;
|
|
767
|
+
iconSizeMedium: string;
|
|
768
|
+
iconSizeLarge: string;
|
|
769
|
+
iconSizeHuge: string;
|
|
770
|
+
}, any>;
|
|
771
|
+
}>;
|
|
772
|
+
}>;
|
|
702
773
|
}>;
|
|
703
774
|
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
704
775
|
color: string;
|
|
@@ -960,6 +1031,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
960
1031
|
paddingLarge: string;
|
|
961
1032
|
clearSize: string;
|
|
962
1033
|
}, any>> | undefined;
|
|
1034
|
+
Popselect?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Popselect", {
|
|
1035
|
+
menuBoxShadow: string;
|
|
1036
|
+
}, {
|
|
1037
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
1038
|
+
fontSize: string;
|
|
1039
|
+
borderRadius: string;
|
|
1040
|
+
color: string;
|
|
1041
|
+
dividerColor: string;
|
|
1042
|
+
textColor: string;
|
|
1043
|
+
boxShadow: string;
|
|
1044
|
+
space: string;
|
|
1045
|
+
spaceArrow: string;
|
|
1046
|
+
arrowOffset: string;
|
|
1047
|
+
arrowOffsetVertical: string;
|
|
1048
|
+
arrowHeight: string;
|
|
1049
|
+
padding: string;
|
|
1050
|
+
}, any>;
|
|
1051
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
1052
|
+
optionFontSizeSmall: string;
|
|
1053
|
+
optionFontSizeMedium: string;
|
|
1054
|
+
optionFontSizeLarge: string;
|
|
1055
|
+
optionFontSizeHuge: string;
|
|
1056
|
+
optionHeightSmall: string;
|
|
1057
|
+
optionHeightMedium: string;
|
|
1058
|
+
optionHeightLarge: string;
|
|
1059
|
+
optionHeightHuge: string;
|
|
1060
|
+
borderRadius: string;
|
|
1061
|
+
color: string;
|
|
1062
|
+
groupHeaderTextColor: string;
|
|
1063
|
+
actionDividerColor: string;
|
|
1064
|
+
optionTextColor: string;
|
|
1065
|
+
optionTextColorPressed: string;
|
|
1066
|
+
optionTextColorDisabled: string;
|
|
1067
|
+
optionTextColorActive: string;
|
|
1068
|
+
optionOpacityDisabled: string;
|
|
1069
|
+
optionCheckColor: string;
|
|
1070
|
+
optionColorPending: string;
|
|
1071
|
+
optionColorActive: string;
|
|
1072
|
+
optionColorActivePending: string;
|
|
1073
|
+
actionTextColor: string;
|
|
1074
|
+
loadingColor: string;
|
|
1075
|
+
height: string;
|
|
1076
|
+
paddingSmall: string;
|
|
1077
|
+
paddingMedium: string;
|
|
1078
|
+
paddingLarge: string;
|
|
1079
|
+
paddingHuge: string;
|
|
1080
|
+
optionPaddingSmall: string;
|
|
1081
|
+
optionPaddingMedium: string;
|
|
1082
|
+
optionPaddingLarge: string;
|
|
1083
|
+
optionPaddingHuge: string;
|
|
1084
|
+
loadingSize: string;
|
|
1085
|
+
}, {
|
|
1086
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
1087
|
+
color: string;
|
|
1088
|
+
colorHover: string;
|
|
1089
|
+
}, any>;
|
|
1090
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
1091
|
+
fontSizeSmall: string;
|
|
1092
|
+
fontSizeMedium: string;
|
|
1093
|
+
fontSizeLarge: string;
|
|
1094
|
+
fontSizeHuge: string;
|
|
1095
|
+
textColor: string;
|
|
1096
|
+
iconColor: string;
|
|
1097
|
+
extraTextColor: string;
|
|
1098
|
+
iconSizeSmall: string;
|
|
1099
|
+
iconSizeMedium: string;
|
|
1100
|
+
iconSizeLarge: string;
|
|
1101
|
+
iconSizeHuge: string;
|
|
1102
|
+
}, any>;
|
|
1103
|
+
}>;
|
|
1104
|
+
}>> | undefined;
|
|
963
1105
|
} | undefined;
|
|
964
1106
|
} | undefined;
|
|
965
1107
|
Scrollbar?: {
|
|
@@ -1706,6 +1848,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1706
1848
|
paddingLarge: string;
|
|
1707
1849
|
clearSize: string;
|
|
1708
1850
|
}, any>;
|
|
1851
|
+
Popselect: import("../../../_mixins").Theme<"Popselect", {
|
|
1852
|
+
menuBoxShadow: string;
|
|
1853
|
+
}, {
|
|
1854
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
1855
|
+
fontSize: string;
|
|
1856
|
+
borderRadius: string;
|
|
1857
|
+
color: string;
|
|
1858
|
+
dividerColor: string;
|
|
1859
|
+
textColor: string;
|
|
1860
|
+
boxShadow: string;
|
|
1861
|
+
space: string;
|
|
1862
|
+
spaceArrow: string;
|
|
1863
|
+
arrowOffset: string;
|
|
1864
|
+
arrowOffsetVertical: string;
|
|
1865
|
+
arrowHeight: string;
|
|
1866
|
+
padding: string;
|
|
1867
|
+
}, any>;
|
|
1868
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
1869
|
+
optionFontSizeSmall: string;
|
|
1870
|
+
optionFontSizeMedium: string;
|
|
1871
|
+
optionFontSizeLarge: string;
|
|
1872
|
+
optionFontSizeHuge: string;
|
|
1873
|
+
optionHeightSmall: string;
|
|
1874
|
+
optionHeightMedium: string;
|
|
1875
|
+
optionHeightLarge: string;
|
|
1876
|
+
optionHeightHuge: string;
|
|
1877
|
+
borderRadius: string;
|
|
1878
|
+
color: string;
|
|
1879
|
+
groupHeaderTextColor: string;
|
|
1880
|
+
actionDividerColor: string;
|
|
1881
|
+
optionTextColor: string;
|
|
1882
|
+
optionTextColorPressed: string;
|
|
1883
|
+
optionTextColorDisabled: string;
|
|
1884
|
+
optionTextColorActive: string;
|
|
1885
|
+
optionOpacityDisabled: string;
|
|
1886
|
+
optionCheckColor: string;
|
|
1887
|
+
optionColorPending: string;
|
|
1888
|
+
optionColorActive: string;
|
|
1889
|
+
optionColorActivePending: string;
|
|
1890
|
+
actionTextColor: string;
|
|
1891
|
+
loadingColor: string;
|
|
1892
|
+
height: string;
|
|
1893
|
+
paddingSmall: string;
|
|
1894
|
+
paddingMedium: string;
|
|
1895
|
+
paddingLarge: string;
|
|
1896
|
+
paddingHuge: string;
|
|
1897
|
+
optionPaddingSmall: string;
|
|
1898
|
+
optionPaddingMedium: string;
|
|
1899
|
+
optionPaddingLarge: string;
|
|
1900
|
+
optionPaddingHuge: string;
|
|
1901
|
+
loadingSize: string;
|
|
1902
|
+
}, {
|
|
1903
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
1904
|
+
color: string;
|
|
1905
|
+
colorHover: string;
|
|
1906
|
+
}, any>;
|
|
1907
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
1908
|
+
fontSizeSmall: string;
|
|
1909
|
+
fontSizeMedium: string;
|
|
1910
|
+
fontSizeLarge: string;
|
|
1911
|
+
fontSizeHuge: string;
|
|
1912
|
+
textColor: string;
|
|
1913
|
+
iconColor: string;
|
|
1914
|
+
extraTextColor: string;
|
|
1915
|
+
iconSizeSmall: string;
|
|
1916
|
+
iconSizeMedium: string;
|
|
1917
|
+
iconSizeLarge: string;
|
|
1918
|
+
iconSizeHuge: string;
|
|
1919
|
+
}, any>;
|
|
1920
|
+
}>;
|
|
1921
|
+
}>;
|
|
1709
1922
|
}>;
|
|
1710
1923
|
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
1711
1924
|
color: string;
|
|
@@ -1967,6 +2180,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1967
2180
|
paddingLarge: string;
|
|
1968
2181
|
clearSize: string;
|
|
1969
2182
|
}, any>> | undefined;
|
|
2183
|
+
Popselect?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Popselect", {
|
|
2184
|
+
menuBoxShadow: string;
|
|
2185
|
+
}, {
|
|
2186
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
2187
|
+
fontSize: string;
|
|
2188
|
+
borderRadius: string;
|
|
2189
|
+
color: string;
|
|
2190
|
+
dividerColor: string;
|
|
2191
|
+
textColor: string;
|
|
2192
|
+
boxShadow: string;
|
|
2193
|
+
space: string;
|
|
2194
|
+
spaceArrow: string;
|
|
2195
|
+
arrowOffset: string;
|
|
2196
|
+
arrowOffsetVertical: string;
|
|
2197
|
+
arrowHeight: string;
|
|
2198
|
+
padding: string;
|
|
2199
|
+
}, any>;
|
|
2200
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
2201
|
+
optionFontSizeSmall: string;
|
|
2202
|
+
optionFontSizeMedium: string;
|
|
2203
|
+
optionFontSizeLarge: string;
|
|
2204
|
+
optionFontSizeHuge: string;
|
|
2205
|
+
optionHeightSmall: string;
|
|
2206
|
+
optionHeightMedium: string;
|
|
2207
|
+
optionHeightLarge: string;
|
|
2208
|
+
optionHeightHuge: string;
|
|
2209
|
+
borderRadius: string;
|
|
2210
|
+
color: string;
|
|
2211
|
+
groupHeaderTextColor: string;
|
|
2212
|
+
actionDividerColor: string;
|
|
2213
|
+
optionTextColor: string;
|
|
2214
|
+
optionTextColorPressed: string;
|
|
2215
|
+
optionTextColorDisabled: string;
|
|
2216
|
+
optionTextColorActive: string;
|
|
2217
|
+
optionOpacityDisabled: string;
|
|
2218
|
+
optionCheckColor: string;
|
|
2219
|
+
optionColorPending: string;
|
|
2220
|
+
optionColorActive: string;
|
|
2221
|
+
optionColorActivePending: string;
|
|
2222
|
+
actionTextColor: string;
|
|
2223
|
+
loadingColor: string;
|
|
2224
|
+
height: string;
|
|
2225
|
+
paddingSmall: string;
|
|
2226
|
+
paddingMedium: string;
|
|
2227
|
+
paddingLarge: string;
|
|
2228
|
+
paddingHuge: string;
|
|
2229
|
+
optionPaddingSmall: string;
|
|
2230
|
+
optionPaddingMedium: string;
|
|
2231
|
+
optionPaddingLarge: string;
|
|
2232
|
+
optionPaddingHuge: string;
|
|
2233
|
+
loadingSize: string;
|
|
2234
|
+
}, {
|
|
2235
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
2236
|
+
color: string;
|
|
2237
|
+
colorHover: string;
|
|
2238
|
+
}, any>;
|
|
2239
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
2240
|
+
fontSizeSmall: string;
|
|
2241
|
+
fontSizeMedium: string;
|
|
2242
|
+
fontSizeLarge: string;
|
|
2243
|
+
fontSizeHuge: string;
|
|
2244
|
+
textColor: string;
|
|
2245
|
+
iconColor: string;
|
|
2246
|
+
extraTextColor: string;
|
|
2247
|
+
iconSizeSmall: string;
|
|
2248
|
+
iconSizeMedium: string;
|
|
2249
|
+
iconSizeLarge: string;
|
|
2250
|
+
iconSizeHuge: string;
|
|
2251
|
+
}, any>;
|
|
2252
|
+
}>;
|
|
2253
|
+
}>> | undefined;
|
|
1970
2254
|
} | undefined;
|
|
1971
2255
|
} | undefined;
|
|
1972
2256
|
Scrollbar?: {
|
|
@@ -706,6 +706,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
706
706
|
paddingLarge: string;
|
|
707
707
|
clearSize: string;
|
|
708
708
|
}, any>;
|
|
709
|
+
Popselect: import("../../../_mixins").Theme<"Popselect", {
|
|
710
|
+
menuBoxShadow: string;
|
|
711
|
+
}, {
|
|
712
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
713
|
+
fontSize: string;
|
|
714
|
+
borderRadius: string;
|
|
715
|
+
color: string;
|
|
716
|
+
dividerColor: string;
|
|
717
|
+
textColor: string;
|
|
718
|
+
boxShadow: string;
|
|
719
|
+
space: string;
|
|
720
|
+
spaceArrow: string;
|
|
721
|
+
arrowOffset: string;
|
|
722
|
+
arrowOffsetVertical: string;
|
|
723
|
+
arrowHeight: string;
|
|
724
|
+
padding: string;
|
|
725
|
+
}, any>;
|
|
726
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
727
|
+
optionFontSizeSmall: string;
|
|
728
|
+
optionFontSizeMedium: string;
|
|
729
|
+
optionFontSizeLarge: string;
|
|
730
|
+
optionFontSizeHuge: string;
|
|
731
|
+
optionHeightSmall: string;
|
|
732
|
+
optionHeightMedium: string;
|
|
733
|
+
optionHeightLarge: string;
|
|
734
|
+
optionHeightHuge: string;
|
|
735
|
+
borderRadius: string;
|
|
736
|
+
color: string;
|
|
737
|
+
groupHeaderTextColor: string;
|
|
738
|
+
actionDividerColor: string;
|
|
739
|
+
optionTextColor: string;
|
|
740
|
+
optionTextColorPressed: string;
|
|
741
|
+
optionTextColorDisabled: string;
|
|
742
|
+
optionTextColorActive: string;
|
|
743
|
+
optionOpacityDisabled: string;
|
|
744
|
+
optionCheckColor: string;
|
|
745
|
+
optionColorPending: string;
|
|
746
|
+
optionColorActive: string;
|
|
747
|
+
optionColorActivePending: string;
|
|
748
|
+
actionTextColor: string;
|
|
749
|
+
loadingColor: string;
|
|
750
|
+
height: string;
|
|
751
|
+
paddingSmall: string;
|
|
752
|
+
paddingMedium: string;
|
|
753
|
+
paddingLarge: string;
|
|
754
|
+
paddingHuge: string;
|
|
755
|
+
optionPaddingSmall: string;
|
|
756
|
+
optionPaddingMedium: string;
|
|
757
|
+
optionPaddingLarge: string;
|
|
758
|
+
optionPaddingHuge: string;
|
|
759
|
+
loadingSize: string;
|
|
760
|
+
}, {
|
|
761
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
762
|
+
color: string;
|
|
763
|
+
colorHover: string;
|
|
764
|
+
}, any>;
|
|
765
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
766
|
+
fontSizeSmall: string;
|
|
767
|
+
fontSizeMedium: string;
|
|
768
|
+
fontSizeLarge: string;
|
|
769
|
+
fontSizeHuge: string;
|
|
770
|
+
textColor: string;
|
|
771
|
+
iconColor: string;
|
|
772
|
+
extraTextColor: string;
|
|
773
|
+
iconSizeSmall: string;
|
|
774
|
+
iconSizeMedium: string;
|
|
775
|
+
iconSizeLarge: string;
|
|
776
|
+
iconSizeHuge: string;
|
|
777
|
+
}, any>;
|
|
778
|
+
}>;
|
|
779
|
+
}>;
|
|
709
780
|
}>;
|
|
710
781
|
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
711
782
|
color: string;
|
|
@@ -967,6 +1038,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
967
1038
|
paddingLarge: string;
|
|
968
1039
|
clearSize: string;
|
|
969
1040
|
}, any>> | undefined;
|
|
1041
|
+
Popselect?: import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Popselect", {
|
|
1042
|
+
menuBoxShadow: string;
|
|
1043
|
+
}, {
|
|
1044
|
+
Popover: import("../../../_mixins").Theme<"Popover", {
|
|
1045
|
+
fontSize: string;
|
|
1046
|
+
borderRadius: string;
|
|
1047
|
+
color: string;
|
|
1048
|
+
dividerColor: string;
|
|
1049
|
+
textColor: string;
|
|
1050
|
+
boxShadow: string;
|
|
1051
|
+
space: string;
|
|
1052
|
+
spaceArrow: string;
|
|
1053
|
+
arrowOffset: string;
|
|
1054
|
+
arrowOffsetVertical: string;
|
|
1055
|
+
arrowHeight: string;
|
|
1056
|
+
padding: string;
|
|
1057
|
+
}, any>;
|
|
1058
|
+
InternalSelectMenu: import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
1059
|
+
optionFontSizeSmall: string;
|
|
1060
|
+
optionFontSizeMedium: string;
|
|
1061
|
+
optionFontSizeLarge: string;
|
|
1062
|
+
optionFontSizeHuge: string;
|
|
1063
|
+
optionHeightSmall: string;
|
|
1064
|
+
optionHeightMedium: string;
|
|
1065
|
+
optionHeightLarge: string;
|
|
1066
|
+
optionHeightHuge: string;
|
|
1067
|
+
borderRadius: string;
|
|
1068
|
+
color: string;
|
|
1069
|
+
groupHeaderTextColor: string;
|
|
1070
|
+
actionDividerColor: string;
|
|
1071
|
+
optionTextColor: string;
|
|
1072
|
+
optionTextColorPressed: string;
|
|
1073
|
+
optionTextColorDisabled: string;
|
|
1074
|
+
optionTextColorActive: string;
|
|
1075
|
+
optionOpacityDisabled: string;
|
|
1076
|
+
optionCheckColor: string;
|
|
1077
|
+
optionColorPending: string;
|
|
1078
|
+
optionColorActive: string;
|
|
1079
|
+
optionColorActivePending: string;
|
|
1080
|
+
actionTextColor: string;
|
|
1081
|
+
loadingColor: string;
|
|
1082
|
+
height: string;
|
|
1083
|
+
paddingSmall: string;
|
|
1084
|
+
paddingMedium: string;
|
|
1085
|
+
paddingLarge: string;
|
|
1086
|
+
paddingHuge: string;
|
|
1087
|
+
optionPaddingSmall: string;
|
|
1088
|
+
optionPaddingMedium: string;
|
|
1089
|
+
optionPaddingLarge: string;
|
|
1090
|
+
optionPaddingHuge: string;
|
|
1091
|
+
loadingSize: string;
|
|
1092
|
+
}, {
|
|
1093
|
+
Scrollbar: import("../../../_mixins").Theme<"Scrollbar", {
|
|
1094
|
+
color: string;
|
|
1095
|
+
colorHover: string;
|
|
1096
|
+
}, any>;
|
|
1097
|
+
Empty: import("../../../_mixins").Theme<"Empty", {
|
|
1098
|
+
fontSizeSmall: string;
|
|
1099
|
+
fontSizeMedium: string;
|
|
1100
|
+
fontSizeLarge: string;
|
|
1101
|
+
fontSizeHuge: string;
|
|
1102
|
+
textColor: string;
|
|
1103
|
+
iconColor: string;
|
|
1104
|
+
extraTextColor: string;
|
|
1105
|
+
iconSizeSmall: string;
|
|
1106
|
+
iconSizeMedium: string;
|
|
1107
|
+
iconSizeLarge: string;
|
|
1108
|
+
iconSizeHuge: string;
|
|
1109
|
+
}, any>;
|
|
1110
|
+
}>;
|
|
1111
|
+
}>> | undefined;
|
|
970
1112
|
} | undefined;
|
|
971
1113
|
} | undefined;
|
|
972
1114
|
Scrollbar?: {
|
|
@@ -1016,6 +1158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1016
1158
|
mergedTableLayout: import("vue").Ref<"fixed" | "auto">;
|
|
1017
1159
|
headerCheckboxDisabled: import("vue").Ref<boolean>;
|
|
1018
1160
|
handleMouseenter: () => void;
|
|
1161
|
+
handleMouseleave: () => void;
|
|
1019
1162
|
handleCheckboxUpdateChecked: () => void;
|
|
1020
1163
|
handleColHeaderClick: (e: MouseEvent, column: TableBaseColumn) => void;
|
|
1021
1164
|
handleTableHeaderScroll: (e: Event) => void;
|
|
@@ -50,6 +50,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
50
50
|
function handleMouseenter() {
|
|
51
51
|
scrollPartRef.value = 'head';
|
|
52
52
|
}
|
|
53
|
+
function handleMouseleave() {
|
|
54
|
+
scrollPartRef.value = 'body';
|
|
55
|
+
}
|
|
53
56
|
return {
|
|
54
57
|
componentId,
|
|
55
58
|
mergedSortState: mergedSortStateRef,
|
|
@@ -67,6 +70,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
70
|
mergedTableLayout: mergedTableLayoutRef,
|
|
68
71
|
headerCheckboxDisabled: headerCheckboxDisabledRef,
|
|
69
72
|
handleMouseenter,
|
|
73
|
+
handleMouseleave,
|
|
70
74
|
handleCheckboxUpdateChecked,
|
|
71
75
|
handleColHeaderClick,
|
|
72
76
|
handleTableHeaderScroll
|
|
@@ -120,8 +124,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
120
124
|
if (!discrete) {
|
|
121
125
|
return theadVNode;
|
|
122
126
|
}
|
|
123
|
-
const { handleTableHeaderScroll, handleMouseenter, scrollX } = this;
|
|
124
|
-
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-base-table-header`, onScroll: handleTableHeaderScroll, onMouseenter: handleMouseenter },
|
|
127
|
+
const { handleTableHeaderScroll, handleMouseenter, handleMouseleave, scrollX } = this;
|
|
128
|
+
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-base-table-header`, onScroll: handleTableHeaderScroll, onMouseenter: handleMouseenter, onMouseleave: handleMouseleave },
|
|
125
129
|
(0, vue_1.h)("table", { ref: "body", class: `${mergedClsPrefix}-data-table-table`, style: {
|
|
126
130
|
minWidth: (0, _utils_1.formatLength)(scrollX),
|
|
127
131
|
tableLayout: mergedTableLayout
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TreeNode } from 'treemate';
|
|
2
2
|
import { CSSProperties, Ref, VNodeChild, HTMLAttributes, Slots } from 'vue';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import type { ScrollTo } from '../../scrollbar/src/Scrollbar';
|
|
4
|
+
import type { EllipsisProps } from '../../ellipsis/src/Ellipsis';
|
|
5
|
+
import type { NLocale } from '../../locales';
|
|
6
|
+
import type { MergedTheme } from '../../_mixins';
|
|
7
|
+
import type { DataTableTheme } from '../styles';
|
|
7
8
|
import type { RowItem, ColItem } from './use-group-header';
|
|
8
9
|
import type { DataTableSelectionOption } from './TableParts/SelectionMenu';
|
|
9
10
|
export declare type FilterOptionValue = string | number;
|
|
@@ -90,7 +91,7 @@ export declare type TableSelectionColumn<T = InternalRowData> = {
|
|
|
90
91
|
rowSpan?: never;
|
|
91
92
|
} & CommonColumnInfo<T>;
|
|
92
93
|
export declare type RenderExpand<T = InternalRowData> = (row: T, index: number) => VNodeChild;
|
|
93
|
-
export declare type Expandable<T = InternalRowData> = (row: T
|
|
94
|
+
export declare type Expandable<T = InternalRowData> = (row: T) => boolean;
|
|
94
95
|
export interface TableExpandColumn<T = InternalRowData> extends Omit<TableSelectionColumn<T>, 'type'> {
|
|
95
96
|
type: 'expand';
|
|
96
97
|
title?: TableExpandColumnTitle;
|
|
@@ -206,9 +207,11 @@ export interface FilterState {
|
|
|
206
207
|
export interface MainTableRef {
|
|
207
208
|
getHeaderElement: () => HTMLElement | null;
|
|
208
209
|
getBodyElement: () => HTMLElement | null;
|
|
210
|
+
scrollTo: ScrollTo;
|
|
209
211
|
}
|
|
210
212
|
export interface MainTableBodyRef {
|
|
211
213
|
getScrollContainer: () => HTMLElement | null;
|
|
214
|
+
scrollTo: ScrollTo;
|
|
212
215
|
}
|
|
213
216
|
export interface MainTableHeaderRef {
|
|
214
217
|
$el: HTMLElement | null;
|
|
@@ -222,6 +225,7 @@ export interface DataTableInst {
|
|
|
222
225
|
clearSorter: () => void;
|
|
223
226
|
page: (page: number) => void;
|
|
224
227
|
sort: (columnKey: ColumnKey, order: SortOrder) => void;
|
|
228
|
+
scrollTo: ScrollTo;
|
|
225
229
|
/** @deprecated it but just leave it here, it does no harm */
|
|
226
230
|
clearFilter: () => void;
|
|
227
231
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TreeMate } from 'treemate';
|
|
1
3
|
import type { DataTableSetupProps } from './DataTable';
|
|
2
|
-
import { RowKey } from './interface';
|
|
3
|
-
export declare function useExpand(props: DataTableSetupProps): {
|
|
4
|
-
mergedExpandedRowKeysRef: import("vue").ComputedRef<
|
|
4
|
+
import type { InternalRowData, RowKey } from './interface';
|
|
5
|
+
export declare function useExpand(props: DataTableSetupProps, treeMateRef: Ref<TreeMate<InternalRowData, InternalRowData, InternalRowData>>): {
|
|
6
|
+
mergedExpandedRowKeysRef: import("vue").ComputedRef<import("treemate").Key[]>;
|
|
5
7
|
renderExpandRef: import("vue").ComputedRef<import("./interface").RenderExpand<any> | undefined>;
|
|
6
8
|
doUpdateExpandedRowKeys: (expandedKeys: RowKey[]) => void;
|
|
7
9
|
};
|
|
@@ -5,7 +5,7 @@ const vue_1 = require("vue");
|
|
|
5
5
|
const vooks_1 = require("vooks");
|
|
6
6
|
const _utils_1 = require("../../_utils");
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
8
|
-
function useExpand(props) {
|
|
8
|
+
function useExpand(props, treeMateRef) {
|
|
9
9
|
const renderExpandRef = (0, vooks_1.useMemo)(() => {
|
|
10
10
|
for (const col of props.columns) {
|
|
11
11
|
if (col.type === 'expand') {
|
|
@@ -16,7 +16,27 @@ function useExpand(props) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
// It's not reactive
|
|
20
|
+
let expandable;
|
|
21
|
+
for (const col of props.columns) {
|
|
22
|
+
if (col.type === 'expand') {
|
|
23
|
+
expandable = col.expandable;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const uncontrolledExpandedRowKeysRef = (0, vue_1.ref)(props.defaultExpandAll
|
|
28
|
+
? (renderExpandRef === null || renderExpandRef === void 0 ? void 0 : renderExpandRef.value)
|
|
29
|
+
? (() => {
|
|
30
|
+
const expandedKeys = [];
|
|
31
|
+
treeMateRef.value.treeNodes.forEach((tmNode) => {
|
|
32
|
+
if (expandable === null || expandable === void 0 ? void 0 : expandable(tmNode.rawNode)) {
|
|
33
|
+
expandedKeys.push(tmNode.key);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return expandedKeys;
|
|
37
|
+
})()
|
|
38
|
+
: treeMateRef.value.getNonLeafKeys()
|
|
39
|
+
: props.defaultExpandedRowKeys);
|
|
20
40
|
const controlledExpandedRowKeysRef = (0, vue_1.toRef)(props, 'expandedRowKeys');
|
|
21
41
|
const mergedExpandedRowKeysRef = (0, vooks_1.useMergedState)(controlledExpandedRowKeysRef, uncontrolledExpandedRowKeysRef);
|
|
22
42
|
function doUpdateExpandedRowKeys(expandedKeys) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
2
|
import type { SortOrder, TableBaseColumn, InternalRowData, SortOrderFlag, SortState, CreateRowClassName, TableSelectionColumn, TableColumn, TableExpandColumn } from './interface';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const SELECTION_COL_WIDTH = 40;
|
|
4
|
+
export declare const EXPAND_COL_WIDTH = 40;
|
|
5
5
|
export declare function getNumberColWidth(col: TableColumn): number | undefined;
|
|
6
6
|
export declare function getStringColWidth(col: TableColumn): string | undefined;
|
|
7
7
|
export declare function getColKey(col: TableColumn): string | number;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isColumnSorting = exports.createNextSorter = exports.isColumnFilterable = exports.isColumnSortable = exports.shouldUseArrayInSingleMode = exports.createRowClassName = exports.createCustomWidthStyle = exports.getFlagOfOrder = exports.createShallowClonedObject = exports.getColKey = exports.getStringColWidth = exports.getNumberColWidth = exports.
|
|
3
|
+
exports.isColumnSorting = exports.createNextSorter = exports.isColumnFilterable = exports.isColumnSortable = exports.shouldUseArrayInSingleMode = exports.createRowClassName = exports.createCustomWidthStyle = exports.getFlagOfOrder = exports.createShallowClonedObject = exports.getColKey = exports.getStringColWidth = exports.getNumberColWidth = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
|
|
4
4
|
const seemly_1 = require("seemly");
|
|
5
5
|
const _utils_1 = require("../../_utils");
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.SELECTION_COL_WIDTH = 40;
|
|
7
|
+
exports.EXPAND_COL_WIDTH = 40;
|
|
8
8
|
function getNumberColWidth(col) {
|
|
9
|
-
if (col.type === 'selection')
|
|
10
|
-
return exports.
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
if (col.type === 'selection') {
|
|
10
|
+
return col.width === undefined ? exports.SELECTION_COL_WIDTH : (0, seemly_1.depx)(col.width);
|
|
11
|
+
}
|
|
12
|
+
if (col.type === 'expand') {
|
|
13
|
+
return col.width === undefined ? exports.EXPAND_COL_WIDTH : (0, seemly_1.depx)(col.width);
|
|
14
|
+
}
|
|
13
15
|
if ('children' in col)
|
|
14
16
|
return undefined;
|
|
15
17
|
if (typeof col.width === 'string') {
|
|
@@ -21,10 +23,10 @@ exports.getNumberColWidth = getNumberColWidth;
|
|
|
21
23
|
function getStringColWidth(col) {
|
|
22
24
|
var _a, _b;
|
|
23
25
|
if (col.type === 'selection') {
|
|
24
|
-
return (0, _utils_1.formatLength)((_a = col.width) !== null && _a !== void 0 ? _a : exports.
|
|
26
|
+
return (0, _utils_1.formatLength)((_a = col.width) !== null && _a !== void 0 ? _a : exports.SELECTION_COL_WIDTH);
|
|
25
27
|
}
|
|
26
28
|
if (col.type === 'expand') {
|
|
27
|
-
return (0, _utils_1.formatLength)((_b = col.width) !== null && _b !== void 0 ? _b : exports.
|
|
29
|
+
return (0, _utils_1.formatLength)((_b = col.width) !== null && _b !== void 0 ? _b : exports.EXPAND_COL_WIDTH);
|
|
28
30
|
}
|
|
29
31
|
if ('children' in col) {
|
|
30
32
|
return undefined;
|