naive-ui 2.21.4 → 2.23.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/es/_internal/close/src/styles/index.cssr.js +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +4 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +5 -2
- package/es/_internal/selection/src/Selection.js +11 -9
- package/es/_internal/selection/src/styles/index.cssr.js +6 -2
- package/es/_utils/composable/use-houdini.js +10 -7
- 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/auto-complete/src/AutoComplete.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +4 -4
- package/es/avatar/src/Avatar.d.ts +10 -8
- package/es/avatar/src/Avatar.js +11 -9
- package/es/avatar/src/styles/index.cssr.js +14 -16
- package/es/back-top/src/BackTop.d.ts +13 -13
- package/es/back-top/src/BackTop.js +13 -13
- package/es/back-top/src/styles/index.cssr.js +29 -29
- package/es/badge/src/Badge.d.ts +6 -6
- package/es/badge/src/Badge.js +6 -6
- package/es/badge/src/styles/index.cssr.js +15 -15
- package/es/button/src/Button.d.ts +43 -38
- package/es/button/src/Button.js +124 -116
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +6 -0
- 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/config-provider/src/ConfigProvider.d.ts +18 -0
- package/es/data-table/src/DataTable.js +7 -13
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +15 -4
- package/es/data-table/src/TableParts/Body.js +80 -28
- package/es/data-table/src/TableParts/Cell.js +2 -3
- package/es/data-table/src/TableParts/Header.js +2 -2
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +4 -3
- 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 +3 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +30 -5
- package/es/date-picker/src/DatePicker.js +32 -9
- 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 +17 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +15 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +17 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +15 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +21 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +17 -39
- package/es/date-picker/src/panel/use-calendar.js +41 -23
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +13 -36
- package/es/date-picker/src/panel/use-dual-calendar.js +35 -21
- package/es/date-picker/src/panel/use-panel-common.d.ts +13 -32
- package/es/date-picker/src/panel/use-panel-common.js +4 -8
- 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 +4 -0
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/Dialog.js +23 -23
- package/es/dialog/src/styles/index.cssr.js +45 -45
- package/es/divider/src/Divider.d.ts +4 -4
- package/es/divider/src/Divider.js +4 -4
- package/es/divider/src/styles/index.cssr.js +12 -12
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/es/form/src/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +27 -27
- package/es/form/src/FormItemCol.d.ts +27 -27
- package/es/form/src/FormItemGridItem.d.ts +27 -27
- package/es/form/src/FormItemRow.d.ts +27 -27
- package/es/form/styles/_common.d.ts +0 -3
- package/es/form/styles/_common.js +0 -3
- package/es/form/styles/light.d.ts +3 -3
- package/es/form/styles/light.js +2 -2
- package/es/image/src/Image.js +8 -12
- package/es/input/src/Input.js +2 -0
- package/es/input-number/src/InputNumber.js +2 -0
- package/es/input-number/src/utils.js +1 -1
- package/es/locales/common/deDE.js +6 -0
- package/es/locales/common/enUS.d.ts +6 -0
- package/es/locales/common/enUS.js +7 -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 -94
- package/es/locales/common/idID.js +6 -0
- package/es/locales/common/jaJP.js +6 -0
- package/es/locales/common/nbNO.js +6 -0
- package/es/locales/common/ruRU.js +6 -0
- package/es/locales/common/ukUA.js +6 -0
- package/es/locales/common/zhCN.js +6 -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/log/src/Log.d.ts +6 -6
- package/es/log/src/Log.js +6 -6
- package/es/log/src/styles/index.cssr.js +16 -18
- package/es/page-header/src/PageHeader.js +3 -3
- package/es/page-header/src/styles/index.cssr.js +2 -4
- 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/steps/src/Step.d.ts +12 -12
- package/es/steps/src/Step.js +12 -12
- package/es/steps/src/styles/index.cssr.js +46 -46
- package/es/switch/src/Switch.d.ts +19 -19
- package/es/switch/src/Switch.js +26 -19
- package/es/switch/src/styles/index.cssr.js +59 -57
- package/es/tabs/src/styles/index.cssr.js +1 -0
- package/es/tag/src/Tag.d.ts +26 -26
- package/es/tag/src/Tag.js +26 -26
- package/es/tag/src/styles/index.cssr.js +55 -55
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +17 -17
- package/es/time-picker/src/TimePicker.js +17 -17
- package/es/time-picker/src/styles/index.cssr.js +47 -47
- package/es/timeline/src/TimelineItem.d.ts +12 -12
- package/es/timeline/src/TimelineItem.js +12 -12
- package/es/timeline/src/styles/index.cssr.js +44 -44
- package/es/transfer/src/styles/index.cssr.js +9 -4
- package/es/tree/src/Tree.d.ts +11 -11
- package/es/tree/src/Tree.js +11 -11
- package/es/tree/src/dnd.js +2 -2
- package/es/tree/src/styles/index.cssr.js +33 -33
- package/es/tree-select/src/TreeSelect.d.ts +43 -6
- package/es/tree-select/src/TreeSelect.js +29 -14
- package/es/tree-select/src/styles/index.cssr.js +20 -11
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/a.js +2 -2
- package/es/typography/src/blockquote.d.ts +5 -5
- package/es/typography/src/blockquote.js +5 -5
- package/es/typography/src/create-header.d.ts +8 -8
- package/es/typography/src/create-header.js +8 -8
- package/es/typography/src/headers.d.ts +48 -48
- package/es/typography/src/hr.d.ts +2 -1
- package/es/typography/src/hr.js +3 -1
- package/es/typography/src/ol.d.ts +7 -7
- package/es/typography/src/ol.js +7 -7
- package/es/typography/src/p.d.ts +5 -5
- package/es/typography/src/p.js +5 -5
- package/es/typography/src/styles/a.cssr.js +6 -6
- package/es/typography/src/styles/blockquote.cssr.js +11 -11
- package/es/typography/src/styles/header.cssr.js +19 -19
- package/es/typography/src/styles/hr.cssr.js +3 -3
- package/es/typography/src/styles/list.cssr.js +15 -15
- package/es/typography/src/styles/p.cssr.js +10 -10
- package/es/typography/src/styles/text.cssr.js +18 -18
- package/es/typography/src/text.d.ts +8 -7
- package/es/typography/src/text.js +9 -8
- package/es/typography/src/ul.d.ts +7 -7
- package/es/typography/src/ul.js +7 -7
- package/es/upload/src/Upload.js +16 -16
- package/es/upload/src/styles/index.cssr.js +36 -36
- 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 +4 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +5 -2
- package/lib/_internal/selection/src/Selection.js +11 -9
- package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
- package/lib/_utils/composable/use-houdini.js +10 -7
- 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/auto-complete/src/AutoComplete.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/auto-complete/src/styles/index.cssr.js +4 -4
- package/lib/avatar/src/Avatar.d.ts +10 -8
- package/lib/avatar/src/Avatar.js +11 -9
- package/lib/avatar/src/styles/index.cssr.js +14 -16
- package/lib/back-top/src/BackTop.d.ts +13 -13
- package/lib/back-top/src/BackTop.js +13 -13
- package/lib/back-top/src/styles/index.cssr.js +29 -29
- package/lib/badge/src/Badge.d.ts +6 -6
- package/lib/badge/src/Badge.js +6 -6
- package/lib/badge/src/styles/index.cssr.js +15 -15
- package/lib/button/src/Button.d.ts +43 -38
- package/lib/button/src/Button.js +123 -115
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +6 -0
- 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/config-provider/src/ConfigProvider.d.ts +18 -0
- package/lib/data-table/src/DataTable.js +6 -12
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +15 -4
- package/lib/data-table/src/TableParts/Body.js +78 -26
- package/lib/data-table/src/TableParts/Cell.js +2 -3
- package/lib/data-table/src/TableParts/Header.js +2 -2
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +4 -3
- 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 +3 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +30 -5
- package/lib/date-picker/src/DatePicker.js +31 -8
- 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 +17 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +15 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +17 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +15 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +21 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +17 -39
- package/lib/date-picker/src/panel/use-calendar.js +40 -21
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +13 -36
- package/lib/date-picker/src/panel/use-dual-calendar.js +34 -19
- package/lib/date-picker/src/panel/use-panel-common.d.ts +13 -32
- package/lib/date-picker/src/panel/use-panel-common.js +5 -8
- 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 +4 -0
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/Dialog.js +23 -23
- package/lib/dialog/src/styles/index.cssr.js +45 -45
- package/lib/divider/src/Divider.d.ts +4 -4
- package/lib/divider/src/Divider.js +4 -4
- package/lib/divider/src/styles/index.cssr.js +12 -12
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/lib/form/src/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +27 -27
- package/lib/form/src/FormItemCol.d.ts +27 -27
- package/lib/form/src/FormItemGridItem.d.ts +27 -27
- package/lib/form/src/FormItemRow.d.ts +27 -27
- package/lib/form/styles/_common.d.ts +0 -3
- package/lib/form/styles/_common.js +0 -3
- package/lib/form/styles/light.d.ts +3 -3
- package/lib/form/styles/light.js +2 -2
- package/lib/image/src/Image.js +7 -11
- package/lib/input/src/Input.js +2 -0
- package/lib/input-number/src/InputNumber.js +2 -0
- package/lib/input-number/src/utils.js +1 -1
- package/lib/locales/common/deDE.js +6 -0
- package/lib/locales/common/enUS.d.ts +6 -0
- package/lib/locales/common/enUS.js +7 -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 -94
- package/lib/locales/common/idID.js +6 -0
- package/lib/locales/common/jaJP.js +6 -0
- package/lib/locales/common/nbNO.js +6 -0
- package/lib/locales/common/ruRU.js +6 -0
- package/lib/locales/common/ukUA.js +6 -0
- package/lib/locales/common/zhCN.js +6 -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/log/src/Log.d.ts +6 -6
- package/lib/log/src/Log.js +6 -6
- package/lib/log/src/styles/index.cssr.js +16 -18
- package/lib/page-header/src/PageHeader.js +3 -3
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- 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/steps/src/Step.d.ts +12 -12
- package/lib/steps/src/Step.js +12 -12
- package/lib/steps/src/styles/index.cssr.js +46 -46
- package/lib/switch/src/Switch.d.ts +19 -19
- package/lib/switch/src/Switch.js +26 -19
- package/lib/switch/src/styles/index.cssr.js +59 -57
- package/lib/tabs/src/styles/index.cssr.js +1 -0
- package/lib/tag/src/Tag.d.ts +26 -26
- package/lib/tag/src/Tag.js +26 -26
- package/lib/tag/src/styles/index.cssr.js +55 -55
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +17 -17
- package/lib/time-picker/src/TimePicker.js +17 -17
- package/lib/time-picker/src/styles/index.cssr.js +47 -47
- package/lib/timeline/src/TimelineItem.d.ts +12 -12
- package/lib/timeline/src/TimelineItem.js +12 -12
- package/lib/timeline/src/styles/index.cssr.js +44 -44
- package/lib/transfer/src/styles/index.cssr.js +9 -4
- package/lib/tree/src/Tree.d.ts +11 -11
- package/lib/tree/src/Tree.js +11 -11
- package/lib/tree/src/dnd.js +2 -2
- package/lib/tree/src/styles/index.cssr.js +33 -33
- package/lib/tree-select/src/TreeSelect.d.ts +43 -6
- package/lib/tree-select/src/TreeSelect.js +28 -13
- package/lib/tree-select/src/styles/index.cssr.js +20 -11
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/a.js +2 -2
- package/lib/typography/src/blockquote.d.ts +5 -5
- package/lib/typography/src/blockquote.js +5 -5
- package/lib/typography/src/create-header.d.ts +8 -8
- package/lib/typography/src/create-header.js +8 -8
- package/lib/typography/src/headers.d.ts +48 -48
- package/lib/typography/src/hr.d.ts +2 -1
- package/lib/typography/src/hr.js +3 -1
- package/lib/typography/src/ol.d.ts +7 -7
- package/lib/typography/src/ol.js +7 -7
- package/lib/typography/src/p.d.ts +5 -5
- package/lib/typography/src/p.js +5 -5
- package/lib/typography/src/styles/a.cssr.js +6 -6
- package/lib/typography/src/styles/blockquote.cssr.js +11 -11
- package/lib/typography/src/styles/header.cssr.js +19 -19
- package/lib/typography/src/styles/hr.cssr.js +3 -3
- package/lib/typography/src/styles/list.cssr.js +15 -15
- package/lib/typography/src/styles/p.cssr.js +10 -10
- package/lib/typography/src/styles/text.cssr.js +18 -18
- package/lib/typography/src/text.d.ts +8 -7
- package/lib/typography/src/text.js +9 -8
- package/lib/typography/src/ul.d.ts +7 -7
- package/lib/typography/src/ul.js +7 -7
- package/lib/upload/src/Upload.js +16 -16
- package/lib/upload/src/styles/index.cssr.js +36 -36
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +29 -28
- package/web-types.json +25 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes, Ref } from 'vue';
|
|
2
2
|
import { FollowerPlacement } from 'vueuc';
|
|
3
3
|
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
4
|
-
import
|
|
4
|
+
import { DatePickerType } from './config';
|
|
5
|
+
import type { OnUpdateValue, Value, IsDateDisabled, IsTimeDisabled, Shortcuts, FirstDayOfWeek, DefaultTime } from './interface';
|
|
5
6
|
declare const datePickerProps: {
|
|
6
7
|
readonly to: {
|
|
7
8
|
type: PropType<string | boolean | HTMLElement>;
|
|
@@ -17,6 +18,7 @@ declare const datePickerProps: {
|
|
|
17
18
|
readonly type: PropType<Value | null>;
|
|
18
19
|
readonly default: null;
|
|
19
20
|
};
|
|
21
|
+
readonly defaultTime: PropType<DefaultTime>;
|
|
20
22
|
readonly disabled: {
|
|
21
23
|
readonly type: PropType<boolean | undefined>;
|
|
22
24
|
readonly default: undefined;
|
|
@@ -28,7 +30,7 @@ declare const datePickerProps: {
|
|
|
28
30
|
readonly value: PropType<Value | null>;
|
|
29
31
|
readonly size: PropType<"small" | "medium" | "large">;
|
|
30
32
|
readonly type: {
|
|
31
|
-
readonly type: PropType<
|
|
33
|
+
readonly type: PropType<DatePickerType>;
|
|
32
34
|
readonly default: "date";
|
|
33
35
|
};
|
|
34
36
|
readonly separator: StringConstructor;
|
|
@@ -108,12 +110,14 @@ declare const datePickerProps: {
|
|
|
108
110
|
calendarLeftPaddingDatetimerange: string;
|
|
109
111
|
calendarLeftPaddingMonth: string;
|
|
110
112
|
calendarLeftPaddingYear: string;
|
|
113
|
+
calendarLeftPaddingQuarter: string;
|
|
111
114
|
calendarRightPaddingDate: string;
|
|
112
115
|
calendarRightPaddingDatetime: string;
|
|
113
116
|
calendarRightPaddingDaterange: string;
|
|
114
117
|
calendarRightPaddingDatetimerange: string;
|
|
115
118
|
calendarRightPaddingMonth: string;
|
|
116
119
|
calendarRightPaddingYear: string;
|
|
120
|
+
calendarRightPaddingQuarter: string;
|
|
117
121
|
}, {
|
|
118
122
|
Input: import("../../_mixins").Theme<"Input", {
|
|
119
123
|
countTextColor: string;
|
|
@@ -717,12 +721,14 @@ declare const datePickerProps: {
|
|
|
717
721
|
calendarLeftPaddingDatetimerange: string;
|
|
718
722
|
calendarLeftPaddingMonth: string;
|
|
719
723
|
calendarLeftPaddingYear: string;
|
|
724
|
+
calendarLeftPaddingQuarter: string;
|
|
720
725
|
calendarRightPaddingDate: string;
|
|
721
726
|
calendarRightPaddingDatetime: string;
|
|
722
727
|
calendarRightPaddingDaterange: string;
|
|
723
728
|
calendarRightPaddingDatetimerange: string;
|
|
724
729
|
calendarRightPaddingMonth: string;
|
|
725
730
|
calendarRightPaddingYear: string;
|
|
731
|
+
calendarRightPaddingQuarter: string;
|
|
726
732
|
}, {
|
|
727
733
|
Input: import("../../_mixins").Theme<"Input", {
|
|
728
734
|
countTextColor: string;
|
|
@@ -1326,12 +1332,14 @@ declare const datePickerProps: {
|
|
|
1326
1332
|
calendarLeftPaddingDatetimerange: string;
|
|
1327
1333
|
calendarLeftPaddingMonth: string;
|
|
1328
1334
|
calendarLeftPaddingYear: string;
|
|
1335
|
+
calendarLeftPaddingQuarter: string;
|
|
1329
1336
|
calendarRightPaddingDate: string;
|
|
1330
1337
|
calendarRightPaddingDatetime: string;
|
|
1331
1338
|
calendarRightPaddingDaterange: string;
|
|
1332
1339
|
calendarRightPaddingDatetimerange: string;
|
|
1333
1340
|
calendarRightPaddingMonth: string;
|
|
1334
1341
|
calendarRightPaddingYear: string;
|
|
1342
|
+
calendarRightPaddingQuarter: string;
|
|
1335
1343
|
}, {
|
|
1336
1344
|
Input: import("../../_mixins").Theme<"Input", {
|
|
1337
1345
|
countTextColor: string;
|
|
@@ -1906,6 +1914,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1906
1914
|
readonly type: PropType<Value | null>;
|
|
1907
1915
|
readonly default: null;
|
|
1908
1916
|
};
|
|
1917
|
+
readonly defaultTime: PropType<DefaultTime>;
|
|
1909
1918
|
readonly disabled: {
|
|
1910
1919
|
readonly type: PropType<boolean | undefined>;
|
|
1911
1920
|
readonly default: undefined;
|
|
@@ -1917,7 +1926,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1917
1926
|
readonly value: PropType<Value | null>;
|
|
1918
1927
|
readonly size: PropType<"small" | "medium" | "large">;
|
|
1919
1928
|
readonly type: {
|
|
1920
|
-
readonly type: PropType<
|
|
1929
|
+
readonly type: PropType<DatePickerType>;
|
|
1921
1930
|
readonly default: "date";
|
|
1922
1931
|
};
|
|
1923
1932
|
readonly separator: StringConstructor;
|
|
@@ -1997,12 +2006,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1997
2006
|
calendarLeftPaddingDatetimerange: string;
|
|
1998
2007
|
calendarLeftPaddingMonth: string;
|
|
1999
2008
|
calendarLeftPaddingYear: string;
|
|
2009
|
+
calendarLeftPaddingQuarter: string;
|
|
2000
2010
|
calendarRightPaddingDate: string;
|
|
2001
2011
|
calendarRightPaddingDatetime: string;
|
|
2002
2012
|
calendarRightPaddingDaterange: string;
|
|
2003
2013
|
calendarRightPaddingDatetimerange: string;
|
|
2004
2014
|
calendarRightPaddingMonth: string;
|
|
2005
2015
|
calendarRightPaddingYear: string;
|
|
2016
|
+
calendarRightPaddingQuarter: string;
|
|
2006
2017
|
}, {
|
|
2007
2018
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2008
2019
|
countTextColor: string;
|
|
@@ -2606,12 +2617,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2606
2617
|
calendarLeftPaddingDatetimerange: string;
|
|
2607
2618
|
calendarLeftPaddingMonth: string;
|
|
2608
2619
|
calendarLeftPaddingYear: string;
|
|
2620
|
+
calendarLeftPaddingQuarter: string;
|
|
2609
2621
|
calendarRightPaddingDate: string;
|
|
2610
2622
|
calendarRightPaddingDatetime: string;
|
|
2611
2623
|
calendarRightPaddingDaterange: string;
|
|
2612
2624
|
calendarRightPaddingDatetimerange: string;
|
|
2613
2625
|
calendarRightPaddingMonth: string;
|
|
2614
2626
|
calendarRightPaddingYear: string;
|
|
2627
|
+
calendarRightPaddingQuarter: string;
|
|
2615
2628
|
}, {
|
|
2616
2629
|
Input: import("../../_mixins").Theme<"Input", {
|
|
2617
2630
|
countTextColor: string;
|
|
@@ -3215,12 +3228,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3215
3228
|
calendarLeftPaddingDatetimerange: string;
|
|
3216
3229
|
calendarLeftPaddingMonth: string;
|
|
3217
3230
|
calendarLeftPaddingYear: string;
|
|
3231
|
+
calendarLeftPaddingQuarter: string;
|
|
3218
3232
|
calendarRightPaddingDate: string;
|
|
3219
3233
|
calendarRightPaddingDatetime: string;
|
|
3220
3234
|
calendarRightPaddingDaterange: string;
|
|
3221
3235
|
calendarRightPaddingDatetimerange: string;
|
|
3222
3236
|
calendarRightPaddingMonth: string;
|
|
3223
3237
|
calendarRightPaddingYear: string;
|
|
3238
|
+
calendarRightPaddingQuarter: string;
|
|
3224
3239
|
}, {
|
|
3225
3240
|
Input: import("../../_mixins").Theme<"Input", {
|
|
3226
3241
|
countTextColor: string;
|
|
@@ -3990,12 +4005,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3990
4005
|
calendarLeftPaddingDatetimerange: string;
|
|
3991
4006
|
calendarLeftPaddingMonth: string;
|
|
3992
4007
|
calendarLeftPaddingYear: string;
|
|
4008
|
+
calendarLeftPaddingQuarter: string;
|
|
3993
4009
|
calendarRightPaddingDate: string;
|
|
3994
4010
|
calendarRightPaddingDatetime: string;
|
|
3995
4011
|
calendarRightPaddingDaterange: string;
|
|
3996
4012
|
calendarRightPaddingDatetimerange: string;
|
|
3997
4013
|
calendarRightPaddingMonth: string;
|
|
3998
4014
|
calendarRightPaddingYear: string;
|
|
4015
|
+
calendarRightPaddingQuarter: string;
|
|
3999
4016
|
};
|
|
4000
4017
|
peers: {
|
|
4001
4018
|
Input: import("../../_mixins").Theme<"Input", {
|
|
@@ -4899,6 +4916,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4899
4916
|
readonly clearable?: unknown;
|
|
4900
4917
|
readonly updateValueOnClose?: unknown;
|
|
4901
4918
|
readonly defaultValue?: unknown;
|
|
4919
|
+
readonly defaultTime?: unknown;
|
|
4902
4920
|
readonly disabled?: unknown;
|
|
4903
4921
|
readonly placement?: unknown;
|
|
4904
4922
|
readonly value?: unknown;
|
|
@@ -4931,7 +4949,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4931
4949
|
readonly themeOverrides?: unknown;
|
|
4932
4950
|
readonly builtinThemeOverrides?: unknown;
|
|
4933
4951
|
} & {
|
|
4934
|
-
type:
|
|
4952
|
+
type: DatePickerType;
|
|
4935
4953
|
placement: FollowerPlacement;
|
|
4936
4954
|
clearable: boolean;
|
|
4937
4955
|
defaultValue: Value | null;
|
|
@@ -4997,12 +5015,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4997
5015
|
calendarLeftPaddingDatetimerange: string;
|
|
4998
5016
|
calendarLeftPaddingMonth: string;
|
|
4999
5017
|
calendarLeftPaddingYear: string;
|
|
5018
|
+
calendarLeftPaddingQuarter: string;
|
|
5000
5019
|
calendarRightPaddingDate: string;
|
|
5001
5020
|
calendarRightPaddingDatetime: string;
|
|
5002
5021
|
calendarRightPaddingDaterange: string;
|
|
5003
5022
|
calendarRightPaddingDatetimerange: string;
|
|
5004
5023
|
calendarRightPaddingMonth: string;
|
|
5005
5024
|
calendarRightPaddingYear: string;
|
|
5025
|
+
calendarRightPaddingQuarter: string;
|
|
5006
5026
|
}, {
|
|
5007
5027
|
Input: import("../../_mixins").Theme<"Input", {
|
|
5008
5028
|
countTextColor: string;
|
|
@@ -5606,12 +5626,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5606
5626
|
calendarLeftPaddingDatetimerange: string;
|
|
5607
5627
|
calendarLeftPaddingMonth: string;
|
|
5608
5628
|
calendarLeftPaddingYear: string;
|
|
5629
|
+
calendarLeftPaddingQuarter: string;
|
|
5609
5630
|
calendarRightPaddingDate: string;
|
|
5610
5631
|
calendarRightPaddingDatetime: string;
|
|
5611
5632
|
calendarRightPaddingDaterange: string;
|
|
5612
5633
|
calendarRightPaddingDatetimerange: string;
|
|
5613
5634
|
calendarRightPaddingMonth: string;
|
|
5614
5635
|
calendarRightPaddingYear: string;
|
|
5636
|
+
calendarRightPaddingQuarter: string;
|
|
5615
5637
|
}, {
|
|
5616
5638
|
Input: import("../../_mixins").Theme<"Input", {
|
|
5617
5639
|
countTextColor: string;
|
|
@@ -6215,12 +6237,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6215
6237
|
calendarLeftPaddingDatetimerange: string;
|
|
6216
6238
|
calendarLeftPaddingMonth: string;
|
|
6217
6239
|
calendarLeftPaddingYear: string;
|
|
6240
|
+
calendarLeftPaddingQuarter: string;
|
|
6218
6241
|
calendarRightPaddingDate: string;
|
|
6219
6242
|
calendarRightPaddingDatetime: string;
|
|
6220
6243
|
calendarRightPaddingDaterange: string;
|
|
6221
6244
|
calendarRightPaddingDatetimerange: string;
|
|
6222
6245
|
calendarRightPaddingMonth: string;
|
|
6223
6246
|
calendarRightPaddingYear: string;
|
|
6247
|
+
calendarRightPaddingQuarter: string;
|
|
6224
6248
|
}, {
|
|
6225
6249
|
Input: import("../../_mixins").Theme<"Input", {
|
|
6226
6250
|
countTextColor: string;
|
|
@@ -6786,6 +6810,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6786
6810
|
onUpdateValue?: MaybeArray<OnUpdateValue> | undefined;
|
|
6787
6811
|
isDateDisabled?: IsDateDisabled | undefined;
|
|
6788
6812
|
actions?: ("clear" | "confirm" | "now")[] | undefined;
|
|
6813
|
+
defaultTime?: DefaultTime | undefined;
|
|
6789
6814
|
startPlaceholder?: string | undefined;
|
|
6790
6815
|
endPlaceholder?: string | undefined;
|
|
6791
6816
|
timeFormat?: string | undefined;
|
|
@@ -6793,7 +6818,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6793
6818
|
isTimeDisabled?: IsTimeDisabled | undefined;
|
|
6794
6819
|
ranges?: Record<string, [number, number]> | undefined;
|
|
6795
6820
|
}>, {
|
|
6796
|
-
type:
|
|
6821
|
+
type: DatePickerType;
|
|
6797
6822
|
show: boolean | undefined;
|
|
6798
6823
|
disabled: boolean | undefined;
|
|
6799
6824
|
onChange: MaybeArray<OnUpdateValue>;
|
|
@@ -12,7 +12,7 @@ import { warn, call, useAdjustedTo, createKey } from '../../_utils';
|
|
|
12
12
|
import { datePickerLight } from '../styles';
|
|
13
13
|
import { strictParse } from './utils';
|
|
14
14
|
import { uniCalendarValidation, dualCalendarValidation } from './validation-utils';
|
|
15
|
-
import { MONTH_ITEM_HEIGHT, START_YEAR
|
|
15
|
+
import { MONTH_ITEM_HEIGHT, START_YEAR } from './config';
|
|
16
16
|
import { datePickerInjectionKey } from './interface';
|
|
17
17
|
import DatetimePanel from './panel/datetime';
|
|
18
18
|
import DatetimerangePanel from './panel/datetimerange';
|
|
@@ -26,7 +26,7 @@ const datePickerProps = Object.assign(Object.assign({}, useTheme.props), { to: u
|
|
|
26
26
|
}, clearable: Boolean, updateValueOnClose: Boolean, defaultValue: {
|
|
27
27
|
type: [Number, Array],
|
|
28
28
|
default: null
|
|
29
|
-
}, disabled: {
|
|
29
|
+
}, defaultTime: [Number, String, Array], disabled: {
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: undefined
|
|
32
32
|
}, placement: {
|
|
@@ -101,6 +101,8 @@ export default defineComponent({
|
|
|
101
101
|
return localeRef.value.monthPlaceholder;
|
|
102
102
|
case 'year':
|
|
103
103
|
return localeRef.value.yearPlaceholder;
|
|
104
|
+
case 'quarter':
|
|
105
|
+
return localeRef.value.quarterPlaceholder;
|
|
104
106
|
default:
|
|
105
107
|
return '';
|
|
106
108
|
}
|
|
@@ -138,7 +140,23 @@ export default defineComponent({
|
|
|
138
140
|
}
|
|
139
141
|
});
|
|
140
142
|
const mergedFormatRef = computed(() => {
|
|
141
|
-
|
|
143
|
+
const { format } = props;
|
|
144
|
+
if (format)
|
|
145
|
+
return format;
|
|
146
|
+
switch (props.type) {
|
|
147
|
+
case 'date':
|
|
148
|
+
case 'daterange':
|
|
149
|
+
return localeRef.value.dateFormat;
|
|
150
|
+
case 'datetime':
|
|
151
|
+
case 'datetimerange':
|
|
152
|
+
return localeRef.value.dateTimeFormat;
|
|
153
|
+
case 'year':
|
|
154
|
+
return localeRef.value.yearTypeFormat;
|
|
155
|
+
case 'month':
|
|
156
|
+
return localeRef.value.monthTypeFormat;
|
|
157
|
+
case 'quarter':
|
|
158
|
+
return localeRef.value.quarterFormat;
|
|
159
|
+
}
|
|
142
160
|
});
|
|
143
161
|
const mergedActionsRef = computed(() => {
|
|
144
162
|
const { actions, type } = props;
|
|
@@ -163,6 +181,9 @@ export default defineComponent({
|
|
|
163
181
|
case 'year': {
|
|
164
182
|
return ['clear', 'now'];
|
|
165
183
|
}
|
|
184
|
+
case 'quarter': {
|
|
185
|
+
return ['clear', 'now', 'confirm'];
|
|
186
|
+
}
|
|
166
187
|
default: {
|
|
167
188
|
warn('data-picker', "The type is wrong, n-date-picker's type only supports `date`, `datetime`, `daterange` and `datetimerange`.");
|
|
168
189
|
break;
|
|
@@ -245,7 +266,7 @@ export default defineComponent({
|
|
|
245
266
|
disableUpdateOnClose
|
|
246
267
|
});
|
|
247
268
|
}
|
|
248
|
-
function
|
|
269
|
+
function scrollPickerColumns(value) {
|
|
249
270
|
if (!panelInstRef.value)
|
|
250
271
|
return;
|
|
251
272
|
const { monthScrollRef, yearScrollRef } = panelInstRef.value;
|
|
@@ -391,8 +412,9 @@ export default defineComponent({
|
|
|
391
412
|
if (mergedDisabledRef.value || mergedShowRef.value)
|
|
392
413
|
return;
|
|
393
414
|
doUpdateShow(true);
|
|
394
|
-
|
|
395
|
-
|
|
415
|
+
const { type } = props;
|
|
416
|
+
if (type === 'month' || type === 'year' || type === 'quarter') {
|
|
417
|
+
void nextTick(scrollPickerColumns);
|
|
396
418
|
}
|
|
397
419
|
}
|
|
398
420
|
function closeCalendar({ returnFocus, disableUpdateOnClose }) {
|
|
@@ -428,7 +450,7 @@ export default defineComponent({
|
|
|
428
450
|
// use pending value to do validation
|
|
429
451
|
const uniVaidation = uniCalendarValidation(props, pendingValueRef);
|
|
430
452
|
const dualValidation = dualCalendarValidation(props, pendingValueRef);
|
|
431
|
-
provide(datePickerInjectionKey, Object.assign(Object.assign(Object.assign({
|
|
453
|
+
provide(datePickerInjectionKey, Object.assign(Object.assign(Object.assign({ scrollPickerColumns,
|
|
432
454
|
mergedClsPrefixRef, mergedThemeRef: themeRef, timePickerSizeRef,
|
|
433
455
|
localeRef,
|
|
434
456
|
dateLocaleRef, firstDayOfWeekRef: toRef(props, 'firstDayOfWeek'), isDateDisabledRef: toRef(props, 'isDateDisabled'), rangesRef: toRef(props, 'ranges'), closeOnSelectRef: toRef(props, 'closeOnSelect'), updateValueOnCloseRef: toRef(props, 'updateValueOnClose') }, uniVaidation), dualValidation), { datePickerSlots: slots }));
|
|
@@ -564,7 +586,8 @@ export default defineComponent({
|
|
|
564
586
|
active: this.mergedShow,
|
|
565
587
|
actions: this.actions,
|
|
566
588
|
shortcuts: this.shortcuts,
|
|
567
|
-
style: this.cssVars
|
|
589
|
+
style: this.cssVars,
|
|
590
|
+
defaultTime: this.defaultTime
|
|
568
591
|
};
|
|
569
592
|
const { mergedClsPrefix } = this;
|
|
570
593
|
return (h("div", { ref: "triggerElRef", class: [
|
|
@@ -593,7 +616,7 @@ export default defineComponent({
|
|
|
593
616
|
h(VFollower, { show: this.mergedShow, containerClass: this.namespace, to: this.adjustedTo, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey, placement: "bottom-start" }, {
|
|
594
617
|
default: () => (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted }, {
|
|
595
618
|
default: () => this.mergedShow
|
|
596
|
-
? withDirectives(this.type === 'datetime' ? (h(DatetimePanel, Object.assign({}, commonPanelProps))) : this.type === 'daterange' ? (h(DaterangePanel, Object.assign({}, commonPanelProps))) : this.type === 'datetimerange' ? (h(DatetimerangePanel, Object.assign({}, commonPanelProps))) : this.type === 'month' ? (h(MonthPanel, Object.assign({}, commonPanelProps, { type: "month", key: "month" }))) : this.type === 'year' ? (h(MonthPanel, Object.assign({}, commonPanelProps, { type: "year", key: "year" }))) : (h(DatePanel, Object.assign({}, commonPanelProps))), [[clickoutside, this.handleClickOutside]])
|
|
619
|
+
? withDirectives(this.type === 'datetime' ? (h(DatetimePanel, Object.assign({}, commonPanelProps))) : this.type === 'daterange' ? (h(DaterangePanel, Object.assign({}, commonPanelProps))) : this.type === 'datetimerange' ? (h(DatetimerangePanel, Object.assign({}, commonPanelProps))) : this.type === 'month' ? (h(MonthPanel, Object.assign({}, commonPanelProps, { type: "month", key: "month" }))) : this.type === 'year' ? (h(MonthPanel, Object.assign({}, commonPanelProps, { type: "year", key: "year" }))) : this.type === 'quarter' ? (h(MonthPanel, Object.assign({}, commonPanelProps, { type: "quarter", key: "quarter" }))) : (h(DatePanel, Object.assign({}, commonPanelProps))), [[clickoutside, this.handleClickOutside]])
|
|
597
620
|
: null
|
|
598
621
|
}))
|
|
599
622
|
})
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
export declare const START_YEAR = 1901;
|
|
2
2
|
export declare const MONTH_ITEM_HEIGHT = 40;
|
|
3
|
-
export declare
|
|
4
|
-
date: string;
|
|
5
|
-
datetime: string;
|
|
6
|
-
daterange: string;
|
|
7
|
-
datetimerange: string;
|
|
8
|
-
month: string;
|
|
9
|
-
year: string;
|
|
10
|
-
};
|
|
11
|
-
export declare type DatePickerType = keyof typeof DATE_FORMAT;
|
|
3
|
+
export declare type DatePickerType = 'date' | 'datetime' | 'daterange' | 'datetimerange' | 'month' | 'year' | 'quarter';
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
export const START_YEAR = 1901;
|
|
2
2
|
// TODO: we need to remove it to make height customizable
|
|
3
3
|
export const MONTH_ITEM_HEIGHT = 40;
|
|
4
|
-
export const DATE_FORMAT = {
|
|
5
|
-
date: 'yyyy-MM-dd',
|
|
6
|
-
datetime: 'yyyy-MM-dd HH:mm:ss',
|
|
7
|
-
daterange: 'yyyy-MM-dd',
|
|
8
|
-
datetimerange: 'yyyy-MM-dd HH:mm:ss',
|
|
9
|
-
month: 'yyyy-MM',
|
|
10
|
-
year: 'yyyy'
|
|
11
|
-
};
|
|
@@ -7,6 +7,7 @@ import { MergedTheme } from '../../_mixins';
|
|
|
7
7
|
import { DatePickerTheme } from '../styles/light';
|
|
8
8
|
import { uniCalendarValidation, dualCalendarValidation } from './validation-utils';
|
|
9
9
|
export declare type Value = number | [number, number];
|
|
10
|
+
export declare type DefaultTime = string | [string | undefined, string | undefined];
|
|
10
11
|
export declare type Shortcuts = Record<string, number | (() => number)> | Record<string, [number, number] | (() => [number, number])>;
|
|
11
12
|
export declare type OnUpdateValue = (value: number & (number | null) & [number, number] & ([number, number] | null)) => void;
|
|
12
13
|
export declare type OnUpdateValueImpl = (value: Value | null) => void;
|
|
@@ -34,7 +35,7 @@ export declare type DatePickerInjection = {
|
|
|
34
35
|
updateValueOnCloseRef: Ref<boolean>;
|
|
35
36
|
firstDayOfWeekRef: Ref<FirstDayOfWeek | undefined>;
|
|
36
37
|
datePickerSlots: Slots;
|
|
37
|
-
|
|
38
|
+
scrollPickerColumns: (value?: number) => void;
|
|
38
39
|
} & ReturnType<typeof uniCalendarValidation> & ReturnType<typeof dualCalendarValidation>;
|
|
39
40
|
export declare const datePickerInjectionKey: InjectionKey<DatePickerInjection>;
|
|
40
41
|
export declare type IsDateDisabled = IsSingleDateDisabled | IsRangeDateDisabled;
|
|
@@ -4,19 +4,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
17
14
|
readonly default: null;
|
|
18
15
|
};
|
|
19
16
|
readonly shortcuts: import("vue").PropType<import("../interface").Shortcuts>;
|
|
17
|
+
readonly defaultTime: import("vue").PropType<import("../interface").DefaultTime>;
|
|
20
18
|
readonly onConfirm: FunctionConstructor;
|
|
21
19
|
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
22
20
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -25,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
23
|
readonly required: true;
|
|
26
24
|
};
|
|
27
25
|
}, {
|
|
28
|
-
handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem) => void;
|
|
26
|
+
handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
|
|
29
27
|
handleDateInputBlur: () => void;
|
|
30
28
|
handleDateInput: (value: string) => void;
|
|
31
29
|
handleTimePickerChange: (value: number | null) => void;
|
|
@@ -208,12 +206,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
208
206
|
calendarLeftPaddingDatetimerange: string;
|
|
209
207
|
calendarLeftPaddingMonth: string;
|
|
210
208
|
calendarLeftPaddingYear: string;
|
|
209
|
+
calendarLeftPaddingQuarter: string;
|
|
211
210
|
calendarRightPaddingDate: string;
|
|
212
211
|
calendarRightPaddingDatetime: string;
|
|
213
212
|
calendarRightPaddingDaterange: string;
|
|
214
213
|
calendarRightPaddingDatetimerange: string;
|
|
215
214
|
calendarRightPaddingMonth: string;
|
|
216
215
|
calendarRightPaddingYear: string;
|
|
216
|
+
calendarRightPaddingQuarter: string;
|
|
217
217
|
};
|
|
218
218
|
peers: {
|
|
219
219
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1070,6 +1070,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1070
1070
|
yearFormat: string;
|
|
1071
1071
|
monthFormat: string;
|
|
1072
1072
|
dayFormat: string;
|
|
1073
|
+
yearTypeFormat: string;
|
|
1074
|
+
monthTypeFormat: string;
|
|
1075
|
+
dateFormat: string;
|
|
1076
|
+
dateTimeFormat: string;
|
|
1077
|
+
quarterFormat: string;
|
|
1073
1078
|
clear: string;
|
|
1074
1079
|
now: string;
|
|
1075
1080
|
confirm: string;
|
|
@@ -1079,6 +1084,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1079
1084
|
datetimePlaceholder: string;
|
|
1080
1085
|
monthPlaceholder: string;
|
|
1081
1086
|
yearPlaceholder: string;
|
|
1087
|
+
quarterPlaceholder: string;
|
|
1082
1088
|
startDatePlaceholder: string;
|
|
1083
1089
|
endDatePlaceholder: string;
|
|
1084
1090
|
startDatetimePlaceholder: string;
|
|
@@ -1112,6 +1118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1112
1118
|
dateArray: import("vue").ComputedRef<import("../utils").DateItem[]>;
|
|
1113
1119
|
monthArray: import("vue").ComputedRef<import("../utils").MonthItem[]>;
|
|
1114
1120
|
yearArray: import("vue").ComputedRef<import("../utils").YearItem[]>;
|
|
1121
|
+
quarterArray: import("vue").ComputedRef<import("../utils").QuarterItem[]>;
|
|
1115
1122
|
calendarYear: import("vue").ComputedRef<string>;
|
|
1116
1123
|
calendarMonth: import("vue").ComputedRef<string>;
|
|
1117
1124
|
weekdays: import("vue").ComputedRef<string[]>;
|
|
@@ -1131,6 +1138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1131
1138
|
readonly timeFormat?: unknown;
|
|
1132
1139
|
readonly value?: unknown;
|
|
1133
1140
|
readonly shortcuts?: unknown;
|
|
1141
|
+
readonly defaultTime?: unknown;
|
|
1134
1142
|
readonly onConfirm?: unknown;
|
|
1135
1143
|
readonly onClose?: unknown;
|
|
1136
1144
|
readonly onTabOut?: unknown;
|
|
@@ -1138,21 +1146,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1138
1146
|
} & {
|
|
1139
1147
|
value: import("../interface").Value | null;
|
|
1140
1148
|
active: boolean;
|
|
1141
|
-
dateFormat: string;
|
|
1142
1149
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1143
1150
|
actions: string[];
|
|
1144
|
-
timeFormat: string;
|
|
1145
1151
|
} & {
|
|
1152
|
+
dateFormat?: string | undefined;
|
|
1146
1153
|
onTabOut?: Function | undefined;
|
|
1147
1154
|
onClose?: import("../interface").OnClose | undefined;
|
|
1148
1155
|
onConfirm?: Function | undefined;
|
|
1156
|
+
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1157
|
+
timeFormat?: string | undefined;
|
|
1149
1158
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1150
1159
|
}>, {
|
|
1151
1160
|
value: import("../interface").Value | null;
|
|
1152
1161
|
active: boolean;
|
|
1153
|
-
dateFormat: string;
|
|
1154
1162
|
actions: string[];
|
|
1155
|
-
timeFormat: string;
|
|
1156
1163
|
}>;
|
|
1157
1164
|
/**
|
|
1158
1165
|
* Date Panel
|
|
@@ -2,7 +2,7 @@ import { h, defineComponent, renderSlot, watchEffect } from 'vue';
|
|
|
2
2
|
import { NButton, NxButton } from '../../../button';
|
|
3
3
|
import { BackwardIcon, FastBackwardIcon, ForwardIcon, FastForwardIcon } from '../../../_internal/icons';
|
|
4
4
|
import { NBaseFocusDetector } from '../../../_internal';
|
|
5
|
-
import { useCalendar } from './use-calendar';
|
|
5
|
+
import { useCalendar, useCalendarProps } from './use-calendar';
|
|
6
6
|
import { warnOnce } from '../../../_utils';
|
|
7
7
|
/**
|
|
8
8
|
* Date Panel
|
|
@@ -12,7 +12,7 @@ import { warnOnce } from '../../../_utils';
|
|
|
12
12
|
*/
|
|
13
13
|
export default defineComponent({
|
|
14
14
|
name: 'DatePanel',
|
|
15
|
-
props:
|
|
15
|
+
props: useCalendarProps,
|
|
16
16
|
setup(props) {
|
|
17
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
18
18
|
watchEffect(() => {
|
|
@@ -4,19 +4,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
17
14
|
readonly default: null;
|
|
18
15
|
};
|
|
19
16
|
readonly shortcuts: import("vue").PropType<import("../interface").Shortcuts>;
|
|
17
|
+
readonly defaultTime: import("vue").PropType<import("../interface").DefaultTime>;
|
|
20
18
|
readonly onConfirm: FunctionConstructor;
|
|
21
19
|
readonly onClose: import("vue").PropType<import("../interface").OnClose>;
|
|
22
20
|
readonly onTabOut: FunctionConstructor;
|
|
@@ -206,12 +204,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
204
|
calendarLeftPaddingDatetimerange: string;
|
|
207
205
|
calendarLeftPaddingMonth: string;
|
|
208
206
|
calendarLeftPaddingYear: string;
|
|
207
|
+
calendarLeftPaddingQuarter: string;
|
|
209
208
|
calendarRightPaddingDate: string;
|
|
210
209
|
calendarRightPaddingDatetime: string;
|
|
211
210
|
calendarRightPaddingDaterange: string;
|
|
212
211
|
calendarRightPaddingDatetimerange: string;
|
|
213
212
|
calendarRightPaddingMonth: string;
|
|
214
213
|
calendarRightPaddingYear: string;
|
|
214
|
+
calendarRightPaddingQuarter: string;
|
|
215
215
|
};
|
|
216
216
|
peers: {
|
|
217
217
|
Input: import("../../../_mixins").Theme<"Input", {
|
|
@@ -1068,6 +1068,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1068
1068
|
yearFormat: string;
|
|
1069
1069
|
monthFormat: string;
|
|
1070
1070
|
dayFormat: string;
|
|
1071
|
+
yearTypeFormat: string;
|
|
1072
|
+
monthTypeFormat: string;
|
|
1073
|
+
dateFormat: string;
|
|
1074
|
+
dateTimeFormat: string;
|
|
1075
|
+
quarterFormat: string;
|
|
1071
1076
|
clear: string;
|
|
1072
1077
|
now: string;
|
|
1073
1078
|
confirm: string;
|
|
@@ -1077,6 +1082,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1077
1082
|
datetimePlaceholder: string;
|
|
1078
1083
|
monthPlaceholder: string;
|
|
1079
1084
|
yearPlaceholder: string;
|
|
1085
|
+
quarterPlaceholder: string;
|
|
1080
1086
|
startDatePlaceholder: string;
|
|
1081
1087
|
endDatePlaceholder: string;
|
|
1082
1088
|
startDatetimePlaceholder: string;
|
|
@@ -1131,6 +1137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1131
1137
|
readonly timeFormat?: unknown;
|
|
1132
1138
|
readonly value?: unknown;
|
|
1133
1139
|
readonly shortcuts?: unknown;
|
|
1140
|
+
readonly defaultTime?: unknown;
|
|
1134
1141
|
readonly onConfirm?: unknown;
|
|
1135
1142
|
readonly onClose?: unknown;
|
|
1136
1143
|
readonly onTabOut?: unknown;
|
|
@@ -1138,20 +1145,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1138
1145
|
} & {
|
|
1139
1146
|
value: import("../interface").Value | null;
|
|
1140
1147
|
active: boolean;
|
|
1141
|
-
dateFormat: string;
|
|
1142
1148
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1143
1149
|
actions: unknown[];
|
|
1144
|
-
timeFormat: string;
|
|
1145
1150
|
} & {
|
|
1151
|
+
dateFormat?: string | undefined;
|
|
1146
1152
|
onTabOut?: Function | undefined;
|
|
1147
1153
|
onClose?: import("../interface").OnClose | undefined;
|
|
1148
1154
|
onConfirm?: Function | undefined;
|
|
1155
|
+
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1156
|
+
timeFormat?: string | undefined;
|
|
1149
1157
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1150
1158
|
}>, {
|
|
1151
1159
|
value: import("../interface").Value | null;
|
|
1152
1160
|
active: boolean;
|
|
1153
|
-
dateFormat: string;
|
|
1154
1161
|
actions: unknown[];
|
|
1155
|
-
timeFormat: string;
|
|
1156
1162
|
}>;
|
|
1157
1163
|
export default _default;
|
|
@@ -2,11 +2,11 @@ import { defineComponent, h, renderSlot, watchEffect } from 'vue';
|
|
|
2
2
|
import { NButton, NxButton } from '../../../button';
|
|
3
3
|
import { BackwardIcon, FastBackwardIcon, ForwardIcon, FastForwardIcon } from '../../../_internal/icons';
|
|
4
4
|
import { NBaseFocusDetector } from '../../../_internal';
|
|
5
|
-
import { useDualCalendar } from './use-dual-calendar';
|
|
5
|
+
import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar';
|
|
6
6
|
import { warnOnce } from '../../../_utils';
|
|
7
7
|
export default defineComponent({
|
|
8
8
|
name: 'DateRangePanel',
|
|
9
|
-
props:
|
|
9
|
+
props: useDualCalendarProps,
|
|
10
10
|
setup(props) {
|
|
11
11
|
if (process.env.NODE_ENV !== 'production') {
|
|
12
12
|
watchEffect(() => {
|