@fluentui/react-datepicker-compat 0.1.4 → 0.1.6

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 (257) hide show
  1. package/CHANGELOG.json +169 -1
  2. package/CHANGELOG.md +43 -2
  3. package/dist/index.d.ts +4 -1
  4. package/lib/Calendar.js +0 -1
  5. package/lib/Calendar.js.map +1 -1
  6. package/lib/CalendarDay.js +0 -1
  7. package/lib/CalendarDay.js.map +1 -1
  8. package/lib/CalendarDayGrid.js +0 -1
  9. package/lib/CalendarDayGrid.js.map +1 -1
  10. package/lib/CalendarMonth.js +0 -1
  11. package/lib/CalendarMonth.js.map +1 -1
  12. package/lib/CalendarPicker.js +0 -1
  13. package/lib/CalendarPicker.js.map +1 -1
  14. package/lib/CalendarYear.js +0 -1
  15. package/lib/CalendarYear.js.map +1 -1
  16. package/lib/DatePicker.js +0 -1
  17. package/lib/DatePicker.js.map +1 -1
  18. package/lib/components/Calendar/Calendar.js +278 -300
  19. package/lib/components/Calendar/Calendar.js.map +1 -1
  20. package/lib/components/Calendar/Calendar.types.js +7 -12
  21. package/lib/components/Calendar/Calendar.types.js.map +1 -1
  22. package/lib/components/Calendar/defaults.js +0 -1
  23. package/lib/components/Calendar/defaults.js.map +1 -1
  24. package/lib/components/Calendar/index.js +0 -1
  25. package/lib/components/Calendar/index.js.map +1 -1
  26. package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  27. package/lib/components/CalendarDay/CalendarDay.js +100 -128
  28. package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
  29. package/lib/components/CalendarDay/CalendarDay.types.js +0 -1
  30. package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -1
  31. package/lib/components/CalendarDay/index.js +0 -1
  32. package/lib/components/CalendarDay/index.js.map +1 -1
  33. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  34. package/lib/components/CalendarDayGrid/CalendarDayGrid.js +146 -159
  35. package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  36. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -1
  37. package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
  38. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +150 -179
  39. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
  40. package/lib/components/CalendarDayGrid/CalendarGridRow.js +20 -34
  41. package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
  42. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +29 -39
  43. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
  44. package/lib/components/CalendarDayGrid/index.js +0 -1
  45. package/lib/components/CalendarDayGrid/index.js.map +1 -1
  46. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  47. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
  48. package/lib/components/CalendarDayGrid/useWeeks.js +34 -36
  49. package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
  50. package/lib/components/CalendarMonth/CalendarMonth.js +238 -258
  51. package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
  52. package/lib/components/CalendarMonth/CalendarMonth.types.js +0 -1
  53. package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
  54. package/lib/components/CalendarMonth/index.js +0 -1
  55. package/lib/components/CalendarMonth/index.js.map +1 -1
  56. package/lib/components/CalendarMonth/useCalendarMonthStyles.js +2 -4
  57. package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
  58. package/lib/components/CalendarPicker/CalendarPicker.types.js +1 -2
  59. package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
  60. package/lib/components/CalendarPicker/index.js +0 -1
  61. package/lib/components/CalendarPicker/index.js.map +1 -1
  62. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  63. package/lib/components/CalendarYear/CalendarYear.js +260 -312
  64. package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
  65. package/lib/components/CalendarYear/CalendarYear.types.js +0 -1
  66. package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -1
  67. package/lib/components/CalendarYear/index.js +0 -1
  68. package/lib/components/CalendarYear/index.js.map +1 -1
  69. package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
  70. package/lib/components/DatePicker/DatePicker.js +4 -5
  71. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  72. package/lib/components/DatePicker/DatePicker.types.js +0 -1
  73. package/lib/components/DatePicker/DatePicker.types.js.map +1 -1
  74. package/lib/components/DatePicker/defaults.js +9 -10
  75. package/lib/components/DatePicker/defaults.js.map +1 -1
  76. package/lib/components/DatePicker/index.js +0 -1
  77. package/lib/components/DatePicker/index.js.map +1 -1
  78. package/lib/components/DatePicker/renderDatePicker.js +5 -12
  79. package/lib/components/DatePicker/renderDatePicker.js.map +1 -1
  80. package/lib/components/DatePicker/useDatePicker.js +402 -354
  81. package/lib/components/DatePicker/useDatePicker.js.map +1 -1
  82. package/lib/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
  83. package/lib/index.js +0 -1
  84. package/lib/index.js.map +1 -1
  85. package/lib/utils/animations.js +72 -73
  86. package/lib/utils/animations.js.map +1 -1
  87. package/lib/utils/constants.js +50 -52
  88. package/lib/utils/constants.js.map +1 -1
  89. package/lib/utils/dateFormatting/dateFormatting.defaults.js +71 -34
  90. package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
  91. package/lib/utils/dateFormatting/dateFormatting.types.js +1 -2
  92. package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -1
  93. package/lib/utils/dateFormatting/index.js +0 -1
  94. package/lib/utils/dateFormatting/index.js.map +1 -1
  95. package/lib/utils/dateGrid/dateGrid.types.js +1 -2
  96. package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
  97. package/lib/utils/dateGrid/findAvailableDate.js +14 -21
  98. package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
  99. package/lib/utils/dateGrid/getBoundedDateRange.js +11 -11
  100. package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
  101. package/lib/utils/dateGrid/getDateRangeTypeToUse.js +6 -8
  102. package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  103. package/lib/utils/dateGrid/getDayGrid.js +59 -73
  104. package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
  105. package/lib/utils/dateGrid/index.js +0 -1
  106. package/lib/utils/dateGrid/index.js.map +1 -1
  107. package/lib/utils/dateGrid/isAfterMaxDate.js +3 -7
  108. package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  109. package/lib/utils/dateGrid/isBeforeMinDate.js +3 -7
  110. package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  111. package/lib/utils/dateGrid/isContiguous.js +11 -12
  112. package/lib/utils/dateGrid/isContiguous.js.map +1 -1
  113. package/lib/utils/dateGrid/isRestrictedDate.js +7 -13
  114. package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
  115. package/lib/utils/dateMath/dateMath.js +179 -198
  116. package/lib/utils/dateMath/dateMath.js.map +1 -1
  117. package/lib/utils/dateMath/index.js +0 -1
  118. package/lib/utils/dateMath/index.js.map +1 -1
  119. package/lib/utils/dom.js +5 -6
  120. package/lib/utils/dom.js.map +1 -1
  121. package/lib/utils/focus.js +17 -19
  122. package/lib/utils/focus.js.map +1 -1
  123. package/lib/utils/index.js +0 -1
  124. package/lib/utils/index.js.map +1 -1
  125. package/lib/utils/usePopupPositioning.js +12 -16
  126. package/lib/utils/usePopupPositioning.js.map +1 -1
  127. package/lib-commonjs/Calendar.js +0 -3
  128. package/lib-commonjs/Calendar.js.map +1 -1
  129. package/lib-commonjs/CalendarDay.js +0 -3
  130. package/lib-commonjs/CalendarDay.js.map +1 -1
  131. package/lib-commonjs/CalendarDayGrid.js +0 -3
  132. package/lib-commonjs/CalendarDayGrid.js.map +1 -1
  133. package/lib-commonjs/CalendarMonth.js +0 -3
  134. package/lib-commonjs/CalendarMonth.js.map +1 -1
  135. package/lib-commonjs/CalendarPicker.js +0 -3
  136. package/lib-commonjs/CalendarPicker.js.map +1 -1
  137. package/lib-commonjs/CalendarYear.js +0 -3
  138. package/lib-commonjs/CalendarYear.js.map +1 -1
  139. package/lib-commonjs/DatePicker.js +0 -3
  140. package/lib-commonjs/DatePicker.js.map +1 -1
  141. package/lib-commonjs/components/Calendar/Calendar.js +1 -3
  142. package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
  143. package/lib-commonjs/components/Calendar/Calendar.types.js +5 -7
  144. package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
  145. package/lib-commonjs/components/Calendar/defaults.js +1 -3
  146. package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
  147. package/lib-commonjs/components/Calendar/index.js +0 -3
  148. package/lib-commonjs/components/Calendar/index.js.map +1 -1
  149. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +0 -2
  150. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  151. package/lib-commonjs/components/CalendarDay/CalendarDay.js +1 -3
  152. package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
  153. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +0 -3
  154. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
  155. package/lib-commonjs/components/CalendarDay/index.js +0 -3
  156. package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
  157. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +0 -2
  158. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  159. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +7 -9
  160. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  161. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -3
  162. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
  163. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +1 -3
  164. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
  165. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +1 -3
  166. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
  167. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +1 -3
  168. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
  169. package/lib-commonjs/components/CalendarDayGrid/index.js +0 -3
  170. package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
  171. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +0 -2
  172. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  173. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +0 -2
  174. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
  175. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +9 -11
  176. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
  177. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +1 -3
  178. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
  179. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +0 -3
  180. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
  181. package/lib-commonjs/components/CalendarMonth/index.js +0 -3
  182. package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
  183. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +1 -3
  184. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
  185. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +0 -3
  186. package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -1
  187. package/lib-commonjs/components/CalendarPicker/index.js +0 -3
  188. package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
  189. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +0 -2
  190. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  191. package/lib-commonjs/components/CalendarYear/CalendarYear.js +1 -3
  192. package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
  193. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +0 -3
  194. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
  195. package/lib-commonjs/components/CalendarYear/index.js +0 -3
  196. package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
  197. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +0 -2
  198. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
  199. package/lib-commonjs/components/DatePicker/DatePicker.js +1 -3
  200. package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -1
  201. package/lib-commonjs/components/DatePicker/DatePicker.types.js +0 -3
  202. package/lib-commonjs/components/DatePicker/DatePicker.types.js.map +1 -1
  203. package/lib-commonjs/components/DatePicker/defaults.js +1 -3
  204. package/lib-commonjs/components/DatePicker/defaults.js.map +1 -1
  205. package/lib-commonjs/components/DatePicker/index.js +0 -3
  206. package/lib-commonjs/components/DatePicker/index.js.map +1 -1
  207. package/lib-commonjs/components/DatePicker/renderDatePicker.js +1 -3
  208. package/lib-commonjs/components/DatePicker/renderDatePicker.js.map +1 -1
  209. package/lib-commonjs/components/DatePicker/useDatePicker.js +14 -17
  210. package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -1
  211. package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js +0 -2
  212. package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
  213. package/lib-commonjs/index.js +0 -3
  214. package/lib-commonjs/index.js.map +1 -1
  215. package/lib-commonjs/utils/animations.js +4 -6
  216. package/lib-commonjs/utils/animations.js.map +1 -1
  217. package/lib-commonjs/utils/constants.js +7 -9
  218. package/lib-commonjs/utils/constants.js.map +1 -1
  219. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +1 -3
  220. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
  221. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +0 -3
  222. package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -1
  223. package/lib-commonjs/utils/dateFormatting/index.js +0 -3
  224. package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
  225. package/lib-commonjs/utils/dateGrid/dateGrid.types.js +0 -3
  226. package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -1
  227. package/lib-commonjs/utils/dateGrid/findAvailableDate.js +1 -3
  228. package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
  229. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +1 -3
  230. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
  231. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +1 -3
  232. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  233. package/lib-commonjs/utils/dateGrid/getDayGrid.js +1 -3
  234. package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
  235. package/lib-commonjs/utils/dateGrid/index.js +0 -3
  236. package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
  237. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +1 -3
  238. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  239. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +1 -3
  240. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  241. package/lib-commonjs/utils/dateGrid/isContiguous.js +1 -3
  242. package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
  243. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +1 -3
  244. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
  245. package/lib-commonjs/utils/dateMath/dateMath.js +1 -3
  246. package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
  247. package/lib-commonjs/utils/dateMath/index.js +0 -3
  248. package/lib-commonjs/utils/dateMath/index.js.map +1 -1
  249. package/lib-commonjs/utils/dom.js +1 -3
  250. package/lib-commonjs/utils/dom.js.map +1 -1
  251. package/lib-commonjs/utils/focus.js +1 -3
  252. package/lib-commonjs/utils/focus.js.map +1 -1
  253. package/lib-commonjs/utils/index.js +0 -3
  254. package/lib-commonjs/utils/index.js.map +1 -1
  255. package/lib-commonjs/utils/usePopupPositioning.js +1 -3
  256. package/lib-commonjs/utils/usePopupPositioning.js.map +1 -1
  257. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DatePicker/useDatePicker.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowDown, Enter, Escape } from '@fluentui/keyboard-keys';\nimport { Calendar } from '../Calendar/Calendar';\nimport { CalendarMonthRegular } from '@fluentui/react-icons';\nimport { compareDatePart, DayOfWeek, FirstWeekOfYear } from '../../utils';\nimport { defaultDatePickerStrings } from './defaults';\nimport { Input } from '@fluentui/react-input';\nimport { mergeCallbacks, resolveShorthand, useControllableState, useId, useMergedRefs, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';\nimport { useFieldContext_unstable as useFieldContext } from '@fluentui/react-field';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopupPositioning } from '../../utils/usePopupPositioning';\nfunction isDateOutOfBounds(date, minDate, maxDate) {\n return !!minDate && compareDatePart(minDate, date) > 0 || !!maxDate && compareDatePart(maxDate, date) < 0;\n}\nfunction useFocusLogic() {\n const inputRef = React.useRef(null);\n const preventFocusOpeningPicker = React.useRef(false);\n const focus = () => {\n var _inputRef_current, _inputRef_current_focus;\n (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : (_inputRef_current_focus = _inputRef_current.focus) === null || _inputRef_current_focus === void 0 ? void 0 : _inputRef_current_focus.call(_inputRef_current);\n };\n const preventNextFocusOpeningPicker = () => {\n preventFocusOpeningPicker.current = true;\n };\n return [focus, inputRef, preventFocusOpeningPicker, preventNextFocusOpeningPicker];\n}\nfunction usePopupVisibility(props) {\n const [open, setOpen] = useControllableState({\n initialState: false,\n defaultState: props.defaultOpen,\n state: props.open\n });\n const isMounted = React.useRef(false);\n React.useEffect(() => {\n if (isMounted.current && !open) {\n var\n // If DatePicker's menu (Calendar) is closed, run onAfterMenuDismiss\n _props_onOpenChange;\n (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 ? void 0 : _props_onOpenChange.call(props, false);\n }\n isMounted.current = true;\n },\n // Should only run on allowTextInput or open change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [props.allowTextInput, open]);\n return [open, setOpen];\n}\nfunction useSelectedDate({\n formatDate,\n onSelectDate,\n value\n}) {\n const [selectedDate, setSelectedDateState] = useControllableState({\n initialState: undefined,\n state: value\n });\n const [formattedDate, setFormattedDate] = React.useState(() => value && formatDate ? formatDate(value) : '');\n const setSelectedDate = newDate => {\n if (selectedDate === undefined && newDate !== undefined || selectedDate !== undefined && newDate === undefined || newDate && selectedDate && (newDate > selectedDate || newDate < selectedDate)) {\n onSelectDate === null || onSelectDate === void 0 ? void 0 : onSelectDate(newDate);\n }\n setSelectedDateState(newDate);\n setFormattedDate(newDate && formatDate ? formatDate(newDate) : '');\n };\n React.useEffect(() => {\n setFormattedDate(value && formatDate ? formatDate(value) : '');\n }, [formatDate, value]);\n return [selectedDate, formattedDate, setSelectedDate, setFormattedDate];\n}\nconst defaultFormatDate = date => date ? date.toDateString() : '';\nconst defaultParseDateFromString = dateStr => {\n const date = Date.parse(dateStr);\n return date ? new Date(date) : null;\n};\n/**\n * Create the state required to render DatePicker.\n *\n * The returned state can be modified with hooks such as useDatePickerStyles_unstable,\n * before being passed to renderDatePicker_unstable.\n *\n * @param props - props from this instance of DatePicker\n * @param ref - reference to root Input slot\n */\nexport const useDatePicker_unstable = (props, ref) => {\n const {\n allowTextInput = false,\n allFocusable = false,\n borderless = false,\n dateTimeFormatter,\n defaultOpen = false,\n disableAutoFocus = true,\n firstDayOfWeek = DayOfWeek.Sunday,\n firstWeekOfYear = FirstWeekOfYear.FirstDay,\n formatDate = defaultFormatDate,\n highlightCurrentMonth = false,\n highlightSelectedMonth = false,\n initialPickerDate = new Date(),\n inlinePopup = false,\n isMonthPickerVisible = true,\n maxDate,\n minDate,\n onOpenChange,\n onSelectDate: onUserSelectDate,\n openOnClick = true,\n onValidationResult,\n parseDateFromString = defaultParseDateFromString,\n showCloseButton = false,\n showGoToToday = true,\n showMonthPickerAsOverlay = false,\n showWeekNumbers = false,\n strings = defaultDatePickerStrings,\n today,\n underlined = false,\n value,\n ...restOfProps\n } = props;\n const calendar = React.useRef(null);\n const [focus, rootRef, preventFocusOpeningPicker, preventNextFocusOpeningPicker] = useFocusLogic();\n const [selectedDate, formattedDate, setSelectedDate, setFormattedDate] = useSelectedDate({\n formatDate,\n onSelectDate: onUserSelectDate,\n value\n });\n const [open, setOpenState] = usePopupVisibility(props);\n const fieldContext = useFieldContext();\n var _fieldContext_required;\n const required = (_fieldContext_required = fieldContext === null || fieldContext === void 0 ? void 0 : fieldContext.required) !== null && _fieldContext_required !== void 0 ? _fieldContext_required : props.required;\n const popupSurfaceId = useId('datePicker-popupSurface');\n const validateTextInput = React.useCallback((date = null) => {\n let error;\n if (allowTextInput) {\n if (formattedDate || date) {\n // Don't parse if the selected date has the same formatted string as what we're about to parse.\n // The formatted string might be ambiguous (ex: \"1/2/3\" or \"New Year Eve\") and the parser might\n // not be able to come up with the exact same date.\n if (selectedDate && formatDate && formatDate(date !== null && date !== void 0 ? date : selectedDate) === formattedDate) {\n return;\n }\n date = date || parseDateFromString(formattedDate);\n // Check if date is null or date is an invalid date\n if (!date || isNaN(date.getTime())) {\n // Reset input if formatting is available\n setSelectedDate(selectedDate);\n error = 'invalid-input';\n } else {\n if (isDateOutOfBounds(date, minDate, maxDate)) {\n error = 'out-of-bounds';\n } else {\n setSelectedDate(date);\n }\n }\n } else {\n if (required) {\n error = 'required-input';\n }\n onUserSelectDate === null || onUserSelectDate === void 0 ? void 0 : onUserSelectDate(date);\n }\n } else if (required && !formattedDate) {\n error = 'required-input';\n }\n onValidationResult === null || onValidationResult === void 0 ? void 0 : onValidationResult({\n error\n });\n }, [allowTextInput, formatDate, formattedDate, maxDate, minDate, onUserSelectDate, onValidationResult, parseDateFromString, required, selectedDate, setSelectedDate]);\n const setOpen = React.useCallback(newState => {\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(newState);\n setOpenState(newState);\n }, [onOpenChange, setOpenState]);\n const dismissDatePickerPopup = React.useCallback(newlySelectedDate => {\n if (open) {\n setOpen(false);\n validateTextInput(newlySelectedDate);\n if (!allowTextInput && newlySelectedDate) {\n setSelectedDate(newlySelectedDate);\n }\n }\n }, [allowTextInput, open, setOpen, setSelectedDate, validateTextInput]);\n const showDatePickerPopup = React.useCallback(() => {\n if (!open) {\n preventNextFocusOpeningPicker();\n setOpen(true);\n }\n }, [open, preventNextFocusOpeningPicker, setOpen]);\n /**\n * Callback for closing the calendar callout\n */\n const calendarDismissed = React.useCallback(newlySelectedDate => {\n preventNextFocusOpeningPicker();\n dismissDatePickerPopup(newlySelectedDate);\n }, [dismissDatePickerPopup, preventNextFocusOpeningPicker]);\n const onInputChange = React.useCallback((ev, data) => {\n const {\n value: newValue\n } = data;\n if (allowTextInput) {\n if (open) {\n dismissDatePickerPopup();\n }\n setFormattedDate(newValue);\n }\n }, [allowTextInput, dismissDatePickerPopup, open, setFormattedDate]);\n const onInputBlur = React.useCallback(() => {\n validateTextInput();\n }, [validateTextInput]);\n const onInputKeyDown = React.useCallback(ev => {\n switch (ev.key) {\n case Enter:\n ev.preventDefault();\n ev.stopPropagation();\n if (!open) {\n validateTextInput();\n showDatePickerPopup();\n } else {\n // When DatePicker allows input date string directly,\n // it is expected to hit another enter to close the popup\n if (props.allowTextInput) {\n dismissDatePickerPopup();\n }\n }\n break;\n case Escape:\n ev.stopPropagation();\n ev.preventDefault();\n if (open) {\n calendarDismissed();\n }\n break;\n case ArrowDown:\n ev.preventDefault();\n if (ev.altKey && !open) {\n showDatePickerPopup();\n }\n break;\n default:\n break;\n }\n }, [calendarDismissed, dismissDatePickerPopup, open, props.allowTextInput, showDatePickerPopup, validateTextInput]);\n const onInputFocus = React.useCallback(() => {\n if (disableAutoFocus) {\n return;\n }\n if (!allowTextInput) {\n if (!preventFocusOpeningPicker.current) {\n showDatePickerPopup();\n }\n preventFocusOpeningPicker.current = false;\n }\n }, [allowTextInput, disableAutoFocus, preventFocusOpeningPicker, showDatePickerPopup]);\n const onInputClick = React.useCallback(() => {\n // default openOnClick to !props.disableAutoFocus for legacy support of disableAutoFocus behavior\n if ((props.openOnClick || !props.disableAutoFocus) && !open && !props.disabled) {\n showDatePickerPopup();\n return;\n }\n if (allowTextInput) {\n dismissDatePickerPopup();\n }\n }, [allowTextInput, dismissDatePickerPopup, open, props.disabled, props.disableAutoFocus, props.openOnClick, showDatePickerPopup]);\n const onIconClick = ev => {\n ev.stopPropagation();\n if (!open && !props.disabled) {\n showDatePickerPopup();\n } else if (props.allowTextInput) {\n dismissDatePickerPopup();\n }\n };\n const inputAppearance = underlined ? 'underline' : borderless ? 'filled-lighter' : 'outline';\n const [triggerWrapperRef, popupRef] = usePopupPositioning(props);\n const rootShorthand = resolveShorthand(restOfProps, {\n required: true,\n defaultProps: {\n appearance: inputAppearance,\n 'aria-controls': open ? popupSurfaceId : undefined,\n 'aria-expanded': open,\n 'aria-haspopup': 'dialog',\n contentAfter: /*#__PURE__*/React.createElement(CalendarMonthRegular, {\n onClick: onIconClick\n }),\n readOnly: !allowTextInput,\n role: 'combobox',\n root: {\n 'aria-owns': open ? popupSurfaceId : undefined,\n ref: useMergedRefs(triggerWrapperRef, ref)\n },\n input: {\n ref: rootRef\n }\n }\n });\n rootShorthand.onChange = mergeCallbacks(rootShorthand.onChange, onInputChange);\n rootShorthand.onBlur = mergeCallbacks(rootShorthand.onBlur, onInputBlur);\n rootShorthand.onKeyDown = mergeCallbacks(rootShorthand.onKeyDown, onInputKeyDown);\n rootShorthand.onFocus = mergeCallbacks(rootShorthand.onFocus, onInputFocus);\n rootShorthand.onClick = mergeCallbacks(rootShorthand.onClick, onInputClick);\n const {\n modalAttributes\n } = useModalAttributes({\n trapFocus: true,\n alwaysFocusable: true,\n legacyTrapFocus: false\n });\n const popupSurfaceShorthand = open ? resolveShorthand(props.popupSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Calendar',\n 'aria-modal': true,\n id: popupSurfaceId,\n role: 'dialog',\n ref: popupRef,\n ...modalAttributes\n }\n }) : undefined;\n const {\n targetDocument\n } = useFluent();\n useOnClickOutside({\n element: targetDocument,\n callback: ev => dismissDatePickerPopup(),\n refs: [triggerWrapperRef, popupRef],\n disabled: !open\n });\n useOnScrollOutside({\n element: targetDocument,\n callback: ev => dismissDatePickerPopup(),\n refs: [triggerWrapperRef, popupRef],\n disabled: !open\n });\n // When the popup is opened, focus should go to the calendar.\n // In v8 this was done by focusing after the callout was positioned, but in v9 this can be simulated by using a\n // useEffect hook.\n React.useEffect(() => {\n if (open && !props.disabled && calendar.current) {\n calendar.current.focus();\n }\n }, [disableAutoFocus, open, props.disabled]);\n // When the popup is closed, focus should go back to the input.\n React.useEffect(() => {\n if (!open && !props.disabled) {\n focus();\n }\n }, [open, props.disabled, focus]);\n const calendarShorthand = resolveShorthand(props.calendar, {\n required: true,\n defaultProps: {\n allFocusable,\n componentRef: calendar,\n dateTimeFormatter,\n firstDayOfWeek,\n firstWeekOfYear,\n highlightCurrentMonth,\n highlightSelectedMonth,\n isMonthPickerVisible,\n maxDate,\n minDate,\n showCloseButton,\n showGoToToday,\n showMonthPickerAsOverlay,\n showWeekNumbers,\n strings,\n today,\n value: selectedDate || initialPickerDate\n }\n });\n calendarShorthand.onDismiss = mergeCallbacks(calendarShorthand.onDismiss, calendarDismissed);\n calendarShorthand.onSelectDate = mergeCallbacks(calendarShorthand.onSelectDate, calendarDismissed);\n React.useImperativeHandle(props.componentRef, () => ({\n focus,\n reset() {\n setOpen(false);\n setSelectedDate(undefined);\n },\n showDatePickerPopup\n }), [focus, setOpen, setSelectedDate, showDatePickerPopup]);\n const state = {\n disabled: !!props.disabled,\n inlinePopup,\n components: {\n root: Input,\n calendar: Calendar,\n popupSurface: 'div'\n },\n calendar: calendarShorthand,\n root: rootShorthand,\n popupSurface: popupSurfaceShorthand\n };\n state.root.value = formattedDate;\n return state;\n};\n//# sourceMappingURL=useDatePicker.js.map"],"names":["useDatePicker_unstable","isDateOutOfBounds","date","minDate","maxDate","compareDatePart","useFocusLogic","inputRef","React","useRef","preventFocusOpeningPicker","focus","_inputRef_current","_inputRef_current_focus","current","call","preventNextFocusOpeningPicker","usePopupVisibility","props","open","setOpen","useControllableState","initialState","defaultState","defaultOpen","state","isMounted","useEffect","_props_onOpenChange","onOpenChange","allowTextInput","useSelectedDate","formatDate","onSelectDate","value","selectedDate","setSelectedDateState","undefined","formattedDate","setFormattedDate","useState","setSelectedDate","newDate","defaultFormatDate","toDateString","defaultParseDateFromString","dateStr","Date","parse","ref","allFocusable","borderless","dateTimeFormatter","disableAutoFocus","firstDayOfWeek","DayOfWeek","Sunday","firstWeekOfYear","FirstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","initialPickerDate","inlinePopup","isMonthPickerVisible","onUserSelectDate","openOnClick","onValidationResult","parseDateFromString","showCloseButton","showGoToToday","showMonthPickerAsOverlay","showWeekNumbers","strings","defaultDatePickerStrings","today","underlined","restOfProps","calendar","rootRef","setOpenState","fieldContext","useFieldContext","_fieldContext_required","required","popupSurfaceId","useId","validateTextInput","useCallback","error","isNaN","getTime","newState","dismissDatePickerPopup","newlySelectedDate","showDatePickerPopup","calendarDismissed","onInputChange","ev","data","newValue","onInputBlur","onInputKeyDown","key","Enter","preventDefault","stopPropagation","Escape","ArrowDown","altKey","onInputFocus","onInputClick","disabled","onIconClick","inputAppearance","triggerWrapperRef","popupRef","usePopupPositioning","rootShorthand","resolveShorthand","defaultProps","appearance","contentAfter","createElement","CalendarMonthRegular","onClick","readOnly","role","root","useMergedRefs","input","onChange","mergeCallbacks","onBlur","onKeyDown","onFocus","modalAttributes","useModalAttributes","trapFocus","alwaysFocusable","legacyTrapFocus","popupSurfaceShorthand","popupSurface","id","targetDocument","useFluent","useOnClickOutside","element","callback","refs","useOnScrollOutside","calendarShorthand","componentRef","onDismiss","useImperativeHandle","reset","components","Input","Calendar"],"mappings":";;;;+BAoFaA;;aAAAA;;;6DApFU;8BACkB;0BAChB;4BACY;uBACuB;0BACnB;4BACnB;gCAC8G;4BACxE;qCACZ;8BACb;qCACC;AACpC,SAASC,kBAAkBC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAE;IACjD,OAAO,CAAC,CAACD,WAAWE,IAAAA,sBAAe,EAACF,SAASD,QAAQ,KAAK,CAAC,CAACE,WAAWC,IAAAA,sBAAe,EAACD,SAASF,QAAQ;AAC1G;AACA,SAASI,gBAAgB;IACvB,MAAMC,WAAWC,OAAMC,MAAM,CAAC,IAAI;IAClC,MAAMC,4BAA4BF,OAAMC,MAAM,CAAC,KAAK;IACpD,MAAME,QAAQ,IAAM;QAClB,IAAIC,mBAAmBC;QACtBD,CAAAA,oBAAoBL,SAASO,OAAO,AAAD,MAAO,IAAI,IAAIF,sBAAsB,KAAK,IAAI,KAAK,IAAI,AAACC,CAAAA,0BAA0BD,kBAAkBD,KAAK,AAAD,MAAO,IAAI,IAAIE,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBE,IAAI,CAACH,kBAAkB;IAC1P;IACA,MAAMI,gCAAgC,IAAM;QAC1CN,0BAA0BI,OAAO,GAAG,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;IAChC,MAAM4I,oBAAoBhC,IAAAA,gCAAgB,EAACrG,MAAM4D,QAAQ,EAAE;QACzDM,UAAU,IAAI;QACdoC,cAAc;YACZtE;YACAsG,cAAc1E;YACd1B;YACAE;YACAG;YACAG;YACAC;YACAG;YACA5D;YACAD;YACAkE;YACAC;YACAC;YACAC;YACAC;YACAE;YACAzC,OAAOC,gBAAgB2B;QACzB;IACF;IACAyF,kBAAkBE,SAAS,GAAGrB,IAAAA,8BAAc,EAACmB,kBAAkBE,SAAS,EAAEzD;IAC1EuD,kBAAkBtH,YAAY,GAAGmG,IAAAA,8BAAc,EAACmB,kBAAkBtH,YAAY,EAAE+D;IAChFxF,OAAMkJ,mBAAmB,CAACxI,MAAMsI,YAAY,EAAE,IAAO,CAAA;YACnD7I;YACAgJ,SAAQ;gBACNvI,QAAQ,KAAK;gBACbqB,gBAAgBJ;YAClB;YACA0D;QACF,CAAA,GAAI;QAACpF;QAAOS;QAASqB;QAAiBsD;KAAoB;IAC1D,MAAMtE,QAAQ;QACZuF,UAAU,CAAC,CAAC9F,MAAM8F,QAAQ;QAC1BjD;QACA6F,YAAY;YACV5B,MAAM6B,iBAAK;YACX/E,UAAUgF,kBAAQ;YAClBhB,cAAc;QAChB;QACAhE,UAAUyE;QACVvB,MAAMV;QACNwB,cAAcD;IAChB;IACApH,MAAMuG,IAAI,CAAC9F,KAAK,GAAGI;IACnB,OAAOb;AACT,GACA,yCAAyC"}
