@elliemae/ds-form-date-time-picker 3.16.0-next.11 → 3.16.0-next.13
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 +4 -0
- package/dist/cjs/ControlledDateTimePicker.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerCTX.js +4 -0
- package/dist/cjs/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerDatatestid.js +4 -0
- package/dist/cjs/ControlledDateTimePickerDatatestid.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerTypes.js +4 -0
- package/dist/cjs/ControlledDateTimePickerTypes.js.map +1 -1
- package/dist/cjs/config/useChangeHandlers.js +5 -0
- package/dist/cjs/config/useChangeHandlers.js.map +1 -1
- package/dist/cjs/config/useControlledDateTimePicker.js +5 -0
- package/dist/cjs/config/useControlledDateTimePicker.js.map +1 -1
- package/dist/cjs/config/useFocusTracker.js +4 -0
- package/dist/cjs/config/useFocusTracker.js.map +1 -1
- package/dist/cjs/config/useGetDestructuredValues.js +8 -1
- package/dist/cjs/config/useGetDestructuredValues.js.map +1 -1
- package/dist/cjs/config/useGetFlags.js +4 -0
- package/dist/cjs/config/useGetFlags.js.map +1 -1
- package/dist/cjs/config/useGetPropsBasedOnType.js +5 -1
- package/dist/cjs/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/cjs/config/useGetPropsWithDefault.js +4 -0
- package/dist/cjs/config/useGetPropsWithDefault.js.map +1 -1
- package/dist/cjs/config/useGetReferences.js +4 -0
- package/dist/cjs/config/useGetReferences.js.map +1 -1
- package/dist/cjs/config/useGlobalKeyHandlers.js +5 -1
- package/dist/cjs/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/cjs/config/useRelevantValueFromProps.js +4 -0
- package/dist/cjs/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js +4 -0
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/exported-related/theming.js +4 -0
- package/dist/cjs/exported-related/theming.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parts/ClearButton/ClearButton.js +4 -0
- package/dist/cjs/parts/ClearButton/ClearButton.js.map +1 -1
- package/dist/cjs/parts/ClearButton/useClearButton.js +4 -0
- package/dist/cjs/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/cjs/parts/ControlledDateTimePickerContent.js +4 -0
- package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +1 -1
- package/dist/cjs/parts/DateInputs/DDInput.js +4 -0
- package/dist/cjs/parts/DateInputs/DDInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/DateInputs.js +4 -0
- package/dist/cjs/parts/DateInputs/DateInputs.js.map +1 -1
- package/dist/cjs/parts/DateInputs/MMInput.js +4 -0
- package/dist/cjs/parts/DateInputs/MMInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/YYYYInput.js +4 -0
- package/dist/cjs/parts/DateInputs/YYYYInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/useDateInputs.js +4 -0
- package/dist/cjs/parts/DateInputs/useDateInputs.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Day.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/Day.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js +5 -0
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js +4 -0
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +4 -0
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/PickersIcons.js +4 -0
- package/dist/cjs/parts/Pickers/PickersIcons.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +4 -0
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Styleds.js +4 -0
- package/dist/cjs/parts/Styleds.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/HHInput.js +4 -0
- package/dist/cjs/parts/TimeInputs/HHInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js +4 -0
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/MinutesInput.js +4 -0
- package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/TimeInputs.js +4 -0
- package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js +4 -0
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/cjs/parts/config.js +4 -0
- package/dist/cjs/parts/config.js.map +1 -1
- package/dist/cjs/propTypes.js +4 -0
- package/dist/cjs/propTypes.js.map +1 -1
- package/dist/cjs/sharedTypes.js +4 -0
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/cjs/tests/custom-props/customProps.js +4 -0
- package/dist/cjs/tests/custom-props/customProps.js.map +1 -1
- package/dist/cjs/utils/constants.js +4 -0
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/cjs/utils/dateHelpers.js +4 -0
- package/dist/cjs/utils/dateHelpers.js.map +1 -1
- package/dist/cjs/utils/dateTimeHelpers.js +4 -0
- package/dist/cjs/utils/dateTimeHelpers.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js +4 -0
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js +4 -0
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js +4 -0
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/cjs/utils/hooks/useOnClickOutside.js +4 -0
- package/dist/cjs/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/cjs/utils/numberHelpers.js +4 -0
- package/dist/cjs/utils/numberHelpers.js.map +1 -1
- package/dist/cjs/utils/stringHelpers.js +7 -0
- package/dist/cjs/utils/stringHelpers.js.map +1 -1
- package/dist/cjs/utils/timeHelpers.js +4 -0
- package/dist/cjs/utils/timeHelpers.js.map +1 -1
- package/dist/cjs/utils/typeGuards.js +4 -0
- package/dist/cjs/utils/typeGuards.js.map +1 -1
- package/dist/esm/config/useChangeHandlers.js +1 -0
- package/dist/esm/config/useChangeHandlers.js.map +1 -1
- package/dist/esm/config/useControlledDateTimePicker.js +1 -0
- package/dist/esm/config/useControlledDateTimePicker.js.map +1 -1
- package/dist/esm/config/useGetDestructuredValues.js +4 -1
- package/dist/esm/config/useGetDestructuredValues.js.map +1 -1
- package/dist/esm/config/useGetPropsBasedOnType.js +1 -1
- package/dist/esm/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/esm/config/useGlobalKeyHandlers.js +1 -1
- package/dist/esm/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/esm/parts/ClearButton/ClearButton.js.map +1 -1
- package/dist/esm/parts/ControlledDateTimePickerContent.js.map +1 -1
- package/dist/esm/parts/DateInputs/DateInputs.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarContent.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarDaysList.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarHead.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/Day.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js +1 -0
- package/dist/esm/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/esm/parts/Styleds.js.map +1 -1
- package/dist/esm/parts/TimeInputs/TimeInputs.js.map +1 -1
- package/dist/esm/tests/custom-props/customProps.js.map +1 -1
- package/dist/esm/utils/dateHelpers.js.map +1 -1
- package/dist/esm/utils/stringHelpers.js +3 -0
- package/dist/esm/utils/stringHelpers.js.map +1 -1
- package/package.json +11 -11
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useValidateProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAMO;AACP,2BAAkD;AAClD,wBAAoD;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,M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AM,UAAU,KAAK,SAAS,MAAM,WAAW,KAAK,UAAU;AAC7F,kDAA0C,wBAAwB;AAAA,IACtE;AAAA,EACF;AAEA,UAAI,iCAAc,KAAK,GAAG;AACxB,UAAM,EAAE,UAAU,iBAAiB,IAAI;AACvC,QAAI,OAAO,aAAa,YAAY,OAAO,qBAAqB;AAC9D,qCAA+B,UAAU,gBAAgB;AAAA,aAClD,KAAC,4CAAkB,qCAAe,QAAQ,CAAC,KAAK,KAAC,4CAAkB,qCAAe,QAAQ,CAAC;AAClG,oCAA0B,qCAAe,QAAQ,CAAC;AAAA,EACtD;AAGA,UAAI,6BAAU,KAAK,GAAG;AACpB,UAAM,EAAE,MAAM,aAAa,IAAI;AAC/B,QAAI,OAAO,SAAS,YAAY,OAAO,iBAAiB;AAAY,iCAA2B,MAAM,YAAY;AAAA,aACxG,KAAC,wCAAkB,IAAI;AAAG,2BAAqB,IAAI;AAAA,EAC9D;AAIA,UAAI,6BAAU,KAAK,GAAG;AACpB,UAAM,EAAE,MAAM,aAAa,IAAI;AAC/B,QAAI,OAAO,SAAS,YAAY,OAAO,iBAAiB;AAAY,iCAA2B,MAAM,YAAY;AAAA,aACxG,KAAC,wCAAkB,IAAI;AAAG,2BAAqB,IAAI;AAAA,EAC9D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/exported-related/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const DSControlledDateTimePickerName = 'DSControlledDateTimePicker';\n\nexport const DSControlledDateTimePickerSlots = {\n CONTAINER: 'root',\n INPUT: 'field-input',\n PICKER_ICONS: {\n CALENDAR: 'calendar-trigger-icon',\n TIMEWHEEL: 'timewheel-trigger-icon',\n CALENDAR_TIMEWHEEL: 'calendar-timewheel-trigger-icon',\n },\n CALENDAR: {\n DAY_BUTTON: 'calendar-day',\n HEADER_LABEL: 'calendar-header-label',\n HEADER_BUTTON: 'calendar-header-buttons',\n HEADER_WEEKLY_DAY_LIST: 'calendar-header-weekly-day-list',\n },\n TIMEWHEEL: {\n TIME_BUTTON: 'timewheel-time-button',\n TIME_CHANGE_BUTTON: 'timewheel-time-change-button',\n HEADER_LABEL: 'timewheel-header-label',\n },\n CONTEXTUAL_MENU: {\n CALENDAR: 'calendar-context-content-wrapper',\n TIMEWHEEL: 'timewheel-context-content-wrapper',\n CALENDAR_TIMEWHEEL: 'calendar-timewheel-context-content-wrapper',\n },\n FOOTERS: {\n CALENDAR: 'calendar-context-footer',\n TIMEWHEEL: 'timewheel-context-footer',\n CALENDAR_TIMEWHEEL: 'calendar-timewheel-context-footer',\n },\n CONTROLLER_COMPONENT: {\n CALENDAR: 'calendar-controller-wrapper',\n TIMEWHEEL: 'timewheel-controller-wrapper',\n CALENDAR_TIMEWHEEL: 'calendar-timewheel-controller-wrapper',\n },\n CLEAR_BUTTON: 'clear-btn',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iCAAiC;AAEvC,MAAM,kCAAkC;AAAA,EAC7C,WAAW;AAAA,EACX,OAAO;AAAA,EACP,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,WAAW;AAAA,IACX,oBAAoB;AAAA,EACtB;AAAA,EACA,UAAU;AAAA,IACR,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,IACf,wBAAwB;AAAA,EAC1B;AAAA,EACA,WAAW;AAAA,IACT,aAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,cAAc;AAAA,EAChB;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,WAAW;AAAA,IACX,oBAAoB;AAAA,EACtB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AAAA,IACV,WAAW;AAAA,IACX,oBAAoB;AAAA,EACtB;AAAA,EACA,sBAAsB;AAAA,IACpB,UAAU;AAAA,IACV,WAAW;AAAA,IACX,oBAAoB;AAAA,EACtB;AAAA,EACA,cAAc;AAChB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sCAAiF;AACjF,gDAAmD;AACnD,2CAAkD;AAClD,2BAA+E;AAC/E,6BAAoD;AACpD,yBAKO;AACP,yBAAgD;AAChD,qBAAgF;AAChF,uBAAiD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/ClearButton/ClearButton.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCjB;AArCN,mBAAkC;AAClC,sBAA4B;AAC5B,qBAA6B;AAC7B,uBAA6B;AAC7B,8BAAsC;AACtC,qBAAkC;AAClC,gDAAmD;AACnD,yCAAgD;AAChD,4BAA+B;AAExB,MAAM,cAAc,MAAmB;AAC5C,QAAM,EAAE,cAAc,sBAAsB,gBAAgB,aAAa,QAAI,sCAAe;AAC5F,QAAM,eAAe;AAAA,IACnB,eAAe;AAAA,EACjB;AACA,QAAM,EAAE,yBAAyB,oBAAoB,MAAM,QAAI,yBAAW,kEAA+B;AACzG,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,YAAY,CAAC;AAAA,IAClF,CAAC,KAAK;AAAA,EACR;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,YAAW;AAAA,MACX,MAAM,8BAAa;AAAA,MACnB,eAAa,6EAAmC;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,sDAAC,+BAAY,OAAO,4BAAa,SAAS;AAAA;AAAA,EAC5C;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/ClearButton/useClearButton.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { useCallback, useMemo, useContext } from 'react';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\n\ninterface UseOnClearClickR {\n onClearClick: DSControlledDateTimePickerInternalsT.OnDSBtnClick;\n onClearButtonKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown<HTMLButtonElement>;\n clearButtonRef: React.MutableRefObject<HTMLButtonElement | null>;\n withAnyPicker: boolean;\n withClearBtn: boolean;\n}\nexport const useClearButton = (): UseOnClearClickR => {\n const {\n handleClearAll,\n clearButtonRef,\n withAnyPicker,\n withClearBtn,\n withAnyInputs,\n isWithTimeInputs,\n isWithDateInputs,\n trackFocusFirstSegment,\n trackFocusMeridiemInput,\n trackFocusYearInput,\n trackFocusPicker,\n } = useContext(ControlledDateTimePickerContext);\n\n const onClearClick: DSControlledDateTimePickerInternalsT.OnDSBtnClick = useCallback(\n (e) => {\n handleClearAll(e);\n trackFocusFirstSegment();\n },\n [handleClearAll, trackFocusFirstSegment],\n );\n const onHomeKeyDown = useCallback(() => {\n trackFocusFirstSegment();\n }, [trackFocusFirstSegment]);\n const onEndKeyDown = useCallback(() => {\n if (withAnyPicker) trackFocusPicker();\n }, [withAnyPicker, trackFocusPicker]);\n\n const onClearButtonKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown<HTMLButtonElement> = useCallback(\n (e) => {\n const { key } = e;\n const preventDefaultKeys = ['Home', 'End'];\n const stopPropagationKeys = ['Home', 'End'];\n if (preventDefaultKeys.includes(key)) e.preventDefault();\n if (stopPropagationKeys.includes(key)) e.stopPropagation();\n if (key === 'Home') onHomeKeyDown();\n if (key === 'End') onEndKeyDown();\n if (key === 'Backspace' && withAnyInputs) {\n if (isWithTimeInputs) trackFocusMeridiemInput();\n else if (isWithDateInputs) trackFocusYearInput();\n }\n },\n [\n isWithDateInputs,\n isWithTimeInputs,\n onEndKeyDown,\n onHomeKeyDown,\n trackFocusMeridiemInput,\n trackFocusYearInput,\n withAnyInputs,\n ],\n );\n\n return useMemo(\n () => ({ onClearClick, onClearButtonKeyDown, clearButtonRef, withAnyPicker, withClearBtn }),\n [onClearClick, onClearButtonKeyDown, clearButtonRef, withAnyPicker, withClearBtn],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAiD;AACjD,yCAAgD;AAUzC,MAAM,iBAAiB,MAAwB;AACpD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAE9C,QAAM,mBAAkE;AAAA,IACtE,CAAC,MAAM;AACL,qBAAe,CAAC;AAChB,6BAAuB;AAAA,IACzB;AAAA,IACA,CAAC,gBAAgB,sBAAsB;AAAA,EACzC;AACA,QAAM,oBAAgB,0BAAY,MAAM;AACtC,2BAAuB;AAAA,EACzB,GAAG,CAAC,sBAAsB,CAAC;AAC3B,QAAM,mBAAe,0BAAY,MAAM;AACrC,QAAI;AAAe,uBAAiB;AAAA,EACtC,GAAG,CAAC,eAAe,gBAAgB,CAAC;AAEpC,QAAM,2BAA0F;AAAA,IAC9F,CAAC,MAAM;AACL,YAAM,EAAE,IAAI,IAAI;AAChB,YAAM,qBAAqB,CAAC,QAAQ,KAAK;AACzC,YAAM,sBAAsB,CAAC,QAAQ,KAAK;AAC1C,UAAI,mBAAmB,SAAS,GAAG;AAAG,UAAE,eAAe;AACvD,UAAI,oBAAoB,SAAS,GAAG;AAAG,UAAE,gBAAgB;AACzD,UAAI,QAAQ;AAAQ,sBAAc;AAClC,UAAI,QAAQ;AAAO,qBAAa;AAChC,UAAI,QAAQ,eAAe,eAAe;AACxC,YAAI;AAAkB,kCAAwB;AAAA,iBACrC;AAAkB,8BAAoB;AAAA,MACjD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,aAAO;AAAA,IACL,OAAO,EAAE,cAAc,sBAAsB,gBAAgB,eAAe,aAAa;AAAA,IACzF,CAAC,cAAc,sBAAsB,gBAAgB,eAAe,YAAY;AAAA,EAClF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/ControlledDateTimePickerContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerContext } from '../ControlledDateTimePickerCTX.js';\nimport { StyledInputsWrapperGrid } from './Styleds.js';\nimport { DateInputs } from './DateInputs/DateInputs.js';\nimport { TimeInputs } from './TimeInputs/TimeInputs.js';\nimport { PickersIcons } from './Pickers/PickersIcons.js';\nimport { ClearButton } from './ClearButton/ClearButton.js';\nimport { ControlledDateTimePickerDatatestid } from '../ControlledDateTimePickerDatatestid.js';\n\nexport const ControlledDateTimePickerContent = (): JSX.Element => {\n const {\n props,\n props: { hasError, disabled },\n hideDate,\n hideTime,\n withAnyPicker,\n withAnyRightController,\n shouldPreserveClearableSpace,\n isControllerOnly,\n globalAttrs,\n xstyledAttrs,\n onGlobalKeyDown,\n trackFocusResetter,\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CONTAINER]),\n [props],\n );\n\n const styledsAttrs = {\n justPicker: hideDate && hideTime,\n withAnyPicker,\n hasError,\n isControllerOnly,\n };\n\n const mainCols = [];\n if (!hideDate) mainCols.push('auto');\n if (!hideTime) mainCols.push('auto');\n if (withAnyRightController) mainCols.push('auto');\n\n const rightControlCols = [];\n if (shouldPreserveClearableSpace) rightControlCols.push('28px');\n if (withAnyPicker) rightControlCols.push('auto');\n\n return (\n <>\n {/* The <div> element is catching the component-wise global hotkeys, there is no valid aria role for this */}\n {/* eslint-disable-next-line max-len */}\n {/* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <StyledInputsWrapperGrid\n cols={mainCols}\n gutter=\"xxs\"\n pr={!withAnyRightController ? '2px' : '0px'}\n onKeyDown={onGlobalKeyDown}\n disabled={disabled}\n onBlur={trackFocusResetter}\n data-testid={ControlledDateTimePickerDatatestid.CONTAINER}\n {...styledsAttrs}\n {...ariaAndDataProps}\n {...globalAttrs}\n {...xstyledAttrs}\n >\n {hideDate ? null : <DateInputs />}\n {hideTime ? null : <TimeInputs />}\n {withAnyRightController ? (\n <Grid cols={rightControlCols}>\n {shouldPreserveClearableSpace ? <ClearButton /> : null}\n {withAnyPicker ? <PickersIcons /> : null}\n </Grid>\n ) : null}\n </StyledInputsWrapperGrid>\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDnB;AAhDJ,mBAAkC;AAClC,qBAAqB;AACrB,8BAAsC;AACtC,yCAAgD;AAChD,qBAAwC;AACxC,wBAA2B;AAC3B,wBAA2B;AAC3B,0BAA6B;AAC7B,yBAA4B;AAC5B,gDAAmD;AAE5C,MAAM,kCAAkC,MAAmB;AAChE,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,UAAU,SAAS;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,SAAS,CAAC;AAAA,IAC/E,CAAC,KAAK;AAAA,EACR;AAEA,QAAM,eAAe;AAAA,IACnB,YAAY,YAAY;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW,CAAC;AAClB,MAAI,CAAC;AAAU,aAAS,KAAK,MAAM;AACnC,MAAI,CAAC;AAAU,aAAS,KAAK,MAAM;AACnC,MAAI;AAAwB,aAAS,KAAK,MAAM;AAEhD,QAAM,mBAAmB,CAAC;AAC1B,MAAI;AAA8B,qBAAiB,KAAK,MAAM;AAC9D,MAAI;AAAe,qBAAiB,KAAK,MAAM;AAE/C,SACE,2EAKE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,QAAO;AAAA,MACP,IAAI,CAAC,yBAAyB,QAAQ;AAAA,MACtC,WAAW;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR,eAAa,6EAAmC;AAAA,MAC/C,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,mBAAW,OAAO,4CAAC,gCAAW;AAAA,QAC9B,WAAW,OAAO,4CAAC,gCAAW;AAAA,QAC9B,yBACC,6CAAC,uBAAK,MAAM,kBACT;AAAA,yCAA+B,4CAAC,kCAAY,IAAK;AAAA,UACjD,gBAAgB,4CAAC,oCAAa,IAAK;AAAA,WACtC,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DateInputs/DDInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nimport { Styled2DigitsInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\n\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidDay = (day: string) => {\n if (day === '') return false;\n const numberOnly = regExpNumbers.test(day);\n return day.length > 2 || day === '00' || !numberOnly || Number.parseInt(day, 10) > 31;\n};\n\ninterface DDInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n isFocused: boolean;\n ariaAndDataProps?: AriaAndDataProps;\n}\nexport const DDInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n contextRef,\n placeholder,\n ariaCurrentValueForInputs,\n isFocused,\n ariaAndDataProps,\n }: DDInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidDay(e?.currentTarget?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <Styled2DigitsInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n ref={(DomElem: HTMLInputElement) => {\n (contextRef as React.MutableRefObject<HTMLInputElement>).current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n placeholder={placeholder}\n aria-label={`day input field, ${ariaCurrentValueForInputs}`}\n data-testid={ControlledDateTimePickerDatatestid.DATE_INPUTS.DAY}\n disabled={disabled}\n aria-disabled={disabled}\n {...ariaAndDataProps}\n />\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDjB;AAlDN,mBAAmC;AACnC,gDAAmD;AACnD,qBAAmC;AAGnC,MAAM,gBAAgB;AACtB,MAAM,eAAe,CAAC,QAAgB;AACpC,MAAI,QAAQ;AAAI,WAAO;AACvB,QAAM,aAAa,cAAc,KAAK,GAAG;AACzC,SAAO,IAAI,SAAS,KAAK,QAAQ,QAAQ,CAAC,cAAc,OAAO,SAAS,KAAK,EAAE,IAAI;AACrF;AAeO,MAAM,UAAU,aAAAA,QAAM;AAAA,EAC3B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAmC;AACjC,UAAM,uBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,aAAa,GAAG,eAAe,KAAK,GAAG;AACzC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK,CAAC,YAA8B;AAClC,UAAC,WAAwD,UAAU;AACnE,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA,cAAY,oBAAoB;AAAA,QAChC,eAAa,6EAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,iBAAe;AAAA,QACd,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DateInputs/DateInputs.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport { MMInput } from './MMInput.js';\nimport { DDInput } from './DDInput.js';\nimport { YYYYInput } from './YYYYInput.js';\nimport { StyledFocusWithIn, StyledSeparator } from '../Styleds.js';\nimport { useDateInputs } from './useDateInputs.js';\nimport { fixedValues } from '../config.js';\n\nexport const DateInputs = (): JSX.Element => {\n const {\n month,\n day,\n year,\n autoFocusMonthInput,\n innerRefMonthInput,\n onMonthChange,\n onDayChange,\n onYearChange,\n onMonthBlur,\n onDayBlur,\n onYearBlur,\n onMonthFocus,\n onDayFocus,\n onYearFocus,\n onMonthKeyDown,\n onDayKeyDown,\n onYearKeyDown,\n disabled,\n } = useDateInputs();\n // we do this here so MMInput,DDInput,YYYYInput can be pure component memoized via React.memo\n const {\n monthInputRef,\n dayInputRef,\n yearInputRef,\n ariaCurrentValueForInputs,\n latestInteractionRegion,\n currFocusDescriber,\n props,\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataPropsMonth = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.DATE_INPUTS.MONTH]),\n [props],\n );\n const ariaAndDataPropsDay = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.DATE_INPUTS.DAY]),\n [props],\n );\n const ariaAndDataPropsYear = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.DATE_INPUTS.YEAR]),\n [props],\n );\n\n return (\n <Grid\n cols={[\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.largeInputWidth,\n ]}\n >\n <StyledFocusWithIn>\n <MMInput\n onChange={onMonthChange}\n onBlur={onMonthBlur}\n onFocus={onMonthFocus}\n onKeyDown={onMonthKeyDown}\n value={month}\n contextRef={monthInputRef}\n innerRef={innerRefMonthInput}\n autoFocusMonthInput={autoFocusMonthInput}\n placeholder=\"MM\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'date-inputs' && currFocusDescriber === 'month-input'}\n ariaAndDataProps={ariaAndDataPropsMonth}\n />\n </StyledFocusWithIn>\n <StyledSeparator alignItems=\"center\">/</StyledSeparator>\n <StyledFocusWithIn>\n <DDInput\n onChange={onDayChange}\n onBlur={onDayBlur}\n onFocus={onDayFocus}\n onKeyDown={onDayKeyDown}\n value={day}\n contextRef={dayInputRef}\n placeholder=\"DD\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'date-inputs' && currFocusDescriber === 'day-input'}\n ariaAndDataProps={ariaAndDataPropsDay}\n />\n </StyledFocusWithIn>\n <StyledSeparator alignItems=\"center\">/</StyledSeparator>\n <StyledFocusWithIn>\n <YYYYInput\n onChange={onYearChange}\n onBlur={onYearBlur}\n onFocus={onYearFocus}\n onKeyDown={onYearKeyDown}\n value={year}\n contextRef={yearInputRef}\n placeholder=\"YYYY\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'date-inputs' && currFocusDescriber === 'year-input'}\n ariaAndDataProps={ariaAndDataPropsYear}\n />\n </StyledFocusWithIn>\n </Grid>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyDnB;AAzDJ,mBAAkC;AAClC,qBAAqB;AACrB,8BAAsC;AACtC,gDAAmD;AACnD,yCAAgD;AAChD,qBAAwB;AACxB,qBAAwB;AACxB,uBAA0B;AAC1B,qBAAmD;AACnD,2BAA8B;AAC9B,oBAA4B;AAErB,MAAM,aAAa,MAAmB;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,oCAAc;AAElB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,wBAAwB,aAAAA,QAAM;AAAA,IAClC,UAAM,+CAAsB,MAAM,6EAAmC,YAAY,KAAK,CAAC;AAAA,IACvF,CAAC,KAAK;AAAA,EACR;AACA,QAAM,sBAAsB,aAAAA,QAAM;AAAA,IAChC,UAAM,+CAAsB,MAAM,6EAAmC,YAAY,GAAG,CAAC;AAAA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A;AAAA,QACpB,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DateInputs/MMInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { setMultipleRefs } from '@elliemae/ds-utilities';\nimport { Styled2DigitsInput } from '../Styleds.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\n\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidMonth = (month: string) => {\n if (month === '') return false;\n const numberOnly = regExpNumbers.test(month);\n return month.length > 2 || month === '00' || !numberOnly || Number.parseInt(month, 10) > 12;\n};\ninterface MMInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n autoFocusMonthInput: boolean;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>;\n ariaAndDataProps?: AriaAndDataProps;\n}\nexport const MMInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n contextRef,\n innerRef,\n autoFocusMonthInput,\n ariaCurrentValueForInputs,\n isFocused,\n ariaAndDataProps,\n }: MMInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidMonth(e?.target?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n\n const handleRef = useCallback(\n (DomElem: HTMLInputElement) => {\n (contextRef as React.MutableRefObject<HTMLInputElement>).current = DomElem;\n if (isFocused) DomElem?.focus?.();\n },\n [contextRef, isFocused],\n );\n\n const currentRef = useMemo(() => {\n if (innerRef) {\n return setMultipleRefs([handleRef, innerRef]);\n }\n return handleRef;\n }, [handleRef, innerRef]);\n\n return (\n <Styled2DigitsInput\n autoFocus={autoFocusMonthInput}\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n ref={currentRef}\n placeholder={placeholder}\n aria-label={`month input field, ${ariaCurrentValueForInputs}`}\n data-testid={ControlledDateTimePickerDatatestid.DATE_INPUTS.MONTH}\n disabled={disabled}\n aria-disabled={disabled}\n {...ariaAndDataProps}\n />\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsEjB;AAtEN,mBAA4C;AAC5C,0BAAgC;AAChC,qBAAmC;AACnC,gDAAmD;AAGnD,MAAM,gBAAgB;AACtB,MAAM,iBAAiB,CAAC,UAAkB;AACx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except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DateInputs/YYYYInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nimport { StyledMin4DigitsInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\n\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidYear = (year: string) => {\n if (year === '') return false;\n const numberOnly = regExpNumbers.test(year);\n return year.length > 4 || !numberOnly || Number.parseInt(year, 10) > 9999;\n};\n\ninterface YYYYInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n ariaAndDataProps?: AriaAndDataProps;\n}\nexport const YYYYInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n contextRef,\n ariaCurrentValueForInputs,\n isFocused,\n ariaAndDataProps,\n }: YYYYInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidYear(e?.currentTarget?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledMin4DigitsInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n ref={(DomElem: HTMLInputElement) => {\n (contextRef as React.MutableRefObject<HTMLInputElement>).current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n placeholder={placeholder}\n aria-label={`year input field, ${ariaCurrentValueForInputs}`}\n data-testid={ControlledDateTimePickerDatatestid.DATE_INPUTS.YEAR}\n disabled={disabled}\n aria-disabled={disabled}\n {...ariaAndDataProps}\n />\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDjB;AAlDN,mBAAmC;AACnC,gDAAmD;AACnD,qBAAsC;AAGtC,MAAM,gBAAgB;AACtB,MAAM,gBAAgB,CAAC,SAAiB;AACtC,MAAI,SAAS;AAAI,WAAO;AACxB,QAAM,aAAa,cAAc,KAAK,IAAI;AAC1C,SAAO,KAAK,SAAS,KAAK,CAAC,cAAc,OAAO,SAAS,MAAM,EAAE,IAAI;AACvE;AAeO,MAAM,YAAY,aAAAA,QAAM;AAAA,EAC7B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAqC;AACnC,UAAM,uBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,cAAc,GAAG,eAAe,KAAK,GAAG;AAC1C,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK,CAAC,YAA8B;AAClC,UAAC,WAAwD,UAAU;AACnE,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA,cAAY,qBAAqB;AAAA,QACjC,eAAa,6EAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,iBAAe;AAAA,QACd,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DateInputs/useDateInputs.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { useCallback, useMemo, useContext } from 'react';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport {\n getFormattedDateString,\n prependStringWithPlaceHolders,\n fillStringWithPlaceHolders,\n} from '../../utils/stringHelpers.js';\nimport { getValidationDateStringMetaInfo } from '../../utils/dateHelpers.js';\nimport { defaultMetaInfo } from '../../utils/constants.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { DSControlledDateTimePickerT } from '../../propTypes.js';\n\nexport const useDateInputs = (): DSControlledDateTimePickerInternalsT.UseDateInputsR => {\n const {\n props: { disabled },\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n month,\n day,\n year,\n hideTime,\n handleChangeComposedDateString,\n withClearBtn,\n withAnyPicker,\n withAnyRightController,\n autoFocusMonthInput,\n innerRefMonthInput,\n trackFocusResetter,\n trackFocusFirstSegment,\n trackFocusLastSegment,\n trackFocusDayInput,\n trackFocusMonthInput,\n trackFocusYearInput,\n trackFocusHourInput,\n trackFocusClearBtn,\n trackFocusPicker,\n } = useContext(ControlledDateTimePickerContext);\n\n const onHomeKeyDown = useCallback(() => {\n trackFocusFirstSegment();\n }, [trackFocusFirstSegment]);\n const onEndKeyDown = useCallback(() => {\n trackFocusLastSegment();\n }, [trackFocusLastSegment]);\n\n const handleChangeMonth = useCallback(\n (\n newMonth: string,\n e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = defaultMetaInfo,\n ) => {\n const newDateString = getFormattedDateString({\n month: newMonth,\n day,\n year,\n });\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(newDateString, getIsOutOfRangeDay, getIsDisabledDay),\n newDateString,\n };\n appOnMonthChange(newMonth, e, finalMetaInfo);\n handleChangeComposedDateString(newDateString, finalMetaInfo);\n },\n [day, year, getIsOutOfRangeDay, getIsDisabledDay, appOnMonthChange, handleChangeComposedDateString],\n );\n const onMonthFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc = useCallback(() => {\n trackFocusMonthInput();\n }, [trackFocusMonthInput]);\n const onMonthChange: DSControlledDateTimePickerInternalsT.OnChangeFunc = useCallback(\n (e) => {\n let newMonth = e?.target?.value;\n // converts months 2~9 to 02~09\n if (Number.parseInt(newMonth, 10) > 1) newMonth = prependStringWithPlaceHolders(newMonth, 2);\n handleChangeMonth(newMonth, e);\n // auto-advance functionality:\n if (newMonth.length === 2) trackFocusDayInput();\n },\n [handleChangeMonth, trackFocusDayInput],\n );\n const onMonthKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown = useCallback(\n (e) => {\n const { key, ctrlKey, metaKey } = e;\n const monthStringConvertedToInteger = Number.parseInt(month, 10);\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', '-', '/', '\\\\'].includes(key)) e.preventDefault();\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', '-', '/', '\\\\'].includes(key)) e.stopPropagation();\n if (key === 'Home') onHomeKeyDown();\n if (key === 'End') onEndKeyDown();\n if (key === 'ArrowUp' || key === 'ArrowDown') {\n const monthInteger = Number.isNaN(monthStringConvertedToInteger) ? 0 : monthStringConvertedToInteger;\n let newMonth;\n if (key === 'ArrowUp') newMonth = monthInteger + 1 <= 12 ? monthInteger + 1 : monthInteger;\n else newMonth = monthInteger - 1 > 0 ? monthInteger - 1 : 1;\n newMonth = prependStringWithPlaceHolders(`${newMonth}`, 2);\n handleChangeMonth(newMonth, e);\n }\n if (!Number.isNaN(monthStringConvertedToInteger) && (key === '-' || key === '/' || key === '\\\\')) {\n const newMonth = prependStringWithPlaceHolders(`${monthStringConvertedToInteger}`, 2);\n handleChangeMonth(newMonth, e);\n // auto-advance functionality:\n if (newMonth.length === 2) trackFocusDayInput();\n }\n\n // focus last fragment on fill with now\n if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();\n },\n [month, onHomeKeyDown, onEndKeyDown, trackFocusLastSegment, trackFocusDayInput, handleChangeMonth],\n );\n const onMonthBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc = useCallback(\n (e) => {\n const newMonth = e?.target?.value;\n if (newMonth === '0') handleChangeMonth('01', e, { isAutomaticFillTrigger: true });\n else if (newMonth.length > 0 && newMonth.length < 2)\n handleChangeMonth(prependStringWithPlaceHolders(newMonth, 2), e, {\n isAutomaticFillTrigger: true,\n });\n },\n [handleChangeMonth],\n );\n\n const handleChangeDay = useCallback(\n (\n newDay: string,\n e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = defaultMetaInfo,\n ) => {\n const newDateString = getFormattedDateString({\n month,\n day: newDay,\n year,\n });\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(newDateString, getIsOutOfRangeDay, getIsDisabledDay),\n newDateString,\n };\n appOnDayChange(newDay, e, finalMetaInfo);\n handleChangeComposedDateString(newDateString, finalMetaInfo);\n },\n [month, year, getIsOutOfRangeDay, getIsDisabledDay, appOnDayChange, handleChangeComposedDateString],\n );\n const onDayFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc = useCallback(() => {\n trackFocusDayInput();\n }, [trackFocusDayInput]);\n const onDayChange: DSControlledDateTimePickerInternalsT.OnChangeFunc = useCallback(\n (e) => {\n let newDay = e?.target?.value;\n // converts days 4~9 to 04~09\n if (Number.parseInt(newDay, 10) > 3) newDay = prependStringWithPlaceHolders(newDay, 2);\n handleChangeDay(newDay, e);\n // auto-advance functionality:\n if (newDay.length === 2) trackFocusYearInput();\n },\n [handleChangeDay, trackFocusYearInput],\n );\n const onDayKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown = useCallback(\n (e) => {\n const { key, ctrlKey, metaKey, target, currentTarget } = e;\n const dayStringConvertedToInteger = Number.parseInt(day, 10);\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', '-', '/', '\\\\'].includes(key)) e.preventDefault();\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', '-', '/', '\\\\'].includes(key)) e.stopPropagation();\n\n if (key === 'Home') onHomeKeyDown();\n if (key === 'End') onEndKeyDown();\n if (key === 'ArrowUp' || key === 'ArrowDown') {\n const dayInteger = Number.isNaN(dayStringConvertedToInteger) ? 0 : dayStringConvertedToInteger;\n let newDay;\n if (key === 'ArrowUp') newDay = dayInteger + 1 <= 31 ? dayInteger + 1 : dayInteger;\n else newDay = dayInteger - 1 > 0 ? dayInteger - 1 : 1;\n newDay = prependStringWithPlaceHolders(`${newDay}`, 2);\n handleChangeDay(newDay, e);\n }\n if (!Number.isNaN(dayStringConvertedToInteger) && (key === '-' || key === '/' || key === '\\\\')) {\n const newDay = prependStringWithPlaceHolders(`${dayStringConvertedToInteger}`, 2);\n handleChangeDay(newDay, e);\n // auto-advance functionality:\n if (newDay.length === 2) trackFocusYearInput();\n }\n // regressive backspace functionality\n if (\n key === 'Backspace' &&\n target === currentTarget &&\n (target as HTMLInputElement).selectionStart === 0 &&\n (target as HTMLInputElement).selectionEnd === 0\n ) {\n e.preventDefault();\n trackFocusMonthInput();\n }\n // focus last fragment on fill with now\n if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();\n },\n [\n day,\n onHomeKeyDown,\n onEndKeyDown,\n trackFocusLastSegment,\n handleChangeDay,\n trackFocusYearInput,\n trackFocusMonthInput,\n ],\n );\n const onDayBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc = useCallback(\n (e) => {\n const newDay = e?.target?.value;\n if (newDay === '0') handleChangeDay('01', e, { isAutomaticFillTrigger: true });\n else if (newDay.length > 0 && newDay.length < 2)\n handleChangeDay(prependStringWithPlaceHolders(newDay, 2), e, {\n isAutomaticFillTrigger: true,\n });\n },\n [handleChangeDay],\n );\n\n const handleChangeYear = useCallback(\n (\n newYear: string,\n e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = defaultMetaInfo,\n ) => {\n const newDateString = getFormattedDateString({\n month,\n day,\n year: newYear,\n });\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(newDateString, getIsOutOfRangeDay, getIsDisabledDay),\n newDateString,\n };\n appOnYearChange(newYear, e, finalMetaInfo);\n handleChangeComposedDateString(newDateString, finalMetaInfo);\n },\n [month, day, getIsOutOfRangeDay, getIsDisabledDay, appOnYearChange, handleChangeComposedDateString],\n );\n const onYearFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc = useCallback(() => {\n trackFocusYearInput();\n }, [trackFocusYearInput]);\n const onYearChange: DSControlledDateTimePickerInternalsT.OnChangeFunc = useCallback(\n (e) => {\n const newYear = e?.target?.value;\n handleChangeYear(newYear, e);\n // auto-advance functionality:\n if (newYear.length === 4) {\n if (!hideTime) trackFocusHourInput();\n else if (withAnyRightController) {\n if (withClearBtn) trackFocusClearBtn();\n else if (withAnyPicker) trackFocusPicker();\n // pending approval from Seda, check which one should be focused first...\n }\n }\n },\n [\n handleChangeYear,\n hideTime,\n trackFocusHourInput,\n withAnyRightController,\n withClearBtn,\n trackFocusClearBtn,\n withAnyPicker,\n trackFocusPicker,\n ],\n );\n const onYearKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown = useCallback(\n (e) => {\n const { key, ctrlKey, metaKey, target, currentTarget } = e;\n\n /* ****** New year value calculator logic ********* */\n const yearStringConvertedToInteger = Number.parseInt(year, 10);\n const yearInteger = Number.isNaN(yearStringConvertedToInteger) ? 0 : yearStringConvertedToInteger;\n let newYear = yearInteger !== 0 ? fillStringWithPlaceHolders(`${yearInteger}`, 4, '0') : '';\n if (key === 'ArrowUp' || key === 'ArrowDown') {\n let newYearInteger;\n if (key === 'ArrowUp') newYearInteger = yearInteger + 1 <= 9999 ? yearInteger + 1 : yearInteger;\n else newYearInteger = yearInteger - 1 > 0 ? yearInteger - 1 : 1;\n newYear = prependStringWithPlaceHolders(`${newYearInteger}`, 4);\n }\n const isAutomaticFillTrigger = newYear !== year && ['Tab', ' '].includes(key);\n const metainfo = { isAutomaticFillTrigger };\n\n /* ************* new year apply logic ************* */\n // tab/spacebar applies auto-fill\n // arrows up/down applies increment/decrement\n if (key === 'ArrowUp' || key === 'ArrowDown' || isAutomaticFillTrigger) {\n handleChangeYear(newYear, e, metainfo);\n }\n\n /* ************* focus tracking logic ************* */\n let trackNextFocus = trackFocusResetter; // if nothing after, we reset internal focus tracker to avoid re-render unexpected focus shift\n if (!hideTime) trackNextFocus = trackFocusHourInput;\n else if (withClearBtn) trackNextFocus = trackFocusClearBtn;\n else if (withAnyPicker) trackNextFocus = trackFocusPicker;\n\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', ' '].includes(key)) e.preventDefault();\n if (['Home', 'End', 'ArrowUp', 'ArrowDown', ' '].includes(key)) e.stopPropagation();\n if (key === 'Home') onHomeKeyDown();\n if (key === 'End') onEndKeyDown();\n\n /* ************** auto-advance logic ************** */\n if (key === ' ') {\n // auto-advance functionality:\n trackNextFocus();\n }\n /* ********** regressive backspace logic ********** */\n if (\n key === 'Backspace' &&\n target === currentTarget &&\n (target as HTMLInputElement).selectionStart === 0 &&\n (target as HTMLInputElement).selectionEnd === 0\n ) {\n e.preventDefault();\n trackFocusDayInput();\n }\n\n // focus last fragment on fill with now\n if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();\n },\n [\n year,\n trackFocusResetter,\n hideTime,\n trackFocusHourInput,\n withClearBtn,\n trackFocusClearBtn,\n withAnyPicker,\n trackFocusPicker,\n onHomeKeyDown,\n onEndKeyDown,\n trackFocusLastSegment,\n trackFocusDayInput,\n handleChangeYear,\n ],\n );\n const onYearBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc = useCallback(() => {\n // this was used before, now that we have a wrapping onBlur resetting the focus tracker, this is unused;\n }, []);\n\n return useMemo(\n () => ({\n month,\n day,\n year,\n autoFocusMonthInput,\n innerRefMonthInput,\n disabled,\n onMonthFocus,\n onMonthChange,\n onDayFocus,\n onDayChange,\n onYearFocus,\n onYearChange,\n onMonthBlur,\n onDayBlur,\n onYearBlur,\n onMonthKeyDown,\n onDayKeyDown,\n onYearKeyDown,\n }),\n [\n month,\n day,\n year,\n autoFocusMonthInput,\n innerRefMonthInput,\n disabled,\n onMonthFocus,\n onMonthChange,\n onDayFocus,\n onDayChange,\n onYearFocus,\n onYearChange,\n onMonthBlur,\n onDayBlur,\n onYearBlur,\n onMonthKeyDown,\n onDayKeyDown,\n onYearKeyDown,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAiD;AACjD,yCAAgD;AAChD,2BAIO;AACP,yBAAgD;AAChD,uBAAgC;AAIzB,MAAM,gBAAgB,MAA2D;AACtF,QAAM;AAAA,IACJ,OAAO,EAAE,SAAS;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAE9C,QAAM,oBAAgB,0BAAY,MAAM;AACtC,2BAAuB;AAAA,EACzB,GAAG,CAAC,sBAAsB,CAAC;AAC3B,QAAM,mBAAe,0BAAY,MAAM;AACrC,0BAAsB;AAAA,EACxB,GAAG,CAAC,qBAAqB,CAAC;AAE1B,QAAM,wBAAoB;AAAA,IACxB,CACE,UACA,GACA,WAA8E,qCAC3E;AACH,YAAM,oBAAgB,6CAAuB;AAAA,QAC3C,OAAO;AAAA,QACP;AAAA,QACA;AAAA,MACF,CAAC;AACD,YAAM,gBAA0E;AAAA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BAAa;AAGhC,UAAI,QAAQ,KAAK;AAEf,uBAAe;AAAA,MACjB;AAEA,UACE,QAAQ,eACR,WAAW,iBACV,OAA4B,mBAAmB,KAC/C,OAA4B,iBAAiB,GAC9C;AACA,UAAE,eAAe;AACjB,2BAAmB;AAAA,MACrB;AAGA,WAAK,WAAW,YAAY,QAAQ;AAAK,8BAAsB;AAAA,IACjE;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,IACF;AAAA,EACF;AACA,QAAM,iBAA8D,0BAAY,MAAM;AAAA,EAEtF,GAAG,CAAC,CAAC;AAEL,aAAO;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,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,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/Calendar.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-len */\nimport React, { useContext } from 'react';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarIconTrigger } from './CalendarIconTrigger.js';\nimport { CalendarWrapper } from './CalendarWrapper.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { useConfigCalendarCTX } from './useConfigCalendarCTX.js';\n\nexport const WrappedCalendarContext = ({ children }: { children: JSX.Element }) => {\n const ctx = useConfigCalendarCTX();\n return <CalendarContext.Provider value={ctx}>{children}</CalendarContext.Provider>;\n};\n\nconst CalendarContent = () => {\n const { showCalendar, handleMenuWrapperKeyDown } = useContext(CalendarContext);\n const { isControllerOnly } = useContext(ControlledDateTimePickerContext);\n return (\n <>\n {isControllerOnly ? null : <CalendarIconTrigger />}\n {isControllerOnly || showCalendar ? (\n <>\n {/* The <div> element is catching the \"ESC\" key to close the calendar, there is no valid aria role for this */}\n {/* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div onKeyDown={handleMenuWrapperKeyDown}>\n <CalendarWrapper />\n </div>\n </>\n ) : null}\n </>\n );\n};\n\n// we wrap in context in a separate statement so we can use the useContext and be sure it's correctly initialized\nexport const Calendar = () => (\n <WrappedCalendarContext>\n <CalendarContent />\n </WrappedCalendarContext>\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUd;AATT,mBAAkC;AAClC,yCAAgD;AAChD,iCAAoC;AACpC,6BAAgC;AAChC,6BAAgC;AAChC,kCAAqC;AAE9B,MAAM,yBAAyB,CAAC,EAAE,SAAS,MAAiC;AACjF,QAAM,UAAM,kDAAqB;AACjC,SAAO,4CAAC,uCAAgB,UAAhB,EAAyB,OAAO,KAAM,UAAS;AACzD;AAEA,MAAM,kBAAkB,MAAM;AAC5B,QAAM,EAAE,cAAc,yBAAyB,QAAI,yBAAW,sCAAe;AAC7E,QAAM,EAAE,iBAAiB,QAAI,yBAAW,kEAA+B;AACvE,SACE,4EACG;AAAA,uBAAmB,OAAO,4CAAC,kDAAoB;AAAA,IAC/C,oBAAoB,eACnB,2EAIE,sDAAC,SAAI,WAAW,0BACd,sDAAC,0CAAgB,GACnB,GACF,IACE;AAAA,KACN;AAEJ;AAGO,MAAM,WAAW,MACtB,4CAAC,0BACC,sDAAC,mBAAgB,GACnB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/CalendarBody.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { CalendarMonthDays } from './CalendarMonthDays.js';\nimport { CalendarWeekDays } from './CalendarWeekDays.js';\nimport { StyledBody } from './Styleds.js';\ninterface CalendarBodyPropsT {\n weekRowsNum: number;\n}\nexport const CalendarBody = React.memo(({ weekRowsNum }: CalendarBodyPropsT) => (\n <span role=\"grid\" aria-colcount={7} aria-rowcount={weekRowsNum}>\n <CalendarWeekDays />\n <StyledBody>\n <CalendarMonthDays />\n </StyledBody>\n </span>\n));\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQrB;AARF,mBAAkB;AAClB,+BAAkC;AAClC,8BAAiC;AACjC,qBAA2B;AAIpB,MAAM,eAAe,aAAAA,QAAM,KAAK,CAAC,EAAE,YAAY,MACpD,6CAAC,UAAK,MAAK,QAAO,iBAAe,GAAG,iBAAe,aACjD;AAAA,8CAAC,4CAAiB;AAAA,EAClB,4CAAC,6BACC,sDAAC,8CAAkB,GACrB;AAAA,GACF,CACD;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/CalendarContent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-len */\nimport React, { useContext } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { CalendarBody } from './CalendarBody.js';\nimport { CalendarHead } from './CalendarHead.js';\nimport { CalendarFooter } from './CalendarFooter.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { StyledShadowWrapper, StyledCalendarWrapper } from './Styleds.js';\n\n// ({ className = '' }: { className?: string })\n// <StyledShadowWrapper className={className}>\n// is required for styled-components, without this we can't styled(CalendarContent)...\n// https://stackoverflow.com/questions/52542817/styled-components-not-applying-style-to-custom-functional-react-component\nexport const CalendarContent = ({ className = '' }: { className?: string }): JSX.Element => {\n const { props } = useContext(ControlledDateTimePickerContext);\n const { daysMatrixByWeekday } = useContext(CalendarContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR]),\n [props],\n );\n\n return (\n <StyledShadowWrapper\n className={className}\n data-testid={ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR}\n {...ariaAndDataProps}\n >\n <StyledCalendarWrapper>\n <CalendarHead />\n <CalendarBody weekRowsNum={daysMatrixByWeekday.length} />\n <CalendarFooter />\n </StyledCalendarWrapper>\n </StyledShadowWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BjB;AA5BN,mBAAkC;AAClC,8BAAsC;AACtC,gDAAmD;AACnD,0BAA6B;AAC7B,0BAA6B;AAC7B,4BAA+B;AAC/B,yCAAgD;AAChD,6BAAgC;AAChC,qBAA2D;AAMpD,MAAM,kBAAkB,CAAC,EAAE,YAAY,GAAG,MAA2C;AAC1F,QAAM,EAAE,MAAM,QAAI,yBAAW,kEAA+B;AAC5D,QAAM,EAAE,oBAAoB,QAAI,yBAAW,sCAAe;AAC1D,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,qBAAqB,QAAQ,CAAC;AAAA,IACnG,CAAC,KAAK;AAAA,EACR;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,6EAAmC,qBAAqB;AAAA,MACpE,GAAG;AAAA,MAEJ,uDAAC,wCACC;AAAA,oDAAC,oCAAa;AAAA,QACd,4CAAC,oCAAa,aAAa,oBAAoB,QAAQ;AAAA,QACvD,4CAAC,wCAAe;AAAA,SAClB;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/CalendarContext.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { createContext } from 'react';\nimport type { CalendarContextT } from './useConfigCalendarCTX.js';\n\nexport const defaultCalendarContext = {} as CalendarContextT;\n\n/** Context for cross component communication */\nexport const CalendarContext = createContext<CalendarContextT>(defaultCalendarContext);\n\nexport default CalendarContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8B;AAGvB,MAAM,yBAAyB,CAAC;AAGhC,MAAM,sBAAkB,4BAAgC,sBAAsB;AAErF,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/CalendarDaysList.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { Day } from './Day.js';\nimport { StyledWeekDaysListWrapper } from './Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';\n\nexport const CalendarDaysList = React.memo(\n ({ invisibleFirstDay, daysMatrixByWeekday, invisibleLastDay, innerRef }: CalendarDaysListPropsT): JSX.Element => (\n <div ref={innerRef} role=\"rowgroup\">\n {invisibleFirstDay ? (\n <Day key={`ds-calendar-${invisibleFirstDay.day.toString()}`} metaDay={invisibleFirstDay} isInvisible />\n ) : null}\n {daysMatrixByWeekday.map((week, i) => (\n <StyledWeekDaysListWrapper\n key={`ds-calendar-week-${week[0].day.toString()}-${week[6].day.toString()}`}\n role=\"row\"\n aria-rowindex={i + 1}\n cols={['32px', '32px', '32px', '32px', '32px', '32px', '32px']}\n rows={['28px']}\n py=\"xxxs\"\n px=\"2px\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n {week.map((metaDay, z) => (\n <Day key={`ds-calendar-${metaDay.day.toString()}`} metaDay={metaDay} colIndex={z + 1} />\n ))}\n </StyledWeekDaysListWrapper>\n ))}\n {invisibleLastDay ? (\n <Day key={`ds-calendar-${invisibleLastDay.day.toString()}`} metaDay={invisibleLastDay} isInvisible />\n ) : null}\n </div>\n ),\n);\nexport interface CalendarDaysListPropsT {\n invisibleFirstDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n daysMatrixByWeekday: DSControlledDateTimePickerInternalsT.MetaMonthDay[][];\n invisibleLastDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n innerRef: React.RefObject<HTMLDivElement>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOnB;AAPJ,mBAAkB;AAClB,iBAAoB;AACpB,qBAA0C;AAGnC,MAAM,mBAAmB,aAAAA,QAAM;AAAA,EACpC,CAAC,EAAE,mBAAmB,qBAAqB,kBAAkB,SAAS,MACpE,6CAAC,SAAI,KAAK,UAAU,MAAK,YACtB;AAAA,wBACC,4CAAC,kBAA4D,SAAS,mBAAmB,aAAW,QAA1F,eAAe,kBAAkB,IAAI,SAAS,GAA6C,IACnG;AAAA,IACH,oBAAoB,IAAI,CAAC,MAAM,MAC9B;AAAA,MAAC;AAAA;AAAA,QAEC,MAAK;AAAA,QACL,iBAAe,IAAI;AAAA,QACnB,MAAM,CAAC,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;AAAA,QAC7D,MAAM,CAAC,MAAM;AAAA,QACb,IAAG;AAAA,QACH,IAAG;AAAA,QACH,gBAAe;AAAA,QACf,YAAW;AAAA,QAEV,eAAK,IAAI,CAAC,SAAS,MAClB,4CAAC,kBAAkD,SAAkB,UAAU,IAAI,KAAzE,eAAe,QAAQ,IAAI,SAAS,GAAwC,CACvF;AAAA;AAAA,MAZI,oBAAoB,KAAK,CAAC,EAAE,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,IAAI,SAAS;AAAA,IAa1E,CACD;AAAA,IACA,mBACC,4CAAC,kBAA2D,SAAS,kBAAkB,aAAW,QAAxF,eAAe,iBAAiB,IAAI,SAAS,GAA4C,IACjG;AAAA,KACN;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Pickers/Calendar/CalendarFooter.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useContext } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarFooterMessage } from './Styleds.js';\n\nexport const CalendarFooter: React.ComponentType = () => {\n const {\n props,\n props: { pickerFooterMsg, hasError },\n isWithTimeWheelToo,\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR]),\n [props],\n );\n if (pickerFooterMsg !== undefined && !isWithTimeWheelToo && hasError)\n return (\n <CalendarFooterMessage\n role=\"alert\"\n data-testid={ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR}\n {...ariaAndDataProps}\n >\n {pickerFooterMsg}\n </CalendarFooterMessage>\n );\n return null;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBjB;AAlBN,mBAAkC;AAClC,8BAAsC;AACtC,gDAAmD;AACnD,yCAAgD;AAChD,qBAAsC;AAE/B,MAAM,iBAAsC,MAAM;AACvD,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,iBAAiB,SAAS;AAAA,IACnC;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,QAAQ,QAAQ,CAAC;AAAA,IACtF,CAAC,KAAK;AAAA,EACR;AACA,MAAI,oBAAoB,UAAa,CAAC,sBAAsB;AAC1D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAa,6EAAmC,QAAQ;AAAA,QACvD,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAEJ,SAAO;AACT;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|