@elliemae/ds-form-date-time-picker 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ControlledDateTimePicker.js +9 -5
- package/dist/cjs/ControlledDateTimePicker.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerCTX.js +4 -1
- package/dist/cjs/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerDatatestid.js +4 -1
- package/dist/cjs/ControlledDateTimePickerDatatestid.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerTypes.js +4 -1
- package/dist/cjs/ControlledDateTimePickerTypes.js.map +1 -1
- package/dist/cjs/config/useChangeHandlers.js +261 -219
- package/dist/cjs/config/useChangeHandlers.js.map +1 -1
- package/dist/cjs/config/useControlledDateTimePicker.js +34 -28
- package/dist/cjs/config/useControlledDateTimePicker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker.js +130 -124
- package/dist/cjs/config/useFocusTracker.js.map +1 -1
- package/dist/cjs/config/useGetDestructuredValues.js +50 -38
- package/dist/cjs/config/useGetDestructuredValues.js.map +1 -1
- package/dist/cjs/config/useGetFlags.js +16 -5
- package/dist/cjs/config/useGetFlags.js.map +2 -2
- package/dist/cjs/config/useGetPropsBasedOnType.js +60 -54
- package/dist/cjs/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/cjs/config/useGetPropsWithDefault.js +4 -1
- package/dist/cjs/config/useGetPropsWithDefault.js.map +1 -1
- package/dist/cjs/config/useGetReferences.js +35 -29
- package/dist/cjs/config/useGetReferences.js.map +1 -1
- package/dist/cjs/config/useGlobalKeyHandlers.js +63 -51
- package/dist/cjs/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/cjs/config/useRelevantValueFromProps.js +15 -9
- package/dist/cjs/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js +33 -14
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/exported-related/theming.js +4 -1
- package/dist/cjs/exported-related/theming.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parts/ClearButton/ClearButton.js +12 -7
- package/dist/cjs/parts/ClearButton/ClearButton.js.map +1 -1
- package/dist/cjs/parts/ClearButton/useClearButton.js +45 -33
- package/dist/cjs/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/cjs/parts/ControlledDateTimePickerContent.js +31 -16
- package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +1 -1
- package/dist/cjs/parts/DateInputs/DDInput.js +42 -33
- package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
- package/dist/cjs/parts/DateInputs/DateInputs.js +63 -42
- package/dist/cjs/parts/DateInputs/DateInputs.js.map +2 -2
- package/dist/cjs/parts/DateInputs/MMInput.js +56 -35
- package/dist/cjs/parts/DateInputs/MMInput.js.map +3 -3
- package/dist/cjs/parts/DateInputs/YYYYInput.js +42 -33
- package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
- package/dist/cjs/parts/DateInputs/useDateInputs.js +296 -254
- package/dist/cjs/parts/DateInputs/useDateInputs.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js +24 -9
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js +14 -4
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +18 -7
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js +4 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js +35 -27
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +10 -5
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +112 -83
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +21 -13
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js +7 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js +55 -34
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +11 -6
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Day.js +73 -58
- package/dist/cjs/parts/Pickers/Calendar/Day.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js +4 -1
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js +29 -23
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +38 -26
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js +34 -18
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js +190 -166
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js +33 -21
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +22 -8
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +14 -5
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js +7 -2
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +10 -5
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +27 -19
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +11 -6
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js +4 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +67 -52
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/PickersIcons.js +13 -4
- package/dist/cjs/parts/Pickers/PickersIcons.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +90 -72
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +102 -76
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +87 -69
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +4 -1
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js +24 -9
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +35 -6
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js +4 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js +10 -5
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +21 -13
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +11 -6
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +12 -6
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +99 -61
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js +163 -145
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +42 -30
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Styleds.js +4 -1
- package/dist/cjs/parts/Styleds.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/HHInput.js +44 -35
- package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js +42 -33
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/MinutesInput.js +42 -33
- package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/TimeInputs.js +60 -40
- package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js +234 -201
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/cjs/parts/config.js +4 -1
- package/dist/cjs/parts/config.js.map +1 -1
- package/dist/cjs/propTypes.js +19 -6
- package/dist/cjs/propTypes.js.map +2 -2
- package/dist/cjs/sharedTypes.js +4 -1
- package/dist/cjs/sharedTypes.js.map +2 -2
- package/dist/cjs/utils/constants.js +4 -1
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/cjs/utils/dateHelpers.js +15 -10
- package/dist/cjs/utils/dateHelpers.js.map +1 -1
- package/dist/cjs/utils/dateTimeHelpers.js +4 -1
- package/dist/cjs/utils/dateTimeHelpers.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js +4 -1
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js +4 -1
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js +9 -2
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/cjs/utils/hooks/useOnClickOutside.js +4 -1
- package/dist/cjs/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/cjs/utils/numberHelpers.js +4 -1
- package/dist/cjs/utils/numberHelpers.js.map +1 -1
- package/dist/cjs/utils/stringHelpers.js +4 -1
- package/dist/cjs/utils/stringHelpers.js.map +1 -1
- package/dist/cjs/utils/timeHelpers.js +4 -1
- package/dist/cjs/utils/timeHelpers.js.map +1 -1
- package/dist/cjs/utils/typeGuards.js +4 -1
- package/dist/cjs/utils/typeGuards.js.map +1 -1
- package/dist/esm/ControlledDateTimePicker.js +5 -4
- package/dist/esm/ControlledDateTimePicker.js.map +1 -1
- package/dist/esm/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/esm/ControlledDateTimePickerDatatestid.js.map +1 -1
- package/dist/esm/ControlledDateTimePickerTypes.js.map +1 -1
- package/dist/esm/config/useChangeHandlers.js +257 -218
- package/dist/esm/config/useChangeHandlers.js.map +1 -1
- package/dist/esm/config/useControlledDateTimePicker.js +30 -27
- package/dist/esm/config/useControlledDateTimePicker.js.map +2 -2
- package/dist/esm/config/useFocusTracker.js +126 -123
- package/dist/esm/config/useFocusTracker.js.map +1 -1
- package/dist/esm/config/useGetDestructuredValues.js +46 -37
- package/dist/esm/config/useGetDestructuredValues.js.map +1 -1
- package/dist/esm/config/useGetFlags.js +12 -4
- package/dist/esm/config/useGetFlags.js.map +2 -2
- package/dist/esm/config/useGetPropsBasedOnType.js +56 -53
- package/dist/esm/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/esm/config/useGetPropsWithDefault.js.map +1 -1
- package/dist/esm/config/useGetReferences.js +31 -28
- package/dist/esm/config/useGetReferences.js.map +1 -1
- package/dist/esm/config/useGlobalKeyHandlers.js +59 -50
- package/dist/esm/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/esm/config/useRelevantValueFromProps.js +11 -8
- package/dist/esm/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/esm/config/useValidateProps.js +29 -13
- package/dist/esm/config/useValidateProps.js.map +1 -1
- package/dist/esm/exported-related/theming.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parts/ClearButton/ClearButton.js +8 -6
- package/dist/esm/parts/ClearButton/ClearButton.js.map +1 -1
- package/dist/esm/parts/ClearButton/useClearButton.js +41 -32
- package/dist/esm/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/esm/parts/ControlledDateTimePickerContent.js +27 -15
- package/dist/esm/parts/ControlledDateTimePickerContent.js.map +1 -1
- package/dist/esm/parts/DateInputs/DDInput.js +38 -32
- package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
- package/dist/esm/parts/DateInputs/DateInputs.js +59 -41
- package/dist/esm/parts/DateInputs/DateInputs.js.map +2 -2
- package/dist/esm/parts/DateInputs/MMInput.js +53 -35
- package/dist/esm/parts/DateInputs/MMInput.js.map +3 -3
- package/dist/esm/parts/DateInputs/YYYYInput.js +38 -32
- package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
- package/dist/esm/parts/DateInputs/useDateInputs.js +292 -253
- package/dist/esm/parts/DateInputs/useDateInputs.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/Calendar.js +20 -8
- package/dist/esm/parts/Pickers/Calendar/Calendar.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarBody.js +10 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarBody.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarContent.js +14 -6
- package/dist/esm/parts/Pickers/Calendar/CalendarContent.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarDaysList.js +31 -26
- package/dist/esm/parts/Pickers/Calendar/CalendarDaysList.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js +6 -4
- package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarHead.js +108 -82
- package/dist/esm/parts/Pickers/Calendar/CalendarHead.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js +17 -12
- package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarMonthDays.js +3 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarMonthDays.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js +51 -33
- package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js +7 -5
- package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/Day.js +69 -57
- package/dist/esm/parts/Pickers/Calendar/Day.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useConfigCalendarCTX.js +25 -22
- package/dist/esm/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +34 -25
- package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useFocusLogic.js +30 -17
- package/dist/esm/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js +186 -165
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js +29 -20
- package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +18 -7
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +10 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js +3 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +6 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +23 -18
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +7 -5
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +63 -51
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/PickersIcons.js +9 -3
- package/dist/esm/parts/Pickers/PickersIcons.js.map +2 -2
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js +86 -71
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js +98 -75
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js +83 -68
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheel.js +20 -8
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js +31 -5
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContext.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js +6 -4
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +17 -12
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js +7 -5
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +8 -5
- package/dist/esm/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +95 -60
- package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useKeyboardHandlers.js +159 -144
- package/dist/esm/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +38 -29
- package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/esm/parts/Styleds.js.map +1 -1
- package/dist/esm/parts/TimeInputs/HHInput.js +40 -34
- package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/MeridiemInput.js +38 -32
- package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/MinutesInput.js +38 -32
- package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/TimeInputs.js +56 -39
- package/dist/esm/parts/TimeInputs/TimeInputs.js.map +1 -1
- package/dist/esm/parts/TimeInputs/useTimeInputs.js +230 -200
- package/dist/esm/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/esm/parts/config.js.map +1 -1
- package/dist/esm/propTypes.js +15 -5
- package/dist/esm/propTypes.js.map +2 -2
- package/dist/esm/sharedTypes.js.map +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/dateHelpers.js +11 -9
- package/dist/esm/utils/dateHelpers.js.map +1 -1
- package/dist/esm/utils/dateTimeHelpers.js.map +1 -1
- package/dist/esm/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/esm/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/esm/utils/hooks/useGetStartingFocusedDay.js +5 -1
- package/dist/esm/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/esm/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/esm/utils/numberHelpers.js.map +1 -1
- package/dist/esm/utils/stringHelpers.js.map +1 -1
- package/dist/esm/utils/timeHelpers.js.map +1 -1
- package/dist/esm/utils/typeGuards.js.map +1 -1
- package/package.json +8 -8
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useControlledDateTimePicker.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { useGetDatePickerWithDefaultsProps } from './useGetPropsWithDefault';\nimport { useFocusTracker } from './useFocusTracker';\nimport { useGetFlags } from './useGetFlags';\nimport { useGetReferences } from './useGetReferences';\nimport { useRelevantValueFromProps } from './useRelevantValueFromProps';\nimport { useGetPropsBasedOnType } from './useGetPropsBasedOnType';\nimport { useGetDestructuredValues } from './useGetDestructuredValues';\nimport { useChangeHandlers } from './useChangeHandlers';\nimport { useGlobalKeyHandlers } from './useGlobalKeyHandlers';\nimport { useValidateProps } from './useValidateProps';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nexport type ControlledDateTimePickerContextT = ReturnType<typeof useGetFlags> &\n ReturnType<typeof useFocusTracker> &\n ReturnType<typeof useGetReferences> &\n ReturnType<typeof useGetPropsBasedOnType> &\n ReturnType<typeof useRelevantValueFromProps> &\n ReturnType<typeof useGetDestructuredValues> &\n ReturnType<typeof useChangeHandlers> &\n ReturnType<typeof useGlobalKeyHandlers> & {\n props: DSControlledDateTimePickerT.InternalProps;\n ariaCurrentValueForInputs: string;\n globalAttrs: Record<string, unknown>;\n xstyledAttrs: Record<string, unknown>;\n };\n\nexport const useControlledDateTimePicker = (\n props: DSControlledDateTimePickerT.Props,\n): ControlledDateTimePickerContextT => {\n // if we detect wrong props configuration we throw meaningful errors\n useValidateProps(props);\n\n const propsWithDefaults = useGetDatePickerWithDefaultsProps(props);\n\n const flags = useGetFlags(propsWithDefaults);\n const DOMRefs = useGetReferences(flags); // refs are used for \"auto-advance\" feature\n const focusTrackers = useFocusTracker({ DOMRefs, flags, propsWithDefaults });\n const relevantValues = useRelevantValueFromProps(propsWithDefaults);\n const propsBasedOnType = useGetPropsBasedOnType(propsWithDefaults);\n const destructuredValues = useGetDestructuredValues({ ...propsBasedOnType, ...flags });\n const changeHandlers = useChangeHandlers({\n relevantValues,\n destructuredValues,\n propsBasedOnType,\n DOMRefs,\n focusTrackers,\n });\n\n const globalKeyHandlers = useGlobalKeyHandlers({ changeHandlers, propsBasedOnType, DOMRefs, flags, focusTrackers });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call\n // const dataAttrs = getDataProps<DSControlledDateTimePickerT.InternalProps>(propsWithDefaults);\n\n const xstyledAttrs = useGetXstyledProps(propsWithDefaults) as Record<string, unknown>;\n\n const globalAttrs = useGetGlobalAttributes(propsWithDefaults) as Record<string, unknown>;\n\n const { announcedDateValues, announcedTimeValues } = destructuredValues;\n const { isWithDateInputs, isDateTimeSelector, isWithTimeInputs } = flags;\n\n const ariaCurrentValueForInputs = `current values: ${isWithDateInputs ? `${announcedDateValues}` : ''}${\n isDateTimeSelector ? ', ' : ''\n }${isWithTimeInputs ? `${announcedTimeValues}` : ''}`;\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n ariaCurrentValueForInputs,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n xstyledAttrs,\n globalAttrs,\n ...focusTrackers,\n ...flags,\n ...DOMRefs,\n ...relevantValues,\n ...propsBasedOnType,\n ...destructuredValues,\n ...changeHandlers,\n ...globalKeyHandlers,\n }),\n [\n propsWithDefaults,\n ariaCurrentValueForInputs,\n focusTrackers,\n flags,\n DOMRefs,\n relevantValues,\n propsBasedOnType,\n destructuredValues,\n changeHandlers,\n globalKeyHandlers,\n xstyledAttrs,\n globalAttrs,\n ],\n );\n\n return ctx;\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,0BAA0B;AAC3D,SAAS,yCAAyC;AAClD,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,iCAAiC;AAC1C,SAAS,8BAA8B;AACvC,SAAS,gCAAgC;AACzC,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AAiB1B,MAAM,8BAA8B,CACzC,UACqC;AAErC,mBAAiB,KAAK;AAEtB,QAAM,oBAAoB,kCAAkC,KAAK;AAEjE,QAAM,QAAQ,YAAY,iBAAiB;AAC3C,QAAM,UAAU,iBAAiB,KAAK;AACtC,QAAM,gBAAgB,gBAAgB,EAAE,SAAS,OAAO,kBAAkB,CAAC;AAC3E,QAAM,iBAAiB,0BAA0B,iBAAiB;AAClE,QAAM,mBAAmB,uBAAuB,iBAAiB;AACjE,QAAM,qBAAqB,yBAAyB,EAAE,GAAG,kBAAkB,GAAG,MAAM,CAAC;AACrF,QAAM,iBAAiB,kBAAkB;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,oBAAoB,qBAAqB,EAAE,gBAAgB,kBAAkB,SAAS,OAAO,cAAc,CAAC;AAKlH,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,QAAM,cAAc,uBAAuB,iBAAiB;AAE5D,QAAM,EAAE,qBAAqB,oBAAoB,IAAI;AACrD,QAAM,EAAE,kBAAkB,oBAAoB,iBAAiB,IAAI;AAEnE,QAAM,4BAA4B,mBAAmB,mBAAmB,GAAG,wBAAwB,KACjG,qBAAqB,OAAO,KAC3B,mBAAmB,GAAG,wBAAwB;AAEjD,QAAM,MAAMA,OAAM;AAAA,IAChB,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MAEA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -48,129 +48,132 @@ const useFocusTracker = ({ DOMRefs, flags }) => {
|
|
|
48
48
|
if (lastSegment !== currFocusDescriber)
|
|
49
49
|
setCurrFocusDescriber(lastSegment);
|
|
50
50
|
}, [currFocusDescriber, lastSegment, latestInteractionRegion]);
|
|
51
|
-
return useMemo(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
51
|
+
return useMemo(
|
|
52
|
+
() => ({
|
|
53
|
+
latestInteractionRegion,
|
|
54
|
+
setLatestInteractionRegion,
|
|
55
|
+
currFocusDescriber,
|
|
56
|
+
setCurrFocusDescriber,
|
|
57
|
+
trackFocusResetter: () => {
|
|
58
|
+
if (latestInteractionRegion !== "")
|
|
59
|
+
setLatestInteractionRegion("");
|
|
60
|
+
if (currFocusDescriber !== "")
|
|
61
|
+
setCurrFocusDescriber("");
|
|
62
|
+
},
|
|
63
|
+
trackFocusMonthInput: () => {
|
|
64
|
+
if (latestInteractionRegion !== "date-inputs")
|
|
65
|
+
setLatestInteractionRegion("date-inputs");
|
|
66
|
+
if (currFocusDescriber !== "month-input")
|
|
67
|
+
setCurrFocusDescriber("month-input");
|
|
68
|
+
},
|
|
69
|
+
trackFocusDayInput: () => {
|
|
70
|
+
if (latestInteractionRegion !== "date-inputs")
|
|
71
|
+
setLatestInteractionRegion("date-inputs");
|
|
72
|
+
if (currFocusDescriber !== "day-input")
|
|
73
|
+
setCurrFocusDescriber("day-input");
|
|
74
|
+
},
|
|
75
|
+
trackFocusYearInput: () => {
|
|
76
|
+
if (latestInteractionRegion !== "date-inputs")
|
|
77
|
+
setLatestInteractionRegion("date-inputs");
|
|
78
|
+
if (currFocusDescriber !== "year-input")
|
|
79
|
+
setCurrFocusDescriber("year-input");
|
|
80
|
+
},
|
|
81
|
+
trackFocusHourInput: () => {
|
|
82
|
+
if (latestInteractionRegion !== "time-inputs")
|
|
83
|
+
setLatestInteractionRegion("time-inputs");
|
|
84
|
+
if (currFocusDescriber !== "hour-input")
|
|
85
|
+
setCurrFocusDescriber("hour-input");
|
|
86
|
+
},
|
|
87
|
+
trackFocusMinuteInput: () => {
|
|
88
|
+
if (latestInteractionRegion !== "time-inputs")
|
|
89
|
+
setLatestInteractionRegion("time-inputs");
|
|
90
|
+
if (currFocusDescriber !== "minute-input")
|
|
91
|
+
setCurrFocusDescriber("minute-input");
|
|
92
|
+
},
|
|
93
|
+
trackFocusMeridiemInput: () => {
|
|
94
|
+
if (latestInteractionRegion !== "time-inputs")
|
|
95
|
+
setLatestInteractionRegion("time-inputs");
|
|
96
|
+
if (currFocusDescriber !== "meridiem-input")
|
|
97
|
+
setCurrFocusDescriber("meridiem-input");
|
|
98
|
+
},
|
|
99
|
+
trackFocusClearBtn: () => {
|
|
100
|
+
if (latestInteractionRegion !== "clear-btn")
|
|
101
|
+
setLatestInteractionRegion("clear-btn");
|
|
102
|
+
if (currFocusDescriber !== "clear-btn")
|
|
103
|
+
setCurrFocusDescriber("clear-btn");
|
|
104
|
+
},
|
|
105
|
+
trackFocusDatePickerIcon: () => {
|
|
106
|
+
if (latestInteractionRegion !== "picker-icon")
|
|
107
|
+
setLatestInteractionRegion("picker-icon");
|
|
108
|
+
if (currFocusDescriber !== "date-picker-icon")
|
|
109
|
+
setCurrFocusDescriber("date-picker-icon");
|
|
110
|
+
},
|
|
111
|
+
trackFocusTimePickerIcon: () => {
|
|
112
|
+
if (latestInteractionRegion !== "picker-icon")
|
|
113
|
+
setLatestInteractionRegion("picker-icon");
|
|
114
|
+
if (currFocusDescriber !== "time-picker-icon")
|
|
115
|
+
setCurrFocusDescriber("time-picker-icon");
|
|
116
|
+
},
|
|
117
|
+
trackFocusDatetimePickerIcon: () => {
|
|
118
|
+
if (latestInteractionRegion !== "picker-icon")
|
|
119
|
+
setLatestInteractionRegion("picker-icon");
|
|
120
|
+
if (currFocusDescriber !== "datetime-picker-icon")
|
|
121
|
+
setCurrFocusDescriber("datetime-picker-icon");
|
|
122
|
+
},
|
|
123
|
+
trackFocusCalendarPrevMonth: () => {
|
|
124
|
+
if (latestInteractionRegion !== "calendar-head")
|
|
125
|
+
setLatestInteractionRegion("calendar-head");
|
|
126
|
+
if (currFocusDescriber !== "calendar-prev-month")
|
|
127
|
+
setCurrFocusDescriber("calendar-prev-month");
|
|
128
|
+
},
|
|
129
|
+
trackFocusCalendarNextMonth: () => {
|
|
130
|
+
if (latestInteractionRegion !== "calendar-head")
|
|
131
|
+
setLatestInteractionRegion("calendar-head");
|
|
132
|
+
if (currFocusDescriber !== "calendar-next-month")
|
|
133
|
+
setCurrFocusDescriber("calendar-next-month");
|
|
134
|
+
},
|
|
135
|
+
trackFocusCalendarPrevYear: () => {
|
|
136
|
+
if (latestInteractionRegion !== "calendar-head")
|
|
137
|
+
setLatestInteractionRegion("calendar-head");
|
|
138
|
+
if (currFocusDescriber !== "calendar-prev-year")
|
|
139
|
+
setCurrFocusDescriber("calendar-prev-year");
|
|
140
|
+
},
|
|
141
|
+
trackFocusCalendarNextYear: () => {
|
|
142
|
+
if (latestInteractionRegion !== "calendar-head")
|
|
143
|
+
setLatestInteractionRegion("calendar-head");
|
|
144
|
+
if (currFocusDescriber !== "calendar-next-year")
|
|
145
|
+
setCurrFocusDescriber("calendar-next-year");
|
|
146
|
+
},
|
|
147
|
+
trackFocusCalendarMetafocusedDay: () => {
|
|
148
|
+
if (latestInteractionRegion !== "calendar-days")
|
|
149
|
+
setLatestInteractionRegion("calendar-days");
|
|
150
|
+
if (currFocusDescriber !== "calendar-metafocused-day")
|
|
151
|
+
setCurrFocusDescriber("calendar-metafocused-day");
|
|
152
|
+
},
|
|
153
|
+
trackFocusTimewheelCurrHour: () => {
|
|
154
|
+
if (latestInteractionRegion !== "timewheel")
|
|
155
|
+
setLatestInteractionRegion("timewheel");
|
|
156
|
+
if (currFocusDescriber !== "timewheel-curr-hour")
|
|
157
|
+
setCurrFocusDescriber("timewheel-curr-hour");
|
|
158
|
+
},
|
|
159
|
+
trackFocusTimewheelCurrMinute: () => {
|
|
160
|
+
if (latestInteractionRegion !== "timewheel")
|
|
161
|
+
setLatestInteractionRegion("timewheel");
|
|
162
|
+
if (currFocusDescriber !== "timewheel-curr-minute")
|
|
163
|
+
setCurrFocusDescriber("timewheel-curr-minute");
|
|
164
|
+
},
|
|
165
|
+
trackFocusTimewheelCurrMeridiem: () => {
|
|
166
|
+
if (latestInteractionRegion !== "timewheel")
|
|
167
|
+
setLatestInteractionRegion("timewheel");
|
|
168
|
+
if (currFocusDescriber !== "timewheel-curr-meridiem")
|
|
169
|
+
setCurrFocusDescriber("timewheel-curr-meridiem");
|
|
170
|
+
},
|
|
171
|
+
trackFocusPicker,
|
|
172
|
+
trackFocusFirstSegment,
|
|
173
|
+
trackFocusLastSegment
|
|
174
|
+
}),
|
|
175
|
+
[currFocusDescriber, latestInteractionRegion, trackFocusPicker, trackFocusFirstSegment, trackFocusLastSegment]
|
|
176
|
+
);
|
|
174
177
|
};
|
|
175
178
|
export {
|
|
176
179
|
useFocusTracker
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useFocusTracker.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable indent */\n/* eslint-disable max-params */\n/* eslint-disable max-statements */\nimport { useCallback, useMemo, useState } from 'react';\nimport { useGetReferences } from './useGetReferences';\nimport { useGetFlags } from './useGetFlags';\n\ntype LatestInteractionRegion =\n | 'calendar-days'\n | 'calendar-head'\n | 'timewheel'\n | 'date-inputs'\n | 'time-inputs'\n | 'clear-btn'\n | 'picker-icon'\n | '';\ntype CurrFocusDescriber =\n | 'first-segment'\n | 'month-input'\n | 'day-input'\n | 'year-input'\n | 'hour-input'\n | 'minute-input'\n | 'meridiem-input'\n | 'last-segment'\n | 'clear-btn'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | 'calendar-prev-month'\n | 'calendar-next-month'\n | 'calendar-prev-year'\n | 'calendar-next-year'\n | 'calendar-metafocused-day'\n | 'timewheel-curr-hour'\n | 'timewheel-curr-minute'\n | 'timewheel-curr-meridiem'\n | '';\n\ninterface Config {\n DOMRefs: ReturnType<typeof useGetReferences>;\n flags: ReturnType<typeof useGetFlags>;\n}\nexport const useFocusTracker = ({ DOMRefs, flags }: Config) => {\n const [latestInteractionRegion, setLatestInteractionRegion] = useState<LatestInteractionRegion>('');\n const [currFocusDescriber, setCurrFocusDescriber] = useState<CurrFocusDescriber>('');\n const { firstSegment, lastSegment } = DOMRefs;\n const { isDateSelector, isTimeSelector } = flags;\n\n const trackFocusPicker = useCallback(() => {\n let picker = 'datetime-picker-icon' as CurrFocusDescriber;\n if (isDateSelector) picker = 'date-picker-icon';\n if (isTimeSelector) picker = 'time-picker-icon';\n if (latestInteractionRegion !== 'picker-icon') setLatestInteractionRegion('picker-icon');\n if (picker !== currFocusDescriber) setCurrFocusDescriber(picker);\n }, [currFocusDescriber, isDateSelector, isTimeSelector, latestInteractionRegion]);\n\n const trackFocusFirstSegment = useCallback(() => {\n let region = 'date-inputs' as LatestInteractionRegion;\n if (firstSegment === 'hour-input') region = 'time-inputs';\n if (firstSegment === 'date-picker-icon') region = 'picker-icon';\n if (firstSegment === 'time-picker-icon') region = 'picker-icon';\n if (firstSegment === 'datetime-picker-icon') region = 'picker-icon';\n if (region !== latestInteractionRegion) setLatestInteractionRegion(region);\n if (firstSegment !== currFocusDescriber) setCurrFocusDescriber(firstSegment);\n }, [currFocusDescriber, firstSegment, latestInteractionRegion]);\n\n const trackFocusLastSegment = useCallback(() => {\n let region = 'date-inputs' as LatestInteractionRegion;\n if (lastSegment === 'meridiem-input') region = 'time-inputs';\n if (lastSegment === 'clear-btn') region = 'clear-btn';\n if (lastSegment === 'date-picker-icon') region = 'picker-icon';\n if (lastSegment === 'time-picker-icon') region = 'picker-icon';\n if (lastSegment === 'datetime-picker-icon') region = 'picker-icon';\n if (region !== latestInteractionRegion) setLatestInteractionRegion(region);\n if (lastSegment !== currFocusDescriber) setCurrFocusDescriber(lastSegment);\n }, [currFocusDescriber, lastSegment, latestInteractionRegion]);\n\n return useMemo(\n () => ({\n latestInteractionRegion,\n setLatestInteractionRegion,\n currFocusDescriber,\n setCurrFocusDescriber,\n trackFocusResetter: () => {\n if (latestInteractionRegion !== '') setLatestInteractionRegion('');\n if (currFocusDescriber !== '') setCurrFocusDescriber('');\n },\n trackFocusMonthInput: () => {\n if (latestInteractionRegion !== 'date-inputs') setLatestInteractionRegion('date-inputs');\n if (currFocusDescriber !== 'month-input') setCurrFocusDescriber('month-input');\n },\n trackFocusDayInput: () => {\n if (latestInteractionRegion !== 'date-inputs') setLatestInteractionRegion('date-inputs');\n if (currFocusDescriber !== 'day-input') setCurrFocusDescriber('day-input');\n },\n trackFocusYearInput: () => {\n if (latestInteractionRegion !== 'date-inputs') setLatestInteractionRegion('date-inputs');\n if (currFocusDescriber !== 'year-input') setCurrFocusDescriber('year-input');\n },\n trackFocusHourInput: () => {\n if (latestInteractionRegion !== 'time-inputs') setLatestInteractionRegion('time-inputs');\n if (currFocusDescriber !== 'hour-input') setCurrFocusDescriber('hour-input');\n },\n trackFocusMinuteInput: () => {\n if (latestInteractionRegion !== 'time-inputs') setLatestInteractionRegion('time-inputs');\n if (currFocusDescriber !== 'minute-input') setCurrFocusDescriber('minute-input');\n },\n trackFocusMeridiemInput: () => {\n if (latestInteractionRegion !== 'time-inputs') setLatestInteractionRegion('time-inputs');\n if (currFocusDescriber !== 'meridiem-input') setCurrFocusDescriber('meridiem-input');\n },\n trackFocusClearBtn: () => {\n if (latestInteractionRegion !== 'clear-btn') setLatestInteractionRegion('clear-btn');\n if (currFocusDescriber !== 'clear-btn') setCurrFocusDescriber('clear-btn');\n },\n trackFocusDatePickerIcon: () => {\n if (latestInteractionRegion !== 'picker-icon') setLatestInteractionRegion('picker-icon');\n if (currFocusDescriber !== 'date-picker-icon') setCurrFocusDescriber('date-picker-icon');\n },\n trackFocusTimePickerIcon: () => {\n if (latestInteractionRegion !== 'picker-icon') setLatestInteractionRegion('picker-icon');\n if (currFocusDescriber !== 'time-picker-icon') setCurrFocusDescriber('time-picker-icon');\n },\n trackFocusDatetimePickerIcon: () => {\n if (latestInteractionRegion !== 'picker-icon') setLatestInteractionRegion('picker-icon');\n if (currFocusDescriber !== 'datetime-picker-icon') setCurrFocusDescriber('datetime-picker-icon');\n },\n trackFocusCalendarPrevMonth: () => {\n if (latestInteractionRegion !== 'calendar-head') setLatestInteractionRegion('calendar-head');\n if (currFocusDescriber !== 'calendar-prev-month') setCurrFocusDescriber('calendar-prev-month');\n },\n trackFocusCalendarNextMonth: () => {\n if (latestInteractionRegion !== 'calendar-head') setLatestInteractionRegion('calendar-head');\n if (currFocusDescriber !== 'calendar-next-month') setCurrFocusDescriber('calendar-next-month');\n },\n trackFocusCalendarPrevYear: () => {\n if (latestInteractionRegion !== 'calendar-head') setLatestInteractionRegion('calendar-head');\n if (currFocusDescriber !== 'calendar-prev-year') setCurrFocusDescriber('calendar-prev-year');\n },\n trackFocusCalendarNextYear: () => {\n if (latestInteractionRegion !== 'calendar-head') setLatestInteractionRegion('calendar-head');\n if (currFocusDescriber !== 'calendar-next-year') setCurrFocusDescriber('calendar-next-year');\n },\n trackFocusCalendarMetafocusedDay: () => {\n if (latestInteractionRegion !== 'calendar-days') setLatestInteractionRegion('calendar-days');\n if (currFocusDescriber !== 'calendar-metafocused-day') setCurrFocusDescriber('calendar-metafocused-day');\n },\n trackFocusTimewheelCurrHour: () => {\n if (latestInteractionRegion !== 'timewheel') setLatestInteractionRegion('timewheel');\n if (currFocusDescriber !== 'timewheel-curr-hour') setCurrFocusDescriber('timewheel-curr-hour');\n },\n trackFocusTimewheelCurrMinute: () => {\n if (latestInteractionRegion !== 'timewheel') setLatestInteractionRegion('timewheel');\n if (currFocusDescriber !== 'timewheel-curr-minute') setCurrFocusDescriber('timewheel-curr-minute');\n },\n trackFocusTimewheelCurrMeridiem: () => {\n if (latestInteractionRegion !== 'timewheel') setLatestInteractionRegion('timewheel');\n if (currFocusDescriber !== 'timewheel-curr-meridiem') setCurrFocusDescriber('timewheel-curr-meridiem');\n },\n trackFocusPicker,\n trackFocusFirstSegment,\n trackFocusLastSegment,\n }),\n [currFocusDescriber, latestInteractionRegion, trackFocusPicker, trackFocusFirstSegment, trackFocusLastSegment],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,aAAa,SAAS,gBAAgB;AAwCxC,MAAM,kBAAkB,CAAC,EAAE,SAAS,MAAM,MAAc;AAC7D,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAkC,EAAE;AAClG,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAA6B,EAAE;AACnF,QAAM,EAAE,cAAc,YAAY,IAAI;AACtC,QAAM,EAAE,gBAAgB,eAAe,IAAI;AAE3C,QAAM,mBAAmB,YAAY,MAAM;AACzC,QAAI,SAAS;AACb,QAAI;AAAgB,eAAS;AAC7B,QAAI;AAAgB,eAAS;AAC7B,QAAI,4BAA4B;AAAe,iCAA2B,aAAa;AACvF,QAAI,WAAW;AAAoB,4BAAsB,MAAM;AAAA,EACjE,GAAG,CAAC,oBAAoB,gBAAgB,gBAAgB,uBAAuB,CAAC;AAEhF,QAAM,yBAAyB,YAAY,MAAM;AAC/C,QAAI,SAAS;AACb,QAAI,iBAAiB;AAAc,eAAS;AAC5C,QAAI,iBAAiB;AAAoB,eAAS;AAClD,QAAI,iBAAiB;AAAoB,eAAS;AAClD,QAAI,iBAAiB;AAAwB,eAAS;AACtD,QAAI,WAAW;AAAyB,iCAA2B,MAAM;AACzE,QAAI,iBAAiB;AAAoB,4BAAsB,YAAY;AAAA,EAC7E,GAAG,CAAC,oBAAoB,cAAc,uBAAuB,CAAC;AAE9D,QAAM,wBAAwB,YAAY,MAAM;AAC9C,Q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qB;AAAA,MAC/F;AAAA,MACA,+BAA+B,MAAM;AACnC,YAAI,4BAA4B;AAAa,qCAA2B,WAAW;AACnF,YAAI,uBAAuB;AAAyB,gCAAsB,uBAAuB;AAAA,MACnG;AAAA,MACA,iCAAiC,MAAM;AACrC,YAAI,4BAA4B;AAAa,qCAA2B,WAAW;AACnF,YAAI,uBAAuB;AAA2B,gCAAsB,yBAAyB;AAAA,MACvG;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,yBAAyB,kBAAkB,wBAAwB,qBAAqB;AAAA,EAC/G;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -24,18 +24,21 @@ const useGetDestructuredDateValues = ({
|
|
|
24
24
|
const announcedDay = dayNum !== -1 ? announcableCardinalDays[dayNum] : "empty day";
|
|
25
25
|
const announcedYear = yearNum !== -1 ? fillStringWithPlaceHolders(`${yearNum}`, 4, "0") : "empty year";
|
|
26
26
|
const announcedDateValues = `${announcedMonth}, ${announcedDay}, ${announcedYear}`;
|
|
27
|
-
return useMemo(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
return useMemo(
|
|
28
|
+
() => ({
|
|
29
|
+
month,
|
|
30
|
+
day,
|
|
31
|
+
year,
|
|
32
|
+
monthNum,
|
|
33
|
+
dayNum,
|
|
34
|
+
yearNum,
|
|
35
|
+
announcedMonth,
|
|
36
|
+
announcedDay,
|
|
37
|
+
announcedYear,
|
|
38
|
+
announcedDateValues
|
|
39
|
+
}),
|
|
40
|
+
[announcedDay, announcedMonth, announcedYear, announcedDateValues, day, dayNum, month, monthNum, year, yearNum]
|
|
41
|
+
);
|
|
39
42
|
};
|
|
40
43
|
const useGetDestructuredTimeValues = ({
|
|
41
44
|
appTime,
|
|
@@ -51,35 +54,41 @@ const useGetDestructuredTimeValues = ({
|
|
|
51
54
|
const announcedMinutes = minutesNum !== -1 ? `${minutesNum}` : "empty minutes";
|
|
52
55
|
const announcedMeridiem = meridiem === "PM" ? `post meridiem` : meridiem === "AM" ? "ante meridiem" : "empty meriediem";
|
|
53
56
|
const announcedTimeValues = `${announcedHours}, ${announcedMinutes}, ${announcedMeridiem}`;
|
|
54
|
-
return useMemo(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
return useMemo(
|
|
58
|
+
() => ({
|
|
59
|
+
hours,
|
|
60
|
+
minutes,
|
|
61
|
+
meridiem,
|
|
62
|
+
hoursNum,
|
|
63
|
+
minutesNum,
|
|
64
|
+
announcedHours,
|
|
65
|
+
announcedMinutes,
|
|
66
|
+
announcedMeridiem,
|
|
67
|
+
announcedTimeValues
|
|
68
|
+
}),
|
|
69
|
+
[
|
|
70
|
+
hours,
|
|
71
|
+
minutes,
|
|
72
|
+
meridiem,
|
|
73
|
+
hoursNum,
|
|
74
|
+
minutesNum,
|
|
75
|
+
announcedHours,
|
|
76
|
+
announcedMinutes,
|
|
77
|
+
announcedMeridiem,
|
|
78
|
+
announcedTimeValues
|
|
79
|
+
]
|
|
80
|
+
);
|
|
75
81
|
};
|
|
76
82
|
const useGetDestructuredValues = (config) => {
|
|
77
83
|
const dateValues = useGetDestructuredDateValues(config);
|
|
78
84
|
const timeValues = useGetDestructuredTimeValues(config);
|
|
79
|
-
return useMemo(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
return useMemo(
|
|
86
|
+
() => ({
|
|
87
|
+
...dateValues,
|
|
88
|
+
...timeValues
|
|
89
|
+
}),
|
|
90
|
+
[dateValues, timeValues]
|
|
91
|
+
);
|
|
83
92
|
};
|
|
84
93
|
export {
|
|
85
94
|
useGetDestructuredDateValues,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetDestructuredValues.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { useMemo } from 'react';\nimport {\n dateTimeToTime,\n deconstructTimeValues,\n dateTimeToDate,\n deconstructValuesFromDateString,\n fillStringWithPlaceHolders,\n} from '../utils/stringHelpers';\nimport { useGetFlags } from './useGetFlags';\nimport { useGetPropsBasedOnType } from './useGetPropsBasedOnType';\nimport { convertToPositiveNumberIfPossible } from '../utils/numberHelpers';\nimport { monthNames, announcableCardinalDays } from '../utils/constants';\nimport type { DSControlledDateTimePickerInternalsT } from '../sharedTypes';\n\ntype UseGetDestructuredDateValues = (\n config: ReturnType<typeof useGetPropsBasedOnType> & ReturnType<typeof useGetFlags>,\n) => {\n month: string;\n day: string;\n year: string;\n monthNum: number;\n dayNum: number;\n yearNum: number;\n announcedMonth: string;\n announcedDay: string;\n announcedYear: string;\n announcedDateValues: string;\n};\n// this is because it's fully controlled\n// our source of truth is either the date props or dateTime props\n// based on wheter it's a dateTime picker\n// or a date picker (it's date picker when hideTime is true)\nexport const useGetDestructuredDateValues: UseGetDestructuredDateValues = ({\n appDate,\n appDateTime,\n isDateTimeSelector,\n}) => {\n const dateStringFromProps = isDateTimeSelector ? dateTimeToDate(appDateTime) : appDate;\n const deconstructedValues = deconstructValuesFromDateString(dateStringFromProps);\n const { month, day, year } = deconstructedValues;\n const monthNum = convertToPositiveNumberIfPossible(month);\n const dayNum = convertToPositiveNumberIfPossible(day) as DSControlledDateTimePickerInternalsT.DateDay | -1;\n const yearNum = convertToPositiveNumberIfPossible(year);\n const announcedMonth = monthNum !== -1 ? monthNames[monthNum - 1] : 'empty month';\n const announcedDay = dayNum !== -1 ? announcableCardinalDays[dayNum] : 'empty day';\n const announcedYear = yearNum !== -1 ? fillStringWithPlaceHolders(`${yearNum}`, 4, '0') : 'empty year';\n const announcedDateValues = `${announcedMonth}, ${announcedDay}, ${announcedYear}`;\n\n return useMemo(\n () => ({\n month,\n day,\n year,\n monthNum,\n dayNum,\n yearNum,\n announcedMonth,\n announcedDay,\n announcedYear,\n announcedDateValues,\n }),\n [announcedDay, announcedMonth, announcedYear, announcedDateValues, day, dayNum, month, monthNum, year, yearNum],\n );\n};\n\ntype UseGetDestructuredTimeValues = (\n config: ReturnType<typeof useGetPropsBasedOnType> & ReturnType<typeof useGetFlags>,\n) => {\n hours: string;\n minutes: string;\n meridiem: string;\n hoursNum: number;\n minutesNum: number;\n announcedHours: string;\n announcedMinutes: string;\n announcedMeridiem: string;\n announcedTimeValues: string;\n};\n// this is because it's fully controlled\n// our source of truth is either the time props or dateTime props\n// based on wheter it's a dateTime picker\n// or a time picker (it's time picker when hideDate is true)\nexport const useGetDestructuredTimeValues: UseGetDestructuredTimeValues = ({\n appTime,\n appDateTime,\n isDateTimeSelector,\n}) => {\n const timeStringFromProps = isDateTimeSelector ? dateTimeToTime(appDateTime) : appTime;\n const deconstructedValues = deconstructTimeValues(timeStringFromProps);\n const { hours, minutes, meridiem } = deconstructedValues;\n const hoursNum = convertToPositiveNumberIfPossible(hours);\n const minutesNum = convertToPositiveNumberIfPossible(minutes);\n\n // 01 -> 1 ~ 09 -> 9 || 1_ -> 1 ~ 9_ -> 9 || empty...\n const announcedHours = hoursNum !== -1 ? `${hoursNum}` : 'empty hours';\n // 01 -> 1 ~ 09 -> 9 || 1_ -> 1 ~ 9_ -> 9 || empty...\n const announcedMinutes = minutesNum !== -1 ? `${minutesNum}` : 'empty minutes';\n const announcedMeridiem =\n // eslint-disable-next-line no-nested-ternary\n meridiem === 'PM' ? `post meridiem` : meridiem === 'AM' ? 'ante meridiem' : 'empty meriediem';\n const announcedTimeValues = `${announcedHours}, ${announcedMinutes}, ${announcedMeridiem}`;\n\n return useMemo(\n () => ({\n hours,\n minutes,\n meridiem,\n hoursNum,\n minutesNum,\n announcedHours,\n announcedMinutes,\n announcedMeridiem,\n announcedTimeValues,\n }),\n [\n hours,\n minutes,\n meridiem,\n hoursNum,\n minutesNum,\n announcedHours,\n announcedMinutes,\n announcedMeridiem,\n announcedTimeValues,\n ],\n );\n};\n\ntype UseGetDestructuredValues = (\n config: ReturnType<typeof useGetPropsBasedOnType> & ReturnType<typeof useGetFlags>,\n) => ReturnType<typeof useGetDestructuredDateValues> & ReturnType<typeof useGetDestructuredTimeValues>;\n\nexport const useGetDestructuredValues: UseGetDestructuredValues = (config) => {\n const dateValues = useGetDestructuredDateValues(config);\n const timeValues = useGetDestructuredTimeValues(config);\n\n return useMemo(\n () => ({\n ...dateValues,\n ...timeValues,\n }),\n [dateValues, timeValues],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,yCAAyC;AAClD,SAAS,YAAY,+BAA+B;AAqB7C,MAAM,+BAA6D,CAAC;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsB,qBAAqB,eAAe,WAAW,IAAI;AAC/E,QAAM,sBAAsB,gCAAgC,mBAAmB;AAC/E,QAAM,EAAE,OAAO,KAAK,KAAK,IAAI;AAC7B,QAAM,WAAW,kCAAkC,KAAK;AACxD,QAAM,SAAS,kCAAkC,GAAG;AACpD,QAAM,UAAU,kCAAkC,IAAI;AACtD,QAAM,iBAAiB,aAAa,KAAK,WAAW,WAAW,KAAK;AACpE,QAAM,eAAe,WAAW,KAAK,wBAAwB,UAAU;AACvE,QAAM,gBAAgB,YAAY,KAAK,2BAA2B,GAAG,WAAW,GAAG,GAAG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,UAAU;AAAA,EACzB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from "../ControlledDateTimePickerTypes";
|
|
4
4
|
import { getIsDateTime, getIsDate } from "../utils/typeGuards";
|
|
5
5
|
const getDateTimeFlags = (props) => {
|
|
6
|
-
const { type, isClearable, dateTime, autoFocus } = props;
|
|
6
|
+
const { type, isClearable, dateTime, autoFocus, innerRef } = props;
|
|
7
7
|
const constants = {
|
|
8
8
|
hideDatePicker: true,
|
|
9
9
|
hideTimePicker: true,
|
|
@@ -35,6 +35,8 @@ const getDateTimeFlags = (props) => {
|
|
|
35
35
|
isWithTimeInputs: withAnyInputs,
|
|
36
36
|
autoFocusMonthInput: withAnyInputs && autoFocus,
|
|
37
37
|
autoFocusPrevMonthArrow: isControllerOnly && autoFocus,
|
|
38
|
+
innerRefMonthInput: withAnyInputs && innerRef,
|
|
39
|
+
innerRefPrevMonthArrow: isControllerOnly && innerRef,
|
|
38
40
|
shouldPreserveClearableSpace,
|
|
39
41
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
40
42
|
...constants
|
|
@@ -42,7 +44,7 @@ const getDateTimeFlags = (props) => {
|
|
|
42
44
|
return finalFlags;
|
|
43
45
|
};
|
|
44
46
|
const getDateFlags = (props) => {
|
|
45
|
-
const { type, isClearable, date, autoFocus } = props;
|
|
47
|
+
const { type, isClearable, date, autoFocus, innerRef } = props;
|
|
46
48
|
const constants = {
|
|
47
49
|
isDateSelector: true,
|
|
48
50
|
hideTime: true,
|
|
@@ -74,6 +76,8 @@ const getDateFlags = (props) => {
|
|
|
74
76
|
isWithDateInputsOnly: withAnyInputs,
|
|
75
77
|
autoFocusMonthInput: withAnyInputs && autoFocus,
|
|
76
78
|
autoFocusPrevMonthArrow: isControllerOnly && autoFocus,
|
|
79
|
+
innerRefMonthInput: withAnyInputs && innerRef,
|
|
80
|
+
innerRefPrevMonthArrow: isControllerOnly && innerRef,
|
|
77
81
|
shouldPreserveClearableSpace,
|
|
78
82
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
79
83
|
...constants
|
|
@@ -81,7 +85,7 @@ const getDateFlags = (props) => {
|
|
|
81
85
|
return finalFlags;
|
|
82
86
|
};
|
|
83
87
|
const getTimeFlags = (props) => {
|
|
84
|
-
const { type, isClearable, time, autoFocus } = props;
|
|
88
|
+
const { type, isClearable, time, autoFocus, innerRef } = props;
|
|
85
89
|
const constants = {
|
|
86
90
|
hideDate: true,
|
|
87
91
|
hideDateTimePicker: true,
|
|
@@ -94,7 +98,9 @@ const getTimeFlags = (props) => {
|
|
|
94
98
|
isWithTimeWheelToo: false,
|
|
95
99
|
isWithCalendarToo: false,
|
|
96
100
|
autoFocusMonthInput: false,
|
|
97
|
-
autoFocusPrevMonthArrow: false
|
|
101
|
+
autoFocusPrevMonthArrow: false,
|
|
102
|
+
innerRefMonthInput: void 0,
|
|
103
|
+
innerRefPrevMonthArrow: void 0
|
|
98
104
|
};
|
|
99
105
|
const withAnyInputs = type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.INPUTS;
|
|
100
106
|
const hideTimePicker = type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL && type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.PICKER && type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;
|
|
@@ -113,6 +119,8 @@ const getTimeFlags = (props) => {
|
|
|
113
119
|
isWithTimeInputsOnly: withAnyInputs,
|
|
114
120
|
autoFocusHourInput: withAnyInputs && autoFocus,
|
|
115
121
|
autoFocusHourTimeWheel: isControllerOnly && autoFocus,
|
|
122
|
+
innerRefHourInput: withAnyInputs && innerRef,
|
|
123
|
+
innerRefHourTimeWheel: isControllerOnly && innerRef,
|
|
116
124
|
shouldPreserveClearableSpace,
|
|
117
125
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
118
126
|
...constants
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetFlags.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../ControlledDateTimePickerTypes';\nimport { getIsDateTime, getIsDate } from '../utils/typeGuards';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nconst getDateTimeFlags = (props: DSControlledDateTimePickerT.InternalDateTimePickerProps) => {\n const { type, isClearable, dateTime, autoFocus } = props;\n const constants = {\n hideDatePicker: true,\n hideTimePicker: true,\n isDateSelector: false,\n isTimeSelector: false,\n isDateTimeSelector: true,\n isWithDateInputsOnly: false,\n isWithTimeInputsOnly: false,\n autoFocusHourInput: false,\n autoFocusHourTimeWheel: false,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL ||\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.INPUTS;\n const hideDateTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const withAnyPicker = !hideDateTimePicker;\n const withClearBtn = withAnyInputs && isClearable && dateTime !== '' && dateTime !== '__/__/____ __:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideTime: !withAnyInputs,\n hideDateTimePicker,\n isControllerOnly,\n isWithTimeWheelToo: !hideDateTimePicker,\n isWithCalendarToo: !hideDateTimePicker,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithTimeInputs: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getDateFlags = (props: DSControlledDateTimePickerT.InternalDatePickerProps) => {\n const { type, isClearable, date, autoFocus } = props;\n\n const constants = {\n isDateSelector: true,\n hideTime: true,\n hideDateTimePicker: true,\n hideTimePicker: true,\n isTimeSelector: false,\n isDateTimeSelector: false,\n isWithCalendarToo: false,\n isWithTimeWheelToo: false,\n isWithTimeInputs: false,\n isWithTimeInputsOnly: false,\n autoFocusHourTimeWheel: false,\n autoFocusHourInput: false,\n };\n\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS;\n const hideDatePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n\n const withAnyPicker = !hideDatePicker;\n const withClearBtn = withAnyInputs && isClearable && date !== '' && date !== '__/__/____';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideDatePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithDateInputsOnly: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getTimeFlags = (props: DSControlledDateTimePickerT.InternalTimePickerProps) => {\n const { type, isClearable, time, autoFocus } = props;\n const constants = {\n hideDate: true,\n hideDateTimePicker: true,\n hideDatePicker: true,\n isDateSelector: false,\n isDateTimeSelector: false,\n isWithDateInputs: false,\n isWithDateInputsOnly: false,\n isTimeSelector: true,\n isWithTimeWheelToo: false,\n isWithCalendarToo: false,\n autoFocusMonthInput: false,\n autoFocusPrevMonthArrow: false,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.INPUTS;\n const hideTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const withClearBtn = withAnyInputs && isClearable && time !== '' && time !== '__:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const withAnyPicker = !hideTimePicker;\n const finalFlags = {\n hideTime: !withAnyInputs,\n hideTimePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithTimeInputs: withAnyInputs,\n isWithTimeInputsOnly: withAnyInputs,\n autoFocusHourInput: withAnyInputs && autoFocus,\n autoFocusHourTimeWheel: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\n\nexport const useGetFlags = (props: DSControlledDateTimePickerT.InternalProps) =>\n useMemo(() => {\n if (getIsDateTime(props)) {\n return getDateTimeFlags(props);\n }\n if (getIsDate(props)) {\n return getDateFlags(props);\n }\n return getTimeFlags(props);\n }, [props]);\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../ControlledDateTimePickerTypes';\nimport { getIsDateTime, getIsDate } from '../utils/typeGuards';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nconst getDateTimeFlags = (props: DSControlledDateTimePickerT.InternalDateTimePickerProps) => {\n const { type, isClearable, dateTime, autoFocus, innerRef } = props;\n const constants = {\n hideDatePicker: true,\n hideTimePicker: true,\n isDateSelector: false,\n isTimeSelector: false,\n isDateTimeSelector: true,\n isWithDateInputsOnly: false,\n isWithTimeInputsOnly: false,\n autoFocusHourInput: false,\n autoFocusHourTimeWheel: false,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL ||\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.INPUTS;\n const hideDateTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const withAnyPicker = !hideDateTimePicker;\n const withClearBtn = withAnyInputs && isClearable && dateTime !== '' && dateTime !== '__/__/____ __:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideTime: !withAnyInputs,\n hideDateTimePicker,\n isControllerOnly,\n isWithTimeWheelToo: !hideDateTimePicker,\n isWithCalendarToo: !hideDateTimePicker,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithTimeInputs: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n innerRefMonthInput: withAnyInputs && innerRef,\n innerRefPrevMonthArrow: isControllerOnly && innerRef,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getDateFlags = (props: DSControlledDateTimePickerT.InternalDatePickerProps) => {\n const { type, isClearable, date, autoFocus, innerRef } = props;\n\n const constants = {\n isDateSelector: true,\n hideTime: true,\n hideDateTimePicker: true,\n hideTimePicker: true,\n isTimeSelector: false,\n isDateTimeSelector: false,\n isWithCalendarToo: false,\n isWithTimeWheelToo: false,\n isWithTimeInputs: false,\n isWithTimeInputsOnly: false,\n autoFocusHourTimeWheel: false,\n autoFocusHourInput: false,\n };\n\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS;\n const hideDatePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n\n const withAnyPicker = !hideDatePicker;\n const withClearBtn = withAnyInputs && isClearable && date !== '' && date !== '__/__/____';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideDatePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithDateInputsOnly: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n innerRefMonthInput: withAnyInputs && innerRef,\n innerRefPrevMonthArrow: isControllerOnly && innerRef,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getTimeFlags = (props: DSControlledDateTimePickerT.InternalTimePickerProps) => {\n const { type, isClearable, time, autoFocus, innerRef } = props;\n const constants = {\n hideDate: true,\n hideDateTimePicker: true,\n hideDatePicker: true,\n isDateSelector: false,\n isDateTimeSelector: false,\n isWithDateInputs: false,\n isWithDateInputsOnly: false,\n isTimeSelector: true,\n isWithTimeWheelToo: false,\n isWithCalendarToo: false,\n autoFocusMonthInput: false,\n autoFocusPrevMonthArrow: false,\n innerRefMonthInput: undefined,\n innerRefPrevMonthArrow: undefined,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.INPUTS;\n const hideTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const withClearBtn = withAnyInputs && isClearable && time !== '' && time !== '__:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const withAnyPicker = !hideTimePicker;\n const finalFlags = {\n hideTime: !withAnyInputs,\n hideTimePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithTimeInputs: withAnyInputs,\n isWithTimeInputsOnly: withAnyInputs,\n autoFocusHourInput: withAnyInputs && autoFocus,\n autoFocusHourTimeWheel: isControllerOnly && autoFocus,\n innerRefHourInput: withAnyInputs && innerRef,\n innerRefHourTimeWheel: isControllerOnly && innerRef,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\n\nexport const useGetFlags = (props: DSControlledDateTimePickerT.InternalProps) =>\n useMemo(() => {\n if (getIsDateTime(props)) {\n return getDateTimeFlags(props);\n }\n if (getIsDate(props)) {\n return getDateFlags(props);\n }\n return getTimeFlags(props);\n }, [props]);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,eAAe;AACxB,SAAS,yCAAyC;AAClD,SAAS,eAAe,iBAAiB;AAGzC,MAAM,mBAAmB,CAAC,UAAmE;AAC3F,QAAM,EAAE,MAAM,aAAa,UAAU,WAAW,SAAS,IAAI;AAC7D,QAAM,YAAY;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,IACpB,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,oBAAoB;AAAA,IACpB,wBAAwB;AAAA,EAC1B;AACA,QAAM,gBACJ,SAAS,kCAAkC,UAAU,QACrD,SAAS,kCAAkC,UAAU;AACvD,QAAM,qBACJ,SAAS,kCAAkC,UAAU,QACrD,SAAS,kCAAkC,UAAU,UACrD,SAAS,kCAAkC,UAAU;AACvD,QAAM,mBAAmB,SAAS,kCAAkC,UAAU;AAC9E,QAAM,gBAAgB,CAAC;AACvB,QAAM,eAAe,iBAAiB,eAAe,aAAa,MAAM,aAAa;AACrF,QAAM,+BAA+B,eAAe;AACpD,QAAM,aAAa;AAAA,IACjB,UAAU,CAAC;AAAA,IACX,UAAU,CAAC;AAAA,IACX;AAAA,IACA;AAAA,IACA,oBAAoB,CAAC;AAAA,IACrB,mBAAmB,CAAC;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,I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