1
+ {"version":3,"sources":["useDatePicker.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowDown, Enter, Escape } from '@fluentui/keyboard-keys';\nimport { Calendar } from '../Calendar/Calendar';\nimport { CalendarMonthRegular } from '@fluentui/react-icons';\nimport { compareDatePart, DayOfWeek, FirstWeekOfYear } from '../../utils';\nimport { defaultDatePickerStrings } from './defaults';\nimport { Input } from '@fluentui/react-input';\nimport { mergeCallbacks, resolveShorthand, useControllableState, useFirstMount, useId, useMergedRefs, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';\nimport { useFieldContext_unstable as useFieldContext } from '@fluentui/react-field';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopupPositioning } from '../../utils/usePopupPositioning';\nfunction isDateOutOfBounds(date, minDate, maxDate) {\n return !!minDate && compareDatePart(minDate, date) > 0 || !!maxDate && compareDatePart(maxDate, date) < 0;\n}\nfunction useFocusLogic() {\n const inputRef = React.useRef(null);\n const preventFocusOpeningPicker = React.useRef(false);\n const focus = ()=>{\n var _inputRef_current, _inputRef_current_focus;\n (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : (_inputRef_current_focus = _inputRef_current.focus) === null || _inputRef_current_focus === void 0 ? void 0 : _inputRef_current_focus.call(_inputRef_current);\n };\n const preventNextFocusOpeningPicker = ()=>{\n preventFocusOpeningPicker.current = true;\n };\n return [\n focus,\n inputRef,\n preventFocusOpeningPicker,\n preventNextFocusOpeningPicker\n ];\n}\nfunction usePopupVisibility(props) {\n const [open, setOpen] = useControllableState({\n initialState: false,\n defaultState: props.defaultOpen,\n state: props.open\n });\n const isMounted = React.useRef(false);\n React.useEffect(()=>{\n if (isMounted.current && !open) {\n var // If DatePicker's menu (Calendar) is closed, run onAfterMenuDismiss\n _props_onOpenChange;\n (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 ? void 0 : _props_onOpenChange.call(props, false);\n }\n isMounted.current = true;\n }, // Should only run on allowTextInput or open change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n props.allowTextInput,\n open\n ]);\n return [\n open,\n setOpen\n ];\n}\nfunction useSelectedDate({ formatDate , onSelectDate , value }) {\n const [selectedDate, setSelectedDateState] = useControllableState({\n initialState: null,\n state: value\n });\n const [formattedDate, setFormattedDate] = React.useState(()=>value && formatDate ? formatDate(value) : '');\n const setSelectedDate = (newDate)=>{\n onSelectDate === null || onSelectDate === void 0 ? void 0 : onSelectDate(newDate);\n setSelectedDateState(newDate);\n setFormattedDate(newDate && formatDate ? formatDate(newDate) : '');\n };\n React.useEffect(()=>{\n setFormattedDate(value && formatDate ? formatDate(value) : '');\n }, [\n formatDate,\n value\n ]);\n return [\n selectedDate,\n formattedDate,\n setSelectedDate,\n setFormattedDate\n ];\n}\nconst defaultFormatDate = (date)=>date ? date.toDateString() : '';\nconst defaultParseDateFromString = (dateStr)=>{\n const date = Date.parse(dateStr);\n return date ? new Date(date) : null;\n};\n/**\n * Create the state required to render DatePicker.\n *\n * The returned state can be modified with hooks such as useDatePickerStyles_unstable,\n * before being passed to renderDatePicker_unstable.\n *\n * @param props - props from this instance of DatePicker\n * @param ref - reference to root Input slot\n */ export const useDatePicker_unstable = (props, ref)=>{\n const { allowTextInput =false , allFocusable =false , borderless =false , dateTimeFormatter , defaultOpen =false , disableAutoFocus =true , firstDayOfWeek =DayOfWeek.Sunday , firstWeekOfYear =FirstWeekOfYear.FirstDay , formatDate =defaultFormatDate , highlightCurrentMonth =false , highlightSelectedMonth =false , initialPickerDate =new Date() , inlinePopup =false , isMonthPickerVisible =true , maxDate , minDate , onOpenChange , onSelectDate: onUserSelectDate , openOnClick =true , onValidationResult , parseDateFromString =defaultParseDateFromString , showCloseButton =false , showGoToToday =true , showMonthPickerAsOverlay =false , showWeekNumbers =false , strings =defaultDatePickerStrings , today , underlined =false , value , ...restOfProps } = props;\n const calendar = React.useRef(null);\n const [focus, rootRef, preventFocusOpeningPicker, preventNextFocusOpeningPicker] = useFocusLogic();\n const [selectedDate, formattedDate, setSelectedDate, setFormattedDate] = useSelectedDate({\n formatDate,\n onSelectDate: onUserSelectDate,\n value\n });\n const [open, setOpenState] = usePopupVisibility(props);\n const fieldContext = useFieldContext();\n var _fieldContext_required;\n const required = (_fieldContext_required = fieldContext === null || fieldContext === void 0 ? void 0 : fieldContext.required) !== null && _fieldContext_required !== void 0 ? _fieldContext_required : props.required;\n const popupSurfaceId = useId('datePicker-popupSurface');\n const validateTextInput = React.useCallback((date = null)=>{\n let error;\n if (allowTextInput) {\n if (formattedDate || date) {\n // Don't parse if the selected date has the same formatted string as what we're about to parse.\n // The formatted string might be ambiguous (ex: \"1/2/3\" or \"New Year Eve\") and the parser might\n // not be able to come up with the exact same date.\n if (selectedDate && formatDate && formatDate(date !== null && date !== void 0 ? date : selectedDate) === formattedDate) {\n return;\n }\n date = date || parseDateFromString(formattedDate);\n // Check if date is null or date is an invalid date\n if (!date || isNaN(date.getTime())) {\n // Reset input if formatting is available\n setSelectedDate(selectedDate);\n error = 'invalid-input';\n } else {\n if (isDateOutOfBounds(date, minDate, maxDate)) {\n error = 'out-of-bounds';\n } else {\n setSelectedDate(date);\n }\n }\n } else {\n if (required) {\n error = 'required-input';\n }\n onUserSelectDate === null || onUserSelectDate === void 0 ? void 0 : onUserSelectDate(date);\n }\n } else if (required && !formattedDate) {\n error = 'required-input';\n }\n onValidationResult === null || onValidationResult === void 0 ? void 0 : onValidationResult({\n error\n });\n }, [\n allowTextInput,\n formatDate,\n formattedDate,\n maxDate,\n minDate,\n onUserSelectDate,\n onValidationResult,\n parseDateFromString,\n required,\n selectedDate,\n setSelectedDate\n ]);\n const setOpen = React.useCallback((newState)=>{\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(newState);\n setOpenState(newState);\n }, [\n onOpenChange,\n setOpenState\n ]);\n const dismissDatePickerPopup = React.useCallback((newlySelectedDate)=>{\n if (open) {\n setOpen(false);\n validateTextInput(newlySelectedDate);\n if (!allowTextInput && newlySelectedDate) {\n setSelectedDate(newlySelectedDate);\n }\n }\n }, [\n allowTextInput,\n open,\n setOpen,\n setSelectedDate,\n validateTextInput\n ]);\n const showDatePickerPopup = React.useCallback(()=>{\n if (!open) {\n preventNextFocusOpeningPicker();\n setOpen(true);\n }\n }, [\n open,\n preventNextFocusOpeningPicker,\n setOpen\n ]);\n /**\n * Callback for closing the calendar callout\n */ const calendarDismissed = React.useCallback((newlySelectedDate)=>{\n preventNextFocusOpeningPicker();\n dismissDatePickerPopup(newlySelectedDate);\n }, [\n dismissDatePickerPopup,\n preventNextFocusOpeningPicker\n ]);\n const onInputChange = React.useCallback((ev, data)=>{\n const { value: newValue } = data;\n if (allowTextInput) {\n if (open) {\n dismissDatePickerPopup();\n }\n setFormattedDate(newValue);\n }\n }, [\n allowTextInput,\n dismissDatePickerPopup,\n open,\n setFormattedDate\n ]);\n const onInputBlur = React.useCallback(()=>{\n validateTextInput();\n }, [\n validateTextInput\n ]);\n const onInputKeyDown = React.useCallback((ev)=>{\n switch(ev.key){\n case Enter:\n ev.preventDefault();\n ev.stopPropagation();\n if (!open) {\n validateTextInput();\n showDatePickerPopup();\n } else {\n // When DatePicker allows input date string directly,\n // it is expected to hit another enter to close the popup\n if (props.allowTextInput) {\n dismissDatePickerPopup();\n }\n }\n break;\n case Escape:\n ev.stopPropagation();\n ev.preventDefault();\n if (open) {\n calendarDismissed();\n }\n break;\n case ArrowDown:\n ev.preventDefault();\n if (ev.altKey && !open) {\n showDatePickerPopup();\n }\n break;\n default:\n break;\n }\n }, [\n calendarDismissed,\n dismissDatePickerPopup,\n open,\n props.allowTextInput,\n showDatePickerPopup,\n validateTextInput\n ]);\n const onInputFocus = React.useCallback(()=>{\n if (disableAutoFocus) {\n return;\n }\n if (!allowTextInput) {\n if (!preventFocusOpeningPicker.current) {\n showDatePickerPopup();\n }\n preventFocusOpeningPicker.current = false;\n }\n }, [\n allowTextInput,\n disableAutoFocus,\n preventFocusOpeningPicker,\n showDatePickerPopup\n ]);\n const onInputClick = React.useCallback(()=>{\n // default openOnClick to !props.disableAutoFocus for legacy support of disableAutoFocus behavior\n if ((props.openOnClick || !props.disableAutoFocus) && !open && !props.disabled) {\n showDatePickerPopup();\n return;\n }\n if (allowTextInput) {\n dismissDatePickerPopup();\n }\n }, [\n allowTextInput,\n dismissDatePickerPopup,\n open,\n props.disabled,\n props.disableAutoFocus,\n props.openOnClick,\n showDatePickerPopup\n ]);\n const onIconClick = (ev)=>{\n ev.stopPropagation();\n if (!open && !props.disabled) {\n showDatePickerPopup();\n } else if (props.allowTextInput) {\n dismissDatePickerPopup();\n }\n };\n const inputAppearance = underlined ? 'underline' : borderless ? 'filled-lighter' : 'outline';\n const [triggerWrapperRef, popupRef] = usePopupPositioning(props);\n const rootShorthand = resolveShorthand(restOfProps, {\n required: true,\n defaultProps: {\n appearance: inputAppearance,\n 'aria-controls': open ? popupSurfaceId : undefined,\n 'aria-expanded': open,\n 'aria-haspopup': 'dialog',\n contentAfter: /*#__PURE__*/ React.createElement(CalendarMonthRegular, {\n onClick: onIconClick\n }),\n readOnly: !allowTextInput,\n role: 'combobox',\n root: {\n 'aria-owns': open ? popupSurfaceId : undefined,\n ref: useMergedRefs(triggerWrapperRef, ref)\n },\n input: {\n ref: rootRef\n }\n }\n });\n rootShorthand.onChange = mergeCallbacks(rootShorthand.onChange, onInputChange);\n rootShorthand.onBlur = mergeCallbacks(rootShorthand.onBlur, onInputBlur);\n rootShorthand.onKeyDown = mergeCallbacks(rootShorthand.onKeyDown, onInputKeyDown);\n rootShorthand.onFocus = mergeCallbacks(rootShorthand.onFocus, onInputFocus);\n rootShorthand.onClick = mergeCallbacks(rootShorthand.onClick, onInputClick);\n const { modalAttributes } = useModalAttributes({\n trapFocus: true,\n alwaysFocusable: true,\n legacyTrapFocus: false\n });\n const popupSurfaceShorthand = open ? resolveShorthand(props.popupSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Calendar',\n 'aria-modal': true,\n id: popupSurfaceId,\n role: 'dialog',\n ref: popupRef,\n ...modalAttributes\n }\n }) : undefined;\n const { targetDocument } = useFluent();\n useOnClickOutside({\n element: targetDocument,\n callback: (ev)=>dismissDatePickerPopup(),\n refs: [\n triggerWrapperRef,\n popupRef\n ],\n disabled: !open\n });\n useOnScrollOutside({\n element: targetDocument,\n callback: (ev)=>dismissDatePickerPopup(),\n refs: [\n triggerWrapperRef,\n popupRef\n ],\n disabled: !open\n });\n // When the popup is opened, focus should go to the calendar.\n // In v8 this was done by focusing after the callout was positioned, but in v9 this can be simulated by using a\n // useEffect hook.\n React.useEffect(()=>{\n if (open && !props.disabled && calendar.current) {\n calendar.current.focus();\n }\n }, [\n disableAutoFocus,\n open,\n props.disabled\n ]);\n const isFirstMount = useFirstMount();\n // When the popup is closed, focus should go back to the input.\n React.useEffect(()=>{\n if (!open && !props.disabled && !isFirstMount) {\n focus();\n }\n // Focus function keeps changing, so we need to skip it in the deps\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isFirstMount,\n open,\n props.disabled\n ]);\n const calendarShorthand = resolveShorthand(props.calendar, {\n required: true,\n defaultProps: {\n allFocusable,\n componentRef: calendar,\n dateTimeFormatter,\n firstDayOfWeek,\n firstWeekOfYear,\n highlightCurrentMonth,\n highlightSelectedMonth,\n isMonthPickerVisible,\n maxDate,\n minDate,\n showCloseButton,\n showGoToToday,\n showMonthPickerAsOverlay,\n showWeekNumbers,\n strings,\n today,\n value: selectedDate || initialPickerDate\n }\n });\n calendarShorthand.onDismiss = mergeCallbacks(calendarShorthand.onDismiss, calendarDismissed);\n calendarShorthand.onSelectDate = mergeCallbacks(calendarShorthand.onSelectDate, calendarDismissed);\n React.useImperativeHandle(props.componentRef, ()=>({\n focus,\n reset () {\n setOpen(false);\n setSelectedDate(null);\n },\n showDatePickerPopup\n }), [\n focus,\n setOpen,\n setSelectedDate,\n showDatePickerPopup\n ]);\n const state = {\n disabled: !!props.disabled,\n inlinePopup,\n components: {\n root: Input,\n calendar: Calendar,\n popupSurface: 'div'\n },\n calendar: calendarShorthand,\n root: rootShorthand,\n popupSurface: popupSurfaceShorthand\n };\n state.root.value = formattedDate;\n return state;\n};\n"],"names":["useDatePicker_unstable","isDateOutOfBounds","date","minDate","maxDate","compareDatePart","useFocusLogic","inputRef","React","useRef","preventFocusOpeningPicker","focus","_inputRef_current","_inputRef_current_focus","current","call","preventNextFocusOpeningPicker","usePopupVisibility","props","open","setOpen","useControllableState","initialState","defaultState","defaultOpen","state","isMounted","useEffect","_props_onOpenChange","onOpenChange","allowTextInput","useSelectedDate","formatDate","onSelectDate","value","selectedDate","setSelectedDateState","formattedDate","setFormattedDate","useState","setSelectedDate","newDate","defaultFormatDate","toDateString","defaultParseDateFromString","dateStr","Date","parse","ref","allFocusable","borderless","dateTimeFormatter","disableAutoFocus","firstDayOfWeek","DayOfWeek","Sunday","firstWeekOfYear","FirstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","initialPickerDate","inlinePopup","isMonthPickerVisible","onUserSelectDate","openOnClick","onValidationResult","parseDateFromString","showCloseButton","showGoToToday","showMonthPickerAsOverlay","showWeekNumbers","strings","defaultDatePickerStrings","today","underlined","restOfProps","calendar","rootRef","setOpenState","fieldContext","useFieldContext","_fieldContext_required","required","popupSurfaceId","useId","validateTextInput","useCallback","error","isNaN","getTime","newState","dismissDatePickerPopup","newlySelectedDate","showDatePickerPopup","calendarDismissed","onInputChange","ev","data","newValue","onInputBlur","onInputKeyDown","key","Enter","preventDefault","stopPropagation","Escape","ArrowDown","altKey","onInputFocus","onInputClick","disabled","onIconClick","inputAppearance","triggerWrapperRef","popupRef","usePopupPositioning","rootShorthand","resolveShorthand","defaultProps","appearance","undefined","contentAfter","createElement","CalendarMonthRegular","onClick","readOnly","role","root","useMergedRefs","input","onChange","mergeCallbacks","onBlur","onKeyDown","onFocus","modalAttributes","useModalAttributes","trapFocus","alwaysFocusable","legacyTrapFocus","popupSurfaceShorthand","popupSurface","id","targetDocument","useFluent","useOnClickOutside","element","callback","refs","useOnScrollOutside","isFirstMount","useFirstMount","calendarShorthand","componentRef","onDismiss","useImperativeHandle","reset","components","Input","Calendar"],"mappings":";;;;+BA8FiBA;;aAAAA;;;6DA9FM;8BACkB;0BAChB;4BACY;uBACuB;0BACnB;4BACnB;gCAC6H;4BACvF;qCACZ;8BACb;qCACC;AACpC,SAASC,kBAAkBC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAE;IAC/C,OAAO,CAAC,CAACD,WAAWE,IAAAA,sBAAe,EAACF,SA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>{
51
51
  state.calendar.className = (0, _react.mergeClasses)(datePickerClassNames.calendar, state.calendar.className);
52
52
  return state;
53
53
  }; //# sourceMappingURL=useDatePickerStyles.styles.js.map
