@rc-component/picker 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +154 -0
- package/assets/index.css +407 -0
- package/assets/index.less +570 -0
- package/es/PickerInput/Popup/Footer.d.ts +19 -0
- package/es/PickerInput/Popup/Footer.js +78 -0
- package/es/PickerInput/Popup/PopupPanel.d.ts +10 -0
- package/es/PickerInput/Popup/PopupPanel.js +84 -0
- package/es/PickerInput/Popup/PresetPanel.d.ts +9 -0
- package/es/PickerInput/Popup/PresetPanel.js +31 -0
- package/es/PickerInput/Popup/index.d.ts +20 -0
- package/es/PickerInput/Popup/index.js +198 -0
- package/es/PickerInput/RangePicker.d.ts +54 -0
- package/es/PickerInput/RangePicker.js +641 -0
- package/es/PickerInput/Selector/Icon.d.ts +10 -0
- package/es/PickerInput/Selector/Icon.js +32 -0
- package/es/PickerInput/Selector/Input.d.ts +28 -0
- package/es/PickerInput/Selector/Input.js +377 -0
- package/es/PickerInput/Selector/MaskFormat.d.ts +22 -0
- package/es/PickerInput/Selector/MaskFormat.js +107 -0
- package/es/PickerInput/Selector/RangeSelector.d.ts +26 -0
- package/es/PickerInput/Selector/RangeSelector.js +218 -0
- package/es/PickerInput/Selector/SingleSelector/MultipleDates.d.ts +12 -0
- package/es/PickerInput/Selector/SingleSelector/MultipleDates.js +66 -0
- package/es/PickerInput/Selector/SingleSelector/index.d.ts +18 -0
- package/es/PickerInput/Selector/SingleSelector/index.js +187 -0
- package/es/PickerInput/Selector/hooks/useClearIcon.d.ts +8 -0
- package/es/PickerInput/Selector/hooks/useClearIcon.js +19 -0
- package/es/PickerInput/Selector/hooks/useInputProps.d.ts +16 -0
- package/es/PickerInput/Selector/hooks/useInputProps.js +178 -0
- package/es/PickerInput/Selector/hooks/useRootProps.d.ts +2 -0
- package/es/PickerInput/Selector/hooks/useRootProps.js +8 -0
- package/es/PickerInput/Selector/util.d.ts +1 -0
- package/es/PickerInput/Selector/util.js +12 -0
- package/es/PickerInput/SinglePicker.d.ts +51 -0
- package/es/PickerInput/SinglePicker.js +545 -0
- package/es/PickerInput/context.d.ts +13 -0
- package/es/PickerInput/context.js +3 -0
- package/es/PickerInput/hooks/useCellRender.d.ts +2 -0
- package/es/PickerInput/hooks/useCellRender.js +41 -0
- package/es/PickerInput/hooks/useDelayState.d.ts +5 -0
- package/es/PickerInput/hooks/useDelayState.js +48 -0
- package/es/PickerInput/hooks/useDisabledBoundary.d.ts +7 -0
- package/es/PickerInput/hooks/useDisabledBoundary.js +20 -0
- package/es/PickerInput/hooks/useFieldFormat.d.ts +2 -0
- package/es/PickerInput/hooks/useFieldFormat.js +18 -0
- package/es/PickerInput/hooks/useFieldsInvalidate.d.ts +5 -0
- package/es/PickerInput/hooks/useFieldsInvalidate.js +55 -0
- package/es/PickerInput/hooks/useFilledProps.d.ts +37 -0
- package/es/PickerInput/hooks/useFilledProps.js +155 -0
- package/es/PickerInput/hooks/useInputReadOnly.d.ts +2 -0
- package/es/PickerInput/hooks/useInputReadOnly.js +6 -0
- package/es/PickerInput/hooks/useInvalidate.d.ts +9 -0
- package/es/PickerInput/hooks/useInvalidate.js +61 -0
- package/es/PickerInput/hooks/useLockEffect.d.ts +5 -0
- package/es/PickerInput/hooks/useLockEffect.js +25 -0
- package/es/PickerInput/hooks/useOpen.d.ts +6 -0
- package/es/PickerInput/hooks/useOpen.js +33 -0
- package/es/PickerInput/hooks/usePickerRef.d.ts +7 -0
- package/es/PickerInput/hooks/usePickerRef.js +19 -0
- package/es/PickerInput/hooks/usePresets.d.ts +2 -0
- package/es/PickerInput/hooks/usePresets.js +28 -0
- package/es/PickerInput/hooks/useRangeActive.d.ts +19 -0
- package/es/PickerInput/hooks/useRangeActive.js +74 -0
- package/es/PickerInput/hooks/useRangeDisabledDate.d.ts +8 -0
- package/es/PickerInput/hooks/useRangeDisabledDate.js +53 -0
- package/es/PickerInput/hooks/useRangePickerValue.d.ts +5 -0
- package/es/PickerInput/hooks/useRangePickerValue.js +192 -0
- package/es/PickerInput/hooks/useRangeValue.d.ts +28 -0
- package/es/PickerInput/hooks/useRangeValue.js +297 -0
- package/es/PickerInput/hooks/useShowNow.d.ts +2 -0
- package/es/PickerInput/hooks/useShowNow.js +14 -0
- package/es/PickerPanel/DatePanel/index.d.ts +10 -0
- package/es/PickerPanel/DatePanel/index.js +190 -0
- package/es/PickerPanel/DateTimePanel/index.d.ts +3 -0
- package/es/PickerPanel/DateTimePanel/index.js +55 -0
- package/es/PickerPanel/DecadePanel/index.d.ts +3 -0
- package/es/PickerPanel/DecadePanel/index.js +113 -0
- package/es/PickerPanel/MonthPanel/index.d.ts +3 -0
- package/es/PickerPanel/MonthPanel/index.js +106 -0
- package/es/PickerPanel/PanelBody.d.ts +17 -0
- package/es/PickerPanel/PanelBody.js +153 -0
- package/es/PickerPanel/PanelHeader.d.ts +11 -0
- package/es/PickerPanel/PanelHeader.js +133 -0
- package/es/PickerPanel/QuarterPanel/index.d.ts +3 -0
- package/es/PickerPanel/QuarterPanel/index.js +92 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.d.ts +17 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +149 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/index.d.ts +4 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/index.js +283 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/useScrollTo.d.ts +2 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js +72 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/util.d.ts +3 -0
- package/es/PickerPanel/TimePanel/TimePanelBody/util.js +43 -0
- package/es/PickerPanel/TimePanel/index.d.ts +4 -0
- package/es/PickerPanel/TimePanel/index.js +38 -0
- package/es/PickerPanel/WeekPanel/index.d.ts +3 -0
- package/es/PickerPanel/WeekPanel/index.js +55 -0
- package/es/PickerPanel/YearPanel/index.d.ts +3 -0
- package/es/PickerPanel/YearPanel/index.js +116 -0
- package/es/PickerPanel/context.d.ts +24 -0
- package/es/PickerPanel/context.js +67 -0
- package/es/PickerPanel/index.d.ts +60 -0
- package/es/PickerPanel/index.js +315 -0
- package/es/PickerTrigger/index.d.ts +19 -0
- package/es/PickerTrigger/index.js +86 -0
- package/es/PickerTrigger/util.d.ts +2 -0
- package/es/PickerTrigger/util.js +4 -0
- package/es/generate/dateFns.d.ts +3 -0
- package/es/generate/dateFns.js +163 -0
- package/es/generate/dayjs.d.ts +4 -0
- package/es/generate/dayjs.js +233 -0
- package/es/generate/index.d.ts +37 -0
- package/es/generate/index.js +1 -0
- package/es/generate/luxon.d.ts +4 -0
- package/es/generate/luxon.js +197 -0
- package/es/generate/moment.d.ts +4 -0
- package/es/generate/moment.js +152 -0
- package/es/hooks/useLocale.d.ts +6 -0
- package/es/hooks/useLocale.js +82 -0
- package/es/hooks/useSyncState.d.ts +6 -0
- package/es/hooks/useSyncState.js +27 -0
- package/es/hooks/useTimeConfig.d.ts +18 -0
- package/es/hooks/useTimeConfig.js +166 -0
- package/es/hooks/useTimeInfo.d.ts +12 -0
- package/es/hooks/useTimeInfo.js +164 -0
- package/es/hooks/useToggleDates.d.ts +8 -0
- package/es/hooks/useToggleDates.js +26 -0
- package/es/index.d.ts +35 -0
- package/es/index.js +34 -0
- package/es/interface.d.ts +365 -0
- package/es/interface.js +1 -0
- package/es/locale/am_ET.d.ts +3 -0
- package/es/locale/am_ET.js +31 -0
- package/es/locale/ar_EG.d.ts +3 -0
- package/es/locale/ar_EG.js +34 -0
- package/es/locale/az_AZ.d.ts +3 -0
- package/es/locale/az_AZ.js +35 -0
- package/es/locale/bg_BG.d.ts +3 -0
- package/es/locale/bg_BG.js +34 -0
- package/es/locale/bn_BD.d.ts +3 -0
- package/es/locale/bn_BD.js +35 -0
- package/es/locale/by_BY.d.ts +3 -0
- package/es/locale/by_BY.js +35 -0
- package/es/locale/ca_ES.d.ts +3 -0
- package/es/locale/ca_ES.js +34 -0
- package/es/locale/common.d.ts +2 -0
- package/es/locale/common.js +6 -0
- package/es/locale/cs_CZ.d.ts +3 -0
- package/es/locale/cs_CZ.js +34 -0
- package/es/locale/da_DK.d.ts +3 -0
- package/es/locale/da_DK.js +34 -0
- package/es/locale/de_DE.d.ts +3 -0
- package/es/locale/de_DE.js +34 -0
- package/es/locale/el_GR.d.ts +3 -0
- package/es/locale/el_GR.js +34 -0
- package/es/locale/en_GB.d.ts +3 -0
- package/es/locale/en_GB.js +34 -0
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +35 -0
- package/es/locale/es_ES.d.ts +3 -0
- package/es/locale/es_ES.js +34 -0
- package/es/locale/es_MX.d.ts +3 -0
- package/es/locale/es_MX.js +35 -0
- package/es/locale/et_EE.d.ts +3 -0
- package/es/locale/et_EE.js +34 -0
- package/es/locale/eu_ES.d.ts +3 -0
- package/es/locale/eu_ES.js +36 -0
- package/es/locale/fa_IR.d.ts +3 -0
- package/es/locale/fa_IR.js +34 -0
- package/es/locale/fi_FI.d.ts +3 -0
- package/es/locale/fi_FI.js +34 -0
- package/es/locale/fr_BE.d.ts +3 -0
- package/es/locale/fr_BE.js +34 -0
- package/es/locale/fr_CA.d.ts +3 -0
- package/es/locale/fr_CA.js +35 -0
- package/es/locale/fr_FR.d.ts +3 -0
- package/es/locale/fr_FR.js +35 -0
- package/es/locale/ga_IE.d.ts +3 -0
- package/es/locale/ga_IE.js +35 -0
- package/es/locale/gl_ES.d.ts +3 -0
- package/es/locale/gl_ES.js +34 -0
- package/es/locale/he_IL.d.ts +3 -0
- package/es/locale/he_IL.js +35 -0
- package/es/locale/hi_IN.d.ts +3 -0
- package/es/locale/hi_IN.js +35 -0
- package/es/locale/hr_HR.d.ts +3 -0
- package/es/locale/hr_HR.js +35 -0
- package/es/locale/hu_HU.d.ts +3 -0
- package/es/locale/hu_HU.js +58 -0
- package/es/locale/id_ID.d.ts +3 -0
- package/es/locale/id_ID.js +35 -0
- package/es/locale/is_IS.d.ts +3 -0
- package/es/locale/is_IS.js +34 -0
- package/es/locale/it_IT.d.ts +3 -0
- package/es/locale/it_IT.js +34 -0
- package/es/locale/ja_JP.d.ts +3 -0
- package/es/locale/ja_JP.js +37 -0
- package/es/locale/ka_GE.d.ts +3 -0
- package/es/locale/ka_GE.js +35 -0
- package/es/locale/kk_KZ.d.ts +3 -0
- package/es/locale/kk_KZ.js +34 -0
- package/es/locale/km_KH.d.ts +3 -0
- package/es/locale/km_KH.js +36 -0
- package/es/locale/kmr_IQ.d.ts +3 -0
- package/es/locale/kmr_IQ.js +34 -0
- package/es/locale/kn_IN.d.ts +3 -0
- package/es/locale/kn_IN.js +35 -0
- package/es/locale/ko_KR.d.ts +3 -0
- package/es/locale/ko_KR.js +36 -0
- package/es/locale/lt_LT.d.ts +3 -0
- package/es/locale/lt_LT.js +36 -0
- package/es/locale/lv_LV.d.ts +3 -0
- package/es/locale/lv_LV.js +34 -0
- package/es/locale/mk_MK.d.ts +3 -0
- package/es/locale/mk_MK.js +34 -0
- package/es/locale/ml_IN.d.ts +3 -0
- package/es/locale/ml_IN.js +35 -0
- package/es/locale/mn_MN.d.ts +3 -0
- package/es/locale/mn_MN.js +36 -0
- package/es/locale/ms_MY.d.ts +3 -0
- package/es/locale/ms_MY.js +36 -0
- package/es/locale/my_MM.d.ts +3 -0
- package/es/locale/my_MM.js +35 -0
- package/es/locale/nb_NO.d.ts +3 -0
- package/es/locale/nb_NO.js +36 -0
- package/es/locale/ne_NP.d.ts +3 -0
- package/es/locale/ne_NP.js +35 -0
- package/es/locale/nl_BE.d.ts +3 -0
- package/es/locale/nl_BE.js +34 -0
- package/es/locale/nl_NL.d.ts +3 -0
- package/es/locale/nl_NL.js +34 -0
- package/es/locale/pl_PL.d.ts +3 -0
- package/es/locale/pl_PL.js +34 -0
- package/es/locale/pt_BR.d.ts +3 -0
- package/es/locale/pt_BR.js +37 -0
- package/es/locale/pt_PT.d.ts +3 -0
- package/es/locale/pt_PT.js +36 -0
- package/es/locale/ro_RO.d.ts +3 -0
- package/es/locale/ro_RO.js +35 -0
- package/es/locale/ru_RU.d.ts +3 -0
- package/es/locale/ru_RU.js +34 -0
- package/es/locale/si_LK.d.ts +3 -0
- package/es/locale/si_LK.js +36 -0
- package/es/locale/sk_SK.d.ts +3 -0
- package/es/locale/sk_SK.js +34 -0
- package/es/locale/sl_SI.d.ts +3 -0
- package/es/locale/sl_SI.js +34 -0
- package/es/locale/sr_Cyrl_RS.d.ts +3 -0
- package/es/locale/sr_Cyrl_RS.js +34 -0
- package/es/locale/sr_RS.d.ts +3 -0
- package/es/locale/sr_RS.js +34 -0
- package/es/locale/sv_SE.d.ts +3 -0
- package/es/locale/sv_SE.js +34 -0
- package/es/locale/ta_IN.d.ts +3 -0
- package/es/locale/ta_IN.js +35 -0
- package/es/locale/th_TH.d.ts +3 -0
- package/es/locale/th_TH.js +34 -0
- package/es/locale/tk_TK.d.ts +3 -0
- package/es/locale/tk_TK.js +34 -0
- package/es/locale/tr_TR.d.ts +3 -0
- package/es/locale/tr_TR.js +36 -0
- package/es/locale/ug_CN.d.ts +3 -0
- package/es/locale/ug_CN.js +37 -0
- package/es/locale/uk_UA.d.ts +3 -0
- package/es/locale/uk_UA.js +34 -0
- package/es/locale/ur_PK.d.ts +3 -0
- package/es/locale/ur_PK.js +35 -0
- package/es/locale/uz_UZ.d.ts +3 -0
- package/es/locale/uz_UZ.js +35 -0
- package/es/locale/vi_VN.d.ts +3 -0
- package/es/locale/vi_VN.js +35 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +36 -0
- package/es/locale/zh_TW.d.ts +3 -0
- package/es/locale/zh_TW.js +38 -0
- package/es/utils/dateUtil.d.ts +29 -0
- package/es/utils/dateUtil.js +140 -0
- package/es/utils/getClearIcon.d.ts +5 -0
- package/es/utils/getClearIcon.js +8 -0
- package/es/utils/miscUtil.d.ts +14 -0
- package/es/utils/miscUtil.js +70 -0
- package/es/utils/uiUtil.d.ts +1 -0
- package/es/utils/uiUtil.js +7 -0
- package/es/utils/warnUtil.d.ts +5 -0
- package/es/utils/warnUtil.js +10 -0
- package/lib/PickerInput/Popup/Footer.d.ts +19 -0
- package/lib/PickerInput/Popup/Footer.js +88 -0
- package/lib/PickerInput/Popup/PopupPanel.d.ts +10 -0
- package/lib/PickerInput/Popup/PopupPanel.js +93 -0
- package/lib/PickerInput/Popup/PresetPanel.d.ts +9 -0
- package/lib/PickerInput/Popup/PresetPanel.js +40 -0
- package/lib/PickerInput/Popup/index.d.ts +20 -0
- package/lib/PickerInput/Popup/index.js +207 -0
- package/lib/PickerInput/RangePicker.d.ts +54 -0
- package/lib/PickerInput/RangePicker.js +650 -0
- package/lib/PickerInput/Selector/Icon.d.ts +10 -0
- package/lib/PickerInput/Selector/Icon.js +43 -0
- package/lib/PickerInput/Selector/Input.d.ts +28 -0
- package/lib/PickerInput/Selector/Input.js +385 -0
- package/lib/PickerInput/Selector/MaskFormat.d.ts +22 -0
- package/lib/PickerInput/Selector/MaskFormat.js +112 -0
- package/lib/PickerInput/Selector/RangeSelector.d.ts +26 -0
- package/lib/PickerInput/Selector/RangeSelector.js +227 -0
- package/lib/PickerInput/Selector/SingleSelector/MultipleDates.d.ts +12 -0
- package/lib/PickerInput/Selector/SingleSelector/MultipleDates.js +76 -0
- package/lib/PickerInput/Selector/SingleSelector/index.d.ts +18 -0
- package/lib/PickerInput/Selector/SingleSelector/index.js +196 -0
- package/lib/PickerInput/Selector/hooks/useClearIcon.d.ts +8 -0
- package/lib/PickerInput/Selector/hooks/useClearIcon.js +27 -0
- package/lib/PickerInput/Selector/hooks/useInputProps.d.ts +16 -0
- package/lib/PickerInput/Selector/hooks/useInputProps.js +187 -0
- package/lib/PickerInput/Selector/hooks/useRootProps.d.ts +2 -0
- package/lib/PickerInput/Selector/hooks/useRootProps.js +17 -0
- package/lib/PickerInput/Selector/util.d.ts +1 -0
- package/lib/PickerInput/Selector/util.js +18 -0
- package/lib/PickerInput/SinglePicker.d.ts +51 -0
- package/lib/PickerInput/SinglePicker.js +553 -0
- package/lib/PickerInput/context.d.ts +13 -0
- package/lib/PickerInput/context.js +12 -0
- package/lib/PickerInput/hooks/useCellRender.d.ts +2 -0
- package/lib/PickerInput/hooks/useCellRender.js +49 -0
- package/lib/PickerInput/hooks/useDelayState.d.ts +5 -0
- package/lib/PickerInput/hooks/useDelayState.js +54 -0
- package/lib/PickerInput/hooks/useDisabledBoundary.d.ts +7 -0
- package/lib/PickerInput/hooks/useDisabledBoundary.js +26 -0
- package/lib/PickerInput/hooks/useFieldFormat.d.ts +2 -0
- package/lib/PickerInput/hooks/useFieldFormat.js +26 -0
- package/lib/PickerInput/hooks/useFieldsInvalidate.d.ts +5 -0
- package/lib/PickerInput/hooks/useFieldsInvalidate.js +64 -0
- package/lib/PickerInput/hooks/useFilledProps.d.ts +37 -0
- package/lib/PickerInput/hooks/useFilledProps.js +164 -0
- package/lib/PickerInput/hooks/useInputReadOnly.d.ts +2 -0
- package/lib/PickerInput/hooks/useInputReadOnly.js +12 -0
- package/lib/PickerInput/hooks/useInvalidate.d.ts +9 -0
- package/lib/PickerInput/hooks/useInvalidate.js +67 -0
- package/lib/PickerInput/hooks/useLockEffect.d.ts +5 -0
- package/lib/PickerInput/hooks/useLockEffect.js +34 -0
- package/lib/PickerInput/hooks/useOpen.d.ts +6 -0
- package/lib/PickerInput/hooks/useOpen.js +39 -0
- package/lib/PickerInput/hooks/usePickerRef.d.ts +7 -0
- package/lib/PickerInput/hooks/usePickerRef.js +28 -0
- package/lib/PickerInput/hooks/usePresets.d.ts +2 -0
- package/lib/PickerInput/hooks/usePresets.js +38 -0
- package/lib/PickerInput/hooks/useRangeActive.d.ts +19 -0
- package/lib/PickerInput/hooks/useRangeActive.js +84 -0
- package/lib/PickerInput/hooks/useRangeDisabledDate.d.ts +8 -0
- package/lib/PickerInput/hooks/useRangeDisabledDate.js +58 -0
- package/lib/PickerInput/hooks/useRangePickerValue.d.ts +5 -0
- package/lib/PickerInput/hooks/useRangePickerValue.js +203 -0
- package/lib/PickerInput/hooks/useRangeValue.d.ts +28 -0
- package/lib/PickerInput/hooks/useRangeValue.js +308 -0
- package/lib/PickerInput/hooks/useShowNow.d.ts +2 -0
- package/lib/PickerInput/hooks/useShowNow.js +20 -0
- package/lib/PickerPanel/DatePanel/index.d.ts +10 -0
- package/lib/PickerPanel/DatePanel/index.js +199 -0
- package/lib/PickerPanel/DateTimePanel/index.d.ts +3 -0
- package/lib/PickerPanel/DateTimePanel/index.js +65 -0
- package/lib/PickerPanel/DecadePanel/index.d.ts +3 -0
- package/lib/PickerPanel/DecadePanel/index.js +122 -0
- package/lib/PickerPanel/MonthPanel/index.d.ts +3 -0
- package/lib/PickerPanel/MonthPanel/index.js +115 -0
- package/lib/PickerPanel/PanelBody.d.ts +17 -0
- package/lib/PickerPanel/PanelBody.js +162 -0
- package/lib/PickerPanel/PanelHeader.d.ts +11 -0
- package/lib/PickerPanel/PanelHeader.js +143 -0
- package/lib/PickerPanel/QuarterPanel/index.d.ts +3 -0
- package/lib/PickerPanel/QuarterPanel/index.js +101 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/TimeColumn.d.ts +17 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +158 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/index.d.ts +4 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/index.js +293 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/useScrollTo.d.ts +2 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js +82 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/util.d.ts +3 -0
- package/lib/PickerPanel/TimePanel/TimePanelBody/util.js +49 -0
- package/lib/PickerPanel/TimePanel/index.d.ts +4 -0
- package/lib/PickerPanel/TimePanel/index.js +48 -0
- package/lib/PickerPanel/WeekPanel/index.d.ts +3 -0
- package/lib/PickerPanel/WeekPanel/index.js +64 -0
- package/lib/PickerPanel/YearPanel/index.d.ts +3 -0
- package/lib/PickerPanel/YearPanel/index.js +125 -0
- package/lib/PickerPanel/context.d.ts +24 -0
- package/lib/PickerPanel/context.js +78 -0
- package/lib/PickerPanel/index.d.ts +60 -0
- package/lib/PickerPanel/index.js +324 -0
- package/lib/PickerTrigger/index.d.ts +19 -0
- package/lib/PickerTrigger/index.js +95 -0
- package/lib/PickerTrigger/util.d.ts +2 -0
- package/lib/PickerTrigger/util.js +10 -0
- package/lib/generate/dateFns.d.ts +3 -0
- package/lib/generate/dateFns.js +172 -0
- package/lib/generate/dayjs.d.ts +4 -0
- package/lib/generate/dayjs.js +240 -0
- package/lib/generate/index.d.ts +37 -0
- package/lib/generate/index.js +5 -0
- package/lib/generate/luxon.d.ts +4 -0
- package/lib/generate/luxon.js +203 -0
- package/lib/generate/moment.d.ts +4 -0
- package/lib/generate/moment.js +159 -0
- package/lib/hooks/useLocale.d.ts +6 -0
- package/lib/hooks/useLocale.js +90 -0
- package/lib/hooks/useSyncState.d.ts +6 -0
- package/lib/hooks/useSyncState.js +35 -0
- package/lib/hooks/useTimeConfig.d.ts +18 -0
- package/lib/hooks/useTimeConfig.js +173 -0
- package/lib/hooks/useTimeInfo.d.ts +12 -0
- package/lib/hooks/useTimeInfo.js +172 -0
- package/lib/hooks/useToggleDates.d.ts +8 -0
- package/lib/hooks/useToggleDates.js +32 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +57 -0
- package/lib/interface.d.ts +365 -0
- package/lib/interface.js +5 -0
- package/lib/locale/am_ET.d.ts +3 -0
- package/lib/locale/am_ET.js +37 -0
- package/lib/locale/ar_EG.d.ts +3 -0
- package/lib/locale/ar_EG.js +40 -0
- package/lib/locale/az_AZ.d.ts +3 -0
- package/lib/locale/az_AZ.js +41 -0
- package/lib/locale/bg_BG.d.ts +3 -0
- package/lib/locale/bg_BG.js +40 -0
- package/lib/locale/bn_BD.d.ts +3 -0
- package/lib/locale/bn_BD.js +41 -0
- package/lib/locale/by_BY.d.ts +3 -0
- package/lib/locale/by_BY.js +41 -0
- package/lib/locale/ca_ES.d.ts +3 -0
- package/lib/locale/ca_ES.js +40 -0
- package/lib/locale/common.d.ts +2 -0
- package/lib/locale/common.js +12 -0
- package/lib/locale/cs_CZ.d.ts +3 -0
- package/lib/locale/cs_CZ.js +40 -0
- package/lib/locale/da_DK.d.ts +3 -0
- package/lib/locale/da_DK.js +40 -0
- package/lib/locale/de_DE.d.ts +3 -0
- package/lib/locale/de_DE.js +40 -0
- package/lib/locale/el_GR.d.ts +3 -0
- package/lib/locale/el_GR.js +40 -0
- package/lib/locale/en_GB.d.ts +3 -0
- package/lib/locale/en_GB.js +40 -0
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.js +41 -0
- package/lib/locale/es_ES.d.ts +3 -0
- package/lib/locale/es_ES.js +40 -0
- package/lib/locale/es_MX.d.ts +3 -0
- package/lib/locale/es_MX.js +41 -0
- package/lib/locale/et_EE.d.ts +3 -0
- package/lib/locale/et_EE.js +40 -0
- package/lib/locale/eu_ES.d.ts +3 -0
- package/lib/locale/eu_ES.js +42 -0
- package/lib/locale/fa_IR.d.ts +3 -0
- package/lib/locale/fa_IR.js +40 -0
- package/lib/locale/fi_FI.d.ts +3 -0
- package/lib/locale/fi_FI.js +40 -0
- package/lib/locale/fr_BE.d.ts +3 -0
- package/lib/locale/fr_BE.js +40 -0
- package/lib/locale/fr_CA.d.ts +3 -0
- package/lib/locale/fr_CA.js +41 -0
- package/lib/locale/fr_FR.d.ts +3 -0
- package/lib/locale/fr_FR.js +41 -0
- package/lib/locale/ga_IE.d.ts +3 -0
- package/lib/locale/ga_IE.js +41 -0
- package/lib/locale/gl_ES.d.ts +3 -0
- package/lib/locale/gl_ES.js +40 -0
- package/lib/locale/he_IL.d.ts +3 -0
- package/lib/locale/he_IL.js +41 -0
- package/lib/locale/hi_IN.d.ts +3 -0
- package/lib/locale/hi_IN.js +41 -0
- package/lib/locale/hr_HR.d.ts +3 -0
- package/lib/locale/hr_HR.js +41 -0
- package/lib/locale/hu_HU.d.ts +3 -0
- package/lib/locale/hu_HU.js +64 -0
- package/lib/locale/id_ID.d.ts +3 -0
- package/lib/locale/id_ID.js +41 -0
- package/lib/locale/is_IS.d.ts +3 -0
- package/lib/locale/is_IS.js +40 -0
- package/lib/locale/it_IT.d.ts +3 -0
- package/lib/locale/it_IT.js +40 -0
- package/lib/locale/ja_JP.d.ts +3 -0
- package/lib/locale/ja_JP.js +43 -0
- package/lib/locale/ka_GE.d.ts +3 -0
- package/lib/locale/ka_GE.js +41 -0
- package/lib/locale/kk_KZ.d.ts +3 -0
- package/lib/locale/kk_KZ.js +40 -0
- package/lib/locale/km_KH.d.ts +3 -0
- package/lib/locale/km_KH.js +42 -0
- package/lib/locale/kmr_IQ.d.ts +3 -0
- package/lib/locale/kmr_IQ.js +40 -0
- package/lib/locale/kn_IN.d.ts +3 -0
- package/lib/locale/kn_IN.js +41 -0
- package/lib/locale/ko_KR.d.ts +3 -0
- package/lib/locale/ko_KR.js +42 -0
- package/lib/locale/lt_LT.d.ts +3 -0
- package/lib/locale/lt_LT.js +42 -0
- package/lib/locale/lv_LV.d.ts +3 -0
- package/lib/locale/lv_LV.js +40 -0
- package/lib/locale/mk_MK.d.ts +3 -0
- package/lib/locale/mk_MK.js +40 -0
- package/lib/locale/ml_IN.d.ts +3 -0
- package/lib/locale/ml_IN.js +41 -0
- package/lib/locale/mn_MN.d.ts +3 -0
- package/lib/locale/mn_MN.js +42 -0
- package/lib/locale/ms_MY.d.ts +3 -0
- package/lib/locale/ms_MY.js +42 -0
- package/lib/locale/my_MM.d.ts +3 -0
- package/lib/locale/my_MM.js +41 -0
- package/lib/locale/nb_NO.d.ts +3 -0
- package/lib/locale/nb_NO.js +42 -0
- package/lib/locale/ne_NP.d.ts +3 -0
- package/lib/locale/ne_NP.js +41 -0
- package/lib/locale/nl_BE.d.ts +3 -0
- package/lib/locale/nl_BE.js +40 -0
- package/lib/locale/nl_NL.d.ts +3 -0
- package/lib/locale/nl_NL.js +40 -0
- package/lib/locale/pl_PL.d.ts +3 -0
- package/lib/locale/pl_PL.js +40 -0
- package/lib/locale/pt_BR.d.ts +3 -0
- package/lib/locale/pt_BR.js +43 -0
- package/lib/locale/pt_PT.d.ts +3 -0
- package/lib/locale/pt_PT.js +42 -0
- package/lib/locale/ro_RO.d.ts +3 -0
- package/lib/locale/ro_RO.js +41 -0
- package/lib/locale/ru_RU.d.ts +3 -0
- package/lib/locale/ru_RU.js +40 -0
- package/lib/locale/si_LK.d.ts +3 -0
- package/lib/locale/si_LK.js +42 -0
- package/lib/locale/sk_SK.d.ts +3 -0
- package/lib/locale/sk_SK.js +40 -0
- package/lib/locale/sl_SI.d.ts +3 -0
- package/lib/locale/sl_SI.js +40 -0
- package/lib/locale/sr_Cyrl_RS.d.ts +3 -0
- package/lib/locale/sr_Cyrl_RS.js +40 -0
- package/lib/locale/sr_RS.d.ts +3 -0
- package/lib/locale/sr_RS.js +40 -0
- package/lib/locale/sv_SE.d.ts +3 -0
- package/lib/locale/sv_SE.js +40 -0
- package/lib/locale/ta_IN.d.ts +3 -0
- package/lib/locale/ta_IN.js +41 -0
- package/lib/locale/th_TH.d.ts +3 -0
- package/lib/locale/th_TH.js +40 -0
- package/lib/locale/tk_TK.d.ts +3 -0
- package/lib/locale/tk_TK.js +40 -0
- package/lib/locale/tr_TR.d.ts +3 -0
- package/lib/locale/tr_TR.js +42 -0
- package/lib/locale/ug_CN.d.ts +3 -0
- package/lib/locale/ug_CN.js +43 -0
- package/lib/locale/uk_UA.d.ts +3 -0
- package/lib/locale/uk_UA.js +40 -0
- package/lib/locale/ur_PK.d.ts +3 -0
- package/lib/locale/ur_PK.js +41 -0
- package/lib/locale/uz_UZ.d.ts +3 -0
- package/lib/locale/uz_UZ.js +41 -0
- package/lib/locale/vi_VN.d.ts +3 -0
- package/lib/locale/vi_VN.js +41 -0
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.js +42 -0
- package/lib/locale/zh_TW.d.ts +3 -0
- package/lib/locale/zh_TW.js +44 -0
- package/lib/utils/dateUtil.d.ts +29 -0
- package/lib/utils/dateUtil.js +161 -0
- package/lib/utils/getClearIcon.d.ts +5 -0
- package/lib/utils/getClearIcon.js +15 -0
- package/lib/utils/miscUtil.d.ts +14 -0
- package/lib/utils/miscUtil.js +81 -0
- package/lib/utils/uiUtil.d.ts +1 -0
- package/lib/utils/uiUtil.js +13 -0
- package/lib/utils/warnUtil.d.ts +5 -0
- package/lib/utils/warnUtil.js +17 -0
- package/package.json +107 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
import { isSame } from "../utils/dateUtil";
|
|
8
|
+
/**
|
|
9
|
+
* Toggles the presence of a value in an array.
|
|
10
|
+
* If the value exists in the array, removed it.
|
|
11
|
+
* Else add it.
|
|
12
|
+
*/
|
|
13
|
+
export default function useToggleDates(generateConfig, locale, panelMode) {
|
|
14
|
+
function toggleDates(list, target) {
|
|
15
|
+
var index = list.findIndex(function (date) {
|
|
16
|
+
return isSame(generateConfig, locale, date, target, panelMode);
|
|
17
|
+
});
|
|
18
|
+
if (index === -1) {
|
|
19
|
+
return [].concat(_toConsumableArray(list), [target]);
|
|
20
|
+
}
|
|
21
|
+
var sliceList = _toConsumableArray(list);
|
|
22
|
+
sliceList.splice(index, 1);
|
|
23
|
+
return sliceList;
|
|
24
|
+
}
|
|
25
|
+
return toggleDates;
|
|
26
|
+
}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What's new?
|
|
3
|
+
* - Common
|
|
4
|
+
* - [Break] Support special year format, all the year will follow the locale config.
|
|
5
|
+
* - Blur all of field will trigger `onChange` if validate
|
|
6
|
+
* - Support `preserveInvalidOnBlur` to not to clean input if invalid and remove `changeOnBlur`
|
|
7
|
+
* - `pickerValue` is now full controlled
|
|
8
|
+
* - `defaultPickerValue` will take effect on every field active with popup opening.
|
|
9
|
+
* - [Break] clear button return the event with `onClick`
|
|
10
|
+
*
|
|
11
|
+
* - Locale
|
|
12
|
+
* - Remove `dateFormat` since it's never used
|
|
13
|
+
* - Remove `dateTimeFormat` since it's never used
|
|
14
|
+
*
|
|
15
|
+
* - Picker
|
|
16
|
+
* - TimePicker support `changeOnScroll`
|
|
17
|
+
* - TimePicker support `millisecond`
|
|
18
|
+
* - Support cellMeridiemFormat for AM/PM
|
|
19
|
+
* - Get correct `disabledHours` when set `use12Hours`
|
|
20
|
+
* - Support `showWeek`
|
|
21
|
+
*
|
|
22
|
+
* - RangePicker
|
|
23
|
+
* - [Break] RangePicker is now not limit the range of clicked field.
|
|
24
|
+
* - Trigger `onCalendarChange` when type correct
|
|
25
|
+
* - [Break] Not order `value` if given `value` is wrong order.
|
|
26
|
+
* - Hover `presets` will show date in input field.
|
|
27
|
+
* - [Break] RangePicker go to end field, `pickerValue` will follow the start field if not controlled.
|
|
28
|
+
*/
|
|
29
|
+
import type { PickerRef, SharedTimeProps } from './interface';
|
|
30
|
+
import RangePicker, { type RangePickerProps } from './PickerInput/RangePicker';
|
|
31
|
+
import Picker, { type BasePickerProps, type PickerProps } from './PickerInput/SinglePicker';
|
|
32
|
+
import PickerPanel, { type BasePickerPanelProps, type PickerPanelProps } from './PickerPanel';
|
|
33
|
+
export { Picker, RangePicker, PickerPanel };
|
|
34
|
+
export type { RangePickerProps, PickerProps, PickerPanelProps, PickerRef, BasePickerProps, BasePickerPanelProps, SharedTimeProps, };
|
|
35
|
+
export default Picker;
|
package/es/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What's new?
|
|
3
|
+
* - Common
|
|
4
|
+
* - [Break] Support special year format, all the year will follow the locale config.
|
|
5
|
+
* - Blur all of field will trigger `onChange` if validate
|
|
6
|
+
* - Support `preserveInvalidOnBlur` to not to clean input if invalid and remove `changeOnBlur`
|
|
7
|
+
* - `pickerValue` is now full controlled
|
|
8
|
+
* - `defaultPickerValue` will take effect on every field active with popup opening.
|
|
9
|
+
* - [Break] clear button return the event with `onClick`
|
|
10
|
+
*
|
|
11
|
+
* - Locale
|
|
12
|
+
* - Remove `dateFormat` since it's never used
|
|
13
|
+
* - Remove `dateTimeFormat` since it's never used
|
|
14
|
+
*
|
|
15
|
+
* - Picker
|
|
16
|
+
* - TimePicker support `changeOnScroll`
|
|
17
|
+
* - TimePicker support `millisecond`
|
|
18
|
+
* - Support cellMeridiemFormat for AM/PM
|
|
19
|
+
* - Get correct `disabledHours` when set `use12Hours`
|
|
20
|
+
* - Support `showWeek`
|
|
21
|
+
*
|
|
22
|
+
* - RangePicker
|
|
23
|
+
* - [Break] RangePicker is now not limit the range of clicked field.
|
|
24
|
+
* - Trigger `onCalendarChange` when type correct
|
|
25
|
+
* - [Break] Not order `value` if given `value` is wrong order.
|
|
26
|
+
* - Hover `presets` will show date in input field.
|
|
27
|
+
* - [Break] RangePicker go to end field, `pickerValue` will follow the start field if not controlled.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
import RangePicker from "./PickerInput/RangePicker";
|
|
31
|
+
import Picker from "./PickerInput/SinglePicker";
|
|
32
|
+
import PickerPanel from "./PickerPanel";
|
|
33
|
+
export { Picker, RangePicker, PickerPanel };
|
|
34
|
+
export default Picker;
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AlignType, BuildInPlacements } from '@rc-component/trigger';
|
|
3
|
+
import type { GenerateConfig } from './generate';
|
|
4
|
+
export type NullableDateType<DateType> = DateType | null | undefined;
|
|
5
|
+
export type Locale = {
|
|
6
|
+
locale: string;
|
|
7
|
+
/** @deprecated Please use `fieldDateFormat` instead */
|
|
8
|
+
dateFormat?: string;
|
|
9
|
+
/** @deprecated Please use `fieldDateTimeFormat` instead */
|
|
10
|
+
dateTimeFormat?: string;
|
|
11
|
+
/** Input field formatter like YYYY-MM-DD HH:mm:ss */
|
|
12
|
+
fieldDateTimeFormat?: string;
|
|
13
|
+
/** Input field formatter like YYYY-MM-DD */
|
|
14
|
+
fieldDateFormat?: string;
|
|
15
|
+
/** Input field formatter like HH:mm:ss */
|
|
16
|
+
fieldTimeFormat?: string;
|
|
17
|
+
/** Input field formatter like YYYY-MM */
|
|
18
|
+
fieldMonthFormat?: string;
|
|
19
|
+
/** Input field formatter like YYYY */
|
|
20
|
+
fieldYearFormat?: string;
|
|
21
|
+
/** Input field formatter like wwww-go */
|
|
22
|
+
fieldWeekFormat?: string;
|
|
23
|
+
/** Input field formatter like YYYY-Q */
|
|
24
|
+
fieldQuarterFormat?: string;
|
|
25
|
+
/** Display month before year in date panel header */
|
|
26
|
+
monthBeforeYear?: boolean;
|
|
27
|
+
/** year format in header panel */
|
|
28
|
+
yearFormat?: string;
|
|
29
|
+
/** month format in header panel */
|
|
30
|
+
monthFormat?: string;
|
|
31
|
+
/** year format in body panel */
|
|
32
|
+
cellYearFormat?: string;
|
|
33
|
+
/** quarter format in body panel */
|
|
34
|
+
cellQuarterFormat?: string;
|
|
35
|
+
/** @deprecated Please use `cellDateFormat` instead */
|
|
36
|
+
dayFormat?: string;
|
|
37
|
+
/** day format in body panel */
|
|
38
|
+
cellDateFormat?: string;
|
|
39
|
+
/** meridiem format in body panel */
|
|
40
|
+
cellMeridiemFormat?: string;
|
|
41
|
+
today: string;
|
|
42
|
+
now: string;
|
|
43
|
+
backToToday: string;
|
|
44
|
+
ok: string;
|
|
45
|
+
timeSelect: string;
|
|
46
|
+
dateSelect: string;
|
|
47
|
+
weekSelect?: string;
|
|
48
|
+
clear: string;
|
|
49
|
+
week: string;
|
|
50
|
+
month: string;
|
|
51
|
+
year: string;
|
|
52
|
+
previousMonth: string;
|
|
53
|
+
nextMonth: string;
|
|
54
|
+
monthSelect: string;
|
|
55
|
+
yearSelect: string;
|
|
56
|
+
decadeSelect: string;
|
|
57
|
+
previousYear: string;
|
|
58
|
+
nextYear: string;
|
|
59
|
+
previousDecade: string;
|
|
60
|
+
nextDecade: string;
|
|
61
|
+
previousCentury: string;
|
|
62
|
+
nextCentury: string;
|
|
63
|
+
shortWeekDays?: string[];
|
|
64
|
+
shortMonths?: string[];
|
|
65
|
+
};
|
|
66
|
+
export type PanelMode = 'time' | 'date' | 'week' | 'month' | 'quarter' | 'year' | 'decade';
|
|
67
|
+
export type InternalMode = PanelMode | 'datetime';
|
|
68
|
+
export type PickerMode = Exclude<PanelMode, 'datetime' | 'decade'>;
|
|
69
|
+
export type DisabledDate<DateType = any> = (date: DateType, info: {
|
|
70
|
+
type: PanelMode;
|
|
71
|
+
/**
|
|
72
|
+
* Only work in RangePicker.
|
|
73
|
+
* Tell the first date user selected on this range selection.
|
|
74
|
+
* This is not care about what field user click.
|
|
75
|
+
*/
|
|
76
|
+
from?: DateType;
|
|
77
|
+
}) => boolean;
|
|
78
|
+
export interface BaseInfo {
|
|
79
|
+
range?: 'start' | 'end';
|
|
80
|
+
}
|
|
81
|
+
export interface CellRenderInfo<DateType> extends BaseInfo {
|
|
82
|
+
prefixCls: string;
|
|
83
|
+
originNode: React.ReactElement;
|
|
84
|
+
today: DateType;
|
|
85
|
+
type: PanelMode;
|
|
86
|
+
locale?: Locale;
|
|
87
|
+
subType?: 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem';
|
|
88
|
+
}
|
|
89
|
+
export type CellRender<DateType, CurrentType = DateType | number | string> = (current: CurrentType, info: CellRenderInfo<DateType>) => React.ReactNode;
|
|
90
|
+
export interface ValueDate<DateType = any> {
|
|
91
|
+
label: React.ReactNode;
|
|
92
|
+
value: DateType | (() => DateType);
|
|
93
|
+
}
|
|
94
|
+
export interface DisabledTimes {
|
|
95
|
+
disabledHours?: () => number[];
|
|
96
|
+
disabledMinutes?: (hour: number) => number[];
|
|
97
|
+
disabledSeconds?: (hour: number, minute: number) => number[];
|
|
98
|
+
disabledMilliseconds?: (hour: number, minute: number, second: number) => number[];
|
|
99
|
+
}
|
|
100
|
+
export interface SharedTimeProps<DateType extends object = any> {
|
|
101
|
+
/** Only work in picker is `time` */
|
|
102
|
+
format?: string;
|
|
103
|
+
/** Only work in picker is `time` */
|
|
104
|
+
showNow?: boolean;
|
|
105
|
+
/** Only work in picker is `time` */
|
|
106
|
+
showHour?: boolean;
|
|
107
|
+
/** Only work in picker is `time` */
|
|
108
|
+
showMinute?: boolean;
|
|
109
|
+
/** Only work in picker is `time` */
|
|
110
|
+
showSecond?: boolean;
|
|
111
|
+
/** Only work in picker is `time` */
|
|
112
|
+
showMillisecond?: boolean;
|
|
113
|
+
/** Only work in picker is `time` */
|
|
114
|
+
use12Hours?: boolean;
|
|
115
|
+
/** Only work in picker is `time` */
|
|
116
|
+
hourStep?: IntRange<1, 23>;
|
|
117
|
+
/** Only work in picker is `time` */
|
|
118
|
+
minuteStep?: IntRange<1, 59>;
|
|
119
|
+
/** Only work in picker is `time` */
|
|
120
|
+
secondStep?: IntRange<1, 59>;
|
|
121
|
+
/**
|
|
122
|
+
* Only work in picker is `time`.
|
|
123
|
+
* Note that too small step will cause performance issue.
|
|
124
|
+
*/
|
|
125
|
+
millisecondStep?: IntRange<1, 999>;
|
|
126
|
+
/** Only work in picker is `time` */
|
|
127
|
+
hideDisabledOptions?: boolean;
|
|
128
|
+
/** @deprecated Use `defaultOpenValue` instead */
|
|
129
|
+
defaultValue?: DateType;
|
|
130
|
+
/** Set default value template when empty selection */
|
|
131
|
+
defaultOpenValue?: DateType;
|
|
132
|
+
/** @deprecated Please use `disabledTime` instead. */
|
|
133
|
+
disabledHours?: DisabledTimes['disabledHours'];
|
|
134
|
+
/** @deprecated Please use `disabledTime` instead. */
|
|
135
|
+
disabledMinutes?: DisabledTimes['disabledMinutes'];
|
|
136
|
+
/** @deprecated Please use `disabledTime` instead. */
|
|
137
|
+
disabledSeconds?: DisabledTimes['disabledSeconds'];
|
|
138
|
+
/** Only work in picker is `time` */
|
|
139
|
+
disabledTime?: (date: DateType) => DisabledTimes;
|
|
140
|
+
/** Only work in picker is `time` */
|
|
141
|
+
changeOnScroll?: boolean;
|
|
142
|
+
}
|
|
143
|
+
export type RangeTimeProps<DateType extends object = any> = Omit<SharedTimeProps<DateType>, 'defaultValue' | 'defaultOpenValue' | 'disabledTime'> & {
|
|
144
|
+
/** @deprecated Use `defaultOpenValue` instead. */
|
|
145
|
+
defaultValue?: DateType[];
|
|
146
|
+
defaultOpenValue?: DateType[];
|
|
147
|
+
disabledTime?: (date: DateType, range: 'start' | 'end', info: {
|
|
148
|
+
from?: DateType;
|
|
149
|
+
}) => DisabledTimes;
|
|
150
|
+
};
|
|
151
|
+
export type OnPanelChange<DateType> = (value: DateType, mode: PanelMode) => void;
|
|
152
|
+
export type LimitDate<DateType extends object = any> = DateType | ((info: {
|
|
153
|
+
/**
|
|
154
|
+
* Tell the first date user selected on this range selection.
|
|
155
|
+
* This is not care about what field user click.
|
|
156
|
+
*/
|
|
157
|
+
from?: DateType;
|
|
158
|
+
}) => DateType | null | undefined);
|
|
159
|
+
export interface SharedPanelProps<DateType extends object = any> {
|
|
160
|
+
prefixCls: string;
|
|
161
|
+
locale: Locale;
|
|
162
|
+
generateConfig: GenerateConfig<DateType>;
|
|
163
|
+
pickerValue: DateType;
|
|
164
|
+
onPickerValueChange: (date: DateType) => void;
|
|
165
|
+
value?: DateType;
|
|
166
|
+
/**
|
|
167
|
+
* Should trigger when user select the cell.
|
|
168
|
+
* PickerPanel will mark as `value` in single mode,
|
|
169
|
+
* Or toggle `values` in multiple mode.
|
|
170
|
+
*/
|
|
171
|
+
onSelect: (date: DateType) => void;
|
|
172
|
+
/**
|
|
173
|
+
* Used for `multiple` mode.
|
|
174
|
+
* When not `multiple`, it will be `[value]`.
|
|
175
|
+
*/
|
|
176
|
+
values?: DateType[];
|
|
177
|
+
onModeChange: (mode: PanelMode, date?: DateType) => void;
|
|
178
|
+
disabledDate?: DisabledDate<DateType>;
|
|
179
|
+
minDate?: DateType;
|
|
180
|
+
maxDate?: DateType;
|
|
181
|
+
cellRender?: CellRender<DateType>;
|
|
182
|
+
/** @private Only used for RangePicker passing. */
|
|
183
|
+
hoverRangeValue: [start: DateType, end: DateType] | null;
|
|
184
|
+
/** @private Only used for SinglePicker passing. */
|
|
185
|
+
hoverValue: DateType[] | null;
|
|
186
|
+
onHover?: (value: DateType | null) => void;
|
|
187
|
+
/**
|
|
188
|
+
* Only used for `date` mode.
|
|
189
|
+
*/
|
|
190
|
+
showTime?: SharedTimeProps<DateType>;
|
|
191
|
+
/**
|
|
192
|
+
* Only used for `date` mode.
|
|
193
|
+
*/
|
|
194
|
+
showWeek?: boolean;
|
|
195
|
+
prevIcon?: React.ReactNode;
|
|
196
|
+
nextIcon?: React.ReactNode;
|
|
197
|
+
superPrevIcon?: React.ReactNode;
|
|
198
|
+
superNextIcon?: React.ReactNode;
|
|
199
|
+
}
|
|
200
|
+
export type Components<DateType extends object = any> = Partial<Record<InternalMode, React.ComponentType<SharedPanelProps<DateType>>> & {
|
|
201
|
+
button?: React.ComponentType<any> | string;
|
|
202
|
+
input?: React.ComponentType<any> | string;
|
|
203
|
+
}>;
|
|
204
|
+
export type SemanticStructure = 'popup';
|
|
205
|
+
export type CustomFormat<DateType> = (value: DateType) => string;
|
|
206
|
+
export type FormatType<DateType = any> = string | CustomFormat<DateType>;
|
|
207
|
+
export type SharedHTMLAttrs = Omit<React.InputHTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'onChange' | 'placeholder' | 'id' | 'onInvalid' | 'disabled' | 'onFocus' | 'onBlur' | 'onSelect' | 'min' | 'max' | 'onKeyDown' | 'size' | 'prefix'>;
|
|
208
|
+
export type PickerFocusEventHandler = (e: React.FocusEvent<HTMLElement>, info: BaseInfo) => void;
|
|
209
|
+
export type LegacyOnKeyDown = (event: React.KeyboardEvent<HTMLElement>, preventDefault: VoidFunction) => void;
|
|
210
|
+
export interface SharedPickerProps<DateType extends object = any> extends SharedHTMLAttrs, Pick<SharedPanelProps<DateType>, 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon'> {
|
|
211
|
+
direction?: 'ltr' | 'rtl';
|
|
212
|
+
prefixCls?: string;
|
|
213
|
+
className?: string;
|
|
214
|
+
style?: React.CSSProperties;
|
|
215
|
+
styles?: Partial<Record<SemanticStructure, React.CSSProperties>>;
|
|
216
|
+
classNames?: Partial<Record<SemanticStructure, string>>;
|
|
217
|
+
locale: Locale;
|
|
218
|
+
generateConfig: GenerateConfig<DateType>;
|
|
219
|
+
picker?: PickerMode;
|
|
220
|
+
/** Only work when picker is `date` or `time` */
|
|
221
|
+
showTime?: boolean | SharedTimeProps<DateType>;
|
|
222
|
+
/** Only work when picker is `date` */
|
|
223
|
+
showWeek?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Config the input field parse and format.
|
|
226
|
+
* When set `format.type`, it will force user input type with your input,
|
|
227
|
+
* it's only support basic format mask: YYYY, MM, DD, HH, mm, ss, SSS.
|
|
228
|
+
* Once use config mode, it must be fill with format your config.
|
|
229
|
+
*/
|
|
230
|
+
format?: FormatType<DateType> | FormatType<DateType>[] | {
|
|
231
|
+
format: string;
|
|
232
|
+
type?: 'mask';
|
|
233
|
+
};
|
|
234
|
+
prefix?: React.ReactNode;
|
|
235
|
+
suffixIcon?: React.ReactNode;
|
|
236
|
+
allowClear?: boolean | {
|
|
237
|
+
clearIcon?: React.ReactNode;
|
|
238
|
+
};
|
|
239
|
+
/** @deprecated Please use `allowClear.clearIcon` instead */
|
|
240
|
+
clearIcon?: React.ReactNode;
|
|
241
|
+
onFocus?: PickerFocusEventHandler;
|
|
242
|
+
onBlur?: PickerFocusEventHandler;
|
|
243
|
+
/** `preventDefault` is deprecated which will remove from future version. */
|
|
244
|
+
onKeyDown?: LegacyOnKeyDown;
|
|
245
|
+
inputReadOnly?: boolean;
|
|
246
|
+
/** Default will always order of selection after submit */
|
|
247
|
+
order?: boolean;
|
|
248
|
+
disabledDate?: DisabledDate<DateType>;
|
|
249
|
+
/** Limit the selectable range. This will limit picker navigation also */
|
|
250
|
+
minDate?: DateType;
|
|
251
|
+
/** Limit the selectable range. This will limit picker navigation also */
|
|
252
|
+
maxDate?: DateType;
|
|
253
|
+
defaultOpenValue?: DateType;
|
|
254
|
+
defaultOpen?: boolean;
|
|
255
|
+
open?: boolean;
|
|
256
|
+
onOpenChange?: (open: boolean) => void;
|
|
257
|
+
popupAlign?: AlignType;
|
|
258
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
259
|
+
placement?: string;
|
|
260
|
+
builtinPlacements?: BuildInPlacements;
|
|
261
|
+
/**
|
|
262
|
+
* By default. Only `time` or `datetime` show the confirm button in panel.
|
|
263
|
+
* `true` to make every picker need confirm.
|
|
264
|
+
* `false` to trigger change on every time panel closed by the mode = picker.
|
|
265
|
+
*/
|
|
266
|
+
needConfirm?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* @deprecated. This is removed and not work anymore.
|
|
269
|
+
* Value will always be update if user type correct date type.
|
|
270
|
+
* You can use `needConfirm` for confirm requirement.
|
|
271
|
+
*/
|
|
272
|
+
changeOnBlur?: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* When user input invalidate date, keep it in the input field.
|
|
275
|
+
* This is only used for strong a11y requirement which do not want modify after blur.
|
|
276
|
+
*/
|
|
277
|
+
preserveInvalidOnBlur?: boolean;
|
|
278
|
+
transitionName?: string;
|
|
279
|
+
components?: Components<DateType>;
|
|
280
|
+
/** @deprecated Please use `components.input` instead. */
|
|
281
|
+
inputRender?: (props: React.InputHTMLAttributes<HTMLInputElement>) => React.ReactNode;
|
|
282
|
+
cellRender?: CellRender<DateType>;
|
|
283
|
+
/** @deprecated use cellRender instead of dateRender */
|
|
284
|
+
dateRender?: (currentDate: DateType, today: DateType) => React.ReactNode;
|
|
285
|
+
/** @deprecated use cellRender instead of monthCellRender */
|
|
286
|
+
monthCellRender?: (currentDate: DateType, locale: Locale) => React.ReactNode;
|
|
287
|
+
/**
|
|
288
|
+
* When use `date` picker,
|
|
289
|
+
* Show the button to set current datetime.
|
|
290
|
+
*/
|
|
291
|
+
showNow?: boolean;
|
|
292
|
+
/** @deprecated Please use `showNow` instead */
|
|
293
|
+
showToday?: boolean;
|
|
294
|
+
panelRender?: (originPanel: React.ReactNode) => React.ReactNode;
|
|
295
|
+
renderExtraFooter?: (mode: PanelMode) => React.ReactNode;
|
|
296
|
+
}
|
|
297
|
+
export interface PickerRef {
|
|
298
|
+
nativeElement: HTMLDivElement;
|
|
299
|
+
focus: (options?: FocusOptions) => void;
|
|
300
|
+
blur: VoidFunction;
|
|
301
|
+
}
|
|
302
|
+
export interface RangePickerRef extends Omit<PickerRef, 'focus'> {
|
|
303
|
+
focus: (index?: number | (FocusOptions & {
|
|
304
|
+
index?: number;
|
|
305
|
+
})) => void;
|
|
306
|
+
}
|
|
307
|
+
export interface OpenConfig {
|
|
308
|
+
index?: number;
|
|
309
|
+
/**
|
|
310
|
+
* Keep open if prev state is open but set close within the same frame.
|
|
311
|
+
* This is used for RangePicker input switch to another one.
|
|
312
|
+
*/
|
|
313
|
+
inherit?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* By default. Close popup will delay for one frame. `force` will trigger immediately.
|
|
316
|
+
*/
|
|
317
|
+
force?: boolean;
|
|
318
|
+
}
|
|
319
|
+
export type OnOpenChange = (open: boolean, config?: OpenConfig) => void;
|
|
320
|
+
export interface SelectorProps<DateType = any> extends SharedHTMLAttrs {
|
|
321
|
+
picker: PickerMode;
|
|
322
|
+
prefix?: React.ReactNode;
|
|
323
|
+
clearIcon?: React.ReactNode;
|
|
324
|
+
suffixIcon?: React.ReactNode;
|
|
325
|
+
className?: string;
|
|
326
|
+
style?: React.CSSProperties;
|
|
327
|
+
/** Add `-placeholder` className as a help info */
|
|
328
|
+
activeHelp?: boolean;
|
|
329
|
+
focused: boolean;
|
|
330
|
+
onFocus: (event: React.FocusEvent<HTMLInputElement>, index?: number) => void;
|
|
331
|
+
onBlur: (event: React.FocusEvent<HTMLInputElement>, index?: number) => void;
|
|
332
|
+
/** Trigger by `enter` key */
|
|
333
|
+
onSubmit: VoidFunction;
|
|
334
|
+
/** `preventDefault` is deprecated which will remove from future version. */
|
|
335
|
+
onKeyDown?: LegacyOnKeyDown;
|
|
336
|
+
locale: Locale;
|
|
337
|
+
generateConfig: GenerateConfig<DateType>;
|
|
338
|
+
direction?: 'ltr' | 'rtl';
|
|
339
|
+
onClick: React.MouseEventHandler<HTMLDivElement>;
|
|
340
|
+
onClear: VoidFunction;
|
|
341
|
+
format: FormatType<DateType>[];
|
|
342
|
+
/**
|
|
343
|
+
* Convert with user typing for the format template.
|
|
344
|
+
* This will force align the input with template mask.
|
|
345
|
+
*/
|
|
346
|
+
maskFormat?: string;
|
|
347
|
+
onInputChange: VoidFunction;
|
|
348
|
+
onInvalid: (valid: boolean, index?: number) => void;
|
|
349
|
+
/** When user input invalidate date, keep it in the input field */
|
|
350
|
+
/**
|
|
351
|
+
* By default value in input field will be reset with previous valid value when blur.
|
|
352
|
+
* Set to `false` will keep invalid text in input field when blur.
|
|
353
|
+
*/
|
|
354
|
+
preserveInvalidOnBlur?: boolean;
|
|
355
|
+
open: boolean;
|
|
356
|
+
/** Trigger when need open by selector */
|
|
357
|
+
onOpenChange: OnOpenChange;
|
|
358
|
+
inputReadOnly?: boolean;
|
|
359
|
+
}
|
|
360
|
+
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
361
|
+
export type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
|
|
362
|
+
export type ReplaceListType<List, Type> = {
|
|
363
|
+
[P in keyof List]: Type;
|
|
364
|
+
};
|
|
365
|
+
export {};
|
package/es/interface.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var locale = {
|
|
2
|
+
locale: 'am_ET',
|
|
3
|
+
today: 'ዛሬ',
|
|
4
|
+
now: 'አሁን',
|
|
5
|
+
backToToday: 'ወደ ዛሬ ተመለስ',
|
|
6
|
+
ok: 'እሺ',
|
|
7
|
+
clear: 'አንፃ',
|
|
8
|
+
week: 'ሳምንት',
|
|
9
|
+
month: 'ወር',
|
|
10
|
+
year: 'ዓመት',
|
|
11
|
+
timeSelect: 'ሰዓት ምረጥ',
|
|
12
|
+
dateSelect: 'ቀን ምረጥ',
|
|
13
|
+
weekSelect: 'ሳምንት ምረጥ',
|
|
14
|
+
monthSelect: 'ወር ምረጥ',
|
|
15
|
+
yearSelect: 'አመት ምረጥ',
|
|
16
|
+
decadeSelect: 'አስርት አመታት ምረጥ',
|
|
17
|
+
yearFormat: 'YYYY',
|
|
18
|
+
dateFormat: 'D/M/YYYY',
|
|
19
|
+
dayFormat: 'D',
|
|
20
|
+
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
|
|
21
|
+
monthBeforeYear: true,
|
|
22
|
+
previousMonth: 'ያለፈው ወር (PageUp)',
|
|
23
|
+
nextMonth: 'ቀጣይ ወር (PageDown)',
|
|
24
|
+
previousYear: 'ያለፈው ዓመት (Control + left)',
|
|
25
|
+
nextYear: 'ቀጣይ ዓመት (Control + right)',
|
|
26
|
+
previousDecade: 'ያለፈው አስርት ዓመት',
|
|
27
|
+
nextDecade: 'ቀጣይ አስርት ዓመት',
|
|
28
|
+
previousCentury: 'ያለፈው ክፍለ ዘመን',
|
|
29
|
+
nextCentury: 'ቀጣይ ክፍለ ዘመን'
|
|
30
|
+
};
|
|
31
|
+
export default locale;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { commonLocale } from "./common";
|
|
8
|
+
var locale = _objectSpread(_objectSpread({}, commonLocale), {}, {
|
|
9
|
+
locale: 'ar_EG',
|
|
10
|
+
today: 'اليوم',
|
|
11
|
+
now: 'الأن',
|
|
12
|
+
backToToday: 'العودة إلى اليوم',
|
|
13
|
+
ok: 'تأكيد',
|
|
14
|
+
clear: 'مسح',
|
|
15
|
+
week: 'الأسبوع',
|
|
16
|
+
month: 'الشهر',
|
|
17
|
+
year: 'السنة',
|
|
18
|
+
timeSelect: 'اختيار الوقت',
|
|
19
|
+
dateSelect: 'اختيار التاريخ',
|
|
20
|
+
monthSelect: 'اختيار الشهر',
|
|
21
|
+
yearSelect: 'اختيار السنة',
|
|
22
|
+
decadeSelect: 'اختيار العقد',
|
|
23
|
+
dateFormat: 'M/D/YYYY',
|
|
24
|
+
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
|
|
25
|
+
previousMonth: 'الشهر السابق (PageUp)',
|
|
26
|
+
nextMonth: 'الشهر التالى(PageDown)',
|
|
27
|
+
previousYear: 'العام السابق (Control + left)',
|
|
28
|
+
nextYear: 'العام التالى (Control + right)',
|
|
29
|
+
previousDecade: 'العقد السابق',
|
|
30
|
+
nextDecade: 'العقد التالى',
|
|
31
|
+
previousCentury: 'القرن السابق',
|
|
32
|
+
nextCentury: 'القرن التالى'
|
|
33
|
+
});
|
|
34
|
+
export default locale;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { commonLocale } from "./common";
|
|
8
|
+
var locale = _objectSpread(_objectSpread({}, commonLocale), {}, {
|
|
9
|
+
locale: 'az_AZ',
|
|
10
|
+
today: 'Bugün',
|
|
11
|
+
now: 'İndi',
|
|
12
|
+
backToToday: 'Bugünə qayıt',
|
|
13
|
+
ok: 'Təsdiq',
|
|
14
|
+
clear: 'Təmizlə',
|
|
15
|
+
week: 'Həftə',
|
|
16
|
+
month: 'Ay',
|
|
17
|
+
year: 'İl',
|
|
18
|
+
timeSelect: 'vaxtı seç',
|
|
19
|
+
dateSelect: 'tarixi seç',
|
|
20
|
+
weekSelect: 'Həftə seç',
|
|
21
|
+
monthSelect: 'Ay seç',
|
|
22
|
+
yearSelect: 'il seç',
|
|
23
|
+
decadeSelect: 'Onillik seçin',
|
|
24
|
+
dateFormat: 'D.M.YYYY',
|
|
25
|
+
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
|
|
26
|
+
previousMonth: 'Əvvəlki ay (PageUp)',
|
|
27
|
+
nextMonth: 'Növbəti ay (PageDown)',
|
|
28
|
+
previousYear: 'Sonuncu il (Control + left)',
|
|
29
|
+
nextYear: 'Növbəti il (Control + right)',
|
|
30
|
+
previousDecade: 'Sonuncu onillik',
|
|
31
|
+
nextDecade: 'Növbəti onillik',
|
|
32
|
+
previousCentury: 'Sonuncu əsr',
|
|
33
|
+
nextCentury: 'Növbəti əsr'
|
|
34
|
+
});
|
|
35
|
+
export default locale;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { commonLocale } from "./common";
|
|
8
|
+
var locale = _objectSpread(_objectSpread({}, commonLocale), {}, {
|
|
9
|
+
locale: 'bg_BG',
|
|
10
|
+
today: 'Днес',
|
|
11
|
+
now: 'Сега',
|
|
12
|
+
backToToday: 'Към днес',
|
|
13
|
+
ok: 'Добре',
|
|
14
|
+
clear: 'Изчистване',
|
|
15
|
+
week: 'Седмица',
|
|
16
|
+
month: 'Месец',
|
|
17
|
+
year: 'Година',
|
|
18
|
+
timeSelect: 'Избор на час',
|
|
19
|
+
dateSelect: 'Избор на дата',
|
|
20
|
+
monthSelect: 'Избор на месец',
|
|
21
|
+
yearSelect: 'Избор на година',
|
|
22
|
+
decadeSelect: 'Десетилетие',
|
|
23
|
+
dateFormat: 'D M YYYY',
|
|
24
|
+
dateTimeFormat: 'D M YYYY HH:mm:ss',
|
|
25
|
+
previousMonth: 'Предишен месец (PageUp)',
|
|
26
|
+
nextMonth: 'Следващ месец (PageDown)',
|
|
27
|
+
previousYear: 'Последна година (Control + left)',
|
|
28
|
+
nextYear: 'Следваща година (Control + right)',
|
|
29
|
+
previousDecade: 'Предишно десетилетие',
|
|
30
|
+
nextDecade: 'Следващо десетилетие',
|
|
31
|
+
previousCentury: 'Последен век',
|
|
32
|
+
nextCentury: 'Следващ век'
|
|
33
|
+
});
|
|
34
|
+
export default locale;
|