naive-ui 2.21.2 → 2.22.0
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/es/_internal/close/src/styles/index.cssr.js +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/es/_internal/selection/src/Selection.js +11 -9
- package/es/_internal/selection/src/styles/index.cssr.js +6 -2
- package/es/alert/src/Alert.d.ts +20 -20
- package/es/alert/src/Alert.js +22 -22
- package/es/alert/src/styles/index.cssr.js +45 -45
- package/es/anchor/src/AnchorAdapter.js +12 -12
- package/es/anchor/src/styles/index.cssr.js +41 -41
- package/es/avatar/src/Avatar.d.ts +5 -3
- package/es/avatar/src/Avatar.js +7 -5
- package/es/avatar/src/styles/index.cssr.js +3 -5
- package/es/button/src/Button.d.ts +60 -60
- package/es/button/src/Button.js +107 -106
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/dark.js +3 -3
- package/es/button/styles/light.d.ts +3 -3
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +37 -30
- package/es/calendar/styles/light.d.ts +3 -3
- package/es/cascader/src/Cascader.d.ts +135 -0
- package/es/cascader/src/Cascader.js +2 -4
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +6 -5
- package/es/cascader/src/CascaderOption.d.ts +18 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/es/cascader/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +3 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/es/color-picker/src/ColorPicker.d.ts +27 -27
- package/es/color-picker/styles/light.d.ts +3 -3
- package/es/config-provider/src/ConfigProvider.d.ts +21 -0
- package/es/data-table/src/DataTable.d.ts +30 -30
- package/es/data-table/src/DataTable.js +7 -14
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +18 -7
- package/es/data-table/src/TableParts/Body.js +80 -28
- package/es/data-table/src/TableParts/Cell.d.ts +6 -6
- package/es/data-table/src/TableParts/Header.d.ts +3 -3
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +9 -12
- package/es/data-table/src/use-check.js +6 -2
- package/es/data-table/src/use-scroll.d.ts +2 -0
- package/es/data-table/src/use-scroll.js +34 -4
- package/es/data-table/src/use-table-data.js +4 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/date-picker/src/DatePicker.d.ts +94 -69
- package/es/date-picker/src/DatePicker.js +47 -20
- package/es/date-picker/src/config.d.ts +1 -9
- package/es/date-picker/src/config.js +0 -8
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +23 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +21 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +23 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +27 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/es/date-picker/src/panel/use-calendar.js +35 -18
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
- package/es/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/es/date-picker/src/panel/use-panel-common.js +2 -2
- package/es/date-picker/src/utils.d.ts +19 -3
- package/es/date-picker/src/utils.js +40 -5
- package/es/date-picker/styles/_common.d.ts +2 -0
- package/es/date-picker/styles/_common.js +3 -1
- package/es/date-picker/styles/light.d.ts +10 -6
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/styles/index.cssr.js +1 -0
- package/es/dialog/styles/light.d.ts +3 -3
- package/es/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/es/dynamic-input/src/InputPreset.d.ts +3 -3
- package/es/dynamic-input/src/PairPreset.d.ts +3 -3
- package/es/dynamic-input/styles/light.d.ts +3 -3
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/es/dynamic-tags/styles/light.d.ts +3 -3
- package/es/element/index.d.ts +1 -0
- package/es/element/index.js +1 -0
- package/es/form/src/interface.d.ts +5 -4
- package/es/image/src/Image.d.ts +25 -16
- package/es/image/src/Image.js +35 -11
- package/es/image/src/ImageGroup.js +2 -2
- package/es/image/src/styles/index.cssr.js +4 -3
- package/es/input/src/Input.js +2 -0
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +30 -30
- package/es/input-number/src/InputNumber.js +10 -5
- package/es/input-number/src/utils.d.ts +1 -0
- package/es/input-number/src/utils.js +4 -0
- package/es/input-number/styles/light.d.ts +3 -3
- package/es/locales/common/deDE.js +8 -0
- package/es/locales/common/enUS.d.ts +7 -0
- package/es/locales/common/enUS.js +8 -1
- package/es/locales/common/frFR.d.ts +3 -0
- package/es/locales/common/frFR.js +101 -0
- package/es/locales/common/idID.d.ts +2 -93
- package/es/locales/common/idID.js +8 -0
- package/es/locales/common/jaJP.js +8 -0
- package/es/locales/common/nbNO.js +8 -0
- package/es/locales/common/ruRU.js +8 -0
- package/es/locales/common/ukUA.js +8 -0
- package/es/locales/common/zhCN.js +7 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/frFR.d.ts +3 -0
- package/es/locales/date/frFR.js +6 -0
- package/es/locales/date/idID.d.ts +1 -6
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/modal/src/BodyWrapper.d.ts +6 -6
- package/es/modal/src/Modal.d.ts +36 -36
- package/es/modal/styles/light.d.ts +3 -3
- package/es/page-header/src/PageHeader.js +3 -3
- package/es/page-header/src/styles/index.cssr.js +2 -4
- package/es/popconfirm/src/Popconfirm.d.ts +30 -30
- package/es/popconfirm/styles/light.d.ts +3 -3
- package/es/popover/src/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +3 -3
- package/es/popselect/src/Popselect.d.ts +2 -11
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +3 -11
- package/es/popselect/src/PopselectPanel.js +17 -11
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.js +4 -5
- package/es/radio/src/styles/radio-group.cssr.js +8 -4
- package/es/radio/src/styles/radio.cssr.js +8 -4
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- package/es/switch/src/Switch.d.ts +16 -1
- package/es/switch/src/Switch.js +17 -4
- package/es/switch/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/styles/index.cssr.js +1 -0
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/theme-editor/src/ThemeEditor.js +9 -2
- package/es/time-picker/src/Panel.d.ts +3 -3
- package/es/time-picker/src/TimePicker.d.ts +30 -30
- package/es/time-picker/styles/light.d.ts +3 -3
- package/es/transfer/src/Transfer.d.ts +30 -30
- package/es/transfer/src/TransferFilter.d.ts +3 -3
- package/es/transfer/src/TransferList.d.ts +3 -3
- package/es/transfer/src/TransferListItem.d.ts +3 -3
- package/es/transfer/styles/light.d.ts +3 -3
- package/es/tree/src/Tree.d.ts +8 -4
- package/es/tree/src/Tree.js +32 -6
- package/es/tree-select/src/TreeSelect.d.ts +38 -1
- package/es/tree-select/src/TreeSelect.js +25 -10
- package/es/tree-select/src/styles/index.cssr.js +11 -2
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/upload/src/Upload.d.ts +41 -30
- package/es/upload/src/Upload.js +33 -23
- package/es/upload/src/UploadFile.d.ts +4 -4
- package/es/upload/src/UploadFileList.js +4 -2
- package/es/upload/src/UploadProgress.d.ts +3 -3
- package/es/upload/src/interface.d.ts +1 -0
- package/es/upload/src/styles/index.cssr.js +2 -3
- package/es/upload/styles/light.d.ts +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/close/src/styles/index.cssr.js +6 -5
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/lib/_internal/selection/src/Selection.js +11 -9
- package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
- package/lib/alert/src/Alert.d.ts +20 -20
- package/lib/alert/src/Alert.js +22 -22
- package/lib/alert/src/styles/index.cssr.js +45 -45
- package/lib/anchor/src/AnchorAdapter.js +12 -12
- package/lib/anchor/src/styles/index.cssr.js +41 -41
- package/lib/avatar/src/Avatar.d.ts +5 -3
- package/lib/avatar/src/Avatar.js +7 -5
- package/lib/avatar/src/styles/index.cssr.js +3 -5
- package/lib/button/src/Button.d.ts +60 -60
- package/lib/button/src/Button.js +107 -106
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/dark.js +3 -3
- package/lib/button/styles/light.d.ts +3 -3
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +37 -30
- package/lib/calendar/styles/light.d.ts +3 -3
- package/lib/cascader/src/Cascader.d.ts +135 -0
- package/lib/cascader/src/Cascader.js +2 -4
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +6 -5
- package/lib/cascader/src/CascaderOption.d.ts +18 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/lib/cascader/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +3 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/lib/color-picker/src/ColorPicker.d.ts +27 -27
- package/lib/color-picker/styles/light.d.ts +3 -3
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -0
- package/lib/data-table/src/DataTable.d.ts +30 -30
- package/lib/data-table/src/DataTable.js +6 -13
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +18 -7
- package/lib/data-table/src/TableParts/Body.js +78 -26
- package/lib/data-table/src/TableParts/Cell.d.ts +6 -6
- package/lib/data-table/src/TableParts/Header.d.ts +3 -3
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +9 -12
- package/lib/data-table/src/use-check.js +6 -2
- package/lib/data-table/src/use-scroll.d.ts +2 -0
- package/lib/data-table/src/use-scroll.js +34 -4
- package/lib/data-table/src/use-table-data.js +4 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +94 -69
- package/lib/date-picker/src/DatePicker.js +46 -19
- package/lib/date-picker/src/config.d.ts +1 -9
- package/lib/date-picker/src/config.js +1 -9
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +23 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +21 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +23 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +27 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/lib/date-picker/src/panel/use-calendar.js +34 -16
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
- package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/lib/date-picker/src/panel/use-panel-common.js +3 -2
- package/lib/date-picker/src/utils.d.ts +19 -3
- package/lib/date-picker/src/utils.js +41 -4
- package/lib/date-picker/styles/_common.d.ts +2 -0
- package/lib/date-picker/styles/_common.js +3 -1
- package/lib/date-picker/styles/light.d.ts +10 -6
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/styles/index.cssr.js +1 -0
- package/lib/dialog/styles/light.d.ts +3 -3
- package/lib/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/lib/dynamic-input/src/InputPreset.d.ts +3 -3
- package/lib/dynamic-input/src/PairPreset.d.ts +3 -3
- package/lib/dynamic-input/styles/light.d.ts +3 -3
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/lib/dynamic-tags/styles/light.d.ts +3 -3
- package/lib/element/index.d.ts +1 -0
- package/lib/element/index.js +3 -1
- package/lib/form/src/interface.d.ts +5 -4
- package/lib/image/src/Image.d.ts +25 -16
- package/lib/image/src/Image.js +34 -10
- package/lib/image/src/ImageGroup.js +2 -2
- package/lib/image/src/styles/index.cssr.js +3 -2
- package/lib/input/src/Input.js +2 -0
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +30 -30
- package/lib/input-number/src/InputNumber.js +9 -4
- package/lib/input-number/src/utils.d.ts +1 -0
- package/lib/input-number/src/utils.js +6 -1
- package/lib/input-number/styles/light.d.ts +3 -3
- package/lib/locales/common/deDE.js +8 -0
- package/lib/locales/common/enUS.d.ts +7 -0
- package/lib/locales/common/enUS.js +8 -1
- package/lib/locales/common/frFR.d.ts +3 -0
- package/lib/locales/common/frFR.js +103 -0
- package/lib/locales/common/idID.d.ts +2 -93
- package/lib/locales/common/idID.js +8 -0
- package/lib/locales/common/jaJP.js +8 -0
- package/lib/locales/common/nbNO.js +8 -0
- package/lib/locales/common/ruRU.js +8 -0
- package/lib/locales/common/ukUA.js +8 -0
- package/lib/locales/common/zhCN.js +7 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/frFR.d.ts +3 -0
- package/lib/locales/date/frFR.js +11 -0
- package/lib/locales/date/idID.d.ts +1 -6
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/modal/src/BodyWrapper.d.ts +6 -6
- package/lib/modal/src/Modal.d.ts +36 -36
- package/lib/modal/styles/light.d.ts +3 -3
- package/lib/page-header/src/PageHeader.js +3 -3
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/popconfirm/src/Popconfirm.d.ts +30 -30
- package/lib/popconfirm/styles/light.d.ts +3 -3
- package/lib/popover/src/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +3 -3
- package/lib/popselect/src/Popselect.d.ts +2 -11
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +3 -11
- package/lib/popselect/src/PopselectPanel.js +16 -10
- package/lib/radio/src/Radio.js +3 -3
- package/lib/radio/src/RadioButton.js +4 -5
- package/lib/radio/src/styles/radio-group.cssr.js +8 -4
- package/lib/radio/src/styles/radio.cssr.js +8 -4
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- package/lib/switch/src/Switch.d.ts +16 -1
- package/lib/switch/src/Switch.js +17 -4
- package/lib/switch/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/styles/index.cssr.js +1 -0
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/theme-editor/src/ThemeEditor.js +9 -2
- package/lib/time-picker/src/Panel.d.ts +3 -3
- package/lib/time-picker/src/TimePicker.d.ts +30 -30
- package/lib/time-picker/styles/light.d.ts +3 -3
- package/lib/transfer/src/Transfer.d.ts +30 -30
- package/lib/transfer/src/TransferFilter.d.ts +3 -3
- package/lib/transfer/src/TransferList.d.ts +3 -3
- package/lib/transfer/src/TransferListItem.d.ts +3 -3
- package/lib/transfer/styles/light.d.ts +3 -3
- package/lib/tree/src/Tree.d.ts +8 -4
- package/lib/tree/src/Tree.js +32 -6
- package/lib/tree-select/src/TreeSelect.d.ts +38 -1
- package/lib/tree-select/src/TreeSelect.js +24 -9
- package/lib/tree-select/src/styles/index.cssr.js +11 -2
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/upload/src/Upload.d.ts +41 -30
- package/lib/upload/src/Upload.js +33 -23
- package/lib/upload/src/UploadFile.d.ts +4 -4
- package/lib/upload/src/UploadFileList.js +4 -2
- package/lib/upload/src/UploadProgress.d.ts +3 -3
- package/lib/upload/src/interface.d.ts +1 -0
- package/lib/upload/src/styles/index.cssr.js +2 -3
- package/lib/upload/styles/light.d.ts +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/web-types.json +99 -7
|
@@ -104,9 +104,9 @@ declare const colorPickerLight: import("../../_mixins/use-theme").Theme<"ColorPi
|
|
|
104
104
|
fontSizeMedium: string;
|
|
105
105
|
fontSizeLarge: string;
|
|
106
106
|
opacityDisabled: string;
|
|
107
|
-
colorOpacitySecondary:
|
|
108
|
-
colorOpacitySecondaryHover:
|
|
109
|
-
colorOpacitySecondaryPressed:
|
|
107
|
+
colorOpacitySecondary: string;
|
|
108
|
+
colorOpacitySecondaryHover: string;
|
|
109
|
+
colorOpacitySecondaryPressed: string;
|
|
110
110
|
colorSecondary: string;
|
|
111
111
|
colorSecondaryHover: string;
|
|
112
112
|
colorSecondaryPressed: string;
|
|
@@ -36,6 +36,11 @@ export declare const configProviderProps: {
|
|
|
36
36
|
yearFormat: string;
|
|
37
37
|
monthFormat: string;
|
|
38
38
|
dayFormat: string;
|
|
39
|
+
yearTypeFormat: string;
|
|
40
|
+
monthTypeFormat: string;
|
|
41
|
+
dateFormat: string;
|
|
42
|
+
dateTimeFormat: string;
|
|
43
|
+
quarterFormat: string;
|
|
39
44
|
clear: string;
|
|
40
45
|
now: string;
|
|
41
46
|
confirm: string;
|
|
@@ -44,6 +49,8 @@ export declare const configProviderProps: {
|
|
|
44
49
|
datePlaceholder: string;
|
|
45
50
|
datetimePlaceholder: string;
|
|
46
51
|
monthPlaceholder: string;
|
|
52
|
+
yearPlaceholder: string;
|
|
53
|
+
quarterPlaceholder: string;
|
|
47
54
|
startDatePlaceholder: string;
|
|
48
55
|
endDatePlaceholder: string;
|
|
49
56
|
startDatetimePlaceholder: string;
|
|
@@ -155,6 +162,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
155
162
|
yearFormat: string;
|
|
156
163
|
monthFormat: string;
|
|
157
164
|
dayFormat: string;
|
|
165
|
+
yearTypeFormat: string;
|
|
166
|
+
monthTypeFormat: string;
|
|
167
|
+
dateFormat: string;
|
|
168
|
+
dateTimeFormat: string;
|
|
169
|
+
quarterFormat: string;
|
|
158
170
|
clear: string;
|
|
159
171
|
now: string;
|
|
160
172
|
confirm: string;
|
|
@@ -163,6 +175,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
163
175
|
datePlaceholder: string;
|
|
164
176
|
datetimePlaceholder: string;
|
|
165
177
|
monthPlaceholder: string;
|
|
178
|
+
yearPlaceholder: string;
|
|
179
|
+
quarterPlaceholder: string;
|
|
166
180
|
startDatePlaceholder: string;
|
|
167
181
|
endDatePlaceholder: string;
|
|
168
182
|
startDatetimePlaceholder: string;
|
|
@@ -298,6 +312,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
298
312
|
yearFormat: string;
|
|
299
313
|
monthFormat: string;
|
|
300
314
|
dayFormat: string;
|
|
315
|
+
yearTypeFormat: string;
|
|
316
|
+
monthTypeFormat: string;
|
|
317
|
+
dateFormat: string;
|
|
318
|
+
dateTimeFormat: string;
|
|
319
|
+
quarterFormat: string;
|
|
301
320
|
clear: string;
|
|
302
321
|
now: string;
|
|
303
322
|
confirm: string;
|
|
@@ -306,6 +325,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
306
325
|
datePlaceholder: string;
|
|
307
326
|
datetimePlaceholder: string;
|
|
308
327
|
monthPlaceholder: string;
|
|
328
|
+
yearPlaceholder: string;
|
|
329
|
+
quarterPlaceholder: string;
|
|
309
330
|
startDatePlaceholder: string;
|
|
310
331
|
endDatePlaceholder: string;
|
|
311
332
|
startDatetimePlaceholder: string;
|
|
@@ -170,9 +170,9 @@ export declare const dataTableProps: {
|
|
|
170
170
|
fontSizeMedium: string;
|
|
171
171
|
fontSizeLarge: string;
|
|
172
172
|
opacityDisabled: string;
|
|
173
|
-
colorOpacitySecondary:
|
|
174
|
-
colorOpacitySecondaryHover:
|
|
175
|
-
colorOpacitySecondaryPressed:
|
|
173
|
+
colorOpacitySecondary: string;
|
|
174
|
+
colorOpacitySecondaryHover: string;
|
|
175
|
+
colorOpacitySecondaryPressed: string;
|
|
176
176
|
colorSecondary: string;
|
|
177
177
|
colorSecondaryHover: string;
|
|
178
178
|
colorSecondaryPressed: string;
|
|
@@ -770,9 +770,9 @@ export declare const dataTableProps: {
|
|
|
770
770
|
fontSizeMedium: string;
|
|
771
771
|
fontSizeLarge: string;
|
|
772
772
|
opacityDisabled: string;
|
|
773
|
-
colorOpacitySecondary:
|
|
774
|
-
colorOpacitySecondaryHover:
|
|
775
|
-
colorOpacitySecondaryPressed:
|
|
773
|
+
colorOpacitySecondary: string;
|
|
774
|
+
colorOpacitySecondaryHover: string;
|
|
775
|
+
colorOpacitySecondaryPressed: string;
|
|
776
776
|
colorSecondary: string;
|
|
777
777
|
colorSecondaryHover: string;
|
|
778
778
|
colorSecondaryPressed: string;
|
|
@@ -1370,9 +1370,9 @@ export declare const dataTableProps: {
|
|
|
1370
1370
|
fontSizeMedium: string;
|
|
1371
1371
|
fontSizeLarge: string;
|
|
1372
1372
|
opacityDisabled: string;
|
|
1373
|
-
colorOpacitySecondary:
|
|
1374
|
-
colorOpacitySecondaryHover:
|
|
1375
|
-
colorOpacitySecondaryPressed:
|
|
1373
|
+
colorOpacitySecondary: string;
|
|
1374
|
+
colorOpacitySecondaryHover: string;
|
|
1375
|
+
colorOpacitySecondaryPressed: string;
|
|
1376
1376
|
colorSecondary: string;
|
|
1377
1377
|
colorSecondaryHover: string;
|
|
1378
1378
|
colorSecondaryPressed: string;
|
|
@@ -2078,9 +2078,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2078
2078
|
fontSizeMedium: string;
|
|
2079
2079
|
fontSizeLarge: string;
|
|
2080
2080
|
opacityDisabled: string;
|
|
2081
|
-
colorOpacitySecondary:
|
|
2082
|
-
colorOpacitySecondaryHover:
|
|
2083
|
-
colorOpacitySecondaryPressed:
|
|
2081
|
+
colorOpacitySecondary: string;
|
|
2082
|
+
colorOpacitySecondaryHover: string;
|
|
2083
|
+
colorOpacitySecondaryPressed: string;
|
|
2084
2084
|
colorSecondary: string;
|
|
2085
2085
|
colorSecondaryHover: string;
|
|
2086
2086
|
colorSecondaryPressed: string;
|
|
@@ -2678,9 +2678,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2678
2678
|
fontSizeMedium: string;
|
|
2679
2679
|
fontSizeLarge: string;
|
|
2680
2680
|
opacityDisabled: string;
|
|
2681
|
-
colorOpacitySecondary:
|
|
2682
|
-
colorOpacitySecondaryHover:
|
|
2683
|
-
colorOpacitySecondaryPressed:
|
|
2681
|
+
colorOpacitySecondary: string;
|
|
2682
|
+
colorOpacitySecondaryHover: string;
|
|
2683
|
+
colorOpacitySecondaryPressed: string;
|
|
2684
2684
|
colorSecondary: string;
|
|
2685
2685
|
colorSecondaryHover: string;
|
|
2686
2686
|
colorSecondaryPressed: string;
|
|
@@ -3278,9 +3278,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3278
3278
|
fontSizeMedium: string;
|
|
3279
3279
|
fontSizeLarge: string;
|
|
3280
3280
|
opacityDisabled: string;
|
|
3281
|
-
colorOpacitySecondary:
|
|
3282
|
-
colorOpacitySecondaryHover:
|
|
3283
|
-
colorOpacitySecondaryPressed:
|
|
3281
|
+
colorOpacitySecondary: string;
|
|
3282
|
+
colorOpacitySecondaryHover: string;
|
|
3283
|
+
colorOpacitySecondaryPressed: string;
|
|
3284
3284
|
colorSecondary: string;
|
|
3285
3285
|
colorSecondaryHover: string;
|
|
3286
3286
|
colorSecondaryPressed: string;
|
|
@@ -4037,9 +4037,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4037
4037
|
fontSizeMedium: string;
|
|
4038
4038
|
fontSizeLarge: string;
|
|
4039
4039
|
opacityDisabled: string;
|
|
4040
|
-
colorOpacitySecondary:
|
|
4041
|
-
colorOpacitySecondaryHover:
|
|
4042
|
-
colorOpacitySecondaryPressed:
|
|
4040
|
+
colorOpacitySecondary: string;
|
|
4041
|
+
colorOpacitySecondaryHover: string;
|
|
4042
|
+
colorOpacitySecondaryPressed: string;
|
|
4043
4043
|
colorSecondary: string;
|
|
4044
4044
|
colorSecondaryHover: string;
|
|
4045
4045
|
colorSecondaryPressed: string;
|
|
@@ -4959,9 +4959,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4959
4959
|
fontSizeMedium: string;
|
|
4960
4960
|
fontSizeLarge: string;
|
|
4961
4961
|
opacityDisabled: string;
|
|
4962
|
-
colorOpacitySecondary:
|
|
4963
|
-
colorOpacitySecondaryHover:
|
|
4964
|
-
colorOpacitySecondaryPressed:
|
|
4962
|
+
colorOpacitySecondary: string;
|
|
4963
|
+
colorOpacitySecondaryHover: string;
|
|
4964
|
+
colorOpacitySecondaryPressed: string;
|
|
4965
4965
|
colorSecondary: string;
|
|
4966
4966
|
colorSecondaryHover: string;
|
|
4967
4967
|
colorSecondaryPressed: string;
|
|
@@ -5559,9 +5559,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5559
5559
|
fontSizeMedium: string;
|
|
5560
5560
|
fontSizeLarge: string;
|
|
5561
5561
|
opacityDisabled: string;
|
|
5562
|
-
colorOpacitySecondary:
|
|
5563
|
-
colorOpacitySecondaryHover:
|
|
5564
|
-
colorOpacitySecondaryPressed:
|
|
5562
|
+
colorOpacitySecondary: string;
|
|
5563
|
+
colorOpacitySecondaryHover: string;
|
|
5564
|
+
colorOpacitySecondaryPressed: string;
|
|
5565
5565
|
colorSecondary: string;
|
|
5566
5566
|
colorSecondaryHover: string;
|
|
5567
5567
|
colorSecondaryPressed: string;
|
|
@@ -6159,9 +6159,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6159
6159
|
fontSizeMedium: string;
|
|
6160
6160
|
fontSizeLarge: string;
|
|
6161
6161
|
opacityDisabled: string;
|
|
6162
|
-
colorOpacitySecondary:
|
|
6163
|
-
colorOpacitySecondaryHover:
|
|
6164
|
-
colorOpacitySecondaryPressed:
|
|
6162
|
+
colorOpacitySecondary: string;
|
|
6163
|
+
colorOpacitySecondaryHover: string;
|
|
6164
|
+
colorOpacitySecondaryPressed: string;
|
|
6165
6165
|
colorSecondary: string;
|
|
6166
6166
|
colorSecondaryHover: string;
|
|
6167
6167
|
colorSecondaryPressed: string;
|
|
@@ -8,7 +8,6 @@ const vue_1 = require("vue");
|
|
|
8
8
|
const seemly_1 = require("seemly");
|
|
9
9
|
const _mixins_1 = require("../../_mixins");
|
|
10
10
|
const _internal_1 = require("../../_internal");
|
|
11
|
-
const empty_1 = require("../../empty");
|
|
12
11
|
const pagination_1 = require("../../pagination");
|
|
13
12
|
const _utils_1 = require("../../_utils");
|
|
14
13
|
const styles_1 = require("../styles");
|
|
@@ -113,7 +112,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
113
112
|
name: 'DataTable',
|
|
114
113
|
alias: ['AdvancedTable'],
|
|
115
114
|
props: exports.dataTableProps,
|
|
116
|
-
setup(props) {
|
|
115
|
+
setup(props, { slots }) {
|
|
117
116
|
const { mergedBorderedRef, mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
118
117
|
const mergedBottomBorderedRef = (0, vue_1.computed)(() => {
|
|
119
118
|
const { bottomBordered } = props;
|
|
@@ -137,7 +136,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
137
136
|
paginatedDataRef
|
|
138
137
|
});
|
|
139
138
|
const { mergedExpandedRowKeysRef, renderExpandRef, doUpdateExpandedRowKeys } = (0, use_expand_1.useExpand)(props);
|
|
140
|
-
const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, leftActiveFixedColKeyRef, rightActiveFixedColKeyRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(props, {
|
|
139
|
+
const { handleTableBodyScroll, handleTableHeaderScroll, syncScrollState, setHeaderScrollLeft, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, leftFixedColumnsRef, rightFixedColumnsRef, fixedColumnLeftMapRef, fixedColumnRightMapRef } = (0, use_scroll_1.useScroll)(props, {
|
|
141
140
|
scrollPartRef,
|
|
142
141
|
bodyWidthRef,
|
|
143
142
|
mainTableInstRef,
|
|
@@ -157,6 +156,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
157
156
|
return props.tableLayout;
|
|
158
157
|
});
|
|
159
158
|
(0, vue_1.provide)(interface_1.dataTableInjectionKey, {
|
|
159
|
+
slots,
|
|
160
160
|
indentRef: (0, vue_1.toRef)(props, 'indent'),
|
|
161
161
|
firstContentfulColIndexRef,
|
|
162
162
|
bodyWidthRef,
|
|
@@ -169,7 +169,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
169
169
|
colsRef,
|
|
170
170
|
paginatedDataRef,
|
|
171
171
|
leftActiveFixedColKeyRef,
|
|
172
|
+
leftActiveFixedChildrenColKeysRef,
|
|
172
173
|
rightActiveFixedColKeyRef,
|
|
174
|
+
rightActiveFixedChildrenColKeysRef,
|
|
173
175
|
leftFixedColumnsRef,
|
|
174
176
|
rightFixedColumnsRef,
|
|
175
177
|
fixedColumnLeftMapRef,
|
|
@@ -295,16 +297,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
295
297
|
}
|
|
296
298
|
], style: this.cssVars },
|
|
297
299
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-wrapper` },
|
|
298
|
-
(0, vue_1.h)(MainTable_1.default, { ref: "mainTableInstRef" },
|
|
299
|
-
default: () => this.paginatedData.length === 0 ? ((0, vue_1.h)("div", { class: [
|
|
300
|
-
`${mergedClsPrefix}-data-table-empty`,
|
|
301
|
-
{
|
|
302
|
-
[`${mergedClsPrefix}-data-table-empty--hide`]: this.loading
|
|
303
|
-
}
|
|
304
|
-
] }, (0, vue_1.renderSlot)(this.$slots, 'empty', undefined, () => [
|
|
305
|
-
(0, vue_1.h)(empty_1.NEmpty, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
|
|
306
|
-
]))) : null
|
|
307
|
-
})),
|
|
300
|
+
(0, vue_1.h)(MainTable_1.default, { ref: "mainTableInstRef" })),
|
|
308
301
|
this.pagination ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table__pagination` },
|
|
309
302
|
(0, vue_1.h)(pagination_1.NPagination, Object.assign({ theme: this.mergedTheme.peers.Pagination, themeOverrides: this.mergedTheme.peerOverrides.Pagination, disabled: this.loading }, this.mergedPagination)))) : null,
|
|
310
303
|
(0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
|
|
@@ -178,9 +178,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
178
178
|
fontSizeMedium: string;
|
|
179
179
|
fontSizeLarge: string;
|
|
180
180
|
opacityDisabled: string;
|
|
181
|
-
colorOpacitySecondary:
|
|
182
|
-
colorOpacitySecondaryHover:
|
|
183
|
-
colorOpacitySecondaryPressed:
|
|
181
|
+
colorOpacitySecondary: string;
|
|
182
|
+
colorOpacitySecondaryHover: string;
|
|
183
|
+
colorOpacitySecondaryPressed: string;
|
|
184
184
|
colorSecondary: string;
|
|
185
185
|
colorSecondaryHover: string;
|
|
186
186
|
colorSecondaryPressed: string;
|
|
@@ -203,9 +203,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
203
203
|
fontSizeMedium: string;
|
|
204
204
|
fontSizeLarge: string;
|
|
205
205
|
opacityDisabled: string;
|
|
206
|
-
colorOpacitySecondary:
|
|
207
|
-
colorOpacitySecondaryHover:
|
|
208
|
-
colorOpacitySecondaryPressed:
|
|
206
|
+
colorOpacitySecondary: string;
|
|
207
|
+
colorOpacitySecondaryHover: string;
|
|
208
|
+
colorOpacitySecondaryPressed: string;
|
|
209
209
|
colorSecondary: string;
|
|
210
210
|
colorSecondaryHover: string;
|
|
211
211
|
colorSecondaryPressed: string;
|
|
@@ -72,7 +72,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
72
72
|
const headerInBody = maxHeight === undefined && !flexHeight;
|
|
73
73
|
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-base-table`, ref: "selfElRef" },
|
|
74
74
|
headerInBody ? null : (0, vue_1.h)(Header_1.default, { ref: "headerInstRef" }),
|
|
75
|
-
(0, vue_1.h)(Body_1.default, { ref: "bodyInstRef",
|
|
76
|
-
(0, vue_1.renderSlot)(this.$slots, 'default')));
|
|
75
|
+
(0, vue_1.h)(Body_1.default, { ref: "bodyInstRef", bodyStyle: this.bodyStyle, showHeader: headerInBody, flexHeight: flexHeight, onResize: this.handleBodyResize })));
|
|
77
76
|
}
|
|
78
77
|
});
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { RowKey, TmNode } from '../interface';
|
|
1
|
+
import { PropType, CSSProperties } from 'vue';
|
|
2
|
+
import { RowKey, ColumnKey, TmNode } from '../interface';
|
|
3
3
|
import type { ColItem } from '../use-group-header';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
6
6
|
showHeader: BooleanConstructor;
|
|
7
7
|
flexHeight: BooleanConstructor;
|
|
8
|
+
bodyStyle: PropType<CSSProperties>;
|
|
8
9
|
}, {
|
|
9
10
|
getScrollContainer: () => HTMLElement | null;
|
|
11
|
+
dataTableSlots: Readonly<{
|
|
12
|
+
[name: string]: import("vue").Slot | undefined;
|
|
13
|
+
}>;
|
|
10
14
|
componentId: string;
|
|
11
15
|
scrollbarInstRef: import("vue").Ref<{
|
|
12
16
|
scrollTo: import("../../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
@@ -20,6 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
24
|
itemsElRef: HTMLElement | null;
|
|
21
25
|
scrollTo: import("vueuc/lib/virtual-list/src/VirtualList").ScrollTo;
|
|
22
26
|
} | null>;
|
|
27
|
+
emptyElRef: import("vue").Ref<HTMLElement | null>;
|
|
23
28
|
summary: import("vue").Ref<import("../interface").CreateSummary<import("../interface").InternalRowData> | undefined>;
|
|
24
29
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
25
30
|
mergedTheme: import("vue").Ref<{
|
|
@@ -190,9 +195,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
195
|
fontSizeMedium: string;
|
|
191
196
|
fontSizeLarge: string;
|
|
192
197
|
opacityDisabled: string;
|
|
193
|
-
colorOpacitySecondary:
|
|
194
|
-
colorOpacitySecondaryHover:
|
|
195
|
-
colorOpacitySecondaryPressed:
|
|
198
|
+
colorOpacitySecondary: string;
|
|
199
|
+
colorOpacitySecondaryHover: string;
|
|
200
|
+
colorOpacitySecondaryPressed: string;
|
|
196
201
|
colorSecondary: string;
|
|
197
202
|
colorSecondaryHover: string;
|
|
198
203
|
colorSecondaryPressed: string;
|
|
@@ -976,17 +981,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
976
981
|
}>;
|
|
977
982
|
scrollX: import("vue").Ref<string | number | undefined>;
|
|
978
983
|
cols: import("vue").Ref<ColItem[]>;
|
|
984
|
+
loading: import("vue").Ref<boolean>;
|
|
985
|
+
bodyShowHeaderOnly: import("vue").ComputedRef<boolean>;
|
|
986
|
+
shouldDisplaySomeTablePart: import("vue").ComputedRef<boolean>;
|
|
987
|
+
empty: import("vue").ComputedRef<boolean>;
|
|
979
988
|
paginatedData: import("vue").ComputedRef<{
|
|
980
989
|
tmNode: TmNode;
|
|
981
990
|
key: import("treemate").Key;
|
|
982
991
|
striped: boolean;
|
|
983
992
|
}[]>;
|
|
984
993
|
rawPaginatedData: import("vue").Ref<import("../interface").InternalRowData[]>;
|
|
985
|
-
fixedColumnLeftMap: import("vue").Ref<Record<
|
|
994
|
+
fixedColumnLeftMap: import("vue").Ref<Record<ColumnKey, {
|
|
986
995
|
start: number;
|
|
987
996
|
end: number;
|
|
988
997
|
} | undefined>>;
|
|
989
|
-
fixedColumnRightMap: import("vue").Ref<Record<
|
|
998
|
+
fixedColumnRightMap: import("vue").Ref<Record<ColumnKey, {
|
|
990
999
|
start: number;
|
|
991
1000
|
end: number;
|
|
992
1001
|
} | undefined>>;
|
|
@@ -1019,11 +1028,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1019
1028
|
onResize?: unknown;
|
|
1020
1029
|
showHeader?: unknown;
|
|
1021
1030
|
flexHeight?: unknown;
|
|
1031
|
+
bodyStyle?: unknown;
|
|
1022
1032
|
} & {
|
|
1023
1033
|
flexHeight: boolean;
|
|
1024
1034
|
showHeader: boolean;
|
|
1025
1035
|
} & {
|
|
1026
1036
|
onResize?: ((e: ResizeObserverEntry) => void) | undefined;
|
|
1037
|
+
bodyStyle?: CSSProperties | undefined;
|
|
1027
1038
|
}>, {
|
|
1028
1039
|
flexHeight: boolean;
|
|
1029
1040
|
showHeader: boolean;
|
|
@@ -10,12 +10,14 @@ const vueuc_1 = require("vueuc");
|
|
|
10
10
|
const cssr_1 = require("../../../_utils/cssr");
|
|
11
11
|
const _internal_1 = require("../../../_internal");
|
|
12
12
|
const _utils_1 = require("../../../_utils");
|
|
13
|
+
const empty_1 = require("../../../empty");
|
|
13
14
|
const interface_1 = require("../interface");
|
|
14
15
|
const utils_1 = require("../utils");
|
|
15
16
|
const Cell_1 = __importDefault(require("./Cell"));
|
|
16
17
|
const ExpandTrigger_1 = __importDefault(require("./ExpandTrigger"));
|
|
17
18
|
const BodyCheckbox_1 = __importDefault(require("./BodyCheckbox"));
|
|
18
19
|
const Header_1 = __importDefault(require("./Header"));
|
|
20
|
+
const vooks_1 = require("vooks");
|
|
19
21
|
function flatten(rowInfos, expandedRowKeys) {
|
|
20
22
|
const fRows = [];
|
|
21
23
|
function traverse(rs) {
|
|
@@ -75,14 +77,24 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
75
77
|
props: {
|
|
76
78
|
onResize: Function,
|
|
77
79
|
showHeader: Boolean,
|
|
78
|
-
flexHeight: Boolean
|
|
80
|
+
flexHeight: Boolean,
|
|
81
|
+
bodyStyle: Object
|
|
79
82
|
},
|
|
80
83
|
setup(props) {
|
|
81
|
-
const { mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, rightActiveFixedColKeyRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, hasChildrenRef, firstContentfulColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck
|
|
84
|
+
const { slots: dataTableSlots, mergedExpandedRowKeysRef, mergedClsPrefixRef, mergedThemeRef, scrollXRef, colsRef, paginatedDataRef, rawPaginatedDataRef, fixedColumnLeftMapRef, fixedColumnRightMapRef, mergedCurrentPageRef, rowClassNameRef, leftActiveFixedColKeyRef, leftActiveFixedChildrenColKeysRef, rightActiveFixedColKeyRef, rightActiveFixedChildrenColKeysRef, renderExpandRef, hoverKeyRef, summaryRef, mergedSortStateRef, virtualScrollRef, componentId, scrollPartRef, mergedTableLayoutRef, hasChildrenRef, firstContentfulColIndexRef, indentRef, rowPropsRef, maxHeightRef, stripedRef, loadingRef, setHeaderScrollLeft, doUpdateExpandedRowKeys, handleTableBodyScroll, doCheck, doUncheck
|
|
82
85
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
83
86
|
} = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
|
|
84
87
|
const scrollbarInstRef = (0, vue_1.ref)(null);
|
|
85
88
|
const virtualListRef = (0, vue_1.ref)(null);
|
|
89
|
+
const emptyElRef = (0, vue_1.ref)(null);
|
|
90
|
+
const emptyRef = (0, vooks_1.useMemo)(() => paginatedDataRef.value.length === 0);
|
|
91
|
+
// If header is not inside & empty is displayed, no table part would be
|
|
92
|
+
// shown. So to collect a body width, we need to put a ref on empty element
|
|
93
|
+
const shouldDisplaySomeTablePartRef = (0, vooks_1.useMemo)(() => props.showHeader || !emptyRef.value);
|
|
94
|
+
// If no body is shown, we shouldn't show scrollbar
|
|
95
|
+
const bodyShowHeaderOnlyRef = (0, vooks_1.useMemo)(() => {
|
|
96
|
+
return props.showHeader || emptyRef.value;
|
|
97
|
+
});
|
|
86
98
|
let lastSelectedKey = '';
|
|
87
99
|
const mergedExpandedRowKeySetRef = (0, vue_1.computed)(() => {
|
|
88
100
|
return new Set(mergedExpandedRowKeysRef.value);
|
|
@@ -119,6 +131,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
119
131
|
lastSelectedKey = tmNode.key;
|
|
120
132
|
}
|
|
121
133
|
function getScrollContainer() {
|
|
134
|
+
if (!shouldDisplaySomeTablePartRef.value) {
|
|
135
|
+
const { value: emptyEl } = emptyElRef;
|
|
136
|
+
if (emptyEl) {
|
|
137
|
+
return emptyEl;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
122
143
|
if (virtualScrollRef.value) {
|
|
123
144
|
return virtualListContainer();
|
|
124
145
|
}
|
|
@@ -170,36 +191,47 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
170
191
|
};
|
|
171
192
|
// manually control shadow style to avoid rerender
|
|
172
193
|
const style = (0, cssr_1.c)([
|
|
173
|
-
({ props: cProps }) =>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
194
|
+
({ props: cProps }) => {
|
|
195
|
+
const createActiveLeftFixedStyle = (leftActiveFixedColKey) => {
|
|
196
|
+
if (leftActiveFixedColKey === null)
|
|
197
|
+
return null;
|
|
198
|
+
return (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${leftActiveFixedColKey}"]::after`, { boxShadow: 'var(--box-shadow-after)' });
|
|
199
|
+
};
|
|
200
|
+
const createActiveRightFixedStyle = (rightActiveFixedColKey) => {
|
|
201
|
+
if (rightActiveFixedColKey === null)
|
|
202
|
+
return null;
|
|
203
|
+
return (0, cssr_1.c)(`[data-n-id="${cProps.componentId}"] [data-col-key="${rightActiveFixedColKey}"]::before`, { boxShadow: 'var(--box-shadow-before)' });
|
|
204
|
+
};
|
|
205
|
+
return (0, cssr_1.c)([
|
|
206
|
+
createActiveLeftFixedStyle(cProps.leftActiveFixedColKey),
|
|
207
|
+
createActiveRightFixedStyle(cProps.rightActiveFixedColKey),
|
|
208
|
+
cProps.leftActiveFixedChildrenColKeys.map((leftActiveFixedColKey) => createActiveLeftFixedStyle(leftActiveFixedColKey)),
|
|
209
|
+
cProps.rightActiveFixedChildrenColKeys.map((rightActiveFixedColKey) => createActiveRightFixedStyle(rightActiveFixedColKey))
|
|
210
|
+
]);
|
|
211
|
+
}
|
|
185
212
|
]);
|
|
186
213
|
let fixedStyleMounted = false;
|
|
187
214
|
(0, vue_1.watchEffect)(() => {
|
|
188
215
|
const { value: leftActiveFixedColKey } = leftActiveFixedColKeyRef;
|
|
216
|
+
const { value: leftActiveFixedChildrenColKeys } = leftActiveFixedChildrenColKeysRef;
|
|
189
217
|
const { value: rightActiveFixedColKey } = rightActiveFixedColKeyRef;
|
|
218
|
+
const { value: rightActiveFixedChildrenColKeys } = rightActiveFixedChildrenColKeysRef;
|
|
190
219
|
if (!fixedStyleMounted &&
|
|
191
220
|
leftActiveFixedColKey === null &&
|
|
192
221
|
rightActiveFixedColKey === null) {
|
|
193
222
|
return;
|
|
194
223
|
}
|
|
224
|
+
const cProps = {
|
|
225
|
+
leftActiveFixedColKey,
|
|
226
|
+
leftActiveFixedChildrenColKeys,
|
|
227
|
+
rightActiveFixedColKey,
|
|
228
|
+
rightActiveFixedChildrenColKeys,
|
|
229
|
+
componentId
|
|
230
|
+
};
|
|
195
231
|
style.mount({
|
|
196
232
|
id: `n-${componentId}`,
|
|
197
233
|
force: true,
|
|
198
|
-
props:
|
|
199
|
-
leftActiveFixedColKey,
|
|
200
|
-
rightActiveFixedColKey,
|
|
201
|
-
componentId
|
|
202
|
-
}
|
|
234
|
+
props: cProps
|
|
203
235
|
});
|
|
204
236
|
fixedStyleMounted = true;
|
|
205
237
|
});
|
|
@@ -208,9 +240,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
208
240
|
id: `n-${componentId}`
|
|
209
241
|
});
|
|
210
242
|
});
|
|
211
|
-
return Object.assign({
|
|
243
|
+
return Object.assign({ dataTableSlots,
|
|
244
|
+
componentId,
|
|
212
245
|
scrollbarInstRef,
|
|
213
|
-
virtualListRef,
|
|
246
|
+
virtualListRef,
|
|
247
|
+
emptyElRef, summary: summaryRef, mergedClsPrefix: mergedClsPrefixRef, mergedTheme: mergedThemeRef, scrollX: scrollXRef, cols: colsRef, loading: loadingRef, bodyShowHeaderOnly: bodyShowHeaderOnlyRef, shouldDisplaySomeTablePart: shouldDisplaySomeTablePartRef, empty: emptyRef, paginatedData: (0, vue_1.computed)(() => {
|
|
214
248
|
const { value: striped } = stripedRef;
|
|
215
249
|
return paginatedDataRef.value.map(striped
|
|
216
250
|
? (tmNode, index) => {
|
|
@@ -252,13 +286,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
252
286
|
};
|
|
253
287
|
if (scrollX)
|
|
254
288
|
contentStyle.width = '100%';
|
|
255
|
-
|
|
289
|
+
const tableNode = ((0, vue_1.h)(_internal_1.NScrollbar, { ref: "scrollbarInstRef", scrollable: scrollable || isBasicAutoLayout, showScrollbar: !this.bodyShowHeaderOnly, class: `${mergedClsPrefix}-data-table-base-table-body`, style: this.bodyStyle, theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, contentStyle: contentStyle, container: virtualScroll ? this.virtualListContainer : undefined, content: virtualScroll ? this.virtualListContent : undefined, horizontalRailStyle: { zIndex: 3 }, verticalRailStyle: { zIndex: 3 }, xScrollable: xScrollable, onScroll: virtualScroll ? undefined : this.handleTableBodyScroll, internalOnUpdateScrollLeft: setHeaderScrollLeft, onResize: onResize }, {
|
|
256
290
|
default: () => {
|
|
257
291
|
// coordinate to pass if there are cells that cross row & col
|
|
258
292
|
const cordToPass = {};
|
|
259
293
|
// coordinate to related hover keys
|
|
260
294
|
const cordKey = {};
|
|
261
|
-
const { cols, paginatedData, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId,
|
|
295
|
+
const { cols, paginatedData, mergedTheme, fixedColumnLeftMap, fixedColumnRightMap, currentPage, rowClassName, mergedSortState, mergedExpandedRowKeySet, componentId, hasChildren, firstContentfulColIndex, rowProps, handleMouseenterTable, handleMouseleaveTable, renderExpand, summary, handleCheckboxUpdateChecked, handleUpdateExpanded } = this;
|
|
262
296
|
const { length: colCount } = cols;
|
|
263
297
|
let mergedData;
|
|
264
298
|
// if there is children in data, we should expand mergedData first
|
|
@@ -343,6 +377,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
343
377
|
this.hoverKey = rowKey;
|
|
344
378
|
}, key: rowKey, class: [
|
|
345
379
|
`${mergedClsPrefix}-data-table-tr`,
|
|
380
|
+
isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
|
|
346
381
|
striped && `${mergedClsPrefix}-data-table-tr--striped`,
|
|
347
382
|
mergedRowClassName
|
|
348
383
|
] }, props), cols.map((col, colIndex) => {
|
|
@@ -441,10 +476,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
441
476
|
tableLayout: this.mergedTableLayout
|
|
442
477
|
} },
|
|
443
478
|
(0, vue_1.h)("colgroup", null, cols.map((col) => ((0, vue_1.h)("col", { key: col.key, style: col.style })))),
|
|
444
|
-
showHeader ? (0, vue_1.h)(Header_1.default, { discrete: false }) : null,
|
|
445
|
-
(0, vue_1.h)("tbody", { "data-n-id": componentId, class: `${mergedClsPrefix}-data-table-tbody` }, displayedData.map((rowInfo, rowIndex) => {
|
|
479
|
+
this.showHeader ? (0, vue_1.h)(Header_1.default, { discrete: false }) : null,
|
|
480
|
+
!this.empty ? ((0, vue_1.h)("tbody", { "data-n-id": componentId, class: `${mergedClsPrefix}-data-table-tbody` }, displayedData.map((rowInfo, rowIndex) => {
|
|
446
481
|
return renderRow(rowInfo, rowIndex, false);
|
|
447
|
-
}))));
|
|
482
|
+
}))) : null));
|
|
448
483
|
}
|
|
449
484
|
else {
|
|
450
485
|
return ((0, vue_1.h)(vueuc_1.VirtualList, { ref: "virtualListRef", items: displayedData, itemSize: 28, visibleItemsTag: VirtualListItemWrapper, visibleItemsProps: {
|
|
@@ -459,5 +494,22 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
459
494
|
}
|
|
460
495
|
}
|
|
461
496
|
}));
|
|
497
|
+
if (this.empty) {
|
|
498
|
+
const createEmptyNode = () => ((0, vue_1.h)("div", { class: [
|
|
499
|
+
`${mergedClsPrefix}-data-table-empty`,
|
|
500
|
+
this.loading && `${mergedClsPrefix}-data-table-empty--hide`
|
|
501
|
+
], style: this.bodyStyle, ref: "emptyElRef" }, (0, vue_1.renderSlot)(this.dataTableSlots, 'empty', undefined, () => [
|
|
502
|
+
(0, vue_1.h)(empty_1.NEmpty, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })
|
|
503
|
+
])));
|
|
504
|
+
if (this.shouldDisplaySomeTablePart) {
|
|
505
|
+
return ((0, vue_1.h)(vue_1.Fragment, null,
|
|
506
|
+
tableNode,
|
|
507
|
+
createEmptyNode()));
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
return ((0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.onResize }, { default: createEmptyNode }));
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return tableNode;
|
|
462
514
|
}
|
|
463
515
|
});
|
|
@@ -183,9 +183,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
183
183
|
fontSizeMedium: string;
|
|
184
184
|
fontSizeLarge: string;
|
|
185
185
|
opacityDisabled: string;
|
|
186
|
-
colorOpacitySecondary:
|
|
187
|
-
colorOpacitySecondaryHover:
|
|
188
|
-
colorOpacitySecondaryPressed:
|
|
186
|
+
colorOpacitySecondary: string;
|
|
187
|
+
colorOpacitySecondaryHover: string;
|
|
188
|
+
colorOpacitySecondaryPressed: string;
|
|
189
189
|
colorSecondary: string;
|
|
190
190
|
colorSecondaryHover: string;
|
|
191
191
|
colorSecondaryPressed: string;
|
|
@@ -1147,9 +1147,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1147
1147
|
fontSizeMedium: string;
|
|
1148
1148
|
fontSizeLarge: string;
|
|
1149
1149
|
opacityDisabled: string;
|
|
1150
|
-
colorOpacitySecondary:
|
|
1151
|
-
colorOpacitySecondaryHover:
|
|
1152
|
-
colorOpacitySecondaryPressed:
|
|
1150
|
+
colorOpacitySecondary: string;
|
|
1151
|
+
colorOpacitySecondaryHover: string;
|
|
1152
|
+
colorOpacitySecondaryPressed: string;
|
|
1153
1153
|
colorSecondary: string;
|
|
1154
1154
|
colorSecondaryHover: string;
|
|
1155
1155
|
colorSecondaryPressed: string;
|
|
@@ -190,9 +190,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
190
|
fontSizeMedium: string;
|
|
191
191
|
fontSizeLarge: string;
|
|
192
192
|
opacityDisabled: string;
|
|
193
|
-
colorOpacitySecondary:
|
|
194
|
-
colorOpacitySecondaryHover:
|
|
195
|
-
colorOpacitySecondaryPressed:
|
|
193
|
+
colorOpacitySecondary: string;
|
|
194
|
+
colorOpacitySecondaryHover: string;
|
|
195
|
+
colorOpacitySecondaryPressed: string;
|
|
196
196
|
colorSecondary: string;
|
|
197
197
|
colorSecondaryHover: string;
|
|
198
198
|
colorSecondaryPressed: string;
|
|
@@ -31,7 +31,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
32
|
} = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
|
|
33
33
|
function handleCheckboxUpdateChecked() {
|
|
34
|
-
if (
|
|
34
|
+
if (allRowsCheckedRef.value) {
|
|
35
35
|
doUncheckAll();
|
|
36
36
|
}
|
|
37
37
|
else {
|