@elliemae/ds-form-date-time-picker 3.22.0-next.2 → 3.22.0-next.21

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.
Files changed (157) hide show
  1. package/dist/cjs/ControlledDateTimePicker.js +2 -2
  2. package/dist/cjs/ControlledDateTimePicker.js.map +2 -2
  3. package/dist/cjs/ControlledDateTimePickerTypes.js.map +2 -2
  4. package/dist/cjs/config/useChangeHandlers.js.map +1 -1
  5. package/dist/cjs/config/useControlledDateTimePicker.js.map +1 -1
  6. package/dist/cjs/config/useGetFlags.js.map +1 -1
  7. package/dist/cjs/config/useGetPropsBasedOnType.js.map +1 -1
  8. package/dist/cjs/config/useGetPropsWithDefault.js +2 -2
  9. package/dist/cjs/config/useGetPropsWithDefault.js.map +2 -2
  10. package/dist/cjs/config/useGlobalKeyHandlers.js.map +1 -1
  11. package/dist/cjs/config/useRelevantValueFromProps.js.map +1 -1
  12. package/dist/cjs/config/useValidateProps.js.map +1 -1
  13. package/dist/cjs/exported-related/theming.js +10 -0
  14. package/dist/cjs/exported-related/theming.js.map +2 -2
  15. package/dist/cjs/index.js +1 -1
  16. package/dist/cjs/index.js.map +2 -2
  17. package/dist/cjs/parts/DateInputs/DDInput.js +1 -1
  18. package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
  19. package/dist/cjs/parts/DateInputs/MMInput.js +2 -2
  20. package/dist/cjs/parts/DateInputs/MMInput.js.map +2 -2
  21. package/dist/cjs/parts/DateInputs/YYYYInput.js +3 -3
  22. package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
  23. package/dist/cjs/parts/DateInputs/useDateInputs.js.map +1 -1
  24. package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +2 -2
  25. package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +2 -2
  26. package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +5 -1
  27. package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +2 -2
  28. package/dist/cjs/parts/Pickers/Calendar/Day.js.map +1 -1
  29. package/dist/cjs/parts/Pickers/Calendar/Styleds.js +4 -1
  30. package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +2 -2
  31. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +1 -1
  32. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +2 -2
  33. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +7 -1
  34. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +2 -2
  35. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js +4 -1
  36. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +2 -2
  37. package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +4 -1
  38. package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +2 -2
  39. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +7 -1
  40. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +2 -2
  41. package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
  42. package/dist/cjs/parts/Styleds.js +32 -5
  43. package/dist/cjs/parts/Styleds.js.map +2 -2
  44. package/dist/cjs/parts/TimeInputs/HHInput.js +2 -2
  45. package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
  46. package/dist/cjs/parts/TimeInputs/MeridiemInput.js +2 -2
  47. package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
  48. package/dist/cjs/parts/TimeInputs/MinutesInput.js +3 -3
  49. package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
  50. package/dist/cjs/{propTypes.js → react-desc-prop-types.js} +4 -4
  51. package/dist/cjs/{propTypes.js.map → react-desc-prop-types.js.map} +1 -1
  52. package/dist/cjs/sharedTypes.js.map +1 -1
  53. package/dist/cjs/typescript-testing/typescript-system-message-valid.js +121 -0
  54. package/dist/cjs/typescript-testing/typescript-system-message-valid.js.map +7 -0
  55. package/dist/cjs/utils/dateHelpers.js.map +1 -1
  56. package/dist/cjs/utils/dateTimeHelpers.js.map +1 -1
  57. package/dist/cjs/utils/timeHelpers.js.map +1 -1
  58. package/dist/cjs/utils/typeGuards.js.map +1 -1
  59. package/dist/esm/ControlledDateTimePicker.js +1 -1
  60. package/dist/esm/ControlledDateTimePicker.js.map +1 -1
  61. package/dist/esm/ControlledDateTimePickerTypes.js.map +2 -2
  62. package/dist/esm/config/useChangeHandlers.js.map +1 -1
  63. package/dist/esm/config/useControlledDateTimePicker.js.map +1 -1
  64. package/dist/esm/config/useGetFlags.js.map +1 -1
  65. package/dist/esm/config/useGetPropsBasedOnType.js.map +1 -1
  66. package/dist/esm/config/useGetPropsWithDefault.js +1 -1
  67. package/dist/esm/config/useGetPropsWithDefault.js.map +1 -1
  68. package/dist/esm/config/useGlobalKeyHandlers.js.map +1 -1
  69. package/dist/esm/config/useRelevantValueFromProps.js.map +1 -1
  70. package/dist/esm/config/useValidateProps.js.map +1 -1
  71. package/dist/esm/exported-related/theming.js +10 -0
  72. package/dist/esm/exported-related/theming.js.map +2 -2
  73. package/dist/esm/index.js +1 -1
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/parts/DateInputs/DDInput.js +2 -2
  76. package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
  77. package/dist/esm/parts/DateInputs/MMInput.js +2 -2
  78. package/dist/esm/parts/DateInputs/MMInput.js.map +2 -2
  79. package/dist/esm/parts/DateInputs/YYYYInput.js +3 -3
  80. package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
  81. package/dist/esm/parts/DateInputs/useDateInputs.js.map +1 -1
  82. package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js +2 -2
  83. package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js.map +2 -2
  84. package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js +5 -1
  85. package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js.map +2 -2
  86. package/dist/esm/parts/Pickers/Calendar/Day.js.map +1 -1
  87. package/dist/esm/parts/Pickers/Calendar/Styleds.js +4 -1
  88. package/dist/esm/parts/Pickers/Calendar/Styleds.js.map +2 -2
  89. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +1 -1
  90. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +2 -2
  91. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +7 -1
  92. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +2 -2
  93. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js +4 -1
  94. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +2 -2
  95. package/dist/esm/parts/Pickers/TimeWheel/Styleds.js +4 -1
  96. package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +2 -2
  97. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js +7 -1
  98. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +2 -2
  99. package/dist/esm/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
  100. package/dist/esm/parts/Styleds.js +32 -5
  101. package/dist/esm/parts/Styleds.js.map +2 -2
  102. package/dist/esm/parts/TimeInputs/HHInput.js +3 -3
  103. package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
  104. package/dist/esm/parts/TimeInputs/MeridiemInput.js +3 -3
  105. package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
  106. package/dist/esm/parts/TimeInputs/MinutesInput.js +3 -3
  107. package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
  108. package/dist/esm/{propTypes.js → react-desc-prop-types.js} +1 -1
  109. package/dist/esm/{propTypes.js.map → react-desc-prop-types.js.map} +1 -1
  110. package/dist/esm/typescript-testing/typescript-system-message-valid.js +98 -0
  111. package/dist/esm/typescript-testing/typescript-system-message-valid.js.map +7 -0
  112. package/dist/esm/utils/dateHelpers.js.map +1 -1
  113. package/dist/esm/utils/dateTimeHelpers.js.map +1 -1
  114. package/dist/esm/utils/timeHelpers.js.map +1 -1
  115. package/dist/esm/utils/typeGuards.js.map +1 -1
  116. package/dist/types/ControlledDateTimePicker.d.ts +2 -1
  117. package/dist/types/config/useChangeHandlers.d.ts +1 -1
  118. package/dist/types/config/useControlledDateTimePicker.d.ts +1 -1
  119. package/dist/types/config/useGetFlags.d.ts +1 -1
  120. package/dist/types/config/useGetPropsBasedOnType.d.ts +1 -1
  121. package/dist/types/config/useGetPropsWithDefault.d.ts +1 -1
  122. package/dist/types/config/useGlobalKeyHandlers.d.ts +1 -1
  123. package/dist/types/config/useRelevantValueFromProps.d.ts +1 -1
  124. package/dist/types/config/useValidateProps.d.ts +1 -1
  125. package/dist/types/exported-related/theming.d.ts +10 -0
  126. package/dist/types/index.d.ts +1 -1
  127. package/dist/types/parts/ClearButton/ClearButton.d.ts +1 -0
  128. package/dist/types/parts/ControlledDateTimePickerContent.d.ts +1 -0
  129. package/dist/types/parts/DateInputs/DateInputs.d.ts +1 -0
  130. package/dist/types/parts/Pickers/Calendar/Calendar.d.ts +1 -0
  131. package/dist/types/parts/Pickers/Calendar/CalendarContent.d.ts +1 -0
  132. package/dist/types/parts/Pickers/Calendar/CalendarHead.d.ts +1 -0
  133. package/dist/types/parts/Pickers/Calendar/CalendarIconTrigger.d.ts +1 -0
  134. package/dist/types/parts/Pickers/Calendar/CalendarMonthDays.d.ts +1 -0
  135. package/dist/types/parts/Pickers/Calendar/CalendarWrapper.d.ts +1 -0
  136. package/dist/types/parts/Pickers/Calendar/Day.d.ts +1 -0
  137. package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.d.ts +1 -0
  138. package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.d.ts +1 -0
  139. package/dist/types/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.d.ts +1 -1
  140. package/dist/types/parts/Pickers/PickersIcons.d.ts +1 -0
  141. package/dist/types/parts/Pickers/TimeWheel/HoursList.d.ts +1 -0
  142. package/dist/types/parts/Pickers/TimeWheel/MeridiemList.d.ts +1 -0
  143. package/dist/types/parts/Pickers/TimeWheel/MinutesList.d.ts +1 -0
  144. package/dist/types/parts/Pickers/TimeWheel/TimeWheel.d.ts +1 -0
  145. package/dist/types/parts/Pickers/TimeWheel/TimeWheelIconTrigger.d.ts +1 -0
  146. package/dist/types/parts/Pickers/TimeWheel/TimeWheelWrapper.d.ts +1 -1
  147. package/dist/types/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.d.ts +1 -1
  148. package/dist/types/parts/Styleds.d.ts +7 -0
  149. package/dist/types/parts/TimeInputs/TimeInputs.d.ts +1 -0
  150. package/dist/types/sharedTypes.d.ts +1 -1
  151. package/dist/types/typescript-testing/typescript-system-message-valid.d.ts +1 -0
  152. package/dist/types/utils/dateHelpers.d.ts +1 -1
  153. package/dist/types/utils/dateTimeHelpers.d.ts +1 -1
  154. package/dist/types/utils/timeHelpers.d.ts +1 -1
  155. package/dist/types/utils/typeGuards.d.ts +1 -1
  156. package/package.json +12 -10
  157. /package/dist/types/{propTypes.d.ts → react-desc-prop-types.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/dateHelpers.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { createRef } from 'react';\nimport { monthNames } from './constants.js';\nimport { prependStringWithPlaceHolders, deconstructValuesFromDateString, isIncompleteString } from './stringHelpers.js';\nimport { convertToPositiveNumberIfPossible } from './numberHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../sharedTypes.js';\n\nexport const getDateValuesFromDate = (day: Date): DateValuesT => ({\n month: day?.getMonth?.() as DSControlledDateTimePickerInternalsT.DateMonth,\n day: day?.getDate?.() as DSControlledDateTimePickerInternalsT.DateDay,\n year: day?.getFullYear?.(),\n});\nexport const getDateStringFromDay = (day: Date): string => {\n const monthFromDay = prependStringWithPlaceHolders(`${day.getMonth() + 1}`, 2); // months from 1-12\n const dayFromDay = prependStringWithPlaceHolders(`${day.getDate()}`, 2);\n const yearFromDay = prependStringWithPlaceHolders(`${day.getFullYear()}`, 4);\n\n return `${monthFromDay}/${dayFromDay}/${yearFromDay}`;\n};\nexport const getTimeStringFromDay = (day: Date): string => {\n const hoursNum = day.getHours();\n const meridiem = hoursNum > 12 ? 'PM' : 'AM';\n const twelveHourFormat = hoursNum > 12 ? hoursNum - 12 : hoursNum;\n const minutesNum = day.getMinutes();\n\n const hoursFromDay = prependStringWithPlaceHolders(`${twelveHourFormat}`, 2);\n const minutesFromDay = prependStringWithPlaceHolders(`${minutesNum}`, 2);\n\n return `${hoursFromDay}:${minutesFromDay} ${meridiem}`;\n};\nexport const getMonthNameByMonthNumber = (monthNumber: number): string => monthNames[monthNumber];\nexport const isSameDateMoment = (dateA: Date, dateB: Date): boolean => dateA?.getTime?.() === dateB?.getTime?.();\n\nexport const compareTwoDatesDayEquality = (dayA: Date, dayB: Date): boolean => {\n const { day: currD, month: currM, year: currY } = getDateValuesFromDate(dayA);\n const { day: focusD, month: focusM, year: focusY } = getDateValuesFromDate(dayB);\n return currD === focusD && currM === focusM && currY === focusY;\n};\n\nexport const getLastDayOfMonth = (month: DSControlledDateTimePickerInternalsT.DateMonth, year: number): Date =>\n new Date(year, month + 1, 0);\nexport const isValidDayForTheMonth = (\n month: DSControlledDateTimePickerInternalsT.DateMonth,\n year: number,\n day: DSControlledDateTimePickerInternalsT.DateDay,\n): boolean => new Date(year, month, day)?.getMonth?.() === month;\nexport const getDayFromDateString = (dateString: string): Date | null => {\n const { month, day, year } = deconstructValuesFromDateString(dateString);\n const monthNum = convertToPositiveNumberIfPossible(month);\n const dayNum = convertToPositiveNumberIfPossible(day) as DSControlledDateTimePickerInternalsT.DateDay | -1;\n const yearNum = convertToPositiveNumberIfPossible(year);\n if (\n monthNum !== -1 &&\n dayNum !== -1 &&\n yearNum !== -1 &&\n isValidDayForTheMonth((monthNum - 1) as DSControlledDateTimePickerInternalsT.DateMonth, yearNum, dayNum)\n )\n return new Date(yearNum, monthNum - 1, dayNum);\n return null;\n};\nexport const isValidDayForTheMonthDateString = (dateString: string): boolean => {\n if (isIncompleteString(dateString)) return true;\n const { month } = deconstructValuesFromDateString(dateString);\n const monthInt = convertToPositiveNumberIfPossible(month);\n if (monthInt === -1) return false;\n const monthDateMonth = (monthInt - 1) as DSControlledDateTimePickerInternalsT.DateMonth;\n return getDayFromDateString(dateString)?.getMonth?.() === monthDateMonth;\n};\n\nexport const getValidationDateStringMetaInfo = (\n dateString: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n getIsOutOfRangeDay = (day: string) => false,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n getIsDisabledDay = (day: string) => false,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => {\n const metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = {};\n if (!isIncompleteString(dateString)) {\n metaInfo.isDayPresentInMonth = isValidDayForTheMonthDateString(dateString);\n if (!metaInfo.isDayPresentInMonth)\n metaInfo.suggestedErrorMsg = 'The selected day is not part of the selected month';\n const day = getDayFromDateString(dateString);\n if (day) {\n metaInfo.isOutOfRangeDay = getIsOutOfRangeDay(dateString);\n metaInfo.isDisabledDay = getIsDisabledDay(dateString);\n if (metaInfo.isOutOfRangeDay || metaInfo.isDisabledDay)\n metaInfo.suggestedErrorMsg = 'The selected day is not allowed';\n }\n }\n return metaInfo;\n};\n// code adapted from https://github.com/datejs/Datejs/blob/master/src/core.js\nexport const isLeapYear = (year: number): boolean => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n\nexport const getHowManyDaysInMonth = (year: number, month: number): number => {\n const daysPerMonth = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n return daysPerMonth[month];\n};\n\nexport const dateIsLeapYear = (date: Date): boolean => isLeapYear(date.getFullYear());\n\nexport const dateGetDaysInMonth = (date: Date): number => getHowManyDaysInMonth(date.getFullYear(), date.getMonth());\n\nexport const dateAddMonths = (date: Date, value: number): Date => {\n const copiedDate = new Date(date.getTime());\n const n = copiedDate.getDate();\n copiedDate.setDate(1);\n copiedDate.setMonth(copiedDate.getMonth() + value);\n copiedDate.setDate(Math.min(n, dateGetDaysInMonth(copiedDate)));\n return copiedDate;\n};\nexport const dateAddYear = (date: Date, value: number): Date => dateAddMonths(date, value * 12);\n\ninterface DateValuesT {\n month: DSControlledDateTimePickerInternalsT.DateMonth;\n year: number;\n day?: DSControlledDateTimePickerInternalsT.DateDay;\n}\ninterface DateSumValuesT {\n monthsToSum?: number;\n yearsToSum?: number;\n daysToSum?: number;\n}\n// sumFromDateValues supports negative values to \"subtract\"\nexport const sumFromDateValues = (\n { month, year, day = 1 }: DateValuesT,\n { monthsToSum = 0, yearsToSum = 0, daysToSum = 0 }: DateSumValuesT,\n): DateValuesT => {\n let newDate = new Date(year, month, day);\n if (yearsToSum) newDate = dateAddYear(newDate, yearsToSum);\n\n if (monthsToSum) newDate = dateAddMonths(newDate, monthsToSum);\n\n if (daysToSum) newDate.setDate(newDate.getDate() + daysToSum);\n\n return {\n month: newDate.getMonth() as DSControlledDateTimePickerInternalsT.DateMonth,\n day: newDate.getDate() as DSControlledDateTimePickerInternalsT.DateDay,\n year: newDate.getFullYear(),\n };\n};\nexport const sumValuesToDate = (day: Date, sumValues: DateSumValuesT): Date => {\n const dateAsVals = getDateValuesFromDate(day);\n const { month, year, day: newD } = sumFromDateValues(dateAsVals, sumValues);\n return new Date(year, month, newD);\n};\nexport const subtractYears = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setFullYear(date.getFullYear() - howManyMore);\n return newDate;\n};\nexport const subtractMonths = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setMonth(date.getMonth() - howManyMore);\n return newDate;\n};\nexport const sumMonths = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setMonth(date.getMonth() + howManyMore);\n return newDate;\n};\nexport const sumYears = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setFullYear(date.getFullYear() + howManyMore);\n return newDate;\n};\n\nexport const getDaysInMonth = (month: number, year: number): Date[] => {\n const date = new Date(year, month, 1);\n const days: Date[] = [];\n while (date.getMonth() === month) {\n days.push(new Date(date));\n date.setDate(date.getDate() + 1);\n }\n return days;\n};\nexport const getLastXDaysFromPreviousMonth = (month: number, year: number, howMany: number): Date[] => {\n const date = new Date(year, month, 1);\n const days: Date[] = [];\n while (days.length !== howMany) {\n date.setDate(date.getDate() - 1);\n days.push(new Date(date));\n }\n return days.reverse();\n};\nexport const getFirstXDaysFromNextMonth = (month: number, year: number, howMany: number): Date[] => {\n const date = sumMonths(new Date(year, month, 1), 1);\n const days: Date[] = [];\n while (days.length !== howMany) {\n days.push(new Date(date));\n date.setDate(date.getDate() + 1);\n }\n return days;\n};\n\nexport const getSixBySevenCurrentMonthDaysMatrix = (\n month: number,\n year: number,\n): DSControlledDateTimePickerInternalsT.MetaMonthDay[] => {\n const currentMonthDays = getDaysInMonth(month, year).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: false,\n isCurrMonthDay: true,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n const firstDayOfTheMonthWeekDay = currentMonthDays?.[0]?.day?.getDay();\n const previousMonthDaysToPrepend = getLastXDaysFromPreviousMonth(month, year, firstDayOfTheMonthWeekDay).map(\n (day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }),\n );\n const lastDayOfTheMonthWeekDay = currentMonthDays?.[currentMonthDays.length - 1]?.day?.getDay();\n const nextMonthDaysToAppend = getFirstXDaysFromNextMonth(month, year, 6 - lastDayOfTheMonthWeekDay).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n\n const allDays = [...previousMonthDaysToPrepend, ...currentMonthDays, ...nextMonthDaysToAppend];\n\n // we want to be sure that we have 6 rows and 7 columns always (worst case scenario - this ensure no jump of popperjs when changing months)\n const is6by7 = allDays.length === 42;\n if (is6by7) return allDays;\n\n // by default we prepend an extra week of previous month days\n const daysBefore = 7 + firstDayOfTheMonthWeekDay;\n // and we append just enough days to fill the 6th row of the current month\n let daysAfter = 6 - lastDayOfTheMonthWeekDay;\n // in some extreme cases we might have 4 rows and 7 columns (e.g. February 2026)\n // we can check it by checking that previousMonthDaysToPrepend length is 0 + currentMonthDays length is 28 + nextMonthDaysToAppend length is 0\n const is4by7 =\n previousMonthDaysToPrepend.length === 0 && currentMonthDays.length === 28 && nextMonthDaysToAppend.length === 0;\n if (is4by7) {\n // in this case we append an extra week of next month days\n daysAfter = 7;\n }\n\n // we add a \"previous month\" rows at the start of the array to make sure we have 6 rows\n const previousMonthDaysToPrepend2 = getLastXDaysFromPreviousMonth(month, year, daysBefore).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n const nextMonthDaysToAppend2 = getFirstXDaysFromNextMonth(month, year, daysAfter).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n\n return [...previousMonthDaysToPrepend2, ...currentMonthDays, ...nextMonthDaysToAppend2];\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { createRef } from 'react';\nimport { monthNames } from './constants.js';\nimport { prependStringWithPlaceHolders, deconstructValuesFromDateString, isIncompleteString } from './stringHelpers.js';\nimport { convertToPositiveNumberIfPossible } from './numberHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../sharedTypes.js';\n\nexport const getDateValuesFromDate = (day: Date): DateValuesT => ({\n month: day?.getMonth?.() as DSControlledDateTimePickerInternalsT.DateMonth,\n day: day?.getDate?.() as DSControlledDateTimePickerInternalsT.DateDay,\n year: day?.getFullYear?.(),\n});\nexport const getDateStringFromDay = (day: Date): string => {\n const monthFromDay = prependStringWithPlaceHolders(`${day.getMonth() + 1}`, 2); // months from 1-12\n const dayFromDay = prependStringWithPlaceHolders(`${day.getDate()}`, 2);\n const yearFromDay = prependStringWithPlaceHolders(`${day.getFullYear()}`, 4);\n\n return `${monthFromDay}/${dayFromDay}/${yearFromDay}`;\n};\nexport const getTimeStringFromDay = (day: Date): string => {\n const hoursNum = day.getHours();\n const meridiem = hoursNum > 12 ? 'PM' : 'AM';\n const twelveHourFormat = hoursNum > 12 ? hoursNum - 12 : hoursNum;\n const minutesNum = day.getMinutes();\n\n const hoursFromDay = prependStringWithPlaceHolders(`${twelveHourFormat}`, 2);\n const minutesFromDay = prependStringWithPlaceHolders(`${minutesNum}`, 2);\n\n return `${hoursFromDay}:${minutesFromDay} ${meridiem}`;\n};\nexport const getMonthNameByMonthNumber = (monthNumber: number): string => monthNames[monthNumber];\nexport const isSameDateMoment = (dateA: Date, dateB: Date): boolean => dateA?.getTime?.() === dateB?.getTime?.();\n\nexport const compareTwoDatesDayEquality = (dayA: Date, dayB: Date): boolean => {\n const { day: currD, month: currM, year: currY } = getDateValuesFromDate(dayA);\n const { day: focusD, month: focusM, year: focusY } = getDateValuesFromDate(dayB);\n return currD === focusD && currM === focusM && currY === focusY;\n};\n\nexport const getLastDayOfMonth = (month: DSControlledDateTimePickerInternalsT.DateMonth, year: number): Date =>\n new Date(year, month + 1, 0);\nexport const isValidDayForTheMonth = (\n month: DSControlledDateTimePickerInternalsT.DateMonth,\n year: number,\n day: DSControlledDateTimePickerInternalsT.DateDay,\n): boolean => new Date(year, month, day)?.getMonth?.() === month;\nexport const getDayFromDateString = (dateString: string): Date | null => {\n const { month, day, year } = deconstructValuesFromDateString(dateString);\n const monthNum = convertToPositiveNumberIfPossible(month);\n const dayNum = convertToPositiveNumberIfPossible(day) as DSControlledDateTimePickerInternalsT.DateDay | -1;\n const yearNum = convertToPositiveNumberIfPossible(year);\n if (\n monthNum !== -1 &&\n dayNum !== -1 &&\n yearNum !== -1 &&\n isValidDayForTheMonth((monthNum - 1) as DSControlledDateTimePickerInternalsT.DateMonth, yearNum, dayNum)\n )\n return new Date(yearNum, monthNum - 1, dayNum);\n return null;\n};\nexport const isValidDayForTheMonthDateString = (dateString: string): boolean => {\n if (isIncompleteString(dateString)) return true;\n const { month } = deconstructValuesFromDateString(dateString);\n const monthInt = convertToPositiveNumberIfPossible(month);\n if (monthInt === -1) return false;\n const monthDateMonth = (monthInt - 1) as DSControlledDateTimePickerInternalsT.DateMonth;\n return getDayFromDateString(dateString)?.getMonth?.() === monthDateMonth;\n};\n\nexport const getValidationDateStringMetaInfo = (\n dateString: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n getIsOutOfRangeDay = (day: string) => false,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n getIsDisabledDay = (day: string) => false,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => {\n const metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = {};\n if (!isIncompleteString(dateString)) {\n metaInfo.isDayPresentInMonth = isValidDayForTheMonthDateString(dateString);\n if (!metaInfo.isDayPresentInMonth)\n metaInfo.suggestedErrorMsg = 'The selected day is not part of the selected month';\n const day = getDayFromDateString(dateString);\n if (day) {\n metaInfo.isOutOfRangeDay = getIsOutOfRangeDay(dateString);\n metaInfo.isDisabledDay = getIsDisabledDay(dateString);\n if (metaInfo.isOutOfRangeDay || metaInfo.isDisabledDay)\n metaInfo.suggestedErrorMsg = 'The selected day is not allowed';\n }\n }\n return metaInfo;\n};\n// code adapted from https://github.com/datejs/Datejs/blob/master/src/core.js\nexport const isLeapYear = (year: number): boolean => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n\nexport const getHowManyDaysInMonth = (year: number, month: number): number => {\n const daysPerMonth = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n return daysPerMonth[month];\n};\n\nexport const dateIsLeapYear = (date: Date): boolean => isLeapYear(date.getFullYear());\n\nexport const dateGetDaysInMonth = (date: Date): number => getHowManyDaysInMonth(date.getFullYear(), date.getMonth());\n\nexport const dateAddMonths = (date: Date, value: number): Date => {\n const copiedDate = new Date(date.getTime());\n const n = copiedDate.getDate();\n copiedDate.setDate(1);\n copiedDate.setMonth(copiedDate.getMonth() + value);\n copiedDate.setDate(Math.min(n, dateGetDaysInMonth(copiedDate)));\n return copiedDate;\n};\nexport const dateAddYear = (date: Date, value: number): Date => dateAddMonths(date, value * 12);\n\ninterface DateValuesT {\n month: DSControlledDateTimePickerInternalsT.DateMonth;\n year: number;\n day?: DSControlledDateTimePickerInternalsT.DateDay;\n}\ninterface DateSumValuesT {\n monthsToSum?: number;\n yearsToSum?: number;\n daysToSum?: number;\n}\n// sumFromDateValues supports negative values to \"subtract\"\nexport const sumFromDateValues = (\n { month, year, day = 1 }: DateValuesT,\n { monthsToSum = 0, yearsToSum = 0, daysToSum = 0 }: DateSumValuesT,\n): DateValuesT => {\n let newDate = new Date(year, month, day);\n if (yearsToSum) newDate = dateAddYear(newDate, yearsToSum);\n\n if (monthsToSum) newDate = dateAddMonths(newDate, monthsToSum);\n\n if (daysToSum) newDate.setDate(newDate.getDate() + daysToSum);\n\n return {\n month: newDate.getMonth() as DSControlledDateTimePickerInternalsT.DateMonth,\n day: newDate.getDate() as DSControlledDateTimePickerInternalsT.DateDay,\n year: newDate.getFullYear(),\n };\n};\nexport const sumValuesToDate = (day: Date, sumValues: DateSumValuesT): Date => {\n const dateAsVals = getDateValuesFromDate(day);\n const { month, year, day: newD } = sumFromDateValues(dateAsVals, sumValues);\n return new Date(year, month, newD);\n};\nexport const subtractYears = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setFullYear(date.getFullYear() - howManyMore);\n return newDate;\n};\nexport const subtractMonths = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setMonth(date.getMonth() - howManyMore);\n return newDate;\n};\nexport const sumMonths = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setMonth(date.getMonth() + howManyMore);\n return newDate;\n};\nexport const sumYears = (date: Date, howManyMore = 1): Date => {\n const newDate = new Date(date.getTime());\n newDate.setFullYear(date.getFullYear() + howManyMore);\n return newDate;\n};\n\nexport const getDaysInMonth = (month: number, year: number): Date[] => {\n const date = new Date(year, month, 1);\n const days: Date[] = [];\n while (date.getMonth() === month) {\n days.push(new Date(date));\n date.setDate(date.getDate() + 1);\n }\n return days;\n};\nexport const getLastXDaysFromPreviousMonth = (month: number, year: number, howMany: number): Date[] => {\n const date = new Date(year, month, 1);\n const days: Date[] = [];\n while (days.length !== howMany) {\n date.setDate(date.getDate() - 1);\n days.push(new Date(date));\n }\n return days.reverse();\n};\nexport const getFirstXDaysFromNextMonth = (month: number, year: number, howMany: number): Date[] => {\n const date = sumMonths(new Date(year, month, 1), 1);\n const days: Date[] = [];\n while (days.length !== howMany) {\n days.push(new Date(date));\n date.setDate(date.getDate() + 1);\n }\n return days;\n};\n\nexport const getSixBySevenCurrentMonthDaysMatrix = (\n month: number,\n year: number,\n): DSControlledDateTimePickerInternalsT.MetaMonthDay[] => {\n const currentMonthDays = getDaysInMonth(month, year).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: false,\n isCurrMonthDay: true,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n const firstDayOfTheMonthWeekDay = currentMonthDays?.[0]?.day?.getDay();\n const previousMonthDaysToPrepend = getLastXDaysFromPreviousMonth(month, year, firstDayOfTheMonthWeekDay).map(\n (day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }),\n );\n const lastDayOfTheMonthWeekDay = currentMonthDays?.[currentMonthDays.length - 1]?.day?.getDay();\n const nextMonthDaysToAppend = getFirstXDaysFromNextMonth(month, year, 6 - lastDayOfTheMonthWeekDay).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n\n const allDays = [...previousMonthDaysToPrepend, ...currentMonthDays, ...nextMonthDaysToAppend];\n\n // we want to be sure that we have 6 rows and 7 columns always (worst case scenario - this ensure no jump of popperjs when changing months)\n const is6by7 = allDays.length === 42;\n if (is6by7) return allDays;\n\n // by default we prepend an extra week of previous month days\n const daysBefore = 7 + firstDayOfTheMonthWeekDay;\n // and we append just enough days to fill the 6th row of the current month\n let daysAfter = 6 - lastDayOfTheMonthWeekDay;\n // in some extreme cases we might have 4 rows and 7 columns (e.g. February 2026)\n // we can check it by checking that previousMonthDaysToPrepend length is 0 + currentMonthDays length is 28 + nextMonthDaysToAppend length is 0\n const is4by7 =\n previousMonthDaysToPrepend.length === 0 && currentMonthDays.length === 28 && nextMonthDaysToAppend.length === 0;\n if (is4by7) {\n // in this case we append an extra week of next month days\n daysAfter = 7;\n }\n\n // we add a \"previous month\" rows at the start of the array to make sure we have 6 rows\n const previousMonthDaysToPrepend2 = getLastXDaysFromPreviousMonth(month, year, daysBefore).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n const nextMonthDaysToAppend2 = getFirstXDaysFromNextMonth(month, year, daysAfter).map((day) => ({\n day,\n dayAsString: getDateStringFromDay(day),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n isHidden: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n }));\n\n return [...previousMonthDaysToPrepend2, ...currentMonthDays, ...nextMonthDaysToAppend2];\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,+BAA+B,iCAAiC,0BAA0B;AACnG,SAAS,yCAAyC;AAI3C,MAAM,wBAAwB,CAAC,SAA4B;AAAA,EAChE,OAAO,KAAK,WAAW;AAAA,EACvB,KAAK,KAAK,UAAU;AAAA,EACpB,MAAM,KAAK,cAAc;AAC3B;AACO,MAAM,uBAAuB,CAAC,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ACvG;AAAA,IACA,aAAa,qBAAqB,GAAG;AAAA,IACrC,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,WAAW,UAA6B;AAAA,EAC1C,EAAE;AACF,QAAM,yBAAyB,2BAA2B,OAAO,MAAM,SAAS,EAAE,IAAI,CAAC,SAAS;AAAA,IAC9F;AAAA,IACA,aAAa,qBAAqB,GAAG;AAAA,IACrC,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,WAAW,UAA6B;AAAA,EAC1C,EAAE;AAEF,SAAO,CAAC,GAAG,6BAA6B,GAAG,kBAAkB,GAAG,sBAAsB;AACxF;",
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/utils/dateTimeHelpers.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getValidationDateStringMetaInfo } from './dateHelpers.js';\nimport { getValidationTimeStringMetaInfo } from './timeHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\n\ninterface Validators {\n getIsOutOfRangeDay: (day: string) => boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsDisabledTime: (val: string) => boolean;\n}\nexport const getValidationDateTimeStringMetaInfo = (\n dateString: string,\n timeString: string,\n validators: Validators,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => ({\n ...getValidationDateStringMetaInfo(dateString, validators.getIsOutOfRangeDay, validators.getIsDisabledDay),\n ...getValidationTimeStringMetaInfo(timeString, validators.getIsDisabledTime),\n});\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getValidationDateStringMetaInfo } from './dateHelpers.js';\nimport { getValidationTimeStringMetaInfo } from './timeHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';\n\ninterface Validators {\n getIsOutOfRangeDay: (day: string) => boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsDisabledTime: (val: string) => boolean;\n}\nexport const getValidationDateTimeStringMetaInfo = (\n dateString: string,\n timeString: string,\n validators: Validators,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => ({\n ...getValidationDateStringMetaInfo(dateString, validators.getIsOutOfRangeDay, validators.getIsDisabledDay),\n ...getValidationTimeStringMetaInfo(timeString, validators.getIsDisabledTime),\n});\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,uCAAuC;AAChD,SAAS,uCAAuC;AAQzC,MAAM,sCAAsC,CACjD,YACA,YACA,gBACuE;AAAA,EACvE,GAAG,gCAAgC,YAAY,WAAW,oBAAoB,WAAW,gBAAgB;AAAA,EACzG,GAAG,gCAAgC,YAAY,WAAW,iBAAiB;AAC7E;",
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/utils/timeHelpers.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isIncompleteString } from './stringHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../propTypes.js';\n\nexport const getValidationTimeStringMetaInfo = (\n timeString: string,\n getIsDisabledTime = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n timeS: string,\n ) => false,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => {\n const metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = {};\n if (!isIncompleteString(timeString)) {\n metaInfo.isDisabledTime = getIsDisabledTime(timeString);\n if (metaInfo.isDisabledTime) metaInfo.suggestedErrorMsg = 'The selected time is not allowed';\n }\n\n return metaInfo;\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isIncompleteString } from './stringHelpers.js';\nimport type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';\n\nexport const getValidationTimeStringMetaInfo = (\n timeString: string,\n getIsDisabledTime = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n timeS: string,\n ) => false,\n): Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> => {\n const metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = {};\n if (!isIncompleteString(timeString)) {\n metaInfo.isDisabledTime = getIsDisabledTime(timeString);\n if (metaInfo.isDisabledTime) metaInfo.suggestedErrorMsg = 'The selected time is not allowed';\n }\n\n return metaInfo;\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,0BAA0B;AAG5B,MAAM,kCAAkC,CAC7C,YACA,oBAAoB,CAElB,UACG,UACiE;AACtE,QAAM,WAA8E,CAAC;AACrF,MAAI,CAAC,mBAAmB,UAAU,GAAG;AACnC,aAAS,iBAAiB,kBAAkB,UAAU;AACtD,QAAI,SAAS;AAAgB,eAAS,oBAAoB;AAAA,EAC5D;AAEA,SAAO;AACT;",
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/utils/typeGuards.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSControlledDateTimePickerT } from '../propTypes.js';\n\nconst dateTimeTypes = ['full-date-time', 'date-time-inputs', 'date-time-picker', 'date-time-picker-controller-only'];\nconst dateTypes = ['full-date', 'date-inputs', 'date-picker', 'date-picker-controller-only'];\nconst timeTypes = ['full-time', 'time-inputs', 'time-picker', 'time-picker-controller-only'];\n\nexport const getIsDateTime = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.DateTimePickerProps | DSControlledDateTimePickerT.InternalDateTimePickerProps =>\n dateTimeTypes.includes(props.type);\n\nexport const getIsDate = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.DatePickerProps | DSControlledDateTimePickerT.InternalDatePickerProps =>\n dateTypes.includes(props.type);\n\nexport const getIsTime = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.TimePickerProps | DSControlledDateTimePickerT.InternalTimePickerProps =>\n timeTypes.includes(props.type);\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';\n\nconst dateTimeTypes = ['full-date-time', 'date-time-inputs', 'date-time-picker', 'date-time-picker-controller-only'];\nconst dateTypes = ['full-date', 'date-inputs', 'date-picker', 'date-picker-controller-only'];\nconst timeTypes = ['full-time', 'time-inputs', 'time-picker', 'time-picker-controller-only'];\n\nexport const getIsDateTime = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.DateTimePickerProps | DSControlledDateTimePickerT.InternalDateTimePickerProps =>\n dateTimeTypes.includes(props.type);\n\nexport const getIsDate = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.DatePickerProps | DSControlledDateTimePickerT.InternalDatePickerProps =>\n dateTypes.includes(props.type);\n\nexport const getIsTime = (\n props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps,\n): props is DSControlledDateTimePickerT.TimePickerProps | DSControlledDateTimePickerT.InternalTimePickerProps =>\n timeTypes.includes(props.type);\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,gBAAgB,CAAC,kBAAkB,oBAAoB,oBAAoB,kCAAkC;AACnH,MAAM,YAAY,CAAC,aAAa,eAAe,eAAe,6BAA6B;AAC3F,MAAM,YAAY,CAAC,aAAa,eAAe,eAAe,6BAA6B;AAEpF,MAAM,gBAAgB,CAC3B,UAEA,cAAc,SAAS,MAAM,IAAI;AAE5B,MAAM,YAAY,CACvB,UAEA,UAAU,SAAS,MAAM,IAAI;AAExB,MAAM,YAAY,CACvB,UAEA,UAAU,SAAS,MAAM,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,5 @@
1
- import type { DSControlledDateTimePickerT } from './propTypes.js';
1
+ /// <reference types="react" />
2
+ import type { DSControlledDateTimePickerT } from './react-desc-prop-types.js';
2
3
  declare const DSControlledDateTimePicker: {
3
4
  (props: DSControlledDateTimePickerT.Props): JSX.Element;
4
5
  displayName: string;
@@ -3,7 +3,7 @@ import type { useGetDestructuredValues } from './useGetDestructuredValues.js';
3
3
  import type { useGetPropsBasedOnType } from './useGetPropsBasedOnType.js';
4
4
  import type { useGetReferences } from './useGetReferences.js';
5
5
  import type { useFocusTracker } from './useFocusTracker.js';
6
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
6
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
7
7
  import type { DSControlledDateTimePickerInternalsT } from '../sharedTypes.js';
8
8
  interface Config {
9
9
  relevantValues: ReturnType<typeof useRelevantValueFromProps>;
@@ -6,7 +6,7 @@ import { useGetPropsBasedOnType } from './useGetPropsBasedOnType.js';
6
6
  import { useGetDestructuredValues } from './useGetDestructuredValues.js';
7
7
  import { useChangeHandlers } from './useChangeHandlers.js';
8
8
  import { useGlobalKeyHandlers } from './useGlobalKeyHandlers.js';
9
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
9
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
10
10
  export type ControlledDateTimePickerContextT = ReturnType<typeof useGetFlags> & ReturnType<typeof useFocusTracker> & ReturnType<typeof useGetReferences> & ReturnType<typeof useGetPropsBasedOnType> & ReturnType<typeof useRelevantValueFromProps> & ReturnType<typeof useGetDestructuredValues> & ReturnType<typeof useChangeHandlers> & ReturnType<typeof useGlobalKeyHandlers> & {
11
11
  props: DSControlledDateTimePickerT.InternalProps;
12
12
  getProps: () => DSControlledDateTimePickerT.InternalProps;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
2
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
3
3
  export declare const useGetFlags: (props: DSControlledDateTimePickerT.InternalProps) => {
4
4
  hideDatePicker: boolean;
5
5
  hideTimePicker: boolean;
@@ -1,4 +1,4 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  export declare const useGetPropsBasedOnType: (propsWithDefaults: DSControlledDateTimePickerT.InternalProps) => {
3
3
  getIsDisabledDay: BooleanGetter<string>;
4
4
  getIsOutOfRangeDay: BooleanGetter<string>;
@@ -1,2 +1,2 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  export declare const useGetDatePickerWithDefaultsProps: (props: DSControlledDateTimePickerT.Props) => DSControlledDateTimePickerT.InternalProps;
@@ -3,7 +3,7 @@ import type { useGetPropsBasedOnType } from './useGetPropsBasedOnType.js';
3
3
  import type { useGetReferences } from './useGetReferences.js';
4
4
  import type { useGetFlags } from './useGetFlags.js';
5
5
  import type { useFocusTracker } from './useFocusTracker.js';
6
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
6
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
7
7
  interface Config {
8
8
  propsBasedOnType: ReturnType<typeof useGetPropsBasedOnType>;
9
9
  changeHandlers: ReturnType<typeof useChangeHandlers>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
2
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
3
3
  export declare const useRelevantValueFromProps: (props: DSControlledDateTimePickerT.InternalProps) => {
4
4
  dateStringFromProps: string;
5
5
  timeStringFromProps: string;
@@ -1,2 +1,2 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  export declare const useValidateProps: (props: DSControlledDateTimePickerT.Props) => void;
@@ -2,6 +2,16 @@ export declare const DSControlledDateTimePickerName = "DSControlledDateTimePicke
2
2
  export declare const DSControlledDateTimePickerSlots: {
3
3
  CONTAINER: string;
4
4
  INPUT: string;
5
+ DATE_INPUTS: {
6
+ MONTH: string;
7
+ DAY: string;
8
+ YEAR: string;
9
+ };
10
+ TIME_INPUTS: {
11
+ HOUR: string;
12
+ MINUTE: string;
13
+ MERIDIEM: string;
14
+ };
5
15
  PICKER_ICONS: {
6
16
  CALENDAR: string;
7
17
  TIMEWHEEL: string;
@@ -6,4 +6,4 @@ export { getValidationDateTimeStringMetaInfo } from './utils/dateTimeHelpers.js'
6
6
  export { getValidationDateStringMetaInfo, getDateStringFromDay, getDayFromDateString, getDateValuesFromDate, } from './utils/dateHelpers.js';
7
7
  export { getValidationTimeStringMetaInfo } from './utils/timeHelpers.js';
8
8
  export { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from './exported-related/theming.js';
9
- export { type DSControlledDateTimePickerT } from './propTypes.js';
9
+ export { type DSControlledDateTimePickerT } from './react-desc-prop-types.js';
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const ClearButton: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const ControlledDateTimePickerContent: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const DateInputs: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const WrappedCalendarContext: ({ children }: {
2
3
  children: JSX.Element;
3
4
  }) => import("react/jsx-runtime.js").JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarContent: ({ className }: {
2
3
  className?: string | undefined;
3
4
  }) => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarHead: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarIconTrigger: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarMonthDays: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarWrapper: () => JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';
2
3
  interface CalendarDayPropsT {
3
4
  metaDay: DSControlledDateTimePickerInternalsT.MetaMonthDay;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarWithTimeWheelContent: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CalendarWithTimeWheelIconTrigger: () => JSX.Element;
@@ -1 +1 @@
1
- export declare const CalendarWithTimeWheelWrapper: () => JSX.Element;
1
+ export declare const CalendarWithTimeWheelWrapper: () => import("react/jsx-runtime.js").JSX.Element | null;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const PickersIcons: () => JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const HoursList: () => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  export declare const MeridiemList: () => JSX.Element;
2
3
  export default MeridiemList;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  export declare const MinutesList: () => JSX.Element;
2
3
  export default MinutesList;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const WrappedTimeWheelContext: ({ children }: {
2
3
  children: JSX.Element;
3
4
  }) => import("react/jsx-runtime.js").JSX.Element;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const TimeWheelIconTrigger: () => JSX.Element;
@@ -1 +1 @@
1
- export declare const TimeWheelWrapper: () => JSX.Element;
1
+ export declare const TimeWheelWrapper: () => import("react/jsx-runtime.js").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import type { DSControlledDateTimePickerT } from '../../../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../../../react-desc-prop-types.js';
2
2
  interface UseCurrentDisplayedWheelsLogic {
3
3
  currHourNum: number;
4
4
  visibleHours: (string | null)[];
@@ -2,11 +2,18 @@
2
2
  export declare const StyledSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
3
3
  export declare const StyledColonSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
4
4
  export declare const Styled2DigitsInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
5
+ export declare const StyledDateInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
6
+ export declare const StyledMonthInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
7
+ export declare const StyledYearInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
8
+ export declare const StyledHourInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
9
+ export declare const StyledMinuteInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
10
+ export declare const StyledMeridiemInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
5
11
  export declare const StyledMin4DigitsInput: import("styled-components").StyledComponent<import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
6
12
  export declare const StyledInputsWrapperGrid: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
7
13
  isControllerOnly: boolean;
8
14
  hasError: boolean;
9
15
  justPicker: boolean;
16
+ disabled: boolean;
10
17
  } & import("@elliemae/ds-system").OwnerInterface, never>;
11
18
  export declare const StyledDateInputsWrapperGrid: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
12
19
  export declare const StyledTimeInputsWrapperGrid: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const TimeInputs: () => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import type { DSControlledDateTimePickerT } from './propTypes.js';
2
+ import type { DSControlledDateTimePickerT } from './react-desc-prop-types.js';
3
3
  export declare namespace DSControlledDateTimePickerInternalsT {
4
4
  type DateDay = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
5
5
  type DateMonth = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
@@ -1,4 +1,4 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  import type { DSControlledDateTimePickerInternalsT } from '../sharedTypes.js';
3
3
  export declare const getDateValuesFromDate: (day: Date) => DateValuesT;
4
4
  export declare const getDateStringFromDay: (day: Date) => string;
@@ -1,4 +1,4 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  interface Validators {
3
3
  getIsOutOfRangeDay: (day: string) => boolean;
4
4
  getIsDisabledDay: (day: string) => boolean;
@@ -1,2 +1,2 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  export declare const getValidationTimeStringMetaInfo: (timeString: string, getIsDisabledTime?: (timeS: string) => boolean) => Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo>;
@@ -1,4 +1,4 @@
1
- import type { DSControlledDateTimePickerT } from '../propTypes.js';
1
+ import type { DSControlledDateTimePickerT } from '../react-desc-prop-types.js';
2
2
  export declare const getIsDateTime: (props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps) => props is DSControlledDateTimePickerT.DateTimePickerProps | DSControlledDateTimePickerT.InternalDateTimePickerProps;
3
3
  export declare const getIsDate: (props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps) => props is DSControlledDateTimePickerT.DatePickerProps | DSControlledDateTimePickerT.InternalDatePickerProps;
4
4
  export declare const getIsTime: (props: DSControlledDateTimePickerT.Props | DSControlledDateTimePickerT.InternalProps) => props is DSControlledDateTimePickerT.TimePickerProps | DSControlledDateTimePickerT.InternalTimePickerProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-date-time-picker",
3
- "version": "3.22.0-next.2",
3
+ "version": "3.22.0-next.21",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Date Time Picker",
6
6
  "files": [
@@ -35,22 +35,24 @@
35
35
  "indent": 4
36
36
  },
37
37
  "dependencies": {
38
- "@elliemae/ds-popperjs": "3.22.0-next.2",
39
- "@elliemae/ds-button-v2": "3.22.0-next.2",
40
- "@elliemae/ds-props-helpers": "3.22.0-next.2",
41
- "@elliemae/ds-icons": "3.22.0-next.2",
42
- "@elliemae/ds-grid": "3.22.0-next.2",
43
- "@elliemae/ds-system": "3.22.0-next.2",
44
- "@elliemae/ds-utilities": "3.22.0-next.2"
38
+ "@elliemae/ds-grid": "3.22.0-next.21",
39
+ "@elliemae/ds-button-v2": "3.22.0-next.21",
40
+ "@elliemae/ds-icons": "3.22.0-next.21",
41
+ "@elliemae/ds-popperjs": "3.22.0-next.21",
42
+ "@elliemae/ds-system": "3.22.0-next.21",
43
+ "@elliemae/ds-props-helpers": "3.22.0-next.21",
44
+ "@elliemae/ds-utilities": "3.22.0-next.21"
45
45
  },
46
46
  "devDependencies": {
47
+ "@elliemae/pui-cli": "~9.0.0-next.22",
47
48
  "@elliemae/pui-theme": "~2.7.0",
48
49
  "@testing-library/dom": "~8.19.0",
49
50
  "@testing-library/jest-dom": "~5.16.5",
50
51
  "@testing-library/react": "~12.1.3",
51
52
  "@testing-library/user-event": "~13.5.0",
52
53
  "styled-components": "~5.3.9",
53
- "styled-system": "~5.1.5"
54
+ "styled-system": "~5.1.5",
55
+ "@elliemae/ds-monorepo-devops": "3.22.0-next.21"
54
56
  },
55
57
  "peerDependencies": {
56
58
  "@elliemae/pui-theme": "~2.7.0",
@@ -65,7 +67,7 @@
65
67
  },
66
68
  "scripts": {
67
69
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
68
- "test": "node ../../scripts/testing/test.mjs",
70
+ "test": "pui-cli test --passWithNoTests",
69
71
  "lint": "node ../../scripts/lint.mjs",
70
72
  "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
71
73
  "dts": "node ../../scripts/dts.mjs",