54
-
55
- //# sourceMappingURL=useDatePickerStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/DatePicker/useDatePickerStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const datePickerClassNames = {\n root: 'fui-DatePicker',\n calendar: 'fui-DatePicker__calendar',\n popupSurface: 'fui-DatePicker__popupSurface'\n};\nconst useStyles = /*#__PURE__*/__styles({\n base: {\n qhf8xq: \"f10pi13n\",\n Bceei9c: \"f1k6fduh\",\n xfaavh: \"faxec97\"\n },\n disabled: {\n Bceei9c: \"f158kwzp\",\n xfaavh: \"f19qwlmg\"\n }\n}, {\n d: [\".f10pi13n{position:relative;}\", \".f1k6fduh{cursor:pointer;}\", \".faxec97 input{cursor:pointer;}\", \".f158kwzp{cursor:default;}\", \".f19qwlmg input{cursor:default;}\"]\n});\nconst usePopupSurfaceClassName = /*#__PURE__*/__resetStyles(\"r1ytv1z8\", null, [\".r1ytv1z8{background-color:var(--colorNeutralBackground1);box-shadow:var(--shadow16);border-radius:var(--borderRadiusMedium);border-width:1px;border-style:solid;border-color:var(--colorTransparentStroke);display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\n/**\n * Apply styling to the DatePicker slots based on the state\n */\nexport const useDatePickerStyles_unstable = state => {\n const styles = useStyles();\n const popupSurfaceClassName = usePopupSurfaceClassName();\n const {\n disabled\n } = state;\n state.root.className = mergeClasses(datePickerClassNames.root, styles.base, disabled && styles.disabled, state.root.className);\n if (state.popupSurface) {\n state.popupSurface.className = mergeClasses(datePickerClassNames.popupSurface, popupSurfaceClassName, state.popupSurface.className);\n }\n state.calendar.className = mergeClasses(datePickerClassNames.calendar, state.calendar.className);\n return state;\n};\n//# sourceMappingURL=useDatePickerStyles.styles.js.map"],"names":["datePickerClassNames","useDatePickerStyles_unstable","root","calendar","popupSurface","useStyles","__styles","base","qhf8xq","Bceei9c","xfaavh","disabled","d","usePopupSurfaceClassName","__resetStyles","state","styles","popupSurfaceClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB,MAApBA;IAsBAC,4BAA4B,MAA5BA;;uBAxByC;AAE/C,MAAMD,uBAAuB;IAClCE,MAAM;IACNC,UAAU;IACVC,cAAc;AAChB;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;IACAC,UAAU;QACRF,SAAS;QACTC,QAAQ;IACV;AACF,GAAG;IACDE,GAAG;QAAC;QAAiC;QAA8B;QAAmC;QAA8B;KAAmC;AACzK;AACA,MAAMC,2BAA2B,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,IAAI,EAAE;IAAC;CAAwe;AAIhjB,MAAMb,+BAA+Bc,CAAAA,QAAS;IACnD,MAAMC,SAASX;IACf,MAAMY,wBAAwBJ;IAC9B,MAAM,EACJF,SAAQ,EACT,GAAGI;IACJA,MAAMb,IAAI,CAACgB,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBE,IAAI,EAAEc,OAAOT,IAAI,EAAEI,YAAYK,OAAOL,QAAQ,EAAEI,MAAMb,IAAI,CAACgB,SAAS;IAC7H,IAAIH,MAAMX,YAAY,EAAE;QACtBW,MAAMX,YAAY,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBI,YAAY,EAAEa,uBAAuBF,MAAMX,YAAY,CAACc,SAAS;IACpI,CAAC;IACDH,MAAMZ,QAAQ,CAACe,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBG,QAAQ,EAAEY,MAAMZ,QAAQ,CAACe,SAAS;IAC/F,OAAOH;AACT,GACA,sDAAsD"}
1
+ {"version":3,"sources":["useDatePickerStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const datePickerClassNames = {\n root: 'fui-DatePicker',\n calendar: 'fui-DatePicker__calendar',\n popupSurface: 'fui-DatePicker__popupSurface'\n};\nconst useStyles = /*#__PURE__*/__styles({\n base: {\n qhf8xq: \"f10pi13n\",\n Bceei9c: \"f1k6fduh\",\n xfaavh: \"faxec97\"\n },\n disabled: {\n Bceei9c: \"f158kwzp\",\n xfaavh: \"f19qwlmg\"\n }\n}, {\n d: [\".f10pi13n{position:relative;}\", \".f1k6fduh{cursor:pointer;}\", \".faxec97 input{cursor:pointer;}\", \".f158kwzp{cursor:default;}\", \".f19qwlmg input{cursor:default;}\"]\n});\nconst usePopupSurfaceClassName = /*#__PURE__*/__resetStyles(\"r1ytv1z8\", null, [\".r1ytv1z8{background-color:var(--colorNeutralBackground1);box-shadow:var(--shadow16);border-radius:var(--borderRadiusMedium);border-width:1px;border-style:solid;border-color:var(--colorTransparentStroke);display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\n/**\n * Apply styling to the DatePicker slots based on the state\n */\nexport const useDatePickerStyles_unstable = state => {\n const styles = useStyles();\n const popupSurfaceClassName = usePopupSurfaceClassName();\n const {\n disabled\n } = state;\n state.root.className = mergeClasses(datePickerClassNames.root, styles.base, disabled && styles.disabled, state.root.className);\n if (state.popupSurface) {\n state.popupSurface.className = mergeClasses(datePickerClassNames.popupSurface, popupSurfaceClassName, state.popupSurface.className);\n }\n state.calendar.className = mergeClasses(datePickerClassNames.calendar, state.calendar.className);\n return state;\n};\n//# sourceMappingURL=useDatePickerStyles.styles.js.map"],"names":["datePickerClassNames","useDatePickerStyles_unstable","root","calendar","popupSurface","useStyles","__styles","base","qhf8xq","Bceei9c","xfaavh","disabled","d","usePopupSurfaceClassName","__resetStyles","state","styles","popupSurfaceClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB,MAApBA;IAsBAC,4BAA4B,MAA5BA;;uBAxByC;AAE/C,MAAMD,uBAAuB;IAClCE,MAAM;IACNC,UAAU;IACVC,cAAc;AAChB;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;IACAC,UAAU;QACRF,SAAS;QACTC,QAAQ;IACV;AACF,GAAG;IACDE,GAAG;QAAC;QAAiC;QAA8B;QAAmC;QAA8B;KAAmC;AACzK;AACA,MAAMC,2BAA2B,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,IAAI,EAAE;IAAC;CAAwe;AAIhjB,MAAMb,+BAA+Bc,CAAAA,QAAS;IACnD,MAAMC,SAASX;IACf,MAAMY,wBAAwBJ;IAC9B,MAAM,EACJF,SAAQ,EACT,GAAGI;IACJA,MAAMb,IAAI,CAACgB,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBE,IAAI,EAAEc,OAAOT,IAAI,EAAEI,YAAYK,OAAOL,QAAQ,EAAEI,MAAMb,IAAI,CAACgB,SAAS;IAC7H,IAAIH,MAAMX,YAAY,EAAE;QACtBW,MAAMX,YAAY,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBI,YAAY,EAAEa,uBAAuBF,MAAMX,YAAY,CAACc,SAAS;IACpI,CAAC;IACDH,MAAMZ,QAAQ,CAACe,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,qBAAqBG,QAAQ,EAAEY,MAAMZ,QAAQ,CAACe,SAAS;IAC/F,OAAOH;AACT,GACA,sDAAsD"}
@@ -45,6 +45,3 @@ _export(exports, {
45
45
  const _calendar = require("./Calendar");
46
46
  const _datePicker = require("./DatePicker");
47
47
  const _utils = require("./utils");
48
- //# sourceMappingURL=index.js.map
49
-
50
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { AnimationDirection } from './Calendar';\nexport { DatePicker, datePickerClassNames, defaultDatePickerErrorStrings, defaultDatePickerStrings, renderDatePicker_unstable, useDatePicker_unstable, useDatePickerStyles_unstable } from './DatePicker';\nexport { DAYS_IN_WEEK, DateRangeType, DayOfWeek, FirstWeekOfYear, MonthOfYear, TimeConstants, addDays, addMonths, addWeeks, addYears, compareDatePart, compareDates, getDatePartHashValue, getDateRangeArray, getEndDateOfWeek, getMonthEnd, getMonthStart, getStartDateOfWeek, getWeekNumber, getWeekNumbersInMonth, getYearEnd, getYearStart, isInDateRangeArray, setMonth } from './utils';\n//# sourceMappingURL=index.js.map"],"names":["AnimationDirection","DatePicker","datePickerClassNames","defaultDatePickerErrorStrings","defaultDatePickerStrings","renderDatePicker_unstable","useDatePicker_unstable","useDatePickerStyles_unstable","DAYS_IN_WEEK","DateRangeType","DayOfWeek","FirstWeekOfYear","MonthOfYear","TimeConstants","addDays","addMonths","addWeeks","addYears","compareDatePart","compareDates","getDatePartHashValue","getDateRangeArray","getEndDateOfWeek","getMonthEnd","getMonthStart","getStartDateOfWeek","getWeekNumber","getWeekNumbersInMonth","getYearEnd","getYearStart","isInDateRangeArray","setMonth"],"mappings":";;;;;;;;;;;IAASA,kBAAkB,MAAlBA,4BAAkB;IAClBC,UAAU,MAAVA,sBAAU;IAAEC,oBAAoB,MAApBA,gCAAoB;IAAEC,6BAA6B,MAA7BA,yCAA6B;IAAEC,wBAAwB,MAAxBA,oCAAwB;IAAEC,yBAAyB,MAAzBA,qCAAyB;IAAEC,sBAAsB,MAAtBA,kCAAsB;IAAEC,4BAA4B,MAA5BA,wCAA4B;IAC1KC,YAAY,MAAZA,mBAAY;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,SAAS,MAATA,gBAAS;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,WAAW,MAAXA,kBAAW;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,OAAO,MAAPA,cAAO;IAAEC,SAAS,MAATA,gBAAS;IAAEC,QAAQ,MAARA,eAAQ;IAAEC,QAAQ,MAARA,eAAQ;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,YAAY,MAAZA,mBAAY;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IAAEC,gBAAgB,MAAhBA,uBAAgB;IAAEC,WAAW,MAAXA,kBAAW;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,kBAAkB,MAAlBA,yBAAkB;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,qBAAqB,MAArBA,4BAAqB;IAAEC,UAAU,MAAVA,iBAAU;IAAEC,YAAY,MAAZA,mBAAY;IAAEC,kBAAkB,MAAlBA,yBAAkB;IAAEC,QAAQ,MAARA,eAAQ;;0BAFzU;4BACwJ;uBACyL;CACpX,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { AnimationDirection } from './Calendar';\nexport { DatePicker, datePickerClassNames, defaultDatePickerErrorStrings, defaultDatePickerStrings, renderDatePicker_unstable, useDatePicker_unstable, useDatePickerStyles_unstable } from './DatePicker';\nexport { DAYS_IN_WEEK, DateRangeType, DayOfWeek, FirstWeekOfYear, MonthOfYear, TimeConstants, addDays, addMonths, addWeeks, addYears, compareDatePart, compareDates, getDatePartHashValue, getDateRangeArray, getEndDateOfWeek, getMonthEnd, getMonthStart, getStartDateOfWeek, getWeekNumber, getWeekNumbersInMonth, getYearEnd, getYearStart, isInDateRangeArray, setMonth } from './utils';\n"],"names":["AnimationDirection","DatePicker","datePickerClassNames","defaultDatePickerErrorStrings","defaultDatePickerStrings","renderDatePicker_unstable","useDatePicker_unstable","useDatePickerStyles_unstable","DAYS_IN_WEEK","DateRangeType","DayOfWeek","FirstWeekOfYear","MonthOfYear","TimeConstants","addDays","addMonths","addWeeks","addYears","compareDatePart","compareDates","getDatePartHashValue","getDateRangeArray","getEndDateOfWeek","getMonthEnd","getMonthStart","getStartDateOfWeek","getWeekNumber","getWeekNumbersInMonth","getYearEnd","getYearStart","isInDateRangeArray","setMonth"],"mappings":";;;;;;;;;;;IAASA,kBAAkB,MAAlBA,4BAAkB;IAClBC,UAAU,MAAVA,sBAAU;IAAEC,oBAAoB,MAApBA,gCAAoB;IAAEC,6BAA6B,MAA7BA,yCAA6B;IAAEC,wBAAwB,MAAxBA,oCAAwB;IAAEC,yBAAyB,MAAzBA,qCAAyB;IAAEC,sBAAsB,MAAtBA,kCAAsB;IAAEC,4BAA4B,MAA5BA,wCAA4B;IAC1KC,YAAY,MAAZA,mBAAY;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,SAAS,MAATA,gBAAS;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,WAAW,MAAXA,kBAAW;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,OAAO,MAAPA,cAAO;IAAEC,SAAS,MAATA,gBAAS;IAAEC,QAAQ,MAARA,eAAQ;IAAEC,QAAQ,MAARA,eAAQ;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,YAAY,MAAZA,mBAAY;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IAAEC,gBAAgB,MAAhBA,uBAAgB;IAAEC,WAAW,MAAXA,kBAAW;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,kBAAkB,MAAlBA,yBAAkB;IAAEC,aAAa,MAAbA,oBAAa;IAAEC,qBAAqB,MAArBA,4BAAqB;IAAEC,UAAU,MAAVA,iBAAU;IAAEC,YAAY,MAAZA,mBAAY;IAAEC,kBAAkB,MAAlBA,yBAAkB;IAAEC,QAAQ,MAARA,eAAQ;;0BAFzU;4BACwJ;uBACyL"}
@@ -108,19 +108,17 @@ const SLIDE_UP_OUT20 = {
108
108
  const TRANSITION_ROW_DISAPPEARANCE = {
109
109
  '100%': {
110
110
  height: '0px',
111
- .../*#__PURE__*/ _react.shorthands.overflow('hidden'),
111
+ ..._react.shorthands.overflow('hidden'),
112
112
  width: '0px'
113
113
  },
114
114
  '99.9%': {
115
115
  height: '28px',
116
- .../*#__PURE__*/ _react.shorthands.overflow('visible'),
116
+ ..._react.shorthands.overflow('visible'),
117
117
  width: '100%'
118
118
  },
119
119
  '0%': {
120
120
  height: '28px',
121
- .../*#__PURE__*/ _react.shorthands.overflow('visible'),
121
+ ..._react.shorthands.overflow('visible'),
122
122
  width: '100%'
123
123
  }
124
- }; //# sourceMappingURL=animations.js.map
125
-
126
- //# sourceMappingURL=animations.js.map
124
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/animations.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nexport const EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nexport const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nexport const DURATION_1 = '0.167s';\nexport const DURATION_2 = '0.267s';\nexport const DURATION_3 = '0.367s';\nexport const DURATION_4 = '0.467s';\nexport const FADE_IN = {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n};\nexport const FADE_OUT = {\n from: {\n opacity: 1\n },\n to: {\n opacity: 0,\n visibility: 'hidden'\n }\n};\nexport const SLIDE_DOWN_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, -20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_LEFT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_RIGHT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(-20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_UP_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, 20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_DOWN_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, 20px, 0)'\n }\n};\nexport const SLIDE_UP_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, -20px, 0)'\n }\n};\nexport const TRANSITION_ROW_DISAPPEARANCE = {\n '100%': {\n height: '0px',\n ... /*#__PURE__*/shorthands.overflow('hidden'),\n width: '0px'\n },\n '99.9%': {\n height: '28px',\n ... /*#__PURE__*/shorthands.overflow('visible'),\n width: '100%'\n },\n '0%': {\n height: '28px',\n ... /*#__PURE__*/shorthands.overflow('visible'),\n width: '100%'\n }\n};\n//# sourceMappingURL=animations.js.map"],"names":["EASING_FUNCTION_1","EASING_FUNCTION_2","DURATION_1","DURATION_2","DURATION_3","DURATION_4","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_DOWN_OUT20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","from","opacity","to","visibility","pointerEvents","transform","height","shorthands","overflow","width"],"mappings":";;;;;;;;;;;IACaA,iBAAiB,MAAjBA;IACAC,iBAAiB,MAAjBA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,OAAO,MAAPA;IAQAC,QAAQ,MAARA;IASAC,eAAe,MAAfA;IAUAC,eAAe,MAAfA;IAUAC,gBAAgB,MAAhBA;IAUAC,aAAa,MAAbA;IAUAC,gBAAgB,MAA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,GAAEC,iBAAU,CAACC,QAAQ,CAAC,UAAU;QAC/CC,OAAO;IACT;AACF,GACA,sCAAsC"}
1
+ {"version":3,"sources":["animations.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nexport const EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nexport const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nexport const DURATION_1 = '0.167s';\nexport const DURATION_2 = '0.267s';\nexport const DURATION_3 = '0.367s';\nexport const DURATION_4 = '0.467s';\nexport const FADE_IN = {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n};\nexport const FADE_OUT = {\n from: {\n opacity: 1\n },\n to: {\n opacity: 0,\n visibility: 'hidden'\n }\n};\nexport const SLIDE_DOWN_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, -20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_LEFT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_RIGHT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(-20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_UP_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, 20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_DOWN_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, 20px, 0)'\n }\n};\nexport const SLIDE_UP_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, -20px, 0)'\n }\n};\nexport const TRANSITION_ROW_DISAPPEARANCE = {\n '100%': {\n height: '0px',\n ...shorthands.overflow('hidden'),\n width: '0px'\n },\n '99.9%': {\n height: '28px',\n ...shorthands.overflow('visible'),\n width: '100%'\n },\n '0%': {\n height: '28px',\n ...shorthands.overflow('visible'),\n width: '100%'\n }\n};\n"],"names":["EASING_FUNCTION_1","EASING_FUNCTION_2","DURATION_1","DURATION_2","DURATION_3","DURATION_4","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_DOWN_OUT20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","from","opacity","to","visibility","pointerEvents","transform","height","shorthands","overflow","width"],"mappings":";;;;;;;;;;;IACaA,iBAAiB,MAAjBA;IACAC,iBAAiB,MAAjBA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,UAAU,MAAVA;IACAC,OAAO,MAAPA;IAQAC,QAAQ,MAARA;IASAC,eAAe,MAAfA;IAUAC,eAAe,MAAfA;IAUAC,gBAAgB,MAAhBA;IAUAC,aAAa,MAAbA;IAUAC,gBAAgB,MAAhBA;IAQAC,cAAc,MAAdA;IAQAC,4BAA4B,MAA5BA;;uBAhFc;AACpB,MAAMd,oBAAoB;AAC1B,MAAMC,oBAAoB;AAC1B,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,UAAU;IACnBS,MAAM;QACFC,SAAS;IACb;IACAC,IAAI;QACAD,SAAS;IACb;AACJ;AACO,MAAMT,WAAW;IACpBQ,MAAM;QACFC,SAAS;IACb;IACAC,IAAI;QACAD,SAAS;QACTE,YAAY;IAChB;AACJ;AACO,MAAMV,kBAAkB;IAC3BO,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMX,kBAAkB;IAC3BM,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMV,mBAAmB;IAC5BK,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMT,gBAAgB;IACzBI,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMR,mBAAmB;IAC5BG,MAAM;QACFK,WAAW;IACf;IACAH,IAAI;QACAG,WAAW;IACf;AACJ;AACO,MAAMP,iBAAiB;IAC1BE,MAAM;QACFK,WAAW;IACf;IACAH,IAAI;QACAG,WAAW;IACf;AACJ;AACO,MAAMN,+BAA+B;IACxC,QAAQ;QACJO,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,SAAS;QAChCC,OAAO;IACX;IACA,SAAS;QACLH,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,UAAU;QACjCC,OAAO;IACX;IACA,MAAM;QACFH,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,UAAU;QACjCC,OAAO;IACX;AACJ"}
@@ -71,12 +71,10 @@ const TimeConstants = {
71
71
  SecondsInOneMinute: 60,
72
72
  OffsetTo24HourFormat: 12,
73
73
  /**
74
- * Matches a time string. Groups:
75
- * 1. hours (with or without leading 0)
76
- * 2. minutes
77
- * 3. seconds (optional)
78
- * 4. meridiem (am/pm, case-insensitive, optional)
79
- */ TimeFormatRegex: /^(\d\d?):(\d\d):?(\d\d)? ?([ap]m)?/i
80
- }; //# sourceMappingURL=constants.js.map
81
-
82
- //# sourceMappingURL=constants.js.map
74
+ * Matches a time string. Groups:
75
+ * 1. hours (with or without leading 0)
76
+ * 2. minutes
77
+ * 3. seconds (optional)
78
+ * 4. meridiem (am/pm, case-insensitive, optional)
79
+ */ TimeFormatRegex: /^(\d\d?):(\d\d):?(\d\d)? ?([ap]m)?/i
80
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/constants.js"],"sourcesContent":["/**\n * The days of the week\n */export var DayOfWeek;\n(function (DayOfWeek) {\n DayOfWeek[DayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n DayOfWeek[DayOfWeek[\"Monday\"] = 1] = \"Monday\";\n DayOfWeek[DayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n DayOfWeek[DayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n DayOfWeek[DayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n DayOfWeek[DayOfWeek[\"Friday\"] = 5] = \"Friday\";\n DayOfWeek[DayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n})(DayOfWeek || (DayOfWeek = {}));\nexport var MonthOfYear;\n(function (MonthOfYear) {\n MonthOfYear[MonthOfYear[\"January\"] = 0] = \"January\";\n MonthOfYear[MonthOfYear[\"February\"] = 1] = \"February\";\n MonthOfYear[MonthOfYear[\"March\"] = 2] = \"March\";\n MonthOfYear[MonthOfYear[\"April\"] = 3] = \"April\";\n MonthOfYear[MonthOfYear[\"May\"] = 4] = \"May\";\n MonthOfYear[MonthOfYear[\"June\"] = 5] = \"June\";\n MonthOfYear[MonthOfYear[\"July\"] = 6] = \"July\";\n MonthOfYear[MonthOfYear[\"August\"] = 7] = \"August\";\n MonthOfYear[MonthOfYear[\"September\"] = 8] = \"September\";\n MonthOfYear[MonthOfYear[\"October\"] = 9] = \"October\";\n MonthOfYear[MonthOfYear[\"November\"] = 10] = \"November\";\n MonthOfYear[MonthOfYear[\"December\"] = 11] = \"December\";\n})(MonthOfYear || (MonthOfYear = {}));\nexport var FirstWeekOfYear;\n(function (FirstWeekOfYear) {\n FirstWeekOfYear[FirstWeekOfYear[\"FirstDay\"] = 0] = \"FirstDay\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFullWeek\"] = 1] = \"FirstFullWeek\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFourDayWeek\"] = 2] = \"FirstFourDayWeek\";\n})(FirstWeekOfYear || (FirstWeekOfYear = {}));\nexport var DateRangeType;\n(function (DateRangeType) {\n DateRangeType[DateRangeType[\"Day\"] = 0] = \"Day\";\n DateRangeType[DateRangeType[\"Week\"] = 1] = \"Week\";\n DateRangeType[DateRangeType[\"Month\"] = 2] = \"Month\";\n DateRangeType[DateRangeType[\"WorkWeek\"] = 3] = \"WorkWeek\";\n})(DateRangeType || (DateRangeType = {}));\nexport const DAYS_IN_WEEK = 7;\nexport const TimeConstants = {\n MillisecondsInOneDay: 86400000,\n MillisecondsIn1Sec: 1000,\n MillisecondsIn1Min: 60000,\n MillisecondsIn30Mins: 1800000,\n MillisecondsIn1Hour: 3600000,\n MinutesInOneDay: 1440,\n MinutesInOneHour: 60,\n DaysInOneWeek: 7,\n MonthInOneYear: 12,\n HoursInOneDay: 24,\n SecondsInOneMinute: 60,\n OffsetTo24HourFormat: 12,\n /**\n * Matches a time string. Groups:\n * 1. hours (with or without leading 0)\n * 2. minutes\n * 3. seconds (optional)\n * 4. meridiem (am/pm, case-insensitive, optional)\n */\n TimeFormatRegex: /^(\\d\\d?):(\\d\\d):?(\\d\\d)? ?([ap]m)?/i\n};\n//# sourceMappingURL=constants.js.map"],"names":["DayOfWeek","MonthOfYear","FirstWeekOfYear","DateRangeType","DAYS_IN_WEEK","TimeConstants","MillisecondsInOneDay","MillisecondsIn1Sec","MillisecondsIn1Min","MillisecondsIn30Mins","MillisecondsIn1Hour","MinutesInOneDay","MinutesInOneHour","DaysInOneWeek","MonthInOneYear","HoursInOneDay","SecondsInOneMinute","OffsetTo24HourFormat","TimeFormatRegex"],"mappings":"AAAA;;CAEC;;;;;;;;;;;IAAaA,SAAS,MAATA;IAUHC,WAAW,MAAXA;IAeAC,eAAe,MAAfA;IAMAC,aAAa,MAAbA;IAOEC,YAAY,MAAZA;IACAC,aAAa,MAAbA;;AAvCH,IAAIL;AACb,CAAA,SAAUA,SAAS,EAAE;I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,SAAUA,eAAe,EAAE;IAC1BA,eAAe,CAACA,eAAe,CAAC,WAAW,GAAG,EAAE,GAAG;IACnDA,eAAe,CAACA,eAAe,CAAC,gBAAgB,GAAG,EAAE,GAAG;IACxDA,eAAe,CAACA,eAAe,CAAC,mBAAmB,GAAG,EAAE,GAAG;AAC7D,CAAA,EAAGA,mBAAoBA,CAAAA,kBAAkB,CAAC,CAAA;AACnC,IAAIC;AACV,CAAA,SAAUA,aAAa,EAAE;IACxBA,aAAa,CAACA,aAAa,CAAC,MAAM,GAAG,EAAE,GAAG;IAC1CA,aAAa,CAACA,aAAa,CAAC,OAAO,GAAG,EAAE,GAAG;IAC3CA,aAAa,CAACA,aAAa,CAAC,QAAQ,GAAG,EAAE,GAAG;IAC5CA,aAAa,CAACA,aAAa,CAAC,WAAW,GAAG,EAAE,GAAG;AACjD,CAAA,EAAGA,iBAAkBA,CAAAA,gBAAgB,CAAC,CAAA;AAC/B,MAAMC,eAAe;AACrB,MAAMC,gBAAgB;IAC3BC,sBAAsB;IACtBC,oBAAoB;IACpBC,oBAAoB;IACpBC,sBAAsB;IACtBC,qBAAqB;IACrBC,iBAAiB;IACjBC,kBAAkB;IAClBC,eAAe;IACfC,gBAAgB;IAChBC,eAAe;IACfC,oBAAoB;IACpBC,sBAAsB;IACtB;;;;;;EAMA,GACAC,iBAAiB;AACnB,GACA,qCAAqC"}
1
+ {"version":3,"sources":["constants.js"],"sourcesContent":["/**\n * The days of the week\n */ export var DayOfWeek;\n(function(DayOfWeek) {\n DayOfWeek[DayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n DayOfWeek[DayOfWeek[\"Monday\"] = 1] = \"Monday\";\n DayOfWeek[DayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n DayOfWeek[DayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n DayOfWeek[DayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n DayOfWeek[DayOfWeek[\"Friday\"] = 5] = \"Friday\";\n DayOfWeek[DayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n})(DayOfWeek || (DayOfWeek = {}));\nexport var MonthOfYear;\n(function(MonthOfYear) {\n MonthOfYear[MonthOfYear[\"January\"] = 0] = \"January\";\n MonthOfYear[MonthOfYear[\"February\"] = 1] = \"February\";\n MonthOfYear[MonthOfYear[\"March\"] = 2] = \"March\";\n MonthOfYear[MonthOfYear[\"April\"] = 3] = \"April\";\n MonthOfYear[MonthOfYear[\"May\"] = 4] = \"May\";\n MonthOfYear[MonthOfYear[\"June\"] = 5] = \"June\";\n MonthOfYear[MonthOfYear[\"July\"] = 6] = \"July\";\n MonthOfYear[MonthOfYear[\"August\"] = 7] = \"August\";\n MonthOfYear[MonthOfYear[\"September\"] = 8] = \"September\";\n MonthOfYear[MonthOfYear[\"October\"] = 9] = \"October\";\n MonthOfYear[MonthOfYear[\"November\"] = 10] = \"November\";\n MonthOfYear[MonthOfYear[\"December\"] = 11] = \"December\";\n})(MonthOfYear || (MonthOfYear = {}));\nexport var FirstWeekOfYear;\n(function(FirstWeekOfYear) {\n FirstWeekOfYear[FirstWeekOfYear[\"FirstDay\"] = 0] = \"FirstDay\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFullWeek\"] = 1] = \"FirstFullWeek\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFourDayWeek\"] = 2] = \"FirstFourDayWeek\";\n})(FirstWeekOfYear || (FirstWeekOfYear = {}));\nexport var DateRangeType;\n(function(DateRangeType) {\n DateRangeType[DateRangeType[\"Day\"] = 0] = \"Day\";\n DateRangeType[DateRangeType[\"Week\"] = 1] = \"Week\";\n DateRangeType[DateRangeType[\"Month\"] = 2] = \"Month\";\n DateRangeType[DateRangeType[\"WorkWeek\"] = 3] = \"WorkWeek\";\n})(DateRangeType || (DateRangeType = {}));\nexport const DAYS_IN_WEEK = 7;\nexport const TimeConstants = {\n MillisecondsInOneDay: 86400000,\n MillisecondsIn1Sec: 1000,\n MillisecondsIn1Min: 60000,\n MillisecondsIn30Mins: 1800000,\n MillisecondsIn1Hour: 3600000,\n MinutesInOneDay: 1440,\n MinutesInOneHour: 60,\n DaysInOneWeek: 7,\n MonthInOneYear: 12,\n HoursInOneDay: 24,\n SecondsInOneMinute: 60,\n OffsetTo24HourFormat: 12,\n /**\n * Matches a time string. Groups:\n * 1. hours (with or without leading 0)\n * 2. minutes\n * 3. seconds (optional)\n * 4. meridiem (am/pm, case-insensitive, optional)\n */ TimeFormatRegex: /^(\\d\\d?):(\\d\\d):?(\\d\\d)? ?([ap]m)?/i\n};\n"],"names":["DayOfWeek","MonthOfYear","FirstWeekOfYear","DateRangeType","DAYS_IN_WEEK","TimeConstants","MillisecondsInOneDay","MillisecondsIn1Sec","MillisecondsIn1Min","MillisecondsIn30Mins","MillisecondsIn1Hour","MinutesInOneDay","MinutesInOneHour","DaysInOneWeek","MonthInOneYear","HoursInOneDay","SecondsInOneMinute","OffsetTo24HourFormat","TimeFormatRegex"],"mappings":"AAAA;;CAEC;;;;;;;;;;;IAAcA,SAAS,MAATA;IAUJC,WAAW,MAAXA;IAeAC,eAAe,MAAfA;IAMAC,aAAa,MAAbA;IAOEC,YAAY,MAAZA;IACAC,aAAa,MAAbA;;AAvCF,IAAIL;AACd,CAAA,SAASA,SAAS,EAAE;IACjBA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,UAAU,GAAG,EAAE,GAAG;IACtCA,SAAS,CAACA,SAAS,CAAC,YAAY,GAAG,EAAE,GAAG;IACxCA,SAAS,CAACA,SAAS,CAAC,WAAW,GAAG,EAAE,GAAG;IACvCA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,WAAW,GAAG,EAAE,GAAG;AAC3C,CAAA,EAAGA,aAAcA,CAAAA,YAAY,CAAC,CAAA;A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GAAG,EAAE,GAAG;IAC5CA,aAAa,CAACA,aAAa,CAAC,WAAW,GAAG,EAAE,GAAG;AACnD,CAAA,EAAGA,iBAAkBA,CAAAA,gBAAgB,CAAC,CAAA;AAC/B,MAAMC,eAAe;AACrB,MAAMC,gBAAgB;IACzBC,sBAAsB;IACtBC,oBAAoB;IACpBC,oBAAoB;IACpBC,sBAAsB;IACtBC,qBAAqB;IACrBC,iBAAiB;IACjBC,kBAAkB;IAClBC,eAAe;IACfC,gBAAgB;IAChBC,eAAe;IACfC,oBAAoB;IACpBC,sBAAsB;IACtB;;;;;;GAMD,GAAGC,iBAAiB;AACvB"}
@@ -97,6 +97,4 @@ const DEFAULT_CALENDAR_STRINGS = {
97
97
  monthPickerHeaderAriaLabel: '{0}, change year',
98
98
  yearPickerHeaderAriaLabel: '{0}, change month',
99
99
  dayMarkedAriaLabel: 'marked'
100
- }; //# sourceMappingURL=dateFormatting.defaults.js.map
101
-
102
- //# sourceMappingURL=dateFormatting.defaults.js.map
100
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateFormatting/dateFormatting.defaults.js"],"sourcesContent":["/**\n * Format date to a day string representation\n * @param date - input date to format\n */export const formatDay = date => date.getDate().toString();\n/**\n * Format date to a month-day-year string\n * @param date - input date to format\n * @param strings - localized strings\n */\nexport const formatMonthDayYear = (date, strings) => strings.months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear();\n/**\n * Format date to a month-year string\n * @param date - input date to format\n * @param strings - localized strings\n */\nexport const formatMonthYear = (date, strings) => strings.months[date.getMonth()] + ' ' + date.getFullYear();\n/**\n * Format date to a month string\n * @param date - input date to format\n * @param strings - localized strings\n */\nexport const formatMonth = (date, strings) => strings.months[date.getMonth()];\n/**\n * Format date to a year string representation\n * @param date - input date to format\n */\nexport const formatYear = date => date.getFullYear().toString();\nexport const DEFAULT_DATE_GRID_STRINGS = {\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n shortDays: ['S', 'M', 'T', 'W', 'T', 'F', 'S']\n};\nexport const DEFAULT_DATE_FORMATTING = {\n formatDay,\n formatMonth,\n formatYear,\n formatMonthDayYear,\n formatMonthYear\n};\nexport const DEFAULT_CALENDAR_STRINGS = {\n ...DEFAULT_DATE_GRID_STRINGS,\n goToToday: 'Go to today',\n weekNumberFormatString: 'Week number {0}',\n prevMonthAriaLabel: 'Previous month',\n nextMonthAriaLabel: 'Next month',\n prevYearAriaLabel: 'Previous year',\n nextYearAriaLabel: 'Next year',\n prevYearRangeAriaLabel: 'Previous year range',\n nextYearRangeAriaLabel: 'Next year range',\n closeButtonAriaLabel: 'Close',\n selectedDateFormatString: 'Selected date {0}',\n todayDateFormatString: \"Today's date {0}\",\n monthPickerHeaderAriaLabel: '{0}, change year',\n yearPickerHeaderAriaLabel: '{0}, change month',\n dayMarkedAriaLabel: 'marked'\n};\n//# sourceMappingURL=dateFormatting.defaults.js.map"],"names":["formatDay","formatMonthDayYear","formatMonthYear","formatMonth","formatYear","DEFAULT_DATE_GRID_STRINGS","DEFAULT_DATE_FORMATTING","DEFAULT_CALENDAR_STRINGS","date","getDate","toString","strings","months","getMonth","getFullYear","shortMonths","days","shortDays","goToToday","weekNumberFormatString","prevMonthAriaLabel","nextMonthAriaLabel","prevYearAriaLabel","nextYearAriaLabel","prevYearRangeAriaLabel","nextYearRangeAriaLabel","closeButtonAriaLabel","selectedDateFormatString","todayDateFormatString","monthPickerHeaderAriaLabel","yearPickerHeaderAriaLabel","dayMarkedAriaLabel"],"mappings":"AAAA;;;CAGC;;;;;;;;;;;IAAeA,SAAS,MAATA;IAMHC,kBAAkB,MAAlBA;IAMAC,eAAe,MAAfA;IAMAC,WAAW,MAA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
+ {"version":3,"sources":["dateFormatting.defaults.js"],"sourcesContent":["/**\n * Format date to a day string representation\n * @param date - input date to format\n */ export const formatDay = (date)=>date.getDate().toString();\n/**\n * Format date to a month-day-year string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonthDayYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear();\n/**\n * Format date to a month-year string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonthYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getFullYear();\n/**\n * Format date to a month string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonth = (date, strings)=>strings.months[date.getMonth()];\n/**\n * Format date to a year string representation\n * @param date - input date to format\n */ export const formatYear = (date)=>date.getFullYear().toString();\nexport const DEFAULT_DATE_GRID_STRINGS = {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n shortMonths: [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n ],\n days: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday'\n ],\n shortDays: [\n 'S',\n 'M',\n 'T',\n 'W',\n 'T',\n 'F',\n 'S'\n ]\n};\nexport const DEFAULT_DATE_FORMATTING = {\n formatDay,\n formatMonth,\n formatYear,\n formatMonthDayYear,\n formatMonthYear\n};\nexport const DEFAULT_CALENDAR_STRINGS = {\n ...DEFAULT_DATE_GRID_STRINGS,\n goToToday: 'Go to today',\n weekNumberFormatString: 'Week number {0}',\n prevMonthAriaLabel: 'Previous month',\n nextMonthAriaLabel: 'Next month',\n prevYearAriaLabel: 'Previous year',\n nextYearAriaLabel: 'Next year',\n prevYearRangeAriaLabel: 'Previous year range',\n nextYearRangeAriaLabel: 'Next year range',\n closeButtonAriaLabel: 'Close',\n selectedDateFormatString: 'Selected date {0}',\n todayDateFormatString: \"Today's date {0}\",\n monthPickerHeaderAriaLabel: '{0}, change year',\n yearPickerHeaderAriaLabel: '{0}, change month',\n dayMarkedAriaLabel: 'marked'\n};\n"],"names":["formatDay","formatMonthDayYear","formatMonthYear","formatMonth","formatYear","DEFAULT_DATE_GRID_STRINGS","DEFAULT_DATE_FORMATTING","DEFAULT_CALENDAR_STRINGS","date","getDate","toString","strings","months","getMonth","getFullYear","shortMonths","days","shortDays","goToToday","weekNumberFormatString","prevMonthAriaLabel","nextMonthAriaLabel","prevYearAriaLabel","nextYearAriaLabel","prevYearRangeAriaLabel","nextYearRangeAriaLabel","closeButtonAriaLabel","selectedDateFormatString","todayDateFormatString","monthPickerHeaderAriaLabel","yearPickerHeaderAriaLabel","dayMarkedAriaLabel"],"mappings":"AAAA;;;CAGC;;;;;;;;;;;IAAgBA,SAAS,MAATA;IAKAC,kBAAkB,MAAlBA;IAKAC,eAAe,MAAfA;IAKAC,WAAW,MAAXA;IAIAC,UAAU,MAAVA;IACJC,yBAAyB,MAAzBA;IAgDAC,uBAAuB,MAAvBA;IAOAC,wBAAwB,MAAxBA;;AA3EF,MAAMP,YAAY,CAACQ,OAAOA,KAAKC,OAAO,GAAGC,QAAQ;AAKjD,MAAMT,qBAAqB,CAACO,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG,GAAG,MAAML,KAAKC,OAAO,KAAK,OAAOD,KAAKM,WAAW;AAK5H,MAAMZ,kBAAkB,CAACM,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG,GAAG,MAAML,KAAKM,WAAW;AAKjG,MAAMX,cAAc,CAACK,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG;AAIpE,MAAMT,aAAa,CAACI,OAAOA,KAAKM,WAAW,GAAGJ,QAAQ;AAC1D,MAAML,4BAA4B;IACrCO,QAAQ;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDG,aAAa;QACT;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDC,MAAM;QACF;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDC,WAAW;QACP;QACA;QACA;QACA;QACA;QACA;QACA;KACH;AACL;AACO,MAAMX,0BAA0B;IACnCN;IACAG;IACAC;IACAH;IACAC;AACJ;AACO,MAAMK,2BAA2B;IACpC,GAAGF,yBAAyB;IAC5Ba,WAAW;IACXC,wBAAwB;IACxBC,oBAAoB;IACpBC,oBAAoB;IACpBC,mBAAmB;IACnBC,mBAAmB;IACnBC,wBAAwB;IACxBC,wBAAwB;IACxBC,sBAAsB;IACtBC,0BAA0B;IAC1BC,uBAAuB;IACvBC,4BAA4B;IAC5BC,2BAA2B;IAC3BC,oBAAoB;AACxB"}
@@ -2,6 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- //# sourceMappingURL=dateFormatting.types.js.map
6
-
7
- //# sourceMappingURL=dateFormatting.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateFormatting/dateFormatting.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=dateFormatting.types.js.map"],"names":[],"mappings":";;;;CACA,gDAAgD"}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -5,6 +5,3 @@ Object.defineProperty(exports, "__esModule", {
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./dateFormatting.defaults"), exports);
7
7
  _exportStar(require("./dateFormatting.types"), exports);
8
- //# sourceMappingURL=index.js.map
9
-
10
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateFormatting/index.js"],"sourcesContent":["export * from './dateFormatting.defaults';\nexport * from './dateFormatting.types';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './dateFormatting.defaults';\nexport * from './dateFormatting.types';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA"}
@@ -2,6 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- //# sourceMappingURL=dateGrid.types.js.map
6
-
7
- //# sourceMappingURL=dateGrid.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/dateGrid.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=dateGrid.types.js.map"],"names":[],"mappings":";;;;CACA,0CAA0C"}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -24,6 +24,4 @@ const findAvailableDate = (options)=>{
24
24
  return availableDate;
25
25
  }
26
26
  return undefined;
27
- }; //# sourceMappingURL=findAvailableDate.js.map
28
-
29
- //# sourceMappingURL=findAvailableDate.js.map
27
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/findAvailableDate.js"],"sourcesContent":["import { isRestrictedDate } from './isRestrictedDate';\nimport { isAfterMaxDate } from './isAfterMaxDate';\nimport { isBeforeMinDate } from './isBeforeMinDate';\nimport { compareDatePart, addDays } from '../dateMath/dateMath';\n/**\n * Returns closest available date given the restriction `options`, or undefined otherwise\n * @param options - list of search options\n */\nexport const findAvailableDate = options => {\n const {\n targetDate,\n initialDate,\n direction,\n ...restrictedDateOptions\n } = options;\n let availableDate = targetDate;\n // if the target date is available, return it immediately\n if (!isRestrictedDate(targetDate, restrictedDateOptions)) {\n return targetDate;\n }\n while (compareDatePart(initialDate, availableDate) !== 0 && isRestrictedDate(availableDate, restrictedDateOptions) && !isAfterMaxDate(availableDate, restrictedDateOptions) && !isBeforeMinDate(availableDate, restrictedDateOptions)) {\n availableDate = addDays(availableDate, direction);\n }\n if (compareDatePart(initialDate, availableDate) !== 0 && !isRestrictedDate(availableDate, restrictedDateOptions)) {\n return availableDate;\n }\n return undefined;\n};\n//# sourceMappingURL=findAvailableDate.js.map"],"names":["findAvailableDate","options","targetDate","initialDate","direction","restrictedDateOptions","availableDate","isRestrictedDate","compareDatePart","isAfterMaxDate","isBeforeMinDate","addDays","undefined"],"mappings":";;;;+BAQaA;;aAAAA;;kCARoB;gCACF;iCACC;0BACS;AAKlC,MAAMA,oBAAoBC,CAAAA,UAAW;IAC1C,MAAM,EACJC,WAAU,EACVC,YAAW,EACXC,UAAS,EACT,GAAGC,uBACJ,GAAGJ;IACJ,IAAIK,gBAAgBJ;IACpB,yDAAyD;IACzD,IAAI,CAACK,IAAAA,kCAAgB,EAACL,YAAYG,wBAAwB;QACxD,OAAOH;IACT,CAAC;IACD,MAAOM,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAKC,IAAAA,kCAAgB,EAACD,eAAeD,0BAA0B,CAACI,IAAAA,8BAAc,EAACH,eAAeD,0BAA0B,CAACK,IAAAA,gCAAe,EAACJ,eAAeD,uBAAwB;QACrOC,gBAAgBK,IAAAA,iBAAO,EAACL,eAAeF;IACzC;IACA,IAAII,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAK,CAACC,IAAAA,kCAAgB,EAACD,eAAeD,wBAAwB;QAChH,OAAOC;IACT,CAAC;IACD,OAAOM;AACT,GACA,6CAA6C"}
1
+ {"version":3,"sources":["findAvailableDate.js"],"sourcesContent":["import { isRestrictedDate } from './isRestrictedDate';\nimport { isAfterMaxDate } from './isAfterMaxDate';\nimport { isBeforeMinDate } from './isBeforeMinDate';\nimport { compareDatePart, addDays } from '../dateMath/dateMath';\n/**\n * Returns closest available date given the restriction `options`, or undefined otherwise\n * @param options - list of search options\n */ export const findAvailableDate = (options)=>{\n const { targetDate , initialDate , direction , ...restrictedDateOptions } = options;\n let availableDate = targetDate;\n // if the target date is available, return it immediately\n if (!isRestrictedDate(targetDate, restrictedDateOptions)) {\n return targetDate;\n }\n while(compareDatePart(initialDate, availableDate) !== 0 && isRestrictedDate(availableDate, restrictedDateOptions) && !isAfterMaxDate(availableDate, restrictedDateOptions) && !isBeforeMinDate(availableDate, restrictedDateOptions)){\n availableDate = addDays(availableDate, direction);\n }\n if (compareDatePart(initialDate, availableDate) !== 0 && !isRestrictedDate(availableDate, restrictedDateOptions)) {\n return availableDate;\n }\n return undefined;\n};\n"],"names":["findAvailableDate","options","targetDate","initialDate","direction","restrictedDateOptions","availableDate","isRestrictedDate","compareDatePart","isAfterMaxDate","isBeforeMinDate","addDays","undefined"],"mappings":";;;;+BAOiBA;;aAAAA;;kCAPgB;gCACF;iCACC;0BACS;AAI9B,MAAMA,oBAAoB,CAACC,UAAU;IAC5C,MAAM,EAAEC,WAAU,EAAGC,YAAW,EAAGC,UAAS,EAAG,GAAGC,uBAAuB,GAAGJ;IAC5E,IAAIK,gBAAgBJ;IACpB,yDAAyD;IACzD,IAAI,CAACK,IAAAA,kCAAgB,EAACL,YAAYG,wBAAwB;QACtD,OAAOH;IACX,CAAC;IACD,MAAMM,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAKC,IAAAA,kCAAgB,EAACD,eAAeD,0BAA0B,CAACI,IAAAA,8BAAc,EAACH,eAAeD,0BAA0B,CAACK,IAAAA,gCAAe,EAACJ,eAAeD,uBAAuB;QACjOC,gBAAgBK,IAAAA,iBAAO,EAACL,eAAeF;IAC3C;IACA,IAAII,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAK,CAACC,IAAAA,kCAAgB,EAACD,eAAeD,wBAAwB;QAC9G,OAAOC;IACX,CAAC;IACD,OAAOM;AACX"}
@@ -18,6 +18,4 @@ const getBoundedDateRange = (dateRange, minDate, maxDate)=>{
18
18
  boundedDateRange = boundedDateRange.filter((date)=>(0, _dateMath.compareDatePart)(date, maxDate) <= 0);
19
19
  }
20
20
  return boundedDateRange;
21
- }; //# sourceMappingURL=getBoundedDateRange.js.map
22
-
23
- //# sourceMappingURL=getBoundedDateRange.js.map
21
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/getBoundedDateRange.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Generates a list of dates, bounded by min and max dates\n * @param dateRange - input date range\n * @param minDate - min date to limit the range\n * @param maxDate - max date to limit the range\n */\nexport const getBoundedDateRange = (dateRange, minDate, maxDate) => {\n let boundedDateRange = [...dateRange];\n if (minDate) {\n boundedDateRange = boundedDateRange.filter(date => compareDatePart(date, minDate) >= 0);\n }\n if (maxDate) {\n boundedDateRange = boundedDateRange.filter(date => compareDatePart(date, maxDate) <= 0);\n }\n return boundedDateRange;\n};\n//# sourceMappingURL=getBoundedDateRange.js.map"],"names":["getBoundedDateRange","dateRange","minDate","maxDate","boundedDateRange","filter","date","compareDatePart"],"mappings":";;;;+BAOaA;;aAAAA;;0BAPmB;AAOzB,MAAMA,sBAAsB,CAACC,WAAWC,SAASC,UAAY;IAClE,IAAIC,mBAAmB;WAAIH;KAAU;IACrC,IAAIC,SAAS;QACXE,mBAAmBA,iBAAiBC,MAAM,CAACC,CAAAA,OAAQC,IAAAA,yBAAe,EAACD,MAAMJ,YAAY;IACvF,CAAC;IACD,IAAIC,SAAS;QACXC,mBAAmBA,iBAAiBC,MAAM,CAACC,CAAAA,OAAQC,IAAAA,yBAAe,EAACD,MAAMH,YAAY;IACvF,CAAC;IACD,OAAOC;AACT,GACA,+CAA+C"}
1
+ {"version":3,"sources":["getBoundedDateRange.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Generates a list of dates, bounded by min and max dates\n * @param dateRange - input date range\n * @param minDate - min date to limit the range\n * @param maxDate - max date to limit the range\n */ export const getBoundedDateRange = (dateRange, minDate, maxDate)=>{\n let boundedDateRange = [\n ...dateRange\n ];\n if (minDate) {\n boundedDateRange = boundedDateRange.filter((date)=>compareDatePart(date, minDate) >= 0);\n }\n if (maxDate) {\n boundedDateRange = boundedDateRange.filter((date)=>compareDatePart(date, maxDate) <= 0);\n }\n return boundedDateRange;\n};\n"],"names":["getBoundedDateRange","dateRange","minDate","maxDate","boundedDateRange","filter","date","compareDatePart"],"mappings":";;;;+BAMiBA;;aAAAA;;0BANe;AAMrB,MAAMA,sBAAsB,CAACC,WAAWC,SAASC,UAAU;IAClE,IAAIC,mBAAmB;WAChBH;KACN;IACD,IAAIC,SAAS;QACTE,mBAAmBA,iBAAiBC,MAAM,CAAC,CAACC,OAAOC,IAAAA,yBAAe,EAACD,MAAMJ,YAAY;IACzF,CAAC;IACD,IAAIC,SAAS;QACTC,mBAAmBA,iBAAiBC,MAAM,CAAC,CAACC,OAAOC,IAAAA,yBAAe,EAACD,MAAMH,YAAY;IACzF,CAAC;IACD,OAAOC;AACX"}
@@ -15,6 +15,4 @@ const getDateRangeTypeToUse = (dateRangeType, workWeekDays, firstDayOfWeek)=>{
15
15
  }
16
16
  }
17
17
  return dateRangeType;
18
- }; //# sourceMappingURL=getDateRangeTypeToUse.js.map
19
-
20
- //# sourceMappingURL=getDateRangeTypeToUse.js.map
18
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/getDateRangeTypeToUse.js"],"sourcesContent":["import { DateRangeType } from '../constants';\nimport { isContiguous } from './isContiguous';\n/**\n * Return corrected date range type, given `dateRangeType` and list of working days.\n * For non-contiguous working days and working week range type, returns general week range type.\n * For other cases returns input date range type.\n * @param dateRangeType - input type of range\n * @param workWeekDays - list of working days in a week\n */\nexport const getDateRangeTypeToUse = (dateRangeType, workWeekDays, firstDayOfWeek) => {\n if (workWeekDays && dateRangeType === DateRangeType.WorkWeek) {\n if (!isContiguous(workWeekDays, true, firstDayOfWeek) || workWeekDays.length === 0) {\n return DateRangeType.Week;\n }\n }\n return dateRangeType;\n};\n//# sourceMappingURL=getDateRangeTypeToUse.js.map"],"names":["getDateRangeTypeToUse","dateRangeType","workWeekDays","firstDayOfWeek","DateRangeType","WorkWeek","isContiguous","length","Week"],"mappings":";;;;+BASaA;;aAAAA;;2BATiB;8BACD;AAQtB,MAAMA,wBAAwB,CAACC,eAAeC,cAAcC,iBAAmB;IACpF,IAAID,gBAAgBD,kBAAkBG,wBAAa,CAACC,QAAQ,EAAE;QAC5D,IAAI,CAACC,IAAAA,0BAAY,EAACJ,cAAc,IAAI,EAAEC,mBAAmBD,aAAaK,MAAM,KAAK,GAAG;YAClF,OAAOH,wBAAa,CAACI,IAAI;QAC3B,CAAC;IACH,CAAC;IACD,OAAOP;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["getDateRangeTypeToUse.js"],"sourcesContent":["import { DateRangeType } from '../constants';\nimport { isContiguous } from './isContiguous';\n/**\n * Return corrected date range type, given `dateRangeType` and list of working days.\n * For non-contiguous working days and working week range type, returns general week range type.\n * For other cases returns input date range type.\n * @param dateRangeType - input type of range\n * @param workWeekDays - list of working days in a week\n */ export const getDateRangeTypeToUse = (dateRangeType, workWeekDays, firstDayOfWeek)=>{\n if (workWeekDays && dateRangeType === DateRangeType.WorkWeek) {\n if (!isContiguous(workWeekDays, true, firstDayOfWeek) || workWeekDays.length === 0) {\n return DateRangeType.Week;\n }\n }\n return dateRangeType;\n};\n"],"names":["getDateRangeTypeToUse","dateRangeType","workWeekDays","firstDayOfWeek","DateRangeType","WorkWeek","isContiguous","length","Week"],"mappings":";;;;+BAQiBA;;aAAAA;;2BARa;8BACD;AAOlB,MAAMA,wBAAwB,CAACC,eAAeC,cAAcC,iBAAiB;IACpF,IAAID,gBAAgBD,kBAAkBG,wBAAa,CAACC,QAAQ,EAAE;QAC1D,IAAI,CAACC,IAAAA,0BAAY,EAACJ,cAAc,IAAI,EAAEC,mBAAmBD,aAAaK,MAAM,KAAK,GAAG;YAChF,OAAOH,wBAAa,CAACI,IAAI;QAC7B,CAAC;IACL,CAAC;IACD,OAAOP;AACX"}
@@ -71,6 +71,4 @@ const getDayGrid = (options)=>{
71
71
  weeks.push(week);
72
72
  }
73
73
  return weeks;
74
- }; //# sourceMappingURL=getDayGrid.js.map
75
-
76
- //# sourceMappingURL=getDayGrid.js.map
74
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/getDayGrid.js"],"sourcesContent":["import { addDays, compareDates, getDateRangeArray, isInDateRangeArray } from '../dateMath/dateMath';\nimport { DAYS_IN_WEEK } from '../constants';\nimport { getDateRangeTypeToUse } from './getDateRangeTypeToUse';\nimport { getBoundedDateRange } from './getBoundedDateRange';\nimport { isRestrictedDate } from './isRestrictedDate';\n/**\n * Generates a grid of days, given the `options`.\n * Returns one additional week at the begining from the previous range\n * and one at the end from the future range\n * @param options - parameters to specify date related restrictions for the resulting grid\n */\nexport const getDayGrid = options => {\n const {\n selectedDate,\n dateRangeType,\n firstDayOfWeek,\n today,\n minDate,\n maxDate,\n weeksToShow,\n workWeekDays,\n daysToSelectInDayView,\n restrictedDates,\n markedDays\n } = options;\n const restrictedDateOptions = {\n minDate,\n maxDate,\n restrictedDates\n };\n const todaysDate = today || new Date();\n const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;\n let date;\n if (weeksToShow && weeksToShow <= 4) {\n // if showing less than a full month, just use date == navigatedDate\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());\n } else {\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);\n }\n const weeks = [];\n // Cycle the date backwards to get to the first day of the week.\n while (date.getDay() !== firstDayOfWeek) {\n date.setDate(date.getDate() - 1);\n }\n // add the transition week as last week of previous range\n date = addDays(date, -DAYS_IN_WEEK);\n // a flag to indicate whether all days of the week are outside the month\n let isAllDaysOfWeekOutOfMonth = false;\n // in work week view if the days aren't contiguous we use week view instead\n const selectedDateRangeType = getDateRangeTypeToUse(dateRangeType, workWeekDays, firstDayOfWeek);\n let selectedDates = [];\n if (selectedDate) {\n selectedDates = getDateRangeArray(selectedDate, selectedDateRangeType, firstDayOfWeek, workWeekDays, daysToSelectInDayView);\n selectedDates = getBoundedDateRange(selectedDates, minDate, maxDate);\n }\n let shouldGetWeeks = true;\n for (let weekIndex = 0; shouldGetWeeks; weekIndex++) {\n const week = [];\n isAllDaysOfWeekOutOfMonth = true;\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const originalDate = new Date(date.getTime());\n const dayInfo = {\n key: date.toString(),\n date: date.getDate().toString(),\n originalDate,\n isInMonth: date.getMonth() === navigatedDate.getMonth(),\n isToday: compareDates(todaysDate, date),\n isSelected: isInDateRangeArray(date, selectedDates),\n isInBounds: !isRestrictedDate(date, restrictedDateOptions),\n isMarked: (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some(markedDay => compareDates(originalDate, markedDay))) || false\n };\n week.push(dayInfo);\n if (dayInfo.isInMonth) {\n isAllDaysOfWeekOutOfMonth = false;\n }\n date.setDate(date.getDate() + 1);\n }\n // We append the condition of the loop depending upon the showSixWeeksByDefault prop.\n shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;\n // we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state\n weeks.push(week);\n }\n return weeks;\n};\n//# sourceMappingURL=getDayGrid.js.map"],"names":["getDayGrid","options","selectedDate","dateRangeType","firstDayOfWeek","today","minDate","maxDate","weeksToShow","workWeekDays","daysToSelectInDayView","restrictedDates","markedDays","restrictedDateOptions","todaysDate","Date","navigatedDate","date","getFullYear","getMonth","getDate","weeks","getDay","setDate","addDays","DAYS_IN_WEEK","isAllDaysOfWeekOutOfMonth","selectedDateRangeType","getDateRangeTypeToUse","selectedDates","getDateRangeArray","getBoundedDateRange","shouldGetWeeks","weekIndex","week","dayIndex","originalDate","getTime","dayInfo","key","toString","isInMonth","isToday","compareDates","isSelected","isInDateRangeArray","isInBounds","isRestrictedDate","isMarked","some","markedDay","push"],"mappings":";;;;+BAWaA;;aAAAA;;0BAXgE;2BAChD;uCACS;qCACF;kCACH;AAO1B,MAAMA,aAAaC,CAAAA,UAAW;IACnC,MAAM,EACJC,aA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C,eAAe,IAAIrB,KAAKE,KAAKoB,OAAO;YAC1C,MAAMC,UAAU;gBACdC,KAAKtB,KAAKuB,QAAQ;gBAClBvB,MAAMA,KAAKG,OAAO,GAAGoB,QAAQ;gBAC7BJ;gBACAK,WAAWxB,KAAKE,QAAQ,OAAOH,cAAcG,QAAQ;gBACrDuB,SAASC,IAAAA,sBAAY,EAAC7B,YAAYG;gBAClC2B,YAAYC,IAAAA,4BAAkB,EAAC5B,MAAMY;gBACrCiB,YAAY,CAACC,IAAAA,kCAAgB,EAAC9B,MAAMJ;gBACpCmC,UAAU,AAACpC,CAAAA,eAAe,IAAI,IAAIA,eAAe,KAAK,IAAI,KAAK,IAAIA,WAAWqC,IAAI,CAACC,CAAAA,YAAaP,IAAAA,sBAAY,EAACP,cAAcc,WAAW,AAAD,KAAM,KAAK;YAClJ;YACAhB,KAAKiB,IAAI,CAACb;YACV,IAAIA,QAAQG,SAAS,EAAE;gBACrBf,4BAA4B,KAAK;YACnC,CAAC;YACDT,KAAKM,OAAO,CAACN,KAAKG,OAAO,KAAK;QAChC;QACA,qFAAqF;QACrFY,iBAAiBxB,cAAcyB,YAAYzB,cAAc,IAAI,CAACkB,6BAA6BO,cAAc,CAAC;QAC1G,0GAA0G;QAC1GZ,MAAM8B,IAAI,CAACjB;IACb;IACA,OAAOb;AACT,GACA,sCAAsC"}
1
+ {"version":3,"sources":["getDayGrid.js"],"sourcesContent":["import { addDays, compareDates, getDateRangeArray, isInDateRangeArray } from '../dateMath/dateMath';\nimport { DAYS_IN_WEEK } from '../constants';\nimport { getDateRangeTypeToUse } from './getDateRangeTypeToUse';\nimport { getBoundedDateRange } from './getBoundedDateRange';\nimport { isRestrictedDate } from './isRestrictedDate';\n/**\n * Generates a grid of days, given the `options`.\n * Returns one additional week at the begining from the previous range\n * and one at the end from the future range\n * @param options - parameters to specify date related restrictions for the resulting grid\n */ export const getDayGrid = (options)=>{\n const { selectedDate , dateRangeType , firstDayOfWeek , today , minDate , maxDate , weeksToShow , workWeekDays , daysToSelectInDayView , restrictedDates , markedDays } = options;\n const restrictedDateOptions = {\n minDate,\n maxDate,\n restrictedDates\n };\n const todaysDate = today || new Date();\n const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;\n let date;\n if (weeksToShow && weeksToShow <= 4) {\n // if showing less than a full month, just use date == navigatedDate\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());\n } else {\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);\n }\n const weeks = [];\n // Cycle the date backwards to get to the first day of the week.\n while(date.getDay() !== firstDayOfWeek){\n date.setDate(date.getDate() - 1);\n }\n // add the transition week as last week of previous range\n date = addDays(date, -DAYS_IN_WEEK);\n // a flag to indicate whether all days of the week are outside the month\n let isAllDaysOfWeekOutOfMonth = false;\n // in work week view if the days aren't contiguous we use week view instead\n const selectedDateRangeType = getDateRangeTypeToUse(dateRangeType, workWeekDays, firstDayOfWeek);\n let selectedDates = [];\n if (selectedDate) {\n selectedDates = getDateRangeArray(selectedDate, selectedDateRangeType, firstDayOfWeek, workWeekDays, daysToSelectInDayView);\n selectedDates = getBoundedDateRange(selectedDates, minDate, maxDate);\n }\n let shouldGetWeeks = true;\n for(let weekIndex = 0; shouldGetWeeks; weekIndex++){\n const week = [];\n isAllDaysOfWeekOutOfMonth = true;\n for(let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++){\n const originalDate = new Date(date.getTime());\n const dayInfo = {\n key: date.toString(),\n date: date.getDate().toString(),\n originalDate,\n isInMonth: date.getMonth() === navigatedDate.getMonth(),\n isToday: compareDates(todaysDate, date),\n isSelected: isInDateRangeArray(date, selectedDates),\n isInBounds: !isRestrictedDate(date, restrictedDateOptions),\n isMarked: (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some((markedDay)=>compareDates(originalDate, markedDay))) || false\n };\n week.push(dayInfo);\n if (dayInfo.isInMonth) {\n isAllDaysOfWeekOutOfMonth = false;\n }\n date.setDate(date.getDate() + 1);\n }\n // We append the condition of the loop depending upon the showSixWeeksByDefault prop.\n shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;\n // we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state\n weeks.push(week);\n }\n return weeks;\n};\n"],"names":["getDayGrid","options","selectedDate","dateRangeType","firstDayOfWeek","today","minDate","maxDate","weeksToShow","workWeekDays","daysToSelectInDayView","restrictedDates","markedDays","restrictedDateOptions","todaysDate","Date","navigatedDate","date","getFullYear","getMonth","getDate","weeks","getDay","setDate","addDays","DAYS_IN_WEEK","isAllDaysOfWeekOutOfMonth","selectedDateRangeType","getDateRangeTypeToUse","selectedDates","getDateRangeArray","getBoundedDateRange","shouldGetWeeks","weekIndex","week","dayIndex","originalDate","getTime","dayInfo","key","toString","isInMonth","isToday","compareDates","isSelected","isInDateRangeArray","isInBounds","isRestrictedDate","isMarked","some","markedDay","push"],"mappings":";;;;+BAUiBA;;aAAAA;;0BAV4D;2BAChD;uCACS;qCACF;kCACH;AAMtB,MAAMA,aAAa,CAACC,UAAU;IACrC,MAAM,EAAEC,aAAY,EAAGC,cAAa,EAAGC,eAAc,EAAGC,MAAK,EAAGC,QAAO,EAAGC,QAAO,EAAGC,YAAW,EAAGC,aAAY,EAAGC,sBAAqB,EAAGC,gBAAe,EAAGC,WAAU,EAAG,GAAGX;IAC3K,MAAMY,wBAAwB;QAC1BP;QACAC;QACAI;IACJ;IACA,MAAMG,aAAaT,SAAS,IAAIU;IAChC,MAAMC,gBAAgBf,QAAQe,aAAa,GAAGf,QAAQe,aAAa,GAAGF,UAAU;IAChF,IAAIG;IACJ,IAAIT,eAAeA,eAAe,GAAG;QACjC,oEAAoE;QACpES,OAAO,IAAIF,KAAKC,cAAcE,WAAW,IAAIF,cAAcG,QAAQ,IAAIH,cAAcI,OAAO;IAChG,OAAO;QACHH,OAAO,IAAIF,KAAKC,cAAcE,WAAW,IAAIF,cAAcG,QAAQ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KAAK;YACpJ;YACAhB,KAAKiB,IAAI,CAACb;YACV,IAAIA,QAAQG,SAAS,EAAE;gBACnBf,4BAA4B,KAAK;YACrC,CAAC;YACDT,KAAKM,OAAO,CAACN,KAAKG,OAAO,KAAK;QAClC;QACA,qFAAqF;QACrFY,iBAAiBxB,cAAcyB,YAAYzB,cAAc,IAAI,CAACkB,6BAA6BO,cAAc,CAAC;QAC1G,0GAA0G;QAC1GZ,MAAM8B,IAAI,CAACjB;IACf;IACA,OAAOb;AACX"}
@@ -8,6 +8,3 @@ _exportStar(require("./findAvailableDate"), exports);
8
8
  _exportStar(require("./getBoundedDateRange"), exports);
9
9
  _exportStar(require("./getDayGrid"), exports);
10
10
  _exportStar(require("./isRestrictedDate"), exports);
11
- //# sourceMappingURL=index.js.map
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/index.js"],"sourcesContent":["export * from './dateGrid.types';\nexport * from './findAvailableDate';\nexport * from './getBoundedDateRange';\nexport * from './getDayGrid';\nexport * from './isRestrictedDate';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './dateGrid.types';\nexport * from './findAvailableDate';\nexport * from './getBoundedDateRange';\nexport * from './getDayGrid';\nexport * from './isRestrictedDate';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
@@ -10,6 +10,4 @@ const _dateMath = require("../dateMath/dateMath");
10
10
  const isAfterMaxDate = (date, options)=>{
11
11
  const { maxDate } = options;
12
12
  return maxDate ? (0, _dateMath.compareDatePart)(date, maxDate) >= 1 : false;
13
- }; //# sourceMappingURL=isAfterMaxDate.js.map
14
-
15
- //# sourceMappingURL=isAfterMaxDate.js.map
13
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/isAfterMaxDate.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Checks if `date` happens later than max date\n * @param date - date to check\n * @param options - object with max date to check against\n */\nexport const isAfterMaxDate = (date, options) => {\n const {\n maxDate\n } = options;\n return maxDate ? compareDatePart(date, maxDate) >= 1 : false;\n};\n//# sourceMappingURL=isAfterMaxDate.js.map"],"names":["isAfterMaxDate","date","options","maxDate","compareDatePart"],"mappings":";;;;+BAMaA;;aAAAA;;0BANmB;AAMzB,MAAMA,iBAAiB,CAACC,MAAMC,UAAY;IAC/C,MAAM,EACJC,QAAO,EACR,GAAGD;IACJ,OAAOC,UAAUC,IAAAA,yBAAe,EAACH,MAAME,YAAY,IAAI,KAAK;AAC9D,GACA,0CAA0C"}
1
+ {"version":3,"sources":["isAfterMaxDate.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Checks if `date` happens later than max date\n * @param date - date to check\n * @param options - object with max date to check against\n */ export const isAfterMaxDate = (date, options)=>{\n const { maxDate } = options;\n return maxDate ? compareDatePart(date, maxDate) >= 1 : false;\n};\n"],"names":["isAfterMaxDate","date","options","maxDate","compareDatePart"],"mappings":";;;;+BAKiBA;;aAAAA;;0BALe;AAKrB,MAAMA,iBAAiB,CAACC,MAAMC,UAAU;IAC/C,MAAM,EAAEC,QAAO,EAAG,GAAGD;IACrB,OAAOC,UAAUC,IAAAA,yBAAe,EAACH,MAAME,YAAY,IAAI,KAAK;AAChE"}
@@ -10,6 +10,4 @@ const _dateMath = require("../dateMath/dateMath");
10
10
  const isBeforeMinDate = (date, options)=>{
11
11
  const { minDate } = options;
12
12
  return minDate ? (0, _dateMath.compareDatePart)(minDate, date) >= 1 : false;
13
- }; //# sourceMappingURL=isBeforeMinDate.js.map
14
-
15
- //# sourceMappingURL=isBeforeMinDate.js.map
13
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/isBeforeMinDate.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Checks if `date` happens earlier than min date\n * @param date - date to check\n * @param options - object with min date to check against\n */\nexport const isBeforeMinDate = (date, options) => {\n const {\n minDate\n } = options;\n return minDate ? compareDatePart(minDate, date) >= 1 : false;\n};\n//# sourceMappingURL=isBeforeMinDate.js.map"],"names":["isBeforeMinDate","date","options","minDate","compareDatePart"],"mappings":";;;;+BAMaA;;aAAAA;;0BANmB;AAMzB,MAAMA,kBAAkB,CAACC,MAAMC,UAAY;IAChD,MAAM,EACJC,QAAO,EACR,GAAGD;IACJ,OAAOC,UAAUC,IAAAA,yBAAe,EAACD,SAASF,SAAS,IAAI,KAAK;AAC9D,GACA,2CAA2C"}
1
+ {"version":3,"sources":["isBeforeMinDate.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Checks if `date` happens earlier than min date\n * @param date - date to check\n * @param options - object with min date to check against\n */ export const isBeforeMinDate = (date, options)=>{\n const { minDate } = options;\n return minDate ? compareDatePart(minDate, date) >= 1 : false;\n};\n"],"names":["isBeforeMinDate","date","options","minDate","compareDatePart"],"mappings":";;;;+BAKiBA;;aAAAA;;0BALe;AAKrB,MAAMA,kBAAkB,CAACC,MAAMC,UAAU;IAChD,MAAM,EAAEC,QAAO,EAAG,GAAGD;IACrB,OAAOC,UAAUC,IAAAA,yBAAe,EAACD,SAASF,SAAS,IAAI,KAAK;AAChE"}
@@ -23,6 +23,4 @@ const isContiguous = (days, isSingleWeek, firstDayOfWeek)=>{
23
23
  // In case the full week is provided, then each day has a neighbor
24
24
  //, otherwise the last day does not have a neighbor.
25
25
  return amountOfNoNeighbors < 2;
26
- }; //# sourceMappingURL=isContiguous.js.map
27
-
28
- //# sourceMappingURL=isContiguous.js.map
26
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/utils/dateGrid/isContiguous.js"],"sourcesContent":["/**\n * Returns whether provided week days are contiguous.\n * @param days - list of days in a week\n * @param isSingleWeek - decides whether the contiguous logic applies across week boundaries or not\n * @param firstDayOfWeek - decides which day of week is the first one in the order.\n */export const isContiguous = (days, isSingleWeek, firstDayOfWeek) => {\n const daySet = new Set(days);\n let amountOfNoNeighbors = 0;\n for (const day of days) {\n const nextDay = (day + 1) % 7;\n if (!(daySet.has(nextDay) && (!isSingleWeek || firstDayOfWeek !== nextDay))) {\n amountOfNoNeighbors++;\n }\n }\n // In case the full week is provided, then each day has a neighbor\n //, otherwise the last day does not have a neighbor.\n return amountOfNoNeighbors < 2;\n};\n//# sourceMappingURL=isContiguous.js.map"],"names":["isContiguous","days","isSingleWeek","firstDayOfWeek","daySet","Set","amountOfNoNeighbors","day","nextDay","has"],"mappings":"AAAA;;;;;CAKC;;;;+BAAeA;;aAAAA;;AAAN,MAAMA,eAAe,CAACC,MAAMC,cAAcC,iBAAmB;IACrE,MAAMC,SAAS,IAAIC,IAAIJ;IACvB,IAAIK,sBAAsB;IAC1B,KAAK,MAAMC,OAAON,KAAM;QACtB,MAAMO,UAAU,AAACD,CAAAA,MAAM,CAAA,IAAK;QAC5B,IAAI,CAAEH,CAAAA,OAAOK,GAAG,CAACD,YAAa,CAAA,CAACN,gBAAgBC,mBAAmBK,OAAM,CAAC,GAAI;YAC3EF;QACF,CAAC;IACH;IACA,kEAAkE;IAClE,oDAAoD;IACpD,OAAOA,sBAAsB;AAC/B,GACA,wCAAwC"}
1
+ {"version":3,"sources":["isContiguous.js"],"sourcesContent":["/**\n * Returns whether provided week days are contiguous.\n * @param days - list of days in a week\n * @param isSingleWeek - decides whether the contiguous logic applies across week boundaries or not\n * @param firstDayOfWeek - decides which day of week is the first one in the order.\n */ export const isContiguous = (days, isSingleWeek, firstDayOfWeek)=>{\n const daySet = new Set(days);\n let amountOfNoNeighbors = 0;\n for (const day of days){\n const nextDay = (day + 1) % 7;\n if (!(daySet.has(nextDay) && (!isSingleWeek || firstDayOfWeek !== nextDay))) {\n amountOfNoNeighbors++;\n }\n }\n // In case the full week is provided, then each day has a neighbor\n //, otherwise the last day does not have a neighbor.\n return amountOfNoNeighbors < 2;\n};\n"],"names":["isContiguous","days","isSingleWeek","firstDayOfWeek","daySet","Set","amountOfNoNeighbors","day","nextDay","has"],"mappings":"AAAA;;;;;CAKC;;;;+BAAgBA;;aAAAA;;AAAN,MAAMA,eAAe,CAACC,MAAMC,cAAcC,iBAAiB;IAClE,MAAMC,SAAS,IAAIC,IAAIJ;IACvB,IAAIK,sBAAsB;IAC1B,KAAK,MAAMC,OAAON,KAAK;QACnB,MAAMO,UAAU,AAACD,CAAAA,MAAM,CAAA,IAAK;QAC5B,IAAI,CAAEH,CAAAA,OAAOK,GAAG,CAACD,YAAa,CAAA,CAACN,gBAAgBC,mBAAmBK,OAAM,CAAC,GAAI;YACzEF;QACJ,CAAC;IACL;IACA,kEAAkE;IAClE,oDAAoD;IACpD,OAAOA,sBAAsB;AACjC"}
@@ -16,6 +16,4 @@ const isRestrictedDate = (date, options)=>{
16
16
  }
17
17
  const inRestrictedDates = restrictedDates && restrictedDates.some((rd)=>(0, _dateMath.compareDates)(rd, date));
18
18
  return inRestrictedDates || (0, _isBeforeMinDate.isBeforeMinDate)(date, options) || (0, _isAfterMaxDate.isAfterMaxDate)(date, options);
19
- }; //# sourceMappingURL=isRestrictedDate.js.map
20
-
21
- //# sourceMappingURL=isRestrictedDate.js.map
19
+ };