@fluentui/react-datepicker-compat 0.3.5 → 0.3.7

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 (173) hide show
  1. package/CHANGELOG.json +145 -1
  2. package/CHANGELOG.md +39 -2
  3. package/lib/components/Calendar/Calendar.js +9 -7
  4. package/lib/components/Calendar/Calendar.js.map +1 -1
  5. package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  6. package/lib/components/CalendarDay/CalendarDay.js +8 -11
  7. package/lib/components/CalendarDay/CalendarDay.js.map +1 -1
  8. package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  9. package/lib/components/CalendarDayGrid/CalendarDayGrid.js +8 -10
  10. package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  11. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +8 -5
  12. package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
  13. package/lib/components/CalendarDayGrid/CalendarGridRow.js +1 -1
  14. package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
  15. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +1 -1
  16. package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
  17. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  18. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
  19. package/lib/components/CalendarDayGrid/useWeeks.js +4 -3
  20. package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -1
  21. package/lib/components/CalendarMonth/CalendarMonth.js +10 -8
  22. package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
  23. package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
  24. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  25. package/lib/components/CalendarYear/CalendarYear.js +38 -39
  26. package/lib/components/CalendarYear/CalendarYear.js.map +1 -1
  27. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  28. package/lib/components/DatePicker/renderDatePicker.js +15 -6
  29. package/lib/components/DatePicker/renderDatePicker.js.map +1 -1
  30. package/lib/components/DatePicker/useDatePicker.js +18 -13
  31. package/lib/components/DatePicker/useDatePicker.js.map +1 -1
  32. package/lib/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
  33. package/lib/utils/dateGrid/findAvailableDate.js +1 -1
  34. package/lib/utils/dateGrid/findAvailableDate.js.map +1 -1
  35. package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -1
  36. package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  37. package/lib/utils/dateGrid/getDayGrid.js +3 -2
  38. package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
  39. package/lib/utils/dateGrid/isAfterMaxDate.js +1 -1
  40. package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  41. package/lib/utils/dateGrid/isBeforeMinDate.js +1 -1
  42. package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  43. package/lib/utils/dateGrid/isContiguous.js.map +1 -1
  44. package/lib/utils/dateGrid/isRestrictedDate.js +1 -1
  45. package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -1
  46. package/lib/utils/dateMath/dateMath.js.map +1 -1
  47. package/lib/utils/dom.js.map +1 -1
  48. package/lib/utils/focus.js.map +1 -1
  49. package/lib/utils/usePopupPositioning.js +2 -2
  50. package/lib/utils/usePopupPositioning.js.map +1 -1
  51. package/lib-commonjs/Calendar.js +2 -2
  52. package/lib-commonjs/Calendar.js.map +1 -1
  53. package/lib-commonjs/CalendarDay.js +2 -2
  54. package/lib-commonjs/CalendarDay.js.map +1 -1
  55. package/lib-commonjs/CalendarDayGrid.js +2 -2
  56. package/lib-commonjs/CalendarDayGrid.js.map +1 -1
  57. package/lib-commonjs/CalendarMonth.js +2 -2
  58. package/lib-commonjs/CalendarMonth.js.map +1 -1
  59. package/lib-commonjs/CalendarPicker.js +2 -2
  60. package/lib-commonjs/CalendarPicker.js.map +1 -1
  61. package/lib-commonjs/CalendarYear.js +2 -2
  62. package/lib-commonjs/CalendarYear.js.map +1 -1
  63. package/lib-commonjs/DatePicker.js +2 -2
  64. package/lib-commonjs/DatePicker.js.map +1 -1
  65. package/lib-commonjs/components/Calendar/Calendar.js +32 -28
  66. package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
  67. package/lib-commonjs/components/Calendar/Calendar.types.js +5 -3
  68. package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -1
  69. package/lib-commonjs/components/Calendar/defaults.js +3 -1
  70. package/lib-commonjs/components/Calendar/defaults.js.map +1 -1
  71. package/lib-commonjs/components/Calendar/index.js +7 -5
  72. package/lib-commonjs/components/Calendar/index.js.map +1 -1
  73. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +12 -8
  74. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
  75. package/lib-commonjs/components/CalendarDay/CalendarDay.js +25 -26
  76. package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -1
  77. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +2 -2
  78. package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -1
  79. package/lib-commonjs/components/CalendarDay/index.js +4 -4
  80. package/lib-commonjs/components/CalendarDay/index.js.map +1 -1
  81. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +13 -9
  82. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
  83. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +27 -27
  84. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -1
  85. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +2 -2
  86. package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
  87. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +29 -24
  88. package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
  89. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +8 -6
  90. package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -1
  91. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +6 -4
  92. package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -1
  93. package/lib-commonjs/components/CalendarDayGrid/index.js +10 -6
  94. package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -1
  95. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +29 -23
  96. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
  97. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +9 -5
  98. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -1
  99. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +9 -6
  100. package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -1
  101. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +24 -21
  102. package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
  103. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +2 -2
  104. package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -1
  105. package/lib-commonjs/components/CalendarMonth/index.js +4 -4
  106. package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
  107. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +5 -3
  108. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -1
  109. package/lib-commonjs/components/CalendarPicker/index.js +3 -3
  110. package/lib-commonjs/components/CalendarPicker/index.js.map +1 -1
  111. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +20 -16
  112. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
  113. package/lib-commonjs/components/CalendarYear/CalendarYear.js +60 -59
  114. package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -1
  115. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +2 -2
  116. package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -1
  117. package/lib-commonjs/components/CalendarYear/index.js +4 -4
  118. package/lib-commonjs/components/CalendarYear/index.js.map +1 -1
  119. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +5 -3
  120. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -1
  121. package/lib-commonjs/components/DatePicker/DatePicker.js +7 -5
  122. package/lib-commonjs/components/DatePicker/DatePicker.js.map +1 -1
  123. package/lib-commonjs/components/DatePicker/defaults.js +6 -2
  124. package/lib-commonjs/components/DatePicker/defaults.js.map +1 -1
  125. package/lib-commonjs/components/DatePicker/index.js +7 -7
  126. package/lib-commonjs/components/DatePicker/index.js.map +1 -1
  127. package/lib-commonjs/components/DatePicker/renderDatePicker.js +22 -12
  128. package/lib-commonjs/components/DatePicker/renderDatePicker.js.map +1 -1
  129. package/lib-commonjs/components/DatePicker/useDatePicker.js +59 -52
  130. package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -1
  131. package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js +9 -5
  132. package/lib-commonjs/components/DatePicker/useDatePickerStyles.styles.js.map +1 -1
  133. package/lib-commonjs/index.js +98 -34
  134. package/lib-commonjs/index.js.map +1 -1
  135. package/lib-commonjs/utils/animations.js +45 -15
  136. package/lib-commonjs/utils/animations.js.map +1 -1
  137. package/lib-commonjs/utils/constants.js +18 -6
  138. package/lib-commonjs/utils/constants.js.map +1 -1
  139. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +24 -8
  140. package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -1
  141. package/lib-commonjs/utils/dateFormatting/index.js +3 -3
  142. package/lib-commonjs/utils/dateFormatting/index.js.map +1 -1
  143. package/lib-commonjs/utils/dateGrid/findAvailableDate.js +4 -2
  144. package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -1
  145. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +3 -1
  146. package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -1
  147. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +3 -1
  148. package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -1
  149. package/lib-commonjs/utils/dateGrid/getDayGrid.js +6 -3
  150. package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
  151. package/lib-commonjs/utils/dateGrid/index.js +6 -6
  152. package/lib-commonjs/utils/dateGrid/index.js.map +1 -1
  153. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +4 -2
  154. package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -1
  155. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +4 -2
  156. package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -1
  157. package/lib-commonjs/utils/dateGrid/isContiguous.js +3 -1
  158. package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -1
  159. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +4 -2
  160. package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -1
  161. package/lib-commonjs/utils/dateMath/dateMath.js +54 -18
  162. package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -1
  163. package/lib-commonjs/utils/dateMath/index.js +2 -2
  164. package/lib-commonjs/utils/dateMath/index.js.map +1 -1
  165. package/lib-commonjs/utils/dom.js +5 -3
  166. package/lib-commonjs/utils/dom.js.map +1 -1
  167. package/lib-commonjs/utils/focus.js +3 -1
  168. package/lib-commonjs/utils/focus.js.map +1 -1
  169. package/lib-commonjs/utils/index.js +8 -8
  170. package/lib-commonjs/utils/index.js.map +1 -1
  171. package/lib-commonjs/utils/usePopupPositioning.js +9 -7
  172. package/lib-commonjs/utils/usePopupPositioning.js.map +1 -1
  173. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"sources":["dateMath.ts"],"sourcesContent":["import { DateRangeType, DayOfWeek, FirstWeekOfYear, MonthOfYear, TimeConstants } from '../constants';\n\n/**\n * Returns a date offset from the given date by the specified number of days.\n * @param date - The origin date\n * @param days - The number of days to offset. 'days' can be negative.\n * @returns A new Date object offset from the origin date by the given number of days\n */\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date.getTime());\n result.setDate(result.getDate() + days);\n return result;\n}\n\n/**\n * Returns a date offset from the given date by the specified number of weeks.\n * @param date - The origin date\n * @param weeks - The number of weeks to offset. 'weeks' can be negative.\n * @returns A new Date object offset from the origin date by the given number of weeks\n */\nexport function addWeeks(date: Date, weeks: number): Date {\n return addDays(date, weeks * TimeConstants.DaysInOneWeek);\n}\n\n/**\n * Returns a date offset from the given date by the specified number of months.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param months - The number of months to offset. 'months' can be negative.\n * @returns A new Date object offset from the origin date by the given number of months\n */\nexport function addMonths(date: Date, months: number): Date {\n let result = new Date(date.getTime());\n const newMonth = result.getMonth() + months;\n result.setMonth(newMonth);\n\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to a day the new month has.\n // (Weird modulo math is due to Javascript's treatment of negative numbers in modulo)\n if (\n result.getMonth() !==\n ((newMonth % TimeConstants.MonthInOneYear) + TimeConstants.MonthInOneYear) % TimeConstants.MonthInOneYear\n ) {\n result = addDays(result, -result.getDate());\n }\n return result;\n}\n\n/**\n * Returns a date offset from the given date by the specified number of years.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param years - The number of years to offset. 'years' can be negative.\n * @returns A new Date object offset from the origin date by the given number of years\n */\nexport function addYears(date: Date, years: number): Date {\n let result = new Date(date.getTime());\n result.setFullYear(date.getFullYear() + years);\n\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to a day the new month has.\n // (Weird modulo math is due to Javascript's treatment of negative numbers in modulo)\n if (\n result.getMonth() !==\n ((date.getMonth() % TimeConstants.MonthInOneYear) + TimeConstants.MonthInOneYear) % TimeConstants.MonthInOneYear\n ) {\n result = addDays(result, -result.getDate());\n }\n return result;\n}\n\n/**\n * Returns a date that is the first day of the month of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the first day of the month.\n */\nexport function getMonthStart(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the last day of the month of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the last day of the month.\n */\nexport function getMonthEnd(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the first day of the year of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the first day of the year.\n */\nexport function getYearStart(date: Date): Date {\n return new Date(date.getFullYear(), 0, 1, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the last day of the year of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the last day of the year.\n */\nexport function getYearEnd(date: Date): Date {\n return new Date(date.getFullYear() + 1, 0, 0, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is a copy of the given date, aside from the month changing to the given month.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param month - The 0-based index of the month to set on the date.\n * @returns A new Date object with the given month set.\n */\nexport function setMonth(date: Date, month: number): Date {\n return addMonths(date, month - date.getMonth());\n}\n\n/**\n * Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.\n * @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.\n */\nexport function compareDates(date1: Date, date2: Date): boolean {\n if (!date1 && !date2) {\n return true;\n } else if (!date1 || !date2) {\n return false;\n } else {\n return (\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n }\n}\n\n/**\n * Compare the date parts of two dates\n * @param date1 - The first date to compare\n * @param date2 - The second date to compare\n * @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value\n * if date1 is later than date2.\n */\nexport function compareDatePart(date1: Date, date2: Date): Number {\n return getDatePartHashValue(date1) - getDatePartHashValue(date2);\n}\n\n/**\n * Gets the date range array including the specified date. The date range array is calculated as the list\n * of dates accounting for the specified first day of the week and date range type.\n * @param date - The input date\n * @param dateRangeType - The desired date range type, i.e., day, week, month, etc.\n * @param firstDayOfWeek - The first day of the week.\n * @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.\n * @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day\n * for multiday view. Defaults to 1\n * @returns An array of dates representing the date range containing the specified date.\n */\nexport function getDateRangeArray(\n date: Date,\n dateRangeType: DateRangeType,\n firstDayOfWeek: DayOfWeek,\n workWeekDays?: DayOfWeek[],\n daysToSelectInDayView: number = 1,\n): Date[] {\n const datesArray: Date[] = [];\n let startDate: Date;\n let endDate = null;\n\n if (!workWeekDays) {\n workWeekDays = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday];\n }\n\n daysToSelectInDayView = Math.max(daysToSelectInDayView, 1);\n\n switch (dateRangeType) {\n case DateRangeType.Day:\n startDate = getDatePart(date);\n endDate = addDays(startDate, daysToSelectInDayView);\n break;\n\n case DateRangeType.Week:\n case DateRangeType.WorkWeek:\n startDate = getStartDateOfWeek(getDatePart(date), firstDayOfWeek);\n endDate = addDays(startDate, TimeConstants.DaysInOneWeek);\n break;\n\n case DateRangeType.Month:\n startDate = new Date(date.getFullYear(), date.getMonth(), 1);\n endDate = addMonths(startDate, 1);\n break;\n\n default:\n throw new Error('Unexpected object: ' + dateRangeType);\n }\n\n // Populate the dates array with the dates in range\n let nextDate = startDate;\n\n do {\n if (dateRangeType !== DateRangeType.WorkWeek) {\n // push all days not in work week view\n datesArray.push(nextDate);\n } else if (workWeekDays.indexOf(nextDate.getDay()) !== -1) {\n datesArray.push(nextDate);\n }\n nextDate = addDays(nextDate, 1);\n } while (!compareDates(nextDate, endDate));\n\n return datesArray;\n}\n\n/**\n * Checks whether the specified date is in the given date range.\n * @param date - The origin date\n * @param dateRange - An array of dates to do the lookup on\n * @returns True if the date matches one of the dates in the specified array, false otherwise.\n */\nexport function isInDateRangeArray(date: Date, dateRange: Date[]): boolean {\n for (const dateInRange of dateRange) {\n if (compareDates(date, dateInRange)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Returns the week number for a date.\n * Week numbers are 1 - 52 (53) in a year\n * @param navigatedDate - A date to find the week number for.\n * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)\n * @param firstWeekOfYear - The first week of the year (1-2)\n * @returns The weeks number array for the current month.\n */\nexport function getWeekNumbersInMonth(\n weeksInMonth: number,\n firstDayOfWeek: DayOfWeek,\n firstWeekOfYear: FirstWeekOfYear,\n navigatedDate: Date,\n): number[] {\n const selectedYear = navigatedDate.getFullYear();\n const selectedMonth = navigatedDate.getMonth();\n let dayOfMonth = 1;\n const fistDayOfMonth = new Date(selectedYear, selectedMonth, dayOfMonth);\n const endOfFirstWeek =\n dayOfMonth +\n (firstDayOfWeek + TimeConstants.DaysInOneWeek - 1) -\n adjustWeekDay(firstDayOfWeek, fistDayOfMonth.getDay());\n let endOfWeekRange = new Date(selectedYear, selectedMonth, endOfFirstWeek);\n dayOfMonth = endOfWeekRange.getDate();\n\n const weeksArray = [];\n for (let i = 0; i < weeksInMonth; i++) {\n // Get week number for end of week\n weeksArray.push(getWeekNumber(endOfWeekRange, firstDayOfWeek, firstWeekOfYear));\n dayOfMonth += TimeConstants.DaysInOneWeek;\n endOfWeekRange = new Date(selectedYear, selectedMonth, dayOfMonth);\n }\n return weeksArray;\n}\n\n/**\n * Returns the week number for a date.\n * Week numbers are 1 - 52 (53) in a year\n * @param date - A date to find the week number for.\n * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)\n * @param firstWeekOfYear - The first week of the year (1-2)\n * @returns The week's number in the year.\n */\nexport function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number {\n // First four-day week of the year - minumum days count\n const fourDayWeek = 4;\n\n switch (firstWeekOfYear) {\n case FirstWeekOfYear.FirstFullWeek:\n return getWeekOfYearFullDays(date, firstDayOfWeek, TimeConstants.DaysInOneWeek);\n\n case FirstWeekOfYear.FirstFourDayWeek:\n return getWeekOfYearFullDays(date, firstDayOfWeek, fourDayWeek);\n\n default:\n return getFirstDayWeekOfYear(date, firstDayOfWeek);\n }\n}\n\n/**\n * Gets the date for the first day of the week based on the given date assuming\n * the specified first day of the week.\n * @param date - The date to find the beginning of the week date for.\n * @returns A new date object representing the first day of the week containing the input date.\n */\nexport function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date {\n let daysOffset = firstDayOfWeek - date.getDay();\n if (daysOffset > 0) {\n // If first day of week is > date, go 1 week back, to ensure resulting date is in the past.\n daysOffset -= TimeConstants.DaysInOneWeek;\n }\n return addDays(date, daysOffset);\n}\n\n/**\n * Gets the date for the last day of the week based on the given date assuming\n * the specified first day of the week.\n * @param date - The date to find the beginning of the week date for.\n * @returns A new date object representing the first day of the week containing the input date.\n */\nexport function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date {\n const lastDayOfWeek = firstDayOfWeek - 1 >= 0 ? firstDayOfWeek - 1 : TimeConstants.DaysInOneWeek - 1;\n let daysOffset = lastDayOfWeek - date.getDay();\n if (daysOffset < 0) {\n // If last day of week is < date, go 1 week forward, to ensure resulting date is in the future.\n daysOffset += TimeConstants.DaysInOneWeek;\n }\n return addDays(date, daysOffset);\n}\n\n/**\n * Gets a new date with the time portion zeroed out, i.e., set to midnight\n * @param date - The origin date\n * @returns A new date with the time set to midnight\n */\nfunction getDatePart(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n}\n\n/**\n * Helper function to assist in date comparisons\n */\nexport function getDatePartHashValue(date: Date): number {\n // Generate date hash value created as sum of Date (up to 31 = 5 bits), Month (up to 11 = 4 bits) and Year.\n // eslint-disable-next-line no-bitwise\n return date.getDate() + (date.getMonth() << 5) + (date.getFullYear() << 9);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns week number for a date.\n * @param date - current selected date.\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @param numberOfFullDays - week settings.\n * @returns The week's number in the year.\n */\nfunction getWeekOfYearFullDays(date: Date, firstDayOfWeek: DayOfWeek, numberOfFullDays: number): number {\n const dayOfYear = getDayOfYear(date) - 1;\n let num = date.getDay() - (dayOfYear % TimeConstants.DaysInOneWeek);\n\n const lastDayOfPrevYear = new Date(date.getFullYear() - 1, MonthOfYear.December, 31);\n const daysInYear = getDayOfYear(lastDayOfPrevYear) - 1;\n\n let num2 = (firstDayOfWeek - num + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n if (num2 !== 0 && num2 >= numberOfFullDays) {\n num2 -= TimeConstants.DaysInOneWeek;\n }\n\n let num3 = dayOfYear - num2;\n if (num3 < 0) {\n num -= daysInYear % TimeConstants.DaysInOneWeek;\n num2 = (firstDayOfWeek - num + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n if (num2 !== 0 && num2 + 1 >= numberOfFullDays) {\n num2 -= TimeConstants.DaysInOneWeek;\n }\n\n num3 = daysInYear - num2;\n }\n\n return Math.floor(num3 / TimeConstants.DaysInOneWeek + 1);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns week number for a date.\n * @param date - current selected date.\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @returns The week's number in the year.\n */\nfunction getFirstDayWeekOfYear(date: Date, firstDayOfWeek: number): number {\n const num = getDayOfYear(date) - 1;\n const num2 = date.getDay() - (num % TimeConstants.DaysInOneWeek);\n const num3 = (num2 - firstDayOfWeek + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n\n return Math.floor((num + num3) / TimeConstants.DaysInOneWeek + 1);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns adjusted week day number when `firstDayOfWeek` is other than Sunday.\n * For Week Day Number comparison checks\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @param dateWeekDay - shifts number forward to 1 week in case passed as true\n * @returns The day of week adjusted to `firstDayOfWeek`; e.g. when `firstDayOfWeek` is Monday (1),\n * Sunday becomes 7.\n */\nfunction adjustWeekDay(firstDayOfWeek: DayOfWeek, dateWeekDay: DayOfWeek): number {\n return firstDayOfWeek !== DayOfWeek.Sunday && dateWeekDay < firstDayOfWeek\n ? dateWeekDay + TimeConstants.DaysInOneWeek\n : dateWeekDay;\n}\n\n/**\n * Returns the day number for a date in a year:\n * the number of days since January 1st in the particular year.\n * @param date - A date to find the day number for.\n * @returns The day's number in the year.\n */\nfunction getDayOfYear(date: Date): number {\n const month = date.getMonth();\n const year = date.getFullYear();\n let daysUntilDate = 0;\n\n for (let i = 0; i < month; i++) {\n daysUntilDate += daysInMonth(i + 1, year);\n }\n\n daysUntilDate += date.getDate();\n\n return daysUntilDate;\n}\n\n/**\n * Returns the number of days in the month\n * @param month - The month number to target (months 1-12).\n * @param year - The year to target.\n * @returns The number of days in the month.\n */\nfunction daysInMonth(month: number, year: number): number {\n return new Date(year, month, 0).getDate();\n}\n"],"names":["DateRangeType","DayOfWeek","FirstWeekOfYear","MonthOfYear","TimeConstants","addDays","date","days","result","Date","getTime","setDate","getDate","addWeeks","weeks","DaysInOneWeek","addMonths","months","newMonth","getMonth","setMonth","MonthInOneYear","addYears","years","setFullYear","getFullYear","getMonthStart","getMonthEnd","getYearStart","getYearEnd","month","compareDates","date1","date2","compareDatePart","getDatePartHashValue","getDateRangeArray","dateRangeType","firstDayOfWeek","workWeekDays","daysToSelectInDayView","datesArray","startDate","endDate","Monday","Tuesday","Wednesday","Thursday","Friday","Math","max","Day","getDatePart","Week","WorkWeek","getStartDateOfWeek","Month","Error","nextDate","push","indexOf","getDay","isInDateRangeArray","dateRange","dateInRange","getWeekNumbersInMonth","weeksInMonth","firstWeekOfYear","navigatedDate","selectedYear","selectedMonth","dayOfMonth","fistDayOfMonth","endOfFirstWeek","adjustWeekDay","endOfWeekRange","weeksArray","i","getWeekNumber","fourDayWeek","FirstFullWeek","getWeekOfYearFullDays","FirstFourDayWeek","getFirstDayWeekOfYear","daysOffset","getEndDateOfWeek","lastDayOfWeek","numberOfFullDays","dayOfYear","getDayOfYear","num","lastDayOfPrevYear","December","daysInYear","num2","num3","floor","dateWeekDay","Sunday","year","daysUntilDate","daysInMonth"],"mappings":"AAAA,SAASA,aAAa,EAAEC,SAAS,EAAEC,eAAe,EAAEC,WAAW,EAAEC,aAAa,QAAQ,eAAe;AAErG;;;;;CAKC,GACD,OAAO,SAASC,QAAQC,IAAU,EAAEC,IAAY,EAAQ;IACtD,MAAMC,SAAS,IAAIC,KAAKH,KAAKI,OAAO;IACpCF,OAAOG,OAAO,CAACH,OAAOI,OAAO,KAAKL;IAClC,OAAOC;AACT,CAAC;AAED;;;;;CAKC,GACD,OAAO,SAASK,SAASP,IAAU,EAAEQ,KAAa,EAAQ;IACxD,OAAOT,QAAQC,MAAMQ,QAAQV,cAAcW,aAAa;AAC1D,CAAC;AAED;;;;;;;CAOC,GACD,OAAO,SAASC,UAAUV,IAAU,EAAEW,MAAc,EAAQ;IAC1D,IAAIT,SAAS,IAAIC,KAAKH,KAAKI,OAAO;IAClC,MAAMQ,WAAWV,OAAOW,QAAQ,KAAKF;IACrCT,OAAOY,QAAQ,CAACF;IAEhB,qHAAqH;IACrH,oDAAoD;IACpD,qFAAqF;IACrF,IACEV,OAAOW,QAA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gC,cAAsB,EAAU;IACzE,MAAMoD,MAAMD,aAAanF,QAAQ;IACjC,MAAMwF,OAAOxF,KAAKuD,MAAM,KAAM6B,MAAMtF,cAAcW,aAAa;IAC/D,MAAMgF,OAAO,AAACD,CAAAA,OAAOxD,iBAAiB,IAAIlC,cAAcW,aAAa,AAAD,IAAKX,cAAcW,aAAa;IAEpG,OAAOkC,KAAK+C,KAAK,CAAC,AAACN,CAAAA,MAAMK,IAAG,IAAK3F,cAAcW,aAAa,GAAG;AACjE;AAEA;;;;;;;;CAQC,GACD,SAAS2D,cAAcpC,cAAyB,EAAE2D,WAAsB,EAAU;IAChF,OAAO3D,mBAAmBrC,UAAUiG,MAAM,IAAID,cAAc3D,iBACxD2D,cAAc7F,cAAcW,aAAa,GACzCkF,WAAW;AACjB;AAEA;;;;;CAKC,GACD,SAASR,aAAanF,IAAU,EAAU;IACxC,MAAMwB,QAAQxB,KAAKa,QAAQ;IAC3B,MAAMgF,OAAO7F,KAAKmB,WAAW;IAC7B,IAAI2E,gBAAgB;IAEpB,IAAK,IAAIvB,IAAI,GAAGA,IAAI/C,OAAO+C,IAAK;QAC9BuB,iBAAiBC,YAAYxB,IAAI,GAAGsB;IACtC;IAEAC,iBAAiB9F,KAAKM,OAAO;IAE7B,OAAOwF;AACT;AAEA;;;;;CAKC,GACD,SAASC,YAAYvE,KAAa,EAAEqE,IAAY,EAAU;IACxD,OAAO,IAAI1F,KAAK0F,MAAMrE,OAAO,GAAGlB,OAAO;AACzC"}
