@v-c/picker 0.0.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/LICENSE +21 -0
- package/dist/PickerInput/Popup/Footer.cjs +115 -0
- package/dist/PickerInput/Popup/Footer.d.ts +19 -0
- package/dist/PickerInput/Popup/Footer.js +109 -0
- package/dist/PickerInput/Popup/PopupPanel.cjs +413 -0
- package/dist/PickerInput/Popup/PopupPanel.d.ts +11 -0
- package/dist/PickerInput/Popup/PopupPanel.js +407 -0
- package/dist/PickerInput/Popup/PresetPanel.cjs +54 -0
- package/dist/PickerInput/Popup/PresetPanel.d.ts +16 -0
- package/dist/PickerInput/Popup/PresetPanel.js +48 -0
- package/dist/PickerInput/Popup/index.cjs +528 -0
- package/dist/PickerInput/Popup/index.d.ts +37 -0
- package/dist/PickerInput/Popup/index.js +522 -0
- package/dist/PickerInput/RangePicker.cjs +1910 -0
- package/dist/PickerInput/RangePicker.d.ts +57 -0
- package/dist/PickerInput/RangePicker.js +1901 -0
- package/dist/PickerInput/Selector/Icon.cjs +89 -0
- package/dist/PickerInput/Selector/Icon.d.ts +11 -0
- package/dist/PickerInput/Selector/Icon.js +83 -0
- package/dist/PickerInput/Selector/Input.cjs +376 -0
- package/dist/PickerInput/Selector/Input.d.ts +9 -0
- package/dist/PickerInput/Selector/Input.js +370 -0
- package/dist/PickerInput/Selector/MaskFormat.cjs +72 -0
- package/dist/PickerInput/Selector/MaskFormat.d.ts +22 -0
- package/dist/PickerInput/Selector/MaskFormat.js +68 -0
- package/dist/PickerInput/Selector/RangeSelector.cjs +1390 -0
- package/dist/PickerInput/Selector/RangeSelector.d.ts +28 -0
- package/dist/PickerInput/Selector/RangeSelector.js +1383 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.cjs +110 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.d.ts +13 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.js +103 -0
- package/dist/PickerInput/Selector/SingleSelector/index.cjs +1358 -0
- package/dist/PickerInput/Selector/SingleSelector/index.d.ts +21 -0
- package/dist/PickerInput/Selector/SingleSelector/index.js +1352 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.cjs +17 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.d.ts +17 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.js +11 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.cjs +125 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.d.ts +56 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.js +120 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.cjs +14 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.d.ts +2 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.js +9 -0
- package/dist/PickerInput/Selector/util.cjs +32 -0
- package/dist/PickerInput/Selector/util.d.ts +5 -0
- package/dist/PickerInput/Selector/util.js +30 -0
- package/dist/PickerInput/SinglePicker.cjs +1881 -0
- package/dist/PickerInput/SinglePicker.d.ts +46 -0
- package/dist/PickerInput/SinglePicker.js +1873 -0
- package/dist/PickerInput/context.cjs +12 -0
- package/dist/PickerInput/context.d.ts +16 -0
- package/dist/PickerInput/context.js +9 -0
- package/dist/PickerInput/hooks/useCellRender.cjs +25 -0
- package/dist/PickerInput/hooks/useCellRender.d.ts +3 -0
- package/dist/PickerInput/hooks/useCellRender.js +20 -0
- package/dist/PickerInput/hooks/useDelayState.cjs +34 -0
- package/dist/PickerInput/hooks/useDelayState.d.ts +2 -0
- package/dist/PickerInput/hooks/useDelayState.js +29 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.cjs +15 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.d.ts +8 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.js +11 -0
- package/dist/PickerInput/hooks/useFieldFormat.cjs +17 -0
- package/dist/PickerInput/hooks/useFieldFormat.d.ts +3 -0
- package/dist/PickerInput/hooks/useFieldFormat.js +15 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.cjs +24 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.d.ts +6 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.js +19 -0
- package/dist/PickerInput/hooks/useFilledProps.cjs +103 -0
- package/dist/PickerInput/hooks/useFilledProps.d.ts +33 -0
- package/dist/PickerInput/hooks/useFilledProps.js +98 -0
- package/dist/PickerInput/hooks/useInputReadOnly.cjs +13 -0
- package/dist/PickerInput/hooks/useInputReadOnly.d.ts +3 -0
- package/dist/PickerInput/hooks/useInputReadOnly.js +8 -0
- package/dist/PickerInput/hooks/useInvalidate.cjs +34 -0
- package/dist/PickerInput/hooks/useInvalidate.d.ts +10 -0
- package/dist/PickerInput/hooks/useInvalidate.js +30 -0
- package/dist/PickerInput/hooks/useLockEffect.cjs +16 -0
- package/dist/PickerInput/hooks/useLockEffect.d.ts +6 -0
- package/dist/PickerInput/hooks/useLockEffect.js +11 -0
- package/dist/PickerInput/hooks/useOpen.cjs +15 -0
- package/dist/PickerInput/hooks/useOpen.d.ts +7 -0
- package/dist/PickerInput/hooks/useOpen.js +10 -0
- package/dist/PickerInput/hooks/usePresets.cjs +21 -0
- package/dist/PickerInput/hooks/usePresets.d.ts +3 -0
- package/dist/PickerInput/hooks/usePresets.js +16 -0
- package/dist/PickerInput/hooks/useRangeActive.cjs +57 -0
- package/dist/PickerInput/hooks/useRangeActive.d.ts +9 -0
- package/dist/PickerInput/hooks/useRangeActive.js +52 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.cjs +21 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.d.ts +9 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.js +17 -0
- package/dist/PickerInput/hooks/useRangePickerValue.cjs +100 -0
- package/dist/PickerInput/hooks/useRangePickerValue.d.ts +5 -0
- package/dist/PickerInput/hooks/useRangePickerValue.js +94 -0
- package/dist/PickerInput/hooks/useRangeValue.cjs +134 -0
- package/dist/PickerInput/hooks/useRangeValue.d.ts +21 -0
- package/dist/PickerInput/hooks/useRangeValue.js +128 -0
- package/dist/PickerInput/hooks/useShowNow.cjs +15 -0
- package/dist/PickerInput/hooks/useShowNow.d.ts +3 -0
- package/dist/PickerInput/hooks/useShowNow.js +10 -0
- package/dist/PickerPanel/DatePanel/index.cjs +294 -0
- package/dist/PickerPanel/DatePanel/index.d.ts +9 -0
- package/dist/PickerPanel/DatePanel/index.js +288 -0
- package/dist/PickerPanel/DateTimePanel/index.cjs +180 -0
- package/dist/PickerPanel/DateTimePanel/index.d.ts +3 -0
- package/dist/PickerPanel/DateTimePanel/index.js +174 -0
- package/dist/PickerPanel/DecadePanel/index.cjs +230 -0
- package/dist/PickerPanel/DecadePanel/index.d.ts +3 -0
- package/dist/PickerPanel/DecadePanel/index.js +224 -0
- package/dist/PickerPanel/MonthPanel/index.cjs +219 -0
- package/dist/PickerPanel/MonthPanel/index.d.ts +3 -0
- package/dist/PickerPanel/MonthPanel/index.js +213 -0
- package/dist/PickerPanel/PanelBody.cjs +157 -0
- package/dist/PickerPanel/PanelBody.d.ts +17 -0
- package/dist/PickerPanel/PanelBody.js +151 -0
- package/dist/PickerPanel/PanelHeader.cjs +132 -0
- package/dist/PickerPanel/PanelHeader.d.ts +9 -0
- package/dist/PickerPanel/PanelHeader.js +126 -0
- package/dist/PickerPanel/QuarterPanel/index.cjs +211 -0
- package/dist/PickerPanel/QuarterPanel/index.d.ts +3 -0
- package/dist/PickerPanel/QuarterPanel/index.js +205 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.cjs +145 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.d.ts +17 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +139 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.cjs +286 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.d.ts +3 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.js +280 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.cjs +65 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.d.ts +1 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js +60 -0
- package/dist/PickerPanel/TimePanel/index.cjs +173 -0
- package/dist/PickerPanel/TimePanel/index.d.ts +3 -0
- package/dist/PickerPanel/TimePanel/index.js +167 -0
- package/dist/PickerPanel/WeekPanel/index.cjs +179 -0
- package/dist/PickerPanel/WeekPanel/index.d.ts +3 -0
- package/dist/PickerPanel/WeekPanel/index.js +173 -0
- package/dist/PickerPanel/YearPanel/index.cjs +239 -0
- package/dist/PickerPanel/YearPanel/index.d.ts +3 -0
- package/dist/PickerPanel/YearPanel/index.js +233 -0
- package/dist/PickerPanel/context.cjs +61 -0
- package/dist/PickerPanel/context.d.ts +26 -0
- package/dist/PickerPanel/context.js +53 -0
- package/dist/PickerPanel/index.cjs +473 -0
- package/dist/PickerPanel/index.d.ts +65 -0
- package/dist/PickerPanel/index.js +467 -0
- package/dist/PickerTrigger/index.cjs +137 -0
- package/dist/PickerTrigger/index.d.ts +18 -0
- package/dist/PickerTrigger/index.js +130 -0
- package/dist/PickerTrigger/util.cjs +13 -0
- package/dist/PickerTrigger/util.d.ts +2 -0
- package/dist/PickerTrigger/util.js +12 -0
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/generate/dateFns.cjs +80 -0
- package/dist/generate/dateFns.d.ts +3 -0
- package/dist/generate/dateFns.js +73 -0
- package/dist/generate/dayjs.cjs +117 -0
- package/dist/generate/dayjs.d.ts +4 -0
- package/dist/generate/dayjs.js +104 -0
- package/dist/generate/index.cjs +1 -0
- package/dist/generate/index.d.ts +37 -0
- package/dist/generate/index.js +0 -0
- package/dist/generate/luxon.cjs +75 -0
- package/dist/generate/luxon.d.ts +4 -0
- package/dist/generate/luxon.js +69 -0
- package/dist/generate/moment.cjs +107 -0
- package/dist/generate/moment.d.ts +4 -0
- package/dist/generate/moment.js +100 -0
- package/dist/hooks/useLocale.cjs +45 -0
- package/dist/hooks/useLocale.d.ts +9 -0
- package/dist/hooks/useLocale.js +39 -0
- package/dist/hooks/useSemantic.cjs +18 -0
- package/dist/hooks/useSemantic.d.ts +14 -0
- package/dist/hooks/useSemantic.js +13 -0
- package/dist/hooks/useSyncState.cjs +29 -0
- package/dist/hooks/useSyncState.d.ts +7 -0
- package/dist/hooks/useSyncState.js +24 -0
- package/dist/hooks/useTimeConfig.cjs +161 -0
- package/dist/hooks/useTimeConfig.d.ts +18 -0
- package/dist/hooks/useTimeConfig.js +159 -0
- package/dist/hooks/useTimeInfo.cjs +113 -0
- package/dist/hooks/useTimeInfo.d.ts +12 -0
- package/dist/hooks/useTimeInfo.js +108 -0
- package/dist/hooks/useToggleDates.cjs +16 -0
- package/dist/hooks/useToggleDates.d.ts +9 -0
- package/dist/hooks/useToggleDates.js +12 -0
- package/dist/index.cjs +12 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/interface.cjs +1 -0
- package/dist/interface.d.ts +379 -0
- package/dist/interface.js +0 -0
- package/dist/locale/am_ET.cjs +34 -0
- package/dist/locale/am_ET.d.ts +3 -0
- package/dist/locale/am_ET.js +29 -0
- package/dist/locale/ar_EG.cjs +32 -0
- package/dist/locale/ar_EG.d.ts +3 -0
- package/dist/locale/ar_EG.js +27 -0
- package/dist/locale/az_AZ.cjs +33 -0
- package/dist/locale/az_AZ.d.ts +3 -0
- package/dist/locale/az_AZ.js +28 -0
- package/dist/locale/bg_BG.cjs +32 -0
- package/dist/locale/bg_BG.d.ts +3 -0
- package/dist/locale/bg_BG.js +27 -0
- package/dist/locale/bn_BD.cjs +33 -0
- package/dist/locale/bn_BD.d.ts +3 -0
- package/dist/locale/bn_BD.js +28 -0
- package/dist/locale/by_BY.cjs +33 -0
- package/dist/locale/by_BY.d.ts +3 -0
- package/dist/locale/by_BY.js +28 -0
- package/dist/locale/ca_ES.cjs +32 -0
- package/dist/locale/ca_ES.d.ts +3 -0
- package/dist/locale/ca_ES.js +27 -0
- package/dist/locale/common.cjs +8 -0
- package/dist/locale/common.d.ts +2 -0
- package/dist/locale/common.js +7 -0
- package/dist/locale/cs_CZ.cjs +32 -0
- package/dist/locale/cs_CZ.d.ts +3 -0
- package/dist/locale/cs_CZ.js +27 -0
- package/dist/locale/da_DK.cjs +32 -0
- package/dist/locale/da_DK.d.ts +3 -0
- package/dist/locale/da_DK.js +27 -0
- package/dist/locale/de_DE.cjs +32 -0
- package/dist/locale/de_DE.d.ts +3 -0
- package/dist/locale/de_DE.js +27 -0
- package/dist/locale/el_GR.cjs +32 -0
- package/dist/locale/el_GR.d.ts +3 -0
- package/dist/locale/el_GR.js +27 -0
- package/dist/locale/en_GB.cjs +32 -0
- package/dist/locale/en_GB.d.ts +3 -0
- package/dist/locale/en_GB.js +27 -0
- package/dist/locale/en_US.cjs +33 -0
- package/dist/locale/en_US.d.ts +3 -0
- package/dist/locale/en_US.js +28 -0
- package/dist/locale/es_ES.cjs +32 -0
- package/dist/locale/es_ES.d.ts +3 -0
- package/dist/locale/es_ES.js +27 -0
- package/dist/locale/es_MX.cjs +33 -0
- package/dist/locale/es_MX.d.ts +3 -0
- package/dist/locale/es_MX.js +28 -0
- package/dist/locale/et_EE.cjs +32 -0
- package/dist/locale/et_EE.d.ts +3 -0
- package/dist/locale/et_EE.js +27 -0
- package/dist/locale/eu_ES.cjs +34 -0
- package/dist/locale/eu_ES.d.ts +3 -0
- package/dist/locale/eu_ES.js +29 -0
- package/dist/locale/fa_IR.cjs +32 -0
- package/dist/locale/fa_IR.d.ts +3 -0
- package/dist/locale/fa_IR.js +27 -0
- package/dist/locale/fi_FI.cjs +32 -0
- package/dist/locale/fi_FI.d.ts +3 -0
- package/dist/locale/fi_FI.js +27 -0
- package/dist/locale/fr_BE.cjs +32 -0
- package/dist/locale/fr_BE.d.ts +3 -0
- package/dist/locale/fr_BE.js +27 -0
- package/dist/locale/fr_CA.cjs +33 -0
- package/dist/locale/fr_CA.d.ts +3 -0
- package/dist/locale/fr_CA.js +28 -0
- package/dist/locale/fr_FR.cjs +33 -0
- package/dist/locale/fr_FR.d.ts +3 -0
- package/dist/locale/fr_FR.js +28 -0
- package/dist/locale/ga_IE.cjs +33 -0
- package/dist/locale/ga_IE.d.ts +3 -0
- package/dist/locale/ga_IE.js +28 -0
- package/dist/locale/gl_ES.cjs +32 -0
- package/dist/locale/gl_ES.d.ts +3 -0
- package/dist/locale/gl_ES.js +27 -0
- package/dist/locale/he_IL.cjs +33 -0
- package/dist/locale/he_IL.d.ts +3 -0
- package/dist/locale/he_IL.js +28 -0
- package/dist/locale/hi_IN.cjs +33 -0
- package/dist/locale/hi_IN.d.ts +3 -0
- package/dist/locale/hi_IN.js +28 -0
- package/dist/locale/hr_HR.cjs +33 -0
- package/dist/locale/hr_HR.d.ts +3 -0
- package/dist/locale/hr_HR.js +28 -0
- package/dist/locale/hu_HU.cjs +33 -0
- package/dist/locale/hu_HU.d.ts +3 -0
- package/dist/locale/hu_HU.js +28 -0
- package/dist/locale/id_ID.cjs +33 -0
- package/dist/locale/id_ID.d.ts +3 -0
- package/dist/locale/id_ID.js +28 -0
- package/dist/locale/is_IS.cjs +32 -0
- package/dist/locale/is_IS.d.ts +3 -0
- package/dist/locale/is_IS.js +27 -0
- package/dist/locale/it_IT.cjs +55 -0
- package/dist/locale/it_IT.d.ts +3 -0
- package/dist/locale/it_IT.js +50 -0
- package/dist/locale/ja_JP.cjs +35 -0
- package/dist/locale/ja_JP.d.ts +3 -0
- package/dist/locale/ja_JP.js +30 -0
- package/dist/locale/ka_GE.cjs +33 -0
- package/dist/locale/ka_GE.d.ts +3 -0
- package/dist/locale/ka_GE.js +28 -0
- package/dist/locale/kk_KZ.cjs +32 -0
- package/dist/locale/kk_KZ.d.ts +3 -0
- package/dist/locale/kk_KZ.js +27 -0
- package/dist/locale/km_KH.cjs +34 -0
- package/dist/locale/km_KH.d.ts +3 -0
- package/dist/locale/km_KH.js +29 -0
- package/dist/locale/kmr_IQ.cjs +32 -0
- package/dist/locale/kmr_IQ.d.ts +3 -0
- package/dist/locale/kmr_IQ.js +27 -0
- package/dist/locale/kn_IN.cjs +33 -0
- package/dist/locale/kn_IN.d.ts +3 -0
- package/dist/locale/kn_IN.js +28 -0
- package/dist/locale/ko_KR.cjs +34 -0
- package/dist/locale/ko_KR.d.ts +3 -0
- package/dist/locale/ko_KR.js +29 -0
- package/dist/locale/lt_LT.cjs +34 -0
- package/dist/locale/lt_LT.d.ts +3 -0
- package/dist/locale/lt_LT.js +29 -0
- package/dist/locale/lv_LV.cjs +32 -0
- package/dist/locale/lv_LV.d.ts +3 -0
- package/dist/locale/lv_LV.js +27 -0
- package/dist/locale/mk_MK.cjs +32 -0
- package/dist/locale/mk_MK.d.ts +3 -0
- package/dist/locale/mk_MK.js +27 -0
- package/dist/locale/ml_IN.cjs +33 -0
- package/dist/locale/ml_IN.d.ts +3 -0
- package/dist/locale/ml_IN.js +28 -0
- package/dist/locale/mn_MN.cjs +34 -0
- package/dist/locale/mn_MN.d.ts +3 -0
- package/dist/locale/mn_MN.js +29 -0
- package/dist/locale/mr_IN.cjs +59 -0
- package/dist/locale/mr_IN.d.ts +3 -0
- package/dist/locale/mr_IN.js +54 -0
- package/dist/locale/ms_MY.cjs +34 -0
- package/dist/locale/ms_MY.d.ts +3 -0
- package/dist/locale/ms_MY.js +29 -0
- package/dist/locale/my_MM.cjs +33 -0
- package/dist/locale/my_MM.d.ts +3 -0
- package/dist/locale/my_MM.js +28 -0
- package/dist/locale/nb_NO.cjs +34 -0
- package/dist/locale/nb_NO.d.ts +3 -0
- package/dist/locale/nb_NO.js +29 -0
- package/dist/locale/ne_NP.cjs +33 -0
- package/dist/locale/ne_NP.d.ts +3 -0
- package/dist/locale/ne_NP.js +28 -0
- package/dist/locale/nl_BE.cjs +32 -0
- package/dist/locale/nl_BE.d.ts +3 -0
- package/dist/locale/nl_BE.js +27 -0
- package/dist/locale/nl_NL.cjs +32 -0
- package/dist/locale/nl_NL.d.ts +3 -0
- package/dist/locale/nl_NL.js +27 -0
- package/dist/locale/pl_PL.cjs +32 -0
- package/dist/locale/pl_PL.d.ts +3 -0
- package/dist/locale/pl_PL.js +27 -0
- package/dist/locale/pt_BR.cjs +56 -0
- package/dist/locale/pt_BR.d.ts +3 -0
- package/dist/locale/pt_BR.js +51 -0
- package/dist/locale/pt_PT.cjs +55 -0
- package/dist/locale/pt_PT.d.ts +3 -0
- package/dist/locale/pt_PT.js +50 -0
- package/dist/locale/ro_RO.cjs +33 -0
- package/dist/locale/ro_RO.d.ts +3 -0
- package/dist/locale/ro_RO.js +28 -0
- package/dist/locale/ru_RU.cjs +32 -0
- package/dist/locale/ru_RU.d.ts +3 -0
- package/dist/locale/ru_RU.js +27 -0
- package/dist/locale/si_LK.cjs +34 -0
- package/dist/locale/si_LK.d.ts +3 -0
- package/dist/locale/si_LK.js +29 -0
- package/dist/locale/sk_SK.cjs +32 -0
- package/dist/locale/sk_SK.d.ts +3 -0
- package/dist/locale/sk_SK.js +27 -0
- package/dist/locale/sl_SI.cjs +32 -0
- package/dist/locale/sl_SI.d.ts +3 -0
- package/dist/locale/sl_SI.js +27 -0
- package/dist/locale/sr_Cyrl_RS.cjs +32 -0
- package/dist/locale/sr_Cyrl_RS.d.ts +3 -0
- package/dist/locale/sr_Cyrl_RS.js +27 -0
- package/dist/locale/sr_RS.cjs +32 -0
- package/dist/locale/sr_RS.d.ts +3 -0
- package/dist/locale/sr_RS.js +27 -0
- package/dist/locale/sv_SE.cjs +32 -0
- package/dist/locale/sv_SE.d.ts +3 -0
- package/dist/locale/sv_SE.js +27 -0
- package/dist/locale/ta_IN.cjs +33 -0
- package/dist/locale/ta_IN.d.ts +3 -0
- package/dist/locale/ta_IN.js +28 -0
- package/dist/locale/te_IN.cjs +33 -0
- package/dist/locale/te_IN.d.ts +3 -0
- package/dist/locale/te_IN.js +28 -0
- package/dist/locale/th_TH.cjs +32 -0
- package/dist/locale/th_TH.d.ts +3 -0
- package/dist/locale/th_TH.js +27 -0
- package/dist/locale/tk_TK.cjs +32 -0
- package/dist/locale/tk_TK.d.ts +3 -0
- package/dist/locale/tk_TK.js +27 -0
- package/dist/locale/tr_TR.cjs +55 -0
- package/dist/locale/tr_TR.d.ts +3 -0
- package/dist/locale/tr_TR.js +50 -0
- package/dist/locale/ug_CN.cjs +35 -0
- package/dist/locale/ug_CN.d.ts +3 -0
- package/dist/locale/ug_CN.js +30 -0
- package/dist/locale/uk_UA.cjs +32 -0
- package/dist/locale/uk_UA.d.ts +3 -0
- package/dist/locale/uk_UA.js +27 -0
- package/dist/locale/ur_PK.cjs +33 -0
- package/dist/locale/ur_PK.d.ts +3 -0
- package/dist/locale/ur_PK.js +28 -0
- package/dist/locale/uz_UZ.cjs +33 -0
- package/dist/locale/uz_UZ.d.ts +3 -0
- package/dist/locale/uz_UZ.js +28 -0
- package/dist/locale/vi_VN.cjs +33 -0
- package/dist/locale/vi_VN.d.ts +3 -0
- package/dist/locale/vi_VN.js +28 -0
- package/dist/locale/zh_CN.cjs +36 -0
- package/dist/locale/zh_CN.d.ts +3 -0
- package/dist/locale/zh_CN.js +31 -0
- package/dist/locale/zh_TW.cjs +36 -0
- package/dist/locale/zh_TW.d.ts +3 -0
- package/dist/locale/zh_TW.js +31 -0
- package/dist/utils/dateUtil.cjs +105 -0
- package/dist/utils/dateUtil.d.ts +29 -0
- package/dist/utils/dateUtil.js +89 -0
- package/dist/utils/getClearIcon.cjs +7 -0
- package/dist/utils/getClearIcon.d.ts +6 -0
- package/dist/utils/getClearIcon.js +5 -0
- package/dist/utils/miscUtil.cjs +46 -0
- package/dist/utils/miscUtil.d.ts +14 -0
- package/dist/utils/miscUtil.js +40 -0
- package/dist/utils/uiUtil.cjs +6 -0
- package/dist/utils/uiUtil.d.ts +1 -0
- package/dist/utils/uiUtil.js +5 -0
- package/dist/utils/warnUtil.cjs +8 -0
- package/dist/utils/warnUtil.d.ts +5 -0
- package/dist/utils/warnUtil.js +6 -0
- package/package.json +82 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_util = require("../Selector/util.cjs");
|
|
7
|
+
let vue = require("vue");
|
|
8
|
+
function useLockEffect(condition, callback) {
|
|
9
|
+
(0, vue.watch)(condition, (val) => {
|
|
10
|
+
if (val) callback(val);
|
|
11
|
+
else require_util.raf(() => {
|
|
12
|
+
callback(!!val);
|
|
13
|
+
});
|
|
14
|
+
}, { flush: "post" });
|
|
15
|
+
}
|
|
16
|
+
exports.default = useLockEffect;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Trigger `callback` immediately when `condition` is `true`.
|
|
4
|
+
* But trigger `callback` in next frame when `condition` is `false`.
|
|
5
|
+
*/
|
|
6
|
+
export default function useLockEffect(condition: Ref<boolean | undefined>, callback: (next: boolean) => void): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { raf } from "../Selector/util.js";
|
|
2
|
+
import { watch } from "vue";
|
|
3
|
+
function useLockEffect(condition, callback) {
|
|
4
|
+
watch(condition, (val) => {
|
|
5
|
+
if (val) callback(val);
|
|
6
|
+
else raf(() => {
|
|
7
|
+
callback(!!val);
|
|
8
|
+
});
|
|
9
|
+
}, { flush: "post" });
|
|
10
|
+
}
|
|
11
|
+
export { useLockEffect as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_useDelayState = require("./useDelayState.cjs");
|
|
7
|
+
let vue = require("vue");
|
|
8
|
+
function useOpen(open, defaultOpen, disabledList, onOpenChange) {
|
|
9
|
+
const [rafOpen, setRafOpen] = require_useDelayState.default((0, vue.computed)(() => disabledList.value?.every((disabled) => disabled) ? false : open.value), defaultOpen.value || false, onOpenChange);
|
|
10
|
+
function setOpen(next, config = {}) {
|
|
11
|
+
if (!config.inherit || rafOpen.value) setRafOpen(next, config.force);
|
|
12
|
+
}
|
|
13
|
+
return [rafOpen, setOpen];
|
|
14
|
+
}
|
|
15
|
+
exports.default = useOpen;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { OpenConfig } from '../../interface';
|
|
3
|
+
/**
|
|
4
|
+
* Control the open state.
|
|
5
|
+
* Will not close if activeElement is on the popup.
|
|
6
|
+
*/
|
|
7
|
+
export default function useOpen(open: Ref<boolean | undefined>, defaultOpen: Ref<boolean | undefined>, disabledList: Ref<Array<boolean | undefined>> | ComputedRef<Array<boolean | undefined>>, onOpenChange?: (open: boolean) => void): readonly [ComputedRef<any>, (next: boolean, config?: OpenConfig) => void];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import useDelayState from "./useDelayState.js";
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
function useOpen(open, defaultOpen, disabledList, onOpenChange) {
|
|
4
|
+
const [rafOpen, setRafOpen] = useDelayState(computed(() => disabledList.value?.every((disabled) => disabled) ? false : open.value), defaultOpen.value || false, onOpenChange);
|
|
5
|
+
function setOpen(next, config = {}) {
|
|
6
|
+
if (!config.inherit || rafOpen.value) setRafOpen(next, config.force);
|
|
7
|
+
}
|
|
8
|
+
return [rafOpen, setOpen];
|
|
9
|
+
}
|
|
10
|
+
export { useOpen as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
let vue = require("vue");
|
|
7
|
+
let _v_c_util = require("@v-c/util");
|
|
8
|
+
function usePresets(presets, legacyRanges) {
|
|
9
|
+
return (0, vue.computed)(() => {
|
|
10
|
+
if (presets.value) return presets.value;
|
|
11
|
+
if (legacyRanges?.value) {
|
|
12
|
+
(0, _v_c_util.warning)(false, "`ranges` is deprecated. Please use `presets` instead.");
|
|
13
|
+
return Object.entries(legacyRanges.value).map(([label, value]) => ({
|
|
14
|
+
label,
|
|
15
|
+
value
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.default = usePresets;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ValueDate } from '../../interface';
|
|
3
|
+
export default function usePresets<DateType = any>(presets: Ref<ValueDate<DateType>[] | undefined>, legacyRanges?: Ref<Record<string, DateType | (() => DateType)> | undefined>): import('vue').ComputedRef<ValueDate<DateType>[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { warning } from "@v-c/util";
|
|
3
|
+
function usePresets(presets, legacyRanges) {
|
|
4
|
+
return computed(() => {
|
|
5
|
+
if (presets.value) return presets.value;
|
|
6
|
+
if (legacyRanges?.value) {
|
|
7
|
+
warning(false, "`ranges` is deprecated. Please use `presets` instead.");
|
|
8
|
+
return Object.entries(legacyRanges.value).map(([label, value]) => ({
|
|
9
|
+
label,
|
|
10
|
+
value
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
return [];
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { usePresets as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_useLockEffect = require("./useLockEffect.cjs");
|
|
7
|
+
let vue = require("vue");
|
|
8
|
+
function useRangeActive(disabled, empty = (0, vue.ref)([]), mergedOpen = (0, vue.ref)(false)) {
|
|
9
|
+
const activeIndex = (0, vue.ref)(0);
|
|
10
|
+
const focused = (0, vue.ref)(false);
|
|
11
|
+
const activeListRef = (0, vue.ref)([]);
|
|
12
|
+
const submitIndexRef = (0, vue.ref)(null);
|
|
13
|
+
const lastOperationRef = (0, vue.ref)(null);
|
|
14
|
+
const updateSubmitIndex = (index) => {
|
|
15
|
+
submitIndexRef.value = index;
|
|
16
|
+
};
|
|
17
|
+
const hasActiveSubmitValue = (index) => {
|
|
18
|
+
return submitIndexRef.value === index;
|
|
19
|
+
};
|
|
20
|
+
const triggerFocus = (nextFocus) => {
|
|
21
|
+
focused.value = nextFocus;
|
|
22
|
+
};
|
|
23
|
+
const lastOperation = (type) => {
|
|
24
|
+
if (type) lastOperationRef.value = type;
|
|
25
|
+
return lastOperationRef.value;
|
|
26
|
+
};
|
|
27
|
+
const nextActiveIndex = (nextValue) => {
|
|
28
|
+
const list = activeListRef.value;
|
|
29
|
+
const filledActiveSet = new Set(list.filter((index) => nextValue?.[index] || empty.value[index]));
|
|
30
|
+
const nextIndex = list[list.length - 1] === 0 ? 1 : 0;
|
|
31
|
+
if (filledActiveSet.size >= 2 || disabled.value[nextIndex]) return null;
|
|
32
|
+
return nextIndex;
|
|
33
|
+
};
|
|
34
|
+
require_useLockEffect.default((0, vue.computed)(() => focused.value || mergedOpen.value), () => {
|
|
35
|
+
if (!focused.value) {
|
|
36
|
+
activeListRef.value = [];
|
|
37
|
+
updateSubmitIndex(null);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
(0, vue.watch)([focused, activeIndex], () => {
|
|
41
|
+
if (focused.value) activeListRef.value.push(activeIndex.value);
|
|
42
|
+
});
|
|
43
|
+
return [
|
|
44
|
+
focused,
|
|
45
|
+
triggerFocus,
|
|
46
|
+
lastOperation,
|
|
47
|
+
activeIndex,
|
|
48
|
+
(index) => {
|
|
49
|
+
activeIndex.value = index;
|
|
50
|
+
},
|
|
51
|
+
nextActiveIndex,
|
|
52
|
+
activeListRef,
|
|
53
|
+
updateSubmitIndex,
|
|
54
|
+
hasActiveSubmitValue
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
exports.default = useRangeActive;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
export type OperationType = 'input' | 'panel';
|
|
3
|
+
export type NextActive<DateType> = (nextValue: [DateType | null | undefined, DateType | null | undefined]) => number | null;
|
|
4
|
+
/**
|
|
5
|
+
* When user first focus one input, any submit will trigger focus another one.
|
|
6
|
+
* When second time focus one input, submit will not trigger focus again.
|
|
7
|
+
* When click outside to close the panel, trigger event if it can trigger onChange.
|
|
8
|
+
*/
|
|
9
|
+
export default function useRangeActive<DateType>(disabled: Ref<(boolean | undefined)[]> | ComputedRef<(boolean | undefined)[]>, empty?: Ref<boolean[]>, mergedOpen?: Ref<boolean | undefined>): readonly [Ref<boolean, boolean>, (nextFocus: boolean) => void, (type?: OperationType) => OperationType, Ref<number, number>, (index: number) => void, NextActive<DateType>, Ref<number[], number[]>, (index: number | null) => void, (index: number) => boolean];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import useLockEffect from "./useLockEffect.js";
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
|
+
function useRangeActive(disabled, empty = ref([]), mergedOpen = ref(false)) {
|
|
4
|
+
const activeIndex = ref(0);
|
|
5
|
+
const focused = ref(false);
|
|
6
|
+
const activeListRef = ref([]);
|
|
7
|
+
const submitIndexRef = ref(null);
|
|
8
|
+
const lastOperationRef = ref(null);
|
|
9
|
+
const updateSubmitIndex = (index) => {
|
|
10
|
+
submitIndexRef.value = index;
|
|
11
|
+
};
|
|
12
|
+
const hasActiveSubmitValue = (index) => {
|
|
13
|
+
return submitIndexRef.value === index;
|
|
14
|
+
};
|
|
15
|
+
const triggerFocus = (nextFocus) => {
|
|
16
|
+
focused.value = nextFocus;
|
|
17
|
+
};
|
|
18
|
+
const lastOperation = (type) => {
|
|
19
|
+
if (type) lastOperationRef.value = type;
|
|
20
|
+
return lastOperationRef.value;
|
|
21
|
+
};
|
|
22
|
+
const nextActiveIndex = (nextValue) => {
|
|
23
|
+
const list = activeListRef.value;
|
|
24
|
+
const filledActiveSet = new Set(list.filter((index) => nextValue?.[index] || empty.value[index]));
|
|
25
|
+
const nextIndex = list[list.length - 1] === 0 ? 1 : 0;
|
|
26
|
+
if (filledActiveSet.size >= 2 || disabled.value[nextIndex]) return null;
|
|
27
|
+
return nextIndex;
|
|
28
|
+
};
|
|
29
|
+
useLockEffect(computed(() => focused.value || mergedOpen.value), () => {
|
|
30
|
+
if (!focused.value) {
|
|
31
|
+
activeListRef.value = [];
|
|
32
|
+
updateSubmitIndex(null);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
watch([focused, activeIndex], () => {
|
|
36
|
+
if (focused.value) activeListRef.value.push(activeIndex.value);
|
|
37
|
+
});
|
|
38
|
+
return [
|
|
39
|
+
focused,
|
|
40
|
+
triggerFocus,
|
|
41
|
+
lastOperation,
|
|
42
|
+
activeIndex,
|
|
43
|
+
(index) => {
|
|
44
|
+
activeIndex.value = index;
|
|
45
|
+
},
|
|
46
|
+
nextActiveIndex,
|
|
47
|
+
activeListRef,
|
|
48
|
+
updateSubmitIndex,
|
|
49
|
+
hasActiveSubmitValue
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
export { useRangeActive as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_miscUtil = require("../../utils/miscUtil.cjs");
|
|
6
|
+
const require_dateUtil = require("../../utils/dateUtil.cjs");
|
|
7
|
+
function useRangeDisabledDate(values, disabled, activeIndexList, generateConfig, locale, disabledDate) {
|
|
8
|
+
const rangeDisabledDate = (date, info) => {
|
|
9
|
+
const activeIndex = activeIndexList.value[activeIndexList.value.length - 1];
|
|
10
|
+
const [start, end] = values.value;
|
|
11
|
+
const mergedInfo = {
|
|
12
|
+
...info,
|
|
13
|
+
from: require_miscUtil.getFromDate(values.value, activeIndexList.value)
|
|
14
|
+
};
|
|
15
|
+
if (activeIndex === 1 && disabled.value[0] && start && !require_dateUtil.isSame(generateConfig.value, locale.value, start, date, mergedInfo.type) && generateConfig.value.isAfter(start, date)) return true;
|
|
16
|
+
if (activeIndex === 0 && disabled.value[1] && end && !require_dateUtil.isSame(generateConfig.value, locale.value, end, date, mergedInfo.type) && generateConfig.value.isAfter(date, end)) return true;
|
|
17
|
+
return disabledDate.value?.(date, mergedInfo) || false;
|
|
18
|
+
};
|
|
19
|
+
return rangeDisabledDate;
|
|
20
|
+
}
|
|
21
|
+
exports.default = useRangeDisabledDate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { GenerateConfig } from '../../generate';
|
|
3
|
+
import { DisabledDate, Locale } from '../../interface';
|
|
4
|
+
import { RangeValueType } from '../RangePicker';
|
|
5
|
+
/**
|
|
6
|
+
* RangePicker need additional logic to handle the `disabled` case. e.g.
|
|
7
|
+
* [disabled, enabled] should end date not before start date
|
|
8
|
+
*/
|
|
9
|
+
export default function useRangeDisabledDate<DateType extends object = any>(values: Ref<RangeValueType<DateType>>, disabled: Ref<[boolean, boolean]>, activeIndexList: Ref<number[]>, generateConfig: Ref<GenerateConfig<DateType>>, locale: Ref<Locale>, disabledDate: Ref<DisabledDate<DateType> | undefined>): DisabledDate<DateType>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getFromDate } from "../../utils/miscUtil.js";
|
|
2
|
+
import { isSame } from "../../utils/dateUtil.js";
|
|
3
|
+
function useRangeDisabledDate(values, disabled, activeIndexList, generateConfig, locale, disabledDate) {
|
|
4
|
+
const rangeDisabledDate = (date, info) => {
|
|
5
|
+
const activeIndex = activeIndexList.value[activeIndexList.value.length - 1];
|
|
6
|
+
const [start, end] = values.value;
|
|
7
|
+
const mergedInfo = {
|
|
8
|
+
...info,
|
|
9
|
+
from: getFromDate(values.value, activeIndexList.value)
|
|
10
|
+
};
|
|
11
|
+
if (activeIndex === 1 && disabled.value[0] && start && !isSame(generateConfig.value, locale.value, start, date, mergedInfo.type) && generateConfig.value.isAfter(start, date)) return true;
|
|
12
|
+
if (activeIndex === 0 && disabled.value[1] && end && !isSame(generateConfig.value, locale.value, end, date, mergedInfo.type) && generateConfig.value.isAfter(date, end)) return true;
|
|
13
|
+
return disabledDate.value?.(date, mergedInfo) || false;
|
|
14
|
+
};
|
|
15
|
+
return rangeDisabledDate;
|
|
16
|
+
}
|
|
17
|
+
export { useRangeDisabledDate as default };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_dateUtil = require("../../utils/dateUtil.cjs");
|
|
7
|
+
const require_useSyncState = require("../../hooks/useSyncState.cjs");
|
|
8
|
+
let vue = require("vue");
|
|
9
|
+
function offsetPanelDate(generateConfig, picker, date, offset) {
|
|
10
|
+
switch (picker) {
|
|
11
|
+
case "date":
|
|
12
|
+
case "datetime":
|
|
13
|
+
case "week": return generateConfig.addMonth(date, offset);
|
|
14
|
+
case "month":
|
|
15
|
+
case "quarter": return generateConfig.addYear(date, offset);
|
|
16
|
+
case "year": return generateConfig.addYear(date, offset * 10);
|
|
17
|
+
case "decade": return generateConfig.addYear(date, offset * 100);
|
|
18
|
+
default: return date;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var EMPTY_LIST = [];
|
|
22
|
+
function useRangePickerValue(generateConfig, locale, calendarValue, modes, open, activeIndex, pickerMode, multiplePanel, defaultPickerValue = (0, vue.ref)(EMPTY_LIST), pickerValue = (0, vue.ref)(EMPTY_LIST), timeDefaultValue = (0, vue.ref)(EMPTY_LIST), onPickerValueChange, minDate, maxDate) {
|
|
23
|
+
const isTimePicker = (0, vue.computed)(() => pickerMode.value === "time");
|
|
24
|
+
const mergedActiveIndex = (0, vue.computed)(() => activeIndex.value || 0);
|
|
25
|
+
const getDefaultPickerValue = (index) => {
|
|
26
|
+
let now = generateConfig.value?.getNow?.();
|
|
27
|
+
if (!now) return;
|
|
28
|
+
if (isTimePicker.value) now = require_dateUtil.fillTime(generateConfig.value, now);
|
|
29
|
+
return defaultPickerValue.value?.[index] || calendarValue.value?.[index] || now;
|
|
30
|
+
};
|
|
31
|
+
const [getStartPickerValue, setStartPickerValue] = require_useSyncState.default(getDefaultPickerValue(0), () => pickerValue.value?.[0]);
|
|
32
|
+
const [getEndPickerValue, setEndPickerValue] = require_useSyncState.default(getDefaultPickerValue(1), () => pickerValue.value?.[1]);
|
|
33
|
+
const currentPickerValue = (0, vue.computed)(() => {
|
|
34
|
+
const current = [getStartPickerValue(true), getEndPickerValue(true)][mergedActiveIndex.value];
|
|
35
|
+
if (!current) return current;
|
|
36
|
+
return isTimePicker.value ? current : require_dateUtil.fillTime(generateConfig.value, current, timeDefaultValue.value?.[mergedActiveIndex.value]);
|
|
37
|
+
});
|
|
38
|
+
const setCurrentPickerValue = (nextPickerValue, source = "panel") => {
|
|
39
|
+
const prevStartPickerValue = getStartPickerValue(true);
|
|
40
|
+
const prevEndPickerValue = getEndPickerValue(true);
|
|
41
|
+
const updater = [setStartPickerValue, setEndPickerValue][mergedActiveIndex.value];
|
|
42
|
+
updater(nextPickerValue);
|
|
43
|
+
const clone = [prevStartPickerValue, prevEndPickerValue];
|
|
44
|
+
clone[mergedActiveIndex.value] = nextPickerValue;
|
|
45
|
+
const mergedCallback = typeof onPickerValueChange === "function" ? onPickerValueChange : onPickerValueChange?.value;
|
|
46
|
+
if (mergedCallback && (!require_dateUtil.isSame(generateConfig.value, locale.value, prevStartPickerValue, clone[0], pickerMode.value) || !require_dateUtil.isSame(generateConfig.value, locale.value, prevEndPickerValue, clone[1], pickerMode.value))) mergedCallback(clone, {
|
|
47
|
+
source,
|
|
48
|
+
range: mergedActiveIndex.value === 1 ? "end" : "start",
|
|
49
|
+
mode: modes.value
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const getEndDatePickerValue = (startDate, endDate) => {
|
|
53
|
+
if (multiplePanel.value) {
|
|
54
|
+
const mode = {
|
|
55
|
+
date: "month",
|
|
56
|
+
datetime: "month",
|
|
57
|
+
week: "month",
|
|
58
|
+
month: "year",
|
|
59
|
+
quarter: "year"
|
|
60
|
+
}[pickerMode.value];
|
|
61
|
+
if (mode && !require_dateUtil.isSame(generateConfig.value, locale.value, startDate, endDate, mode)) return offsetPanelDate(generateConfig.value, pickerMode.value, endDate, -1);
|
|
62
|
+
if (pickerMode.value === "year" && startDate && endDate) {
|
|
63
|
+
if (Math.floor(generateConfig.value.getYear(startDate) / 10) !== Math.floor(generateConfig.value.getYear(endDate) / 10)) return offsetPanelDate(generateConfig.value, pickerMode.value, endDate, -1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return endDate;
|
|
67
|
+
};
|
|
68
|
+
const prevActiveIndexRef = (0, vue.ref)(null);
|
|
69
|
+
(0, vue.watch)(() => [
|
|
70
|
+
open.value,
|
|
71
|
+
mergedActiveIndex.value,
|
|
72
|
+
calendarValue.value?.[mergedActiveIndex.value]
|
|
73
|
+
], () => {
|
|
74
|
+
if (!open.value) return;
|
|
75
|
+
if (defaultPickerValue.value?.[mergedActiveIndex.value]) return;
|
|
76
|
+
let nextPickerValue = isTimePicker.value ? null : generateConfig.value.getNow();
|
|
77
|
+
if (prevActiveIndexRef.value !== null && prevActiveIndexRef.value !== mergedActiveIndex.value) nextPickerValue = [getStartPickerValue(true), getEndPickerValue(true)][mergedActiveIndex.value ^ 1];
|
|
78
|
+
else if (calendarValue.value?.[mergedActiveIndex.value]) nextPickerValue = mergedActiveIndex.value === 0 ? calendarValue.value[0] : getEndDatePickerValue(calendarValue.value[0], calendarValue.value[1]);
|
|
79
|
+
else if (calendarValue.value?.[mergedActiveIndex.value ^ 1]) nextPickerValue = calendarValue.value[mergedActiveIndex.value ^ 1];
|
|
80
|
+
if (!nextPickerValue) return;
|
|
81
|
+
if (minDate?.value && generateConfig.value.isAfter(minDate.value, nextPickerValue)) nextPickerValue = minDate.value;
|
|
82
|
+
const offsetPickerValue = multiplePanel.value ? offsetPanelDate(generateConfig.value, pickerMode.value, nextPickerValue, 1) : nextPickerValue;
|
|
83
|
+
if (maxDate?.value && generateConfig.value.isAfter(offsetPickerValue, maxDate.value)) nextPickerValue = multiplePanel.value ? offsetPanelDate(generateConfig.value, pickerMode.value, maxDate.value, -1) : maxDate.value;
|
|
84
|
+
setCurrentPickerValue(nextPickerValue, "reset");
|
|
85
|
+
}, { flush: "post" });
|
|
86
|
+
(0, vue.watch)(() => [open.value, mergedActiveIndex.value], () => {
|
|
87
|
+
if (open.value) prevActiveIndexRef.value = mergedActiveIndex.value;
|
|
88
|
+
else prevActiveIndexRef.value = null;
|
|
89
|
+
}, { flush: "post" });
|
|
90
|
+
(0, vue.watch)(() => [
|
|
91
|
+
open.value,
|
|
92
|
+
mergedActiveIndex.value,
|
|
93
|
+
defaultPickerValue.value?.[mergedActiveIndex.value]
|
|
94
|
+
], () => {
|
|
95
|
+
if (open.value && defaultPickerValue.value?.[mergedActiveIndex.value]) setCurrentPickerValue(defaultPickerValue.value[mergedActiveIndex.value], "reset");
|
|
96
|
+
}, { flush: "post" });
|
|
97
|
+
return [currentPickerValue, setCurrentPickerValue];
|
|
98
|
+
}
|
|
99
|
+
exports.default = useRangePickerValue;
|
|
100
|
+
exports.offsetPanelDate = offsetPanelDate;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { GenerateConfig } from '../../generate';
|
|
3
|
+
import { InternalMode, Locale, PanelMode } from '../../interface';
|
|
4
|
+
export declare function offsetPanelDate<DateType = any>(generateConfig: GenerateConfig<DateType>, picker: InternalMode, date: DateType, offset: number): DateType;
|
|
5
|
+
export default function useRangePickerValue<DateType extends object, ValueType extends DateType[]>(generateConfig: Ref<GenerateConfig<DateType>>, locale: Ref<Locale>, calendarValue: Ref<ValueType>, modes: Ref<PanelMode[]>, open: Ref<boolean>, activeIndex: Ref<number>, pickerMode: Ref<InternalMode>, multiplePanel: Ref<boolean>, defaultPickerValue?: Ref<any>, pickerValue?: Ref<any>, timeDefaultValue?: Ref<any>, onPickerValueChange?: ((dates: ValueType, info: any) => void) | Ref<((dates: ValueType, info: any) => void) | undefined>, minDate?: Ref<DateType | undefined>, maxDate?: Ref<DateType | undefined>): [currentIndexPickerValue: Ref<DateType>, setCurrentIndexPickerValue: (value: DateType, source?: 'reset' | 'panel') => void];
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { fillTime, isSame } from "../../utils/dateUtil.js";
|
|
2
|
+
import useSyncState from "../../hooks/useSyncState.js";
|
|
3
|
+
import { computed, ref, watch } from "vue";
|
|
4
|
+
function offsetPanelDate(generateConfig, picker, date, offset) {
|
|
5
|
+
switch (picker) {
|
|
6
|
+
case "date":
|
|
7
|
+
case "datetime":
|
|
8
|
+
case "week": return generateConfig.addMonth(date, offset);
|
|
9
|
+
case "month":
|
|
10
|
+
case "quarter": return generateConfig.addYear(date, offset);
|
|
11
|
+
case "year": return generateConfig.addYear(date, offset * 10);
|
|
12
|
+
case "decade": return generateConfig.addYear(date, offset * 100);
|
|
13
|
+
default: return date;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
var EMPTY_LIST = [];
|
|
17
|
+
function useRangePickerValue(generateConfig, locale, calendarValue, modes, open, activeIndex, pickerMode, multiplePanel, defaultPickerValue = ref(EMPTY_LIST), pickerValue = ref(EMPTY_LIST), timeDefaultValue = ref(EMPTY_LIST), onPickerValueChange, minDate, maxDate) {
|
|
18
|
+
const isTimePicker = computed(() => pickerMode.value === "time");
|
|
19
|
+
const mergedActiveIndex = computed(() => activeIndex.value || 0);
|
|
20
|
+
const getDefaultPickerValue = (index) => {
|
|
21
|
+
let now = generateConfig.value?.getNow?.();
|
|
22
|
+
if (!now) return;
|
|
23
|
+
if (isTimePicker.value) now = fillTime(generateConfig.value, now);
|
|
24
|
+
return defaultPickerValue.value?.[index] || calendarValue.value?.[index] || now;
|
|
25
|
+
};
|
|
26
|
+
const [getStartPickerValue, setStartPickerValue] = useSyncState(getDefaultPickerValue(0), () => pickerValue.value?.[0]);
|
|
27
|
+
const [getEndPickerValue, setEndPickerValue] = useSyncState(getDefaultPickerValue(1), () => pickerValue.value?.[1]);
|
|
28
|
+
const currentPickerValue = computed(() => {
|
|
29
|
+
const current = [getStartPickerValue(true), getEndPickerValue(true)][mergedActiveIndex.value];
|
|
30
|
+
if (!current) return current;
|
|
31
|
+
return isTimePicker.value ? current : fillTime(generateConfig.value, current, timeDefaultValue.value?.[mergedActiveIndex.value]);
|
|
32
|
+
});
|
|
33
|
+
const setCurrentPickerValue = (nextPickerValue, source = "panel") => {
|
|
34
|
+
const prevStartPickerValue = getStartPickerValue(true);
|
|
35
|
+
const prevEndPickerValue = getEndPickerValue(true);
|
|
36
|
+
const updater = [setStartPickerValue, setEndPickerValue][mergedActiveIndex.value];
|
|
37
|
+
updater(nextPickerValue);
|
|
38
|
+
const clone = [prevStartPickerValue, prevEndPickerValue];
|
|
39
|
+
clone[mergedActiveIndex.value] = nextPickerValue;
|
|
40
|
+
const mergedCallback = typeof onPickerValueChange === "function" ? onPickerValueChange : onPickerValueChange?.value;
|
|
41
|
+
if (mergedCallback && (!isSame(generateConfig.value, locale.value, prevStartPickerValue, clone[0], pickerMode.value) || !isSame(generateConfig.value, locale.value, prevEndPickerValue, clone[1], pickerMode.value))) mergedCallback(clone, {
|
|
42
|
+
source,
|
|
43
|
+
range: mergedActiveIndex.value === 1 ? "end" : "start",
|
|
44
|
+
mode: modes.value
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const getEndDatePickerValue = (startDate, endDate) => {
|
|
48
|
+
if (multiplePanel.value) {
|
|
49
|
+
const mode = {
|
|
50
|
+
date: "month",
|
|
51
|
+
datetime: "month",
|
|
52
|
+
week: "month",
|
|
53
|
+
month: "year",
|
|
54
|
+
quarter: "year"
|
|
55
|
+
}[pickerMode.value];
|
|
56
|
+
if (mode && !isSame(generateConfig.value, locale.value, startDate, endDate, mode)) return offsetPanelDate(generateConfig.value, pickerMode.value, endDate, -1);
|
|
57
|
+
if (pickerMode.value === "year" && startDate && endDate) {
|
|
58
|
+
if (Math.floor(generateConfig.value.getYear(startDate) / 10) !== Math.floor(generateConfig.value.getYear(endDate) / 10)) return offsetPanelDate(generateConfig.value, pickerMode.value, endDate, -1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return endDate;
|
|
62
|
+
};
|
|
63
|
+
const prevActiveIndexRef = ref(null);
|
|
64
|
+
watch(() => [
|
|
65
|
+
open.value,
|
|
66
|
+
mergedActiveIndex.value,
|
|
67
|
+
calendarValue.value?.[mergedActiveIndex.value]
|
|
68
|
+
], () => {
|
|
69
|
+
if (!open.value) return;
|
|
70
|
+
if (defaultPickerValue.value?.[mergedActiveIndex.value]) return;
|
|
71
|
+
let nextPickerValue = isTimePicker.value ? null : generateConfig.value.getNow();
|
|
72
|
+
if (prevActiveIndexRef.value !== null && prevActiveIndexRef.value !== mergedActiveIndex.value) nextPickerValue = [getStartPickerValue(true), getEndPickerValue(true)][mergedActiveIndex.value ^ 1];
|
|
73
|
+
else if (calendarValue.value?.[mergedActiveIndex.value]) nextPickerValue = mergedActiveIndex.value === 0 ? calendarValue.value[0] : getEndDatePickerValue(calendarValue.value[0], calendarValue.value[1]);
|
|
74
|
+
else if (calendarValue.value?.[mergedActiveIndex.value ^ 1]) nextPickerValue = calendarValue.value[mergedActiveIndex.value ^ 1];
|
|
75
|
+
if (!nextPickerValue) return;
|
|
76
|
+
if (minDate?.value && generateConfig.value.isAfter(minDate.value, nextPickerValue)) nextPickerValue = minDate.value;
|
|
77
|
+
const offsetPickerValue = multiplePanel.value ? offsetPanelDate(generateConfig.value, pickerMode.value, nextPickerValue, 1) : nextPickerValue;
|
|
78
|
+
if (maxDate?.value && generateConfig.value.isAfter(offsetPickerValue, maxDate.value)) nextPickerValue = multiplePanel.value ? offsetPanelDate(generateConfig.value, pickerMode.value, maxDate.value, -1) : maxDate.value;
|
|
79
|
+
setCurrentPickerValue(nextPickerValue, "reset");
|
|
80
|
+
}, { flush: "post" });
|
|
81
|
+
watch(() => [open.value, mergedActiveIndex.value], () => {
|
|
82
|
+
if (open.value) prevActiveIndexRef.value = mergedActiveIndex.value;
|
|
83
|
+
else prevActiveIndexRef.value = null;
|
|
84
|
+
}, { flush: "post" });
|
|
85
|
+
watch(() => [
|
|
86
|
+
open.value,
|
|
87
|
+
mergedActiveIndex.value,
|
|
88
|
+
defaultPickerValue.value?.[mergedActiveIndex.value]
|
|
89
|
+
], () => {
|
|
90
|
+
if (open.value && defaultPickerValue.value?.[mergedActiveIndex.value]) setCurrentPickerValue(defaultPickerValue.value[mergedActiveIndex.value], "reset");
|
|
91
|
+
}, { flush: "post" });
|
|
92
|
+
return [currentPickerValue, setCurrentPickerValue];
|
|
93
|
+
}
|
|
94
|
+
export { useRangePickerValue as default, offsetPanelDate };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_miscUtil = require("../../utils/miscUtil.cjs");
|
|
7
|
+
const require_dateUtil = require("../../utils/dateUtil.cjs");
|
|
8
|
+
const require_useLockEffect = require("./useLockEffect.cjs");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
var EMPTY_VALUE = [];
|
|
11
|
+
function useUtil(generateConfig, locale, formatList) {
|
|
12
|
+
const getDateTexts = (dates) => {
|
|
13
|
+
return dates.map((date) => require_dateUtil.formatValue(date, {
|
|
14
|
+
generateConfig: generateConfig.value,
|
|
15
|
+
locale: locale.value,
|
|
16
|
+
format: formatList.value[0]
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
const isSameDates = (source, target) => {
|
|
20
|
+
const maxLen = Math.max(source.length, target.length);
|
|
21
|
+
let diffIndex = -1;
|
|
22
|
+
for (let i = 0; i < maxLen; i += 1) {
|
|
23
|
+
const prev = source[i] || null;
|
|
24
|
+
const next = target[i] || null;
|
|
25
|
+
if (prev !== next && !require_dateUtil.isSameTimestamp(generateConfig.value, prev, next)) {
|
|
26
|
+
diffIndex = i;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return [diffIndex < 0, diffIndex !== 0];
|
|
31
|
+
};
|
|
32
|
+
return [getDateTexts, isSameDates];
|
|
33
|
+
}
|
|
34
|
+
function orderDates(dates, generateConfig) {
|
|
35
|
+
return [...dates].sort((a, b) => generateConfig.isAfter(a, b) ? 1 : -1);
|
|
36
|
+
}
|
|
37
|
+
function useInnerValue(generateConfig, locale, formatList, rangeValue, order, defaultValue, value, onCalendarChange, onOk) {
|
|
38
|
+
const internalValue = (0, vue.ref)(defaultValue.value);
|
|
39
|
+
const mergedValue = (0, vue.computed)(() => {
|
|
40
|
+
return (value.value !== void 0 ? value.value : internalValue.value) || EMPTY_VALUE;
|
|
41
|
+
});
|
|
42
|
+
const setInnerValue = (val) => {
|
|
43
|
+
if (value.value === void 0) internalValue.value = val;
|
|
44
|
+
};
|
|
45
|
+
const calendarValue = (0, vue.ref)(mergedValue.value);
|
|
46
|
+
(0, vue.watch)(mergedValue, (val) => {
|
|
47
|
+
calendarValue.value = val;
|
|
48
|
+
});
|
|
49
|
+
const setCalendarValue = (val) => {
|
|
50
|
+
calendarValue.value = val;
|
|
51
|
+
};
|
|
52
|
+
const [getDateTexts, isSameDates] = useUtil(generateConfig, locale, formatList);
|
|
53
|
+
const triggerCalendarChange = (nextCalendarValues) => {
|
|
54
|
+
let clone = [...nextCalendarValues];
|
|
55
|
+
if (rangeValue.value) for (let i = 0; i < 2; i += 1) clone[i] = clone[i] || null;
|
|
56
|
+
else if (order.value) clone = orderDates(clone.filter((date) => date), generateConfig.value);
|
|
57
|
+
const [isSameMergedDates, isSameStart] = isSameDates(calendarValue.value, clone);
|
|
58
|
+
if (!isSameMergedDates) {
|
|
59
|
+
setCalendarValue(clone);
|
|
60
|
+
if (onCalendarChange) {
|
|
61
|
+
const cellTexts = getDateTexts(clone);
|
|
62
|
+
onCalendarChange(clone, cellTexts, { range: isSameStart ? "end" : "start" });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const triggerOk = () => {
|
|
67
|
+
if (onOk) onOk(calendarValue.value);
|
|
68
|
+
};
|
|
69
|
+
return [
|
|
70
|
+
mergedValue,
|
|
71
|
+
setInnerValue,
|
|
72
|
+
calendarValue,
|
|
73
|
+
triggerCalendarChange,
|
|
74
|
+
triggerOk
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
function useRangeValue(info, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, open, isInvalidateDate) {
|
|
78
|
+
const orderOnChange = (0, vue.computed)(() => disabled.value.some((d) => d) ? false : info.value.order);
|
|
79
|
+
const [getDateTexts, isSameDates] = useUtil((0, vue.computed)(() => info.value.generateConfig), (0, vue.computed)(() => info.value.locale), formatList);
|
|
80
|
+
const submitValue = (0, vue.ref)(mergedValue.value);
|
|
81
|
+
(0, vue.watch)(mergedValue, (val) => {
|
|
82
|
+
submitValue.value = val;
|
|
83
|
+
});
|
|
84
|
+
const setSubmitValue = (val) => {
|
|
85
|
+
submitValue.value = val;
|
|
86
|
+
};
|
|
87
|
+
const triggerSubmit = (nextValue) => {
|
|
88
|
+
const { generateConfig, locale, picker, onChange, allowEmpty, order } = info.value;
|
|
89
|
+
const isNullValue = nextValue === null;
|
|
90
|
+
let clone = [...nextValue || submitValue.value];
|
|
91
|
+
if (isNullValue) {
|
|
92
|
+
const maxLen = Math.max(disabled.value.length, clone.length);
|
|
93
|
+
for (let i = 0; i < maxLen; i += 1) if (!disabled.value[i]) clone[i] = null;
|
|
94
|
+
}
|
|
95
|
+
if (orderOnChange.value && clone[0] && clone[1]) clone = orderDates(clone, generateConfig);
|
|
96
|
+
triggerCalendarChange(clone);
|
|
97
|
+
const [start, end] = clone;
|
|
98
|
+
const startEmpty = !start;
|
|
99
|
+
const endEmpty = !end;
|
|
100
|
+
const validateEmptyDateRange = allowEmpty ? (!startEmpty || allowEmpty[0]) && (!endEmpty || allowEmpty[1]) : true;
|
|
101
|
+
const validateOrder = !order || startEmpty || endEmpty || require_dateUtil.isSame(generateConfig, locale, start, end, picker) || generateConfig.isAfter(end, start);
|
|
102
|
+
const validateDates = (disabled.value[0] || !start || !isInvalidateDate(start, { activeIndex: 0 })) && (disabled.value[1] || !end || !isInvalidateDate(end, {
|
|
103
|
+
from: start,
|
|
104
|
+
activeIndex: 1
|
|
105
|
+
}));
|
|
106
|
+
const allPassed = isNullValue || validateEmptyDateRange && validateOrder && validateDates;
|
|
107
|
+
if (allPassed) {
|
|
108
|
+
setInnerValue(clone);
|
|
109
|
+
const [isSameMergedDates] = isSameDates(clone, mergedValue.value);
|
|
110
|
+
if (onChange && !isSameMergedDates) {
|
|
111
|
+
const everyEmpty = clone.every((val) => !val);
|
|
112
|
+
onChange(isNullValue && everyEmpty ? null : clone, everyEmpty ? null : getDateTexts(clone));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return allPassed;
|
|
116
|
+
};
|
|
117
|
+
const flushSubmit = (index, needTriggerChange) => {
|
|
118
|
+
setSubmitValue(require_miscUtil.fillIndex(submitValue.value, index, getCalendarValue()[index]));
|
|
119
|
+
if (needTriggerChange) triggerSubmit();
|
|
120
|
+
};
|
|
121
|
+
const interactiveFinished = (0, vue.computed)(() => !focused.value && !open.value);
|
|
122
|
+
require_useLockEffect.default((0, vue.computed)(() => !interactiveFinished.value), (next) => {
|
|
123
|
+
if (next === false) {
|
|
124
|
+
if (!next) {
|
|
125
|
+
triggerSubmit();
|
|
126
|
+
triggerCalendarChange(mergedValue.value);
|
|
127
|
+
submitValue.value = mergedValue.value;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return [flushSubmit, triggerSubmit];
|
|
132
|
+
}
|
|
133
|
+
exports.default = useRangeValue;
|
|
134
|
+
exports.useInnerValue = useInnerValue;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { GenerateConfig } from '../../generate';
|
|
3
|
+
import { BaseInfo, FormatType, Locale } from '../../interface';
|
|
4
|
+
type TriggerCalendarChange<ValueType extends object[]> = (calendarValues: ValueType) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.
|
|
7
|
+
* `calendarValue` will be reset when blur & focus & open.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useInnerValue<ValueType extends DateType[], DateType extends object = any>(generateConfig: Ref<GenerateConfig<DateType>>, locale: Ref<Locale>, formatList: Ref<FormatType[]>, rangeValue: Ref<boolean | undefined>, order: Ref<boolean | undefined>, defaultValue: Ref<ValueType | undefined>, value: Ref<ValueType | undefined>, onCalendarChange?: (dates: ValueType, dateStrings: [string, string], info: BaseInfo) => void, onOk?: (dates: ValueType) => void): readonly [ComputedRef<ValueType>, (val: ValueType) => void, Ref<ValueType, ValueType>, TriggerCalendarChange<ValueType>, () => void];
|
|
10
|
+
export default function useRangeValue<ValueType extends DateType[], DateType extends object = any>(info: ComputedRef<{
|
|
11
|
+
generateConfig: GenerateConfig<DateType>;
|
|
12
|
+
locale: Locale;
|
|
13
|
+
picker: string;
|
|
14
|
+
allowEmpty: boolean[];
|
|
15
|
+
order: boolean;
|
|
16
|
+
onChange?: (dates: ValueType | null, dateStrings: [string, string] | null) => void;
|
|
17
|
+
}>, mergedValue: Ref<ValueType> | ComputedRef<ValueType>, setInnerValue: (nextValue: ValueType) => void, getCalendarValue: () => ValueType, triggerCalendarChange: TriggerCalendarChange<ValueType>, disabled: Ref<boolean[]>, formatList: Ref<FormatType[]>, focused: Ref<boolean>, open: Ref<boolean>, isInvalidateDate: (date: DateType, info?: {
|
|
18
|
+
from?: DateType;
|
|
19
|
+
activeIndex: number;
|
|
20
|
+
}) => boolean): readonly [(index: number, needTriggerChange: boolean) => void, (nextValue?: ValueType) => boolean];
|
|
21
|
+
export {};
|