@elliemae/ds-form-date-time-picker 3.15.0 → 3.16.0-next.10
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 +7 -7
- package/dist/cjs/ControlledDateTimePicker.js.map +2 -2
- package/dist/cjs/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/cjs/config/useChangeHandlers.js +4 -4
- package/dist/cjs/config/useChangeHandlers.js.map +2 -2
- package/dist/cjs/config/useControlledDateTimePicker.js +13 -13
- package/dist/cjs/config/useControlledDateTimePicker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker.js.map +1 -1
- package/dist/cjs/config/useGetDestructuredValues.js +3 -3
- package/dist/cjs/config/useGetDestructuredValues.js.map +1 -1
- package/dist/cjs/config/useGetFlags.js +8 -8
- package/dist/cjs/config/useGetFlags.js.map +2 -2
- package/dist/cjs/config/useGetPropsBasedOnType.js +1 -1
- package/dist/cjs/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/cjs/config/useGetPropsWithDefault.js +3 -3
- package/dist/cjs/config/useGetPropsWithDefault.js.map +2 -2
- package/dist/cjs/config/useGetReferences.js.map +1 -1
- package/dist/cjs/config/useGlobalKeyHandlers.js +3 -3
- package/dist/cjs/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/cjs/config/useRelevantValueFromProps.js +2 -2
- package/dist/cjs/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js +3 -3
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/ClearButton/ClearButton.js +12 -6
- package/dist/cjs/parts/ClearButton/ClearButton.js.map +3 -3
- package/dist/cjs/parts/ClearButton/useClearButton.js +1 -1
- package/dist/cjs/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/cjs/parts/ControlledDateTimePickerContent.js +15 -8
- package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +3 -3
- package/dist/cjs/parts/DateInputs/DDInput.js +6 -4
- package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
- package/dist/cjs/parts/DateInputs/DateInputs.js +30 -12
- package/dist/cjs/parts/DateInputs/DateInputs.js.map +3 -3
- package/dist/cjs/parts/DateInputs/MMInput.js +6 -4
- package/dist/cjs/parts/DateInputs/MMInput.js.map +2 -2
- package/dist/cjs/parts/DateInputs/YYYYInput.js +6 -4
- package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
- package/dist/cjs/parts/DateInputs/useDateInputs.js +5 -5
- package/dist/cjs/parts/DateInputs/useDateInputs.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js +5 -5
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js +3 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +15 -7
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +3 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +19 -5
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +3 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +40 -7
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +20 -6
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +3 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js +3 -3
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +12 -6
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +3 -3
- package/dist/cjs/parts/Pickers/Calendar/Day.js +11 -7
- package/dist/cjs/parts/Pickers/Calendar/Day.js.map +2 -2
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js +5 -5
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -2
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js +2 -2
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js +2 -2
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js +1 -1
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +6 -6
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +13 -7
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +3 -3
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +11 -4
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +3 -3
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +13 -4
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +3 -3
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +12 -4
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +3 -3
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js +2 -2
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +4 -4
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/PickersIcons.js +5 -5
- package/dist/cjs/parts/Pickers/PickersIcons.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +28 -7
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +28 -6
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +28 -7
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js +5 -5
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +26 -9
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js +19 -5
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +20 -6
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +12 -6
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +3 -3
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +4 -4
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Styleds.js +1 -1
- package/dist/cjs/parts/Styleds.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/HHInput.js +6 -4
- package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js +6 -4
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/MinutesInput.js +6 -4
- package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
- package/dist/cjs/parts/TimeInputs/TimeInputs.js +30 -12
- package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +3 -3
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js +2 -2
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/cjs/propTypes.js +28 -26
- package/dist/cjs/propTypes.js.map +2 -2
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/cjs/tests/custom-props/customProps.js +233 -0
- package/dist/cjs/tests/custom-props/customProps.js.map +7 -0
- package/dist/cjs/utils/dateHelpers.js +3 -3
- package/dist/cjs/utils/dateHelpers.js.map +1 -1
- package/dist/cjs/utils/dateTimeHelpers.js +2 -2
- package/dist/cjs/utils/dateTimeHelpers.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js +2 -2
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js +2 -2
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js +5 -5
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/cjs/utils/stringHelpers.js +2 -2
- package/dist/cjs/utils/stringHelpers.js.map +1 -1
- package/dist/cjs/utils/timeHelpers.js +1 -1
- package/dist/cjs/utils/timeHelpers.js.map +1 -1
- package/dist/cjs/utils/typeGuards.js.map +1 -1
- package/dist/esm/ControlledDateTimePicker.js +6 -6
- package/dist/esm/ControlledDateTimePicker.js.map +1 -1
- package/dist/esm/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/esm/config/useChangeHandlers.js +4 -4
- package/dist/esm/config/useChangeHandlers.js.map +2 -2
- package/dist/esm/config/useControlledDateTimePicker.js +11 -11
- package/dist/esm/config/useControlledDateTimePicker.js.map +1 -1
- package/dist/esm/config/useFocusTracker.js.map +1 -1
- package/dist/esm/config/useGetDestructuredValues.js +3 -3
- package/dist/esm/config/useGetDestructuredValues.js.map +1 -1
- package/dist/esm/config/useGetFlags.js +8 -8
- package/dist/esm/config/useGetFlags.js.map +2 -2
- package/dist/esm/config/useGetPropsBasedOnType.js +1 -1
- package/dist/esm/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/esm/config/useGetPropsWithDefault.js +2 -2
- package/dist/esm/config/useGetPropsWithDefault.js.map +1 -1
- package/dist/esm/config/useGetReferences.js.map +1 -1
- package/dist/esm/config/useGlobalKeyHandlers.js +3 -3
- package/dist/esm/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/esm/config/useRelevantValueFromProps.js +2 -2
- package/dist/esm/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/esm/config/useValidateProps.js +3 -3
- package/dist/esm/config/useValidateProps.js.map +1 -1
- package/dist/esm/index.js +9 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/ClearButton/ClearButton.js +12 -6
- package/dist/esm/parts/ClearButton/ClearButton.js.map +3 -3
- package/dist/esm/parts/ClearButton/useClearButton.js +1 -1
- package/dist/esm/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/esm/parts/ControlledDateTimePickerContent.js +15 -8
- package/dist/esm/parts/ControlledDateTimePickerContent.js.map +3 -3
- package/dist/esm/parts/DateInputs/DDInput.js +6 -4
- package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
- package/dist/esm/parts/DateInputs/DateInputs.js +30 -12
- package/dist/esm/parts/DateInputs/DateInputs.js.map +3 -3
- package/dist/esm/parts/DateInputs/MMInput.js +6 -4
- package/dist/esm/parts/DateInputs/MMInput.js.map +2 -2
- package/dist/esm/parts/DateInputs/YYYYInput.js +6 -4
- package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
- package/dist/esm/parts/DateInputs/useDateInputs.js +5 -5
- package/dist/esm/parts/DateInputs/useDateInputs.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/Calendar.js +5 -5
- package/dist/esm/parts/Pickers/Calendar/Calendar.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarBody.js +3 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarBody.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarContent.js +15 -7
- package/dist/esm/parts/Pickers/Calendar/CalendarContent.js.map +3 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarDaysList.js +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarDaysList.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js +19 -5
- package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js.map +3 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarHead.js +40 -7
- package/dist/esm/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js +20 -6
- package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +3 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarMonthDays.js +3 -3
- package/dist/esm/parts/Pickers/Calendar/CalendarMonthDays.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js +12 -6
- package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js.map +3 -3
- package/dist/esm/parts/Pickers/Calendar/Day.js +11 -7
- package/dist/esm/parts/Pickers/Calendar/Day.js.map +2 -2
- package/dist/esm/parts/Pickers/Calendar/Styleds.js +1 -1
- package/dist/esm/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useConfigCalendarCTX.js +5 -5
- package/dist/esm/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -2
- package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useFocusLogic.js +2 -2
- package/dist/esm/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js +2 -2
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js +1 -1
- package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +6 -6
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +13 -7
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +3 -3
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +11 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +3 -3
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +13 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +3 -3
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +12 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +3 -3
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js +2 -2
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +4 -4
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/PickersIcons.js +5 -5
- package/dist/esm/parts/Pickers/PickersIcons.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js +28 -7
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js +28 -6
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js +28 -7
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/Styleds.js +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheel.js +5 -5
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js +26 -9
- 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 +19 -5
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +20 -6
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js +12 -6
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +3 -3
- package/dist/esm/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +4 -4
- package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useKeyboardHandlers.js +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/esm/parts/Styleds.js +1 -1
- package/dist/esm/parts/Styleds.js.map +1 -1
- package/dist/esm/parts/TimeInputs/HHInput.js +6 -4
- package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/MeridiemInput.js +6 -4
- package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/MinutesInput.js +6 -4
- package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
- package/dist/esm/parts/TimeInputs/TimeInputs.js +30 -12
- package/dist/esm/parts/TimeInputs/TimeInputs.js.map +3 -3
- package/dist/esm/parts/TimeInputs/useTimeInputs.js +2 -2
- package/dist/esm/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/esm/propTypes.js +9 -2
- package/dist/esm/propTypes.js.map +2 -2
- package/dist/esm/tests/custom-props/customProps.js +207 -0
- package/dist/esm/tests/custom-props/customProps.js.map +7 -0
- package/dist/esm/utils/dateHelpers.js +3 -3
- package/dist/esm/utils/dateHelpers.js.map +1 -1
- package/dist/esm/utils/dateTimeHelpers.js +2 -2
- package/dist/esm/utils/dateTimeHelpers.js.map +1 -1
- package/dist/esm/utils/hooks/useGetDayFromDateString.js +2 -2
- package/dist/esm/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/esm/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js +2 -2
- package/dist/esm/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/esm/utils/hooks/useGetStartingFocusedDay.js +5 -5
- package/dist/esm/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/esm/utils/stringHelpers.js +2 -2
- package/dist/esm/utils/stringHelpers.js.map +1 -1
- package/dist/esm/utils/timeHelpers.js +1 -1
- package/dist/esm/utils/timeHelpers.js.map +1 -1
- package/dist/esm/utils/typeGuards.js.map +1 -1
- package/package.json +10 -9
- package/dist/types/ControlledDateTimePicker.d.ts +0 -7
- package/dist/types/ControlledDateTimePickerCTX.d.ts +0 -5
- package/dist/types/ControlledDateTimePickerDatatestid.d.ts +0 -63
- package/dist/types/ControlledDateTimePickerTypes.d.ts +0 -20
- package/dist/types/config/useChangeHandlers.d.ts +0 -27
- package/dist/types/config/useControlledDateTimePicker.d.ts +0 -16
- package/dist/types/config/useFocusTracker.d.ts +0 -38
- package/dist/types/config/useGetDestructuredValues.d.ts +0 -30
- package/dist/types/config/useGetFlags.d.ts +0 -30
- package/dist/types/config/useGetPropsBasedOnType.d.ts +0 -28
- package/dist/types/config/useGetPropsWithDefault.d.ts +0 -2
- package/dist/types/config/useGetReferences.d.ts +0 -33
- package/dist/types/config/useGlobalKeyHandlers.d.ts +0 -18
- package/dist/types/config/useRelevantValueFromProps.d.ts +0 -10
- package/dist/types/config/useValidateProps.d.ts +0 -2
- package/dist/types/exported-related/theming.d.ts +0 -37
- package/dist/types/index.d.ts +0 -9
- package/dist/types/parts/ClearButton/ClearButton.d.ts +0 -1
- package/dist/types/parts/ClearButton/useClearButton.d.ts +0 -11
- package/dist/types/parts/ControlledDateTimePickerContent.d.ts +0 -1
- package/dist/types/parts/DateInputs/DDInput.d.ts +0 -16
- package/dist/types/parts/DateInputs/DateInputs.d.ts +0 -1
- package/dist/types/parts/DateInputs/MMInput.d.ts +0 -18
- package/dist/types/parts/DateInputs/YYYYInput.d.ts +0 -16
- package/dist/types/parts/DateInputs/useDateInputs.d.ts +0 -2
- package/dist/types/parts/Pickers/Calendar/Calendar.d.ts +0 -4
- package/dist/types/parts/Pickers/Calendar/CalendarBody.d.ts +0 -6
- package/dist/types/parts/Pickers/Calendar/CalendarContent.d.ts +0 -3
- package/dist/types/parts/Pickers/Calendar/CalendarContext.d.ts +0 -6
- package/dist/types/parts/Pickers/Calendar/CalendarDaysList.d.ts +0 -9
- package/dist/types/parts/Pickers/Calendar/CalendarFooter.d.ts +0 -2
- package/dist/types/parts/Pickers/Calendar/CalendarHead.d.ts +0 -1
- package/dist/types/parts/Pickers/Calendar/CalendarIconTrigger.d.ts +0 -1
- package/dist/types/parts/Pickers/Calendar/CalendarMonthDays.d.ts +0 -1
- package/dist/types/parts/Pickers/Calendar/CalendarWeekDays.d.ts +0 -2
- package/dist/types/parts/Pickers/Calendar/CalendarWrapper.d.ts +0 -1
- package/dist/types/parts/Pickers/Calendar/Day.d.ts +0 -8
- package/dist/types/parts/Pickers/Calendar/Styleds.d.ts +0 -21
- package/dist/types/parts/Pickers/Calendar/useConfigCalendarCTX.d.ts +0 -14
- package/dist/types/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.d.ts +0 -15
- package/dist/types/parts/Pickers/Calendar/useFocusLogic.d.ts +0 -14
- package/dist/types/parts/Pickers/Calendar/useKeyboardHandlers.d.ts +0 -19
- package/dist/types/parts/Pickers/Calendar/usePopperTriggerLogic.d.ts +0 -16
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.d.ts +0 -1
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.d.ts +0 -1
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.d.ts +0 -6
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.d.ts +0 -2
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.d.ts +0 -1
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.d.ts +0 -1
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/Styleds.d.ts +0 -7
- package/dist/types/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.d.ts +0 -14
- package/dist/types/parts/Pickers/PickersIcons.d.ts +0 -1
- package/dist/types/parts/Pickers/TimeWheel/HoursList.d.ts +0 -1
- package/dist/types/parts/Pickers/TimeWheel/MeridiemList.d.ts +0 -2
- package/dist/types/parts/Pickers/TimeWheel/MinutesList.d.ts +0 -2
- package/dist/types/parts/Pickers/TimeWheel/TimeWheel.d.ts +0 -4
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelContent.d.ts +0 -2
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelContext.d.ts +0 -6
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelFooter.d.ts +0 -2
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelIconTrigger.d.ts +0 -1
- package/dist/types/parts/Pickers/TimeWheel/TimeWheelWrapper.d.ts +0 -1
- package/dist/types/parts/Pickers/TimeWheel/useConfigTimePickerCTX.d.ts +0 -5
- package/dist/types/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.d.ts +0 -17
- package/dist/types/parts/Pickers/TimeWheel/useKeyboardHandlers.d.ts +0 -13
- package/dist/types/parts/Pickers/TimeWheel/usePopperTriggerLogic.d.ts +0 -12
- package/dist/types/parts/Styleds.d.ts +0 -13
- package/dist/types/parts/TimeInputs/HHInput.d.ts +0 -17
- package/dist/types/parts/TimeInputs/MeridiemInput.d.ts +0 -16
- package/dist/types/parts/TimeInputs/MinutesInput.d.ts +0 -16
- package/dist/types/parts/TimeInputs/TimeInputs.d.ts +0 -1
- package/dist/types/parts/TimeInputs/useTimeInputs.d.ts +0 -22
- package/dist/types/parts/config.d.ts +0 -5
- package/dist/types/propTypes.d.ts +0 -97
- package/dist/types/sharedTypes.d.ts +0 -95
- package/dist/types/tests/date-time-picker.auto-advance.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.clear-button.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.keyboard-focus.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.keyboard.data-entry-typing.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.keyboard.fill-with-now.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.keyboard.regressive-backspace.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.keyboard.shortcut-clear.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.manual-delete-values.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.onChange-meta-info.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.types-button.test.d.ts +0 -1
- package/dist/types/tests/date-time-picker.types-dom.test.d.ts +0 -1
- package/dist/types/utils/constants.d.ts +0 -38
- package/dist/types/utils/dateHelpers.d.ts +0 -40
- package/dist/types/utils/dateTimeHelpers.d.ts +0 -8
- package/dist/types/utils/hooks/useGetDayFromDateString.d.ts +0 -1
- package/dist/types/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.d.ts +0 -5
- package/dist/types/utils/hooks/useGetStartingFocusedDay.d.ts +0 -8
- package/dist/types/utils/hooks/useOnClickOutside.d.ts +0 -1
- package/dist/types/utils/numberHelpers.d.ts +0 -1
- package/dist/types/utils/stringHelpers.d.ts +0 -36
- package/dist/types/utils/timeHelpers.d.ts +0 -2
- package/dist/types/utils/typeGuards.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useFocusTracker.tsx"],
|
|
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 type { useGetReferences } from './useGetReferences';\nimport type { 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"],
|
|
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 type { useGetReferences } from './useGetReferences.js';\nimport type { useGetFlags } from './useGetFlags.js';\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, trackF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AAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,oBAAoB,yBAAyB,kBAAkB,wBAAwB,qBAAqB;AAAA,EAC/G;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
dateTimeToDate,
|
|
7
7
|
deconstructValuesFromDateString,
|
|
8
8
|
fillStringWithPlaceHolders
|
|
9
|
-
} from "../utils/stringHelpers";
|
|
10
|
-
import { convertToPositiveNumberIfPossible } from "../utils/numberHelpers";
|
|
11
|
-
import { monthNames, announcableCardinalDays } from "../utils/constants";
|
|
9
|
+
} from "../utils/stringHelpers.js";
|
|
10
|
+
import { convertToPositiveNumberIfPossible } from "../utils/numberHelpers.js";
|
|
11
|
+
import { monthNames, announcableCardinalDays } from "../utils/constants.js";
|
|
12
12
|
const useGetDestructuredDateValues = ({
|
|
13
13
|
appDate,
|
|
14
14
|
appDateTime,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetDestructuredValues.tsx"],
|
|
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 type { useGetFlags } from './useGetFlags';\nimport type { 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"],
|
|
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.js';\nimport type { useGetFlags } from './useGetFlags.js';\nimport type { useGetPropsBasedOnType } from './useGetPropsBasedOnType.js';\nimport { convertToPositiveNumberIfPossible } from '../utils/numberHelpers.js';\nimport { monthNames, announcableCardinalDays } from '../utils/constants.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../sharedTypes.js';\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
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,IAAI;AAC1F,QAAM,sBAAsB,GAAG,mBAAmB,iBAAiB;AAEnE,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,cAAc,gBAAgB,eAAe,qBAAqB,KAAK,QAAQ,OAAO,UAAU,MAAM,OAAO;AAAA,EAChH;AACF;AAmBO,MAAM,+BAA6D,CAAC;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsB,qBAAqB,eAAe,WAAW,IAAI;AAC/E,QAAM,sBAAsB,sBAAsB,mBAAmB;AACrE,QAAM,EAAE,OAAO,SAAS,SAAS,IAAI;AACrC,QAAM,WAAW,kCAAkC,KAAK;AACxD,QAAM,aAAa,kCAAkC,OAAO;AAG5D,QAAM,iBAAiB,aAAa,KAAK,GAAG,aAAa;AAEzD,QAAM,mBAAmB,eAAe,KAAK,GAAG,eAAe;AAC/D,QAAM,oBAEJ,aAAa,OAAO,kBAAkB,aAAa,OAAO,kBAAkB;AAC9E,QAAM,sBAAsB,GAAG,mBAAmB,qBAAqB;AAEvE,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAMO,MAAM,2BAAqD,CAAC,WAAW;AAC5E,QAAM,aAAa,6BAA6B,MAAM;AACtD,QAAM,aAAa,6BAA6B,MAAM;AAEtD,SAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,CAAC,YAAY,UAAU;AAAA,EACzB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from "../ControlledDateTimePickerTypes";
|
|
4
|
-
import { getIsDateTime, getIsDate } from "../utils/typeGuards";
|
|
3
|
+
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from "../ControlledDateTimePickerTypes.js";
|
|
4
|
+
import { getIsDateTime, getIsDate } from "../utils/typeGuards.js";
|
|
5
5
|
const getDateTimeFlags = (props) => {
|
|
6
6
|
const { type, isClearable, dateTime, autoFocus, innerRef } = props;
|
|
7
7
|
const constants = {
|
|
@@ -35,8 +35,8 @@ const getDateTimeFlags = (props) => {
|
|
|
35
35
|
isWithTimeInputs: withAnyInputs,
|
|
36
36
|
autoFocusMonthInput: withAnyInputs && autoFocus,
|
|
37
37
|
autoFocusPrevMonthArrow: isControllerOnly && autoFocus,
|
|
38
|
-
innerRefMonthInput: withAnyInputs
|
|
39
|
-
innerRefPrevMonthArrow: isControllerOnly
|
|
38
|
+
innerRefMonthInput: withAnyInputs ? innerRef : void 0,
|
|
39
|
+
innerRefPrevMonthArrow: isControllerOnly ? innerRef : void 0,
|
|
40
40
|
shouldPreserveClearableSpace,
|
|
41
41
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
42
42
|
...constants
|
|
@@ -76,8 +76,8 @@ const getDateFlags = (props) => {
|
|
|
76
76
|
isWithDateInputsOnly: withAnyInputs,
|
|
77
77
|
autoFocusMonthInput: withAnyInputs && autoFocus,
|
|
78
78
|
autoFocusPrevMonthArrow: isControllerOnly && autoFocus,
|
|
79
|
-
innerRefMonthInput: withAnyInputs
|
|
80
|
-
innerRefPrevMonthArrow: isControllerOnly
|
|
79
|
+
innerRefMonthInput: withAnyInputs ? innerRef : void 0,
|
|
80
|
+
innerRefPrevMonthArrow: isControllerOnly ? innerRef : void 0,
|
|
81
81
|
shouldPreserveClearableSpace,
|
|
82
82
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
83
83
|
...constants
|
|
@@ -119,8 +119,8 @@ const getTimeFlags = (props) => {
|
|
|
119
119
|
isWithTimeInputsOnly: withAnyInputs,
|
|
120
120
|
autoFocusHourInput: withAnyInputs && autoFocus,
|
|
121
121
|
autoFocusHourTimeWheel: isControllerOnly && autoFocus,
|
|
122
|
-
innerRefHourInput: withAnyInputs
|
|
123
|
-
innerRefHourTimeWheel: isControllerOnly
|
|
122
|
+
innerRefHourInput: withAnyInputs ? innerRef : void 0,
|
|
123
|
+
innerRefHourTimeWheel: isControllerOnly ? innerRef : void 0,
|
|
124
124
|
shouldPreserveClearableSpace,
|
|
125
125
|
withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,
|
|
126
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, 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
|
|
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,IACA,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,qBAAqB,iBAAiB;AAAA,IACtC,yBAAyB,oBAAoB;AAAA,IAC7C,oBAAoB,
|
|
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.js';\nimport { getIsDateTime, getIsDate } from '../utils/typeGuards.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\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 : undefined,\n innerRefPrevMonthArrow: isControllerOnly ? innerRef : undefined,\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 : undefined,\n innerRefPrevMonthArrow: isControllerOnly ? innerRef : undefined,\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 : undefined,\n innerRefHourTimeWheel: isControllerOnly ? innerRef : undefined,\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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AC/B;AACA,MAAI,UAAU,KAAK,GAAG;AACpB,WAAO,aAAa,KAAK;AAAA,EAC3B;AACA,SAAO,aAAa,KAAK;AAC3B,GAAG,CAAC,KAAK,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards";
|
|
3
|
+
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards.js";
|
|
4
4
|
const noop = () => {
|
|
5
5
|
};
|
|
6
6
|
const defaultReturnFalse = () => false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetPropsBasedOnType.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\nconst defaultReturnFalse = () => false;\n\nexport const useGetPropsBasedOnType = (propsWithDefaults: DSControlledDateTimePickerT.InternalProps) => {\n const isDateTime = getIsDateTime(propsWithDefaults);\n const isDate = getIsDate(propsWithDefaults);\n const isTime = getIsTime(propsWithDefaults);\n\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- DATE OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledDay =\n (isDateTime || isDate) && propsWithDefaults.getIsDisabledDay\n ? propsWithDefaults.getIsDisabledDay\n : defaultReturnFalse;\n const getIsOutOfRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsOutOfRangeDay\n ? propsWithDefaults.getIsOutOfRangeDay\n : defaultReturnFalse;\n const appOnMonthChange =\n (isDateTime || isDate) && propsWithDefaults.onMonthChange ? propsWithDefaults.onMonthChange : noop;\n const appOnDayChange = (isDateTime || isDate) && propsWithDefaults.onDayChange ? propsWithDefaults.onDayChange : noop;\n const appOnYearChange =\n (isDateTime || isDate) && propsWithDefaults.onYearChange ? propsWithDefaults.onYearChange : noop;\n\n const emptyPickerStartingMonthDefault = `${new Date().getMonth() + 1}/__/${new Date().getFullYear()}`;\n const emptyPickerStartingMonth =\n (isDateTime || isDate) && propsWithDefaults.emptyPickerStartingMonth\n ? propsWithDefaults.emptyPickerStartingMonth\n : emptyPickerStartingMonthDefault;\n const onCalendarOpenFocusedDay =\n (isDateTime || isDate) && propsWithDefaults.onCalendarOpenFocusedDay\n ? propsWithDefaults.onCalendarOpenFocusedDay\n : undefined;\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- TIME OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledTime =\n (isDateTime || isTime) && propsWithDefaults.getIsDisabledTime\n ? propsWithDefaults.getIsDisabledTime\n : defaultReturnFalse;\n const appOnHourChange =\n (isDateTime || isTime) && propsWithDefaults.onHourChange ? propsWithDefaults.onHourChange : noop;\n const appOnMinuteChange =\n (isDateTime || isTime) && propsWithDefaults.onMinuteChange ? propsWithDefaults.onMinuteChange : noop;\n const appOnMeridiemChange =\n (isDateTime || isTime) && propsWithDefaults.onMeridiemChange ? propsWithDefaults.onMeridiemChange : noop;\n const minutesInterval =\n (isDateTime || isTime) && propsWithDefaults.minutesInterval ? propsWithDefaults.minutesInterval : 1;\n const onTimeWheelOpenStartingTime =\n (isDateTime || isTime) && propsWithDefaults.onTimeWheelOpenStartingTime\n ? propsWithDefaults.onTimeWheelOpenStartingTime\n : '01:00 AM';\n\n /* --------- ------------------------------------ ---------------------*/\n /* --------- SPECIFIC REQUIRED DATETIME OPTIONALS ---------------------*/\n /* --------- ------------------------------------ ---------------------*/\n const appOnDateChange =\n (isDateTime || isDate) && propsWithDefaults.onDateChange ? propsWithDefaults.onDateChange : noop;\n const appOnTimeChange =\n (isDateTime || isTime) && propsWithDefaults.onTimeChange ? propsWithDefaults.onTimeChange : noop;\n /* ---------------------- ---------------------- ----------------------*/\n /* ---------------------- DATE-RELATED OPTIONALS ----------------------*/\n /* ---------------------- ---------------------- ----------------------*/\n const getIsStartRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsStartRangeDay ? propsWithDefaults.getIsStartRangeDay : noop;\n const getIsDayInRange =\n (isDateTime || isDate) && propsWithDefaults.getIsDayInRange ? propsWithDefaults.getIsDayInRange : noop;\n const getIsEndRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsEndRangeDay ? propsWithDefaults.getIsEndRangeDay : noop;\n\n /* --------------------- ----------------------- ------------------------*/\n /* --------------------- TYPE SPECIFIC REQUIREDS ------------------------*/\n /* --------------------- ----------------------- ------------------------*/\n const appDate = isDate ? propsWithDefaults.date : '';\n const appTime = isTime ? propsWithDefaults.time : '';\n const appDateTime = isDateTime ? propsWithDefaults.dateTime : '';\n const appOnDateTimeChange = isDateTime ? propsWithDefaults.onDateTimeChange : noop;\n\n return useMemo(\n () => ({\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n }),\n [\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n ],\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\nconst defaultReturnFalse = () => false;\n\nexport const useGetPropsBasedOnType = (propsWithDefaults: DSControlledDateTimePickerT.InternalProps) => {\n const isDateTime = getIsDateTime(propsWithDefaults);\n const isDate = getIsDate(propsWithDefaults);\n const isTime = getIsTime(propsWithDefaults);\n\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- DATE OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledDay =\n (isDateTime || isDate) && propsWithDefaults.getIsDisabledDay\n ? propsWithDefaults.getIsDisabledDay\n : defaultReturnFalse;\n const getIsOutOfRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsOutOfRangeDay\n ? propsWithDefaults.getIsOutOfRangeDay\n : defaultReturnFalse;\n const appOnMonthChange =\n (isDateTime || isDate) && propsWithDefaults.onMonthChange ? propsWithDefaults.onMonthChange : noop;\n const appOnDayChange = (isDateTime || isDate) && propsWithDefaults.onDayChange ? propsWithDefaults.onDayChange : noop;\n const appOnYearChange =\n (isDateTime || isDate) && propsWithDefaults.onYearChange ? propsWithDefaults.onYearChange : noop;\n\n const emptyPickerStartingMonthDefault = `${new Date().getMonth() + 1}/__/${new Date().getFullYear()}`;\n const emptyPickerStartingMonth =\n (isDateTime || isDate) && propsWithDefaults.emptyPickerStartingMonth\n ? propsWithDefaults.emptyPickerStartingMonth\n : emptyPickerStartingMonthDefault;\n const onCalendarOpenFocusedDay =\n (isDateTime || isDate) && propsWithDefaults.onCalendarOpenFocusedDay\n ? propsWithDefaults.onCalendarOpenFocusedDay\n : undefined;\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- TIME OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledTime =\n (isDateTime || isTime) && propsWithDefaults.getIsDisabledTime\n ? propsWithDefaults.getIsDisabledTime\n : defaultReturnFalse;\n const appOnHourChange =\n (isDateTime || isTime) && propsWithDefaults.onHourChange ? propsWithDefaults.onHourChange : noop;\n const appOnMinuteChange =\n (isDateTime || isTime) && propsWithDefaults.onMinuteChange ? propsWithDefaults.onMinuteChange : noop;\n const appOnMeridiemChange =\n (isDateTime || isTime) && propsWithDefaults.onMeridiemChange ? propsWithDefaults.onMeridiemChange : noop;\n const minutesInterval =\n (isDateTime || isTime) && propsWithDefaults.minutesInterval ? propsWithDefaults.minutesInterval : 1;\n const onTimeWheelOpenStartingTime =\n (isDateTime || isTime) && propsWithDefaults.onTimeWheelOpenStartingTime\n ? propsWithDefaults.onTimeWheelOpenStartingTime\n : '01:00 AM';\n\n /* --------- ------------------------------------ ---------------------*/\n /* --------- SPECIFIC REQUIRED DATETIME OPTIONALS ---------------------*/\n /* --------- ------------------------------------ ---------------------*/\n const appOnDateChange =\n (isDateTime || isDate) && propsWithDefaults.onDateChange ? propsWithDefaults.onDateChange : noop;\n const appOnTimeChange =\n (isDateTime || isTime) && propsWithDefaults.onTimeChange ? propsWithDefaults.onTimeChange : noop;\n /* ---------------------- ---------------------- ----------------------*/\n /* ---------------------- DATE-RELATED OPTIONALS ----------------------*/\n /* ---------------------- ---------------------- ----------------------*/\n const getIsStartRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsStartRangeDay ? propsWithDefaults.getIsStartRangeDay : noop;\n const getIsDayInRange =\n (isDateTime || isDate) && propsWithDefaults.getIsDayInRange ? propsWithDefaults.getIsDayInRange : noop;\n const getIsEndRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsEndRangeDay ? propsWithDefaults.getIsEndRangeDay : noop;\n\n /* --------------------- ----------------------- ------------------------*/\n /* --------------------- TYPE SPECIFIC REQUIREDS ------------------------*/\n /* --------------------- ----------------------- ------------------------*/\n const appDate = isDate ? propsWithDefaults.date : '';\n const appTime = isTime ? propsWithDefaults.time : '';\n const appDateTime = isDateTime ? propsWithDefaults.dateTime : '';\n const appOnDateTimeChange = isDateTime ? propsWithDefaults.onDateTimeChange : noop;\n\n return useMemo(\n () => ({\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n }),\n [\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n ],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,eAAe;AACxB,SAAS,eAAe,WAAW,iBAAiB;AAIpD,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,qBAAqB,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,cAAc,WAAW,kBAAkB,kBAAkB,kBAAkB,kBAAkB;AACpG,QAAM,oBACH,cAAc,WAAW,kBAAkB,mBAAmB,kBAAkB,mBAAmB;AAKtG,QAAM,UAAU,SAAS,kBAAkB,OAAO;AAClD,QAAM,UAAU,SAAS,kBAAkB,OAAO;AAClD,QAAM,cAAc,aAAa,kBAAkB,WAAW;AAC9D,QAAM,sBAAsB,aAAa,kBAAkB,mBAAmB;AAE9E,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;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,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,MACA;AAAA,MACA;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;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useMemoMergePropsWithDefault } from "@elliemae/ds-
|
|
3
|
-
import { defaultProps } from "../propTypes";
|
|
2
|
+
import { useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { defaultProps } from "../propTypes.js";
|
|
4
4
|
const useGetDatePickerWithDefaultsProps = (props) => useMemoMergePropsWithDefault(props, defaultProps);
|
|
5
5
|
export {
|
|
6
6
|
useGetDatePickerWithDefaultsProps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetPropsWithDefault.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemoMergePropsWithDefault } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\nimport { defaultProps } from '../propTypes.js';\n// we have to merge the \"default\" nested default values with what the user gives us...\nexport const useGetDatePickerWithDefaultsProps = (\n props: DSControlledDateTimePickerT.Props,\n): DSControlledDateTimePickerT.InternalProps =>\n useMemoMergePropsWithDefault<DSControlledDateTimePickerT.InternalProps>(props, defaultProps);\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;AAE7C,SAAS,oBAAoB;AAEtB,MAAM,oCAAoC,CAC/C,UAEA,6BAAwE,OAAO,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetReferences.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useRef, useMemo, useState } from 'react';\nimport type { useGetFlags } from './useGetFlags';\ntype FirstSegment =\n | 'month-input'\n | 'hour-input'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\ntype LastSegment =\n | 'year-input'\n | 'meridiem-input'\n | 'clear-btn'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\nexport const useGetReferences = ({\n isWithDateInputs,\n isWithTimeInputs,\n isDateSelector,\n isTimeSelector,\n isDateTimeSelector,\n withAnyPicker,\n withClearBtn,\n}: ReturnType<typeof useGetFlags>) => {\n // those 2 states are needed for focus tracking\n const [firstSegment, setFirstSegment] = useState<FirstSegment>('');\n const [lastSegment, setLastSegment] = useState<LastSegment>('');\n // refs are used for \"auto-advance\" feature\n const monthInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const dayInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const yearInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const hourInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const minutesInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const meridiemInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const clearButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const pickerButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n const prevYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const calendarDaysWrapperRef = useRef<HTMLDivElement>(null) as React.MutableRefObject<HTMLDivElement>;\n\n const prevHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n let firstSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (isWithDateInputs) {\n firstSegmentRef = monthInputRef;\n if (firstSegment !== 'month-input') setFirstSegment('month-input');\n } else if (isWithTimeInputs) {\n firstSegmentRef = hourInputRef;\n if (firstSegment !== 'hour-input') setFirstSegment('hour-input');\n } else if (withAnyPicker) {\n firstSegmentRef = pickerButtonRef;\n if (isDateSelector && firstSegment !== 'date-picker-icon') setFirstSegment('date-picker-icon');\n if (isTimeSelector && firstSegment !== 'time-picker-icon') setFirstSegment('time-picker-icon');\n if (isDateTimeSelector && firstSegment !== 'datetime-picker-icon') setFirstSegment('datetime-picker-icon');\n }\n\n let lastSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (withAnyPicker) {\n lastSegmentRef = pickerButtonRef;\n if (isDateSelector && lastSegment !== 'date-picker-icon') setLastSegment('date-picker-icon');\n if (isTimeSelector && lastSegment !== 'time-picker-icon') setLastSegment('time-picker-icon');\n if (isDateTimeSelector && lastSegment !== 'datetime-picker-icon') setLastSegment('datetime-picker-icon');\n } else if (withClearBtn) {\n lastSegmentRef = clearButtonRef;\n if (lastSegment !== 'clear-btn') setLastSegment('clear-btn');\n } else if (isWithTimeInputs) {\n lastSegmentRef = meridiemInputRef;\n if (lastSegment !== 'meridiem-input') setLastSegment('meridiem-input');\n } else if (isWithDateInputs) {\n lastSegmentRef = yearInputRef;\n if (lastSegment !== 'year-input') setLastSegment('year-input');\n }\n\n return useMemo(\n () => ({\n monthInputRef,\n dayInputRef,\n yearInputRef,\n hourInputRef,\n minutesInputRef,\n meridiemInputRef,\n clearButtonRef,\n pickerButtonRef,\n prevYearBtnRef,\n prevMonthBtnRef,\n nextMonthBtnRef,\n nextYearBtnRef,\n calendarDaysWrapperRef,\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n prevMinutesBtnRef,\n currMinutesBtnRef,\n nextMinutesBtnRef,\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n firstSegmentRef,\n lastSegmentRef,\n firstSegment,\n lastSegment,\n }),\n [firstSegment, lastSegment],\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useRef, useMemo, useState } from 'react';\nimport type { useGetFlags } from './useGetFlags.js';\ntype FirstSegment =\n | 'month-input'\n | 'hour-input'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\ntype LastSegment =\n | 'year-input'\n | 'meridiem-input'\n | 'clear-btn'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\nexport const useGetReferences = ({\n isWithDateInputs,\n isWithTimeInputs,\n isDateSelector,\n isTimeSelector,\n isDateTimeSelector,\n withAnyPicker,\n withClearBtn,\n}: ReturnType<typeof useGetFlags>) => {\n // those 2 states are needed for focus tracking\n const [firstSegment, setFirstSegment] = useState<FirstSegment>('');\n const [lastSegment, setLastSegment] = useState<LastSegment>('');\n // refs are used for \"auto-advance\" feature\n const monthInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const dayInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const yearInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const hourInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const minutesInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const meridiemInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const clearButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const pickerButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n const prevYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const calendarDaysWrapperRef = useRef<HTMLDivElement>(null) as React.MutableRefObject<HTMLDivElement>;\n\n const prevHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n let firstSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (isWithDateInputs) {\n firstSegmentRef = monthInputRef;\n if (firstSegment !== 'month-input') setFirstSegment('month-input');\n } else if (isWithTimeInputs) {\n firstSegmentRef = hourInputRef;\n if (firstSegment !== 'hour-input') setFirstSegment('hour-input');\n } else if (withAnyPicker) {\n firstSegmentRef = pickerButtonRef;\n if (isDateSelector && firstSegment !== 'date-picker-icon') setFirstSegment('date-picker-icon');\n if (isTimeSelector && firstSegment !== 'time-picker-icon') setFirstSegment('time-picker-icon');\n if (isDateTimeSelector && firstSegment !== 'datetime-picker-icon') setFirstSegment('datetime-picker-icon');\n }\n\n let lastSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (withAnyPicker) {\n lastSegmentRef = pickerButtonRef;\n if (isDateSelector && lastSegment !== 'date-picker-icon') setLastSegment('date-picker-icon');\n if (isTimeSelector && lastSegment !== 'time-picker-icon') setLastSegment('time-picker-icon');\n if (isDateTimeSelector && lastSegment !== 'datetime-picker-icon') setLastSegment('datetime-picker-icon');\n } else if (withClearBtn) {\n lastSegmentRef = clearButtonRef;\n if (lastSegment !== 'clear-btn') setLastSegment('clear-btn');\n } else if (isWithTimeInputs) {\n lastSegmentRef = meridiemInputRef;\n if (lastSegment !== 'meridiem-input') setLastSegment('meridiem-input');\n } else if (isWithDateInputs) {\n lastSegmentRef = yearInputRef;\n if (lastSegment !== 'year-input') setLastSegment('year-input');\n }\n\n return useMemo(\n () => ({\n monthInputRef,\n dayInputRef,\n yearInputRef,\n hourInputRef,\n minutesInputRef,\n meridiemInputRef,\n clearButtonRef,\n pickerButtonRef,\n prevYearBtnRef,\n prevMonthBtnRef,\n nextMonthBtnRef,\n nextYearBtnRef,\n calendarDaysWrapperRef,\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n prevMinutesBtnRef,\n currMinutesBtnRef,\n nextMinutesBtnRef,\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n firstSegmentRef,\n lastSegmentRef,\n firstSegment,\n lastSegment,\n }),\n [firstSegment, lastSegment],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,QAAQ,SAAS,gBAAgB;AAiBnC,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAsC;AAEpC,QAAM,CAAC,cAAc,eAAe,IAAI,SAAuB,EAAE;AACjE,QAAM,CAAC,aAAa,cAAc,IAAI,SAAsB,EAAE;AAE9D,QAAM,gBAAgB,OAAyB,IAAI;AACnD,QAAM,cAAc,OAAyB,IAAI;AACjD,QAAM,eAAe,OAAyB,IAAI;AAClD,QAAM,eAAe,OAAyB,IAAI;AAClD,QAAM,kBAAkB,OAAyB,IAAI;AACrD,QAAM,mBAAmB,OAAyB,IAAI;AACtD,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,kBAAkB,OAA0B,IAAI;AAEtD,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,kBAAkB,OAA0B,IAAI;AACtD,QAAM,kBAAkB,OAA0B,IAAI;AACtD,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,yBAAyB,OAAuB,IAAI;AAE1D,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,iBAAiB,OAA0B,IAAI;AACrD,QAAM,oBAAoB,OAA0B,IAAI;AACxD,QAAM,oBAAoB,OAA0B,IAAI;AACxD,QAAM,oBAAoB,OAA0B,IAAI;AACxD,QAAM,qBAAqB,OAA0B,IAAI;AACzD,QAAM,qBAAqB,OAA0B,IAAI;AACzD,QAAM,qBAAqB,OAA0B,IAAI;AAEzD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AAW;AAAA,EAC5B;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
|
-
import { getValidationDateStringMetaInfo, getDateStringFromDay, getTimeStringFromDay } from "../utils/dateHelpers";
|
|
4
|
-
import { getValidationTimeStringMetaInfo } from "../utils/timeHelpers";
|
|
5
|
-
import { deconstructValuesFromDateString, deconstructValuesFromTimeString } from "../utils/stringHelpers";
|
|
3
|
+
import { getValidationDateStringMetaInfo, getDateStringFromDay, getTimeStringFromDay } from "../utils/dateHelpers.js";
|
|
4
|
+
import { getValidationTimeStringMetaInfo } from "../utils/timeHelpers.js";
|
|
5
|
+
import { deconstructValuesFromDateString, deconstructValuesFromTimeString } from "../utils/stringHelpers.js";
|
|
6
6
|
const useGlobalKeyHandlers = ({ propsBasedOnType, changeHandlers, focusTrackers, flags }) => {
|
|
7
7
|
const {
|
|
8
8
|
getIsOutOfRangeDay,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGlobalKeyHandlers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-nested-ternary */\n/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useCallback, useMemo } from 'react';\nimport type { useChangeHandlers } from './useChangeHandlers';\nimport type { useGetPropsBasedOnType } from './useGetPropsBasedOnType';\nimport type { useGetReferences } from './useGetReferences';\nimport type { useGetFlags } from './useGetFlags';\nimport type { useFocusTracker } from './useFocusTracker';\nimport { getValidationDateStringMetaInfo, getDateStringFromDay, getTimeStringFromDay } from '../utils/dateHelpers';\nimport { getValidationTimeStringMetaInfo } from '../utils/timeHelpers';\nimport { deconstructValuesFromDateString, deconstructValuesFromTimeString } from '../utils/stringHelpers';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\ninterface Config {\n propsBasedOnType: ReturnType<typeof useGetPropsBasedOnType>;\n changeHandlers: ReturnType<typeof useChangeHandlers>;\n DOMRefs: ReturnType<typeof useGetReferences>;\n flags: ReturnType<typeof useGetFlags>;\n focusTrackers: ReturnType<typeof useFocusTracker>;\n}\n\nexport const useGlobalKeyHandlers = ({ propsBasedOnType, changeHandlers, focusTrackers, flags }: Config) => {\n const {\n getIsOutOfRangeDay,\n getIsDisabledDay,\n getIsDisabledTime,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n } = propsBasedOnType;\n const { handleChangeComposedDateTimeString, handleClearAll } = changeHandlers;\n const { trackFocusLastSegment, trackFocusClearBtn } = focusTrackers;\n const { withAnyPicker, shouldPreserveClearableSpace } = flags;\n\n const onFillWithCurrentDateKeys = useCallback(\n (\n e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = { isAutomaticFillTrigger: true },\n ) => {\n const now = new Date();\n const nowDateString = getDateStringFromDay(now);\n const nowTimeString = getTimeStringFromDay(now);\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(nowDateString, getIsOutOfRangeDay, getIsDisabledDay),\n ...getValidationTimeStringMetaInfo(nowTimeString, getIsDisabledTime),\n newDateString: nowDateString,\n };\n const { month, day, year } = deconstructValuesFromDateString(nowDateString);\n appOnMonthChange(month, e, metaInfo);\n appOnDayChange(day, e, metaInfo);\n appOnYearChange(year, e, metaInfo);\n const { hours, minutes, meridiem } = deconstructValuesFromTimeString(nowTimeString);\n appOnHourChange(hours, e, metaInfo);\n appOnMinuteChange(minutes, e, metaInfo);\n appOnMeridiemChange(meridiem, e, metaInfo);\n handleChangeComposedDateTimeString(nowDateString, nowTimeString, finalMetaInfo);\n // trackFocusLastSegment is not enough here,\n // after this key combination the value may change from empty to non-empty\n // when non empty the last segment may become the clear-btn (clear btn only appears when non empty)\n // as such this must be micro-managed here\n if (shouldPreserveClearableSpace && !withAnyPicker) trackFocusClearBtn();\n else trackFocusLastSegment();\n },\n [\n appOnDayChange,\n appOnHourChange,\n appOnMeridiemChange,\n appOnMinuteChange,\n appOnMonthChange,\n appOnYearChange,\n getIsDisabledDay,\n getIsDisabledTime,\n getIsOutOfRangeDay,\n handleChangeComposedDateTimeString,\n shouldPreserveClearableSpace,\n trackFocusClearBtn,\n trackFocusLastSegment,\n withAnyPicker,\n ],\n );\n\n const onGlobalKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>) => {\n const { key, ctrlKey, metaKey } = e;\n if ((ctrlKey || metaKey) && key === ';') {\n onFillWithCurrentDateKeys(e);\n }\n if ((ctrlKey || metaKey) && (key === 'Delete' || key === 'Backspace')) handleClearAll(e);\n },\n [handleClearAll, onFillWithCurrentDateKeys],\n );\n\n return useMemo(\n () => ({\n onFillWithCurrentDateKeys,\n onGlobalKeyDown,\n }),\n [onFillWithCurrentDateKeys, onGlobalKeyDown],\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-nested-ternary */\n/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useCallback, useMemo } from 'react';\nimport type { useChangeHandlers } from './useChangeHandlers.js';\nimport type { useGetPropsBasedOnType } from './useGetPropsBasedOnType.js';\nimport type { useGetReferences } from './useGetReferences.js';\nimport type { useGetFlags } from './useGetFlags.js';\nimport type { useFocusTracker } from './useFocusTracker.js';\nimport { getValidationDateStringMetaInfo, getDateStringFromDay, getTimeStringFromDay } from '../utils/dateHelpers.js';\nimport { getValidationTimeStringMetaInfo } from '../utils/timeHelpers.js';\nimport { deconstructValuesFromDateString, deconstructValuesFromTimeString } from '../utils/stringHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\n\ninterface Config {\n propsBasedOnType: ReturnType<typeof useGetPropsBasedOnType>;\n changeHandlers: ReturnType<typeof useChangeHandlers>;\n DOMRefs: ReturnType<typeof useGetReferences>;\n flags: ReturnType<typeof useGetFlags>;\n focusTrackers: ReturnType<typeof useFocusTracker>;\n}\n\nexport const useGlobalKeyHandlers = ({ propsBasedOnType, changeHandlers, focusTrackers, flags }: Config) => {\n const {\n getIsOutOfRangeDay,\n getIsDisabledDay,\n getIsDisabledTime,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n } = propsBasedOnType;\n const { handleChangeComposedDateTimeString, handleClearAll } = changeHandlers;\n const { trackFocusLastSegment, trackFocusClearBtn } = focusTrackers;\n const { withAnyPicker, shouldPreserveClearableSpace } = flags;\n\n const onFillWithCurrentDateKeys = useCallback(\n (\n e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = { isAutomaticFillTrigger: true },\n ) => {\n const now = new Date();\n const nowDateString = getDateStringFromDay(now);\n const nowTimeString = getTimeStringFromDay(now);\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(nowDateString, getIsOutOfRangeDay, getIsDisabledDay),\n ...getValidationTimeStringMetaInfo(nowTimeString, getIsDisabledTime),\n newDateString: nowDateString,\n };\n const { month, day, year } = deconstructValuesFromDateString(nowDateString);\n appOnMonthChange(month, e, metaInfo);\n appOnDayChange(day, e, metaInfo);\n appOnYearChange(year, e, metaInfo);\n const { hours, minutes, meridiem } = deconstructValuesFromTimeString(nowTimeString);\n appOnHourChange(hours, e, metaInfo);\n appOnMinuteChange(minutes, e, metaInfo);\n appOnMeridiemChange(meridiem, e, metaInfo);\n handleChangeComposedDateTimeString(nowDateString, nowTimeString, finalMetaInfo);\n // trackFocusLastSegment is not enough here,\n // after this key combination the value may change from empty to non-empty\n // when non empty the last segment may become the clear-btn (clear btn only appears when non empty)\n // as such this must be micro-managed here\n if (shouldPreserveClearableSpace && !withAnyPicker) trackFocusClearBtn();\n else trackFocusLastSegment();\n },\n [\n appOnDayChange,\n appOnHourChange,\n appOnMeridiemChange,\n appOnMinuteChange,\n appOnMonthChange,\n appOnYearChange,\n getIsDisabledDay,\n getIsDisabledTime,\n getIsOutOfRangeDay,\n handleChangeComposedDateTimeString,\n shouldPreserveClearableSpace,\n trackFocusClearBtn,\n trackFocusLastSegment,\n withAnyPicker,\n ],\n );\n\n const onGlobalKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>) => {\n const { key, ctrlKey, metaKey } = e;\n if ((ctrlKey || metaKey) && key === ';') {\n onFillWithCurrentDateKeys(e);\n }\n if ((ctrlKey || metaKey) && (key === 'Delete' || key === 'Backspace')) handleClearAll(e);\n },\n [handleClearAll, onFillWithCurrentDateKeys],\n );\n\n return useMemo(\n () => ({\n onFillWithCurrentDateKeys,\n onGlobalKeyDown,\n }),\n [onFillWithCurrentDateKeys, onGlobalKeyDown],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACKvB,SAAS,aAAa,eAAe;AAMrC,SAAS,iCAAiC,sBAAsB,4BAA4B;AAC5F,SAAS,uCAAuC;AAChD,SAAS,iCAAiC,uCAAuC;AAW1E,MAAM,uBAAuB,CAAC,EAAE,kBAAkB,gBAAgB,eAAe,MAAM,MAAc;AAC1G,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,oCAAoC,eAAe,IAAI;AAC/D,QAAM,EAAE,uBAAuB,mBAAmB,IAAI;AACtD,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AgB,yBAAyB;AAAA,EAC5C;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,2BAA2B,eAAe;AAAA,EAC7C;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
|
-
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards";
|
|
4
|
-
import { dateTimeToTime, dateTimeToDate } from "../utils/stringHelpers";
|
|
3
|
+
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards.js";
|
|
4
|
+
import { dateTimeToTime, dateTimeToDate } from "../utils/stringHelpers.js";
|
|
5
5
|
const useRelevantValueFromProps = (props) => {
|
|
6
6
|
const dateStringFromProps = useMemo(() => {
|
|
7
7
|
if (getIsDateTime(props))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useRelevantValueFromProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nimport { dateTimeToTime, dateTimeToDate } from '../utils/stringHelpers';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nexport const useRelevantValueFromProps = (props: DSControlledDateTimePickerT.InternalProps) => {\n const dateStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToDate(props.dateTime) : '__/__/____';\n if (getIsDate(props)) return props.date !== '' ? props.date : '__/__/____';\n return '__/__/____';\n }, [props]);\n const timeStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToTime(props.dateTime) : '__:__ __';\n if (getIsTime(props)) return props.time !== '' ? props.time : '__:__ __';\n return '__:__ __';\n }, [props]);\n\n // don't use tempDateString to trigger useEffect for onDateChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempDateString, setTempDateString] = useState(dateStringFromProps);\n // don't use tempTimeString to trigger useEffect for onTimeChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempTimeString, setTimeString] = useState(timeStringFromProps);\n\n return useMemo(\n () => ({\n dateStringFromProps,\n timeStringFromProps,\n tempDateString,\n setTempDateString,\n tempTimeString,\n setTimeString,\n }),\n [dateStringFromProps, tempDateString, tempTimeString, timeStringFromProps],\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards.js';\nimport { dateTimeToTime, dateTimeToDate } from '../utils/stringHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\n\nexport const useRelevantValueFromProps = (props: DSControlledDateTimePickerT.InternalProps) => {\n const dateStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToDate(props.dateTime) : '__/__/____';\n if (getIsDate(props)) return props.date !== '' ? props.date : '__/__/____';\n return '__/__/____';\n }, [props]);\n const timeStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToTime(props.dateTime) : '__:__ __';\n if (getIsTime(props)) return props.time !== '' ? props.time : '__:__ __';\n return '__:__ __';\n }, [props]);\n\n // don't use tempDateString to trigger useEffect for onDateChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempDateString, setTempDateString] = useState(dateStringFromProps);\n // don't use tempTimeString to trigger useEffect for onTimeChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempTimeString, setTimeString] = useState(timeStringFromProps);\n\n return useMemo(\n () => ({\n dateStringFromProps,\n timeStringFromProps,\n tempDateString,\n setTempDateString,\n tempTimeString,\n setTimeString,\n }),\n [dateStringFromProps, tempDateString, tempTimeString, timeStringFromProps],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,SAAS,gBAAgB;AAClC,SAAS,eAAe,WAAW,iBAAiB;AACpD,SAAS,gBAAgB,sBAAsB;AAGxC,MAAM,4BAA4B,CAAC,UAAqD;AAC7F,QAAM,sBAAsB,QAAQ,MAAM;AACxC,QAAI,cAAc,KAAK;AAAG,aAAO,MAAM,aAAa,KAAK,eAAe,MAAM,QAAQ,IAAI;AAC1F,QAAI,UAAU,KAAK;AAAG,aAAO,MAAM,SAAS,KAAK,MAAM,OAAO;AAC9D,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AACV,QAAM,sBAAsB,QAAQ,MAAM;AACxC,QAAI,cAAc,KAAK;AAAG,aAAO,MAAM,aAAa,KAAK,eAAe,MAAM,QAAQ,IAAI;AAC1F,QAAI,UAAU,KAAK;AAAG,aAAO,MAAM,SAAS,KAAK,MAAM,OAAO;AAC9D,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAKV,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,mBAAmB;AAIxE,QAAM,CAAC,gBAAgB,aAAa,IAAI,SAAS,mBAAmB;AAEpE,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,qBAAqB,gBAAgB,gBAAgB,mBAAmB;AAAA,EAC3E;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
dateTimeToTime,
|
|
6
6
|
isValidTimeString,
|
|
7
7
|
deconstructValuesFromDateString
|
|
8
|
-
} from "../utils/stringHelpers";
|
|
9
|
-
import { convertToPositiveNumberIfPossible } from "../utils/numberHelpers";
|
|
10
|
-
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards";
|
|
8
|
+
} from "../utils/stringHelpers.js";
|
|
9
|
+
import { convertToPositiveNumberIfPossible } from "../utils/numberHelpers.js";
|
|
10
|
+
import { getIsDateTime, getIsDate, getIsTime } from "../utils/typeGuards.js";
|
|
11
11
|
const PREPEND = `ControlledDateTimePicker:
|
|
12
12
|
Invalid configuration detected::
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport type { DSControlledDateTimePickerT } from '../propTypes';\nimport {\n dateTimeToDate,\n isValidDateString,\n dateTimeToTime,\n isValidTimeString,\n deconstructValuesFromDateString,\n} from '../utils/stringHelpers';\nimport { convertToPositiveNumberIfPossible } from '../utils/numberHelpers';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nconst PREPEND = `ControlledDateTimePicker:\n Invalid configuration detected::\n \n `;\nconst NOT_A_DEFECT = '';\n// '\\n\\n\\t\\tThis is not a defect, please check\\n\\n\\t\\thttps://qa.dimsum.rd.elliemae.io/?path=/story/components-desktop-components-d-controlledform-date-time-picker--basic\\n\\n\\t\\tfor instructions on how to use the component correctly\\n\\n';\nconst INLINE_RECEIVED_PREPEND = `\n\n Received:`;\nconst throwInvalidDateTimeError = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"dateTime\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidDaterror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"date\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidTimerror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"time\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledDateError = (date: string, onDateChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date selector while providing a non-string \"date\" or providing a non-function to \"onDateChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n date: ${date}(${typeof date})\n onDateChange: (${typeof onDateChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledTimeError = (time: string, onTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a time selector while providing a non-string \"time\" or providing a non-function to \"onTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n time: ${time}(${typeof time})\n onTimeChange: (${typeof onTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\n\nconst throwUncontrolledDateTimeError = (dateTime: string, onDateTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date-time selector while providing a non-string \"dateTime\" or providing a non-function to \"onDateTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n dateTime: ${dateTime}(${typeof dateTime})\n onDateTimeChange: (${typeof onDateTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidEmptyPickerStartingMonthError = (emptyPickerStartingMonth: string) => {\n throw new Error(\n `${PREPEND}the provided emptyPickerStartingMonth props is invalid. please provide a string with the format mm/__/yyyy, (mm 01~12, yyyy 0001~9999) \n\n Received:\n ${emptyPickerStartingMonth}(${typeof emptyPickerStartingMonth})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidOnCalendarOpenFocusedDayError = (onCalendarOpenFocusedDay: string) => {\n throw new Error(\n `${PREPEND}the provided onCalendarOpenFocusedDay props is invalid. please provide a string with the format mm/dd/yyyy, (mm 01~12, dd 01~31, yyyy 0001~9999) \n\n Received:\n ${onCalendarOpenFocusedDay}(${typeof onCalendarOpenFocusedDay})\n ${NOT_A_DEFECT}`,\n );\n};\nexport const useValidateProps = (props: DSControlledDateTimePickerT.Props): void => {\n // validate date-related props\n if (getIsDateTime(props) || getIsDate(props)) {\n const { emptyPickerStartingMonth, onCalendarOpenFocusedDay } = props;\n\n // validate generic use-cases\n if (emptyPickerStartingMonth) {\n const { month: stringMonthVal, year: stringYearVal } = deconstructValuesFromDateString(emptyPickerStartingMonth);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || yearNum <= 0 || yearNum > 9999)\n throwInvalidEmptyPickerStartingMonthError(emptyPickerStartingMonth);\n }\n if (onCalendarOpenFocusedDay) {\n const {\n month: stringMonthVal,\n day: stringDayVal,\n year: stringYearVal,\n } = deconstructValuesFromDateString(onCalendarOpenFocusedDay);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const dayNum = convertToPositiveNumberIfPossible(stringDayVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || dayNum <= 0 || dayNum > 31 || yearNum <= 0 || yearNum > 9999)\n throwInvalidOnCalendarOpenFocusedDayError(onCalendarOpenFocusedDay);\n }\n }\n // validate full datetime cases\n if (getIsDateTime(props)) {\n const { dateTime, onDateTimeChange } = props;\n if (typeof dateTime !== 'string' || typeof onDateTimeChange !== 'function')\n throwUncontrolledDateTimeError(dateTime, onDateTimeChange);\n else if (!isValidDateString(dateTimeToDate(dateTime)) || !isValidTimeString(dateTimeToTime(dateTime)))\n throwInvalidDateTimeError(dateTimeToTime(dateTime));\n }\n\n // validate date-only cases\n if (getIsDate(props)) {\n const { date, onDateChange } = props;\n if (typeof date !== 'string' || typeof onDateChange !== 'function') throwUncontrolledDateError(date, onDateChange);\n else if (!isValidDateString(date)) throwInvalidDaterror(date);\n }\n\n // validate time-only cases\n\n if (getIsTime(props)) {\n const { time, onTimeChange } = props;\n if (typeof time !== 'string' || typeof onTimeChange !== 'function') throwUncontrolledTimeError(time, onTimeChange);\n else if (!isValidTimeString(time)) throwInvalidTimerror(time);\n }\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\nimport {\n dateTimeToDate,\n isValidDateString,\n dateTimeToTime,\n isValidTimeString,\n deconstructValuesFromDateString,\n} from '../utils/stringHelpers.js';\nimport { convertToPositiveNumberIfPossible } from '../utils/numberHelpers.js';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards.js';\nconst PREPEND = `ControlledDateTimePicker:\n Invalid configuration detected::\n \n `;\nconst NOT_A_DEFECT = '';\n// '\\n\\n\\t\\tThis is not a defect, please check\\n\\n\\t\\thttps://qa.dimsum.rd.elliemae.io/?path=/story/components-desktop-components-d-controlledform-date-time-picker--basic\\n\\n\\t\\tfor instructions on how to use the component correctly\\n\\n';\nconst INLINE_RECEIVED_PREPEND = `\n\n Received:`;\nconst throwInvalidDateTimeError = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"dateTime\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidDaterror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"date\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidTimerror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"time\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledDateError = (date: string, onDateChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date selector while providing a non-string \"date\" or providing a non-function to \"onDateChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n date: ${date}(${typeof date})\n onDateChange: (${typeof onDateChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledTimeError = (time: string, onTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a time selector while providing a non-string \"time\" or providing a non-function to \"onTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n time: ${time}(${typeof time})\n onTimeChange: (${typeof onTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\n\nconst throwUncontrolledDateTimeError = (dateTime: string, onDateTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date-time selector while providing a non-string \"dateTime\" or providing a non-function to \"onDateTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n dateTime: ${dateTime}(${typeof dateTime})\n onDateTimeChange: (${typeof onDateTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidEmptyPickerStartingMonthError = (emptyPickerStartingMonth: string) => {\n throw new Error(\n `${PREPEND}the provided emptyPickerStartingMonth props is invalid. please provide a string with the format mm/__/yyyy, (mm 01~12, yyyy 0001~9999) \n\n Received:\n ${emptyPickerStartingMonth}(${typeof emptyPickerStartingMonth})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidOnCalendarOpenFocusedDayError = (onCalendarOpenFocusedDay: string) => {\n throw new Error(\n `${PREPEND}the provided onCalendarOpenFocusedDay props is invalid. please provide a string with the format mm/dd/yyyy, (mm 01~12, dd 01~31, yyyy 0001~9999) \n\n Received:\n ${onCalendarOpenFocusedDay}(${typeof onCalendarOpenFocusedDay})\n ${NOT_A_DEFECT}`,\n );\n};\nexport const useValidateProps = (props: DSControlledDateTimePickerT.Props): void => {\n // validate date-related props\n if (getIsDateTime(props) || getIsDate(props)) {\n const { emptyPickerStartingMonth, onCalendarOpenFocusedDay } = props;\n\n // validate generic use-cases\n if (emptyPickerStartingMonth) {\n const { month: stringMonthVal, year: stringYearVal } = deconstructValuesFromDateString(emptyPickerStartingMonth);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || yearNum <= 0 || yearNum > 9999)\n throwInvalidEmptyPickerStartingMonthError(emptyPickerStartingMonth);\n }\n if (onCalendarOpenFocusedDay) {\n const {\n month: stringMonthVal,\n day: stringDayVal,\n year: stringYearVal,\n } = deconstructValuesFromDateString(onCalendarOpenFocusedDay);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const dayNum = convertToPositiveNumberIfPossible(stringDayVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || dayNum <= 0 || dayNum > 31 || yearNum <= 0 || yearNum > 9999)\n throwInvalidOnCalendarOpenFocusedDayError(onCalendarOpenFocusedDay);\n }\n }\n // validate full datetime cases\n if (getIsDateTime(props)) {\n const { dateTime, onDateTimeChange } = props;\n if (typeof dateTime !== 'string' || typeof onDateTimeChange !== 'function')\n throwUncontrolledDateTimeError(dateTime, onDateTimeChange);\n else if (!isValidDateString(dateTimeToDate(dateTime)) || !isValidTimeString(dateTimeToTime(dateTime)))\n throwInvalidDateTimeError(dateTimeToTime(dateTime));\n }\n\n // validate date-only cases\n if (getIsDate(props)) {\n const { date, onDateChange } = props;\n if (typeof date !== 'string' || typeof onDateChange !== 'function') throwUncontrolledDateError(date, onDateChange);\n else if (!isValidDateString(date)) throwInvalidDaterror(date);\n }\n\n // validate time-only cases\n\n if (getIsTime(props)) {\n const { time, onTimeChange } = props;\n if (typeof time !== 'string' || typeof onTimeChange !== 'function') throwUncontrolledTimeError(time, onTimeChange);\n else if (!isValidTimeString(time)) throwInvalidTimerror(time);\n }\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yCAAyC;AAClD,SAAS,eAAe,WAAW,iBAAiB;AACpD,MAAM,UAAU;AAAA;AAAA;AAAA;AAIhB,MAAM,eAAe;AAErB,MAAM,0BAA0B;AAAA;AAAA;AAGhC,MAAM,4BAA4B,CAAC,iBAAyB;AAC1D,QAAM,IAAI;AAAA,IACR,GAAG,wFAAwF,0BAA0B,gBAAgB,OAAO,gBAAgB;AAAA,EAC9J;AACF;AACA,MAAM,uBAAuB,CAAC,iBAAyB;AACrD,QAAM,IAAI;AAAA,IACR,GAAG,oFAAoF,0BAA0B,gBAAgB,OAAO,gBAAgB;AAAA,EAC1J;AACF;AACA,MAAM,uBAAuB,CAAC,iBAAyB;AACrD,QAAM,IAAI;AAAA,IACR,GAAG,oFAAoF,0BAA0B,gBAAgB,OAAO,gBAAgB;AAAA,EAC1J;AACF;AACA,MAAM,6BAA6B,CAAC,MAAc,iBAA0B;AAC1E,QAAM,IAAI;AAAA,IACR,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,YAIK,QAAQ,OAAO;AAAA,qBACN,OAAO;AAAA,IACxB;AAAA,EACF;AACF;AACA,MAAM,6BAA6B,CAAC,MAAc,iBAA0B;AAC1E,QAAM,IAAI;AAAA,IACR,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,YAIK,QAAQ,OAAO;AAAA,qBACN,OAAO;AAAA,IACxB;AAAA,EACF;AACF;AAEA,MAAM,iCAAiC,CAAC,UAAkB,qBAA8B;AACtF,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AA+B,UAAU,gBAAgB;AAAA,aAClD,CAAC,kBAAkB,eAAe,QAAQ,CAAC,KAAK,CAAC,kBAAkB,eAAe,QAAQ,CAAC;AAClG,gCAA0B,eAAe,QAAQ,CAAC;AAAA,EACtD;AAGA,MAAI,UAAU,KAAK,GAAG;AACpB,UAAM,EAAE,MAAM,aAAa,IAAI;AAC/B,QAAI,OAAO,SAAS,YAAY,OAAO,iBAAiB;AAAY,iCAA2B,MAAM,YAAY;AAAA,aACxG,CAAC,kBAAkB,IAAI;AAAG,2BAAqB,IAAI;AAAA,EAC9D;AAIA,MAAI,UAAU,KAAK,GAAG;AACpB,UAAM,EAAE,MAAM,aAAa,IAAI;AAC/B,QAAI,OAAO,SAAS,YAAY,OAAO,iBAAiB;AAAY,iCAA2B,MAAM,YAAY;AAAA,aACxG,CAAC,kBAAkB,IAAI;AAAG,2BAAqB,IAAI;AAAA,EAC9D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { DSControlledDateTimePickerWithSchema, DSControlledDateTimePicker } from "./ControlledDateTimePicker";
|
|
3
|
-
import { ControlledDateTimePickerDatatestid } from "./ControlledDateTimePickerDatatestid";
|
|
4
|
-
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from "./ControlledDateTimePickerTypes";
|
|
5
|
-
import { deconstructValuesFromDateString, prependStringWithPlaceHolders } from "./utils/stringHelpers";
|
|
6
|
-
import { getValidationDateTimeStringMetaInfo } from "./utils/dateTimeHelpers";
|
|
2
|
+
import { DSControlledDateTimePickerWithSchema, DSControlledDateTimePicker } from "./ControlledDateTimePicker.js";
|
|
3
|
+
import { ControlledDateTimePickerDatatestid } from "./ControlledDateTimePickerDatatestid.js";
|
|
4
|
+
import { CONTROLLED_DATE_TIME_PICKER_TYPES } from "./ControlledDateTimePickerTypes.js";
|
|
5
|
+
import { deconstructValuesFromDateString, prependStringWithPlaceHolders } from "./utils/stringHelpers.js";
|
|
6
|
+
import { getValidationDateTimeStringMetaInfo } from "./utils/dateTimeHelpers.js";
|
|
7
7
|
import {
|
|
8
8
|
getValidationDateStringMetaInfo,
|
|
9
9
|
getDateStringFromDay,
|
|
10
10
|
getDayFromDateString,
|
|
11
11
|
getDateValuesFromDate
|
|
12
|
-
} from "./utils/dateHelpers";
|
|
13
|
-
import { getValidationTimeStringMetaInfo } from "./utils/timeHelpers";
|
|
14
|
-
import { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from "./exported-related/theming";
|
|
15
|
-
import {} from "./propTypes";
|
|
12
|
+
} from "./utils/dateHelpers.js";
|
|
13
|
+
import { getValidationTimeStringMetaInfo } from "./utils/timeHelpers.js";
|
|
14
|
+
import { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from "./exported-related/theming.js";
|
|
15
|
+
import {} from "./propTypes.js";
|
|
16
16
|
export {
|
|
17
17
|
CONTROLLED_DATE_TIME_PICKER_TYPES,
|
|
18
18
|
ControlledDateTimePickerDatatestid,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSControlledDateTimePickerWithSchema, DSControlledDateTimePicker } from './ControlledDateTimePicker';\nexport { ControlledDateTimePickerDatatestid } from './ControlledDateTimePickerDatatestid';\nexport { CONTROLLED_DATE_TIME_PICKER_TYPES } from './ControlledDateTimePickerTypes';\nexport { deconstructValuesFromDateString, prependStringWithPlaceHolders } from './utils/stringHelpers';\nexport { getValidationDateTimeStringMetaInfo } from './utils/dateTimeHelpers';\nexport {\n getValidationDateStringMetaInfo,\n getDateStringFromDay,\n getDayFromDateString,\n getDateValuesFromDate,\n} from './utils/dateHelpers';\nexport { getValidationTimeStringMetaInfo } from './utils/timeHelpers';\nexport { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from './exported-related/theming';\nexport { type DSControlledDateTimePickerT } from './propTypes';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSControlledDateTimePickerWithSchema, DSControlledDateTimePicker } from './ControlledDateTimePicker.js';\nexport { ControlledDateTimePickerDatatestid } from './ControlledDateTimePickerDatatestid.js';\nexport { CONTROLLED_DATE_TIME_PICKER_TYPES } from './ControlledDateTimePickerTypes.js';\nexport { deconstructValuesFromDateString, prependStringWithPlaceHolders } from './utils/stringHelpers.js';\nexport { getValidationDateTimeStringMetaInfo } from './utils/dateTimeHelpers.js';\nexport {\n getValidationDateStringMetaInfo,\n getDateStringFromDay,\n getDayFromDateString,\n getDateValuesFromDate,\n} from './utils/dateHelpers.js';\nexport { getValidationTimeStringMetaInfo } from './utils/timeHelpers.js';\nexport { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from './exported-related/theming.js';\nexport { type DSControlledDateTimePickerT } from './propTypes.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC,kCAAkC;AACjF,SAAS,0CAA0C;AACnD,SAAS,yCAAyC;AAClD,SAAS,iCAAiC,qCAAqC;AAC/E,SAAS,2CAA2C;AACpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uCAAuC;AAChD,SAAS,gCAAgC,uCAAuC;AAChF,eAAiD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useContext } from "react";
|
|
3
|
+
import React2, { useContext } from "react";
|
|
4
4
|
import { CloseMedium } from "@elliemae/ds-icons";
|
|
5
5
|
import { DSIconColors } from "@elliemae/ds-icon";
|
|
6
6
|
import { BUTTON_SIZES } from "@elliemae/ds-button";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { getPropsPerDatatestid } from "@elliemae/ds-props-helpers";
|
|
8
|
+
import { StyledClearButton } from "../Styleds.js";
|
|
9
|
+
import { ControlledDateTimePickerDatatestid } from "../../ControlledDateTimePickerDatatestid.js";
|
|
10
|
+
import { ControlledDateTimePickerContext } from "../../ControlledDateTimePickerCTX.js";
|
|
11
|
+
import { useClearButton } from "./useClearButton.js";
|
|
11
12
|
const ClearButton = () => {
|
|
12
13
|
const { onClearClick, onClearButtonKeyDown, clearButtonRef, withClearBtn } = useClearButton();
|
|
13
14
|
const styledsAttrs = {
|
|
14
15
|
shouldDisplay: withClearBtn
|
|
15
16
|
};
|
|
16
|
-
const { latestInteractionRegion, currFocusDescriber } = useContext(ControlledDateTimePickerContext);
|
|
17
|
+
const { latestInteractionRegion, currFocusDescriber, props } = useContext(ControlledDateTimePickerContext);
|
|
18
|
+
const ariaAndDataProps = React2.useMemo(
|
|
19
|
+
() => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CLEAR_BUTTON]),
|
|
20
|
+
[props]
|
|
21
|
+
);
|
|
17
22
|
return /* @__PURE__ */ jsx(
|
|
18
23
|
StyledClearButton,
|
|
19
24
|
{
|
|
@@ -30,6 +35,7 @@ const ClearButton = () => {
|
|
|
30
35
|
onKeyDown: onClearButtonKeyDown,
|
|
31
36
|
type: "button",
|
|
32
37
|
...styledsAttrs,
|
|
38
|
+
...ariaAndDataProps,
|
|
33
39
|
children: /* @__PURE__ */ jsx(CloseMedium, { color: DSIconColors.PRIMARY })
|
|
34
40
|
}
|
|
35
41
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/ClearButton/ClearButton.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport React, { useContext } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { StyledClearButton } from '../Styleds';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX';\nimport { useClearButton } from './useClearButton';\n\nexport const ClearButton = (): JSX.Element => {\n const { onClearClick, onClearButtonKeyDown, clearButtonRef, withClearBtn } = useClearButton();\n const styledsAttrs = {\n shouldDisplay: withClearBtn,\n };\n const { latestInteractionRegion, currFocusDescriber } = useContext(ControlledDateTimePickerContext);\n\n return (\n <StyledClearButton\n aria-label=\"clear selected date\"\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n data-testid={ControlledDateTimePickerDatatestid.CLEAR_BUTTON}\n innerRef={(DomElem: HTMLButtonElement) => {\n clearButtonRef.current = DomElem;\n if (latestInteractionRegion === 'clear-btn' && currFocusDescriber === 'clear-btn') DomElem?.focus?.();\n }}\n onClick={onClearClick}\n onKeyDown={onClearButtonKeyDown}\n type=\"button\"\n {...styledsAttrs}\n >\n <CloseMedium color={DSIconColors.PRIMARY} />\n </StyledClearButton>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport React, { useContext } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { StyledClearButton } from '../Styleds.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport { useClearButton } from './useClearButton.js';\n\nexport const ClearButton = (): JSX.Element => {\n const { onClearClick, onClearButtonKeyDown, clearButtonRef, withClearBtn } = useClearButton();\n const styledsAttrs = {\n shouldDisplay: withClearBtn,\n };\n const { latestInteractionRegion, currFocusDescriber, props } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CLEAR_BUTTON]),\n [props],\n );\n\n return (\n <StyledClearButton\n aria-label=\"clear selected date\"\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n data-testid={ControlledDateTimePickerDatatestid.CLEAR_BUTTON}\n innerRef={(DomElem: HTMLButtonElement) => {\n clearButtonRef.current = DomElem;\n if (latestInteractionRegion === 'clear-btn' && currFocusDescriber === 'clear-btn') DomElem?.focus?.();\n }}\n onClick={onClearClick}\n onKeyDown={onClearButtonKeyDown}\n type=\"button\"\n {...styledsAttrs}\n {...ariaAndDataProps}\n >\n <CloseMedium color={DSIconColors.PRIMARY} />\n </StyledClearButton>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsCjB;AArCN,OAAOA,UAAS,kBAAkB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;AAClC,SAAS,0CAA0C;AACnD,SAAS,uCAAuC;AAChD,SAAS,sBAAsB;AAExB,MAAM,cAAc,MAAmB;AAC5C,QAAM,EAAE,cAAc,sBAAsB,gBAAgB,aAAa,IAAI,eAAe;AAC5F,QAAM,eAAe;AAAA,IACnB,eAAe;AAAA,EACjB;AACA,QAAM,EAAE,yBAAyB,oBAAoB,MAAM,IAAI,WAAW,+BAA+B;AACzG,QAAM,mBAAmBA,OAAM;AAAA,IAC7B,MAAM,sBAAsB,MAAM,mCAAmC,aAAa;AAAA,IAClF,CAAC,KAAK;AAAA,EACR;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,YAAW;AAAA,MACX,MAAM,aAAa;AAAA,MACnB,eAAa,mCAAmC;AAAA,MAChD,UAAU,CAAC,YAA+B;AACxC,uBAAe,UAAU;AACzB,YAAI,4BAA4B,eAAe,uBAAuB;AAAa,mBAAS,QAAQ;AAAA,MACtG;AAAA,MACA,SAAS;AAAA,MACT,WAAW;AAAA,MACX,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ,8BAAC,eAAY,OAAO,aAAa,SAAS;AAAA;AAAA,EAC5C;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|