1
+ {"version":3,"sources":["dateMath.ts"],"sourcesContent":["import { DateRangeType, DayOfWeek, FirstWeekOfYear, MonthOfYear, TimeConstants } from '../constants';\n\n/**\n * Returns a date offset from the given date by the specified number of days.\n * @param date - The origin date\n * @param days - The number of days to offset. 'days' can be negative.\n * @returns A new Date object offset from the origin date by the given number of days\n */\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date.getTime());\n result.setDate(result.getDate() + days);\n return result;\n}\n\n/**\n * Returns a date offset from the given date by the specified number of weeks.\n * @param date - The origin date\n * @param weeks - The number of weeks to offset. 'weeks' can be negative.\n * @returns A new Date object offset from the origin date by the given number of weeks\n */\nexport function addWeeks(date: Date, weeks: number): Date {\n return addDays(date, weeks * TimeConstants.DaysInOneWeek);\n}\n\n/**\n * Returns a date offset from the given date by the specified number of months.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param months - The number of months to offset. 'months' can be negative.\n * @returns A new Date object offset from the origin date by the given number of months\n */\nexport function addMonths(date: Date, months: number): Date {\n let result = new Date(date.getTime());\n const newMonth = result.getMonth() + months;\n result.setMonth(newMonth);\n\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to a day the new month has.\n // (Weird modulo math is due to Javascript's treatment of negative numbers in modulo)\n if (\n result.getMonth() !==\n ((newMonth % TimeConstants.MonthInOneYear) + TimeConstants.MonthInOneYear) % TimeConstants.MonthInOneYear\n ) {\n result = addDays(result, -result.getDate());\n }\n return result;\n}\n\n/**\n * Returns a date offset from the given date by the specified number of years.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param years - The number of years to offset. 'years' can be negative.\n * @returns A new Date object offset from the origin date by the given number of years\n */\nexport function addYears(date: Date, years: number): Date {\n let result = new Date(date.getTime());\n result.setFullYear(date.getFullYear() + years);\n\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to a day the new month has.\n // (Weird modulo math is due to Javascript's treatment of negative numbers in modulo)\n if (\n result.getMonth() !==\n ((date.getMonth() % TimeConstants.MonthInOneYear) + TimeConstants.MonthInOneYear) % TimeConstants.MonthInOneYear\n ) {\n result = addDays(result, -result.getDate());\n }\n return result;\n}\n\n/**\n * Returns a date that is the first day of the month of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the first day of the month.\n */\nexport function getMonthStart(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the last day of the month of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the last day of the month.\n */\nexport function getMonthEnd(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the first day of the year of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the first day of the year.\n */\nexport function getYearStart(date: Date): Date {\n return new Date(date.getFullYear(), 0, 1, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is the last day of the year of the provided date.\n * @param date - The origin date\n * @returns A new Date object with the day set to the last day of the year.\n */\nexport function getYearEnd(date: Date): Date {\n return new Date(date.getFullYear() + 1, 0, 0, 0, 0, 0, 0);\n}\n\n/**\n * Returns a date that is a copy of the given date, aside from the month changing to the given month.\n * The method tries to preserve the day-of-month; however, if the new month does not have enough days\n * to contain the original day-of-month, we'll use the last day of the new month.\n * @param date - The origin date\n * @param month - The 0-based index of the month to set on the date.\n * @returns A new Date object with the given month set.\n */\nexport function setMonth(date: Date, month: number): Date {\n return addMonths(date, month - date.getMonth());\n}\n\n/**\n * Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.\n * @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.\n */\nexport function compareDates(date1: Date, date2: Date): boolean {\n if (!date1 && !date2) {\n return true;\n } else if (!date1 || !date2) {\n return false;\n } else {\n return (\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n }\n}\n\n/**\n * Compare the date parts of two dates\n * @param date1 - The first date to compare\n * @param date2 - The second date to compare\n * @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value\n * if date1 is later than date2.\n */\nexport function compareDatePart(date1: Date, date2: Date): Number {\n return getDatePartHashValue(date1) - getDatePartHashValue(date2);\n}\n\n/**\n * Gets the date range array including the specified date. The date range array is calculated as the list\n * of dates accounting for the specified first day of the week and date range type.\n * @param date - The input date\n * @param dateRangeType - The desired date range type, i.e., day, week, month, etc.\n * @param firstDayOfWeek - The first day of the week.\n * @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.\n * @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day\n * for multiday view. Defaults to 1\n * @returns An array of dates representing the date range containing the specified date.\n */\nexport function getDateRangeArray(\n date: Date,\n dateRangeType: DateRangeType,\n firstDayOfWeek: DayOfWeek,\n workWeekDays?: DayOfWeek[],\n daysToSelectInDayView: number = 1,\n): Date[] {\n const datesArray: Date[] = [];\n let startDate: Date;\n let endDate = null;\n\n if (!workWeekDays) {\n workWeekDays = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday];\n }\n\n daysToSelectInDayView = Math.max(daysToSelectInDayView, 1);\n\n switch (dateRangeType) {\n case DateRangeType.Day:\n startDate = getDatePart(date);\n endDate = addDays(startDate, daysToSelectInDayView);\n break;\n\n case DateRangeType.Week:\n case DateRangeType.WorkWeek:\n startDate = getStartDateOfWeek(getDatePart(date), firstDayOfWeek);\n endDate = addDays(startDate, TimeConstants.DaysInOneWeek);\n break;\n\n case DateRangeType.Month:\n startDate = new Date(date.getFullYear(), date.getMonth(), 1);\n endDate = addMonths(startDate, 1);\n break;\n\n default:\n throw new Error('Unexpected object: ' + dateRangeType);\n }\n\n // Populate the dates array with the dates in range\n let nextDate = startDate;\n\n do {\n if (dateRangeType !== DateRangeType.WorkWeek) {\n // push all days not in work week view\n datesArray.push(nextDate);\n } else if (workWeekDays.indexOf(nextDate.getDay()) !== -1) {\n datesArray.push(nextDate);\n }\n nextDate = addDays(nextDate, 1);\n } while (!compareDates(nextDate, endDate));\n\n return datesArray;\n}\n\n/**\n * Checks whether the specified date is in the given date range.\n * @param date - The origin date\n * @param dateRange - An array of dates to do the lookup on\n * @returns True if the date matches one of the dates in the specified array, false otherwise.\n */\nexport function isInDateRangeArray(date: Date, dateRange: Date[]): boolean {\n for (const dateInRange of dateRange) {\n if (compareDates(date, dateInRange)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Returns the week number for a date.\n * Week numbers are 1 - 52 (53) in a year\n * @param navigatedDate - A date to find the week number for.\n * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)\n * @param firstWeekOfYear - The first week of the year (1-2)\n * @returns The weeks number array for the current month.\n */\nexport function getWeekNumbersInMonth(\n weeksInMonth: number,\n firstDayOfWeek: DayOfWeek,\n firstWeekOfYear: FirstWeekOfYear,\n navigatedDate: Date,\n): number[] {\n const selectedYear = navigatedDate.getFullYear();\n const selectedMonth = navigatedDate.getMonth();\n let dayOfMonth = 1;\n const fistDayOfMonth = new Date(selectedYear, selectedMonth, dayOfMonth);\n const endOfFirstWeek =\n dayOfMonth +\n (firstDayOfWeek + TimeConstants.DaysInOneWeek - 1) -\n adjustWeekDay(firstDayOfWeek, fistDayOfMonth.getDay());\n let endOfWeekRange = new Date(selectedYear, selectedMonth, endOfFirstWeek);\n dayOfMonth = endOfWeekRange.getDate();\n\n const weeksArray = [];\n for (let i = 0; i < weeksInMonth; i++) {\n // Get week number for end of week\n weeksArray.push(getWeekNumber(endOfWeekRange, firstDayOfWeek, firstWeekOfYear));\n dayOfMonth += TimeConstants.DaysInOneWeek;\n endOfWeekRange = new Date(selectedYear, selectedMonth, dayOfMonth);\n }\n return weeksArray;\n}\n\n/**\n * Returns the week number for a date.\n * Week numbers are 1 - 52 (53) in a year\n * @param date - A date to find the week number for.\n * @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)\n * @param firstWeekOfYear - The first week of the year (1-2)\n * @returns The week's number in the year.\n */\nexport function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number {\n // First four-day week of the year - minumum days count\n const fourDayWeek = 4;\n\n switch (firstWeekOfYear) {\n case FirstWeekOfYear.FirstFullWeek:\n return getWeekOfYearFullDays(date, firstDayOfWeek, TimeConstants.DaysInOneWeek);\n\n case FirstWeekOfYear.FirstFourDayWeek:\n return getWeekOfYearFullDays(date, firstDayOfWeek, fourDayWeek);\n\n default:\n return getFirstDayWeekOfYear(date, firstDayOfWeek);\n }\n}\n\n/**\n * Gets the date for the first day of the week based on the given date assuming\n * the specified first day of the week.\n * @param date - The date to find the beginning of the week date for.\n * @returns A new date object representing the first day of the week containing the input date.\n */\nexport function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date {\n let daysOffset = firstDayOfWeek - date.getDay();\n if (daysOffset > 0) {\n // If first day of week is > date, go 1 week back, to ensure resulting date is in the past.\n daysOffset -= TimeConstants.DaysInOneWeek;\n }\n return addDays(date, daysOffset);\n}\n\n/**\n * Gets the date for the last day of the week based on the given date assuming\n * the specified first day of the week.\n * @param date - The date to find the beginning of the week date for.\n * @returns A new date object representing the first day of the week containing the input date.\n */\nexport function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date {\n const lastDayOfWeek = firstDayOfWeek - 1 >= 0 ? firstDayOfWeek - 1 : TimeConstants.DaysInOneWeek - 1;\n let daysOffset = lastDayOfWeek - date.getDay();\n if (daysOffset < 0) {\n // If last day of week is < date, go 1 week forward, to ensure resulting date is in the future.\n daysOffset += TimeConstants.DaysInOneWeek;\n }\n return addDays(date, daysOffset);\n}\n\n/**\n * Gets a new date with the time portion zeroed out, i.e., set to midnight\n * @param date - The origin date\n * @returns A new date with the time set to midnight\n */\nfunction getDatePart(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n}\n\n/**\n * Helper function to assist in date comparisons\n */\nexport function getDatePartHashValue(date: Date): number {\n // Generate date hash value created as sum of Date (up to 31 = 5 bits), Month (up to 11 = 4 bits) and Year.\n // eslint-disable-next-line no-bitwise\n return date.getDate() + (date.getMonth() << 5) + (date.getFullYear() << 9);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns week number for a date.\n * @param date - current selected date.\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @param numberOfFullDays - week settings.\n * @returns The week's number in the year.\n */\nfunction getWeekOfYearFullDays(date: Date, firstDayOfWeek: DayOfWeek, numberOfFullDays: number): number {\n const dayOfYear = getDayOfYear(date) - 1;\n let num = date.getDay() - (dayOfYear % TimeConstants.DaysInOneWeek);\n\n const lastDayOfPrevYear = new Date(date.getFullYear() - 1, MonthOfYear.December, 31);\n const daysInYear = getDayOfYear(lastDayOfPrevYear) - 1;\n\n let num2 = (firstDayOfWeek - num + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n if (num2 !== 0 && num2 >= numberOfFullDays) {\n num2 -= TimeConstants.DaysInOneWeek;\n }\n\n let num3 = dayOfYear - num2;\n if (num3 < 0) {\n num -= daysInYear % TimeConstants.DaysInOneWeek;\n num2 = (firstDayOfWeek - num + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n if (num2 !== 0 && num2 + 1 >= numberOfFullDays) {\n num2 -= TimeConstants.DaysInOneWeek;\n }\n\n num3 = daysInYear - num2;\n }\n\n return Math.floor(num3 / TimeConstants.DaysInOneWeek + 1);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns week number for a date.\n * @param date - current selected date.\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @returns The week's number in the year.\n */\nfunction getFirstDayWeekOfYear(date: Date, firstDayOfWeek: number): number {\n const num = getDayOfYear(date) - 1;\n const num2 = date.getDay() - (num % TimeConstants.DaysInOneWeek);\n const num3 = (num2 - firstDayOfWeek + 2 * TimeConstants.DaysInOneWeek) % TimeConstants.DaysInOneWeek;\n\n return Math.floor((num + num3) / TimeConstants.DaysInOneWeek + 1);\n}\n\n/**\n * Helper function for `getWeekNumber`.\n * Returns adjusted week day number when `firstDayOfWeek` is other than Sunday.\n * For Week Day Number comparison checks\n * @param firstDayOfWeek - The first day of week (0-6, Sunday = 0)\n * @param dateWeekDay - shifts number forward to 1 week in case passed as true\n * @returns The day of week adjusted to `firstDayOfWeek`; e.g. when `firstDayOfWeek` is Monday (1),\n * Sunday becomes 7.\n */\nfunction adjustWeekDay(firstDayOfWeek: DayOfWeek, dateWeekDay: DayOfWeek): number {\n return firstDayOfWeek !== DayOfWeek.Sunday && dateWeekDay < firstDayOfWeek\n ? dateWeekDay + TimeConstants.DaysInOneWeek\n : dateWeekDay;\n}\n\n/**\n * Returns the day number for a date in a year:\n * the number of days since January 1st in the particular year.\n * @param date - A date to find the day number for.\n * @returns The day's number in the year.\n */\nfunction getDayOfYear(date: Date): number {\n const month = date.getMonth();\n const year = date.getFullYear();\n let daysUntilDate = 0;\n\n for (let i = 0; i < month; i++) {\n daysUntilDate += daysInMonth(i + 1, year);\n }\n\n daysUntilDate += date.getDate();\n\n return daysUntilDate;\n}\n\n/**\n * Returns the number of days in the month\n * @param month - The month number to target (months 1-12).\n * @param year - The year to target.\n * @returns The number of days in the month.\n */\nfunction daysInMonth(month: number, year: number): number {\n return new Date(year, month, 0).getDate();\n}\n"],"names":["DateRangeType","DayOfWeek","FirstWeekOfYear","MonthOfYear","TimeConstants","addDays","date","days","result","Date","getTime","setDate","getDate","addWeeks","weeks","DaysInOneWeek","addMonths","months","newMonth","getMonth","setMonth","MonthInOneYear","addYears","years","setFullYear","getFullYear","getMonthStart","getMonthEnd","getYearStart","getYearEnd","month","compareDates","date1","date2","compareDatePart","getDatePartHashValue","getDateRangeArray","dateRangeType","firstDayOfWeek","workWeekDays","daysToSelectInDayView","datesArray","startDate","endDate","Monday","Tuesday","Wednesday","Thursday","Friday","Math","max","Day","getDatePart","Week","WorkWeek","getStartDateOfWeek","Month","Error","nextDate","push","indexOf","getDay","isInDateRangeArray","dateRange","dateInRange","getWeekNumbersInMonth","weeksInMonth","firstWeekOfYear","navigatedDate","selectedYear","selectedMonth","dayOfMonth","fistDayOfMonth","endOfFirstWeek","adjustWeekDay","endOfWeekRange","weeksArray","i","getWeekNumber","fourDayWeek","FirstFullWeek","getWeekOfYearFullDays","FirstFourDayWeek","getFirstDayWeekOfYear","daysOffset","getEndDateOfWeek","lastDayOfWeek","numberOfFullDays","dayOfYear","getDayOfYear","num","lastDayOfPrevYear","December","daysInYear","num2","num3","floor","dateWeekDay","Sunday","year","daysUntilDate","daysInMonth"],"mappings":"AAAA,SAASA,aAAa,EAAEC,SAAS,EAAEC,eAAe,EAAEC,WAAW,EAAEC,aAAa,QAAQ,eAAe;AAErG;;;;;CAKC,GACD,OAAO,SAASC,QAAQC,IAAU,EAAEC,IAAY;IAC9C,MAAMC,SAAS,IAAIC,KAAKH,KAAKI,OAAO;IACpCF,OAAOG,OAAO,CAACH,OAAOI,OAAO,KAAKL;IAClC,OAAOC;AACT;AAEA;;;;;CAKC,GACD,OAAO,SAASK,SAASP,IAAU,EAAEQ,KAAa;IAChD,OAAOT,QAAQC,MAAMQ,QAAQV,cAAcW,aAAa;AAC1D;AAEA;;;;;;;CAOC,GACD,OAAO,SAASC,UAAUV,IAAU,EAAEW,MAAc;IAClD,IAAIT,SAAS,IAAIC,KAAKH,KAAKI,OAAO;IAClC,MAAMQ,WAAWV,OAAOW,QAAQ,KAAKF;IACrCT,OAAOY,QAAQ,CAACF;IAEhB,qHAAqH;IACrH,oDAAoD;IACpD,qFAAqF;IACrF,IACEV,OAAOW,QAAQ,OACf,AAAC,CAAA,AAACD,WAAWd,cAAciB,cAAc,GAAIjB,cAAciB,cAAc,AAAD,IAAKjB,cAAciB,cAAc,EACzG;QACAb,SAASH,QAAQG,QAAQ,CAACA,OAAOI,OAAO;IAC1C;IACA,OAAOJ;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASc,SAAShB,IAAU,EAAEiB,KAAa;IAChD,IAAIf,SAAS,IAAIC,KAAKH,KAAKI,OAAO;IAClCF,OAAOgB,WAAW,CAAClB,KAAKmB,WAAW,KAAKF;IAExC,qHAAqH;IACrH,oDAAoD;IACpD,qFAAqF;IACrF,IACEf,OAAOW,QAAQ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AGsB;IACtC;IAEAC,iBAAiB9F,KAAKM,OAAO;IAE7B,OAAOwF;AACT;AAEA;;;;;CAKC,GACD,SAASC,YAAYvE,KAAa,EAAEqE,IAAY;IAC9C,OAAO,IAAI1F,KAAK0F,MAAMrE,OAAO,GAAGlB,OAAO;AACzC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["dom.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\n\nexport function getWindow(targetElement?: Element | null): Window | undefined {\n if (!canUseDOM() || typeof window === 'undefined') {\n return undefined;\n }\n\n const el = targetElement as Element;\n\n return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : window;\n}\n"],"names":["canUseDOM","getWindow","targetElement","window","undefined","el","ownerDocument","defaultView"],"mappings":"AAAA,SAASA,SAAS,QAAQ,4BAA4B;AAEtD,OAAO,SAASC,UAAUC,aAA8B,EAAsB;IAC5E,IAAI,CAACF,eAAe,OAAOG,WAAW,aAAa;QACjD,OAAOC;IACT,CAAC;IAED,MAAMC,KAAKH;IAEX,OAAOG,MAAMA,GAAGC,aAAa,IAAID,GAAGC,aAAa,CAACC,WAAW,GAAGF,GAAGC,aAAa,CAACC,WAAW,GAAGJ,MAAM;AACvG,CAAC"}
1
+ {"version":3,"sources":["dom.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\n\nexport function getWindow(targetElement?: Element | null): Window | undefined {\n if (!canUseDOM() || typeof window === 'undefined') {\n return undefined;\n }\n\n const el = targetElement as Element;\n\n return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : window;\n}\n"],"names":["canUseDOM","getWindow","targetElement","window","undefined","el","ownerDocument","defaultView"],"mappings":"AAAA,SAASA,SAAS,QAAQ,4BAA4B;AAEtD,OAAO,SAASC,UAAUC,aAA8B;IACtD,IAAI,CAACF,eAAe,OAAOG,WAAW,aAAa;QACjD,OAAOC;IACT;IAEA,MAAMC,KAAKH;IAEX,OAAOG,MAAMA,GAAGC,aAAa,IAAID,GAAGC,aAAa,CAACC,WAAW,GAAGF,GAAGC,aAAa,CAACC,WAAW,GAAGJ;AACjG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["focus.ts"],"sourcesContent":["import { getWindow } from './dom';\n\nlet targetToFocusOnNextRepaint: HTMLElement | { focus: () => void } | null | undefined = undefined;\n\n/**\n * Sets focus to an element asynchronously. The focus will be set at the next browser repaint,\n * meaning it won't cause any extra recalculations. If more than one focusAsync is called during one frame,\n * only the latest called focusAsync element will actually be focused\n * @param element - The element to focus\n */\nexport function focusAsync(element: HTMLElement | { focus: () => void } | undefined | null): void {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n\n targetToFocusOnNextRepaint = element;\n\n const win = getWindow(element as Element);\n\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(() => {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}\n"],"names":["getWindow","targetToFocusOnNextRepaint","undefined","focusAsync","element","win","requestAnimationFrame","focus"],"mappings":"AAAA,SAASA,SAAS,QAAQ,QAAQ;AAElC,IAAIC,6BAAqFC;AAEzF;;;;;CAKC,GACD,OAAO,SAASC,WAAWC,OAA+D,EAAQ;IAChG,IAAIA,SAAS;QACX,wFAAwF;QACxF,IAAIH,4BAA4B;YAC9BA,6BAA6BG;YAC7B;QACF,CAAC;QAEDH,6BAA6BG;QAE7B,MAAMC,MAAML,UAAUI;QAEtB,IAAIC,KAAK;YACP,iGAAiG;YACjGA,IAAIC,qBAAqB,CAAC,IAAM;gBAC9BL,8BAA8BA,2BAA2BM,KAAK;gBAE9D,yEAAyE;gBACzEN,6BAA6BC;YAC/B;QACF,CAAC;IACH,CAAC;AACH,CAAC"}
1
+ {"version":3,"sources":["focus.ts"],"sourcesContent":["import { getWindow } from './dom';\n\nlet targetToFocusOnNextRepaint: HTMLElement | { focus: () => void } | null | undefined = undefined;\n\n/**\n * Sets focus to an element asynchronously. The focus will be set at the next browser repaint,\n * meaning it won't cause any extra recalculations. If more than one focusAsync is called during one frame,\n * only the latest called focusAsync element will actually be focused\n * @param element - The element to focus\n */\nexport function focusAsync(element: HTMLElement | { focus: () => void } | undefined | null): void {\n if (element) {\n // An element was already queued to be focused, so replace that one with the new element\n if (targetToFocusOnNextRepaint) {\n targetToFocusOnNextRepaint = element;\n return;\n }\n\n targetToFocusOnNextRepaint = element;\n\n const win = getWindow(element as Element);\n\n if (win) {\n // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe\n win.requestAnimationFrame(() => {\n targetToFocusOnNextRepaint && targetToFocusOnNextRepaint.focus();\n\n // We are done focusing for this frame, so reset the queued focus element\n targetToFocusOnNextRepaint = undefined;\n });\n }\n }\n}\n"],"names":["getWindow","targetToFocusOnNextRepaint","undefined","focusAsync","element","win","requestAnimationFrame","focus"],"mappings":"AAAA,SAASA,SAAS,QAAQ,QAAQ;AAElC,IAAIC,6BAAqFC;AAEzF;;;;;CAKC,GACD,OAAO,SAASC,WAAWC,OAA+D;IACxF,IAAIA,SAAS;QACX,wFAAwF;QACxF,IAAIH,4BAA4B;YAC9BA,6BAA6BG;YAC7B;QACF;QAEAH,6BAA6BG;QAE7B,MAAMC,MAAML,UAAUI;QAEtB,IAAIC,KAAK;YACP,iGAAiG;YACjGA,IAAIC,qBAAqB,CAAC;gBACxBL,8BAA8BA,2BAA2BM,KAAK;gBAE9D,yEAAyE;gBACzEN,6BAA6BC;YAC/B;QACF;IACF;AACF"}
@@ -7,13 +7,13 @@ import { resolvePositioningShorthand, usePositioning } from '@fluentui/react-pos
7
7
  * @returns tuple of trigger and popup refs
8
8
  * @internal
9
9
  */ export function usePopupPositioning(props) {
10
- const { positioning } = props;
10
+ const { positioning } = props;
11
11
  const popupOptions = {
12
12
  position: 'below',
13
13
  align: 'start',
14
14
  ...resolvePositioningShorthand(positioning)
15
15
  };
16
- const { targetRef , containerRef } = usePositioning(popupOptions);
16
+ const { targetRef, containerRef } = usePositioning(popupOptions);
17
17
  return [
18
18
  targetRef,
19
19
  containerRef
@@ -1 +1 @@
1
- {"version":3,"sources":["usePopupPositioning.ts"],"sourcesContent":["import * as React from 'react';\nimport { resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport type { DatePickerProps } from '../DatePicker';\n\n/**\n * Hook used to handle positioning of the popup.\n *\n * @param props - DatePicker props\n * @returns tuple of trigger and popup refs\n * @internal\n */\nexport function usePopupPositioning(\n props: DatePickerProps,\n): [triggerRef: React.MutableRefObject<HTMLElement>, popupRef: React.MutableRefObject<HTMLDivElement>] {\n const { positioning } = props;\n\n const popupOptions = {\n position: 'below' as const,\n align: 'start' as const,\n ...resolvePositioningShorthand(positioning),\n };\n\n const { targetRef, containerRef } = usePositioning(popupOptions);\n\n return [targetRef, containerRef];\n}\n"],"names":["React","resolvePositioningShorthand","usePositioning","usePopupPositioning","props","positioning","popupOptions","position","align","targetRef","containerRef"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAG1F;;;;;;CAMC,GACD,OAAO,SAASC,oBACdC,KAAsB,EAC+E;IACrG,MAAM,EAAEC,YAAW,EAAE,GAAGD;IAExB,MAAME,eAAe;QACnBC,UAAU;QACVC,OAAO;QACP,GAAGP,4BAA4BI,YAAY;IAC7C;IAEA,MAAM,EAAEI,UAAS,EAAEC,aAAY,EAAE,GAAGR,eAAeI;IAEnD,OAAO;QAACG;QAAWC;KAAa;AAClC,CAAC"}
1
+ {"version":3,"sources":["usePopupPositioning.ts"],"sourcesContent":["import * as React from 'react';\nimport { resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport type { DatePickerProps } from '../DatePicker';\n\n/**\n * Hook used to handle positioning of the popup.\n *\n * @param props - DatePicker props\n * @returns tuple of trigger and popup refs\n * @internal\n */\nexport function usePopupPositioning(\n props: DatePickerProps,\n): [triggerRef: React.MutableRefObject<HTMLElement>, popupRef: React.MutableRefObject<HTMLDivElement>] {\n const { positioning } = props;\n\n const popupOptions = {\n position: 'below' as const,\n align: 'start' as const,\n ...resolvePositioningShorthand(positioning),\n };\n\n const { targetRef, containerRef } = usePositioning(popupOptions);\n\n return [targetRef, containerRef];\n}\n"],"names":["React","resolvePositioningShorthand","usePositioning","usePopupPositioning","props","positioning","popupOptions","position","align","targetRef","containerRef"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAG1F;;;;;;CAMC,GACD,OAAO,SAASC,oBACdC,KAAsB;IAEtB,MAAM,EAAEC,WAAW,EAAE,GAAGD;IAExB,MAAME,eAAe;QACnBC,UAAU;QACVC,OAAO;QACP,GAAGP,4BAA4BI,YAAY;IAC7C;IAEA,MAAM,EAAEI,SAAS,EAAEC,YAAY,EAAE,GAAGR,eAAeI;IAEnD,OAAO;QAACG;QAAWC;KAAa;AAClC"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/Calendar/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/Calendar/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["Calendar.js"],"sourcesContent":["export * from './components/Calendar/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["Calendar.js"],"sourcesContent":["export * from './components/Calendar/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/CalendarDay/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/CalendarDay/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["CalendarDay.js"],"sourcesContent":["export * from './components/CalendarDay/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["CalendarDay.js"],"sourcesContent":["export * from './components/CalendarDay/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/CalendarDayGrid/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/CalendarDayGrid/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["CalendarDayGrid.js"],"sourcesContent":["export * from './components/CalendarDayGrid/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["CalendarDayGrid.js"],"sourcesContent":["export * from './components/CalendarDayGrid/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/CalendarMonth/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/CalendarMonth/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["CalendarMonth.js"],"sourcesContent":["export * from './components/CalendarMonth/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["CalendarMonth.js"],"sourcesContent":["export * from './components/CalendarMonth/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/CalendarPicker/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/CalendarPicker/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["CalendarPicker.js"],"sourcesContent":["export * from './components/CalendarPicker/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["CalendarPicker.js"],"sourcesContent":["export * from './components/CalendarPicker/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/CalendarYear/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/CalendarYear/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["CalendarYear.js"],"sourcesContent":["export * from './components/CalendarYear/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["CalendarYear.js"],"sourcesContent":["export * from './components/CalendarYear/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/DatePicker/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/DatePicker/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["DatePicker.js"],"sourcesContent":["export * from './components/DatePicker/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["DatePicker.js"],"sourcesContent":["export * from './components/DatePicker/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Calendar", {
6
6
  enumerable: true,
7
- get: ()=>Calendar
7
+ get: function() {
8
+ return Calendar;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _keyboardKeys = require("@fluentui/keyboard-keys");
12
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _keyboardkeys = require("@fluentui/keyboard-keys");
14
+ const _reactutilities = require("@fluentui/react-utilities");
13
15
  const _utils = require("../../utils");
14
- const _calendarDay = require("../CalendarDay/CalendarDay");
15
- const _calendarMonth = require("../CalendarMonth/CalendarMonth");
16
- const _useCalendarStylesStyles = require("./useCalendarStyles.styles");
16
+ const _CalendarDay = require("../CalendarDay/CalendarDay");
17
+ const _CalendarMonth = require("../CalendarMonth/CalendarMonth");
18
+ const _useCalendarStylesstyles = require("./useCalendarStyles.styles");
17
19
  const MIN_SIZE_FORCE_OVERLAY = 440;
18
20
  const defaultWorkWeekDays = [
19
21
  _utils.DayOfWeek.Monday,
@@ -22,8 +24,8 @@ const defaultWorkWeekDays = [
22
24
  _utils.DayOfWeek.Thursday,
23
25
  _utils.DayOfWeek.Friday
24
26
  ];
25
- function useDateState({ value , today =new Date() , onSelectDate }) {
26
- /** The currently selected date in the calendar */ const [selectedDate, setSelectedDate] = (0, _reactUtilities.useControllableState)({
27
+ function useDateState({ value, today = new Date(), onSelectDate }) {
28
+ /** The currently selected date in the calendar */ const [selectedDate, setSelectedDate] = (0, _reactutilities.useControllableState)({
27
29
  defaultState: today,
28
30
  initialState: today,
29
31
  state: value
@@ -44,10 +46,11 @@ function useDateState({ value , today =new Date() , onSelectDate }) {
44
46
  setNavigatedDay(date);
45
47
  };
46
48
  const onDateSelected = (date, selectedDateRangeArray)=>{
49
+ var _onSelectDate;
47
50
  setNavigatedMonth(date);
48
51
  setNavigatedDay(date);
49
52
  setSelectedDate(date);
50
- onSelectDate === null || onSelectDate === void 0 ? void 0 : onSelectDate(date, selectedDateRangeArray);
53
+ (_onSelectDate = onSelectDate) === null || _onSelectDate === void 0 ? void 0 : _onSelectDate(date, selectedDateRangeArray);
51
54
  };
52
55
  return [
53
56
  selectedDate,
@@ -58,8 +61,8 @@ function useDateState({ value , today =new Date() , onSelectDate }) {
58
61
  navigateMonth
59
62
  ];
60
63
  }
61
- function useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp , isMonthPickerVisible: isMonthPickerVisibleProp , showMonthPickerAsOverlay }) {
62
- /** State used to show/hide month picker */ const [isMonthPickerVisible, setIsMonthPickerVisible] = (0, _reactUtilities.useControllableState)({
64
+ function useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp, isMonthPickerVisible: isMonthPickerVisibleProp, showMonthPickerAsOverlay }) {
65
+ /** State used to show/hide month picker */ const [isMonthPickerVisible, setIsMonthPickerVisible] = (0, _reactutilities.useControllableState)({
63
66
  defaultState: false,
64
67
  initialState: true,
65
68
  state: getShowMonthPickerAsOverlay({
@@ -67,7 +70,7 @@ function useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp , isMon
67
70
  showMonthPickerAsOverlay
68
71
  }) ? undefined : isMonthPickerVisibleProp
69
72
  });
70
- /** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = (0, _reactUtilities.useControllableState)({
73
+ /** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = (0, _reactutilities.useControllableState)({
71
74
  defaultState: true,
72
75
  initialState: true,
73
76
  state: getShowMonthPickerAsOverlay({
@@ -85,7 +88,7 @@ function useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp , isMon
85
88
  toggleDayMonthPickerVisibility
86
89
  ];
87
90
  }
88
- function useFocusLogic({ componentRef }, isDayPickerVisible, isMonthPickerVisible) {
91
+ function useFocusLogic({ componentRef }, isDayPickerVisible, isMonthPickerVisible) {
89
92
  const dayPicker = _react.useRef(null);
90
93
  const monthPicker = _react.useRef(null);
91
94
  const focusOnUpdate = _react.useRef(false);
@@ -120,7 +123,7 @@ function useFocusLogic({ componentRef }, isDayPickerVisible, isMonthPickerVisib
120
123
  ];
121
124
  }
122
125
  const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
123
- const { allFocusable =false , calendarDayProps , calendarMonthProps , className , componentRef , dateRangeType =_utils.DateRangeType.Day , dateTimeFormatter =_utils.DEFAULT_DATE_FORMATTING , firstDayOfWeek =_utils.DayOfWeek.Sunday , firstWeekOfYear =_utils.FirstWeekOfYear.FirstDay , highlightCurrentMonth =false , highlightSelectedMonth =false , id , isDayPickerVisible: isDayPickerVisibleProp = true , isMonthPickerVisible: isMonthPickerVisibleProp = true , maxDate , minDate , onDismiss , onSelectDate , restrictedDates , showCloseButton =false , showGoToToday =true , showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false , showSixWeeksByDefault =false , showWeekNumbers =false , strings =_utils.DEFAULT_CALENDAR_STRINGS , today =new Date() , value , workWeekDays =defaultWorkWeekDays } = props;
126
+ const { allFocusable = false, calendarDayProps, calendarMonthProps, className, componentRef, dateRangeType = _utils.DateRangeType.Day, dateTimeFormatter = _utils.DEFAULT_DATE_FORMATTING, firstDayOfWeek = _utils.DayOfWeek.Sunday, firstWeekOfYear = _utils.FirstWeekOfYear.FirstDay, highlightCurrentMonth = false, highlightSelectedMonth = false, id, isDayPickerVisible: isDayPickerVisibleProp = true, isMonthPickerVisible: isMonthPickerVisibleProp = true, maxDate, minDate, onDismiss, onSelectDate, restrictedDates, showCloseButton = false, showGoToToday = true, showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false, showSixWeeksByDefault = false, showWeekNumbers = false, strings = _utils.DEFAULT_CALENDAR_STRINGS, today = new Date(), value, workWeekDays = defaultWorkWeekDays } = props;
124
127
  const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({
125
128
  onSelectDate,
126
129
  value,
@@ -180,8 +183,8 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
180
183
  const onButtonKeyDown = (callback)=>{
181
184
  return (ev)=>{
182
185
  switch(ev.key){
183
- case _keyboardKeys.Enter:
184
- case _keyboardKeys.Space:
186
+ case _keyboardkeys.Enter:
187
+ case _keyboardkeys.Space:
185
188
  callback();
186
189
  break;
187
190
  }
@@ -189,17 +192,18 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
189
192
  };
190
193
  const onDatePickerPopupKeyDown = (ev)=>{
191
194
  switch(ev.key){
192
- case _keyboardKeys.Enter:
195
+ case _keyboardkeys.Enter:
193
196
  ev.preventDefault();
194
197
  break;
195
- case _keyboardKeys.Backspace:
198
+ case _keyboardkeys.Backspace:
196
199
  ev.preventDefault();
197
200
  break;
198
- case _keyboardKeys.Escape:
201
+ case _keyboardkeys.Escape:
202
+ var _onDismiss;
199
203
  ev.stopPropagation();
200
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
204
+ (_onDismiss = onDismiss) === null || _onDismiss === void 0 ? void 0 : _onDismiss();
201
205
  break;
202
- case _keyboardKeys.PageUp:
206
+ case _keyboardkeys.PageUp:
203
207
  if (ev.ctrlKey) {
204
208
  // go to next year
205
209
  navigateDay((0, _utils.addYears)(navigatedDay, 1));
@@ -209,7 +213,7 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
209
213
  }
210
214
  ev.preventDefault();
211
215
  break;
212
- case _keyboardKeys.PageDown:
216
+ case _keyboardkeys.PageDown:
213
217
  if (ev.ctrlKey) {
214
218
  // go to previous year
215
219
  navigateDay((0, _utils.addYears)(navigatedDay, -1));
@@ -225,7 +229,7 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
225
229
  };
226
230
  const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);
227
231
  const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;
228
- const classes = (0, _useCalendarStylesStyles.useCalendarStyles_unstable)({
232
+ const classes = (0, _useCalendarStylesstyles.useCalendarStyles_unstable)({
229
233
  className,
230
234
  isDayPickerVisible,
231
235
  isMonthPickerVisible,
@@ -252,7 +256,7 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
252
256
  className: classes.liveRegion,
253
257
  "aria-live": "polite",
254
258
  "aria-atomic": "true"
255
- }, /*#__PURE__*/ _react.createElement("span", null, selectedDateString)), isDayPickerVisible && /*#__PURE__*/ _react.createElement(_calendarDay.CalendarDay, {
259
+ }, /*#__PURE__*/ _react.createElement("span", null, selectedDateString)), isDayPickerVisible && /*#__PURE__*/ _react.createElement(_CalendarDay.CalendarDay, {
256
260
  selectedDate: selectedDate,
257
261
  navigatedDate: navigatedDay,
258
262
  today: today,
@@ -281,7 +285,7 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
281
285
  className: classes.divider
282
286
  }), isMonthPickerVisible ? /*#__PURE__*/ _react.createElement("div", {
283
287
  className: classes.monthPickerWrapper
284
- }, /*#__PURE__*/ _react.createElement(_calendarMonth.CalendarMonth, {
288
+ }, /*#__PURE__*/ _react.createElement(_CalendarMonth.CalendarMonth, {
285
289
  navigatedDate: navigatedMonth,
286
290
  selectedDate: navigatedDay,
287
291
  strings: strings,
@@ -300,7 +304,7 @@ const Calendar = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
300
304
  }), renderGoToTodayButton()) : renderGoToTodayButton());
301
305
  });
302
306
  Calendar.displayName = 'Calendar';
303
- function getShowMonthPickerAsOverlay({ isDayPickerVisible , showMonthPickerAsOverlay }) {
307
+ function getShowMonthPickerAsOverlay({ isDayPickerVisible, showMonthPickerAsOverlay }) {
304
308
  const win = (0, _utils.getWindow)();
305
309
  return showMonthPickerAsOverlay || isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY;
306
310
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["Calendar.js"],"sourcesContent":["import * as React from 'react';\nimport { Backspace, Enter, Escape, PageDown, PageUp, Space } from '@fluentui/keyboard-keys';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport { addMonths, addYears, DateRangeType, DayOfWeek, DEFAULT_CALENDAR_STRINGS, DEFAULT_DATE_FORMATTING, FirstWeekOfYear, focusAsync, getWindow } from '../../utils';\nimport { CalendarDay } from '../CalendarDay/CalendarDay';\nimport { CalendarMonth } from '../CalendarMonth/CalendarMonth';\nimport { useCalendarStyles_unstable } from './useCalendarStyles.styles';\nconst MIN_SIZE_FORCE_OVERLAY = 440;\nconst defaultWorkWeekDays = [\n DayOfWeek.Monday,\n DayOfWeek.Tuesday,\n DayOfWeek.Wednesday,\n DayOfWeek.Thursday,\n DayOfWeek.Friday\n];\nfunction useDateState({ value , today =new Date() , onSelectDate }) {\n /** The currently selected date in the calendar */ const [selectedDate, setSelectedDate] = useControllableState({\n defaultState: today,\n initialState: today,\n state: value\n });\n /** The currently focused date in the day picker, but not necessarily selected */ const [navigatedDay = today, setNavigatedDay] = React.useState(value);\n /** The currently focused date in the month picker, but not necessarily selected */ const [navigatedMonth = today, setNavigatedMonth] = React.useState(value);\n /** If using a controlled value, when that value changes, navigate to that date */ const [lastSelectedDate = today, setLastSelectedDate] = React.useState(value);\n if (value && lastSelectedDate.valueOf() !== value.valueOf()) {\n setNavigatedDay(value);\n setNavigatedMonth(value);\n setLastSelectedDate(value);\n }\n const navigateMonth = (date)=>{\n setNavigatedMonth(date);\n };\n const navigateDay = (date)=>{\n setNavigatedMonth(date);\n setNavigatedDay(date);\n };\n const onDateSelected = (date, selectedDateRangeArray)=>{\n setNavigatedMonth(date);\n setNavigatedDay(date);\n setSelectedDate(date);\n onSelectDate === null || onSelectDate === void 0 ? void 0 : onSelectDate(date, selectedDateRangeArray);\n };\n return [\n selectedDate,\n navigatedDay,\n navigatedMonth,\n onDateSelected,\n navigateDay,\n navigateMonth\n ];\n}\nfunction useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp , isMonthPickerVisible: isMonthPickerVisibleProp , showMonthPickerAsOverlay }) {\n /** State used to show/hide month picker */ const [isMonthPickerVisible, setIsMonthPickerVisible] = useControllableState({\n defaultState: false,\n initialState: true,\n state: getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay\n }) ? undefined : isMonthPickerVisibleProp\n });\n /** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = useControllableState({\n defaultState: true,\n initialState: true,\n state: getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay\n }) ? undefined : isDayPickerVisibleProp\n });\n const toggleDayMonthPickerVisibility = ()=>{\n setIsMonthPickerVisible(!isMonthPickerVisible);\n setIsDayPickerVisible(!isDayPickerVisible);\n };\n return [\n isMonthPickerVisible,\n isDayPickerVisible,\n toggleDayMonthPickerVisibility\n ];\n}\nfunction useFocusLogic({ componentRef }, isDayPickerVisible, isMonthPickerVisible) {\n const dayPicker = React.useRef(null);\n const monthPicker = React.useRef(null);\n const focusOnUpdate = React.useRef(false);\n const focus = React.useCallback(()=>{\n if (isDayPickerVisible && dayPicker.current) {\n focusAsync(dayPicker.current);\n } else if (isMonthPickerVisible && monthPicker.current) {\n focusAsync(monthPicker.current);\n }\n }, [\n isDayPickerVisible,\n isMonthPickerVisible\n ]);\n React.useImperativeHandle(componentRef, ()=>({\n focus\n }), [\n focus\n ]);\n React.useEffect(()=>{\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n const focusOnNextUpdate = ()=>{\n focusOnUpdate.current = true;\n };\n return [\n dayPicker,\n monthPicker,\n focusOnNextUpdate\n ];\n}\n/**\n * @internal\n */ export const Calendar = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{\n const { allFocusable =false , calendarDayProps , calendarMonthProps , className , componentRef , dateRangeType =DateRangeType.Day , dateTimeFormatter =DEFAULT_DATE_FORMATTING , firstDayOfWeek =DayOfWeek.Sunday , firstWeekOfYear =FirstWeekOfYear.FirstDay , highlightCurrentMonth =false , highlightSelectedMonth =false , id , isDayPickerVisible: isDayPickerVisibleProp = true , isMonthPickerVisible: isMonthPickerVisibleProp = true , maxDate , minDate , onDismiss , onSelectDate , restrictedDates , showCloseButton =false , showGoToToday =true , showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false , showSixWeeksByDefault =false , showWeekNumbers =false , strings =DEFAULT_CALENDAR_STRINGS , today =new Date() , value , workWeekDays =defaultWorkWeekDays } = props;\n const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({\n onSelectDate,\n value,\n today\n });\n const [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] = useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp\n });\n const [dayPicker, monthPicker, focusOnNextUpdate] = useFocusLogic({\n componentRef\n }, isDayPickerVisible, isMonthPickerVisible);\n const renderGoToTodayButton = ()=>{\n let goTodayEnabled = showGoToToday;\n if (goTodayEnabled && today) {\n goTodayEnabled = navigatedDay.getFullYear() !== today.getFullYear() || navigatedDay.getMonth() !== today.getMonth() || navigatedMonth.getFullYear() !== today.getFullYear() || navigatedMonth.getMonth() !== today.getMonth();\n }\n return showGoToToday && /*#__PURE__*/ React.createElement(\"button\", {\n className: classes.goTodayButton,\n onClick: onGotoToday,\n onKeyDown: onButtonKeyDown(onGotoToday),\n type: \"button\",\n disabled: !goTodayEnabled\n }, strings.goToToday);\n };\n const onNavigateDayDate = (date, focusOnNavigatedDay)=>{\n navigateDay(date);\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n };\n const onNavigateMonthDate = (date, focusOnNavigatedDay)=>{\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n if (!focusOnNavigatedDay) {\n navigateMonth(date);\n return;\n }\n if (monthPickerOnly) {\n onDateSelected(date);\n }\n navigateDay(date);\n };\n const onHeaderSelect = getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp\n }) ? ()=>{\n toggleDayMonthPickerVisibility();\n focusOnNextUpdate();\n } : undefined;\n const onGotoToday = ()=>{\n navigateDay(today);\n focusOnNextUpdate();\n };\n const onButtonKeyDown = (callback)=>{\n return (ev)=>{\n switch(ev.key){\n case Enter:\n case Space:\n callback();\n break;\n }\n };\n };\n const onDatePickerPopupKeyDown = (ev)=>{\n switch(ev.key){\n case Enter:\n ev.preventDefault();\n break;\n case Backspace:\n ev.preventDefault();\n break;\n case Escape:\n ev.stopPropagation();\n onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();\n break;\n case PageUp:\n if (ev.ctrlKey) {\n // go to next year\n navigateDay(addYears(navigatedDay, 1));\n } else {\n // go to next month\n navigateDay(addMonths(navigatedDay, 1));\n }\n ev.preventDefault();\n break;\n case PageDown:\n if (ev.ctrlKey) {\n // go to previous year\n navigateDay(addYears(navigatedDay, -1));\n } else {\n // go to previous month\n navigateDay(addMonths(navigatedDay, -1));\n }\n ev.preventDefault();\n break;\n default:\n break;\n }\n };\n const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);\n const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;\n const classes = useCalendarStyles_unstable({\n className,\n isDayPickerVisible,\n isMonthPickerVisible,\n showWeekNumbers\n });\n let todayDateString = '';\n let selectedDateString = '';\n if (dateTimeFormatter && strings.todayDateFormatString) {\n todayDateString = strings.todayDateFormatString.replace('{0}', dateTimeFormatter.formatMonthDayYear(today, strings));\n }\n if (dateTimeFormatter && strings.selectedDateFormatString) {\n const dateStringFormatter = monthPickerOnly ? dateTimeFormatter.formatMonthYear : dateTimeFormatter.formatMonthDayYear;\n selectedDateString = strings.selectedDateFormatString.replace('{0}', dateStringFormatter(selectedDate, strings));\n }\n const selectionAndTodayString = selectedDateString + ', ' + todayDateString;\n return /*#__PURE__*/ React.createElement(\"div\", {\n id: id,\n ref: forwardedRef,\n role: \"group\",\n \"aria-label\": selectionAndTodayString,\n className: classes.root,\n onKeyDown: onDatePickerPopupKeyDown\n }, /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.liveRegion,\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"span\", null, selectedDateString)), isDayPickerVisible && /*#__PURE__*/ React.createElement(CalendarDay, {\n selectedDate: selectedDate,\n navigatedDate: navigatedDay,\n today: today,\n onSelectDate: onDateSelected,\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate: onNavigateDayDate,\n onDismiss: onDismiss,\n firstDayOfWeek: firstDayOfWeek,\n dateRangeType: dateRangeType,\n strings: strings,\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect: onHeaderSelect,\n showWeekNumbers: showWeekNumbers,\n firstWeekOfYear: firstWeekOfYear,\n dateTimeFormatter: dateTimeFormatter,\n showSixWeeksByDefault: showSixWeeksByDefault,\n minDate: minDate,\n maxDate: maxDate,\n restrictedDates: restrictedDates,\n workWeekDays: workWeekDays,\n componentRef: dayPicker,\n showCloseButton: showCloseButton,\n allFocusable: allFocusable,\n ...calendarDayProps\n }), isDayPickerVisible && isMonthPickerVisible && /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.divider\n }), isMonthPickerVisible ? /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.monthPickerWrapper\n }, /*#__PURE__*/ React.createElement(CalendarMonth, {\n navigatedDate: navigatedMonth,\n selectedDate: navigatedDay,\n strings: strings,\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate: onNavigateMonthDate,\n today: today,\n highlightCurrentMonth: highlightCurrentMonth,\n highlightSelectedMonth: highlightSelectedMonth,\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect: onHeaderSelect,\n dateTimeFormatter: dateTimeFormatter,\n minDate: minDate,\n maxDate: maxDate,\n componentRef: monthPicker,\n ...calendarMonthProps\n }), renderGoToTodayButton()) : renderGoToTodayButton());\n});\nCalendar.displayName = 'Calendar';\nfunction getShowMonthPickerAsOverlay({ isDayPickerVisible , showMonthPickerAsOverlay }) {\n const win = getWindow();\n return showMonthPickerAsOverlay || isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY;\n}\n"],"names":["Calendar","MIN_SIZE_FORCE_OVERLAY","defaultWorkWeekDays","DayOfWeek","Monday","Tuesday","Wednesday","Thursday","Friday","useDateState","value","today","Date","onSelectDate","selectedDate","setSelectedDate","useControllableState","defaultState","initialState","state","navigatedDay","setNavigatedDay","React","useState","navigatedMonth","setNavigatedMonth","lastSelectedDate","setLastSelectedDate","valueOf","navigateMonth","date","navigateDay","onDateSelected","selectedDateRangeArray","useVisibilityState","isDayPickerVisible","isDayPickerVisibleProp","isMonthPickerVisible","isMonthPickerVisibleProp","showMonthPickerAsOverlay","setIsMonthPickerVisible","getShowMonthPickerAsOverlay","undefined","setIsDayPickerVisible","toggleDayMonthPickerVisibility","useFocusLogic","componentRef","dayPicker","useRef","monthPicker","focusOnUpdate","focus","useCallback","current","focusAsync","useImperativeHandle","useEffect","focusOnNextUpdate","forwardRef","props","forwardedRef","allFocusable","calendarDayProps","calendarMonthProps","className","dateRangeType","DateRangeType","Day","dateTimeFormatter","DEFAULT_DATE_FORMATTING","firstDayOfWeek","Sunday","firstWeekOfYear","FirstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","id","maxDate","minDate","onDismiss","restrictedDates","showCloseButton","showGoToToday","showMonthPickerAsOverlayProp","showSixWeeksByDefault","showWeekNumbers","strings","DEFAULT_CALENDAR_STRINGS","workWeekDays","renderGoToTodayButton","goTodayEnabled","getFullYear","getMonth","createElement","classes","goTodayButton","onClick","onGotoToday","onKeyDown","onButtonKeyDown","type","disabled","goToToday","onNavigateDayDate","focusOnNavigatedDay","onNavigateMonthDate","monthPickerOnly","onHeaderSelect","callback","ev","key","Enter","Space","onDatePickerPopupKeyDown","preventDefault","Backspace","Escape","stopPropagation","PageUp","ctrlKey","addYears","addMonths","PageDown","useCalendarStyles_unstable","todayDateString","selectedDateString","todayDateFormatString","replace","formatMonthDayYear","selectedDateFormatString","dateStringFormatter","formatMonthYear","selectionAndTodayString","ref","role","root","liveRegion","CalendarDay","navigatedDate","onNavigateDate","divider","monthPickerWrapper","CalendarMonth","displayName","win","getWindow","innerWidth"],"mappings":";;;;+BAkHiBA;;aAAAA;;;6DAlHM;8BAC2C;gCAC7B;uBACoH;6BAC7H;+BACE;yCACa;AAC3C,MAAMC,yBAAyB;AAC/B,MAAMC,sBAAsB;IACxBC,gBAAS,CAACC,MAAM;IAChBD,gBAAS,CAACE,OAAO;IACjBF,gBAAS,CAACG,SAAS;IACnBH,gBAAS,CAACI,QAAQ;IAClBJ,gBAAS,CAACK,MAAM;CACnB;AACD,SAASC,aAAa,EAAEC,MAAK,EAAGC,OAAO,IAAIC,OAAM,EAAGC,aAAY,EAAG,EAAE;IACjE,gDAAgD,GAAG,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,oCAAoB,EAAC;QAC5GC,cAAcN;QACdO,cAAcP;QACdQ,OAAOT;IACX;IACA,+EAA+E,GAAG,MAAM,CAACU,eAAeT,KAAK,EAAEU,gBAAgB,GAAGC,OAAMC,QAAQ,CAACb;IACjJ,iFAAiF,GAAG,MAAM,CAACc,iBAAiBb,KAAK,EAAEc,kBAAkB,GAAGH,OAAMC,QAAQ,CAACb;IACvJ,gFAAgF,GAAG,MAAM,CAACgB,mBAAmBf,KAAK,EAAEgB,oBAAoB,GAAGL,OAAMC,QAAQ,CAACb;IAC1J,IAAIA,SAASgB,iBAAiBE,OAAO,OAAOlB,MAAMkB,OAAO,IAAI;QACzDP,gBAAgBX;QAChBe,kBAAkBf;QAClBiB,oBAAoBjB;IACxB,CAAC;IACD,MAAMmB,gBAAgB,CAACC,OAAO;QAC1BL,kBAAkBK;IACtB;IACA,MAAMC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A;QACjBrB,cAAcA;QACd,GAAGC,gBAAgB;IACvB,IAAI3B,sBAAsBE,wBAAwB,WAAW,GAAGf,OAAMwE,aAAa,CAAC,OAAO;QACvF9B,WAAW+B,QAAQ8C,OAAO;IAC9B,IAAIxG,uBAAuB,WAAW,GAAGf,OAAMwE,aAAa,CAAC,OAAO;QAChE9B,WAAW+B,QAAQ+C,kBAAkB;IACzC,GAAG,WAAW,GAAGxH,OAAMwE,aAAa,CAACiD,4BAAa,EAAE;QAChDJ,eAAenH;QACfV,cAAcM;QACdmE,SAASA;QACT,6CAA6C;QAC7CqD,gBAAgBlC;QAChB/F,OAAOA;QACPgE,uBAAuBA;QACvBC,wBAAwBA;QACxB,6CAA6C;QAC7CgC,gBAAgBA;QAChBxC,mBAAmBA;QACnBW,SAASA;QACTD,SAASA;QACThC,cAAcG;QACd,GAAGc,kBAAkB;IACzB,IAAI2B,2BAA2BA,uBAAuB;AAC1D;AACA1F,SAASgJ,WAAW,GAAG;AACvB,SAASvG,4BAA4B,EAAEN,mBAAkB,EAAGI,yBAAwB,EAAG,EAAE;IACrF,MAAM0G,MAAMC,IAAAA,gBAAS;IACrB,OAAO3G,4BAA4BJ,sBAAsB8G,OAAOA,IAAIE,UAAU,IAAIlJ;AACtF"}
1
+ {"version":3,"sources":["Calendar.js"],"sourcesContent":["import * as React from 'react';\nimport { Backspace, Enter, Escape, PageDown, PageUp, Space } from '@fluentui/keyboard-keys';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport { addMonths, addYears, DateRangeType, DayOfWeek, DEFAULT_CALENDAR_STRINGS, DEFAULT_DATE_FORMATTING, FirstWeekOfYear, focusAsync, getWindow } from '../../utils';\nimport { CalendarDay } from '../CalendarDay/CalendarDay';\nimport { CalendarMonth } from '../CalendarMonth/CalendarMonth';\nimport { useCalendarStyles_unstable } from './useCalendarStyles.styles';\nconst MIN_SIZE_FORCE_OVERLAY = 440;\nconst defaultWorkWeekDays = [\n DayOfWeek.Monday,\n DayOfWeek.Tuesday,\n DayOfWeek.Wednesday,\n DayOfWeek.Thursday,\n DayOfWeek.Friday\n];\nfunction useDateState({ value, today = new Date(), onSelectDate }) {\n /** The currently selected date in the calendar */ const [selectedDate, setSelectedDate] = useControllableState({\n defaultState: today,\n initialState: today,\n state: value\n });\n /** The currently focused date in the day picker, but not necessarily selected */ const [navigatedDay = today, setNavigatedDay] = React.useState(value);\n /** The currently focused date in the month picker, but not necessarily selected */ const [navigatedMonth = today, setNavigatedMonth] = React.useState(value);\n /** If using a controlled value, when that value changes, navigate to that date */ const [lastSelectedDate = today, setLastSelectedDate] = React.useState(value);\n if (value && lastSelectedDate.valueOf() !== value.valueOf()) {\n setNavigatedDay(value);\n setNavigatedMonth(value);\n setLastSelectedDate(value);\n }\n const navigateMonth = (date)=>{\n setNavigatedMonth(date);\n };\n const navigateDay = (date)=>{\n setNavigatedMonth(date);\n setNavigatedDay(date);\n };\n const onDateSelected = (date, selectedDateRangeArray)=>{\n var _onSelectDate;\n setNavigatedMonth(date);\n setNavigatedDay(date);\n setSelectedDate(date);\n (_onSelectDate = onSelectDate) === null || _onSelectDate === void 0 ? void 0 : _onSelectDate(date, selectedDateRangeArray);\n };\n return [\n selectedDate,\n navigatedDay,\n navigatedMonth,\n onDateSelected,\n navigateDay,\n navigateMonth\n ];\n}\nfunction useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp, isMonthPickerVisible: isMonthPickerVisibleProp, showMonthPickerAsOverlay }) {\n /** State used to show/hide month picker */ const [isMonthPickerVisible, setIsMonthPickerVisible] = useControllableState({\n defaultState: false,\n initialState: true,\n state: getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay\n }) ? undefined : isMonthPickerVisibleProp\n });\n /** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = useControllableState({\n defaultState: true,\n initialState: true,\n state: getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay\n }) ? undefined : isDayPickerVisibleProp\n });\n const toggleDayMonthPickerVisibility = ()=>{\n setIsMonthPickerVisible(!isMonthPickerVisible);\n setIsDayPickerVisible(!isDayPickerVisible);\n };\n return [\n isMonthPickerVisible,\n isDayPickerVisible,\n toggleDayMonthPickerVisibility\n ];\n}\nfunction useFocusLogic({ componentRef }, isDayPickerVisible, isMonthPickerVisible) {\n const dayPicker = React.useRef(null);\n const monthPicker = React.useRef(null);\n const focusOnUpdate = React.useRef(false);\n const focus = React.useCallback(()=>{\n if (isDayPickerVisible && dayPicker.current) {\n focusAsync(dayPicker.current);\n } else if (isMonthPickerVisible && monthPicker.current) {\n focusAsync(monthPicker.current);\n }\n }, [\n isDayPickerVisible,\n isMonthPickerVisible\n ]);\n React.useImperativeHandle(componentRef, ()=>({\n focus\n }), [\n focus\n ]);\n React.useEffect(()=>{\n if (focusOnUpdate.current) {\n focus();\n focusOnUpdate.current = false;\n }\n });\n const focusOnNextUpdate = ()=>{\n focusOnUpdate.current = true;\n };\n return [\n dayPicker,\n monthPicker,\n focusOnNextUpdate\n ];\n}\n/**\n * @internal\n */ export const Calendar = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{\n const { allFocusable = false, calendarDayProps, calendarMonthProps, className, componentRef, dateRangeType = DateRangeType.Day, dateTimeFormatter = DEFAULT_DATE_FORMATTING, firstDayOfWeek = DayOfWeek.Sunday, firstWeekOfYear = FirstWeekOfYear.FirstDay, highlightCurrentMonth = false, highlightSelectedMonth = false, id, isDayPickerVisible: isDayPickerVisibleProp = true, isMonthPickerVisible: isMonthPickerVisibleProp = true, maxDate, minDate, onDismiss, onSelectDate, restrictedDates, showCloseButton = false, showGoToToday = true, showMonthPickerAsOverlay: showMonthPickerAsOverlayProp = false, showSixWeeksByDefault = false, showWeekNumbers = false, strings = DEFAULT_CALENDAR_STRINGS, today = new Date(), value, workWeekDays = defaultWorkWeekDays } = props;\n const [selectedDate, navigatedDay, navigatedMonth, onDateSelected, navigateDay, navigateMonth] = useDateState({\n onSelectDate,\n value,\n today\n });\n const [isMonthPickerVisible, isDayPickerVisible, toggleDayMonthPickerVisibility] = useVisibilityState({\n isDayPickerVisible: isDayPickerVisibleProp,\n isMonthPickerVisible: isMonthPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp\n });\n const [dayPicker, monthPicker, focusOnNextUpdate] = useFocusLogic({\n componentRef\n }, isDayPickerVisible, isMonthPickerVisible);\n const renderGoToTodayButton = ()=>{\n let goTodayEnabled = showGoToToday;\n if (goTodayEnabled && today) {\n goTodayEnabled = navigatedDay.getFullYear() !== today.getFullYear() || navigatedDay.getMonth() !== today.getMonth() || navigatedMonth.getFullYear() !== today.getFullYear() || navigatedMonth.getMonth() !== today.getMonth();\n }\n return showGoToToday && /*#__PURE__*/ React.createElement(\"button\", {\n className: classes.goTodayButton,\n onClick: onGotoToday,\n onKeyDown: onButtonKeyDown(onGotoToday),\n type: \"button\",\n disabled: !goTodayEnabled\n }, strings.goToToday);\n };\n const onNavigateDayDate = (date, focusOnNavigatedDay)=>{\n navigateDay(date);\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n };\n const onNavigateMonthDate = (date, focusOnNavigatedDay)=>{\n if (focusOnNavigatedDay) {\n focusOnNextUpdate();\n }\n if (!focusOnNavigatedDay) {\n navigateMonth(date);\n return;\n }\n if (monthPickerOnly) {\n onDateSelected(date);\n }\n navigateDay(date);\n };\n const onHeaderSelect = getShowMonthPickerAsOverlay({\n isDayPickerVisible: isDayPickerVisibleProp,\n showMonthPickerAsOverlay: showMonthPickerAsOverlayProp\n }) ? ()=>{\n toggleDayMonthPickerVisibility();\n focusOnNextUpdate();\n } : undefined;\n const onGotoToday = ()=>{\n navigateDay(today);\n focusOnNextUpdate();\n };\n const onButtonKeyDown = (callback)=>{\n return (ev)=>{\n switch(ev.key){\n case Enter:\n case Space:\n callback();\n break;\n }\n };\n };\n const onDatePickerPopupKeyDown = (ev)=>{\n switch(ev.key){\n case Enter:\n ev.preventDefault();\n break;\n case Backspace:\n ev.preventDefault();\n break;\n case Escape:\n var _onDismiss;\n ev.stopPropagation();\n (_onDismiss = onDismiss) === null || _onDismiss === void 0 ? void 0 : _onDismiss();\n break;\n case PageUp:\n if (ev.ctrlKey) {\n // go to next year\n navigateDay(addYears(navigatedDay, 1));\n } else {\n // go to next month\n navigateDay(addMonths(navigatedDay, 1));\n }\n ev.preventDefault();\n break;\n case PageDown:\n if (ev.ctrlKey) {\n // go to previous year\n navigateDay(addYears(navigatedDay, -1));\n } else {\n // go to previous month\n navigateDay(addMonths(navigatedDay, -1));\n }\n ev.preventDefault();\n break;\n default:\n break;\n }\n };\n const showMonthPickerAsOverlay = getShowMonthPickerAsOverlay(props);\n const monthPickerOnly = !showMonthPickerAsOverlay && !isDayPickerVisible;\n const classes = useCalendarStyles_unstable({\n className,\n isDayPickerVisible,\n isMonthPickerVisible,\n showWeekNumbers\n });\n let todayDateString = '';\n let selectedDateString = '';\n if (dateTimeFormatter && strings.todayDateFormatString) {\n todayDateString = strings.todayDateFormatString.replace('{0}', dateTimeFormatter.formatMonthDayYear(today, strings));\n }\n if (dateTimeFormatter && strings.selectedDateFormatString) {\n const dateStringFormatter = monthPickerOnly ? dateTimeFormatter.formatMonthYear : dateTimeFormatter.formatMonthDayYear;\n selectedDateString = strings.selectedDateFormatString.replace('{0}', dateStringFormatter(selectedDate, strings));\n }\n const selectionAndTodayString = selectedDateString + ', ' + todayDateString;\n return /*#__PURE__*/ React.createElement(\"div\", {\n id: id,\n ref: forwardedRef,\n role: \"group\",\n \"aria-label\": selectionAndTodayString,\n className: classes.root,\n onKeyDown: onDatePickerPopupKeyDown\n }, /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.liveRegion,\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"span\", null, selectedDateString)), isDayPickerVisible && /*#__PURE__*/ React.createElement(CalendarDay, {\n selectedDate: selectedDate,\n navigatedDate: navigatedDay,\n today: today,\n onSelectDate: onDateSelected,\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate: onNavigateDayDate,\n onDismiss: onDismiss,\n firstDayOfWeek: firstDayOfWeek,\n dateRangeType: dateRangeType,\n strings: strings,\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect: onHeaderSelect,\n showWeekNumbers: showWeekNumbers,\n firstWeekOfYear: firstWeekOfYear,\n dateTimeFormatter: dateTimeFormatter,\n showSixWeeksByDefault: showSixWeeksByDefault,\n minDate: minDate,\n maxDate: maxDate,\n restrictedDates: restrictedDates,\n workWeekDays: workWeekDays,\n componentRef: dayPicker,\n showCloseButton: showCloseButton,\n allFocusable: allFocusable,\n ...calendarDayProps\n }), isDayPickerVisible && isMonthPickerVisible && /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.divider\n }), isMonthPickerVisible ? /*#__PURE__*/ React.createElement(\"div\", {\n className: classes.monthPickerWrapper\n }, /*#__PURE__*/ React.createElement(CalendarMonth, {\n navigatedDate: navigatedMonth,\n selectedDate: navigatedDay,\n strings: strings,\n // eslint-disable-next-line react/jsx-no-bind\n onNavigateDate: onNavigateMonthDate,\n today: today,\n highlightCurrentMonth: highlightCurrentMonth,\n highlightSelectedMonth: highlightSelectedMonth,\n // eslint-disable-next-line react/jsx-no-bind\n onHeaderSelect: onHeaderSelect,\n dateTimeFormatter: dateTimeFormatter,\n minDate: minDate,\n maxDate: maxDate,\n componentRef: monthPicker,\n ...calendarMonthProps\n }), renderGoToTodayButton()) : renderGoToTodayButton());\n});\nCalendar.displayName = 'Calendar';\nfunction getShowMonthPickerAsOverlay({ isDayPickerVisible, showMonthPickerAsOverlay }) {\n const win = getWindow();\n return showMonthPickerAsOverlay || isDayPickerVisible && win && win.innerWidth <= MIN_SIZE_FORCE_OVERLAY;\n}\n"],"names":["Calendar","MIN_SIZE_FORCE_OVERLAY","defaultWorkWeekDays","DayOfWeek","Monday","Tuesday","Wednesday","Thursday","Friday","useDateState","value","today","Date","onSelectDate","selectedDate","setSelectedDate","useControllableState","defaultState","initialState","state","navigatedDay","setNavigatedDay","React","useState","navigatedMonth","setNavigatedMonth","lastSelectedDate","setLastSelectedDate","valueOf","navigateMonth","date","navigateDay","onDateSelected","selectedDateRangeArray","_onSelectDate","useVisibilityState","isDayPickerVisible","isDayPickerVisibleProp","isMonthPickerVisible","isMonthPickerVisibleProp","showMonthPickerAsOverlay","setIsMonthPickerVisible","getShowMonthPickerAsOverlay","undefined","setIsDayPickerVisible","toggleDayMonthPickerVisibility","useFocusLogic","componentRef","dayPicker","useRef","monthPicker","focusOnUpdate","focus","useCallback","current","focusAsync","useImperativeHandle","useEffect","focusOnNextUpdate","forwardRef","props","forwardedRef","allFocusable","calendarDayProps","calendarMonthProps","className","dateRangeType","DateRangeType","Day","dateTimeFormatter","DEFAULT_DATE_FORMATTING","firstDayOfWeek","Sunday","firstWeekOfYear","FirstWeekOfYear","FirstDay","highlightCurrentMonth","highlightSelectedMonth","id","maxDate","minDate","onDismiss","restrictedDates","showCloseButton","showGoToToday","showMonthPickerAsOverlayProp","showSixWeeksByDefault","showWeekNumbers","strings","DEFAULT_CALENDAR_STRINGS","workWeekDays","renderGoToTodayButton","goTodayEnabled","getFullYear","getMonth","createElement","classes","goTodayButton","onClick","onGotoToday","onKeyDown","onButtonKeyDown","type","disabled","goToToday","onNavigateDayDate","focusOnNavigatedDay","onNavigateMonthDate","monthPickerOnly","onHeaderSelect","callback","ev","key","Enter","Space","onDatePickerPopupKeyDown","preventDefault","Backspace","Escape","_onDismiss","stopPropagation","PageUp","ctrlKey","addYears","addMonths","PageDown","useCalendarStyles_unstable","todayDateString","selectedDateString","todayDateFormatString","replace","formatMonthDayYear","selectedDateFormatString","dateStringFormatter","formatMonthYear","selectionAndTodayString","ref","role","root","liveRegion","CalendarDay","navigatedDate","onNavigateDate","divider","monthPickerWrapper","CalendarMonth","displayName","win","getWindow","innerWidth"],"mappings":";;;;+BAmHiBA;;;eAAAA;;;;iEAnHM;8BAC2C;g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AAAA,gBAAS;IACrB,OAAO5G,4BAA4BJ,sBAAsB+G,OAAOA,IAAIE,UAAU,IAAIpJ;AACtF"}
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "AnimationDirection", {
6
6
  enumerable: true,
7
- get: ()=>AnimationDirection
7
+ get: function() {
8
+ return AnimationDirection;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  var AnimationDirection;
12
14
  (function(AnimationDirection) {
13
15
  AnimationDirection[AnimationDirection[/**
@@ -1 +1 @@
1
- {"version":3,"sources":["Calendar.types.js"],"sourcesContent":["import * as React from 'react';\nexport var AnimationDirection;\n(function(AnimationDirection) {\n AnimationDirection[AnimationDirection[/**\n * Grid will transition out and in horizontally\n */ \"Horizontal\"] = 0] = \"Horizontal\";\n AnimationDirection[AnimationDirection[/**\n * Grid will transition out and in vertically\n */ \"Vertical\"] = 1] = \"Vertical\";\n})(AnimationDirection || (AnimationDirection = {}));\n"],"names":["AnimationDirection"],"mappings":";;;;+BACWA;;aAAAA;;;6DADY;AAChB,IAAIA;AACV,CAAA,SAASA,kBAAkB,EAAE;IAC1BA,kBAAkB,CAACA,kBAAkB,CAAC;;GAEvC,GAAG,aAAa,GAAG,EAAE,GAAG;IACvBA,kBAAkB,CAACA,kBAAkB,CAAC;;GAEvC,GAAG,WAAW,GAAG,EAAE,GAAG;AACzB,CAAA,EAAGA,sBAAuBA,CAAAA,qBAAqB,CAAC,CAAA"}
1
+ {"version":3,"sources":["Calendar.types.js"],"sourcesContent":["import * as React from 'react';\nexport var AnimationDirection;\n(function(AnimationDirection) {\n AnimationDirection[AnimationDirection[/**\n * Grid will transition out and in horizontally\n */ \"Horizontal\"] = 0] = \"Horizontal\";\n AnimationDirection[AnimationDirection[/**\n * Grid will transition out and in vertically\n */ \"Vertical\"] = 1] = \"Vertical\";\n})(AnimationDirection || (AnimationDirection = {}));\n"],"names":["AnimationDirection"],"mappings":";;;;+BACWA;;;eAAAA;;;;iEADY;AAChB,IAAIA;AACV,CAAA,SAASA,kBAAkB;IACxBA,kBAAkB,CAACA,kBAAkB,CAAC;;GAEvC,GAAG,aAAa,GAAG,EAAE,GAAG;IACvBA,kBAAkB,CAACA,kBAAkB,CAAC;;GAEvC,GAAG,WAAW,GAAG,EAAE,GAAG;AACzB,CAAA,EAAGA,sBAAuBA,CAAAA,qBAAqB,CAAC,CAAA"}
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "defaultCalendarStrings", {
6
6
  enumerable: true,
7
- get: ()=>defaultCalendarStrings
7
+ get: function() {
8
+ return defaultCalendarStrings;
9
+ }
8
10
  });
9
11
  const _utils = require("../../utils");
10
12
  const defaultCalendarStrings = _utils.DEFAULT_CALENDAR_STRINGS;
@@ -1 +1 @@
1
- {"version":3,"sources":["defaults.js"],"sourcesContent":["import { DEFAULT_CALENDAR_STRINGS } from '../../utils';\nexport const defaultCalendarStrings = DEFAULT_CALENDAR_STRINGS;\n"],"names":["defaultCalendarStrings","DEFAULT_CALENDAR_STRINGS"],"mappings":";;;;+BACaA;;aAAAA;;uBAD4B;AAClC,MAAMA,yBAAyBC,+BAAwB"}
1
+ {"version":3,"sources":["defaults.js"],"sourcesContent":["import { DEFAULT_CALENDAR_STRINGS } from '../../utils';\nexport const defaultCalendarStrings = DEFAULT_CALENDAR_STRINGS;\n"],"names":["defaultCalendarStrings","DEFAULT_CALENDAR_STRINGS"],"mappings":";;;;+BACaA;;;eAAAA;;;uBAD4B;AAClC,MAAMA,yBAAyBC,+BAAwB"}