@mantine-vue/schedule 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +6101 -3638
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +6045 -3632
- package/esm/index.mjs.map +1 -1
- package/lib/component-props.d.ts +181 -214
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +8 -114
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.types.d.ts +89 -0
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.vue.d.ts +20 -0
- package/lib/components/DayView/DayView.d.ts +10 -212
- package/lib/components/DayView/DayView.types.d.ts +65 -0
- package/lib/components/DayView/DayView.vue.d.ts +51 -0
- package/lib/components/DragContext/DragContext.d.ts +43 -5
- package/lib/components/MobileMonthView/MobileMonthView.d.ts +10 -171
- package/lib/components/MobileMonthView/MobileMonthView.types.d.ts +110 -0
- package/lib/components/MobileMonthView/MobileMonthView.vue.d.ts +44 -0
- package/lib/components/MonthView/MonthView.d.ts +10 -174
- package/lib/components/MonthView/MonthView.types.d.ts +125 -0
- package/lib/components/MonthView/MonthView.vue.d.ts +56 -0
- package/lib/components/MoreEvents/MoreEvents.d.ts +9 -65
- package/lib/components/MoreEvents/MoreEvents.types.d.ts +62 -0
- package/lib/components/MoreEvents/MoreEvents.vue.d.ts +23 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +10 -346
- package/lib/components/ResourcesDayView/ResourcesDayView.types.d.ts +308 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.vue.d.ts +53 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.d.ts +10 -279
- package/lib/components/ResourcesMonthView/ResourcesMonthView.types.d.ts +233 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.vue.d.ts +52 -0
- package/lib/components/ResourcesMonthView/get-resources-month-view-layout/get-resources-month-view-layout.d.ts +54 -0
- package/lib/components/ResourcesMonthView/index.d.ts +1 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +9 -201
- package/lib/components/ResourcesSchedule/ResourcesSchedule.types.d.ts +159 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.vue.d.ts +44 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +10 -412
- package/lib/components/ResourcesWeekView/ResourcesWeekView.types.d.ts +314 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.vue.d.ts +58 -0
- package/lib/components/Schedule/Schedule.d.ts +9 -134
- package/lib/components/Schedule/Schedule.types.d.ts +153 -0
- package/lib/components/Schedule/Schedule.vue.d.ts +50 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.d.ts +11 -88
- package/lib/components/ScheduleEvent/ScheduleEvent.types.d.ts +109 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.vue.d.ts +24 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.d.ts +36 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.types.d.ts +44 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.vue.d.ts +14 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderNext.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderPrevious.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderToday.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.types.d.ts +70 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/ScheduleHeader.context.d.ts +12 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.d.ts +20 -364
- package/lib/components/ScheduleHeader/ScheduleHeader.types.d.ts +28 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.d.ts +37 -75
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.types.d.ts +54 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.types.d.ts +39 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.vue.d.ts +16 -0
- package/lib/components/ScheduleHeader/ViewSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/index.d.ts +4 -0
- package/lib/components/WeekView/WeekView.d.ts +10 -294
- package/lib/components/WeekView/WeekView.types.d.ts +129 -0
- package/lib/components/WeekView/WeekView.vue.d.ts +60 -0
- package/lib/components/YearView/YearView.d.ts +9 -151
- package/lib/components/YearView/YearView.types.d.ts +87 -0
- package/lib/components/YearView/YearView.vue.d.ts +35 -0
- package/lib/components/shared.d.ts +71 -141
- package/lib/components/use-slot-drag-select.d.ts +7 -9
- package/lib/components/use-slot-drop-target.d.ts +38 -0
- package/lib/hooks/use-event-resize.d.ts +1 -1
- package/lib/hooks/use-horizontal-event-resize.d.ts +2 -156
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/package.json +4 -4
- package/styles.css +44 -54
- package/styles.layer.css +44 -54
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/labels.ts","../src/utils/format-date/format-date.ts","../src/utils/get-weekdays-names/get-weekdays-names.ts","../src/utils/get-start-of-week/get-start-of-week.ts","../src/utils/get-end-of-week/get-end-of-week.ts","../src/utils/get-week-number/get-week-number.ts","../src/utils/get-month-days/get-month-days.ts","../src/utils/is-after-min-date/is-after-min-date.ts","../src/utils/is-before-max-date/is-before-max-date.ts","../src/utils/is-same-month/is-same-month.ts","../src/utils/get-months-by-quarter/get-months-by-quarter.ts","../src/utils/clamp-interval-minutes/clamp-interval-minutes.ts","../src/utils/parse-time-string/parse-time-string.ts","../src/utils/to-time-string/to-time-string.ts","../src/utils/get-day-time-intervals/get-day-time-intervals.ts","../src/utils/to-date-string/to-date-string.ts","../src/utils/get-week-days/get-week-days.ts","../src/utils/get-months-list/get-months-list.ts","../src/utils/get-years-list/get-years-list.ts","../src/utils/next-week/next-week.ts","../src/utils/previous-week/previous-week.ts","../src/utils/get-current-time-position/get-current-time-position.ts","../src/utils/is-in-time-range/is-in-time-range.ts","../src/utils/is-all-day-event/is-all-day-event.ts","../src/utils/validate-event/validate-event.ts","../src/utils/sort-events/sort-events.ts","../src/utils/is-events-overlap/is-events-overlap.ts","../src/utils/get-visible-events/get-visible-events.ts","../src/utils/is-multiday-event/is-multiday-event.ts","../src/utils/is-event-in-time-range/is-event-in-time-range.ts","../src/utils/is-within-week/is-within-week.ts","../src/utils/get-month-range/get-month-range.ts","../src/utils/get-day-position/get-day-position.ts","../src/utils/calculate-drop-time/calculate-drop-time.ts","../src/utils/calculate-month-drop-date/calculate-month-drop-date.ts","../src/utils/get-business-hours-mod/get-business-hours-mod.ts","../src/utils/expand-recurring-events/expand-recurring-events.ts","../src/utils/get-ordered-resources/get-ordered-resources.ts","../src/utils/get-group-to-resource-id-map/get-group-to-resource-id-map.ts","../src/utils/handle-resources-grid-key-down/handle-resources-grid-key-down.ts","../src/hooks/use-event-resize.ts","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.module.css","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.ts","../src/components/ScheduleEvent/ScheduleEvent.module.css","../src/components/ScheduleEvent/ScheduleEvent.ts","../src/components/shared.ts","../src/components/MoreEvents/MoreEvents.module.css","../src/components/MoreEvents/MoreEvents.ts","../src/components/use-slot-drag-select.ts","../src/components/ScheduleHeader/ScheduleHeader.module.css","../src/components/ScheduleHeader/HeaderControl/HeaderControl.module.css","../src/components/ScheduleHeader/ViewSelect/ViewSelect.module.css","../src/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.module.css","../src/components/ScheduleHeader/ScheduleHeader.ts","../src/components/ScheduleHeader/ScheduleHeaderBase.ts","../src/components/DayView/get-day-view-events/get-day-positioned-events.ts","../src/components/DayView/get-day-view-events/get-day-view-events.ts","../src/components/DayView/DayView.module.css","../src/components/DayView/DayView.ts","../src/components/MobileMonthView/get-mobile-month-view-events.ts","../src/components/MobileMonthView/MobileMonthView.module.css","../src/components/MobileMonthView/MobileMonthView.ts","../src/components/keyboard-navigation.ts","../src/components/MonthView/get-month-view-events/add-event-to-day-groups.ts","../src/components/MonthView/get-month-view-events/calculate-event-position-in-week.ts","../src/components/MonthView/get-month-view-events/find-available-row.ts","../src/components/MonthView/get-month-view-events/get-weeks-in-range.ts","../src/components/MonthView/get-month-view-events/get-month-positioned-events.ts","../src/components/MonthView/get-month-view-events/get-month-view-events.ts","../src/components/MonthView/get-renderable-month-event-segments.ts","../src/components/MonthView/MonthView.module.css","../src/components/MonthView/MonthView.ts","../src/components/WeekView/get-week-label/get-week-label.ts","../src/components/WeekView/get-week-view-events/filter-week-view-events.ts","../src/components/WeekView/get-week-view-events/assign-event-rows.ts","../src/components/WeekView/get-week-view-events/calculate-all-day-event-offset.ts","../src/components/WeekView/get-week-view-events/calculate-all-day-event-width.ts","../src/components/WeekView/get-week-view-events/calculate-event-days.ts","../src/components/WeekView/get-week-view-events/calculate-regular-event-overlaps.ts","../src/components/WeekView/get-week-view-events/find-available-column.ts","../src/components/WeekView/get-week-view-events/get-event-end-date.ts","../src/components/WeekView/get-week-view-events/get-hanging-status.ts","../src/components/WeekView/get-week-view-events/get-week-positioned-events.ts","../src/components/WeekView/get-week-view-events/get-week-view-events.ts","../src/components/WeekView/WeekView.module.css","../src/components/WeekView/WeekView.ts","../src/components/YearView/get-year-view-events/get-year-view-events.ts","../src/components/YearView/YearView.module.css","../src/components/YearView/YearView.ts","../src/components/Schedule/Schedule.module.css","../src/components/Schedule/Schedule.ts","../src/hooks/use-horizontal-event-resize.ts","../src/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.ts","../src/components/ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events.ts","../src/components/ResourcesDayView/ResourcesDayView.module.css","../src/components/ResourcesDayView/ResourcesDayView.ts","../src/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.ts","../src/components/ResourcesWeekView/ResourcesWeekView.module.css","../src/components/ResourcesWeekView/ResourcesWeekView.ts","../src/components/ResourcesMonthView/ResourcesMonthView.module.css","../src/components/ResourcesMonthView/ResourcesMonthView.ts","../src/components/ResourcesSchedule/ResourcesSchedule.module.css","../src/components/ResourcesSchedule/ResourcesSchedule.ts","../src/components/DragContext/DragContext.ts"],"sourcesContent":["export interface ScheduleLabels {\n day: string\n week: string\n month: string\n year: string\n allDay: string\n weekday: string\n timeSlot: string\n today: string\n next: string\n previous: string\n more: string\n selectMonth: string\n selectYear: string\n switchToDayView: string\n switchToWeekView: string\n switchToMonthView: string\n switchToYearView: string\n viewSelectLabel: string\n noEvents: string\n moreLabel: (hiddenEventsCount: number) => string\n resource?: string\n resources?: string\n resourceSlot?: string\n}\n\nexport const DEFAULT_SCHEDULE_LABELS: ScheduleLabels = {\n today: 'Today',\n next: 'Next',\n previous: 'Previous',\n more: 'More',\n day: 'Day',\n week: 'Week',\n month: 'Month',\n year: 'Year',\n allDay: 'All day',\n weekday: 'Weekday',\n timeSlot: 'Time slot',\n selectMonth: 'Select month',\n selectYear: 'Select year',\n switchToDayView: 'Switch to day view',\n switchToWeekView: 'Switch to week view',\n switchToMonthView: 'Switch to month view',\n switchToYearView: 'Switch to year view',\n viewSelectLabel: 'Calendar view',\n noEvents: 'No events',\n moreLabel: (hiddenEventsCount: number) => `+${hiddenEventsCount} more`,\n resource: 'Resource',\n resources: 'Resources',\n resourceSlot: 'Resource time slot',\n}\n\nexport type ScheduleLabelsOverride = Partial<ScheduleLabels>\n\nexport function getLabel<K extends keyof ScheduleLabels>(\n key: K,\n override?: ScheduleLabelsOverride,\n): ScheduleLabels[K] {\n if (override) {\n return { ...DEFAULT_SCHEDULE_LABELS, ...override }[key]\n }\n\n return DEFAULT_SCHEDULE_LABELS[key]\n}\n","import dayjs from 'dayjs'\nimport { DateLabelFormat } from '../../types'\n\nexport interface FormatDateInput {\n locale: string\n date: string | Date | dayjs.Dayjs\n format: DateLabelFormat\n}\n\nexport function formatDate({ locale, date, format }: FormatDateInput) {\n if (typeof format === 'function') {\n return format(dayjs(date).format('YYYY-MM-DD HH:mm:ss'))\n }\n\n return dayjs(date).locale(locale).format(format)\n}\n","import dayjs from 'dayjs'\nimport type { VNodeChild } from 'vue'\nimport type { DateLabelFormat, DayOfWeek } from '../../types'\nimport { formatDate } from '../format-date/format-date'\n\ninterface GetWeekdaysNamesInput {\n locale: string\n format?: DateLabelFormat\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function getWeekdaysNames({\n locale,\n format = 'dd',\n firstDayOfWeek = 1,\n}: GetWeekdaysNamesInput) {\n const baseDate = dayjs().day(firstDayOfWeek)\n const labels: VNodeChild[] = []\n\n for (let i = 0; i < 7; i += 1) {\n labels.push(formatDate({ locale, date: baseDate.add(i, 'days'), format }))\n }\n\n return labels\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\n\ninterface GetStartOfWeekInput {\n date: AnyDateValue\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function getStartOfWeek({ date, firstDayOfWeek = 1 }: GetStartOfWeekInput) {\n let value = dayjs(date)\n\n while (value.day() !== firstDayOfWeek) {\n value = value.subtract(1, 'day')\n }\n\n return value.format('YYYY-MM-DD')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\n\nexport function getEndOfWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek = 1) {\n let value = dayjs(date)\n\n if (!value.isValid()) {\n return value\n }\n\n const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1\n while (value.day() !== lastDayOfWeek) {\n value = value.add(1, 'day')\n }\n\n return value.format('YYYY-MM-DD')\n}\n","import dayjs from 'dayjs'\nimport isoWeek from 'dayjs/plugin/isoWeek.js'\nimport { AnyDateValue } from '../../types'\n\ndayjs.extend(isoWeek)\n\nexport function getWeekNumber(week: AnyDateValue | AnyDateValue[]): number {\n if (Array.isArray(week)) {\n const monday = week.find((date) => dayjs(date).day() === 1)\n return dayjs(monday).isoWeek()\n }\n\n return dayjs(week).isoWeek()\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getEndOfWeek } from '../get-end-of-week/get-end-of-week'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\n\ninterface GetMonthDaysInput {\n month: AnyDateValue\n firstDayOfWeek: DayOfWeek | undefined\n consistentWeeks: boolean | undefined\n}\n\nexport function getMonthDays({\n month,\n firstDayOfWeek = 1,\n consistentWeeks,\n}: GetMonthDaysInput): DateStringValue[][] {\n const day = dayjs(month).subtract(dayjs(month).date() - 1, 'day')\n const start = dayjs(day.format('YYYY-MM-DD'))\n const startOfMonth = start.format('YYYY-MM-DD')\n const endOfMonth = start.add(+start.daysInMonth() - 1, 'day').format('YYYY-MM-DD')\n const endDate = getEndOfWeek(endOfMonth, firstDayOfWeek)\n const weeks: DateStringValue[][] = []\n\n let date = dayjs(getStartOfWeek({ date: startOfMonth, firstDayOfWeek }))\n\n while (dayjs(date).isBefore(endDate, 'day')) {\n const days: DateStringValue[] = []\n\n for (let i = 0; i < 7; i += 1) {\n days.push(date.format('YYYY-MM-DD 00:00:00'))\n date = date.add(1, 'day')\n }\n\n weeks.push(days)\n }\n\n if (consistentWeeks && weeks.length < 6) {\n const lastWeek = weeks[weeks.length - 1]\n const lastDay = lastWeek[lastWeek.length - 1]\n let nextDay = dayjs(lastDay).add(1, 'day')\n\n while (weeks.length < 6) {\n const days: DateStringValue[] = []\n\n for (let i = 0; i < 7; i += 1) {\n days.push(nextDay.format('YYYY-MM-DD 00:00:00'))\n nextDay = nextDay.add(1, 'day')\n }\n\n weeks.push(days)\n }\n }\n\n return weeks\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isAfterMinDate(date: AnyDateValue, minDate: AnyDateValue | undefined) {\n return minDate ? dayjs(date).isAfter(dayjs(minDate).subtract(1, 'day'), 'day') : true\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isBeforeMaxDate(date: AnyDateValue, maxDate: AnyDateValue | undefined) {\n return maxDate ? dayjs(date).isBefore(dayjs(maxDate).add(1, 'day'), 'day') : true\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isSameMonth(date: AnyDateValue, comparison: AnyDateValue) {\n return dayjs(date).format('YYYY-MM') === dayjs(comparison).format('YYYY-MM')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue } from '../../types'\n\nexport function getMonthsByQuarter(year: AnyDateValue) {\n const startOfYear = dayjs(year).startOf('year').toDate()\n\n const results: DateStringValue[][] = [[], [], [], []]\n let currentMonthIndex = 0\n\n for (let i = 0; i < 4; i += 1) {\n for (let j = 0; j < 3; j += 1) {\n results[i].push(dayjs(startOfYear).add(currentMonthIndex, 'months').format('YYYY-MM-DD'))\n currentMonthIndex += 1\n }\n }\n\n return results\n}\n","/**\n * Clamps interval minutes to a value that keeps the time grid consistent:\n *\n * - Values of 60 or less must divide evenly into an hour.\n * - Values above an hour must be a whole number of hours.\n *\n * Invalid values fall back to 60 and the result is capped to one day.\n */\nexport function clampIntervalMinutes(intervalMinutes: number): number {\n const rounded = Math.round(Math.max(1, Math.min(1440, intervalMinutes)))\n\n if (rounded <= 60) {\n return 60 % rounded === 0 ? rounded : 60\n }\n\n return rounded % 60 === 0 ? rounded : 60\n}\n","export interface ParsedTime {\n hours: number\n minutes: number\n seconds: number\n}\n\nexport function parseTimeString(time: string): ParsedTime {\n const [hours, minutes, seconds] = time.split(':').map(Number)\n return { hours, minutes, seconds: seconds || 0 }\n}\n","import { ParsedTime } from '../parse-time-string/parse-time-string'\n\nexport function toTimeString({ hours, minutes, seconds }: ParsedTime) {\n return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`\n}\n","import { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\nimport { toTimeString } from '../to-time-string/to-time-string'\n\nexport interface DayTimeInterval {\n /** Start time of the interval in HH:mm:ss format */\n startTime: string\n\n /** End time of the interval in HH:mm:ss format */\n endTime: string\n\n /** Duration of the interval in seconds */\n duration: number\n\n /** Indicates if the interval starts at the beginning of an hour */\n isHourStart: boolean\n}\n\nexport interface GetDayTimeIntervalsInput {\n /** Start time in HH:mm:ss format */\n startTime: string\n\n /** End time in HH:mm:ss format, end of the day by default */\n endTime?: string\n\n /** Interval in minutes, 60 by default */\n intervalMinutes?: number\n}\n\nexport function getDayTimeIntervals({\n startTime,\n endTime,\n intervalMinutes: _intervalMinutes = 60,\n}: GetDayTimeIntervalsInput): DayTimeInterval[] {\n const intervalMinutes = clampIntervalMinutes(_intervalMinutes)\n\n const start = parseTimeString(startTime)\n const end = endTime ? parseTimeString(endTime) : { hours: 23, minutes: 59, seconds: 59 }\n\n const startSeconds = start.hours * 3600 + start.minutes * 60 + start.seconds\n const endSeconds = end.hours * 3600 + end.minutes * 60 + end.seconds\n const intervalSeconds = intervalMinutes * 60\n\n const intervals: DayTimeInterval[] = []\n let currentSeconds = startSeconds\n\n while (currentSeconds < endSeconds) {\n const intervalStartSeconds = currentSeconds\n let intervalEndSeconds = currentSeconds + intervalSeconds\n\n if (intervalEndSeconds > endSeconds) {\n intervalEndSeconds = endSeconds\n }\n\n const startHours = Math.floor(intervalStartSeconds / 3600)\n const startMinutes = Math.floor((intervalStartSeconds % 3600) / 60)\n const startSecs = intervalStartSeconds % 60\n\n const endHours = Math.floor(intervalEndSeconds / 3600)\n const endMinutes = Math.floor((intervalEndSeconds % 3600) / 60)\n const endSecs = intervalEndSeconds % 60\n\n const durationSeconds = intervalEndSeconds - intervalStartSeconds\n const isHourStart = startMinutes === 0 && startSecs === 0\n\n intervals.push({\n startTime: toTimeString({ hours: startHours, minutes: startMinutes, seconds: startSecs }),\n endTime: toTimeString({ hours: endHours, minutes: endMinutes, seconds: endSecs }),\n duration: durationSeconds,\n isHourStart,\n })\n\n currentSeconds = intervalEndSeconds\n }\n\n return intervals\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue } from '../../types'\n\nexport function toDateString(date: AnyDateValue): DateStringValue {\n return dayjs(date).format('YYYY-MM-DD 00:00:00')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport interface GetWeekDaysInput {\n /** Week to generate days for */\n week: AnyDateValue\n\n /** Indices of weekend days, 0-6, where 0 is Sunday and 6 is Saturday. The default value is defined by `DatesProvider`. */\n weekendDays?: DayOfWeek[]\n\n /** If set to false, weekend days are hidden @default true */\n withWeekendDays?: boolean\n\n /** Number 0-6, where 0 – Sunday and 6 – Saturday @default 1 */\n firstDayOfWeek?: DayOfWeek\n}\n\n/** Returns a list of days in a given week */\nexport function getWeekDays({\n week,\n weekendDays,\n withWeekendDays = true,\n firstDayOfWeek = 1,\n}: GetWeekDaysInput): DateStringValue[] {\n const days: DateStringValue[] = []\n\n let current = dayjs(getStartOfWeek({ date: week, firstDayOfWeek }))\n\n for (let i = 0; i < 7; i += 1) {\n const dayOfWeek = current.day()\n const isWeekend = weekendDays && weekendDays.includes(dayOfWeek as DayOfWeek)\n\n if (!isWeekend || withWeekendDays) {\n days.push(toDateString(current))\n }\n\n current = current.add(1, 'day')\n }\n\n return days\n}\n","import dayjs from 'dayjs'\nimport { DateLabelFormat } from '../../types'\nimport { formatDate } from '../format-date/format-date'\n\ninterface GetMonthsListInput {\n locale: string\n format: DateLabelFormat\n}\n\ninterface MonthData {\n month: number\n name: string\n}\n\nexport function getMonthsList({ locale, format }: GetMonthsListInput) {\n const months: MonthData[] = []\n const date = dayjs().locale(locale).startOf('year')\n\n for (let i = 0; i < 12; i++) {\n months.push({ month: i, name: formatDate({ date: date.add(i, 'month'), format, locale }) })\n }\n\n return months\n}\n","interface GetYearsListInput {\n startYear: number\n endYear: number\n}\n\nexport function getYearsList({ startYear, endYear }: GetYearsListInput) {\n const years: number[] = []\n\n for (let year = startYear; year <= endYear; year++) {\n years.push(year)\n }\n\n return years\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport function nextWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek): DateStringValue {\n const start = getStartOfWeek({ date, firstDayOfWeek })\n return toDateString(dayjs(start).set('date', dayjs(start).date() + 7))\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport function previousWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek): DateStringValue {\n const start = getStartOfWeek({ date, firstDayOfWeek })\n return toDateString(dayjs(start).set('date', dayjs(start).date() - 7))\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\nimport { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\n\ninterface GetCurrentTimePositionInput {\n startTime?: string\n endTime?: string\n now?: AnyDateValue\n\n /** Number of minutes per time slot. Used to align the indicator to whole slots when `endTime` does not divide evenly. */\n intervalMinutes?: number\n}\n\nexport function getCurrentTimePosition(input?: GetCurrentTimePositionInput) {\n const now = dayjs(input?.now)\n\n if (!input?.startTime || !input?.endTime) {\n const startOf = now.startOf('date')\n const diffInMinutes = now.diff(startOf, 'minute')\n return (diffInMinutes / 1440) * 100\n }\n\n const [startHour, startMinute, startSecond = 0] = input.startTime.split(':').map(Number)\n const [endHour, endMinute, endSecond = 0] = input.endTime.split(':').map(Number)\n\n const startOfDay = now.startOf('date')\n const startDateTime = startOfDay.hour(startHour).minute(startMinute).second(startSecond)\n const endDateTime = startOfDay.hour(endHour).minute(endMinute).second(endSecond)\n\n const literalSeconds = endDateTime.diff(startDateTime, 'second')\n const intervalSeconds =\n input.intervalMinutes !== undefined\n ? clampIntervalMinutes(input.intervalMinutes) * 60\n : undefined\n const totalSeconds = intervalSeconds\n ? Math.ceil(literalSeconds / intervalSeconds) * intervalSeconds\n : literalSeconds\n const currentSeconds = now.diff(startDateTime, 'second')\n\n return (currentSeconds / totalSeconds) * 100\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\ninterface IsInTimeRangeInput {\n date: AnyDateValue\n startTime?: string\n endTime?: string\n}\n\n/** Returns true if the given date's time is within the specified time range */\nexport function isInTimeRange({\n date,\n startTime = '00:00:00',\n endTime = '23:59:59',\n}: IsInTimeRangeInput) {\n const targetDate = dayjs(date)\n const parsedStartTime = parseTimeString(startTime)\n const parsedEndTime = parseTimeString(endTime)\n\n const startDateTime = targetDate\n .hour(parsedStartTime.hours)\n .minute(parsedStartTime.minutes)\n .second(parsedStartTime.seconds)\n\n const endDateTime = targetDate\n .hour(parsedEndTime.hours)\n .minute(parsedEndTime.minutes)\n .second(parsedEndTime.seconds)\n\n return targetDate.isAfter(startDateTime) && targetDate.isBefore(endDateTime)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, ScheduleEventData } from '../../types'\n\ninterface IsAllDayEventInput {\n event: ScheduleEventData\n date: AnyDateValue\n}\n\nexport function isAllDayEvent({ event, date }: IsAllDayEventInput) {\n const dayStart = dayjs(date).startOf('day')\n const nextDayStart = dayStart.add(1, 'day')\n const sameDayEnd = nextDayStart.subtract(1, 'second')\n const startTime = dayjs(event.start)\n const endTime = dayjs(event.end)\n\n return startTime.isSame(dayStart) && (endTime.isSame(nextDayStart) || endTime.isSame(sameDayEnd))\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\nexport function validateEvent(eventData: ScheduleEventData) {\n if (!dayjs(eventData.start).isValid()) {\n throw new Error(`[@mantine/schedule] Invalid start date for event id: ${eventData.id}`)\n }\n\n if (!dayjs(eventData.end).isValid()) {\n throw new Error(`[@mantine/schedule] Invalid end date for event id: ${eventData.id}`)\n }\n\n if (dayjs(eventData.end).isBefore(dayjs(eventData.start))) {\n throw new Error(\n `[@mantine/schedule] Event end date is before start date for event id: ${eventData.id}`,\n )\n }\n\n return eventData\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\n/** Sorts events by start time, then by duration (longer first) */\nexport function sortEvents<T extends ScheduleEventData>(events: T[]): T[] {\n return [...events].sort((a: T, b: T) => {\n const startDiff = dayjs(a.start).diff(dayjs(b.start))\n\n if (startDiff !== 0) {\n return startDiff\n }\n\n return dayjs(b.end).diff(dayjs(b.start)) - dayjs(a.end).diff(dayjs(a.start))\n })\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\n/** Returns true if two events overlap in time */\nexport function isEventsOverlap(event1: ScheduleEventData, event2: ScheduleEventData) {\n const start1 = dayjs(event1.start).valueOf()\n const end1 = dayjs(event1.end).valueOf()\n const start2 = dayjs(event2.start).valueOf()\n const end2 = dayjs(event2.end).valueOf()\n return start1 < end2 && start2 < end1\n}\n","interface GetVisibleEventsInput {\n maxEvents: number\n totalEvents: number\n}\n\nexport function getVisibleEvents({ maxEvents, totalEvents }: GetVisibleEventsInput) {\n if (totalEvents <= maxEvents) {\n return {\n visibleEventsCount: totalEvents,\n hiddenEventsCount: 0,\n }\n }\n\n return {\n visibleEventsCount: maxEvents - 1,\n hiddenEventsCount: totalEvents - (maxEvents - 1),\n }\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\nexport function isMultidayEvent(event: ScheduleEventData) {\n const startDate = dayjs(event.start).startOf('day')\n const rawEnd = dayjs(event.end)\n const endAtMidnight = rawEnd.hour() === 0 && rawEnd.minute() === 0 && rawEnd.second() === 0\n const endDate = endAtMidnight ? rawEnd.startOf('day').subtract(1, 'day') : rawEnd.startOf('day')\n return endDate.isAfter(startDate)\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\nimport { isMultidayEvent } from '../is-multiday-event/is-multiday-event'\n\ninterface IsEventInTimeRangeInput {\n event: ScheduleEventData\n startTime?: string\n endTime?: string\n}\n\nfunction spansFullDay(event: ScheduleEventData) {\n const start = dayjs(event.start)\n const end = dayjs(event.end)\n if (!start.isSame(start.startOf('day'))) {\n return false\n }\n const nextDayStart = start.startOf('day').add(1, 'day')\n return end.isSame(nextDayStart) || end.isSame(nextDayStart.subtract(1, 'second'))\n}\n\nexport function isEventInTimeRange({ event, startTime, endTime }: IsEventInTimeRangeInput) {\n if (isMultidayEvent(event) || spansFullDay(event)) {\n return true\n }\n\n if (!startTime || !endTime) {\n return true\n }\n\n const [startHour, startMinute] = startTime.split(':').map(Number)\n const [endHour, endMinute] = endTime.split(':').map(Number)\n const timeWindowStartMinutes = startHour * 60 + startMinute\n const timeWindowEndMinutes = endHour * 60 + endMinute\n\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const eventStartMinutes = eventStart.hour() * 60 + eventStart.minute()\n const eventEndMinutes = eventEnd.hour() * 60 + eventEnd.minute()\n\n return !(eventEndMinutes <= timeWindowStartMinutes || eventStartMinutes >= timeWindowEndMinutes)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\n\ninterface IsWithinWeekInput {\n event: ScheduleEventData\n targetWeek: AnyDateValue\n firstDayOfWeek: DayOfWeek\n}\n\nexport function isWithinWeek({ event, targetWeek, firstDayOfWeek }: IsWithinWeekInput) {\n const startOfWeek = dayjs(getStartOfWeek({ date: targetWeek, firstDayOfWeek }))\n const endOfWeek = startOfWeek.add(7, 'day')\n return dayjs(event.start).isBefore(endOfWeek) && dayjs(event.end).isAfter(startOfWeek)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\nimport { getMonthDays } from '../get-month-days/get-month-days'\nimport { toDateString } from '../to-date-string/to-date-string'\n\ninterface GetMonthRangeInput {\n month: AnyDateValue\n withOutsideDays: boolean | undefined\n consistentWeeks: boolean | undefined\n firstDayOfWeek: DayOfWeek\n}\n\n/** Returns start and end dates as displayed in MonthView */\nexport function getMonthRange({\n month,\n withOutsideDays,\n consistentWeeks,\n firstDayOfWeek,\n}: GetMonthRangeInput) {\n if (!withOutsideDays) {\n return {\n start: toDateString(dayjs(month).startOf('month')),\n end: toDateString(dayjs(month).endOf('month')),\n }\n }\n\n const days = getMonthDays({ month, firstDayOfWeek, consistentWeeks })\n\n return {\n start: days[0][0],\n end: days[days.length - 1][6],\n }\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\nimport { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\ninterface GetDayPositionInput {\n /** Event data to calculate position for */\n event: ScheduleEventData\n\n /** Start time boundary for the day in HH:mm:ss format, `00:00:00` by default */\n startTime?: string\n\n /** End time boundary for the day in HH:mm:ss format, `23:59:59` by default */\n endTime?: string\n\n /** Number of minutes per time slot, `60` by default. Used to align the canvas to whole slots when `endTime` does not divide evenly. */\n intervalMinutes?: number\n}\n\n/** Calculates day position within given start and end time boundaries. Returns top and height in percentages. */\nexport function getDayPosition({\n event,\n startTime = '00:00:00',\n endTime = '23:59:59',\n intervalMinutes = 60,\n}: GetDayPositionInput) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n\n const parsedStartTime = parseTimeString(startTime)\n const parsedEndTime = parseTimeString(endTime)\n\n const startOfDay = eventStart.startOf('date')\n const boundaryStart = startOfDay\n .hour(parsedStartTime.hours)\n .minute(parsedStartTime.minutes)\n .second(parsedStartTime.seconds)\n const literalEnd = startOfDay\n .hour(parsedEndTime.hours)\n .minute(parsedEndTime.minutes)\n .second(parsedEndTime.seconds)\n\n const intervalSeconds = clampIntervalMinutes(intervalMinutes) * 60\n const literalRangeSeconds = literalEnd.diff(boundaryStart, 'second')\n const totalSeconds = Math.ceil(literalRangeSeconds / intervalSeconds) * intervalSeconds\n\n const clippedEventStart = eventStart.isBefore(boundaryStart) ? boundaryStart : eventStart\n const eventStartSeconds = clippedEventStart.diff(boundaryStart, 'second')\n\n const clippedEventEnd = eventEnd.isAfter(literalEnd) ? literalEnd : eventEnd\n const eventEndSeconds = clippedEventEnd.diff(boundaryStart, 'second')\n\n const startPercent = (eventStartSeconds / totalSeconds) * 100\n const endPercent = (eventEndSeconds / totalSeconds) * 100\n\n return {\n top: startPercent,\n height: endPercent - startPercent,\n }\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, ScheduleEventData } from '../../types'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\nexport interface CalculateDropTimeInput {\n /** The event being dragged */\n draggedEvent: ScheduleEventData\n\n /** Target date where event will be dropped */\n targetDate: AnyDateValue\n\n /** Target time slot start time in HH:mm:ss format */\n targetSlotTime: string\n\n /** Mouse Y position relative to the slot */\n mouseYOffset?: number\n\n /** Height of one slot in pixels */\n slotHeight?: number\n\n /** Minutes per slot */\n intervalMinutes?: number\n}\n\nexport interface CalculateDropTimeResult {\n /** New start date/time for the event */\n start: Date\n\n /** New end date/time for the event */\n end: Date\n}\n\nexport function calculateDropTime({\n draggedEvent,\n targetDate,\n targetSlotTime,\n mouseYOffset = 0,\n slotHeight = 64,\n intervalMinutes = 15,\n}: CalculateDropTimeInput): CalculateDropTimeResult {\n const eventDuration = dayjs(draggedEvent.end).diff(dayjs(draggedEvent.start), 'millisecond')\n\n const parsedTime = parseTimeString(targetSlotTime)\n const targetDay = dayjs(targetDate).startOf('day')\n\n const baseTargetTime = targetDay.hour(parsedTime.hours).minute(parsedTime.minutes).second(0)\n\n let finalTargetTime = baseTargetTime\n\n if (mouseYOffset > 0 && slotHeight > 0) {\n const offsetRatio = mouseYOffset / slotHeight\n const offsetMinutes = Math.round(offsetRatio * intervalMinutes)\n finalTargetTime = baseTargetTime.add(offsetMinutes, 'minute')\n }\n\n const newStart = finalTargetTime.toDate()\n const newEnd = finalTargetTime.add(eventDuration, 'millisecond').toDate()\n\n return {\n start: newStart,\n end: newEnd,\n }\n}\n","import dayjs from 'dayjs'\nimport { DateStringValue, ScheduleEventData } from '../../types'\n\nexport interface CalculateMonthDropDateInput {\n /** The event being dragged */\n draggedEvent: ScheduleEventData\n\n /** The target day where the event is being dropped */\n targetDay: DateStringValue\n}\n\nexport interface CalculateMonthDropDateResult {\n /** New start date for the event */\n start: Date\n\n /** New end date for the event */\n end: Date\n}\n\nexport function calculateMonthDropDate({\n draggedEvent,\n targetDay,\n}: CalculateMonthDropDateInput): CalculateMonthDropDateResult {\n const eventDuration = dayjs(draggedEvent.end).diff(dayjs(draggedEvent.start), 'millisecond')\n\n const originalStartTime = dayjs(draggedEvent.start)\n const targetDayStart = dayjs(targetDay).startOf('day')\n\n const newStart = targetDayStart\n .hour(originalStartTime.hour())\n .minute(originalStartTime.minute())\n .second(originalStartTime.second())\n .millisecond(originalStartTime.millisecond())\n\n const newEnd = newStart.add(eventDuration, 'millisecond')\n\n return {\n start: newStart.toDate(),\n end: newEnd.toDate(),\n }\n}\n","import { DayOfWeek } from '../../types'\n\n/** Business hours range in `HH:mm:ss` format */\nexport type BusinessHoursRange = [string, string]\n\n/** Per-day business hours map keyed by day of the week (0 – Sunday, 6 – Saturday). `null` marks a day as fully outside business hours. */\nexport type BusinessHoursPerDay = Partial<Record<DayOfWeek, BusinessHoursRange | null>>\n\n/** Business hours value – tuple applies to every day, record configures business hours per day */\nexport type BusinessHoursValue = BusinessHoursRange | BusinessHoursPerDay\n\nexport interface GetBusinessHoursModInput {\n time: string\n businessHours?: BusinessHoursValue\n highlightBusinessHours?: boolean\n dayOfWeek?: DayOfWeek\n}\n\nexport interface BusinessHoursMod {\n 'business-hours': boolean\n 'non-business-hours': boolean\n}\n\nfunction isBusinessHoursRange(value: BusinessHoursValue): value is BusinessHoursRange {\n return (\n Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'string' &&\n typeof value[1] === 'string'\n )\n}\n\n/**\n * Determines if a given time is within business hours and returns modifier object\n * @param time - Time string in HH:mm:ss format\n * @param businessHours - Tuple of [start, end] times in HH:mm:ss format, or per-day record keyed by day of the week\n * @param highlightBusinessHours - Whether to highlight business hours\n * @param dayOfWeek - Day of the week (0 – Sunday, 6 – Saturday), used to resolve per-day business hours\n * @returns Modifier object for styling business/non-business hours\n */\nexport function getBusinessHoursMod({\n time,\n businessHours,\n highlightBusinessHours,\n dayOfWeek,\n}: GetBusinessHoursModInput): BusinessHoursMod {\n if (!highlightBusinessHours || !businessHours) {\n return {\n 'business-hours': false,\n 'non-business-hours': false,\n }\n }\n\n let range: [string, string] | null\n if (isBusinessHoursRange(businessHours)) {\n range = businessHours\n } else {\n if (dayOfWeek === undefined) {\n return {\n 'business-hours': false,\n 'non-business-hours': false,\n }\n }\n range = businessHours[dayOfWeek] ?? null\n }\n\n if (!range) {\n return {\n 'business-hours': false,\n 'non-business-hours': true,\n }\n }\n\n const [start, end] = range\n const isInBusinessHours = time >= start && time < end\n\n return {\n 'business-hours': isInBusinessHours,\n 'non-business-hours': !isInBusinessHours,\n }\n}\n","import dayjs from 'dayjs'\nimport * as rruleAll from 'rrule'\n\nfunction resolveRRule(ns: Record<string, unknown>): typeof rruleAll.RRule {\n const interop = (ns.default ?? ns) as typeof rruleAll\n return interop.RRule\n}\nconst RRule = resolveRRule(rruleAll as unknown as Record<string, unknown>)\nimport { DateTimeStringValue, ScheduleEventData, ScheduleRecurrenceData } from '../../types'\nimport { validateEvent } from '../validate-event/validate-event'\n\ninterface ExpandRecurringEventsInput {\n events: ScheduleEventData[] | undefined\n rangeStart: Date | string\n rangeEnd: Date | string\n expansionLimit?: number\n}\n\nfunction getRecurrenceKey(recurringEventId: string | number, recurrenceId: DateTimeStringValue) {\n return `${recurringEventId}::${recurrenceId}`\n}\n\nfunction overlapsRange(\n eventStart: dayjs.Dayjs,\n eventEnd: dayjs.Dayjs,\n rangeStart: dayjs.Dayjs,\n rangeEnd: dayjs.Dayjs,\n) {\n return (\n (eventEnd.isAfter(rangeStart) || eventEnd.isSame(rangeStart)) &&\n (eventStart.isBefore(rangeEnd) || eventStart.isSame(rangeEnd))\n )\n}\n\nfunction getExdateSet(recurrence: ScheduleRecurrenceData | undefined) {\n if (!recurrence?.exdate) {\n return new Set<string>()\n }\n\n const values = recurrence.exdate\n .map((value) => dayjs(value))\n .filter((value) => value.isValid())\n .map((value) => value.format('YYYY-MM-DD HH:mm:ss'))\n\n return new Set(values)\n}\n\nfunction getRRuleString(rule: string) {\n const normalized = rule.trim()\n if (!normalized.includes('\\n')) {\n return normalized.startsWith('RRULE:') ? normalized.replace(/^RRULE:/, '') : normalized\n }\n\n const rruleLine = normalized\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.startsWith('RRULE:'))\n\n return rruleLine ? rruleLine.replace(/^RRULE:/, '') : normalized\n}\n\nfunction getOccurrenceStartsInRange(\n event: ScheduleEventData,\n rangeStart: dayjs.Dayjs,\n rangeEnd: dayjs.Dayjs,\n expansionLimit: number,\n durationMs: number,\n) {\n const dtstart = dayjs(event.recurrence?.dtstart || event.start)\n if (!dtstart.isValid() || !event.recurrence) {\n return []\n }\n\n try {\n const options = RRule.parseString(getRRuleString(event.recurrence.rrule))\n options.dtstart = dtstart.toDate()\n const rule = new RRule(options)\n\n const searchStart = rangeStart.subtract(Math.max(0, durationMs), 'millisecond').toDate()\n const results = rule.between(searchStart, rangeEnd.toDate(), true)\n return results.slice(0, expansionLimit).map((value) => dayjs(value))\n } catch {\n return []\n }\n}\n\nfunction isEventInRange(event: ScheduleEventData, rangeStart: dayjs.Dayjs, rangeEnd: dayjs.Dayjs) {\n const start = dayjs(event.start)\n const end = dayjs(event.end)\n\n if (!start.isValid() || !end.isValid()) {\n return false\n }\n\n return overlapsRange(start, end, rangeStart, rangeEnd)\n}\n\nfunction createGeneratedInstance(\n event: ScheduleEventData,\n occurrenceStart: dayjs.Dayjs,\n durationMs: number,\n): ScheduleEventData {\n const occurrenceEnd = occurrenceStart.add(durationMs, 'millisecond')\n const recurrenceId = occurrenceStart.format('YYYY-MM-DD HH:mm:ss')\n const { recurrence: _recurrence, ...eventWithoutRecurrence } = event\n\n return {\n ...eventWithoutRecurrence,\n id: `${event.id}::${recurrenceId}`,\n start: occurrenceStart.format('YYYY-MM-DD HH:mm:ss'),\n end: occurrenceEnd.format('YYYY-MM-DD HH:mm:ss'),\n recurringEventId: event.id,\n recurrenceId,\n recurringInstance: {\n isRecurringInstance: true,\n recurringEventId: event.id,\n recurrenceId,\n originalStart: occurrenceStart.format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: occurrenceEnd.format('YYYY-MM-DD HH:mm:ss'),\n },\n }\n}\n\nconst DEFAULT_EXPANSION_LIMIT = 2000\n\nexport function expandRecurringEvents({\n events,\n rangeStart,\n rangeEnd,\n expansionLimit = DEFAULT_EXPANSION_LIMIT,\n}: ExpandRecurringEventsInput): ScheduleEventData[] {\n if (!events || events.length === 0) {\n return []\n }\n\n const start = dayjs(rangeStart)\n const end = dayjs(rangeEnd)\n\n if (!start.isValid() || !end.isValid()) {\n return []\n }\n\n const regularEvents: ScheduleEventData[] = []\n const recurringEvents: ScheduleEventData[] = []\n const overrides = new Map<string, ScheduleEventData>()\n\n for (const event of events) {\n if (event.recurringEventId && event.recurrenceId) {\n overrides.set(getRecurrenceKey(event.recurringEventId, event.recurrenceId), event)\n continue\n }\n\n if (event.recurrence?.rrule) {\n recurringEvents.push(event)\n continue\n }\n\n regularEvents.push(event)\n }\n\n const output: ScheduleEventData[] = []\n const consumedOverrideIds = new Set<string | number>()\n\n for (const event of regularEvents) {\n if (isEventInRange(event, start, end)) {\n output.push(validateEvent(event))\n }\n }\n\n for (const event of recurringEvents) {\n const eventStart = dayjs(event.recurrence?.dtstart || event.start)\n const eventEnd = dayjs(event.end)\n\n if (!eventStart.isValid() || !eventEnd.isValid()) {\n continue\n }\n\n const durationMs = eventEnd.diff(dayjs(event.start), 'millisecond')\n if (durationMs < 0) {\n continue\n }\n\n const exdate = getExdateSet(event.recurrence)\n const starts = getOccurrenceStartsInRange(event, start, end, expansionLimit, durationMs)\n\n for (const occurrenceStart of starts) {\n const recurrenceId = occurrenceStart.format('YYYY-MM-DD HH:mm:ss')\n if (exdate.has(recurrenceId)) {\n continue\n }\n\n const overrideKey = getRecurrenceKey(event.id, recurrenceId)\n const override = overrides.get(overrideKey)\n if (override) {\n if (isEventInRange(override, start, end)) {\n output.push(validateEvent(override))\n consumedOverrideIds.add(override.id)\n }\n continue\n }\n\n const generated = createGeneratedInstance(event, occurrenceStart, durationMs)\n if (overlapsRange(dayjs(generated.start), dayjs(generated.end), start, end)) {\n output.push(validateEvent(generated))\n }\n }\n }\n\n for (const override of overrides.values()) {\n if (consumedOverrideIds.has(override.id)) {\n continue\n }\n if (isEventInRange(override, start, end)) {\n output.push(validateEvent(override))\n }\n }\n\n return output\n}\n\nexport { DEFAULT_EXPANSION_LIMIT }\n","import type { ScheduleResourceData, ScheduleResourceGroup } from '../../types'\n\nexport interface GroupRange {\n group: ScheduleResourceGroup\n startIndex: number\n count: number\n}\n\nexport interface ResourceGroupInfo {\n group: ScheduleResourceGroup\n position: 'first' | 'middle' | 'last' | 'only'\n count: number\n}\n\nexport interface OrderedResourcesResult {\n orderedResources: ScheduleResourceData[]\n groupRanges: GroupRange[]\n resourceGroupMap: Array<ResourceGroupInfo | null>\n}\n\nexport function getOrderedResources(\n resources: ScheduleResourceData[],\n groups: ScheduleResourceGroup[] | undefined,\n): OrderedResourcesResult {\n if (!groups?.length) {\n return { orderedResources: resources, groupRanges: [], resourceGroupMap: [] }\n }\n\n const resourceMap = new Map(resources.map((resource) => [resource.id, resource]))\n const usedIds = new Set<string | number>()\n const orderedResources: ScheduleResourceData[] = []\n const groupRanges: GroupRange[] = []\n\n groups.forEach((group) => {\n const startIndex = orderedResources.length\n group.resourceIds.forEach((id) => {\n const resource = resourceMap.get(id)\n if (resource && !usedIds.has(id)) {\n orderedResources.push(resource)\n usedIds.add(id)\n }\n })\n const count = orderedResources.length - startIndex\n if (count) groupRanges.push({ group, startIndex, count })\n })\n\n resources.forEach((resource) => {\n if (!usedIds.has(resource.id)) orderedResources.push(resource)\n })\n\n const resourceGroupMap: Array<ResourceGroupInfo | null> = Array(orderedResources.length).fill(\n null,\n )\n groupRanges.forEach(({ group, startIndex, count }) => {\n for (let index = 0; index < count; index += 1) {\n const position: ResourceGroupInfo['position'] =\n count === 1 ? 'only' : index === 0 ? 'first' : index === count - 1 ? 'last' : 'middle'\n resourceGroupMap[startIndex + index] = { group, position, count }\n }\n })\n\n return { orderedResources, groupRanges, resourceGroupMap }\n}\n","import type { ScheduleResourceData } from '../../types'\n\nexport function getGroupToResourceIdMap(\n resources: ScheduleResourceData[],\n): Map<string, string | number> {\n return new Map(resources.map((resource) => [String(resource.id), resource.id]))\n}\n","export type ResourcesGridControls = Array<Array<HTMLButtonElement | undefined>>\n\nexport interface HandleResourcesGridKeyDownInput {\n controls: ResourcesGridControls\n resourceIndex: number\n slotIndex: number\n event: KeyboardEvent\n}\n\nexport function handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex,\n event,\n}: HandleResourcesGridKeyDownInput): void {\n const deltas: Record<string, [number, number]> = {\n ArrowLeft: [0, -1],\n ArrowRight: [0, 1],\n ArrowUp: [-1, 0],\n ArrowDown: [1, 0],\n }\n const delta = deltas[event.key]\n if (!delta) return\n event.preventDefault()\n\n let row = resourceIndex + delta[0]\n let column = slotIndex + delta[1]\n while (row >= 0 && row < controls.length) {\n const rowControls = controls[row] || []\n if (delta[0] !== 0) column = Math.min(column, rowControls.length - 1)\n if (column < 0 || column >= rowControls.length) return\n const control = rowControls[column]\n if (control && !control.disabled && !control.hasAttribute('data-hidden')) {\n control.focus()\n return\n }\n row += delta[0]\n column += delta[1]\n }\n}\n","import dayjs from 'dayjs'\nimport { onBeforeUnmount, ref } from 'vue'\nimport type { EventDropData } from '../component-props'\nimport type { DateTimeStringValue, ScheduleEventData, ScheduleMode } from '../types'\nimport { clampIntervalMinutes, parseTimeString } from '../utils'\n\ntype ResizeEdge = 'top' | 'bottom'\n\ninterface ResizeState {\n eventId: string | number\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalTop: number\n originalHeight: number\n currentTop: number\n currentHeight: number\n eventDate: string\n originalStart: DateTimeStringValue\n originalEnd: DateTimeStringValue\n startMinutes: number\n literalRange: number\n totalMinutes: number\n intervalMinutes: number\n minHeightPercent: number\n}\n\ninterface HandleResizeStartInput {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalTop: number\n originalHeight: number\n eventDate: string\n pointerEvent: PointerEvent\n}\n\nexport interface UseEventResizeInput {\n enabled: () => boolean\n mode: () => ScheduleMode\n startTime: () => string\n endTime: () => string\n intervalMinutes: () => number\n onEventResize: () => ((data: EventDropData) => void) | undefined\n canResizeEvent: () => ((event: ScheduleEventData) => boolean) | undefined\n}\n\nexport function useEventResize(input: UseEventResizeInput) {\n const resizeState = ref<ResizeState | null>(null)\n let justResized = false\n let savedUserSelect: string | null = null\n\n const clampAndSnap = (minutes: number, state: ResizeState): number => {\n const snapped = Math.round(minutes / state.intervalMinutes) * state.intervalMinutes\n return Math.max(0, Math.min(state.literalRange, snapped))\n }\n\n const snapPercent = (percent: number, state: ResizeState): number => {\n const minutes = (percent / 100) * state.totalMinutes\n return (clampAndSnap(minutes, state) / state.totalMinutes) * 100\n }\n\n const percentToDateTime = (\n percent: number,\n eventDate: string,\n state: ResizeState,\n ): DateTimeStringValue => {\n const minutes = (percent / 100) * state.totalMinutes\n const totalMinutes = state.startMinutes + clampAndSnap(minutes, state)\n const hours = Math.floor(totalMinutes / 60)\n const mins = totalMinutes % 60\n return `${eventDate} ${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}:00`\n }\n\n const handlePointerMove = (event: PointerEvent) => {\n const state = resizeState.value\n if (!state) return\n\n const containerRect = state.container.getBoundingClientRect()\n if (containerRect.height === 0) return\n\n const relativeY = event.clientY - containerRect.top\n const rawPercent = Math.max(0, Math.min(100, (relativeY / containerRect.height) * 100))\n const snappedPercent = snapPercent(rawPercent, state)\n let currentTop = state.originalTop\n let currentHeight = state.originalHeight\n\n if (state.edge === 'bottom') {\n currentHeight = Math.max(state.minHeightPercent, snappedPercent - state.originalTop)\n } else {\n const originalBottom = state.originalTop + state.originalHeight\n currentTop = Math.min(snappedPercent, originalBottom - state.minHeightPercent)\n currentHeight = originalBottom - currentTop\n }\n\n resizeState.value = { ...state, currentTop, currentHeight }\n }\n\n const removeDocumentListeners = () => {\n document.removeEventListener('pointermove', handlePointerMove)\n document.removeEventListener('pointerup', handlePointerUp)\n if (savedUserSelect !== null) {\n document.body.style.userSelect = savedUserSelect\n savedUserSelect = null\n }\n }\n\n const handlePointerUp = () => {\n const state = resizeState.value\n if (\n state &&\n (state.currentTop !== state.originalTop || state.currentHeight !== state.originalHeight)\n ) {\n const newStart =\n state.edge === 'top'\n ? percentToDateTime(state.currentTop, state.eventDate, state)\n : state.originalStart\n const newEnd =\n state.edge === 'bottom'\n ? percentToDateTime(state.currentTop + state.currentHeight, state.eventDate, state)\n : state.originalEnd\n\n input.onEventResize()?.({ eventId: state.eventId, newStart, newEnd, event: state.event })\n }\n\n resizeState.value = null\n removeDocumentListeners()\n justResized = true\n requestAnimationFrame(() => {\n justResized = false\n })\n }\n\n const handleResizeStart = ({\n event,\n edge,\n container,\n originalTop,\n originalHeight,\n eventDate,\n pointerEvent,\n }: HandleResizeStartInput) => {\n if (!input.enabled() || input.mode() === 'static') return\n\n pointerEvent.preventDefault()\n pointerEvent.stopPropagation()\n\n const parsedStartTime = parseTimeString(input.startTime())\n const parsedEndTime = parseTimeString(input.endTime())\n const startMinutes = parsedStartTime.hours * 60 + parsedStartTime.minutes\n const endMinutes = parsedEndTime.hours * 60 + parsedEndTime.minutes\n const intervalMinutes = clampIntervalMinutes(input.intervalMinutes())\n const literalRange = endMinutes - startMinutes\n const totalMinutes = Math.ceil(literalRange / intervalMinutes) * intervalMinutes\n\n resizeState.value = {\n eventId: event.id,\n event,\n edge,\n container,\n originalTop,\n originalHeight,\n currentTop: originalTop,\n currentHeight: originalHeight,\n eventDate,\n originalStart: dayjs(event.start).format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: dayjs(event.end).format('YYYY-MM-DD HH:mm:ss'),\n startMinutes,\n literalRange,\n totalMinutes,\n intervalMinutes,\n minHeightPercent: (intervalMinutes / totalMinutes) * 100,\n }\n\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', handlePointerMove)\n document.addEventListener('pointerup', handlePointerUp)\n }\n\n const getResizePosition = (eventId: string | number) => {\n const state = resizeState.value\n return state?.eventId === eventId\n ? { top: state.currentTop, height: state.currentHeight }\n : null\n }\n\n const isResizableEvent = (event: ScheduleEventData): boolean =>\n input.enabled() &&\n input.mode() !== 'static' &&\n event.display !== 'background' &&\n (input.canResizeEvent()?.(event) ?? true)\n\n onBeforeUnmount(removeDocumentListeners)\n\n return {\n handleResizeStart,\n getResizePosition,\n isResizableEvent,\n wasResizing: () => justResized,\n }\n}\n",".currentTimeIndicator {\n --time-bubble-height: 18px;\n --thumb-size: 12px;\n --_indicator-color: var(--indicator-color, var(--mantine-color-red-7));\n\n position: absolute;\n pointer-events: none;\n left: 0;\n right: 0;\n top: var(--top-offset);\n height: 2px;\n z-index: 2;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--_indicator-color);\n opacity: 0.2;\n }\n}\n\n.currentTimeIndicatorLine {\n height: 100%;\n position: absolute;\n top: 0;\n background-color: var(--_indicator-color);\n inset-inline-start: var(--start-offset);\n inset-inline-end: var(--end-offset);\n}\n\n.currentTimeIndicatorThumb {\n position: absolute;\n top: calc(-1 * (var(--thumb-size) / 2 - 1px));\n width: var(--thumb-size);\n height: var(--thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n inset-inline-start: calc(var(--start-offset) - (var(--thumb-size) / 2 - 1px));\n}\n\n.currentTimeIndicatorTimeBubble {\n position: absolute;\n height: var(--time-bubble-height);\n width: var(--time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n inset-inline-start: var(--time-bubble-start-offset);\n top: calc(-1 * (var(--time-bubble-height) / 2 - 1px));\n z-index: 2;\n text-transform: uppercase;\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, onBeforeUnmount, onMounted, ref, type PropType } from 'vue'\nimport { Box, getThemeColor, useSafeMantineTheme } from '@mantine-vue/core'\nimport type { CurrentTimeIndicatorProps } from '../../component-props'\nimport type { AnyDateValue, DateLabelFormat } from '../../types'\nimport { formatDate, getCurrentTimePosition, isInTimeRange } from '../../utils'\nimport classes from './CurrentTimeIndicator.module.css'\n\nexport const CurrentTimeIndicator = defineComponent({\n name: 'CurrentTimeIndicator',\n inheritAttrs: false,\n props: {\n color: { type: String, default: 'red' },\n startOffset: { type: String, default: '0px' },\n endOffset: { type: String, default: '0px' },\n topOffset: { type: String, default: '0px' },\n timeBubbleStartOffset: { type: String, default: '0px' },\n withTimeBubble: { type: Boolean, default: true },\n withThumb: { type: Boolean, default: true },\n currentTimeFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'HH:mm' },\n locale: String,\n startTime: { type: String, default: '00:00:00' },\n endTime: { type: String, default: '23:59:59' },\n intervalMinutes: { type: Number, default: 60 },\n getCurrentTime: Function as PropType<() => AnyDateValue>,\n },\n setup(props, { attrs }) {\n const theme = useSafeMantineTheme()\n const tick = ref(0)\n let timer: ReturnType<typeof setInterval> | undefined\n onMounted(() => {\n timer = setInterval(() => tick.value++, 30_000)\n })\n onBeforeUnmount(() => clearInterval(timer))\n return () => {\n void tick.value\n const now = props.getCurrentTime?.() || dayjs()\n if (!isInTimeRange({ date: now, startTime: props.startTime, endTime: props.endTime }))\n return null\n const top = getCurrentTimePosition({\n now,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n })\n const color = getThemeColor(props.color, theme.value)\n const formattedTime = props.withTimeBubble\n ? formatDate({\n date: now,\n locale: props.locale || 'en',\n format: props.currentTimeFormat,\n })\n : ''\n return h(\n Box,\n {\n ...attrs,\n class: [classes.currentTimeIndicator, attrs.class],\n style: [\n {\n '--indicator-color': color,\n '--start-offset': props.startOffset,\n '--end-offset': props.endOffset,\n '--top-offset': `calc(${top}% + ${props.topOffset})`,\n '--time-bubble-start-offset': props.timeBubbleStartOffset,\n '--time-bubble-width': formattedTime.toString().toLowerCase().includes('m')\n ? '64px'\n : '46px',\n },\n attrs.style,\n ],\n },\n () => [\n props.withTimeBubble\n ? h('div', { class: classes.currentTimeIndicatorTimeBubble }, formattedTime)\n : null,\n props.withThumb ? h('div', { class: classes.currentTimeIndicatorThumb }) : null,\n h('div', { class: classes.currentTimeIndicatorLine }),\n ],\n )\n }\n },\n})\n\nexport type { CurrentTimeIndicatorProps }\nexport type CurrentTimeIndicatorStylesNames =\n | 'currentTimeIndicator'\n | 'currentTimeIndicatorLine'\n | 'currentTimeIndicatorThumb'\n | 'currentTimeIndicatorTimeBubble'\n",".event {\n padding: 1px;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n flex: 1 0 auto;\n position: relative;\n z-index: 3;\n\n &:where([data-auto-size]) {\n container-type: size;\n }\n\n &:where([data-draggable]) .eventInner {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n }\n\n &:where([data-dragging]) {\n opacity: 0.2;\n\n .eventInner {\n cursor: grabbing;\n }\n }\n\n &:where([data-any-dragging]:not([data-dragging])) {\n pointer-events: none;\n\n .eventInner {\n pointer-events: none;\n }\n }\n\n &:where([data-static]) {\n pointer-events: none;\n cursor: default;\n }\n\n &:where([data-resizing]) {\n z-index: 10;\n\n .eventInner {\n @mixin hover {\n background-color: var(--event-bg);\n }\n }\n }\n\n &:where([data-hanging='start'], [data-hanging='both']) {\n &::before {\n content: '';\n position: absolute;\n inset-block: 2px;\n inset-inline-start: 2px;\n width: 2px;\n background-color: var(--event-color);\n border-radius: 10px;\n opacity: 0.3;\n }\n\n .eventInner {\n padding-inline-start: 6px;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n\n &:where([data-hanging='end'], [data-hanging='both']) {\n &::after {\n content: '';\n position: absolute;\n inset-block: 2px;\n inset-inline-end: 2px;\n width: 2px;\n background-color: var(--event-color);\n border-radius: 10px;\n opacity: 0.3;\n }\n\n .eventInner {\n padding-inline-end: 6px;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n }\n\n &:where([data-clip-start]) {\n .eventInner {\n padding-inline-start: 12px;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);\n }\n }\n\n &:where([data-clip-end]) {\n .eventInner {\n padding-inline-end: 12px;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);\n }\n }\n\n &:where([data-clip-start][data-clip-end]) {\n .eventInner {\n clip-path: polygon(\n 10px 0,\n calc(100% - 10px) 0,\n 100% 50%,\n calc(100% - 10px) 100%,\n 10px 100%,\n 0 50%\n );\n }\n }\n}\n\n.eventInner {\n background-color: var(--event-bg);\n color: var(--event-color);\n pointer-events: all;\n border-radius: min(var(--event-radius), 50%);\n font-weight: var(--mantine-font-weight-medium);\n font-size: 12px;\n line-height: 1;\n padding: 3px 4px;\n width: 100%;\n height: 100%;\n cursor: pointer;\n user-select: none;\n overflow: hidden;\n\n &:where([data-nowrap]) {\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.25;\n }\n\n &:where([data-size='md']) {\n font-size: 14px;\n padding: 4px 6px;\n }\n\n @mixin hover {\n background-color: var(--event-hover);\n }\n\n &:where([data-auto-size]) {\n @container (max-width: 12px) {\n padding-inline: 0;\n }\n\n @container (min-width: 16px) {\n width: calc(100% - 2px);\n margin-inline: auto;\n }\n\n @container (max-height: 18px) {\n font-size: 9px;\n padding-block: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n }\n\n .event[data-static] & {\n cursor: default;\n pointer-events: none;\n\n @mixin hover {\n background-color: var(--event-bg);\n }\n }\n\n :where([data-slot-dragging]) & {\n pointer-events: none;\n }\n}\n\n.eventResizeHandle {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n width: 40%;\n max-width: 40px;\n height: 4px;\n border-radius: 2px;\n cursor: ns-resize;\n pointer-events: all;\n z-index: 4;\n touch-action: none;\n background-color: var(--event-color);\n opacity: 0;\n transition: opacity 100ms ease;\n\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n\n &:where([data-edge='top']) {\n top: -2px;\n }\n\n &:where([data-edge='bottom']) {\n bottom: -2px;\n }\n\n .event:where(:hover, [data-resizing]) & {\n opacity: 0.5;\n }\n\n @mixin hover {\n opacity: 0.8;\n }\n}\n","import { defineComponent, h, ref, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport { Box, UnstyledButton, useSafeMantineTheme } from '@mantine-vue/core'\nimport type {\n ScheduleEventProps,\n ScheduleEventRenderProps,\n RenderEvent,\n RenderEventBody,\n} from '../../component-props'\nimport type { ScheduleEventData, ScheduleMode } from '../../types'\nimport classes from './ScheduleEvent.module.css'\n\nfunction resolveRadius(radius: string | number | undefined) {\n if (radius == null) return undefined\n if (typeof radius === 'number') return `${radius}px`\n return ['xs', 'sm', 'md', 'lg', 'xl'].includes(radius)\n ? `var(--mantine-radius-${radius})`\n : radius\n}\n\nexport interface ScheduleEventSlots {\n /** Fallback body content (used when `renderEventBody`/`eventBody` are not provided) */\n default?: () => VNodeChild\n /** Scoped alternative to the `renderEventBody` prop */\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n /** Scoped alternative to the `renderEvent` prop */\n event?: (props: ScheduleEventRenderProps & { event: ScheduleEventData }) => VNodeChild\n}\n\nexport const ScheduleEvent = defineComponent({\n name: 'ScheduleEvent',\n inheritAttrs: false,\n slots: Object as SlotsType<ScheduleEventSlots>,\n props: {\n event: { type: Object as PropType<ScheduleEventData>, required: true },\n radius: {\n type: [String, Number] as PropType<string | number>,\n default: 'sm',\n },\n nowrap: Boolean,\n autoSize: Boolean,\n size: { type: String, default: 'sm' },\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n hanging: String as PropType<ScheduleEventProps['hanging']>,\n draggable: Boolean,\n onEventDragStart: Function as PropType<(event: ScheduleEventData) => void>,\n onEventDragEnd: Function as PropType<() => void>,\n isDragging: Boolean,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n withResize: Boolean,\n onResizeStart: Function as PropType<(edge: 'top' | 'bottom', event: PointerEvent) => void>,\n isResizing: Boolean,\n },\n setup(props, { attrs, slots }) {\n const theme = useSafeMantineTheme()\n const isNativeDragging = ref(false)\n return () => {\n const colors = theme.value.variantColorResolver({\n color: props.event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: props.event.variant || 'light',\n autoContrast: true,\n })\n const body: VNodeChild =\n props.renderEventBody?.(props.event) ||\n slots.eventBody?.({ event: props.event }) ||\n slots.default?.() ||\n props.event.title\n const showResizeHandles = props.withResize && props.mode !== 'static'\n const rootProps = {\n ...attrs,\n class: [classes.event, attrs.class],\n style: [\n {\n '--event-color': colors.color,\n '--event-bg': colors.background,\n '--event-hover': colors.hover,\n '--event-radius': resolveRadius(props.radius),\n },\n attrs.style,\n ],\n 'data-event-id': props.event.id,\n title: props.event.title,\n size: props.size,\n mod: {\n autoSize: props.autoSize,\n hanging: props.hanging,\n draggable: props.draggable,\n dragging: props.isDragging || isNativeDragging.value,\n static: props.mode === 'static',\n resizing: props.isResizing,\n resizable: showResizeHandles,\n },\n draggable: props.draggable && props.mode !== 'static',\n tabindex: props.mode === 'static' ? -1 : 0,\n onDragstart: (event: DragEvent) => {\n if (!props.draggable || props.mode === 'static') {\n event.preventDefault()\n return\n }\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = 'move'\n event.dataTransfer.setData(\n 'application/json',\n JSON.stringify({ eventId: props.event.id }),\n )\n }\n isNativeDragging.value = true\n props.onEventDragStart?.(props.event)\n },\n onDragend:\n props.mode === 'static'\n ? undefined\n : () => {\n isNativeDragging.value = false\n props.onEventDragEnd?.()\n },\n onClick:\n props.mode === 'static'\n ? undefined\n : (attrs.onClick as ScheduleEventRenderProps['onClick']),\n }\n const children = [\n showResizeHandles\n ? h(Box, {\n class: classes.eventResizeHandle,\n mod: { edge: 'top' },\n onPointerdown: (event: PointerEvent) => props.onResizeStart?.('top', event),\n })\n : null,\n h(\n Box,\n {\n class: classes.eventInner,\n mod: {\n nowrap: props.nowrap,\n size: props.size,\n autoSize: props.autoSize,\n hanging: props.hanging,\n },\n },\n () => body,\n ),\n showResizeHandles\n ? h(Box, {\n class: classes.eventResizeHandle,\n mod: { edge: 'bottom' },\n onPointerdown: (event: PointerEvent) => props.onResizeStart?.('bottom', event),\n })\n : null,\n ]\n const renderProps = { ...rootProps, children }\n return (\n props.renderEvent?.(props.event, renderProps) ||\n slots.event?.({ ...renderProps, event: props.event }) ||\n h(UnstyledButton, rootProps, () => children)\n )\n }\n },\n})\n\nexport type { RenderEvent, RenderEventBody, ScheduleEventProps }\nexport type ScheduleEventStylesNames = 'event' | 'eventInner' | 'eventResizeHandle'\n","import dayjs from 'dayjs'\nimport { h, type CSSProperties, type PropType, type VNodeChild } from 'vue'\nimport type {\n BaseViewProps,\n EventDropData,\n NativeButtonProps,\n RenderEvent,\n RenderEventBody,\n TimeSlotClickData,\n} from '../component-props'\nimport type {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleViewLevel,\n} from '../types'\nimport type { BusinessHoursValue } from '../utils'\nimport { expandRecurringEvents, formatDate, toDateString } from '../utils'\nimport { ScheduleEvent } from './ScheduleEvent/ScheduleEvent'\n\nexport const baseViewProps = {\n date: { type: [String, Date] as PropType<Date | DateStringValue>, required: true },\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n events: Array as PropType<ScheduleEventData[]>,\n locale: String,\n radius: [String, Number] as PropType<string | number>,\n labels: Object,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n withHeader: { type: Boolean, default: true },\n onViewChange: Function as PropType<(view: ScheduleViewLevel) => void>,\n previousControlProps: Object as PropType<NativeButtonProps>,\n nextControlProps: Object as PropType<NativeButtonProps>,\n todayControlProps: Object as PropType<NativeButtonProps>,\n viewSelectProps: Object,\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n onEventClick: Function as PropType<(event: ScheduleEventData, nativeEvent: MouseEvent) => void>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n}\n\nexport const timeViewProps = {\n ...baseViewProps,\n startTime: { type: String, default: '00:00:00' },\n endTime: { type: String, default: '23:59:59' },\n intervalMinutes: { type: Number, default: 60 },\n slotLabelFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'HH:mm' },\n withCurrentTimeIndicator: { type: Boolean, default: undefined },\n withCurrentTimeBubble: { type: Boolean, default: true },\n getCurrentTime: Function as PropType<() => AnyDateValue>,\n slotHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 64 },\n highlightBusinessHours: Boolean,\n businessHours: [Array, Object] as PropType<BusinessHoursValue>,\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<(data: EventDropData) => void>,\n canDragEvent: Function as PropType<(event: ScheduleEventData) => boolean>,\n onEventDragStart: Function as PropType<(event: ScheduleEventData) => void>,\n onEventDragEnd: Function as PropType<() => void>,\n onTimeSlotClick: Function as PropType<(data: TimeSlotClickData) => void>,\n onAllDaySlotClick: Function as PropType<(date: DateStringValue, nativeEvent: MouseEvent) => void>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function,\n startScrollTime: String,\n onExternalEventDrop: Function,\n withEventResize: Boolean,\n onEventResize: Function as PropType<(data: EventDropData) => void>,\n canResizeEvent: Function as PropType<(event: ScheduleEventData) => boolean>,\n}\n\nexport function resolveScheduleRadius(radius: string | number | undefined): string | undefined {\n if (radius === undefined) return undefined\n if (typeof radius === 'number') return `${radius}px`\n return ['xs', 'sm', 'md', 'lg', 'xl'].includes(radius)\n ? `var(--mantine-radius-${radius})`\n : radius\n}\n\nexport function getExpandedEvents(\n events: ScheduleEventData[] | undefined,\n rangeStart: Date | string,\n rangeEnd: Date | string,\n expansionLimit: number,\n) {\n return expandRecurringEvents({ events, rangeStart, rangeEnd, expansionLimit })\n}\n\nexport function formatLabel(\n date: Date | string,\n locale: string | undefined,\n format: DateLabelFormat,\n) {\n return formatDate({ date, locale: locale || 'en', format })\n}\n\n/** Scoped slots that mirror the `renderEvent` / `renderEventBody` props. */\nexport interface EventSlots {\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n}\n\n/**\n * Build the slots object forwarded to a child component, omitting undefined entries.\n * Returns a `Record<string, unknown>` (possibly empty) so it satisfies Vue's `RawSlots`\n * type when passed as the third argument to `h()`.\n */\nexport function forwardEventSlots(slots: EventSlots | undefined): Record<string, unknown> {\n const forwarded: Record<string, unknown> = {}\n if (slots?.eventBody) forwarded.eventBody = slots.eventBody\n if (slots?.event) forwarded.event = slots.event\n return forwarded\n}\n\nexport function eventNode(\n event: ScheduleEventData,\n props: Pick<BaseViewProps, 'mode' | 'renderEvent' | 'renderEventBody' | 'onEventClick'> & {\n withEventsDragAndDrop?: boolean\n canDragEvent?: (event: ScheduleEventData) => boolean\n onEventDragStart?: (event: ScheduleEventData) => void\n onEventDragEnd?: () => void\n },\n extra: Record<string, unknown> = {},\n slots?: EventSlots,\n): VNodeChild {\n const draggable =\n props.mode !== 'static' &&\n props.withEventsDragAndDrop === true &&\n (props.canDragEvent?.(event) ?? true)\n return h(\n ScheduleEvent,\n {\n event,\n mode: props.mode ?? 'default',\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n draggable,\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onClick: (nativeEvent: MouseEvent) => props.onEventClick?.(event, nativeEvent),\n ...extra,\n },\n forwardEventSlots(slots),\n )\n}\n\nexport function getDropEvent(\n events: ScheduleEventData[] | undefined,\n transfer: DataTransfer | null,\n) {\n const raw = transfer?.getData('application/json')\n if (!raw) return undefined\n\n try {\n const data: unknown = JSON.parse(raw)\n if (typeof data !== 'object' || data === null || !('eventId' in data)) return undefined\n const eventId = (data as { eventId: unknown }).eventId\n if (typeof eventId !== 'string' && typeof eventId !== 'number') return undefined\n return events?.find((event) => String(event.id) === String(eventId))\n } catch {\n return undefined\n }\n}\n\nexport function getTimeSlotDropTarget({\n nativeEvent,\n container,\n intervals,\n date,\n}: {\n nativeEvent: DragEvent\n container: HTMLElement\n intervals: Array<{ startTime: string }>\n date: string\n}): { slotIndex: number; target: DateTimeStringValue } | undefined {\n const eventTarget = nativeEvent.target instanceof Element ? nativeEvent.target : null\n const targetSlot = eventTarget?.closest<HTMLElement>('[data-time-slot-index]')\n let slotIndex =\n targetSlot && container.contains(targetSlot)\n ? Number(targetSlot.dataset.timeSlotIndex)\n : Number.NaN\n\n if (!Number.isInteger(slotIndex)) {\n const slots = container.querySelectorAll<HTMLElement>('[data-time-slot-index]')\n slotIndex = Array.from(slots).findIndex((slot) => {\n const rect = slot.getBoundingClientRect()\n return nativeEvent.clientY >= rect.top && nativeEvent.clientY <= rect.bottom\n })\n }\n\n const interval = intervals[slotIndex]\n return interval\n ? {\n slotIndex,\n target: `${date} ${interval.startTime}` as DateTimeStringValue,\n }\n : undefined\n}\n\nexport function moveEventTo(event: ScheduleEventData, newStart: dayjs.ConfigType) {\n const start = dayjs(event.start)\n const duration = dayjs(event.end).diff(start, 'second')\n const nextStart = dayjs(newStart)\n return {\n eventId: event.id,\n newStart: nextStart.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: nextStart.add(duration, 'second').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event,\n }\n}\n\nexport function moveEventToAllDay(event: ScheduleEventData, date: dayjs.ConfigType) {\n const dayStart = dayjs(date).startOf('day')\n const spanDays = Math.max(\n 1,\n dayjs(event.end).startOf('day').diff(dayjs(event.start).startOf('day'), 'day'),\n )\n return {\n eventId: event.id,\n newStart: dayStart.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: dayStart.add(spanDays, 'day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event,\n }\n}\n\nexport function todayString() {\n return toDateString(dayjs())\n}\n",".moreEventsButton {\n color: var(--mantine-color-dimmed);\n font-size: 13px;\n pointer-events: all;\n flex: 1;\n\n @mixin hover {\n color: var(--mantine-color-bright);\n text-decoration: underline;\n }\n\n &:where([data-static]) {\n cursor: default;\n\n @mixin hover {\n color: var(--mantine-color-dimmed);\n text-decoration: none;\n }\n }\n}\n\n.moreEventsDropdown {\n padding: 4px;\n}\n\n.moreEventsList {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n","import { defineComponent, h, ref, type PropType, type SlotsType } from 'vue'\nimport { Box, Modal, Popover, UnstyledButton } from '@mantine-vue/core'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type {\n MoreEventsDropdownType,\n MoreEventsProps,\n RenderEvent,\n RenderEventBody,\n} from '../../component-props'\nimport type { ScheduleEventData, ScheduleMode } from '../../types'\nimport { ScheduleEvent } from '../ScheduleEvent/ScheduleEvent'\nimport { forwardEventSlots, type EventSlots } from '../shared'\nimport classes from './MoreEvents.module.css'\n\nexport const MoreEvents = defineComponent({\n name: 'MoreEvents',\n inheritAttrs: false,\n slots: Object as SlotsType<EventSlots>,\n props: {\n events: { type: Array as PropType<ScheduleEventData[]>, required: true },\n moreEventsCount: { type: Number, required: true },\n radius: [String, Number] as PropType<string | number>,\n modalTitle: String,\n dropdownType: { type: String as PropType<MoreEventsDropdownType>, default: 'popover' },\n popoverProps: Object as PropType<Record<string, unknown>>,\n modalProps: Object as PropType<Record<string, unknown>>,\n onDropdownClose: Function as PropType<() => void>,\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n labels: Object as PropType<ScheduleLabelsOverride>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n onEventClick: Function as PropType<(event: ScheduleEventData, nativeEvent: MouseEvent) => void>,\n },\n setup(props, { attrs, slots }) {\n const opened = ref(false)\n const close = () => {\n opened.value = false\n props.onDropdownClose?.()\n }\n\n return () => {\n const eventsList = h(Box, { class: classes.moreEventsList }, () =>\n props.events.map((event) =>\n h(\n ScheduleEvent,\n {\n key: event.id,\n event,\n radius: props.radius ?? 'sm',\n size: 'md',\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onClick: (nativeEvent: MouseEvent) => props.onEventClick?.(event, nativeEvent),\n },\n forwardEventSlots(slots),\n ),\n ),\n )\n\n return [\n props.dropdownType === 'modal'\n ? h(\n Modal,\n {\n ...props.modalProps,\n opened: opened.value,\n onClose: close,\n radius: props.radius,\n title: props.modalTitle,\n },\n () => eventsList,\n )\n : null,\n h(\n Popover,\n {\n position: 'bottom-start',\n width: 260,\n opened: opened.value,\n trapFocus: true,\n returnFocus: false,\n disabled: props.dropdownType === 'modal',\n radius: props.radius,\n transitionProps: { transition: 'pop', duration: 120 },\n offset: -46,\n ...props.popoverProps,\n onChange: (value: boolean) => {\n if (!value) close()\n },\n },\n () => [\n h(Popover.Target, null, () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n class: [classes.moreEventsButton, attrs.class],\n mod: { static: props.mode === 'static' },\n 'aria-expanded': opened.value,\n onClick: () => {\n opened.value = !opened.value\n },\n },\n () => getLabel('moreLabel', props.labels)(props.moreEventsCount),\n ),\n ),\n h(Popover.Dropdown, { class: classes.moreEventsDropdown }, () => eventsList),\n ],\n ),\n ]\n }\n },\n})\n\nexport type { MoreEventsDropdownType, MoreEventsProps }\nexport type MoreEventsStylesNames = 'moreEventsButton' | 'moreEventsDropdown' | 'moreEventsList'\n","import { onBeforeUnmount, ref, watch, type Ref } from 'vue'\n\ninterface SelectedRange {\n group: string\n start: number\n end: number\n}\n\ninterface DragState {\n group: string\n startIndex: number\n currentIndex: number\n}\n\nexport interface UseSlotDragSelectInput {\n /** Whether slot drag selection is enabled */\n enabled: () => boolean\n /** Called with the selected range once a multi-slot drag finishes */\n onDragEnd?: () => ((startIndex: number, endIndex: number, group: string) => void) | undefined\n}\n\nexport interface SlotDragSelect {\n /** Begin a slot selection at the given index/group */\n handleSlotPointerDown: (event: PointerEvent, index: number, group: string) => void\n /** Whether the slot at index within group is currently selected */\n isSlotSelected: (index: number, group: string) => boolean\n /** Whether a slot drag selection is currently in progress */\n isDragging: () => boolean\n}\n\n/**\n * Composable that provides unified slot drag-selection for Day, Week and Month views.\n * tracks a selected range as the pointer\n * moves across elements carrying `data-drag-slot-index` / `data-drag-slot-group`.\n */\nexport function useSlotDragSelect(input: UseSlotDragSelectInput): SlotDragSelect {\n const selectedRange = ref<SelectedRange | null>(null)\n let drag: DragState | null = null\n let savedUserSelect = ''\n\n const handlePointerMove = (event: PointerEvent) => {\n if (!drag) return\n const elements = document.elementsFromPoint(event.clientX, event.clientY)\n for (const el of elements) {\n const element = el as HTMLElement\n const indexAttr = element.getAttribute?.('data-drag-slot-index')\n const groupAttr = element.getAttribute?.('data-drag-slot-group')\n if (indexAttr != null && groupAttr != null) {\n if (groupAttr === drag.group) {\n const newIndex = Number(indexAttr)\n if (!Number.isNaN(newIndex) && newIndex !== drag.currentIndex) {\n drag.currentIndex = newIndex\n selectedRange.value = {\n group: groupAttr,\n start: Math.min(drag.startIndex, newIndex),\n end: Math.max(drag.startIndex, newIndex),\n }\n }\n }\n break\n }\n }\n }\n\n const handlePointerUp = () => {\n if (drag) {\n const { startIndex, currentIndex, group } = drag\n if (startIndex !== currentIndex) {\n input.onDragEnd?.()?.(\n Math.min(startIndex, currentIndex),\n Math.max(startIndex, currentIndex),\n group,\n )\n }\n }\n drag = null\n selectedRange.value = null\n }\n\n const removeListeners = () => {\n document.body.style.userSelect = savedUserSelect\n document.removeEventListener('pointermove', handlePointerMove)\n document.removeEventListener('pointerup', handlePointerUp)\n }\n\n watch(\n () => selectedRange.value !== null,\n (isDragging) => {\n if (isDragging) {\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', handlePointerMove)\n document.addEventListener('pointerup', handlePointerUp)\n } else {\n removeListeners()\n }\n },\n )\n\n onBeforeUnmount(() => {\n if (selectedRange.value !== null) removeListeners()\n })\n\n const handleSlotPointerDown = (_event: PointerEvent, index: number, group: string) => {\n if (!input.enabled()) return\n drag = { group, startIndex: index, currentIndex: index }\n selectedRange.value = { group, start: index, end: index }\n }\n\n const isSlotSelected = (index: number, group: string) => {\n const range = selectedRange.value\n if (!range || range.group !== group) return false\n return index >= range.start && index <= range.end\n }\n\n const isDragging = () => selectedRange.value !== null\n\n return { handleSlotPointerDown, isSlotSelected, isDragging }\n}\n\nexport type SelectedRangeRef = Ref<SelectedRange | null>\n",".header {\n --schedule-header-gap: 8px;\n\n display: flex;\n flex-wrap: wrap;\n gap: var(--schedule-header-gap);\n margin-bottom: var(--schedule-header-gap);\n container-type: inline-size;\n}\n\n.navigationGroup {\n display: flex;\n gap: var(--schedule-header-gap);\n align-items: center;\n\n @container (width <= 600px) {\n flex: 1;\n\n & > :not([data-square]) {\n flex: 1;\n }\n }\n}\n\n.todayControl {\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.viewSelect {\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.compactViewSelect {\n display: none;\n font-weight: var(--mantine-font-weight-medium);\n\n @container (width <= 600px) {\n display: block;\n flex: 1 1 100%;\n }\n}\n",".headerControl {\n --control-size: 32px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n min-width: var(--control-size);\n height: var(--control-size);\n border-radius: var(--schedule-radius, var(--control-radius, var(--mantine-radius-default)));\n border: 1px solid var(--mantine-color-default-border);\n color: var(--mantine-color-default-color);\n background: var(--mantine-color-default);\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-transform: capitalize;\n\n &:where([data-interactive]) {\n cursor: pointer;\n\n @mixin hover {\n background-color: var(--mantine-color-default-hover);\n }\n }\n\n &:where(:not([data-square])) {\n padding-inline: 12px;\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-filled);\n border-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n border-color: var(--mantine-primary-color-filled-hover);\n }\n }\n}\n",".viewSelect {\n display: flex;\n gap: 4px;\n}\n",".monthYearSelectTarget {\n text-transform: capitalize;\n min-width: 80px;\n\n &:where([data-with-months]) {\n min-width: 140px;\n }\n}\n\n.monthYearSelectList {\n flex: 1;\n}\n\n.monthYearSelectDropdown {\n display: flex;\n gap: var(--mantine-spacing-sm);\n padding: 8px 4px;\n\n &:where([data-with-months]) {\n padding: var(--mantine-spacing-sm);\n }\n}\n\n.monthYearSelectLabel {\n font-weight: var(--mantine-font-weight-medium);\n font-size: var(--mantine-font-size-sm);\n padding-inline: 8px;\n margin-bottom: 6px;\n}\n\n.monthYearSelectControl {\n display: block;\n width: 100%;\n padding: 6px 8px;\n font-size: var(--mantine-font-size-sm);\n line-height: 1;\n border-radius: var(--schedule-radius, var(--control-radius, var(--mantine-radius-default)));\n font-variant-numeric: tabular-nums;\n text-transform: capitalize;\n\n &:where([data-type='year']) {\n text-align: center;\n }\n\n @mixin hover {\n background-color: var(--mantine-color-default-hover);\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n}\n","import { defineComponent, h, inject, provide, ref, type InjectionKey, type PropType } from 'vue'\nimport {\n AccordionChevron,\n Box,\n createScopedKeydownHandler,\n Popover,\n UnstyledButton,\n useDirection,\n} from '@mantine-vue/core'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type { ScheduleViewLevel } from '../../types'\nimport type {\n HeaderControlProps,\n MonthYearSelectProps,\n ScheduleHeaderProps,\n ViewSelectProps,\n} from '../../component-props'\nimport { formatDate, getMonthsList, getYearsList } from '../../utils'\nimport classes from './ScheduleHeader.module.css'\nimport controlClasses from './HeaderControl/HeaderControl.module.css'\nimport viewClasses from './ViewSelect/ViewSelect.module.css'\nimport monthYearClasses from './MonthYearSelect/MonthYearSelect.module.css'\n\nconst labelsKey: InjectionKey<ScheduleLabelsOverride | undefined> = Symbol('schedule-header-labels')\n\nconst commonControlProps = {\n active: Boolean,\n square: Boolean,\n radius: [String, Number] as PropType<string | number>,\n interactive: { type: Boolean, default: true },\n labels: Object as PropType<ScheduleLabelsOverride>,\n}\n\nfunction resolveRadius(radius: string | number | undefined) {\n if (radius == null) return undefined\n if (typeof radius === 'number') return `${radius}px`\n return ['xs', 'sm', 'md', 'lg', 'xl'].includes(radius)\n ? `var(--mantine-radius-${radius})`\n : radius\n}\n\nexport const HeaderControl = defineComponent({\n name: 'HeaderControl',\n inheritAttrs: false,\n props: commonControlProps,\n setup(props, { attrs, slots }) {\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n class: [controlClasses.headerControl, attrs.class],\n style: [\n props.radius == null ? undefined : { '--control-radius': resolveRadius(props.radius) },\n attrs.style,\n ],\n tabindex: props.interactive ? (attrs as { tabindex?: number }).tabindex : -1,\n mod: {\n active: props.active,\n square: props.square,\n interactive: props.interactive,\n },\n },\n () => slots.default?.(),\n )\n },\n})\n\nfunction directionalControl(name: string, type: 'next' | 'previous') {\n return defineComponent({\n name,\n inheritAttrs: false,\n props: commonControlProps,\n setup(props, { attrs }) {\n const inherited = inject(labelsKey, undefined)\n const { dir } = useDirection()\n return () =>\n h(\n HeaderControl,\n {\n ...attrs,\n ...props,\n square: true,\n 'data-type': type,\n 'aria-label': getLabel(type, props.labels || inherited),\n },\n () =>\n h(AccordionChevron, {\n style: {\n transform: `rotate(${type === 'next' ? (dir.value === 'rtl' ? 90 : -90) : dir.value === 'rtl' ? -90 : 90}deg)`,\n },\n }),\n )\n },\n })\n}\n\nexport const ScheduleHeaderNext = directionalControl('ScheduleHeaderNext', 'next')\nexport const ScheduleHeaderPrevious = directionalControl('ScheduleHeaderPrevious', 'previous')\n\nexport const ScheduleHeaderToday = defineComponent({\n name: 'ScheduleHeaderToday',\n inheritAttrs: false,\n props: commonControlProps,\n setup(props, { attrs }) {\n const inherited = inject(labelsKey, undefined)\n return () =>\n h(\n HeaderControl,\n {\n ...attrs,\n ...props,\n 'data-type': 'today',\n 'aria-label': getLabel('today', props.labels || inherited),\n },\n () => getLabel('today', props.labels || inherited),\n )\n },\n})\n\nexport const ViewSelect = defineComponent({\n name: 'ViewSelect',\n inheritAttrs: false,\n props: {\n views: {\n type: Array as PropType<readonly ScheduleViewLevel[]>,\n default: () => ['day', 'week', 'month', 'year'],\n },\n value: String as PropType<ScheduleViewLevel>,\n onChange: Function as PropType<(view: ScheduleViewLevel) => void>,\n radius: [String, Number] as PropType<string | number>,\n labels: Object as PropType<ScheduleLabelsOverride>,\n },\n setup(props, { attrs }) {\n const inherited = inject(labelsKey, undefined)\n const switchLabels: Record<ScheduleViewLevel, keyof import('../../labels').ScheduleLabels> = {\n day: 'switchToDayView',\n week: 'switchToWeekView',\n month: 'switchToMonthView',\n year: 'switchToYearView',\n }\n const onKeydown = (event: KeyboardEvent, index: number) => {\n const controls = (\n event.currentTarget as HTMLElement\n ).parentElement?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')\n if (!controls?.length) return\n let next = index\n if (event.key === 'ArrowRight') next = (index + 1) % controls.length\n else if (event.key === 'ArrowLeft') next = (index - 1 + controls.length) % controls.length\n else if (event.key === 'Home') next = 0\n else if (event.key === 'End') next = controls.length - 1\n else return\n event.preventDefault()\n controls[next]?.focus()\n }\n return () => {\n const labels = props.labels || inherited\n return h(\n Box,\n {\n ...attrs,\n class: [viewClasses.viewSelect, attrs.class],\n role: 'tablist',\n 'aria-label': getLabel('viewSelectLabel', labels),\n },\n () =>\n props.views.map((view, index) =>\n h(\n HeaderControl,\n {\n active: view === props.value,\n radius: props.radius,\n role: 'tab',\n 'data-type': view,\n 'aria-selected': view === props.value,\n 'aria-label': getLabel(switchLabels[view], labels),\n tabindex: view === props.value ? 0 : -1,\n onClick: () => props.onChange?.(view),\n onKeydown: (event: KeyboardEvent) => onKeydown(event, index),\n },\n () => getLabel(view, labels),\n ),\n ),\n )\n }\n },\n})\n\nexport const MonthYearSelect = defineComponent({\n name: 'MonthYearSelect',\n inheritAttrs: false,\n props: {\n locale: String,\n startYear: Number,\n endYear: Number,\n yearValue: Number,\n monthValue: Number,\n onYearChange: Function as PropType<(year: number) => void>,\n onMonthChange: Function as PropType<(month: number) => void>,\n monthsListFormat: [String, Function] as PropType<MonthYearSelectProps['monthsListFormat']>,\n labelFormat: [String, Function] as PropType<MonthYearSelectProps['labelFormat']>,\n radius: [String, Number] as PropType<string | number>,\n getYearControlProps: Function as PropType<MonthYearSelectProps['getYearControlProps']>,\n getMonthControlProps: Function as PropType<MonthYearSelectProps['getMonthControlProps']>,\n withMonths: { type: Boolean, default: true },\n labels: Object as PropType<ScheduleLabelsOverride>,\n },\n setup(props, { attrs }) {\n const inherited = inject(labelsKey, undefined)\n const opened = ref(false)\n const today = new Date()\n return () => {\n const labels = props.labels || inherited\n const startYear = props.startYear ?? today.getFullYear() - 5\n const endYear = props.endYear ?? today.getFullYear() + 5\n const selected = new Date(\n props.yearValue ?? today.getFullYear(),\n props.monthValue ?? today.getMonth(),\n 1,\n )\n const hasActiveYear =\n props.yearValue !== undefined && props.yearValue >= startYear && props.yearValue <= endYear\n\n const months = props.withMonths\n ? getMonthsList({\n locale: props.locale || 'en',\n format: props.monthsListFormat || 'MMMM',\n }).map((month) => {\n const extra = props.getMonthControlProps?.(month.month) || {}\n return h(\n UnstyledButton,\n {\n ...extra,\n class: [monthYearClasses.monthYearSelectControl, extra.class],\n mod: { type: 'month', active: month.month === props.monthValue },\n tabindex: month.month === props.monthValue ? 0 : -1,\n 'aria-label': `${getLabel('selectMonth', labels)} ${month.name}`,\n onKeydown: createScopedKeydownHandler({\n siblingSelector: '[data-type=\"month\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n onKeydown: extra.onKeydown,\n }),\n onClick: () => {\n props.onMonthChange?.(month.month)\n },\n },\n () => month.name,\n )\n })\n : []\n\n const years = getYearsList({ startYear, endYear }).map((year, index) => {\n const extra = props.getYearControlProps?.(year) || {}\n return h(\n UnstyledButton,\n {\n ...extra,\n class: [monthYearClasses.monthYearSelectControl, extra.class],\n mod: { type: 'year', active: year === props.yearValue },\n tabindex: hasActiveYear ? (year === props.yearValue ? 0 : -1) : index === 0 ? 0 : -1,\n 'aria-label': `${getLabel('selectYear', labels)} ${year}`,\n onKeydown: createScopedKeydownHandler({\n siblingSelector: '[data-type=\"year\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n onKeydown: extra.onKeydown,\n }),\n onClick: () => {\n props.onYearChange?.(year)\n if (!props.withMonths) opened.value = false\n },\n },\n () => String(year),\n )\n })\n\n return h(\n Popover,\n {\n position: 'bottom-start',\n trapFocus: true,\n transitionProps: { transition: 'pop', duration: 120 },\n radius: props.radius || 'var(--schedule-radius, var(--mantine-radius-default))',\n shadow: 'md',\n offset: 3,\n width: props.withMonths ? undefined : 'target',\n opened: opened.value,\n onChange: (value: boolean) => {\n opened.value = value\n },\n },\n () => [\n h(Popover.Target, null, () =>\n h(\n HeaderControl,\n {\n ...attrs,\n class: [monthYearClasses.monthYearSelectTarget, attrs.class],\n radius: props.radius,\n 'data-with-months': props.withMonths || undefined,\n onClick: () => {\n opened.value = !opened.value\n },\n },\n () =>\n formatDate({\n date: selected,\n locale: props.locale || 'en',\n format: props.labelFormat || (props.withMonths ? 'MMMM YYYY' : 'YYYY'),\n }),\n ),\n ),\n h(\n Popover.Dropdown,\n {\n class: monthYearClasses.monthYearSelectDropdown,\n 'data-with-months': props.withMonths || undefined,\n },\n () => [\n props.withMonths\n ? h(Box, { class: monthYearClasses.monthYearSelectList, 'data-list': true }, () => [\n h(Box, { class: monthYearClasses.monthYearSelectLabel }, () =>\n getLabel('month', labels),\n ),\n ...months,\n ])\n : null,\n h(Box, { class: monthYearClasses.monthYearSelectList, 'data-list': true }, () => [\n props.withMonths\n ? h(Box, { class: monthYearClasses.monthYearSelectLabel }, () =>\n getLabel('year', labels),\n )\n : null,\n ...years,\n ]),\n ],\n ),\n ],\n )\n }\n },\n})\n\nconst ScheduleHeaderBaseComponent = defineComponent({\n name: 'ScheduleHeader',\n inheritAttrs: false,\n props: { labels: Object as PropType<ScheduleLabelsOverride> },\n setup(props, { attrs, slots }) {\n provide(labelsKey, props.labels)\n return () => h(Box, { ...attrs, class: [classes.header, attrs.class] }, () => slots.default?.())\n },\n})\n\nexport const ScheduleHeader = Object.assign(ScheduleHeaderBaseComponent, {\n Control: HeaderControl,\n Next: ScheduleHeaderNext,\n Previous: ScheduleHeaderPrevious,\n Today: ScheduleHeaderToday,\n ViewSelect,\n MonthYearSelect,\n})\n\nexport type { HeaderControlProps, MonthYearSelectProps, ScheduleHeaderProps, ViewSelectProps }\nexport type HeaderControlStylesNames = 'headerControl'\nexport type ViewSelectStylesNames = 'viewSelect'\nexport type MonthYearSelectStylesNames =\n | 'monthYearSelectTarget'\n | 'monthYearSelectDropdown'\n | 'monthYearSelectControl'\n | 'monthYearSelectList'\n | 'monthYearSelectLabel'\nexport type ScheduleHeaderStylesNames = 'header'\nexport type CombinedScheduleHeaderStylesNames =\n | ScheduleHeaderStylesNames\n | HeaderControlStylesNames\n | ViewSelectStylesNames\n | MonthYearSelectStylesNames\n\nvoid ({} as HeaderControlProps)\nvoid ({} as ViewSelectProps)\nvoid ({} as ScheduleHeaderProps)\n","import dayjs from 'dayjs'\nimport { defineComponent, h, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport { Box, NativeSelect } from '@mantine-vue/core'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type { DateStringValue, ScheduleViewLevel } from '../../types'\nimport type {\n MonthYearSelectProps,\n NativeButtonProps,\n ViewSelectProps,\n} from '../../component-props'\nimport { toDateString } from '../../utils'\nimport { ScheduleHeader } from './ScheduleHeader'\nimport classes from './ScheduleHeader.module.css'\n\nexport interface ScheduleHeaderBaseProps {\n view: ScheduleViewLevel\n navigationHandlers: {\n previous: () => DateStringValue\n next: () => DateStringValue\n today: () => DateStringValue\n }\n control: { title?: VNodeChild; miw?: string | number; monthYearSelect?: MonthYearSelectProps }\n labels?: ScheduleLabelsOverride\n onDateChange?: (date: DateStringValue) => void\n onViewChange?: (view: ScheduleViewLevel) => void\n previousControlProps?: NativeButtonProps\n nextControlProps?: NativeButtonProps\n todayControlProps?: NativeButtonProps\n viewSelectProps?: Partial<ViewSelectProps>\n}\n\nexport interface ScheduleHeaderBaseSlots {\n title?: () => VNodeChild\n}\n\nexport const ScheduleHeaderBase = defineComponent({\n name: 'ScheduleHeaderBase',\n slots: Object as SlotsType<ScheduleHeaderBaseSlots>,\n props: {\n view: { type: String as PropType<ScheduleViewLevel>, required: true },\n navigationHandlers: {\n type: Object as PropType<ScheduleHeaderBaseProps['navigationHandlers']>,\n required: true,\n },\n control: { type: Object as PropType<ScheduleHeaderBaseProps['control']>, required: true },\n labels: Object as PropType<ScheduleLabelsOverride>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n onViewChange: Function as PropType<(view: ScheduleViewLevel) => void>,\n previousControlProps: Object as PropType<NativeButtonProps>,\n nextControlProps: Object as PropType<NativeButtonProps>,\n todayControlProps: Object as PropType<NativeButtonProps>,\n viewSelectProps: Object as PropType<Partial<ViewSelectProps>>,\n },\n setup(props, { slots }) {\n return () => {\n const views = props.viewSelectProps?.views || ['day', 'week', 'month', 'year']\n return h(ScheduleHeader, { labels: props.labels }, () => [\n h(Box, { class: classes.navigationGroup }, () => [\n h(ScheduleHeader.Previous, {\n ...props.previousControlProps,\n onClick: () => props.onDateChange?.(props.navigationHandlers.previous()),\n }),\n props.control.monthYearSelect\n ? h(ScheduleHeader.MonthYearSelect, {\n ...props.control.monthYearSelect,\n labels: props.labels,\n })\n : h(ScheduleHeader.Control, { interactive: false }, () =>\n props.control.title !== undefined ? props.control.title : slots.title?.(),\n ),\n h(ScheduleHeader.Next, {\n ...props.nextControlProps,\n onClick: () => props.onDateChange?.(props.navigationHandlers.next()),\n }),\n ]),\n h(Box, { class: classes.todayControl }, () => [\n h(ScheduleHeader.Today, {\n ...props.todayControlProps,\n onClick: () => props.onDateChange?.(props.navigationHandlers.today()),\n }),\n ]),\n h(NativeSelect, {\n class: classes.compactViewSelect,\n value: props.view,\n size: 'sm',\n data: views.map((view) => ({ value: view, label: getLabel(view, props.labels) })),\n 'aria-label': getLabel('viewSelectLabel', props.labels),\n onChange: (value: string) => props.onViewChange?.(value as ScheduleViewLevel),\n }),\n h(Box, { class: classes.viewSelect, style: { marginInlineStart: 'auto' } }, () => [\n h(ScheduleHeader.ViewSelect, {\n ...props.viewSelectProps,\n value: props.view,\n labels: props.labels,\n onChange: props.onViewChange,\n }),\n ]),\n ])\n }\n },\n})\n\nexport function createHeaderNavigation(\n date: Date | string,\n unit: 'day' | 'week' | 'month' | 'year',\n) {\n return {\n previous: () => toDateString(dayjs(date).subtract(1, unit)),\n next: () => toDateString(dayjs(date).add(1, unit)),\n today: () => toDateString(dayjs()),\n }\n}\n","import { AnyDateValue, DayPositionedEventData, ScheduleEventData } from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventsOverlap, sortEvents } from '../../../utils'\n\ninterface ColumnHasConflictOptions {\n columns: ScheduleEventData[][]\n columnIndex: number\n event: ScheduleEventData\n allDay: boolean\n date: AnyDateValue\n}\n\nfunction columnHasConflict({\n columns,\n columnIndex,\n event,\n allDay,\n date,\n}: ColumnHasConflictOptions): boolean {\n if (!columns[columnIndex]) {\n return false\n }\n\n return columns[columnIndex].some((e) => {\n const eAllDay = isAllDayEvent({ event: e, date })\n const hasTimeConflict = isEventsOverlap(e, event)\n\n // Don't count all-day events as overlaps\n if (allDay || eAllDay) {\n return false\n }\n\n return hasTimeConflict\n })\n}\n\ninterface GetDayPositionedEventsInput {\n /** Date at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given date, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** Start time of the day view, used to calculate event positions */\n startTime?: string\n\n /** End time of the day view, used to calculate event positions */\n endTime?: string\n\n /** Number of minutes per time slot, used to align the canvas to whole slots */\n intervalMinutes?: number\n}\n\nexport function getDayPositionedEvents({\n events,\n startTime,\n endTime,\n intervalMinutes,\n date,\n}: GetDayPositionedEventsInput) {\n const columns: ScheduleEventData[][] = []\n const positioned: DayPositionedEventData[] = []\n\n const sorted = sortEvents(events)\n\n for (const event of sorted) {\n const allDay = isAllDayEvent({ event, date })\n\n let column = 0\n\n while (columnHasConflict({ columns, columnIndex: column, event, allDay, date })) {\n column++\n }\n\n if (!columns[column]) {\n columns[column] = []\n }\n\n columns[column].push(event)\n\n const verticalPosition = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event, startTime, endTime, intervalMinutes })\n\n positioned.push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n\n // set later\n width: 0,\n offset: 0,\n overlaps: 0,\n },\n })\n }\n for (const positionedEvent of positioned) {\n const { allDay, column } = positionedEvent.position\n\n if (allDay) {\n positionedEvent.position.overlaps = 1\n positionedEvent.position.width = 100\n positionedEvent.position.offset = 0\n continue\n }\n\n // Find events that directly overlap with this event\n const directlyOverlapping: DayPositionedEventData[] = []\n\n for (const otherEvent of positioned) {\n if (otherEvent === positionedEvent || otherEvent.position.allDay) {\n continue\n }\n\n if (isEventsOverlap(otherEvent, positionedEvent)) {\n directlyOverlapping.push(otherEvent)\n }\n }\n\n // Find the max column by also checking overlaps of overlapping events\n // This ensures we account for the full column group\n let maxColumn = column\n\n for (const overlappingEvent of directlyOverlapping) {\n maxColumn = Math.max(maxColumn, overlappingEvent.position.column)\n\n // Check what overlaps with each overlapping event\n for (const otherEvent of positioned) {\n if (otherEvent === overlappingEvent || otherEvent.position.allDay) {\n continue\n }\n\n if (isEventsOverlap(otherEvent, overlappingEvent)) {\n maxColumn = Math.max(maxColumn, otherEvent.position.column)\n }\n }\n }\n\n const totalColumns = maxColumn + 1\n\n // Find the first occupied column to the right of this event\n // Events expand to fill empty columns but stop at the next occupied column\n let nextOccupiedColumn = totalColumns\n\n for (const other of directlyOverlapping) {\n if (other.position.column > column && other.position.column < nextOccupiedColumn) {\n nextOccupiedColumn = other.position.column\n }\n }\n\n const columnsSpanned = nextOccupiedColumn - column\n\n positionedEvent.position.overlaps = totalColumns\n positionedEvent.position.width = (columnsSpanned / totalColumns) * 100\n positionedEvent.position.offset = (column * 100) / totalColumns\n }\n\n return positioned\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayPositionedEventData, ScheduleEventData } from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventInTimeRange, validateEvent } from '../../../utils'\nimport { getDayPositionedEvents } from './get-day-positioned-events'\n\ninterface GetDayViewEventsInput {\n events: ScheduleEventData[] | undefined\n date: AnyDateValue\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n}\n\nexport function getDayViewEvents({\n events,\n date,\n startTime,\n endTime,\n intervalMinutes,\n}: GetDayViewEventsInput) {\n if (events === undefined) {\n return {\n allDayEvents: [],\n regularEvents: [],\n backgroundTimedEvents: [],\n backgroundAllDayEvents: [],\n }\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n const backgroundFiltered: ScheduleEventData[] = []\n const dayStart = dayjs(date).startOf('day')\n const dayEnd = dayjs(date).endOf('day')\n\n for (const event of events) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const isOnDay = eventStart.isSame(dayStart, 'day')\n const spansIntoDay =\n !isOnDay &&\n event.display === 'background' &&\n eventStart.isBefore(dayEnd) &&\n eventEnd.isAfter(dayStart)\n\n if (isOnDay || spansIntoDay) {\n if (isOnDay && !isEventInTimeRange({ event, startTime, endTime })) {\n continue\n }\n\n const validated = validateEvent(event)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] DayView: Duplicated event ids found: ${event.id}`)\n }\n\n if (event.display === 'background') {\n backgroundFiltered.push(validated)\n } else {\n filteredEvents.push(validated)\n }\n }\n }\n\n const positionedEvents = getDayPositionedEvents({\n events: filteredEvents,\n startTime,\n endTime,\n intervalMinutes,\n date,\n })\n\n const allDayEvents: DayPositionedEventData[] = []\n const regularEvents: DayPositionedEventData[] = []\n\n for (const event of positionedEvents) {\n if (event.position.allDay) {\n allDayEvents.push(event)\n } else {\n regularEvents.push(event)\n }\n }\n\n const backgroundTimedEvents: DayPositionedEventData[] = []\n const backgroundAllDayEvents: DayPositionedEventData[] = []\n for (const event of backgroundFiltered) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const clippedStart = eventStart.isBefore(dayStart) ? dayStart : eventStart\n const clippedEnd = eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd\n\n const clippedEvent = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n\n const allDay = isAllDayEvent({ event: clippedEvent, date })\n\n if (allDay) {\n backgroundAllDayEvents.push({\n ...event,\n position: {\n top: 0,\n height: 100,\n allDay: true,\n width: 100,\n offset: 0,\n column: 0,\n overlaps: 1,\n },\n })\n } else {\n const { top, height } = getDayPosition({\n event: clippedEvent,\n startTime,\n endTime,\n intervalMinutes,\n })\n if (height <= 0) {\n continue\n }\n backgroundTimedEvents.push({\n ...event,\n position: { top, height, allDay: false, width: 100, offset: 0, column: 0, overlaps: 1 },\n })\n }\n }\n\n return { allDayEvents, regularEvents, backgroundTimedEvents, backgroundAllDayEvents }\n}\n",".dayView {\n --slot-height: var(--day-view-slot-height, 64px); /* total height of 1 hour slot */\n --all-day-slot-height: var(--day-view-all-day-slot-height, 44px); /* height of all day slot */\n --day-view-slot-labels-width: 80px;\n --day-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n border-radius: var(--day-view-radius);\n overflow: hidden;\n\n @mixin where-light {\n --day-view-border-color: var(--mantine-color-gray-3);\n --day-view-business-hours-bg: var(--mantine-color-white);\n --day-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --day-view-border-color: var(--mantine-color-dark-4);\n --day-view-business-hours-bg: var(--mantine-color-dark-7);\n --day-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.dayViewHeader {\n text-transform: capitalize;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n}\n\n.dayViewScrollArea {\n border: 1px solid var(--day-view-border-color);\n border-radius: var(--day-view-radius);\n overflow: hidden;\n\n :where(:global(.mantine-ScrollArea-scrollbar)) {\n z-index: 4;\n }\n}\n\n.dayViewInner {\n display: flex;\n}\n\n.dayViewTimeSlots {\n position: relative;\n\n &:where(:first-of-type) .dayViewSlot:where([data-first]) {\n border-top-color: transparent;\n }\n}\n\n.dayViewSlotLabels {\n width: var(--day-view-slot-labels-width);\n}\n\n.dayViewSlotLabel {\n height: var(--slot-height);\n border-top: 1px solid var(--day-view-border-color);\n font-size: var(--mantine-font-size-sm);\n text-align: right;\n padding: 4px 8px;\n font-variant-numeric: tabular-nums;\n\n &:where([data-all-day]) {\n height: var(--all-day-slot-height);\n border-top: 0;\n }\n\n &:where(:first-of-type) {\n border-top: 0;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--day-view-non-business-hours-bg);\n }\n}\n\n.dayViewSlots {\n flex: 1;\n}\n\n.dayViewSlot {\n display: block;\n width: 100%;\n border-top: 1px dotted var(--day-view-border-color);\n height: calc(var(--slot-height) * var(--slot-size));\n position: relative;\n\n &:where(:focus) {\n z-index: 1;\n }\n\n &:where([data-hour-start]) {\n border-top: 1px solid var(--day-view-border-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n\n &:where([data-all-day]) {\n height: var(--all-day-slot-height);\n border-top: 0;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--day-view-non-business-hours-bg);\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.dayViewBackgroundEvent {\n position: absolute;\n border-radius: 0;\n pointer-events: none;\n z-index: 2;\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.dayViewAllDay {\n position: relative;\n height: var(--all-day-slot-height);\n}\n\n.dayViewAllDayEvents {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n z-index: 3;\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, type CSSProperties, type PropType, type SlotsType } from 'vue'\nimport { Box, ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport type { DayViewProps, MoreEventsProps } from '../../component-props'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport type { DateLabelFormat, DateTimeStringValue } from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getVisibleEvents,\n toDateString,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator/CurrentTimeIndicator'\nimport { MoreEvents } from '../MoreEvents/MoreEvents'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n eventNode,\n forwardEventSlots,\n getDropEvent,\n getExpandedEvents,\n getTimeSlotDropTarget,\n moveEventTo,\n moveEventToAllDay,\n resolveScheduleRadius,\n timeViewProps,\n type EventSlots,\n} from '../shared'\nimport { getDayViewEvents } from './get-day-view-events/get-day-view-events'\nimport classes from './DayView.module.css'\n\nexport const DayView = defineComponent({\n name: 'DayView',\n inheritAttrs: false,\n slots: Object as SlotsType<EventSlots>,\n props: {\n ...timeViewProps,\n intervalMinutes: { type: Number, default: 15 },\n headerFormat: {\n type: [String, Function] as PropType<DateLabelFormat>,\n default: 'MMMM D, YYYY',\n },\n withAllDaySlot: { type: Boolean, default: true },\n allDaySlotHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 44 },\n maxAllDayEvents: { type: Number, default: 3 },\n moreEventsProps: Object as PropType<Partial<MoreEventsProps>>,\n },\n setup(props, { attrs, slots }) {\n const timeSlotsContainer = ref<HTMLElement | null>(null)\n const dropTargetSlotIndex = ref<number | null>(null)\n const eventResize = useEventResize({\n enabled: () => props.withEventResize,\n mode: () => props.mode,\n startTime: () => props.startTime,\n endTime: () => props.endTime,\n intervalMinutes: () => props.intervalMinutes,\n onEventResize: () => props.onEventResize,\n canResizeEvent: () => props.canResizeEvent,\n })\n const slotTimes = ref<{ startTime: string; endTime: string }[]>([])\n const dayGroupRef = ref('')\n const slotDragSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () =>\n props.onSlotDragEnd\n ? (startIndex, endIndex) => {\n const startSlot = slotTimes.value[startIndex]\n const endSlot = slotTimes.value[endIndex]\n if (startSlot && endSlot) {\n props.onSlotDragEnd?.(\n `${dayGroupRef.value} ${startSlot.startTime}` as DateTimeStringValue,\n `${dayGroupRef.value} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n }\n : undefined,\n })\n\n return () => {\n const date = toDateString(props.date!)\n const datePart = dayjs(date).format('YYYY-MM-DD')\n const now = dayjs(props.getCurrentTime?.() ?? dayjs())\n const showCurrentTimeIndicator =\n props.withCurrentTimeIndicator ?? dayjs(date).isSame(now, 'day')\n const expanded = getExpandedEvents(\n props.events,\n dayjs(date).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(date).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit,\n )\n const { allDayEvents, regularEvents, backgroundTimedEvents, backgroundAllDayEvents } =\n getDayViewEvents({\n events: expanded,\n date,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n })\n const intervals = getDayTimeIntervals({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n })\n dayGroupRef.value = datePart\n slotTimes.value = intervals.map((slot) => ({\n startTime: slot.startTime,\n endTime: slot.endTime,\n }))\n const withSlotSelect = props.withDragSlotSelect && props.mode !== 'static'\n const withDragHandlers =\n props.mode !== 'static' &&\n (props.withEventsDragAndDrop || Boolean(props.onExternalEventDrop))\n const { visibleEventsCount, hiddenEventsCount } = getVisibleEvents({\n maxEvents: props.maxAllDayEvents,\n totalEvents: allDayEvents.length,\n })\n const emitDrop = (nativeEvent: DragEvent, target: string) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expanded, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.(moveEventTo(event, target))\n else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.(nativeEvent.dataTransfer, target)\n }\n const emitAllDayDrop = (nativeEvent: DragEvent) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expanded, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.(moveEventToAllDay(event, datePart))\n else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.(nativeEvent.dataTransfer, `${datePart} 00:00:00`)\n }\n const rootStyle = {\n '--day-view-radius': resolveScheduleRadius(props.radius),\n '--day-view-slot-height':\n typeof props.slotHeight === 'number' ? `${props.slotHeight}px` : props.slotHeight,\n '--day-view-all-day-slot-height':\n typeof props.allDaySlotHeight === 'number'\n ? `${props.allDaySlotHeight}px`\n : props.allDaySlotHeight,\n } as CSSProperties\n return h(\n Box,\n {\n ...attrs,\n class: [classes.dayView, attrs.class],\n style: [rootStyle, attrs.style],\n mod: { static: props.mode === 'static', 'slot-dragging': slotDragSelect.isDragging() },\n },\n () => [\n props.withHeader\n ? h(ScheduleHeaderBase, {\n view: 'day',\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n navigationHandlers: createHeaderNavigation(date, 'day'),\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: props.viewSelectProps,\n control: {\n title: formatDate({\n date,\n locale: props.locale || 'en',\n format: props.headerFormat,\n }),\n },\n })\n : null,\n h(ScrollArea.Autosize, { class: classes.dayViewScrollArea, scrollbarSize: 4 }, () => [\n h(Box, { class: classes.dayViewInner }, () => [\n h('div', { class: classes.dayViewSlotLabels }, [\n props.withAllDaySlot\n ? h(Box, { class: classes.dayViewSlotLabel, mod: { 'all-day': true } }, () =>\n getLabelSafe('allDay', props.labels),\n )\n : null,\n ...intervals\n .filter((slot) => slot.isHourStart)\n .map((slot) =>\n h(Box, { class: classes.dayViewSlotLabel }, () =>\n formatDate({\n date: `${datePart} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n }),\n ),\n ),\n ]),\n h('div', { class: classes.dayViewSlots }, [\n props.withAllDaySlot\n ? h('div', { class: classes.dayViewAllDay }, [\n ...backgroundAllDayEvents.map((event) =>\n h('div', { class: classes.dayViewBackgroundEvent, key: event.id }),\n ),\n h('div', { class: classes.dayViewAllDayEvents }, [\n ...allDayEvents\n .slice(0, visibleEventsCount)\n .map((event) =>\n eventNode(event, props, { key: event.id, nowrap: true }, slots),\n ),\n hiddenEventsCount > 0\n ? h(\n MoreEvents,\n {\n events: allDayEvents,\n moreEventsCount: hiddenEventsCount,\n labels: props.labels,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onEventClick: props.onEventClick,\n ...props.moreEventsProps,\n },\n forwardEventSlots(slots),\n )\n : null,\n ]),\n h(UnstyledButton, {\n class: classes.dayViewSlot,\n mod: { 'all-day': true, static: props.mode === 'static' },\n tabindex: props.mode === 'static' ? -1 : 0,\n 'aria-label': `${getLabelSafe('timeSlot', props.labels)} ${getLabelSafe('allDay', props.labels)}`,\n onClick:\n props.mode === 'static'\n ? undefined\n : (event: MouseEvent) => props.onAllDaySlotClick?.(date, event),\n onDragover: (event: DragEvent) => event.preventDefault(),\n onDrop: (event: DragEvent) => emitAllDayDrop(event),\n }),\n ])\n : null,\n h(\n 'div',\n {\n ref: timeSlotsContainer,\n class: classes.dayViewTimeSlots,\n onDragover: withDragHandlers\n ? (event: DragEvent) => {\n event.preventDefault()\n if (!timeSlotsContainer.value) return\n const target = getTimeSlotDropTarget({\n nativeEvent: event,\n container: timeSlotsContainer.value,\n intervals,\n date: datePart,\n })\n dropTargetSlotIndex.value = target?.slotIndex ?? null\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = event.dataTransfer.types.includes(\n 'application/json',\n )\n ? 'move'\n : 'copy'\n }\n }\n : undefined,\n onDragleave: withDragHandlers\n ? (event: DragEvent) => {\n if (\n !(event.relatedTarget instanceof Node) ||\n !timeSlotsContainer.value?.contains(event.relatedTarget)\n ) {\n dropTargetSlotIndex.value = null\n }\n }\n : undefined,\n onDrop: withDragHandlers\n ? (event: DragEvent) => {\n if (!timeSlotsContainer.value) return\n const target = getTimeSlotDropTarget({\n nativeEvent: event,\n container: timeSlotsContainer.value,\n intervals,\n date: datePart,\n })\n dropTargetSlotIndex.value = null\n if (target) emitDrop(event, target.target)\n }\n : undefined,\n },\n [\n ...backgroundTimedEvents.map((event) =>\n h('div', {\n key: event.id,\n class: classes.dayViewBackgroundEvent,\n style: {\n top: `${event.position.top}%`,\n bottom: `${100 - event.position.top - event.position.height}%`,\n minHeight: '1px',\n },\n }),\n ),\n ...regularEvents.map((event) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const isResizable = eventResize.isResizableEvent(event)\n return eventNode(\n event,\n props,\n {\n key: event.id,\n autoSize: true,\n style: {\n position: 'absolute',\n top: `${resizePosition?.top ?? event.position.top}%`,\n bottom: `${\n 100 -\n (resizePosition?.top ?? event.position.top) -\n (resizePosition?.height ?? event.position.height)\n }%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n },\n withResize: isResizable,\n isResizing: resizePosition !== null,\n onClick: props.onEventClick\n ? (nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n props.onEventClick?.(event, nativeEvent)\n }\n }\n : undefined,\n onResizeStart: (edge: 'top' | 'bottom', pointerEvent: PointerEvent) => {\n if (!timeSlotsContainer.value) return\n eventResize.handleResizeStart({\n event,\n edge,\n container: timeSlotsContainer.value,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: datePart,\n pointerEvent,\n })\n },\n },\n slots,\n )\n }),\n showCurrentTimeIndicator\n ? h(CurrentTimeIndicator, {\n startOffset: 'calc(var(--day-view-slot-labels-width) * -1)',\n endOffset: '0rem',\n topOffset: '0rem',\n timeBubbleStartOffset:\n 'calc(var(--day-view-slot-labels-width) * -1 + 30px)',\n currentTimeFormat: props.slotLabelFormat,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n withTimeBubble: props.withCurrentTimeBubble,\n withThumb: !props.withCurrentTimeBubble,\n getCurrentTime: props.getCurrentTime,\n locale: props.locale,\n })\n : null,\n ...intervals.map((slot, index) => {\n const start = dayjs(`${datePart} ${slot.startTime}`)\n const end = start.add(props.intervalMinutes, 'minute')\n const mod = props.highlightBusinessHours\n ? getBusinessHoursMod({\n time: start.format('HH:mm:ss'),\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: true,\n dayOfWeek: start.day() as import('../../types').DayOfWeek,\n })\n : { 'business-hours': false, 'non-business-hours': false }\n return h(UnstyledButton, {\n class: classes.dayViewSlot,\n 'data-time-slot-index': index,\n 'data-drag-slot-index': withSlotSelect ? index : undefined,\n 'data-drag-slot-group': withSlotSelect ? datePart : undefined,\n style: { '--slot-size': String(props.intervalMinutes / 60) },\n mod: {\n first: index === 0,\n 'hour-start': slot.isHourStart,\n static: props.mode === 'static',\n 'drop-target': dropTargetSlotIndex.value === index,\n 'drag-selected': slotDragSelect.isSlotSelected(index, datePart),\n 'business-hours': mod['business-hours'],\n 'non-business-hours': mod['non-business-hours'],\n },\n tabindex: props.mode === 'static' ? -1 : index === 0 ? 0 : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n const nextIndex =\n event.key === 'ArrowDown'\n ? index + 1\n : event.key === 'ArrowUp'\n ? index - 1\n : -1\n if (nextIndex < 0 || nextIndex >= intervals.length) return\n event.preventDefault()\n timeSlotsContainer.value\n ?.querySelector<HTMLButtonElement>(\n `[data-time-slot-index=\"${nextIndex}\"]`,\n )\n ?.focus()\n },\n 'aria-label': `${getLabelSafe('timeSlot', props.labels)} ${slot.startTime} - ${slot.endTime}`,\n onClick: (nativeEvent: MouseEvent) =>\n props.onTimeSlotClick?.({\n slotStart: start.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n slotEnd: end.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n nativeEvent,\n }),\n onPointerdown: withSlotSelect\n ? (nativeEvent: PointerEvent) =>\n slotDragSelect.handleSlotPointerDown(nativeEvent, index, datePart)\n : undefined,\n onDragover: (event: DragEvent) => event.preventDefault(),\n })\n }),\n ],\n ),\n ]),\n ]),\n ]),\n ],\n )\n }\n },\n})\n\nfunction getLabelSafe(key: 'allDay' | 'timeSlot', labels: DayViewProps['labels']) {\n const defaults = { allDay: 'All day', timeSlot: 'Time slot' }\n return labels?.[key] || defaults[key]\n}\n\nexport type { DayViewProps }\nexport type DayViewStylesNames =\n | 'dayView'\n | 'dayViewInner'\n | 'dayViewScrollArea'\n | 'dayViewAllDay'\n | 'dayViewAllDayEvents'\n | 'dayViewSlot'\n | 'dayViewSlots'\n | 'dayViewTimeSlots'\n | 'dayViewSlotLabel'\n | 'dayViewSlotLabels'\n | 'dayViewBackgroundEvent'\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, ScheduleEventData } from '../../types'\nimport { isMultidayEvent, validateEvent } from '../../utils'\n\nexport type GroupedEvents = Record<DateStringValue, ScheduleEventData[]>\n\nfunction groupEventByDate(event: ScheduleEventData, groupedEvents: GroupedEvents) {\n if (isMultidayEvent(event)) {\n const startDate = dayjs(event.start).startOf('day')\n const endDate = dayjs(event.end).startOf('day')\n\n for (\n let date = startDate;\n date.isBefore(endDate) || date.isSame(endDate);\n date = date.add(1, 'day')\n ) {\n const dateKey = date.format('YYYY-MM-DD')\n if (!groupedEvents[dateKey]) {\n groupedEvents[dateKey] = []\n }\n groupedEvents[dateKey].push(event)\n }\n\n return\n }\n\n const eventDate = dayjs(event.start).format('YYYY-MM-DD')\n if (!groupedEvents[eventDate]) {\n groupedEvents[eventDate] = []\n }\n groupedEvents[eventDate].push(event)\n}\n\ninterface GetMobileMonthViewEventsInput {\n date: AnyDateValue\n events: ScheduleEventData[] | undefined\n}\n\nexport function getMobileMonthViewEvents({ date, events }: GetMobileMonthViewEventsInput) {\n const groupedEvents: GroupedEvents = {}\n\n if (events === undefined) {\n return groupedEvents\n }\n\n const ids = new Set<string | number>()\n\n for (const event of events) {\n if (event.display === 'background') {\n continue\n }\n\n if (dayjs(event.start).isSame(dayjs(date), 'month')) {\n groupEventByDate(validateEvent(event), groupedEvents)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(\n `[@mantine/schedule] MobileMonthView: Duplicated event ids found: ${event.id}`,\n )\n }\n }\n }\n\n return groupedEvents\n}\n",".mobileMonthView {\n --mobile-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --week-numbers-offset: 0rem;\n --day-base-color: var(--mantine-color-text);\n --day-dimmed-color: alpha(var(--day-base-color), 0.5);\n\n display: flex;\n flex-direction: column;\n height: 100%;\n\n @mixin where-light {\n --mobile-month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --mobile-month-view-border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 32px;\n }\n}\n\n.mobileMonthViewHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--mantine-spacing-sm);\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n}\n\n.mobileMonthViewHeaderBackButton {\n display: flex;\n align-items: center;\n gap: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n font-size: var(--mobile-month-view-font-size);\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewHeaderLabel {\n user-select: none;\n font-weight: var(--mantine-font-weight-semibold);\n text-transform: capitalize;\n}\n\n.mobileMonthViewCalendar {\n --mobile-month-view-font-size: clamp(6px, 3.5cqw, 22px);\n\n container-type: inline-size;\n padding: var(--mantine-spacing-sm);\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n}\n\n.mobileMonthViewWeekdays {\n display: flex;\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.mobileMonthViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n}\n\n.mobileMonthViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n font-size: var(--mobile-month-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n color: var(--day-dimmed-color);\n padding-block: 4px;\n}\n\n.mobileMonthViewWeek {\n display: flex;\n}\n\n.mobileMonthViewWeekNumber {\n flex: 0 0 calc(var(--week-numbers-offset) - rem(4px));\n margin-inline-end: rem(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n border-radius: var(--mobile-month-view-radius);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewDay {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: 48px;\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n font-size: var(--mobile-month-view-font-size);\n color: var(--day-base-color);\n cursor: pointer;\n user-select: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 0;\n\n &::before {\n width: 32px;\n height: 32px;\n border-radius: 100%;\n content: '';\n position: absolute;\n top: 7px;\n left: calc(50% - 16px);\n z-index: -1;\n pointer-events: none;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:where([data-hidden]) {\n visibility: hidden;\n pointer-events: none;\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: var(--day-dimmed-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-today]:not([data-selected])) {\n @mixin where-light {\n &::before {\n background-color: var(--mantine-color-gray-2);\n }\n }\n\n @mixin where-dark {\n &::before {\n background-color: var(--mantine-color-dark-5);\n }\n }\n }\n\n &:where([data-selected]) {\n color: var(--mantine-primary-color-contrast);\n\n &::before {\n background-color: var(--mantine-primary-color-filled);\n }\n\n @mixin hover {\n &::before {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewDayIndicators {\n position: absolute;\n bottom: 2px;\n inset-inline: 0;\n display: flex;\n justify-content: center;\n padding-inline-start: 2px;\n}\n\n.mobileMonthViewDayIndicator {\n width: 5px;\n height: 5px;\n border-radius: 100%;\n margin-inline-start: -1px;\n}\n\n.mobileMonthViewEventsList {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: var(--mantine-spacing-sm);\n}\n\n.mobileMonthViewEventsHeader {\n margin-bottom: var(--mantine-spacing-sm);\n font-weight: var(--mantine-font-weight-semibold);\n text-transform: capitalize;\n}\n\n.mobileMonthViewEvent {\n display: block;\n width: 100%;\n text-align: start;\n cursor: pointer;\n\n &:where(:not(:last-child)) {\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n}\n\n.mobileMonthViewEventBody {\n display: flex;\n gap: var(--mantine-spacing-sm);\n padding: var(--mantine-spacing-xs) 0;\n}\n\n.mobileMonthViewEventColor {\n width: 4px;\n border-radius: 2px;\n flex-shrink: 0;\n}\n\n.mobileMonthViewEventTime {\n margin-top: 2px;\n font-size: var(--mantine-font-size-xs);\n color: var(--mantine-color-dimmed);\n}\n\n.mobileMonthViewNoEvents {\n color: var(--mantine-color-dimmed);\n text-align: center;\n padding-block: var(--mantine-spacing-xl);\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, watch, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport {\n AccordionChevron,\n Box,\n getThemeColor,\n Text,\n UnstyledButton,\n useDirection,\n useSafeMantineTheme,\n} from '@mantine-vue/core'\nimport type { MobileMonthViewProps } from '../../component-props'\nimport type {\n DateLabelFormat,\n DateStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleMode,\n} from '../../types'\nimport { formatDate, getMonthDays, getWeekNumber, getWeekdaysNames } from '../../utils'\nimport { baseViewProps, getExpandedEvents, resolveScheduleRadius } from '../shared'\nimport { getMobileMonthViewEvents } from './get-mobile-month-view-events'\nimport classes from './MobileMonthView.module.css'\n\nexport interface MobileMonthViewSlots {\n /** Scoped alternative to the `renderEvent` prop */\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n /** Scoped alternative to the `renderHeader` prop */\n header?: (props: {\n mode: ScheduleMode\n date: Date | DateStringValue\n defaultHeader: VNodeChild\n }) => VNodeChild\n}\n\nexport const MobileMonthView = defineComponent({\n name: 'MobileMonthView',\n inheritAttrs: false,\n slots: Object as SlotsType<MobileMonthViewSlots>,\n props: {\n ...baseViewProps,\n selectedDate: [String, Date, null] as PropType<Date | DateStringValue | null>,\n defaultSelectedDate: [String, Date, null] as PropType<Date | DateStringValue | null>,\n onSelectedDateChange: Function as PropType<MobileMonthViewProps['onSelectedDateChange']>,\n withWeekNumbers: Boolean,\n withWeekDays: { type: Boolean, default: true },\n firstDayOfWeek: { type: Number as PropType<DayOfWeek>, default: 1 },\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'dd' },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n getWeekNumberProps: Function as PropType<MobileMonthViewProps['getWeekNumberProps']>,\n getDayProps: Function as PropType<MobileMonthViewProps['getDayProps']>,\n onDayClick: Function as PropType<MobileMonthViewProps['onDayClick']>,\n onWeekNumberClick: Function as PropType<MobileMonthViewProps['onWeekNumberClick']>,\n consistentWeeks: { type: Boolean, default: true },\n highlightToday: { type: Boolean, default: true },\n withOutsideDays: Boolean,\n eventsHeaderFormat: {\n type: [String, Function] as PropType<DateLabelFormat>,\n default: 'dddd, MMMM D',\n },\n onYearClick: Function as PropType<() => void>,\n renderHeader: Function as PropType<MobileMonthViewProps['renderHeader']>,\n },\n setup(props, { attrs, slots }) {\n const { dir } = useDirection()\n const theme = useSafeMantineTheme()\n const internalSelected = ref<DateStringValue | null>(\n props.selectedDate !== undefined\n ? props.selectedDate\n ? (dayjs(props.selectedDate).format('YYYY-MM-DD') as DateStringValue)\n : null\n : (dayjs(props.defaultSelectedDate ?? dayjs()).format('YYYY-MM-DD') as DateStringValue),\n )\n watch(\n () => props.selectedDate,\n (value) => {\n if (value !== undefined) {\n internalSelected.value = value\n ? (dayjs(value).format('YYYY-MM-DD') as DateStringValue)\n : null\n }\n },\n { immediate: true },\n )\n const select = (date: DateStringValue) => {\n internalSelected.value = date\n props.onSelectedDateChange?.(date)\n }\n return () => {\n const month = dayjs(props.date).startOf('month')\n const weeks = getMonthDays({\n month,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n })\n const expanded = getExpandedEvents(\n props.events,\n weeks[0][0],\n dayjs(weeks.at(-1)!.at(-1)!).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit,\n )\n const eventsByDay = getMobileMonthViewEvents({ date: month, events: expanded })\n const weekdays = getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n firstDayOfWeek: props.firstDayOfWeek,\n })\n const selectedEvents = internalSelected.value ? eventsByDay[internalSelected.value] || [] : []\n const headerDefault: VNodeChild = [\n h(\n UnstyledButton,\n {\n class: classes.mobileMonthViewHeaderBackButton,\n mod: { static: props.mode === 'static' },\n tabindex: props.mode === 'static' ? -1 : 0,\n onClick: props.mode === 'static' ? undefined : props.onYearClick,\n },\n () => [\n h(AccordionChevron, {\n size: 20,\n style: { transform: `rotate(${dir.value === 'rtl' ? -90 : 90}deg)` },\n }),\n month.format('YYYY'),\n ],\n ),\n h(Text, { class: classes.mobileMonthViewHeaderLabel }, () =>\n formatDate({ date: month, locale: props.locale || 'en', format: 'MMMM YYYY' }),\n ),\n ]\n return h(\n Box,\n {\n ...attrs,\n class: [classes.mobileMonthView, attrs.class],\n style: [\n { '--mobile-month-view-radius': resolveScheduleRadius(props.radius) },\n attrs.style,\n ],\n mod: { 'with-week-numbers': props.withWeekNumbers },\n },\n () => [\n h('div', { class: classes.mobileMonthViewHeader }, [\n props.renderHeader?.({\n mode: props.mode,\n date: props.date!,\n defaultHeader: headerDefault,\n }) ||\n slots.header?.({\n mode: props.mode,\n date: props.date!,\n defaultHeader: headerDefault,\n }) ||\n headerDefault,\n ]),\n h(\n Box,\n {\n class: classes.mobileMonthViewCalendar,\n mod: { 'with-weekdays': props.withWeekDays },\n },\n () => [\n props.withWeekDays\n ? h('div', { class: classes.mobileMonthViewWeekdays }, [\n props.withWeekNumbers\n ? h('span', { class: classes.mobileMonthViewWeekdaysCorner })\n : null,\n ...weekdays.map((weekday) =>\n h('span', { class: classes.mobileMonthViewWeekday }, [weekday]),\n ),\n ])\n : null,\n ...weeks.map((week) =>\n h('div', { class: classes.mobileMonthViewWeek }, [\n props.withWeekNumbers\n ? h(\n UnstyledButton,\n {\n class: classes.mobileMonthViewWeekNumber,\n mod: { static: props.mode === 'static' },\n tabindex: props.mode === 'static' ? -1 : 0,\n ...props.getWeekNumberProps?.(\n dayjs(week[0]).format('YYYY-MM-DD') as DateStringValue,\n ),\n onClick: (event: MouseEvent) =>\n props.onWeekNumberClick?.(\n dayjs(week[0]).format('YYYY-MM-DD') as DateStringValue,\n event,\n ),\n },\n () => String(getWeekNumber(week)),\n )\n : null,\n ...week.map((date) => {\n const value = dayjs(date).format('YYYY-MM-DD') as DateStringValue\n const outside = !dayjs(date).isSame(month, 'month')\n const events = eventsByDay[value] || []\n const extra = props.getDayProps?.(value) || {}\n const shouldRender = !outside || props.withOutsideDays\n return h(\n UnstyledButton,\n {\n ...extra,\n class: [classes.mobileMonthViewDay, extra.class],\n mod: {\n outside,\n weekend: props.weekendDays.includes(dayjs(date).day() as DayOfWeek),\n today: props.highlightToday && dayjs(date).isSame(dayjs(), 'day'),\n selected: internalSelected.value === value,\n static: props.mode === 'static',\n hidden: !shouldRender,\n },\n tabindex: props.mode === 'static' || !shouldRender ? -1 : 0,\n 'aria-label': formatDate({\n date,\n locale: props.locale || 'en',\n format: 'MMMM D, YYYY',\n }),\n 'aria-selected': internalSelected.value === value || undefined,\n onClick:\n props.mode === 'static' || !shouldRender\n ? undefined\n : (event: MouseEvent) => {\n select(value)\n props.onDayClick?.(value, event)\n },\n },\n () => [\n shouldRender ? String(dayjs(date).date()) : null,\n shouldRender && events.length\n ? h(\n 'span',\n { class: classes.mobileMonthViewDayIndicators },\n events.slice(0, 3).map((event: ScheduleEventData) =>\n h('span', {\n class: classes.mobileMonthViewDayIndicator,\n style: {\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n },\n }),\n ),\n )\n : null,\n ],\n )\n }),\n ]),\n ),\n ],\n ),\n h(Box, { class: classes.mobileMonthViewEventsList }, () => [\n h(Text, { class: classes.mobileMonthViewEventsHeader }, () =>\n internalSelected.value\n ? formatDate({\n date: internalSelected.value,\n locale: props.locale || 'en',\n format: props.eventsHeaderFormat,\n })\n : '',\n ),\n selectedEvents.length\n ? selectedEvents.map((event: ScheduleEventData) => {\n const startTime = dayjs(event.start).format('HH:mm')\n const endTime = dayjs(event.end).format('HH:mm')\n const isAllDay = startTime === '00:00' && endTime === '00:00'\n const eventChildren = h(Box, { class: classes.mobileMonthViewEventBody }, () => [\n h('div', {\n class: classes.mobileMonthViewEventColor,\n style: { backgroundColor: getThemeColor(event.color, theme.value) },\n }),\n h('div', [\n h(Text, { class: classes.mobileMonthViewEventTitle }, () => event.title),\n h(Text, { class: classes.mobileMonthViewEventTime }, () =>\n isAllDay ? 'All day' : `${startTime} – ${endTime}`,\n ),\n ]),\n ])\n const rootProps = {\n type: 'button' as const,\n class: classes.mobileMonthViewEvent,\n tabindex: props.mode === 'static' ? -1 : 0,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => props.onEventClick?.(event, nativeEvent),\n }\n\n return (\n props.renderEvent?.(event, { ...rootProps, children: eventChildren }) ||\n slots.event?.({ ...rootProps, children: eventChildren, event }) ||\n h(UnstyledButton, { ...rootProps, key: event.id }, () => eventChildren)\n )\n })\n : h(\n Text,\n { class: classes.mobileMonthViewNoEvents },\n () => props.labels?.noEvents || 'No events',\n ),\n ]),\n ],\n )\n }\n },\n})\n\nexport type { MobileMonthViewProps }\nexport type MobileMonthViewStylesNames =\n | 'mobileMonthView'\n | 'mobileMonthViewHeader'\n | 'mobileMonthViewHeaderBackButton'\n | 'mobileMonthViewHeaderLabel'\n | 'mobileMonthViewCalendar'\n | 'mobileMonthViewWeekdays'\n | 'mobileMonthViewWeekdaysCorner'\n | 'mobileMonthViewWeekday'\n | 'mobileMonthViewWeek'\n | 'mobileMonthViewWeekNumber'\n | 'mobileMonthViewDay'\n | 'mobileMonthViewDayIndicators'\n | 'mobileMonthViewDayIndicator'\n | 'mobileMonthViewEventsList'\n | 'mobileMonthViewEventsHeader'\n | 'mobileMonthViewEvent'\n | 'mobileMonthViewEventBody'\n | 'mobileMonthViewEventColor'\n | 'mobileMonthViewEventTitle'\n | 'mobileMonthViewEventTime'\n | 'mobileMonthViewNoEvents'\n","export function handleGridKeydown({\n event,\n index,\n columns,\n total,\n getControl,\n}: {\n event: KeyboardEvent\n index: number\n columns: number\n total: number\n getControl: (index: number) => HTMLButtonElement | null\n}): void {\n const step =\n event.key === 'ArrowRight'\n ? 1\n : event.key === 'ArrowLeft'\n ? -1\n : event.key === 'ArrowDown'\n ? columns\n : event.key === 'ArrowUp'\n ? -columns\n : 0\n\n if (step === 0) return\n event.preventDefault()\n\n for (let next = index + step; next >= 0 && next < total; next += step) {\n const control = getControl(next)\n if (control && !control.disabled && !control.hasAttribute('data-hidden')) {\n control.focus()\n return\n }\n }\n}\n","import dayjs from 'dayjs'\nimport { MonthPositionedEventData } from '../../../types'\n\ninterface AddEventToDayGroupsInput {\n positionedEvent: MonthPositionedEventData\n eventStart: dayjs.Dayjs\n eventEnd: dayjs.Dayjs\n groupedByDay: { [date: string]: MonthPositionedEventData[] }\n eventsAddedToDay: Set<string>\n weekIdx: number\n}\n\nexport function addEventToDayGroups({\n positionedEvent,\n eventStart,\n eventEnd,\n groupedByDay,\n eventsAddedToDay,\n weekIdx,\n}: AddEventToDayGroupsInput): void {\n if (weekIdx === 0 || !eventsAddedToDay.has(positionedEvent.id.toString())) {\n let dayDate = eventStart\n while (dayDate.isBefore(eventEnd) || dayDate.isSame(eventEnd, 'day')) {\n const dayDateStr = dayDate.format('YYYY-MM-DD 00:00:00')\n if (groupedByDay[dayDateStr]) {\n groupedByDay[dayDateStr].push(positionedEvent)\n }\n dayDate = dayDate.add(1, 'day')\n }\n eventsAddedToDay.add(positionedEvent.id.toString())\n }\n}\n","import dayjs from 'dayjs'\n\nexport type HangingStatus = 'none' | 'start' | 'end' | 'both'\n\ninterface CalculateEventPositionInput {\n eventStart: dayjs.Dayjs\n eventEnd: dayjs.Dayjs\n weekStart: dayjs.Dayjs\n weekEnd: dayjs.Dayjs\n isMultiday: boolean\n}\n\ninterface EventPositionInWeek {\n startDayIndex: number\n daysSpanned: number\n startOffset: number\n width: number\n hanging: HangingStatus\n}\n\nexport function calculateEventPositionInWeek({\n eventStart,\n eventEnd,\n weekStart,\n weekEnd,\n isMultiday,\n}: CalculateEventPositionInput): EventPositionInWeek {\n let displayStart = eventStart\n let displayEnd = eventEnd\n\n const hangingStart = eventStart.isBefore(weekStart)\n const hangingEnd = eventEnd.isAfter(weekEnd)\n const hanging: HangingStatus =\n hangingStart && hangingEnd ? 'both' : hangingStart ? 'start' : hangingEnd ? 'end' : 'none'\n\n if (displayStart.isBefore(weekStart)) {\n displayStart = weekStart\n }\n if (displayEnd.isAfter(weekEnd)) {\n displayEnd = weekEnd\n }\n\n const startDayIndex = displayStart.diff(weekStart, 'day')\n const endDayIndex = displayEnd.diff(weekStart, 'day')\n const daysSpanned = Math.max(1, endDayIndex - startDayIndex + (isMultiday ? 1 : 0))\n\n const startOffset = (startDayIndex / 7) * 100\n const width = (daysSpanned / 7) * 100\n\n return {\n startDayIndex,\n daysSpanned,\n startOffset,\n width,\n hanging,\n }\n}\n","import dayjs from 'dayjs'\nimport { MonthPositionedEventData } from '../../../types'\n\ninterface FindAvailableRowInput {\n existingEvents: MonthPositionedEventData[]\n startDayIndex: number\n daysSpanned: number\n weekStart: dayjs.Dayjs\n}\n\nexport function findAvailableRow({\n existingEvents,\n startDayIndex,\n daysSpanned,\n weekStart,\n}: FindAvailableRowInput): number {\n let row = 0\n\n for (const existing of existingEvents) {\n const existingStart = dayjs(existing.start).startOf('day')\n const existingDisplayStart =\n existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, 'day')\n ? weekStart\n : existingStart\n const existingDayIndex = existingDisplayStart.diff(weekStart, 'day')\n const existingWidth = existing.position?.width || 0\n const existingDaysSpanned = (existingWidth / 100) * 7\n\n if (\n existingDayIndex + existingDaysSpanned > startDayIndex &&\n existingDayIndex < startDayIndex + daysSpanned\n ) {\n row = Math.max(row, (existing.position?.row || 0) + 1)\n }\n }\n\n return row\n}\n","import dayjs from 'dayjs'\nimport { DateStringValue, DayOfWeek, MonthPositionedEventData } from '../../../types'\nimport { getStartOfWeek } from '../../../utils'\n\ninterface GetWeeksInRangeInput {\n rangeStart: dayjs.Dayjs\n rangeEnd: dayjs.Dayjs\n firstDayOfWeek: DayOfWeek\n}\n\ninterface GetWeeksInRangeOutput {\n weeks: DateStringValue[][]\n groupedByDay: Record<string, MonthPositionedEventData[]>\n}\n\nexport function getWeeksInRange({\n rangeStart,\n rangeEnd,\n firstDayOfWeek,\n}: GetWeeksInRangeInput): GetWeeksInRangeOutput {\n const weeks: DateStringValue[][] = []\n const groupedByDay: Record<string, MonthPositionedEventData[]> = {}\n\n const startOfFirstWeekStr = getStartOfWeek({\n date: rangeStart.format('YYYY-MM-DD'),\n firstDayOfWeek,\n })\n\n let currentDate = dayjs(startOfFirstWeekStr)\n\n while (currentDate.isBefore(rangeEnd) || currentDate.isSame(rangeEnd, 'day')) {\n const week: DateStringValue[] = []\n for (let i = 0; i < 7; i++) {\n const dateStr = currentDate.format('YYYY-MM-DD 00:00:00')\n week.push(dateStr)\n if (!groupedByDay[dateStr]) {\n groupedByDay[dateStr] = []\n }\n currentDate = currentDate.add(1, 'day')\n }\n weeks.push(week)\n }\n\n return { weeks, groupedByDay }\n}\n","import dayjs from 'dayjs'\nimport {\n AnyDateValue,\n DateStringValue,\n DayOfWeek,\n MonthPositionedEventData,\n ScheduleEventData,\n} from '../../../types'\nimport { addEventToDayGroups } from './add-event-to-day-groups'\nimport { calculateEventPositionInWeek } from './calculate-event-position-in-week'\nimport { findAvailableRow } from './find-available-row'\nimport { getWeeksInRange } from './get-weeks-in-range'\n\ninterface GetMonthPositionedEventsInput {\n /** Date (month start) at which events are positioned */\n date: AnyDateValue\n\n /** List of all events that belong to the given month, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** Range of dates for which events should be displayed (includes outside days if withOutsideDays is true) */\n range?: {\n start: DateStringValue\n end: DateStringValue\n }\n}\n\n/** Events grouped by week index and by day */\nexport interface GroupedMonthEvents {\n /** Events grouped by week index (index within month) */\n groupedByWeek: {\n [weekIndex: string]: MonthPositionedEventData[]\n }\n\n /** Events grouped by day (YYYY-MM-DD format) */\n groupedByDay: {\n [date: string]: MonthPositionedEventData[]\n }\n\n /** Background events grouped by week index */\n backgroundByWeek: {\n [weekIndex: string]: MonthPositionedEventData[]\n }\n}\n\nexport function getMonthPositionedEvents({\n date,\n events,\n firstDayOfWeek = 1,\n range,\n}: GetMonthPositionedEventsInput): GroupedMonthEvents {\n const groupedByWeek: GroupedMonthEvents['groupedByWeek'] = {}\n const backgroundByWeek: GroupedMonthEvents['backgroundByWeek'] = {}\n const eventsAddedToDay = new Set<string>()\n\n const rangeStart = range ? dayjs(range.start) : dayjs(date).startOf('month')\n const rangeEnd = range ? dayjs(range.end) : dayjs(date).startOf('month').endOf('month')\n\n const { weeks, groupedByDay } = getWeeksInRange({\n rangeStart,\n rangeEnd,\n firstDayOfWeek,\n })\n\n for (let i = 0; i < weeks.length; i++) {\n groupedByWeek[i.toString()] = []\n backgroundByWeek[i.toString()] = []\n }\n\n for (const event of events) {\n const eventStart = dayjs(event.start).startOf('day')\n const rawEnd = dayjs(event.end)\n const endAtMidnight = rawEnd.hour() === 0 && rawEnd.minute() === 0 && rawEnd.second() === 0\n const eventEnd = endAtMidnight\n ? rawEnd.startOf('day').subtract(1, 'day')\n : rawEnd.startOf('day')\n const isMultiday = eventEnd.isAfter(eventStart)\n\n for (let weekIdx = 0; weekIdx < weeks.length; weekIdx++) {\n const week = weeks[weekIdx]\n const weekStart = dayjs(week[0]).startOf('day')\n const weekEnd = dayjs(week[6]).endOf('day')\n\n if (\n (eventStart.isBefore(weekEnd) || eventStart.isSame(weekEnd, 'day')) &&\n (eventEnd.isAfter(weekStart) || eventEnd.isSame(weekStart, 'day'))\n ) {\n const { startDayIndex, daysSpanned, startOffset, width, hanging } =\n calculateEventPositionInWeek({\n eventStart,\n eventEnd,\n weekStart,\n weekEnd,\n isMultiday,\n })\n\n if (event.display === 'background') {\n backgroundByWeek[weekIdx.toString()].push({\n ...event,\n position: {\n startOffset,\n width,\n weekIndex: weekIdx,\n row: 0,\n hanging,\n },\n })\n continue\n }\n\n const row = findAvailableRow({\n existingEvents: groupedByWeek[weekIdx.toString()],\n startDayIndex,\n daysSpanned,\n weekStart,\n })\n\n const positionedEvent: MonthPositionedEventData = {\n ...event,\n position: {\n startOffset,\n width,\n weekIndex: weekIdx,\n row,\n hanging,\n },\n }\n\n groupedByWeek[weekIdx.toString()].push(positionedEvent)\n\n addEventToDayGroups({\n positionedEvent,\n eventStart,\n eventEnd,\n groupedByDay,\n eventsAddedToDay,\n weekIdx,\n })\n }\n }\n }\n\n return {\n groupedByWeek,\n groupedByDay,\n backgroundByWeek,\n }\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../../types'\nimport { getMonthRange, validateEvent } from '../../../utils'\nimport { getMonthPositionedEvents, GroupedMonthEvents } from './get-month-positioned-events'\n\ninterface UseMonthViewEventsInput {\n /** Date (month start) at which events are positioned */\n date: AnyDateValue\n\n /** List of all events that belong to the given month, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[] | undefined\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** If true, events for outside days are included */\n withOutsideDays?: boolean\n\n /** If true, month will show events for consistent number of weeks (6) */\n consistentWeeks?: boolean\n}\n\nexport function getMonthViewEvents({\n date,\n events,\n firstDayOfWeek = 1,\n withOutsideDays,\n consistentWeeks,\n}: UseMonthViewEventsInput): GroupedMonthEvents {\n if (events === undefined) {\n return { groupedByDay: {}, groupedByWeek: {}, backgroundByWeek: {} }\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n\n const range = getMonthRange({ month: date, withOutsideDays, consistentWeeks, firstDayOfWeek })\n\n for (const event of events) {\n if (\n dayjs(event.end).isAfter(range.start, 'day') ||\n dayjs(event.start).isBefore(range.end, 'day')\n ) {\n filteredEvents.push(validateEvent(event))\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] MonthView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return getMonthPositionedEvents({\n date,\n events: filteredEvents,\n firstDayOfWeek,\n range,\n })\n}\n","import { DateStringValue, MonthEventPositionData, MonthPositionedEventData } from '../../types'\n\nconst DAYS_IN_WEEK = 7\nconst DAY_WIDTH = 100 / DAYS_IN_WEEK\n\ninterface GetRenderableMonthEventSegmentsInput {\n events: MonthPositionedEventData[]\n groupedByDay: Record<string, MonthPositionedEventData[]>\n maxEventsPerDay: number\n week: DateStringValue[]\n}\n\ninterface EventDayRange {\n startDayIndex: number\n endDayIndex: number\n}\n\ninterface SegmentRange extends EventDayRange {\n row: number\n}\n\nexport interface RenderableMonthEventSegment {\n event: MonthPositionedEventData\n position: MonthEventPositionData\n clipStart: boolean\n clipEnd: boolean\n key: string\n}\n\nfunction getEventDayRange(event: MonthPositionedEventData): EventDayRange {\n const startDayIndex = Math.max(0, Math.round(event.position.startOffset / DAY_WIDTH))\n const daysSpanned = Math.max(1, Math.round(event.position.width / DAY_WIDTH))\n\n return {\n startDayIndex,\n endDayIndex: Math.min(DAYS_IN_WEEK - 1, startDayIndex + daysSpanned - 1),\n }\n}\n\nfunction getFirstAvailableRow(usedRows: Set<number>, maxEventsPerDay: number): number | null {\n for (let row = 0; row < maxEventsPerDay; row += 1) {\n if (!usedRows.has(row)) {\n return row\n }\n }\n\n return null\n}\n\nfunction getSegmentHanging(\n originalHanging: MonthEventPositionData['hanging'],\n touchesStart: boolean,\n touchesEnd: boolean,\n): MonthEventPositionData['hanging'] {\n const hangsFromStart = touchesStart && (originalHanging === 'start' || originalHanging === 'both')\n const hangsFromEnd = touchesEnd && (originalHanging === 'end' || originalHanging === 'both')\n\n if (hangsFromStart && hangsFromEnd) {\n return 'both'\n }\n\n if (hangsFromStart) {\n return 'start'\n }\n\n if (hangsFromEnd) {\n return 'end'\n }\n\n return 'none'\n}\n\nfunction getSegmentPosition(\n event: MonthPositionedEventData,\n segment: SegmentRange,\n eventRange: EventDayRange,\n): MonthEventPositionData {\n const touchesStart = segment.startDayIndex === eventRange.startDayIndex\n const touchesEnd = segment.endDayIndex === eventRange.endDayIndex\n\n return {\n ...event.position,\n startOffset: (segment.startDayIndex / DAYS_IN_WEEK) * 100,\n width: ((segment.endDayIndex - segment.startDayIndex + 1) / DAYS_IN_WEEK) * 100,\n row: segment.row,\n hanging: getSegmentHanging(event.position.hanging, touchesStart, touchesEnd),\n }\n}\n\nfunction getEventKey(event: MonthPositionedEventData): string | number {\n return event.id\n}\n\nexport function getRenderableMonthEventSegments({\n events,\n groupedByDay,\n maxEventsPerDay,\n week,\n}: GetRenderableMonthEventSegmentsInput): RenderableMonthEventSegment[] {\n const eventIndexes = new Map<MonthPositionedEventData, number>()\n const eventRanges = new Map<MonthPositionedEventData, EventDayRange>()\n const renderRows = new Map<MonthPositionedEventData, Map<number, number>>()\n\n events.forEach((event, index) => {\n eventIndexes.set(event, index)\n eventRanges.set(event, getEventDayRange(event))\n })\n\n const setRenderRow = (event: MonthPositionedEventData, dayIndex: number, row: number) => {\n if (!renderRows.has(event)) {\n renderRows.set(event, new Map())\n }\n\n renderRows.get(event)!.set(dayIndex, row)\n }\n\n for (let dayIndex = 0; dayIndex < week.length; dayIndex += 1) {\n const dayEvents = groupedByDay[week[dayIndex]] || []\n const dayEventIds = new Set(dayEvents.map((event) => getEventKey(event)))\n const dayWeekEvents = events.filter((event) => {\n const range = eventRanges.get(event)!\n return (\n dayEventIds.has(getEventKey(event)) &&\n dayIndex >= range.startDayIndex &&\n dayIndex <= range.endDayIndex\n )\n })\n\n if (dayEvents.length > maxEventsPerDay) {\n dayWeekEvents.forEach((event) => {\n if (event.position.row < maxEventsPerDay) {\n setRenderRow(event, dayIndex, event.position.row)\n }\n })\n\n continue\n }\n\n const usedRows = new Set<number>()\n const sortedDayEvents = [...dayWeekEvents].sort((a, b) => {\n const rowDiff = a.position.row - b.position.row\n\n if (rowDiff !== 0) {\n return rowDiff\n }\n\n return eventIndexes.get(a)! - eventIndexes.get(b)!\n })\n\n sortedDayEvents.forEach((event) => {\n let row = event.position.row\n\n if (row >= maxEventsPerDay || usedRows.has(row)) {\n const availableRow = getFirstAvailableRow(usedRows, maxEventsPerDay)\n\n if (availableRow === null) {\n return\n }\n\n row = availableRow\n }\n\n usedRows.add(row)\n setRenderRow(event, dayIndex, row)\n })\n }\n\n return events.flatMap((event) => {\n const eventRange = eventRanges.get(event)!\n const eventRenderRows = renderRows.get(event)\n const segments: RenderableMonthEventSegment[] = []\n let currentSegment: SegmentRange | null = null\n\n const addSegment = (segment: SegmentRange) => {\n const position = getSegmentPosition(event, segment, eventRange)\n\n segments.push({\n event,\n position,\n clipStart: segment.startDayIndex > eventRange.startDayIndex,\n clipEnd: segment.endDayIndex < eventRange.endDayIndex,\n key: `${event.id}-${event.position.weekIndex}-${segment.startDayIndex}-${segment.endDayIndex}-${segment.row}`,\n })\n }\n\n for (\n let dayIndex = eventRange.startDayIndex;\n dayIndex <= eventRange.endDayIndex;\n dayIndex += 1\n ) {\n const row = eventRenderRows?.get(dayIndex)\n\n if (row === undefined) {\n if (currentSegment) {\n addSegment(currentSegment)\n currentSegment = null\n }\n\n continue\n }\n\n if (currentSegment && currentSegment.row === row) {\n currentSegment.endDayIndex = dayIndex\n } else {\n if (currentSegment) {\n addSegment(currentSegment)\n }\n\n currentSegment = {\n startDayIndex: dayIndex,\n endDayIndex: dayIndex,\n row,\n }\n }\n }\n\n if (currentSegment) {\n addSegment(currentSegment)\n }\n\n return segments\n })\n}\n",".monthView {\n --week-numbers-offset: 0rem;\n --month-view-border: 1px solid var(--month-view-border-color);\n --month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --day-base-color: var(--mantine-color-text);\n --min-day-width: 84px;\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 42px;\n }\n\n @mixin where-light {\n --month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --month-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.monthViewWeekdays {\n display: flex;\n}\n\n.monthViewWeek {\n display: flex;\n position: relative;\n min-width: calc(var(--min-day-width) * 7 + var(--week-numbers-offset));\n}\n\n.monthViewWeekNumber {\n flex: 0 0 var(--week-numbers-offset);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n padding: 4px;\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n\n :where(.monthViewWeek:first-child) & {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-weekdays] .monthView) & {\n border-start-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n border-end-start-radius: var(--month-view-radius);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.monthViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n min-width: var(--min-day-width);\n height: 36px;\n font-size: var(--mantine-font-size-sm);\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n\n &:where(:first-child) {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-week-numbers] .monthView) & {\n border-start-start-radius: 0;\n }\n }\n\n &:where(:last-child) {\n border-inline-end: var(--month-view-border);\n border-start-end-radius: var(--month-view-radius);\n }\n}\n\n.monthViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n border-block-start: var(--month-view-border);\n border-inline-start: var(--month-view-border);\n border-start-start-radius: var(--month-view-radius);\n}\n\n.monthViewDay {\n min-width: var(--min-day-width);\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: calc(52px + var(--month-view-max-events, 2) * 24px);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n color: var(--day-base-color);\n cursor: pointer;\n display: flex;\n align-items: flex-start;\n position: relative;\n\n &:where(:last-child) {\n border-inline-end: var(--month-view-border);\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n border-end-end-radius: var(--month-view-radius);\n }\n\n :where(.monthViewWeek:first-child) & {\n border-start-end-radius: var(--month-view-radius);\n\n :where(:not([data-with-weekdays])) .monthView & {\n border-start-end-radius: var(--month-view-radius);\n }\n }\n }\n\n &:where(:first-of-type) {\n :where(.monthViewWeek:first-child) & {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-week-numbers]) .monthView & {\n border-start-start-radius: 0;\n }\n\n :where([data-with-weekdays]) .monthView & {\n border-start-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-end-start-radius: var(--month-view-radius);\n }\n\n :where([data-with-week-numbers]) .monthViewWeek:last-child & {\n border-end-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: alpha(var(--day-base-color), 0.4);\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n\n @mixin hover {\n &:where(:not([data-static])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n}\n\n.monthViewDayLabel {\n width: 26px;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n\n &:where([data-today]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n\n.monthViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--month-view-radius);\n background-color: var(--bg-event-bg);\n top: 0;\n bottom: -21px;\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.monthViewEvents {\n position: absolute;\n inset-inline: 0;\n inset-inline-start: var(--week-numbers-offset);\n top: 30px;\n bottom: 22px;\n pointer-events: none;\n z-index: 3;\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, type PropType, type SlotsType } from 'vue'\nimport { Box, ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport type { DateLabelFormat, DayOfWeek } from '../../types'\nimport type { MonthViewProps } from '../../component-props'\nimport {\n calculateMonthDropDate,\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { MoreEvents } from '../MoreEvents/MoreEvents'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n baseViewProps,\n eventNode,\n forwardEventSlots,\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n resolveScheduleRadius,\n type EventSlots,\n} from '../shared'\nimport { getMonthViewEvents } from './get-month-view-events/get-month-view-events'\nimport { getRenderableMonthEventSegments } from './get-renderable-month-event-segments'\nimport classes from './MonthView.module.css'\n\nexport const MonthView = defineComponent({\n name: 'MonthView',\n inheritAttrs: false,\n slots: Object as SlotsType<EventSlots>,\n props: {\n ...baseViewProps,\n firstDayOfWeek: { type: Number as PropType<DayOfWeek>, default: 1 },\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'ddd' },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n withWeekNumbers: Boolean,\n withWeekDays: { type: Boolean, default: true },\n consistentWeeks: { type: Boolean, default: true },\n highlightToday: { type: Boolean, default: true },\n withOutsideDays: { type: Boolean, default: true },\n maxEventsPerDay: { type: Number, default: 2 },\n getDayProps: Function as PropType<MonthViewProps['getDayProps']>,\n getWeekNumberProps: Function as PropType<MonthViewProps['getWeekNumberProps']>,\n onDayClick: Function as PropType<MonthViewProps['onDayClick']>,\n onWeekNumberClick: Function as PropType<MonthViewProps['onWeekNumberClick']>,\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<MonthViewProps['onEventDrop']>,\n canDragEvent: Function as PropType<MonthViewProps['canDragEvent']>,\n onEventDragStart: Function as PropType<MonthViewProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<MonthViewProps['onEventDragEnd']>,\n onExternalEventDrop: Function as PropType<MonthViewProps['onExternalEventDrop']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<MonthViewProps['onSlotDragEnd']>,\n },\n setup(props, { attrs, slots }) {\n const monthGrid = ref<HTMLElement | null>(null)\n const dropTarget = ref<string | null>(null)\n const monthGroup = 'month'\n const flatDays = ref<string[]>([])\n const slotDragSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () =>\n props.onSlotDragEnd\n ? (startIndex, endIndex) => {\n const startDay = flatDays.value[startIndex]\n const endDay = flatDays.value[endIndex]\n if (startDay && endDay) {\n props.onSlotDragEnd?.(\n dayjs(startDay).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(endDay).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n )\n }\n }\n : undefined,\n })\n return () => {\n const month = dayjs(props.date).startOf('month')\n const maxEventsPerDay = Math.min(10, Math.max(1, props.maxEventsPerDay))\n const weeks = getMonthDays({\n month,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n })\n flatDays.value = weeks.flat().map((date) => toDateString(date))\n const firstFocusableDayIndex = weeks\n .flat()\n .findIndex((date) => props.withOutsideDays || dayjs(date).isSame(month, 'month'))\n const withSlotSelect = props.withDragSlotSelect && props.mode !== 'static'\n const rangeStart = weeks[0][0]\n const rangeEnd = weeks.at(-1)!.at(-1)!\n const expanded = getExpandedEvents(\n props.events,\n rangeStart,\n dayjs(rangeEnd).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit,\n )\n const grouped = getMonthViewEvents({\n date: month,\n events: expanded,\n firstDayOfWeek: props.firstDayOfWeek,\n withOutsideDays: props.withOutsideDays,\n consistentWeeks: props.consistentWeeks,\n })\n const weekdays = getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n firstDayOfWeek: props.firstDayOfWeek,\n })\n const withDragHandlers =\n props.mode !== 'static' &&\n (props.withEventsDragAndDrop || Boolean(props.onExternalEventDrop))\n const dragOver = (nativeEvent: DragEvent, date: string) => {\n nativeEvent.preventDefault()\n dropTarget.value = toDateString(date)\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.dropEffect = nativeEvent.dataTransfer.types.includes(\n 'application/json',\n )\n ? 'move'\n : 'copy'\n }\n }\n const dragLeave = (nativeEvent: DragEvent) => {\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !monthGrid.value?.contains(nativeEvent.relatedTarget)\n ) {\n dropTarget.value = null\n }\n }\n const drop = (nativeEvent: DragEvent, date: string) => {\n nativeEvent.preventDefault()\n dropTarget.value = null\n const event = getDropEvent(expanded, nativeEvent.dataTransfer)\n if (event) {\n const { start } = calculateMonthDropDate({\n draggedEvent: event,\n targetDay: toDateString(date),\n })\n props.onEventDrop?.(moveEventTo(event, start))\n } else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.(nativeEvent.dataTransfer, toDateString(date))\n }\n return h(\n Box,\n {\n ...attrs,\n class: [classes.monthView, attrs.class],\n style: [\n {\n '--month-view-radius': resolveScheduleRadius(props.radius),\n '--month-view-max-events': String(maxEventsPerDay),\n },\n attrs.style,\n ],\n mod: {\n 'with-week-numbers': props.withWeekNumbers,\n 'with-weekdays': props.withWeekDays,\n static: props.mode === 'static',\n 'slot-dragging': slotDragSelect.isDragging(),\n },\n },\n () => [\n props.withHeader\n ? h(ScheduleHeaderBase, {\n view: 'month',\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n navigationHandlers: createHeaderNavigation(props.date!, 'month'),\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: props.viewSelectProps,\n control: {\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.month(),\n yearValue: month.year(),\n onMonthChange: (value: number) =>\n props.onDateChange?.(toDateString(month.month(value))),\n onYearChange: (value: number) =>\n props.onDateChange?.(toDateString(month.year(value))),\n },\n },\n })\n : null,\n h(ScrollArea, { class: classes.monthViewScrollArea, scrollbarSize: 4 }, () =>\n h('div', { ref: monthGrid, class: classes.monthViewInner }, [\n props.withWeekDays\n ? h('div', { class: classes.monthViewWeekdays }, [\n props.withWeekNumbers\n ? h('div', { class: classes.monthViewWeekdaysCorner })\n : null,\n ...weekdays.map((weekday) =>\n h('div', { class: classes.monthViewWeekday }, [weekday]),\n ),\n ])\n : null,\n ...weeks.map((week, weekIndex) => {\n const segments = getRenderableMonthEventSegments({\n events: grouped.groupedByWeek[String(weekIndex)] || [],\n groupedByDay: grouped.groupedByDay,\n maxEventsPerDay,\n week,\n })\n return h('div', { class: classes.monthViewWeek }, [\n props.withWeekNumbers\n ? h(\n UnstyledButton,\n {\n type: 'button',\n class: classes.monthViewWeekNumber,\n ...props.getWeekNumberProps?.(toDateString(week[0])),\n onClick: (event: MouseEvent) =>\n props.onWeekNumberClick?.(toDateString(week[0]), event),\n },\n () => String(getWeekNumber(week)),\n )\n : null,\n ...week.map((date, dayIndex) => {\n const dateKey = dayjs(date).format('YYYY-MM-DD 00:00:00')\n const dayProps = props.getDayProps?.(toDateString(date)) || {}\n const events = grouped.groupedByDay[dateKey] || []\n const hiddenCount = Math.max(0, events.length - maxEventsPerDay)\n const outside = !dayjs(date).isSame(month, 'month')\n const gridIndex = weekIndex * 7 + dayIndex\n return h(\n 'div',\n {\n class: classes.monthViewDay,\n 'data-outside': outside || undefined,\n 'data-weekend':\n props.weekendDays.includes(dayjs(date).day() as DayOfWeek) || undefined,\n 'data-static': props.mode === 'static' || undefined,\n 'data-drop-target': dropTarget.value === toDateString(date) || undefined,\n 'data-drag-selected':\n slotDragSelect.isSlotSelected(gridIndex, monthGroup) || undefined,\n 'data-drag-slot-index': withSlotSelect ? gridIndex : undefined,\n 'data-drag-slot-group': withSlotSelect ? monthGroup : undefined,\n onPointerdown: withSlotSelect\n ? (event: PointerEvent) =>\n slotDragSelect.handleSlotPointerDown(event, gridIndex, monthGroup)\n : undefined,\n onDragover: withDragHandlers\n ? (event: DragEvent) => dragOver(event, date)\n : (event: DragEvent) => event.preventDefault(),\n onDragleave: withDragHandlers ? dragLeave : undefined,\n onDrop: (event: DragEvent) => drop(event, date),\n },\n [\n h(\n UnstyledButton,\n {\n type: 'button',\n ...dayProps,\n class: [classes.monthViewDayLabel, dayProps.class],\n disabled: props.mode === 'static',\n 'data-grid-index': gridIndex,\n 'data-outside': outside || undefined,\n 'data-hidden': (outside && !props.withOutsideDays) || undefined,\n 'aria-label': formatDate({\n date,\n locale: props.locale || 'en',\n format: 'MMMM D, YYYY',\n }),\n 'data-today':\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) ||\n undefined,\n onClick: (event: MouseEvent) =>\n props.onDayClick?.(toDateString(date), event),\n tabindex:\n props.mode === 'static'\n ? -1\n : gridIndex === firstFocusableDayIndex\n ? 0\n : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n handleGridKeydown({\n event,\n index: gridIndex,\n columns: 7,\n total: weeks.length * 7,\n getControl: (index) =>\n monthGrid.value?.querySelector<HTMLButtonElement>(\n `[data-grid-index=\"${index}\"]:not([data-hidden])`,\n ) ?? null,\n })\n dayProps.onKeydown?.(event)\n },\n },\n () =>\n outside && !props.withOutsideDays ? '' : String(dayjs(date).date()),\n ),\n hiddenCount > 0\n ? h(\n MoreEvents,\n {\n events,\n moreEventsCount: hiddenCount,\n labels: props.labels,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onEventClick: props.onEventClick,\n mode: props.mode,\n },\n forwardEventSlots(slots),\n )\n : null,\n ],\n )\n }),\n h(\n 'div',\n { class: classes.monthViewEvents },\n segments.map((segment) =>\n eventNode(\n segment.event,\n props,\n {\n key: segment.key,\n nowrap: true,\n hanging: segment.position.hanging,\n 'data-clip-start': segment.clipStart || undefined,\n 'data-clip-end': segment.clipEnd || undefined,\n style: {\n position: 'absolute',\n insetInlineStart: `${segment.position.startOffset}%`,\n width: `${segment.position.width}%`,\n top: `${28 + segment.position.row * 22}px`,\n },\n },\n slots,\n ),\n ),\n ),\n ])\n }),\n ]),\n ),\n ],\n )\n }\n },\n})\n\nexport type { MonthViewProps }\nexport type MonthViewStylesNames =\n | 'monthView'\n | 'monthViewWeekdays'\n | 'monthViewWeek'\n | 'monthViewWeekNumber'\n | 'monthViewWeekday'\n | 'monthViewWeekdaysCorner'\n | 'monthViewDay'\n | 'monthViewDayLabel'\n | 'monthViewBackgroundEvent'\n | 'monthViewEvents'\n","import dayjs from 'dayjs'\nimport type { VNodeChild } from 'vue'\nimport { DateLabelFormat, DateStringValue } from '../../../types'\nimport { formatDate } from '../../../utils'\n\ninterface GetWeekLabelInput {\n weekdays: Date[] | string[]\n locale: string\n weekLabelFormat: DateLabelFormat\n renderWeekLabel?: (params: { weekStart: DateStringValue; weekEnd: DateStringValue }) => VNodeChild\n}\n\nexport function getWeekLabel({\n weekdays,\n locale,\n weekLabelFormat,\n renderWeekLabel,\n}: GetWeekLabelInput) {\n if (renderWeekLabel) {\n return renderWeekLabel({\n weekStart: dayjs(weekdays[0]).format('YYYY-MM-DD'),\n weekEnd: dayjs(weekdays[weekdays.length - 1]).format('YYYY-MM-DD'),\n })\n }\n\n return `${formatDate({\n locale,\n date: weekdays[0],\n format: weekLabelFormat,\n })} – ${formatDate({\n locale,\n date: weekdays[weekdays.length - 1],\n format: weekLabelFormat,\n })}, ${formatDate({ locale, date: weekdays[0], format: 'YYYY' })}`\n}\n","import { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../../types'\nimport { isEventInTimeRange, isWithinWeek, validateEvent } from '../../../utils'\n\nexport interface FilterWeekViewEventsInput {\n /** Date (week start) at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given week, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[] | undefined\n\n /** Start time of the week view, used to calculate event positions */\n startTime?: string\n\n /** End time of the week view, used to calculate event positions */\n endTime?: string\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function filterWeekViewEvents({\n date,\n events,\n startTime,\n endTime,\n firstDayOfWeek = 1,\n}: FilterWeekViewEventsInput): ScheduleEventData[] {\n if (events === undefined) {\n return []\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n\n for (const event of events) {\n if (\n isWithinWeek({ event, targetWeek: date, firstDayOfWeek }) &&\n isEventInTimeRange({ event, startTime, endTime })\n ) {\n filteredEvents.push(validateEvent(event))\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] WeekView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return filteredEvents\n}\n","import { ScheduleEventData, WeekPositionedEventData } from '../../../types'\nimport { isEventsOverlap } from '../../../utils'\n\nexport function assignEventRows(events: WeekPositionedEventData[]): Map<ScheduleEventData, number> {\n const eventRows = new Map<ScheduleEventData, number>()\n\n for (const event of events) {\n let row = 0\n\n while (true) {\n let hasConflict = false\n\n for (const [otherEvent, otherRow] of eventRows.entries()) {\n if (otherRow === row && isEventsOverlap(event, otherEvent)) {\n hasConflict = true\n break\n }\n }\n\n if (!hasConflict) {\n break\n }\n\n row++\n }\n\n eventRows.set(event, row)\n }\n\n return eventRows\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface CalculateAllDayEventOffsetInput {\n eventStartDate: Dayjs\n weekStartDate: Dayjs\n weekDays: DateStringValue[]\n visibleDaysCount: number\n hangingStart: boolean\n}\n\nexport function calculateAllDayEventOffset({\n eventStartDate,\n weekStartDate,\n weekDays,\n visibleDaysCount,\n hangingStart,\n}: CalculateAllDayEventOffsetInput): number {\n let displayStartDate = eventStartDate\n\n if (hangingStart) {\n displayStartDate = weekStartDate\n }\n\n if (!weekDays.some((day) => dayjs(day).isSame(displayStartDate, 'day'))) {\n displayStartDate = dayjs(weekDays[0])\n }\n\n const visibleDaysBeforeEvent =\n weekDays.filter(\n (day) => dayjs(day).isBefore(displayStartDate) || dayjs(day).isSame(displayStartDate, 'day'),\n ).length - 1\n\n return (visibleDaysBeforeEvent / visibleDaysCount) * 100\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface CalculateAllDayEventWidthInput {\n eventStartDate: Dayjs\n actualEndDate: Dayjs\n weekStartDate: Dayjs\n weekEndDate: Dayjs\n weekDays: DateStringValue[]\n visibleDaysCount: number\n}\n\nexport function calculateAllDayEventWidth({\n eventStartDate,\n actualEndDate,\n weekStartDate,\n weekEndDate,\n weekDays,\n visibleDaysCount,\n}: CalculateAllDayEventWidthInput): number {\n let displayStartDate = eventStartDate\n if (eventStartDate.isBefore(weekStartDate)) {\n displayStartDate = weekStartDate\n }\n\n let displayEndDate = actualEndDate\n if (actualEndDate.isAfter(weekEndDate)) {\n displayEndDate = weekEndDate\n }\n\n const visibleDaysSpanned = weekDays.filter(\n (day) =>\n (dayjs(day).isAfter(displayStartDate) || dayjs(day).isSame(displayStartDate, 'day')) &&\n (dayjs(day).isBefore(displayEndDate) || dayjs(day).isSame(displayEndDate, 'day')),\n ).length\n\n return (visibleDaysSpanned / visibleDaysCount) * 100\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue, ScheduleEventData } from '../../../types'\n\ninterface CalculateEventDaysInput {\n event: ScheduleEventData\n weekDays: DateStringValue[]\n actualEndDate: Dayjs\n}\n\nexport function calculateEventDays({ event, weekDays, actualEndDate }: CalculateEventDaysInput) {\n const eventStartDate = dayjs(event.start).startOf('day')\n\n return weekDays.filter((day) => {\n const dayDate = dayjs(day).startOf('day')\n return (\n (dayDate.isAfter(eventStartDate) || dayDate.isSame(eventStartDate)) &&\n (dayDate.isBefore(actualEndDate) || dayDate.isSame(actualEndDate))\n )\n })\n}\n","import { WeekPositionedEventData } from '../../../types'\nimport { isEventsOverlap } from '../../../utils'\n\nexport function calculateRegularEventOverlaps(events: WeekPositionedEventData[]): void {\n for (const event of events) {\n let maxOverlappingColumn = event.position.column\n\n for (const otherEvent of events) {\n if (isEventsOverlap(event, otherEvent)) {\n maxOverlappingColumn = Math.max(maxOverlappingColumn, otherEvent.position.column)\n }\n }\n\n const overlaps = maxOverlappingColumn + 1\n event.position.overlaps = overlaps\n event.position.width = 100 / overlaps\n event.position.offset = (event.position.column * 100) / overlaps\n }\n}\n","import { DateStringValue, ScheduleEventData } from '../../../types'\nimport { isAllDayEvent, isEventsOverlap } from '../../../utils'\n\ninterface FindAvailableColumnInput {\n columns: Map<string, ScheduleEventData[]>\n event: ScheduleEventData\n allDay: boolean\n allWeekDays: DateStringValue[]\n}\n\nfunction columnHasConflict({\n columns,\n columnIndex,\n event,\n allDay,\n allWeekDays,\n}: FindAvailableColumnInput & { columnIndex: number }): boolean {\n const columnKey = `col-${columnIndex}`\n if (!columns.has(columnKey)) {\n return false\n }\n\n const columnEvents = columns.get(columnKey)!\n\n return columnEvents.some((e) => {\n const eAllDay = allWeekDays.some((day) => isAllDayEvent({ event: e, date: day }))\n const hasTimeConflict = isEventsOverlap(e, event)\n\n if (allDay && eAllDay) {\n return hasTimeConflict\n }\n\n if (allDay || eAllDay) {\n return false\n }\n\n return hasTimeConflict\n })\n}\n\nexport function findAvailableColumn(input: FindAvailableColumnInput): number {\n let column = 0\n\n while (columnHasConflict({ ...input, columnIndex: column })) {\n column++\n }\n\n return column\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../../types'\n\nexport function getEventEndDate(event: ScheduleEventData) {\n const eventEndDate = dayjs(event.end).startOf('day')\n\n if (dayjs(event.end).hour() === 0 && dayjs(event.end).minute() === 0) {\n return eventEndDate.subtract(1, 'day')\n }\n\n return eventEndDate\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface GetHangingStatusInput {\n eventStartDate: Dayjs\n actualEndDate: Dayjs\n weekDays: DateStringValue[]\n}\n\nexport function getHangingStatus({\n eventStartDate,\n actualEndDate,\n weekDays,\n}: GetHangingStatusInput): 'start' | 'end' | 'both' | 'none' {\n const weekStartDate = dayjs(weekDays[0])\n const weekEndDate = dayjs(weekDays[weekDays.length - 1])\n\n const hangingStart = eventStartDate.isBefore(weekStartDate)\n const hangingEnd = actualEndDate.isAfter(weekEndDate)\n\n if (hangingStart && hangingEnd) {\n return 'both'\n }\n\n if (hangingStart) {\n return 'start'\n }\n\n if (hangingEnd) {\n return 'end'\n }\n\n return 'none'\n}\n","import dayjs from 'dayjs'\nimport {\n AnyDateValue,\n DateStringValue,\n DayOfWeek,\n ScheduleEventData,\n WeekPositionedEventData,\n} from '../../../types'\nimport { getDayPosition, getWeekDays, isAllDayEvent, sortEvents } from '../../../utils'\nimport { assignEventRows } from './assign-event-rows'\nimport { calculateAllDayEventOffset } from './calculate-all-day-event-offset'\nimport { calculateAllDayEventWidth } from './calculate-all-day-event-width'\nimport { calculateEventDays } from './calculate-event-days'\nimport { calculateRegularEventOverlaps } from './calculate-regular-event-overlaps'\nimport { findAvailableColumn } from './find-available-column'\nimport { getEventEndDate } from './get-event-end-date'\nimport { getHangingStatus } from './get-hanging-status'\n\nexport interface GetWeekPositionedEventsInput {\n /** Date (week start) at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given week, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** Start time of the week view, used to calculate event positions */\n startTime?: string\n\n /** End time of the week view, used to calculate event positions */\n endTime?: string\n\n /** Number of minutes per time slot, used to align the canvas to whole slots */\n intervalMinutes?: number\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** Indices of weekend days, 0-6, where 0 is Sunday and 6 is Saturday */\n weekendDays?: DayOfWeek[]\n\n /** If set to false, weekend days are hidden @default true */\n withWeekendDays?: boolean\n}\n\n/** Events grouped by week day date (YYYY-MM-DD 00:00:00) and by columns */\nexport interface GroupedWeekEvents {\n allDayEvents: WeekPositionedEventData[]\n regularEvents: Record<DateStringValue, WeekPositionedEventData[]>\n backgroundEvents: Record<DateStringValue, WeekPositionedEventData[]>\n}\n\nexport function getWeekPositionedEvents({\n date,\n events,\n startTime,\n endTime,\n intervalMinutes,\n firstDayOfWeek = 1,\n weekendDays = [0, 6],\n withWeekendDays = true,\n}: GetWeekPositionedEventsInput): GroupedWeekEvents {\n const weekDays = getWeekDays({ week: date, firstDayOfWeek, withWeekendDays, weekendDays })\n const visibleDaysCount = weekDays.length\n const weekStartDate = dayjs(weekDays[0])\n const weekEndDate = dayjs(weekDays[weekDays.length - 1])\n\n const grouped: GroupedWeekEvents = {\n allDayEvents: [],\n regularEvents: Object.fromEntries(weekDays.map((day) => [day, []])),\n backgroundEvents: Object.fromEntries(weekDays.map((day) => [day, []])),\n }\n\n const columns = new Map<string, ScheduleEventData[]>()\n const allDayColumns = new Map<string, ScheduleEventData[]>()\n const sorted = sortEvents(events)\n\n for (const event of sorted) {\n if (event.display === 'background') {\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n const eventWeekDays = calculateEventDays({ event, weekDays, actualEndDate })\n const hanging = getHangingStatus({ eventStartDate, actualEndDate, weekDays })\n\n for (const day of eventWeekDays) {\n const visibleDayIndex = weekDays.indexOf(day)\n if (visibleDayIndex === -1) {\n continue\n }\n\n const dayStart = dayjs(day)\n const dayEnd = dayStart.endOf('day')\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n\n const clippedStart = eventStart.isBefore(dayStart) ? dayStart : eventStart\n const clippedEnd = eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd\n\n const clippedEvent = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n\n const isAllDay = isAllDayEvent({ event: clippedEvent, date: day })\n const verticalPosition = isAllDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event: clippedEvent, startTime, endTime, intervalMinutes })\n\n if (!isAllDay && verticalPosition.height <= 0) {\n continue\n }\n\n const dayWeekOffset = (visibleDayIndex / visibleDaysCount) * 100\n\n grouped.backgroundEvents[day].push({\n ...event,\n position: {\n ...verticalPosition,\n allDay: isAllDay,\n column: 0,\n width: 100,\n offset: 0,\n overlaps: 1,\n weekOffset: dayWeekOffset,\n row: 0,\n hanging,\n },\n })\n }\n\n continue\n }\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n const eventWeekDays = calculateEventDays({ event, weekDays, actualEndDate })\n\n if (eventWeekDays.length === 0) {\n continue\n }\n\n const isMultiday = actualEndDate.isAfter(eventStartDate)\n const hanging = getHangingStatus({ eventStartDate, actualEndDate, weekDays })\n const isActuallyAllDay = eventWeekDays.some((day) => isAllDayEvent({ event, date: day }))\n const allDay = isMultiday || isActuallyAllDay\n\n const columnMap = allDay ? allDayColumns : columns\n const column = findAvailableColumn({\n columns: columnMap,\n event,\n allDay,\n allWeekDays: weekDays,\n })\n\n const columnKey = `col-${column}`\n if (!columnMap.has(columnKey)) {\n columnMap.set(columnKey, [])\n }\n columnMap.get(columnKey)!.push(event)\n\n const verticalPosition = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event, startTime, endTime, intervalMinutes })\n\n if (allDay) {\n const offset = calculateAllDayEventOffset({\n eventStartDate,\n weekStartDate,\n weekDays,\n visibleDaysCount,\n hangingStart: hanging === 'start' || hanging === 'both',\n })\n\n grouped.allDayEvents.push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n width: 0,\n offset,\n overlaps: 0,\n row: 0,\n hanging,\n },\n })\n } else {\n for (const day of eventWeekDays) {\n const visibleDayIndex = weekDays.indexOf(day)\n\n if (visibleDayIndex === -1) {\n continue\n }\n\n const dayWeekOffset = (visibleDayIndex / visibleDaysCount) * 100\n\n grouped.regularEvents[day].push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n width: 0,\n offset: 0,\n overlaps: 0,\n weekOffset: dayWeekOffset,\n row: 0,\n hanging,\n },\n })\n }\n }\n }\n\n for (const day of weekDays) {\n calculateRegularEventOverlaps(grouped.regularEvents[day])\n }\n\n if (grouped.allDayEvents.length > 0) {\n const eventRows = assignEventRows(grouped.allDayEvents)\n const assignedRows = new Set<number>()\n\n for (const event of grouped.allDayEvents) {\n const row = eventRows.get(event)!\n event.position.row = row\n assignedRows.add(row)\n }\n\n const rowCount = Math.max(...assignedRows) + 1\n\n for (const event of grouped.allDayEvents) {\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n\n event.position.width = calculateAllDayEventWidth({\n eventStartDate,\n actualEndDate,\n weekStartDate,\n weekEndDate,\n weekDays,\n visibleDaysCount,\n })\n\n event.position.overlaps = rowCount\n }\n }\n\n return grouped\n}\n","import { ScheduleEventData } from '../../../types'\nimport { filterWeekViewEvents } from './filter-week-view-events'\nimport {\n getWeekPositionedEvents,\n GetWeekPositionedEventsInput,\n GroupedWeekEvents,\n} from './get-week-positioned-events'\n\ninterface GetWeekViewEventsInput extends Omit<GetWeekPositionedEventsInput, 'events'> {\n events: ScheduleEventData[] | undefined\n}\n\nexport function getWeekViewEvents(input: GetWeekViewEventsInput): GroupedWeekEvents {\n return getWeekPositionedEvents({ ...input, events: filterWeekViewEvents(input) })\n}\n",".weekView {\n --week-view-week-day-height: 58px;\n --week-view-all-day-slots-height: 48px;\n --week-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --week-view-slots-label-width: 80px;\n --week-view-min-slot-width: 80px;\n --week-view-slot-height: 64px;\n\n @mixin where-light {\n --week-view-border-color: var(--mantine-color-gray-3);\n --week-view-business-hours-bg: var(--mantine-color-white);\n --week-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --week-view-border-color: var(--mantine-color-dark-4);\n --week-view-business-hours-bg: var(--mantine-color-dark-7);\n --week-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.weekViewRoot {\n --indicator-labels-offset: calc(var(--week-view-slots-label-width) / var(--number-of-days));\n\n border: 1px solid var(--week-view-border-color);\n border-radius: var(--week-view-radius);\n overflow: hidden;\n}\n\n.weekViewInner {\n display: flex;\n position: relative;\n overflow: hidden;\n}\n\n.weekViewScrollArea {\n :where(:global(.mantine-ScrollArea-scrollbar)) {\n z-index: 4;\n }\n}\n\n.weekViewHeader {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--week-view-border-color);\n margin-bottom: -1px;\n transition: box-shadow 100ms ease;\n\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n}\n\n.weekViewCorner {\n height: var(--week-view-week-day-height);\n flex: 0 0 var(--week-view-slots-label-width);\n min-width: var(--week-view-slots-label-width);\n line-height: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.weekViewSlotLabels {\n flex: 0 0 var(--week-view-slots-label-width);\n min-width: var(--week-view-slots-label-width);\n background-color: var(--mantine-color-body);\n}\n\n.weekViewSlotLabel {\n border-top: 1px solid var(--week-view-border-color);\n text-align: right;\n height: var(--week-view-slot-height);\n padding: 4px;\n padding-inline-end: 8px;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n\n &:where([data-business-hours]) {\n background-color: var(--week-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--week-view-non-business-hours-bg);\n }\n}\n\n.weekViewDay {\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n}\n\n.weekViewDayLabel {\n height: var(--week-view-week-day-height);\n min-width: var(--week-view-min-slot-width);\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n cursor: pointer;\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n padding-inline-start: 5px;\n\n &:where([data-weekend]) {\n color: var(--mantine-color-error);\n }\n\n &:where([data-today]) {\n gap: 6px;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.weekViewDayNumber {\n text-align: center;\n width: 26px;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n font-size: var(--mantine-font-size-sm);\n\n :where(.weekViewDayLabel[data-today]) & {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n\n.weekViewDayWeekday {\n text-align: center;\n font-size: var(--mantine-font-size-sm);\n text-transform: capitalize;\n}\n\n.weekViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--week-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.weekViewDaySlots {\n position: relative;\n}\n\n.weekViewDaySlot {\n display: block;\n width: 100%;\n border-top: 1px solid var(--week-view-border-color);\n height: var(--week-view-slot-height);\n min-width: var(--week-view-min-slot-width);\n padding: 4px;\n cursor: pointer;\n position: relative;\n\n &:where(:focus) {\n z-index: 1;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n\n &:where([data-business-hours]) {\n background-color: var(--week-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--week-view-non-business-hours-bg);\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.weekViewWeekLabel {\n text-align: center;\n margin-bottom: 4px;\n font-size: var(--mantine-font-size-sm);\n}\n\n.weekViewWeekNumber {\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n font-size: var(--mantine-font-size-lg);\n}\n\n.weekViewAllDaySlots {\n display: flex;\n height: var(--week-view-all-day-slots-height);\n}\n\n.weekViewAllDaySlotsLabel {\n flex: 0 0 var(--week-view-slots-label-width);\n text-align: right;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n}\n\n.weekViewAllDaySlotsEvents {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.weekViewAllDaySlotsList {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n\n & > .weekViewDaySlot {\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n height: 100%;\n }\n\n &:hover,\n &:focus-within {\n .weekViewAllDaySlotsEvents {\n overflow: visible;\n\n &::before {\n content: '';\n position: absolute;\n top: 100%;\n height: calc(var(--week-view-all-day-slots-height) / 2 * var(--extra-rows));\n inset-inline: 0;\n z-index: 1;\n pointer-events: all;\n }\n }\n }\n}\n","import dayjs from 'dayjs'\nimport {\n defineComponent,\n h,\n ref,\n type ComponentPublicInstance,\n type CSSProperties,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport { Box, ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport type { WeekViewProps } from '../../component-props'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport { getLabel } from '../../labels'\nimport type { DateLabelFormat, DateStringValue, DateTimeStringValue, DayOfWeek } from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getWeekDays,\n getWeekNumber,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator/CurrentTimeIndicator'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n eventNode,\n getDropEvent,\n getExpandedEvents,\n getTimeSlotDropTarget,\n moveEventTo,\n moveEventToAllDay,\n resolveScheduleRadius,\n timeViewProps,\n type EventSlots,\n} from '../shared'\nimport { getWeekLabel } from './get-week-label/get-week-label'\nimport { getWeekViewEvents } from './get-week-view-events/get-week-view-events'\nimport classes from './WeekView.module.css'\n\nexport interface WeekViewSlots extends EventSlots {\n /** Scoped alternative to the `renderWeekLabel` prop */\n weekLabel?: (props: { weekStart: DateStringValue; weekEnd: DateStringValue }) => VNodeChild\n}\n\nexport const WeekView = defineComponent({\n name: 'WeekView',\n inheritAttrs: false,\n slots: Object as SlotsType<WeekViewSlots>,\n props: {\n ...timeViewProps,\n withCurrentTimeIndicator: { type: Boolean, default: true },\n forceCurrentTimeIndicator: Boolean,\n firstDayOfWeek: { type: Number as PropType<DayOfWeek>, default: 1 },\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'ddd' },\n dayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'D' },\n withWeekNumber: { type: Boolean, default: true },\n withAllDaySlots: { type: Boolean, default: true },\n withWeekNumbers: { type: Boolean, default: undefined },\n withAllDaySlot: { type: Boolean, default: undefined },\n allDaySlotsHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 44 },\n maxAllDayEvents: { type: Number, default: 3 },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n withWeekendDays: { type: Boolean, default: true },\n weekLabelFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'MMM D' },\n renderWeekLabel: Function as PropType<WeekViewProps['renderWeekLabel']>,\n },\n setup(props, { attrs, slots }) {\n const daySlotsContainers = new Map<string, HTMLElement>()\n const dropTarget = ref<{ date: string; slotIndex: number } | null>(null)\n const eventResize = useEventResize({\n enabled: () => props.withEventResize,\n mode: () => props.mode,\n startTime: () => props.startTime,\n endTime: () => props.endTime,\n intervalMinutes: () => props.intervalMinutes,\n onEventResize: () => props.onEventResize,\n canResizeEvent: () => props.canResizeEvent,\n })\n const slotTimes = ref<{ startTime: string; endTime: string }[]>([])\n const slotDragSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () =>\n props.onSlotDragEnd\n ? (startIndex, endIndex, group) => {\n const slotDate = dayjs(group).format('YYYY-MM-DD')\n const startSlot = slotTimes.value[startIndex]\n const endSlot = slotTimes.value[endIndex]\n if (startSlot && endSlot) {\n props.onSlotDragEnd?.(\n `${slotDate} ${startSlot.startTime}` as DateTimeStringValue,\n `${slotDate} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n }\n : undefined,\n })\n return () => {\n const withWeekNumber = props.withWeekNumbers ?? props.withWeekNumber\n const withAllDaySlots = props.withAllDaySlot ?? props.withAllDaySlots\n const days = getWeekDays({\n week: props.date!,\n firstDayOfWeek: props.firstDayOfWeek,\n withWeekendDays: props.withWeekendDays,\n weekendDays: props.weekendDays,\n })\n const now = dayjs(props.getCurrentTime?.() ?? dayjs())\n const currentWeekdayIndex = props.withCurrentTimeIndicator\n ? props.forceCurrentTimeIndicator\n ? days.findIndex((date) => dayjs(date).day() === now.day())\n : days.findIndex((date) => dayjs(date).isSame(now, 'day'))\n : -1\n const expanded = getExpandedEvents(\n props.events,\n dayjs(days[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(days.at(-1)).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit,\n )\n const grouped = getWeekViewEvents({\n date: props.date!,\n events: expanded,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n })\n const intervals = getDayTimeIntervals({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n })\n slotTimes.value = intervals.map((slot) => ({\n startTime: slot.startTime,\n endTime: slot.endTime,\n }))\n const withSlotSelect = props.withDragSlotSelect && props.mode !== 'static'\n const getWeekRoot = (event: KeyboardEvent) =>\n (event.currentTarget as HTMLElement).closest<HTMLElement>(`.${classes.weekViewRoot}`)\n const focusWeekControl = (event: KeyboardEvent, selector: string) => {\n const control = getWeekRoot(event)?.querySelector<HTMLButtonElement>(selector)\n if (!control || control.disabled) return\n event.preventDefault()\n control.focus()\n }\n const withDragHandlers =\n props.mode !== 'static' &&\n (props.withEventsDragAndDrop || Boolean(props.onExternalEventDrop))\n const emitDrop = (nativeEvent: DragEvent, target: string) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expanded, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.(moveEventTo(event, target))\n else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.(nativeEvent.dataTransfer, target)\n }\n const emitAllDayDrop = (nativeEvent: DragEvent, date: string) => {\n nativeEvent.preventDefault()\n const dayKey = dayjs(date).format('YYYY-MM-DD')\n const event = getDropEvent(expanded, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.(moveEventToAllDay(event, dayKey))\n else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.(nativeEvent.dataTransfer, `${dayKey} 00:00:00`)\n }\n const rootStyle = {\n '--week-view-radius': resolveScheduleRadius(props.radius),\n '--week-view-slot-height':\n typeof props.slotHeight === 'number' ? `${props.slotHeight}px` : props.slotHeight,\n '--week-view-all-day-slots-height':\n typeof props.allDaySlotsHeight === 'number'\n ? `${props.allDaySlotsHeight}px`\n : props.allDaySlotsHeight,\n } as CSSProperties\n return h(\n Box,\n {\n ...attrs,\n class: [classes.weekView, attrs.class],\n style: [rootStyle, attrs.style],\n mod: { static: props.mode === 'static', 'slot-dragging': slotDragSelect.isDragging() },\n },\n () => [\n props.withHeader\n ? h(ScheduleHeaderBase, {\n view: 'week',\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n navigationHandlers: createHeaderNavigation(props.date!, 'week'),\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: props.viewSelectProps,\n control: {\n title: getWeekLabel({\n weekdays: days,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat,\n renderWeekLabel:\n props.renderWeekLabel ??\n (slots.weekLabel ? (params) => slots.weekLabel!(params) : undefined),\n }),\n },\n })\n : null,\n h(\n Box,\n {\n class: classes.weekViewRoot,\n style: {\n '--number-of-days': String(days.length),\n '--indicator-offset-index':\n currentWeekdayIndex === -1 ? undefined : String(currentWeekdayIndex + 1),\n },\n mod: { 'with-weekends': props.withWeekendDays },\n },\n () => [\n h(\n ScrollArea.Autosize,\n { class: classes.weekViewScrollArea, scrollbarSize: 4 },\n () => [\n h('div', { class: classes.weekViewHeader }, [\n h('div', { class: classes.weekViewCorner }, [\n withWeekNumber\n ? h(\n 'div',\n { class: classes.weekViewWeekLabel },\n props.labels?.week || 'Week',\n )\n : null,\n withWeekNumber\n ? h(\n 'div',\n { class: classes.weekViewWeekNumber },\n String(getWeekNumber(days)),\n )\n : null,\n ]),\n ...days.map((date, dayIndex) =>\n h(\n UnstyledButton,\n {\n type: 'button',\n class: classes.weekViewDayLabel,\n 'data-weekday-index': dayIndex,\n 'data-weekend':\n props.weekendDays.includes(dayjs(date).day() as DayOfWeek) || undefined,\n 'aria-label': `${getLabel('weekday', props.labels)} ${dayjs(date).format('YYYY-MM-DD')}`,\n tabindex: props.mode === 'static' ? -1 : dayIndex === 0 ? 0 : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n const next =\n event.key === 'ArrowRight'\n ? dayIndex + 1\n : event.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n if (next >= 0 && next < days.length) {\n focusWeekControl(event, `[data-weekday-index=\"${next}\"]`)\n }\n },\n onClick:\n props.mode === 'static'\n ? undefined\n : () => {\n props.onViewChange?.('day')\n props.onDateChange?.(date)\n },\n },\n () => [\n h(\n 'span',\n { class: classes.weekViewDayWeekday },\n formatDate({\n date,\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n }),\n ),\n h(\n 'span',\n {\n class: classes.weekViewDayNumber,\n 'data-today': dayjs(date).isSame(now, 'day') || undefined,\n },\n formatDate({\n date,\n locale: props.locale || 'en',\n format: props.dayFormat,\n }),\n ),\n ],\n ),\n ),\n ]),\n withAllDaySlots\n ? h('div', { class: classes.weekViewAllDaySlots }, [\n h(\n 'div',\n { class: classes.weekViewAllDaySlotsLabel },\n props.labels?.allDay || 'All day',\n ),\n h('div', { class: classes.weekViewAllDaySlotsList }, [\n h(\n 'div',\n { class: classes.weekViewAllDaySlotsEvents },\n grouped.allDayEvents.map((event) =>\n eventNode(\n event,\n props,\n {\n key: event.id,\n nowrap: true,\n hanging: event.position.hanging,\n style: {\n position: 'absolute',\n insetInlineStart: `${event.position.offset}%`,\n width: `${event.position.width}%`,\n top: `${event.position.row * 22}px`,\n },\n },\n slots,\n ),\n ),\n ),\n ...days.map((date, dayIndex) =>\n h(UnstyledButton, {\n type: 'button',\n class: classes.weekViewDaySlot,\n disabled: props.mode === 'static',\n 'data-all-day-index': dayIndex,\n 'aria-label': `${getLabel('allDay', props.labels)} ${dayjs(date).format('YYYY-MM-DD')}`,\n tabindex: props.mode === 'static' ? -1 : dayIndex === 0 ? 0 : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n focusWeekControl(\n event,\n `[data-week-day-index=\"${dayIndex}\"][data-time-slot-index=\"0\"]`,\n )\n return\n }\n const next =\n event.key === 'ArrowRight'\n ? dayIndex + 1\n : event.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n if (next >= 0 && next < days.length) {\n focusWeekControl(event, `[data-all-day-index=\"${next}\"]`)\n }\n },\n onClick: (event: MouseEvent) =>\n props.onAllDaySlotClick?.(date, event),\n onDragover: (event: DragEvent) => event.preventDefault(),\n onDrop: (event: DragEvent) => emitAllDayDrop(event, date),\n }),\n ),\n ]),\n ])\n : null,\n h(Box, { class: classes.weekViewInner }, () => [\n h(\n 'div',\n { class: classes.weekViewSlotLabels },\n intervals.map((slot) =>\n h(\n 'div',\n { class: classes.weekViewSlotLabel },\n formatDate({\n date: `${dayjs(days[0]).format('YYYY-MM-DD')} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n }),\n ),\n ),\n ),\n props.withCurrentTimeIndicator && currentWeekdayIndex !== -1\n ? h(CurrentTimeIndicator, {\n startOffset:\n 'calc(100% - (100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index) + 1) + ((var(--number-of-days) - var(--indicator-offset-index) + 1) * var(--indicator-labels-offset)))',\n endOffset:\n 'calc((100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index)) - (var(--number-of-days) - var(--indicator-offset-index)) * var(--indicator-labels-offset))',\n timeBubbleStartOffset:\n 'calc(var(--week-view-slots-label-width) - var(--time-bubble-width))',\n currentTimeFormat: props.slotLabelFormat,\n withTimeBubble: props.withCurrentTimeBubble,\n withThumb: props.withCurrentTimeBubble ? currentWeekdayIndex !== 0 : true,\n locale: props.locale,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n getCurrentTime: props.getCurrentTime,\n })\n : null,\n ...days.map((date, dayIndex) =>\n h('div', { class: classes.weekViewDay }, [\n h(\n 'div',\n {\n class: classes.weekViewDaySlots,\n ref: (element: Element | ComponentPublicInstance | null) => {\n if (element instanceof HTMLElement) {\n daySlotsContainers.set(date, element)\n } else {\n daySlotsContainers.delete(date)\n }\n },\n onDragover: withDragHandlers\n ? (event: DragEvent) => {\n event.preventDefault()\n const container = daySlotsContainers.get(date)\n if (!container) return\n const target = getTimeSlotDropTarget({\n nativeEvent: event,\n container,\n intervals,\n date: dayjs(date).format('YYYY-MM-DD'),\n })\n dropTarget.value = target\n ? { date, slotIndex: target.slotIndex }\n : null\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect =\n event.dataTransfer.types.includes('application/json')\n ? 'move'\n : 'copy'\n }\n }\n : undefined,\n onDragleave: withDragHandlers\n ? (event: DragEvent) => {\n const container = daySlotsContainers.get(date)\n if (\n !(event.relatedTarget instanceof Node) ||\n !container?.contains(event.relatedTarget)\n ) {\n dropTarget.value = null\n }\n }\n : undefined,\n onDrop: withDragHandlers\n ? (event: DragEvent) => {\n const container = daySlotsContainers.get(date)\n if (!container) return\n const target = getTimeSlotDropTarget({\n nativeEvent: event,\n container,\n intervals,\n date: dayjs(date).format('YYYY-MM-DD'),\n })\n dropTarget.value = null\n if (target) emitDrop(event, target.target)\n }\n : undefined,\n },\n [\n ...intervals.map((slot, slotIndex) => {\n const datePart = dayjs(date).format('YYYY-MM-DD')\n const start = dayjs(`${datePart} ${slot.startTime}`)\n const end = dayjs(`${datePart} ${slot.endTime}`)\n const mod = getBusinessHoursMod({\n time: slot.startTime,\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: start.day() as DayOfWeek,\n })\n return h(UnstyledButton, {\n type: 'button',\n class: classes.weekViewDaySlot,\n 'data-week-day-index': dayIndex,\n 'data-time-slot-index': slotIndex,\n 'data-drag-slot-index': withSlotSelect ? slotIndex : undefined,\n 'data-drag-slot-group': withSlotSelect ? datePart : undefined,\n 'data-drop-target':\n (dropTarget.value?.date === date &&\n dropTarget.value.slotIndex === slotIndex) ||\n undefined,\n 'data-drag-selected':\n slotDragSelect.isSlotSelected(slotIndex, datePart) || undefined,\n disabled: props.mode === 'static',\n 'aria-label': `${getLabel('timeSlot', props.labels)} ${datePart} ${slot.startTime} - ${slot.endTime}`,\n tabindex:\n props.mode === 'static'\n ? -1\n : dayIndex === 0 && slotIndex === 0\n ? 0\n : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n if (\n event.key === 'ArrowUp' &&\n slotIndex === 0 &&\n withAllDaySlots\n ) {\n focusWeekControl(\n event,\n `[data-all-day-index=\"${dayIndex}\"]`,\n )\n return\n }\n const nextDay =\n event.key === 'ArrowRight'\n ? dayIndex + 1\n : event.key === 'ArrowLeft'\n ? dayIndex - 1\n : dayIndex\n const nextSlot =\n event.key === 'ArrowDown'\n ? slotIndex + 1\n : event.key === 'ArrowUp'\n ? slotIndex - 1\n : slotIndex\n if (\n nextDay >= 0 &&\n nextDay < days.length &&\n nextSlot >= 0 &&\n nextSlot < intervals.length &&\n (nextDay !== dayIndex || nextSlot !== slotIndex)\n ) {\n focusWeekControl(\n event,\n `[data-week-day-index=\"${nextDay}\"][data-time-slot-index=\"${nextSlot}\"]`,\n )\n }\n },\n 'data-business-hours': mod['business-hours'] || undefined,\n 'data-non-business-hours': mod['non-business-hours'] || undefined,\n onClick: (nativeEvent: MouseEvent) =>\n props.onTimeSlotClick?.({\n slotStart: start.format(\n 'YYYY-MM-DD HH:mm:ss',\n ) as DateTimeStringValue,\n slotEnd: end.format(\n 'YYYY-MM-DD HH:mm:ss',\n ) as DateTimeStringValue,\n nativeEvent,\n }),\n onPointerdown: withSlotSelect\n ? (nativeEvent: PointerEvent) =>\n slotDragSelect.handleSlotPointerDown(\n nativeEvent,\n slotIndex,\n datePart,\n )\n : undefined,\n onDragover: (event: DragEvent) => event.preventDefault(),\n })\n }),\n ...(grouped.backgroundEvents[date] || []).map((event) =>\n h('div', {\n class: classes.weekViewBackgroundEvent,\n style: {\n top: `${event.position.top}%`,\n bottom: `${100 - event.position.top - event.position.height}%`,\n minHeight: '1px',\n width: '100%',\n },\n }),\n ),\n ...(grouped.regularEvents[date] || []).map((event) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const isResizable = eventResize.isResizableEvent(event)\n return eventNode(\n event,\n props,\n {\n key: `${event.id}-${date}`,\n autoSize: true,\n style: {\n position: 'absolute',\n top: `${resizePosition?.top ?? event.position.top}%`,\n bottom: `${\n 100 -\n (resizePosition?.top ?? event.position.top) -\n (resizePosition?.height ?? event.position.height)\n }%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n },\n withResize: isResizable,\n isResizing: resizePosition !== null,\n onClick: props.onEventClick\n ? (nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n props.onEventClick?.(event, nativeEvent)\n }\n }\n : undefined,\n onResizeStart: (\n edge: 'top' | 'bottom',\n pointerEvent: PointerEvent,\n ) => {\n const container = daySlotsContainers.get(date)\n if (!container) return\n eventResize.handleResizeStart({\n event,\n edge,\n container,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: dayjs(date).format('YYYY-MM-DD'),\n pointerEvent,\n })\n },\n },\n slots,\n )\n }),\n ],\n ),\n ]),\n ),\n ]),\n ],\n ),\n ],\n ),\n ],\n )\n }\n },\n})\n\nexport type { WeekViewProps }\nexport type WeekViewStylesNames =\n | 'weekView'\n | 'weekViewRoot'\n | 'weekViewHeader'\n | 'weekViewInner'\n | 'weekViewAllDaySlotsEvents'\n | 'weekViewAllDaySlots'\n | 'weekViewAllDaySlotsList'\n | 'weekViewAllDaySlot'\n | 'weekViewAllDaySlotsLabel'\n | 'weekViewScrollArea'\n | 'weekViewCorner'\n | 'weekViewSlotLabels'\n | 'weekViewSlotLabel'\n | 'weekViewDayLabel'\n | 'weekViewDayWeekday'\n | 'weekViewDay'\n | 'weekViewDayNumber'\n | 'weekViewDaySlot'\n | 'weekViewDaySlots'\n | 'weekViewWeekLabel'\n | 'weekViewWeekNumber'\n | 'weekViewBackgroundEvent'\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, ScheduleEventData } from '../../../types'\nimport { isMultidayEvent, validateEvent } from '../../../utils'\n\nexport type GroupedEvents = Record<DateStringValue, ScheduleEventData[]>\n\nfunction groupEventByDate(event: ScheduleEventData, groupedEvents: GroupedEvents) {\n if (isMultidayEvent(event)) {\n const startDate = dayjs(event.start).startOf('day')\n const endDate = dayjs(event.end).startOf('day')\n\n for (\n let date = startDate;\n date.isBefore(endDate) || date.isSame(endDate);\n date = date.add(1, 'day')\n ) {\n const dateKey = date.format('YYYY-MM-DD')\n if (!groupedEvents[dateKey]) {\n groupedEvents[dateKey] = []\n }\n groupedEvents[dateKey].push(event)\n }\n\n return\n }\n\n const eventDate = dayjs(event.start).format('YYYY-MM-DD')\n if (!groupedEvents[eventDate]) {\n groupedEvents[eventDate] = []\n }\n groupedEvents[eventDate].push(event)\n}\n\ninterface GetYearViewEventsInput {\n date: AnyDateValue\n events: ScheduleEventData[] | undefined\n}\n\nexport function getYearViewEvents({ date, events }: GetYearViewEventsInput) {\n const groupedEvents: GroupedEvents = {}\n\n if (events === undefined) {\n return groupedEvents\n }\n\n const ids = new Set<string | number>()\n\n for (const event of events) {\n if (dayjs(event.start).isSame(dayjs(date), 'year')) {\n groupEventByDate(validateEvent(event), groupedEvents)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] YearView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return groupedEvents\n}\n",".yearView {\n --year-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --year-view-font-size: var(--mantine-font-size-sm);\n container-type: inline-size;\n\n @mixin where-light {\n --year-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --year-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.yearViewMonths {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n\n @container (width <= 850px) {\n --year-view-font-size: calc(var(--mantine-font-size-sm) - 2px);\n }\n\n @container (width <= 750px) {\n grid-template-columns: repeat(2, 1fr);\n --year-view-font-size: var(--mantine-font-size-xs);\n }\n\n @container (width <= 520px) {\n --year-view-font-size: calc(var(--mantine-font-size-xs) - 2px);\n }\n\n @container (width <= 420px) {\n grid-template-columns: 1fr;\n --year-view-font-size: var(--mantine-font-size-xs);\n }\n}\n\n.yearViewMonth {\n --week-numbers-offset: 0rem;\n --day-base-color: var(--mantine-color-text);\n --day-dimmed-color: alpha(var(--day-base-color), 0.35);\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 28px;\n }\n\n min-width: 0;\n border: 1px solid var(--year-view-border-color);\n padding: var(--mantine-spacing-md);\n margin-top: -1px;\n margin-inline-start: -1px;\n\n &:where(:nth-child(3n + 1)) {\n margin-inline-start: 0;\n }\n\n &:where(:nth-child(-n + 3)) {\n margin-top: 0;\n }\n\n &:where(:nth-child(1)) {\n border-start-start-radius: var(--year-view-radius);\n }\n\n &:where(:nth-child(3)) {\n border-start-end-radius: var(--year-view-radius);\n }\n\n &:where(:nth-last-child(3)) {\n border-end-start-radius: var(--year-view-radius);\n }\n\n &:where(:nth-last-child(1)) {\n border-end-end-radius: var(--year-view-radius);\n }\n\n @container (width <= 750px) {\n border: 0;\n padding: 8px;\n margin: 0;\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 14px;\n }\n }\n\n @container (width <= 420px) {\n padding: 6px;\n }\n}\n\n.yearViewWeekdays {\n display: flex;\n}\n\n.yearViewWeek {\n display: flex;\n}\n\n.yearViewWeekNumber {\n flex: 0 0 calc(var(--week-numbers-offset) - rem(4px));\n margin-inline-end: rem(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--year-view-font-size);\n border-radius: var(--year-view-radius);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @container (width <= 750px) {\n padding: 0;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: 36px;\n font-size: var(--year-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @container (width <= 750px) {\n height: auto;\n padding-block: 2px;\n }\n}\n\n.yearViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n}\n\n.yearViewDay {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n padding: 4px;\n font-size: var(--year-view-font-size);\n color: var(--day-base-color);\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n aspect-ratio: 1;\n position: relative;\n\n @container (width <= 750px) {\n padding: 0;\n }\n\n &:where([data-day-placeholder]) {\n background-color: transparent;\n cursor: default;\n pointer-events: none;\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: var(--day-dimmed-color);\n }\n\n @mixin hover {\n &:where(:not([data-today], [data-day-placeholder])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n\n &:where([data-today]:not([data-outside])) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewMonthCaption {\n padding-inline: var(--mantine-spacing-sm);\n width: 100%;\n padding-block: 4px;\n margin-bottom: 4px;\n font-size: var(--year-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n border-radius: var(--year-view-radius);\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewDayIndicators {\n position: absolute;\n bottom: 0;\n inset-inline: 0;\n display: flex;\n justify-content: center;\n padding-inline-start: 2px;\n}\n\n.yearViewDayIndicator {\n width: 8px;\n height: 8px;\n border-radius: 100%;\n margin-inline-start: -2px;\n border: 1px solid var(--mantine-color-body);\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, type PropType } from 'vue'\nimport { Box, UnstyledButton } from '@mantine-vue/core'\nimport type { YearViewProps } from '../../component-props'\nimport type { DateLabelFormat, DayOfWeek, ScheduleEventData } from '../../types'\nimport {\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { baseViewProps, getExpandedEvents, resolveScheduleRadius } from '../shared'\nimport { getYearViewEvents } from './get-year-view-events/get-year-view-events'\nimport classes from './YearView.module.css'\n\nexport const YearView = defineComponent({\n name: 'YearView',\n inheritAttrs: false,\n props: {\n ...baseViewProps,\n firstDayOfWeek: { type: Number as PropType<DayOfWeek>, default: 1 },\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'dd' },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n withWeekNumbers: Boolean,\n withWeekDays: { type: Boolean, default: true },\n consistentWeeks: Boolean,\n highlightToday: { type: Boolean, default: true },\n withOutsideDays: { type: Boolean, default: true },\n monthsListFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'MMMM' },\n getDayProps: Function as PropType<YearViewProps['getDayProps']>,\n getWeekNumberProps: Function as PropType<YearViewProps['getWeekNumberProps']>,\n onDayClick: Function as PropType<YearViewProps['onDayClick']>,\n onMonthClick: Function as PropType<YearViewProps['onMonthClick']>,\n onWeekNumberClick: Function as PropType<YearViewProps['onWeekNumberClick']>,\n },\n setup(props, { attrs }) {\n const yearGrid = ref<HTMLElement | null>(null)\n return () => {\n const year = dayjs(props.date).startOf('year')\n const expanded = getExpandedEvents(\n props.events,\n year.startOf('year').format('YYYY-MM-DD HH:mm:ss'),\n year.endOf('year').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit,\n )\n const eventsByDay = getYearViewEvents({ date: year, events: expanded })\n const weekdays = getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n firstDayOfWeek: props.firstDayOfWeek,\n })\n let totalYearGridCells = 0\n const months = Array.from({ length: 12 }, (_, monthIndex) => {\n const month = year.month(monthIndex)\n const weeks = getMonthDays({\n month,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n })\n const offset = totalYearGridCells\n totalYearGridCells += weeks.length * 7\n return { month, monthIndex, weeks, offset }\n })\n return h(\n Box,\n {\n ...attrs,\n class: [classes.yearView, attrs.class],\n style: [{ '--year-view-radius': resolveScheduleRadius(props.radius) }, attrs.style],\n },\n () => [\n props.withHeader\n ? h(ScheduleHeaderBase, {\n view: 'year',\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n navigationHandlers: createHeaderNavigation(props.date!, 'year'),\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: props.viewSelectProps,\n control: {\n monthYearSelect: {\n locale: props.locale,\n yearValue: year.year(),\n withMonths: false,\n labelFormat: 'YYYY',\n onYearChange: (value: number) =>\n props.onDateChange?.(toDateString(year.year(value))),\n },\n },\n })\n : null,\n h(\n 'div',\n { ref: yearGrid, class: classes.yearViewMonths },\n months.map(({ month, weeks, offset }) => {\n return h(\n 'section',\n {\n class: classes.yearViewMonth,\n 'data-with-week-numbers': props.withWeekNumbers || undefined,\n },\n [\n h(\n UnstyledButton,\n {\n type: 'button',\n class: classes.yearViewMonthCaption,\n onClick: () => props.onMonthClick?.(toDateString(month)),\n },\n () =>\n formatDate({\n date: month,\n locale: props.locale || 'en',\n format: props.monthsListFormat,\n }),\n ),\n props.withWeekDays\n ? h('div', { class: classes.yearViewWeekdays }, [\n props.withWeekNumbers\n ? h('span', { class: classes.yearViewWeekdaysCorner })\n : null,\n ...weekdays.map((weekday) =>\n h('span', { class: classes.yearViewWeekday }, [weekday]),\n ),\n ])\n : null,\n ...weeks.map((week, weekIndex) =>\n h('div', { class: classes.yearViewWeek }, [\n props.withWeekNumbers\n ? h(\n UnstyledButton,\n {\n type: 'button',\n class: classes.yearViewWeekNumber,\n ...props.getWeekNumberProps?.(toDateString(week[0])),\n onClick: (event: MouseEvent) =>\n props.onWeekNumberClick?.(toDateString(week[0]), event),\n },\n () => String(getWeekNumber(week)),\n )\n : null,\n ...week.map((date, dayIndex) => {\n const key = dayjs(date).format('YYYY-MM-DD')\n const events = eventsByDay[key] || []\n const outside = !dayjs(date).isSame(month, 'month')\n const gridIndex = offset + weekIndex * 7 + dayIndex\n const extra = props.getDayProps?.(toDateString(date)) || {}\n if (outside && !props.withOutsideDays) {\n return h('div', {\n class: classes.yearViewDay,\n 'data-day-placeholder': true,\n key: toDateString(date),\n })\n }\n return h(\n UnstyledButton,\n {\n type: 'button',\n ...extra,\n class: [classes.yearViewDay, extra.class],\n disabled: props.mode === 'static',\n 'data-year-grid-index': gridIndex,\n 'data-outside': outside || undefined,\n 'data-weekend':\n props.weekendDays.includes(dayjs(date).day() as DayOfWeek) ||\n undefined,\n 'data-today':\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) ||\n undefined,\n 'aria-label': formatDate({\n date,\n locale: props.locale || 'en',\n format: 'MMMM D, YYYY',\n }),\n tabindex:\n props.mode === 'static' || outside\n ? -1\n : dayjs(date).date() === 1\n ? 0\n : -1,\n onKeydown:\n props.mode === 'static'\n ? undefined\n : (event: KeyboardEvent) => {\n handleGridKeydown({\n event,\n index: gridIndex,\n columns: 7,\n total: totalYearGridCells,\n getControl: (index) => {\n const control =\n yearGrid.value?.querySelector<HTMLButtonElement>(\n `[data-year-grid-index=\"${index}\"]`,\n ) ?? null\n return control?.hasAttribute('data-outside')\n ? null\n : control\n },\n })\n extra.onKeydown?.(event)\n },\n onClick: (event: MouseEvent) =>\n props.onDayClick?.(toDateString(date), event),\n },\n () => [\n String(dayjs(date).date()),\n events.length\n ? h(\n 'span',\n { class: classes.yearViewDayIndicators },\n events.slice(0, 3).map((event: ScheduleEventData) =>\n h('span', {\n class: classes.yearViewDayIndicator,\n style: {\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n },\n }),\n ),\n )\n : null,\n ],\n )\n }),\n ]),\n ),\n ],\n )\n }),\n ),\n ],\n )\n }\n },\n})\n\nexport type { YearViewProps }\nexport type YearViewStylesNames =\n | 'yearView'\n | 'yearViewMonths'\n | 'yearViewMonth'\n | 'yearViewWeekdays'\n | 'yearViewWeek'\n | 'yearViewWeekNumber'\n | 'yearViewWeekday'\n | 'yearViewWeekdaysCorner'\n | 'yearViewDay'\n | 'yearViewMonthCaption'\n | 'yearViewDayIndicators'\n | 'yearViewDayIndicator'\n",".root {\n &:where([data-layout='responsive']) {\n container-type: inline-size;\n }\n}\n\n.desktopView {\n display: block;\n height: 100%;\n\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.mobileView {\n display: none;\n height: 100%;\n\n @container (width <= 600px) {\n display: block;\n }\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, watch, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport type {\n DayViewProps,\n MobileMonthViewProps,\n MonthViewProps,\n RenderEventBody,\n ScheduleProps,\n WeekViewProps,\n YearViewProps,\n} from '../../component-props'\nimport type {\n DateStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleViewLevel,\n} from '../../types'\nimport { toDateString } from '../../utils'\nimport { DayView } from '../DayView/DayView'\nimport { MobileMonthView } from '../MobileMonthView/MobileMonthView'\nimport { MonthView } from '../MonthView/MonthView'\nimport { WeekView } from '../WeekView/WeekView'\nimport { YearView } from '../YearView/YearView'\nimport classes from './Schedule.module.css'\n\nexport interface ScheduleSlots {\n /** Scoped alternative to the `renderEventBody` prop */\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n /** Scoped alternative to the `renderEvent` prop */\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n /** Scoped alternative to WeekView's `renderWeekLabel` prop */\n weekLabel?: (props: { weekStart: DateStringValue; weekEnd: DateStringValue }) => VNodeChild\n /** Scoped alternative to MobileMonthView's `renderHeader` prop */\n header?: (props: {\n mode: ScheduleMode\n date: Date | DateStringValue\n defaultHeader: VNodeChild\n }) => VNodeChild\n}\n\nexport const Schedule = defineComponent({\n name: 'Schedule',\n inheritAttrs: false,\n slots: Object as SlotsType<ScheduleSlots>,\n props: {\n date: [String, Date] as PropType<Date | DateStringValue>,\n defaultDate: [String, Date] as PropType<Date | DateStringValue>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n view: String as PropType<ScheduleViewLevel>,\n defaultView: { type: String as PropType<ScheduleViewLevel>, default: 'week' },\n onViewChange: Function as PropType<(view: ScheduleViewLevel) => void>,\n events: Array as PropType<ScheduleEventData[]>,\n locale: String,\n radius: [String, Number] as PropType<string | number>,\n labels: Object,\n renderEventBody: Function as PropType<RenderEventBody>,\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<ScheduleProps['onEventDrop']>,\n canDragEvent: Function as PropType<ScheduleProps['canDragEvent']>,\n onEventDragStart: Function as PropType<ScheduleProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<ScheduleProps['onEventDragEnd']>,\n onTimeSlotClick: Function as PropType<ScheduleProps['onTimeSlotClick']>,\n onAllDaySlotClick: Function as PropType<ScheduleProps['onAllDaySlotClick']>,\n onEventClick: Function as PropType<ScheduleProps['onEventClick']>,\n onDayClick: Function as PropType<ScheduleProps['onDayClick']>,\n onMonthClick: Function as PropType<ScheduleProps['onMonthClick']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<ScheduleProps['onSlotDragEnd']>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n onExternalEventDrop: Function as PropType<ScheduleProps['onExternalEventDrop']>,\n withEventResize: Boolean,\n onEventResize: Function as PropType<ScheduleProps['onEventResize']>,\n canResizeEvent: Function as PropType<ScheduleProps['canResizeEvent']>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n layout: { type: String as PropType<'default' | 'responsive'>, default: 'default' },\n dayViewProps: Object as PropType<Partial<DayViewProps>>,\n weekViewProps: Object as PropType<Partial<WeekViewProps>>,\n monthViewProps: Object as PropType<Partial<MonthViewProps>>,\n yearViewProps: Object as PropType<Partial<YearViewProps>>,\n mobileMonthViewProps: Object as PropType<Partial<MobileMonthViewProps>>,\n },\n setup(props, { attrs, slots }) {\n const currentDate = ref(toDateString(props.date || props.defaultDate || dayjs()))\n const currentView = ref<ScheduleViewLevel>(props.view || props.defaultView)\n watch(\n () => props.date,\n (value) => {\n if (value !== undefined) currentDate.value = toDateString(value)\n },\n )\n watch(\n () => props.view,\n (value) => {\n if (value !== undefined) currentView.value = value\n },\n )\n const changeDate = (date: DateStringValue) => {\n if (props.date === undefined) currentDate.value = date\n props.onDateChange?.(date)\n }\n const changeView = (view: ScheduleViewLevel) => {\n if (props.view === undefined) currentView.value = view\n props.onViewChange?.(view)\n }\n return () => {\n const shared = {\n date: currentDate.value,\n onDateChange: changeDate,\n onViewChange: changeView,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n renderEventBody: props.renderEventBody,\n withEventsDragAndDrop: props.withEventsDragAndDrop,\n onEventDrop: props.onEventDrop,\n canDragEvent: props.canDragEvent,\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onTimeSlotClick: props.onTimeSlotClick,\n onAllDaySlotClick: props.onAllDaySlotClick,\n onEventClick: props.onEventClick,\n onDayClick: props.onDayClick,\n onMonthClick: props.onMonthClick,\n withDragSlotSelect: props.withDragSlotSelect,\n onSlotDragEnd: props.onSlotDragEnd,\n mode: props.mode,\n onExternalEventDrop: props.onExternalEventDrop,\n withEventResize: props.withEventResize,\n onEventResize: props.onEventResize,\n canResizeEvent: props.canResizeEvent,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n }\n const components = {\n day: [DayView, props.dayViewProps],\n week: [WeekView, props.weekViewProps],\n month: [MonthView, props.monthViewProps],\n year: [YearView, props.yearViewProps],\n } as const\n const viewSlots: Record<string, unknown> = {}\n if (slots.eventBody) viewSlots.eventBody = slots.eventBody\n if (slots.event) viewSlots.event = slots.event\n if (slots.weekLabel) viewSlots.weekLabel = slots.weekLabel\n if (slots.header) viewSlots.header = slots.header\n const forwardedSlots = Object.keys(viewSlots).length ? viewSlots : undefined\n\n const [component, viewProps] = components[currentView.value]\n const desktop = h(component, { ...shared, ...viewProps }, forwardedSlots)\n\n if (props.layout !== 'responsive') {\n return h(Box, { ...attrs, class: [classes.root, attrs.class], style: attrs.style }, () => [\n desktop,\n ])\n }\n\n const mobile =\n currentView.value === 'year'\n ? h(YearView, { ...shared, ...props.yearViewProps }, forwardedSlots)\n : h(\n MobileMonthView,\n {\n ...shared,\n ...props.mobileMonthViewProps,\n onYearClick: () => changeView('year'),\n onDayClick: (date: DateStringValue, event: MouseEvent) => {\n props.onDayClick?.(date, event)\n props.mobileMonthViewProps?.onDayClick?.(date, event)\n },\n },\n forwardedSlots,\n )\n\n return h(\n Box,\n {\n ...attrs,\n mod: { layout: props.layout },\n class: [classes.root, attrs.class],\n style: attrs.style,\n },\n () => [\n h(Box, { class: classes.desktopView }, () => [desktop]),\n h(Box, { class: classes.mobileView }, () => [mobile]),\n ],\n )\n }\n },\n})\n\nexport type { ScheduleProps }\nexport type ScheduleLayout = 'default' | 'responsive'\nexport type ScheduleStylesNames =\n | 'root'\n | 'desktopView'\n | 'mobileView'\n | import('../DayView/DayView').DayViewStylesNames\n | import('../WeekView/WeekView').WeekViewStylesNames\n | import('../MonthView/MonthView').MonthViewStylesNames\n | import('../YearView/YearView').YearViewStylesNames\n | import('../MobileMonthView/MobileMonthView').MobileMonthViewStylesNames\n","import dayjs from 'dayjs'\nimport { onBeforeUnmount, ref } from 'vue'\nimport type { EventDropData } from '../component-props'\nimport type { DateTimeStringValue, ScheduleEventData, ScheduleMode } from '../types'\nimport { clampIntervalMinutes, parseTimeString } from '../utils'\n\ntype ResizeEdge = 'start' | 'end'\n\ninterface ResizeState {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalLeft: number\n originalWidth: number\n currentLeft: number\n currentWidth: number\n eventDate: string\n originalStart: DateTimeStringValue\n originalEnd: DateTimeStringValue\n dayIndex: number\n dayCount: number\n}\n\nexport function useHorizontalEventResize(input: {\n enabled: () => boolean\n mode: () => ScheduleMode\n startTime: () => string\n endTime: () => string\n intervalMinutes: () => number\n onEventResize: () => ((data: EventDropData) => void) | undefined\n canResizeEvent: () => ((event: ScheduleEventData) => boolean) | undefined\n}) {\n const state = ref<ResizeState | null>(null)\n let justResized = false\n let savedUserSelect = ''\n\n const metrics = () => {\n const start = parseTimeString(input.startTime())\n const end = parseTimeString(input.endTime())\n const startMinutes = start.hours * 60 + start.minutes\n const literalRange = end.hours * 60 + end.minutes - startMinutes\n const interval = clampIntervalMinutes(input.intervalMinutes())\n const total = Math.ceil(literalRange / interval) * interval\n return { startMinutes, literalRange, interval, total, minWidth: (interval / total) * 100 }\n }\n const snap = (percent: number) => {\n const { literalRange, interval, total } = metrics()\n const minutes = Math.max(\n 0,\n Math.min(literalRange, Math.round(((percent / 100) * total) / interval) * interval),\n )\n return (minutes / total) * 100\n }\n const toDateTime = (percent: number, date: string): DateTimeStringValue => {\n const { startMinutes, total } = metrics()\n const minutes = startMinutes + Math.round((snap(percent) / 100) * total)\n return `${date} ${String(Math.floor(minutes / 60)).padStart(2, '0')}:${String(minutes % 60).padStart(2, '0')}:00`\n }\n const move = (event: PointerEvent) => {\n if (!state.value) return\n const rect = state.value.container.getBoundingClientRect()\n const dayWidth = rect.width / state.value.dayCount\n const raw = ((event.clientX - rect.left - state.value.dayIndex * dayWidth) / dayWidth) * 100\n const point = snap(raw)\n const { minWidth } = metrics()\n const current = state.value\n if (current.edge === 'end') {\n current.currentWidth = Math.max(minWidth, point - current.originalLeft)\n } else {\n const right = current.originalLeft + current.originalWidth\n current.currentLeft = Math.min(point, right - minWidth)\n current.currentWidth = right - current.currentLeft\n }\n state.value = { ...current }\n }\n const cleanup = () => {\n document.removeEventListener('pointermove', move)\n document.removeEventListener('pointerup', finish)\n document.body.style.userSelect = savedUserSelect\n }\n const finish = () => {\n const current = state.value\n if (\n current &&\n (current.currentLeft !== current.originalLeft ||\n current.currentWidth !== current.originalWidth)\n ) {\n input.onEventResize()?.({\n eventId: current.event.id,\n newStart:\n current.edge === 'start'\n ? toDateTime(current.currentLeft, current.eventDate)\n : current.originalStart,\n newEnd:\n current.edge === 'end'\n ? toDateTime(current.currentLeft + current.currentWidth, current.eventDate)\n : current.originalEnd,\n event: current.event,\n })\n }\n state.value = null\n cleanup()\n justResized = true\n requestAnimationFrame(() => (justResized = false))\n }\n const handleResizeStart = (params: {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalLeft: number\n originalWidth: number\n eventDate: string\n pointerEvent: PointerEvent\n dayIndex?: number\n dayCount?: number\n }) => {\n if (!input.enabled() || input.mode() === 'static') return\n params.pointerEvent.preventDefault()\n params.pointerEvent.stopPropagation()\n state.value = {\n ...params,\n currentLeft: params.originalLeft,\n currentWidth: params.originalWidth,\n originalStart: dayjs(params.event.start).format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: dayjs(params.event.end).format('YYYY-MM-DD HH:mm:ss'),\n dayIndex: params.dayIndex ?? 0,\n dayCount: params.dayCount ?? 1,\n }\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', move)\n document.addEventListener('pointerup', finish)\n }\n onBeforeUnmount(cleanup)\n return {\n state,\n handleResizeStart,\n getResizePosition: (id: string | number) =>\n state.value?.event.id === id\n ? { left: state.value.currentLeft, width: state.value.currentWidth }\n : null,\n isResizableEvent: (event: ScheduleEventData) =>\n input.enabled() &&\n input.mode() !== 'static' &&\n event.display !== 'background' &&\n (input.canResizeEvent()?.(event) ?? true),\n wasResizing: () => justResized,\n }\n}\n","import type { DayPositionedEventData } from '../../../types'\n\nexport function getOverlapClusters(events: DayPositionedEventData[]): DayPositionedEventData[][] {\n const sorted = [...events].sort((a, b) => a.position.top - b.position.top)\n const clusters: DayPositionedEventData[][] = []\n let current: DayPositionedEventData[] = []\n let end = -1\n sorted.forEach((event) => {\n if (current.length && event.position.top >= end) {\n clusters.push(current)\n current = []\n end = -1\n }\n current.push(event)\n end = Math.max(end, event.position.top + event.position.height)\n })\n if (current.length) clusters.push(current)\n return clusters\n}\n","import dayjs from 'dayjs'\nimport type {\n AnyDateValue,\n DayPositionedEventData,\n ScheduleEventData,\n ScheduleResourceData,\n} from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventInTimeRange, validateEvent } from '../../../utils'\nimport { getDayPositionedEvents } from '../../DayView/get-day-view-events/get-day-positioned-events'\n\nexport interface ResourcesDayViewEventsResult {\n regularEvents: Record<string | number, DayPositionedEventData[]>\n allDayEvents: Record<string | number, DayPositionedEventData[]>\n backgroundTimedEvents: Record<string | number, DayPositionedEventData[]>\n backgroundAllDayEvents: Record<string | number, DayPositionedEventData[]>\n}\n\nexport function getResourcesDayViewEvents({\n events,\n resources,\n date,\n startTime,\n endTime,\n intervalMinutes,\n}: {\n events: ScheduleEventData[] | undefined\n resources: ScheduleResourceData[]\n date: AnyDateValue\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n}): ResourcesDayViewEventsResult {\n const result: ResourcesDayViewEventsResult = {\n regularEvents: {},\n allDayEvents: {},\n backgroundTimedEvents: {},\n backgroundAllDayEvents: {},\n }\n resources.forEach((resource) => {\n result.regularEvents[resource.id] = []\n result.allDayEvents[resource.id] = []\n result.backgroundTimedEvents[resource.id] = []\n result.backgroundAllDayEvents[resource.id] = []\n })\n if (!events) return result\n\n const dayStart = dayjs(date).startOf('day')\n const dayEnd = dayjs(date).endOf('day')\n const regular = new Map<string | number, ScheduleEventData[]>(\n resources.map((resource) => [resource.id, []]),\n )\n const background = new Map<string | number, ScheduleEventData[]>(\n resources.map((resource) => [resource.id, []]),\n )\n const seen = new Set<string | number>()\n\n events.forEach((event) => {\n if (event.resourceId === undefined || !regular.has(event.resourceId)) return\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const startsOnDay = eventStart.isSame(dayStart, 'day')\n if (!startsOnDay && !(eventStart.isBefore(dayEnd) && eventEnd.isAfter(dayStart))) return\n if (startsOnDay && !isEventInTimeRange({ event, startTime, endTime })) return\n if (seen.has(event.id)) {\n throw new Error(\n `[@mantine/schedule] ResourcesDayView: Duplicated event ids found: ${event.id}`,\n )\n }\n seen.add(event.id)\n const validated = validateEvent(event)\n if (event.display === 'background') {\n background.get(event.resourceId)!.push(validated)\n return\n }\n const clipped = startsOnDay\n ? validated\n : {\n ...validated,\n start: (eventStart.isBefore(dayStart) ? dayStart : eventStart).format(\n 'YYYY-MM-DD HH:mm:ss',\n ),\n end: (eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd).format('YYYY-MM-DD HH:mm:ss'),\n }\n if (isEventInTimeRange({ event: clipped, startTime, endTime })) {\n regular.get(event.resourceId)!.push(clipped)\n }\n })\n\n resources.forEach((resource) => {\n getDayPositionedEvents({\n events: regular.get(resource.id)!,\n startTime,\n endTime,\n date,\n intervalMinutes,\n }).forEach((event) => {\n const target = event.position.allDay ? result.allDayEvents : result.regularEvents\n target[resource.id].push(event)\n })\n\n background.get(resource.id)!.forEach((event) => {\n const clippedStart = dayjs(event.start).isBefore(dayStart) ? dayStart : dayjs(event.start)\n const clippedEnd = dayjs(event.end).isAfter(dayEnd) ? dayEnd : dayjs(event.end)\n const clipped = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n const allDay = isAllDayEvent({ event: clipped, date })\n const position = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event: clipped, startTime, endTime, intervalMinutes })\n if (!allDay && position.height <= 0) return\n const target = allDay ? result.backgroundAllDayEvents : result.backgroundTimedEvents\n target[resource.id].push({\n ...event,\n position: {\n ...position,\n allDay,\n width: 100,\n offset: 0,\n column: 0,\n overlaps: 1,\n },\n })\n })\n })\n return result\n}\n",".resourcesDayView {\n --resources-day-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-day-view-resource-label-width: 120px;\n --resources-day-view-slot-width: 80px;\n --resources-day-view-row-height: 64px;\n --resources-day-view-group-label-width: 80px;\n --resources-day-view-all-day-height: 20px;\n\n @mixin where-light {\n --resources-day-view-border-color: var(--mantine-color-gray-3);\n --resources-day-view-business-hours-bg: var(--mantine-color-white);\n --resources-day-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --resources-day-view-border-color: var(--mantine-color-dark-4);\n --resources-day-view-business-hours-bg: var(--mantine-color-dark-7);\n --resources-day-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.resourcesDayViewRoot {\n border: 1px solid var(--resources-day-view-border-color);\n border-radius: var(--resources-day-view-radius);\n overflow: hidden;\n max-width: fit-content;\n position: relative;\n}\n\n.resourcesDayViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n\n.resourcesDayViewInner {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n}\n.resourcesDayViewTimeLabelsRow {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-day-view-border-color);\n margin-bottom: -1px;\n transition: box-shadow 100ms ease;\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n}\n.resourcesDayViewCorner {\n flex: 0 0 var(--resources-day-view-resource-label-width);\n min-width: var(--resources-day-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n position: sticky;\n left: 0;\n z-index: 11;\n background-color: var(--mantine-color-body);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n}\n.resourcesDayViewTimeLabel {\n flex: 0 0 var(--resources-day-view-slot-width);\n min-width: var(--resources-day-view-slot-width);\n max-width: var(--resources-day-view-slot-width);\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n}\n.resourcesDayViewRow {\n display: flex;\n border-top: 1px solid var(--resources-day-view-border-color);\n}\n.resourcesDayViewResourceLabel {\n flex: 0 0 var(--resources-day-view-resource-label-width);\n min-width: var(--resources-day-view-resource-label-width);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n min-height: var(--resources-day-view-row-height);\n position: sticky;\n left: 0;\n z-index: 11;\n background-color: var(--mantine-color-body);\n transition: box-shadow 100ms ease;\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n &:where([data-has-groups]) {\n left: var(--resources-day-view-group-label-width);\n }\n}\n.resourcesDayViewGroupColumn,\n.resourcesDayViewGroupColumnEmpty {\n flex: 0 0 var(--resources-day-view-group-label-width);\n min-width: var(--resources-day-view-group-label-width);\n min-height: var(--resources-day-view-row-height);\n position: sticky;\n left: 0;\n z-index: 12;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n}\n.resourcesDayViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 13;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-day-view-row-height) + 1px);\n }\n}\n.resourcesDayViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-day-view-row-height);\n}\n.resourcesDayViewRowSlot {\n flex: 0 0 var(--resources-day-view-slot-width);\n min-width: var(--resources-day-view-slot-width);\n max-width: var(--resources-day-view-slot-width);\n min-height: var(--resources-day-view-row-height);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n cursor: pointer;\n position: relative;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n.resourcesDayViewCurrentTimeIndicator {\n --_indicator-color: var(--resources-day-view-indicator-color, var(--mantine-color-red-7));\n --_time-bubble-height: 18px;\n --_thumb-size: 12px;\n position: absolute;\n pointer-events: none;\n top: 37px;\n bottom: 0;\n left: var(--indicator-left-offset);\n width: 2px;\n z-index: 3;\n}\n.resourcesDayViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n inset-block: 0;\n background-color: var(--_indicator-color);\n}\n.resourcesDayViewCurrentTimeIndicatorThumb {\n position: absolute;\n top: -5px;\n left: -5px;\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n}\n.resourcesDayViewCurrentTimeIndicatorTimeBubble {\n position: absolute;\n height: var(--_time-bubble-height);\n width: var(--_time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n text-transform: uppercase;\n top: 0;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\n.resourcesDayViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--resources-day-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n.resourcesDayViewAllDayEvent {\n position: absolute;\n inset-inline: 1px;\n height: var(--resources-day-view-all-day-height);\n z-index: 3;\n}\n.resourcesDayViewEventWrapper {\n position: absolute;\n z-index: 3;\n}\n.resourcesDayViewResizeHandle {\n position: absolute;\n top: 20%;\n width: 4px;\n height: 60%;\n cursor: ew-resize;\n z-index: 5;\n border-radius: 2px;\n opacity: 0;\n transition: opacity 100ms ease;\n pointer-events: all;\n background-color: var(--event-color);\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n &:where([data-edge='start']) {\n left: -2px;\n }\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n.resourcesDayViewEventWrapper:hover .resourcesDayViewResizeHandle {\n opacity: 0.5;\n}\n.resourcesDayViewEventWrapper .resourcesDayViewResizeHandle:hover,\n.resourcesDayViewEventWrapper[data-resizing] .resourcesDayViewResizeHandle[data-active] {\n opacity: 0.8;\n}\n.resourcesDayViewEventWrapper[data-resizing] .resourcesDayViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n}\n.resourcesDayView:where([data-event-interaction]) .resourcesDayViewRowSlot {\n pointer-events: none;\n}\n.resourcesDayView:where([data-resizing]) * {\n cursor: ew-resize !important;\n}\n","import dayjs from 'dayjs'\nimport {\n computed,\n defineComponent,\n h,\n nextTick,\n onMounted,\n ref,\n type CSSProperties,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useSafeMantineTheme } from '@mantine-vue/core'\nimport type {\n EventDropData,\n NativeButtonProps,\n RenderEvent,\n RenderEventBody,\n ViewSelectProps,\n} from '../../component-props'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { MoreEvents } from '../MoreEvents/MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent/ScheduleEvent'\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { forwardEventSlots, getDropEvent, moveEventTo, resolveScheduleRadius } from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters'\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events'\nimport classes from './ResourcesDayView.module.css'\n\nexport interface ResourceViewDropData extends EventDropData {\n resourceId?: string | number\n}\n\nexport interface ResourcesDayViewProps {\n date: Date | string\n onDateChange?: (value: DateStringValue) => void\n resources: ScheduleResourceData[]\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n slotLabelFormat?: DateLabelFormat\n radius?: string | number\n startScrollTime?: string\n scrollAreaProps?: Record<string, unknown>\n locale?: string\n withCurrentTimeIndicator?: boolean\n withCurrentTimeBubble?: boolean\n getCurrentTime?: () => AnyDateValue\n withHeader?: boolean\n onViewChange?: (view: ScheduleViewLevel) => void\n previousControlProps?: NativeButtonProps\n nextControlProps?: NativeButtonProps\n todayControlProps?: NativeButtonProps\n viewSelectProps?: Partial<ViewSelectProps>\n headerFormat?: DateLabelFormat\n events?: ScheduleEventData[]\n slotWidth?: CSSProperties['width']\n rowHeight?: CSSProperties['height']\n labels?: ScheduleLabelsOverride\n highlightBusinessHours?: boolean\n businessHours?: [string, string]\n renderEventBody?: RenderEventBody\n renderEvent?: RenderEvent\n renderResourceLabel?: (resource: ScheduleResourceData) => VNodeChild\n groups?: ScheduleResourceGroup[]\n renderGroupLabel?: (group: ScheduleResourceGroup) => VNodeChild\n groupLabelWidth?: CSSProperties['width']\n withEventsDragAndDrop?: boolean\n onEventDrop?: (data: ResourceViewDropData) => void\n canDragEvent?: (event: ScheduleEventData) => boolean\n onEventDragStart?: (event: ScheduleEventData) => void\n onEventDragEnd?: () => void\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue\n slotEnd: DateTimeStringValue\n nativeEvent: MouseEvent\n resourceId?: string | number\n }) => void\n onEventClick?: (event: ScheduleEventData, nativeEvent: MouseEvent) => void\n withDragSlotSelect?: boolean\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue\n rangeEnd: DateTimeStringValue\n resourceId?: string | number\n }) => void\n mode?: ScheduleMode\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer\n dropDateTime: DateTimeStringValue\n resourceId?: string | number\n }) => void\n withEventResize?: boolean\n onEventResize?: (data: EventDropData) => void\n canResizeEvent?: (event: ScheduleEventData) => boolean\n recurrenceExpansionLimit?: number\n maxEventsPerTimeSlot?: number\n moreEventsProps?: Record<string, unknown>\n}\n\nexport interface ResourcesDayViewSlots {\n header?: (props: { date: DateStringValue; label: VNodeChild }) => VNodeChild\n corner?: (props: { resources: ScheduleResourceData[] }) => VNodeChild\n timeLabel?: (props: { label: VNodeChild; startTime: string; endTime: string }) => VNodeChild\n resourceLabel?: (props: { resource: ScheduleResourceData }) => VNodeChild\n groupLabel?: (props: { group: ScheduleResourceGroup }) => VNodeChild\n timeSlot?: (props: {\n resource: ScheduleResourceData\n startTime: string\n endTime: string\n }) => VNodeChild\n backgroundEvent?: (props: { event: ScheduleEventData }) => VNodeChild\n allDayEvent?: (props: { event: ScheduleEventData }) => VNodeChild\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n moreEvents?: (props: { events: ScheduleEventData[]; hiddenCount: number }) => VNodeChild\n currentTimeIndicator?: (props: { time: VNodeChild; offset: number }) => VNodeChild\n}\n\nfunction cssSize(value: CSSProperties['width']): string | undefined {\n return typeof value === 'number' ? `${value}px` : value\n}\n\nexport const ResourcesDayView = defineComponent({\n name: 'ResourcesDayView',\n inheritAttrs: false,\n slots: Object as SlotsType<ResourcesDayViewSlots>,\n props: {\n date: { type: [String, Date] as PropType<Date | string>, required: true },\n onDateChange: Function as PropType<ResourcesDayViewProps['onDateChange']>,\n resources: { type: Array as PropType<ScheduleResourceData[]>, required: true },\n startTime: { type: String, default: '00:00:00' },\n endTime: { type: String, default: '23:59:59' },\n intervalMinutes: { type: Number, default: 60 },\n slotLabelFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'HH:mm' },\n radius: [String, Number] as PropType<string | number>,\n startScrollTime: String,\n scrollAreaProps: Object as PropType<Record<string, unknown>>,\n locale: String,\n withCurrentTimeIndicator: { type: Boolean, default: undefined },\n withCurrentTimeBubble: { type: Boolean, default: true },\n getCurrentTime: Function as PropType<() => AnyDateValue>,\n withHeader: { type: Boolean, default: true },\n onViewChange: Function as PropType<ResourcesDayViewProps['onViewChange']>,\n previousControlProps: Object as PropType<NativeButtonProps>,\n nextControlProps: Object as PropType<NativeButtonProps>,\n todayControlProps: Object as PropType<NativeButtonProps>,\n viewSelectProps: Object as PropType<Partial<ViewSelectProps>>,\n headerFormat: {\n type: [String, Function] as PropType<DateLabelFormat>,\n default: 'MMMM D, YYYY',\n },\n events: Array as PropType<ScheduleEventData[]>,\n slotWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 80 },\n rowHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 64 },\n labels: Object as PropType<ScheduleLabelsOverride>,\n highlightBusinessHours: Boolean,\n businessHours: {\n type: Array as unknown as PropType<[string, string]>,\n default: () => ['09:00:00', '17:00:00'],\n },\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n renderResourceLabel: Function as PropType<ResourcesDayViewProps['renderResourceLabel']>,\n groups: Array as PropType<ScheduleResourceGroup[]>,\n renderGroupLabel: Function as PropType<ResourcesDayViewProps['renderGroupLabel']>,\n groupLabelWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 80 },\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<ResourcesDayViewProps['onEventDrop']>,\n canDragEvent: Function as PropType<ResourcesDayViewProps['canDragEvent']>,\n onEventDragStart: Function as PropType<ResourcesDayViewProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<ResourcesDayViewProps['onEventDragEnd']>,\n onTimeSlotClick: Function as PropType<ResourcesDayViewProps['onTimeSlotClick']>,\n onEventClick: Function as PropType<ResourcesDayViewProps['onEventClick']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<ResourcesDayViewProps['onSlotDragEnd']>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n onExternalEventDrop: Function as PropType<ResourcesDayViewProps['onExternalEventDrop']>,\n withEventResize: Boolean,\n onEventResize: Function as PropType<ResourcesDayViewProps['onEventResize']>,\n canResizeEvent: Function as PropType<ResourcesDayViewProps['canResizeEvent']>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n maxEventsPerTimeSlot: { type: Number, default: 2 },\n moreEventsProps: Object as PropType<Record<string, unknown>>,\n },\n setup(props, { attrs, slots }) {\n const theme = useSafeMantineTheme()\n const controls: ResourcesGridControls = []\n const rootElement = ref<HTMLElement | null>(null)\n const rowContainers = new Map<number, HTMLElement>()\n const dropTarget = ref<{ resourceId: string | number; slotIndex: number } | null>(null)\n const scrolled = ref(false)\n const scrolledX = ref(false)\n const intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n }),\n )\n const ordered = computed(() => getOrderedResources(props.resources, props.groups))\n const resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\n const expandedEvents = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: dayjs(props.date).startOf('day').toDate(),\n rangeEnd: dayjs(props.date).endOf('day').toDate(),\n expansionLimit: props.recurrenceExpansionLimit,\n }),\n )\n\n onMounted(async () => {\n if (!props.startScrollTime) return\n await nextTick()\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n if (targetIndex < 0) return\n const target = controls[0]?.[targetIndex]\n const viewport = rootElement.value?.querySelector<HTMLElement>('.mantine-ScrollArea-viewport')\n if (target && viewport) {\n viewport.scrollLeft = target.offsetLeft\n requestAnimationFrame(() => (viewport.scrollLeft = target.offsetLeft))\n }\n })\n const positioned = computed(() =>\n getResourcesDayViewEvents({\n date: props.date,\n events: expandedEvents.value,\n resources: props.resources,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n }),\n )\n const slotSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () => (start, end, group) => {\n const first = intervals.value[start]\n const last = intervals.value[end]\n if (first && last) {\n const date = dayjs(props.date).format('YYYY-MM-DD')\n props.onSlotDragEnd?.({\n rangeStart: `${date} ${first.startTime}`,\n rangeEnd: `${date} ${last.endTime}`,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n })\n const resize = useHorizontalEventResize({\n enabled: () => props.withEventResize,\n mode: () => props.mode,\n startTime: () => props.startTime,\n endTime: () => props.endTime,\n intervalMinutes: () => props.intervalMinutes,\n onEventResize: () => props.onEventResize,\n canResizeEvent: () => props.canResizeEvent,\n })\n\n const emitDrop = (nativeEvent: DragEvent, resourceId: string | number, slotIndex: number) => {\n nativeEvent.preventDefault()\n dropTarget.value = null\n const interval = intervals.value[slotIndex]\n if (!interval) return\n const target = `${dayjs(props.date).format('YYYY-MM-DD')} ${interval.startTime}`\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.({ ...moveEventTo(event, target), resourceId })\n else if (nativeEvent.dataTransfer) {\n props.onExternalEventDrop?.({\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n }\n const getSlotIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n if (!container || intervals.value.length === 0) return -1\n const rect = container.getBoundingClientRect()\n if (rect.width <= 0) return -1\n return Math.max(\n 0,\n Math.min(\n intervals.value.length - 1,\n Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * intervals.value.length),\n ),\n )\n }\n\n const renderGroupCell = (info: ResourceGroupInfo | null | undefined) => {\n if (info === undefined) return null\n if (info === null) return h(Box, { class: classes.resourcesDayViewGroupColumnEmpty })\n const starts = info.position === 'first' || info.position === 'only'\n return h(\n Box,\n { class: classes.resourcesDayViewGroupColumn, 'data-group-position': info.position },\n () =>\n starts\n ? h(\n 'span',\n {\n style:\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-day-view-row-height) + 1px)) / 2))`,\n }\n : undefined,\n },\n slots.groupLabel?.({ group: info.group }) ??\n props.renderGroupLabel?.(info.group) ??\n info.group.label ??\n undefined,\n )\n : null,\n )\n }\n\n return () => {\n const date = dayjs(props.date).format('YYYY-MM-DD')\n const now = dayjs(props.getCurrentTime?.() ?? new Date())\n const isToday = dayjs(props.date).isSame(now, 'day')\n const showIndicator =\n (props.withCurrentTimeIndicator ?? isToday) &&\n isInTimeRange({ date: now.toDate(), startTime: props.startTime, endTime: props.endTime })\n const indicatorOffset = getCurrentTimePosition({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n now,\n })\n const currentTime = formatDate({\n date: now,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n })\n const hasGroups = ordered.value.groupRanges.length > 0\n\n const timeLabels = intervals.value.map((interval) => {\n const label = formatDate({\n date: `${date} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n })\n const mod = getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n })\n return h(\n Box,\n {\n key: interval.startTime,\n class: classes.resourcesDayViewTimeLabel,\n 'data-business-hours': mod['business-hours'] || undefined,\n 'data-non-business-hours': mod['non-business-hours'] || undefined,\n },\n () =>\n slots.timeLabel?.({\n label,\n startTime: interval.startTime,\n endTime: interval.endTime,\n }) ?? label,\n )\n })\n\n const rows = ordered.value.orderedResources.map((resource, resourceIndex) => {\n const resourceEvents = positioned.value\n const background = [\n ...(resourceEvents.backgroundTimedEvents[resource.id] || []),\n ...(resourceEvents.backgroundAllDayEvents[resource.id] || []),\n ].map((event) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n return (\n slots.backgroundEvent?.({ event }) ??\n h(\n Box,\n {\n key: `bg-${event.id}`,\n class: classes.resourcesDayViewBackgroundEvent,\n style: {\n left: `${event.position.top}%`,\n right: `${100 - event.position.top - event.position.height}%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n },\n },\n () => props.renderEventBody?.(event) ?? slots.eventBody?.({ event }) ?? event.title,\n )\n )\n })\n const allRegular = resourceEvents.regularEvents[resource.id] || []\n const visible = allRegular.filter(\n (event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot),\n )\n const regular = visible.map((event) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n const position = resize.getResizePosition(event.id)\n const left = position?.left ?? event.position.top\n const width = position?.width ?? event.position.height\n const isResizable = resize.isResizableEvent(event)\n const isResizing = position !== null\n const wrapperStyle: CSSProperties = {\n left: `calc(${left}% + 1px)`,\n width: `calc(${width}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n }\n return h(\n Box,\n {\n key: event.id,\n class: classes.resourcesDayViewEventWrapper,\n 'data-resizing': isResizing || undefined,\n style: { ...wrapperStyle, '--event-color': colors.color },\n },\n () => [\n h(\n ScheduleEvent,\n {\n event,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n draggable:\n props.withEventsDragAndDrop &&\n props.mode !== 'static' &&\n (props.canDragEvent?.(event) ?? true),\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) props.onEventClick?.(event, nativeEvent)\n },\n style: { width: '100%', height: '100%' },\n },\n forwardEventSlots(slots),\n ),\n isResizable\n ? ['start', 'end'].map((edge) =>\n h('div', {\n class: classes.resourcesDayViewResizeHandle,\n 'data-edge': edge,\n 'data-active': resize.state.value?.edge === edge || undefined,\n 'aria-label': `${edge === 'start' ? 'Resize event start' : 'Resize event end'} ${event.title}`,\n onDragstart: (nativeEvent: DragEvent) => nativeEvent.preventDefault(),\n onPointerdown: (pointerEvent: PointerEvent) => {\n const container = rowContainers.get(resourceIndex)\n if (container)\n resize.handleResizeStart({\n event,\n edge: edge as 'start' | 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: date,\n pointerEvent,\n })\n },\n }),\n )\n : null,\n ],\n )\n })\n const allDay = (resourceEvents.allDayEvents[resource.id] || []).map((event, index) =>\n h(\n Box,\n {\n key: `all-${event.id}`,\n class: classes.resourcesDayViewAllDayEvent,\n style: {\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n },\n },\n () =>\n slots.allDayEvent?.({ event }) ??\n h(\n ScheduleEvent,\n {\n event,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => props.onEventClick?.(event, nativeEvent),\n style: { width: '100%', height: '100%' },\n },\n forwardEventSlots(slots),\n ),\n ),\n )\n const more = getOverlapClusters(allRegular)\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot),\n )\n .map((cluster) => {\n const hiddenCount = cluster.filter(\n (event) => event.position.column >= props.maxEventsPerTimeSlot,\n ).length\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(\n ...cluster.map((event) => event.position.top + event.position.height),\n )\n return (\n slots.moreEvents?.({ events: cluster, hiddenCount }) ??\n h(\n MoreEvents,\n {\n ...props.moreEventsProps,\n key: `more-${cluster[0].id}`,\n events: cluster,\n moreEventsCount: hiddenCount,\n mode: props.mode,\n labels: props.labels,\n renderEventBody: props.renderEventBody,\n renderEvent: props.renderEvent,\n onEventClick: props.onEventClick,\n style: {\n position: 'absolute',\n left: `calc(${left}% + 1px)`,\n width: `calc(${right - left}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n },\n forwardEventSlots(slots),\n )\n )\n })\n const slotGroup = String(resource.id)\n const buttons = intervals.value.map((interval, slotIndex) => {\n const mod = getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n })\n return h(\n UnstyledButton,\n {\n key: interval.startTime,\n ref: (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][slotIndex] =\n button instanceof HTMLButtonElement ? button : undefined\n },\n class: classes.resourcesDayViewRowSlot,\n 'data-business-hours': mod['business-hours'] || undefined,\n 'data-non-business-hours': mod['non-business-hours'] || undefined,\n 'data-drop-target':\n dropTarget.value?.resourceId === resource.id &&\n dropTarget.value.slotIndex === slotIndex\n ? true\n : undefined,\n 'data-drag-selected': slotSelect.isSlotSelected(slotIndex, slotGroup) || undefined,\n 'data-static': props.mode === 'static' || undefined,\n 'data-drag-slot-index': props.withDragSlotSelect ? slotIndex : undefined,\n 'data-drag-slot-group': props.withDragSlotSelect ? slotGroup : undefined,\n 'aria-label': `${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${date} ${interval.startTime} - ${interval.endTime}`,\n tabindex:\n props.mode === 'static' ? -1 : resourceIndex === 0 && slotIndex === 0 ? 0 : -1,\n onKeydown: (event: KeyboardEvent) =>\n handleResourcesGridKeyDown({ controls, resourceIndex, slotIndex, event }),\n onPointerdown:\n props.mode === 'static'\n ? undefined\n : (event: PointerEvent) =>\n slotSelect.handleSlotPointerDown(event, slotIndex, slotGroup),\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) =>\n props.onTimeSlotClick?.({\n slotStart: `${date} ${interval.startTime}`,\n slotEnd: `${date} ${interval.endTime}`,\n nativeEvent,\n resourceId: resource.id,\n }),\n },\n () =>\n slots.timeSlot?.({\n resource,\n startTime: interval.startTime,\n endTime: interval.endTime,\n }),\n )\n })\n const groupInfo = hasGroups ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n const allDayCount = resourceEvents.allDayEvents[resource.id]?.length || 0\n return h(Box, { key: resource.id, class: classes.resourcesDayViewRow }, () => [\n renderGroupCell(groupInfo),\n h(\n Box,\n {\n class: classes.resourcesDayViewResourceLabel,\n 'data-scrolled-x': scrolledX.value || undefined,\n 'data-has-groups': groupInfo !== undefined || undefined,\n },\n () =>\n slots.resourceLabel?.({ resource }) ??\n props.renderResourceLabel?.(resource) ??\n resource.label,\n ),\n h(\n Box,\n {\n class: classes.resourcesDayViewRowSlots,\n ref: (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n if (node instanceof HTMLElement) rowContainers.set(resourceIndex, node)\n },\n style: allDayCount\n ? {\n minHeight: `max(var(--resources-day-view-row-height), calc(${allDayCount} * (var(--resources-day-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined,\n onDragover:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n if (props.mode === 'static') return\n nativeEvent.preventDefault()\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n if (\n slotIndex >= 0 &&\n (dropTarget.value?.resourceId !== resource.id ||\n dropTarget.value.slotIndex !== slotIndex)\n ) {\n dropTarget.value = { resourceId: resource.id, slotIndex }\n }\n }\n : undefined,\n onDragleave:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n dropTarget.value = null\n }\n }\n : undefined,\n onDrop:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n if (slotIndex >= 0) emitDrop(nativeEvent, resource.id, slotIndex)\n }\n : undefined,\n },\n () => [...background, ...allDay, ...regular, ...more, ...buttons],\n ),\n ])\n })\n\n const headerLabel = formatDate({\n date: props.date,\n locale: props.locale || 'en',\n format: props.headerFormat,\n })\n const header = props.withHeader\n ? (slots.header?.({ date, label: headerLabel }) ??\n h(ScheduleHeaderBase, {\n view: 'day',\n navigationHandlers: {\n previous: () => dayjs(props.date).subtract(1, 'day').format('YYYY-MM-DD'),\n next: () => dayjs(props.date).add(1, 'day').format('YYYY-MM-DD'),\n today: () => now.format('YYYY-MM-DD'),\n },\n control: { title: headerLabel },\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: { views: ['day', 'week', 'month'], ...props.viewSelectProps },\n }))\n : null\n const indicator = showIndicator\n ? (slots.currentTimeIndicator?.({ time: currentTime, offset: indicatorOffset }) ??\n h(\n Box,\n {\n class: classes.resourcesDayViewCurrentTimeIndicator,\n style: {\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width) + (100% - var(--resources-day-view-resource-label-width) - var(--resources-day-view-group-label-width)) * ${indicatorOffset} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${indicatorOffset} / 100)`,\n '--_time-bubble-width': String(currentTime).toLowerCase().includes('m')\n ? '64px'\n : '46px',\n },\n },\n () => [\n props.withCurrentTimeBubble\n ? h(\n 'div',\n { class: classes.resourcesDayViewCurrentTimeIndicatorTimeBubble },\n currentTime,\n )\n : h('div', { class: classes.resourcesDayViewCurrentTimeIndicatorThumb }),\n h('div', { class: classes.resourcesDayViewCurrentTimeIndicatorLine }),\n ],\n ))\n : null\n\n return h(\n Box,\n {\n ...attrs,\n ref: (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n rootElement.value = node instanceof HTMLElement ? node : null\n },\n class: [classes.resourcesDayView, attrs.class],\n style: [\n {\n '--resources-day-view-radius': resolveScheduleRadius(props.radius),\n '--resources-day-view-slot-width': cssSize(props.slotWidth),\n '--resources-day-view-row-height': cssSize(props.rowHeight),\n '--resources-day-view-group-label-width': cssSize(props.groupLabelWidth),\n },\n attrs.style,\n ],\n 'data-resizing': resize.state.value ? true : undefined,\n 'data-event-interaction': resize.state.value ? true : undefined,\n },\n () => [\n header,\n h(Box, { class: classes.resourcesDayViewRoot }, () =>\n h(\n ScrollArea,\n {\n scrollbarSize: 4,\n ...props.scrollAreaProps,\n class: classes.resourcesDayViewScrollArea,\n onScrollPositionChange: (position: { x: number; y: number }) => {\n scrolled.value = position.y !== 0\n scrolledX.value = position.x !== 0\n },\n },\n () =>\n h('div', { class: classes.resourcesDayViewInner }, [\n h(\n Box,\n {\n class: classes.resourcesDayViewTimeLabelsRow,\n 'data-scrolled': scrolled.value || undefined,\n },\n () => [\n h(\n 'div',\n {\n class: classes.resourcesDayViewCorner,\n style: hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n }\n : undefined,\n },\n slots.corner?.({ resources: ordered.value.orderedResources }) ??\n getLabel('resources', props.labels),\n ),\n ...timeLabels,\n ],\n ),\n ...rows,\n indicator,\n ]),\n ),\n ),\n ],\n )\n }\n },\n})\n\nexport type ResourcesDayViewStylesNames = keyof typeof classes\n","import dayjs from 'dayjs'\nimport type { ScheduleEventData, ScheduleResourceData } from '../../../types'\nimport { expandRecurringEvents, isMultidayEvent } from '../../../utils'\nimport {\n getResourcesDayViewEvents,\n type ResourcesDayViewEventsResult,\n} from '../../ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events'\nimport { calculateEventDays } from '../../WeekView/get-week-view-events/calculate-event-days'\nimport { getEventEndDate } from '../../WeekView/get-week-view-events/get-event-end-date'\n\nexport interface ResourcesWeekViewAllDayBar {\n event: ScheduleEventData\n startDayIndex: number\n endDayIndex: number\n row: number\n}\n\nexport interface ResourcesWeekViewEventsResult {\n byDay: Record<string, ResourcesDayViewEventsResult>\n allDayBars: Record<string | number, ResourcesWeekViewAllDayBar[]>\n}\n\nfunction assignAllDayRows(bars: ResourcesWeekViewAllDayBar[]): void {\n const rowEnds: number[] = []\n ;[...bars]\n .sort((a, b) => a.startDayIndex - b.startDayIndex || a.endDayIndex - b.endDayIndex)\n .forEach((bar) => {\n let row = 0\n while (row < rowEnds.length && rowEnds[row] >= bar.startDayIndex) row += 1\n rowEnds[row] = bar.endDayIndex\n bar.row = row\n })\n}\n\nexport function getResourcesWeekViewEvents({\n events,\n resources,\n weekdays,\n startTime,\n endTime,\n intervalMinutes,\n expansionLimit,\n}: {\n events: ScheduleEventData[] | undefined\n resources: ScheduleResourceData[]\n weekdays: string[]\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n expansionLimit?: number\n}): ResourcesWeekViewEventsResult {\n const expanded = expandRecurringEvents({\n events,\n rangeStart: dayjs(weekdays[0]).startOf('day').toDate(),\n rangeEnd: dayjs(weekdays.at(-1)).endOf('day').toDate(),\n expansionLimit,\n })\n const seen = new Set<string | number>()\n expanded?.forEach((event) => {\n if (seen.has(event.id)) {\n throw new Error(\n `[@mantine/schedule] ResourcesWeekView: Duplicated event ids found: ${event.id}`,\n )\n }\n seen.add(event.id)\n })\n\n const byDay: Record<string, ResourcesDayViewEventsResult> = {}\n const assigned = new Set<string | number>()\n const spanning = (event: ScheduleEventData) =>\n event.display !== 'background' && isMultidayEvent(event)\n weekdays.forEach((day) => {\n const dayEvents = expanded?.filter((event) => {\n if (assigned.has(event.id) || spanning(event)) return false\n const start = dayjs(event.start)\n const dayStart = dayjs(day).startOf('day')\n if (start.isSame(dayStart, 'day')) {\n assigned.add(event.id)\n return true\n }\n return (\n event.display === 'background' &&\n start.isBefore(dayjs(day).endOf('day')) &&\n dayjs(event.end).isAfter(dayStart)\n )\n })\n byDay[day] = getResourcesDayViewEvents({\n events: dayEvents,\n resources,\n date: day,\n startTime,\n endTime,\n intervalMinutes,\n })\n })\n\n const allDayBars: Record<string | number, ResourcesWeekViewAllDayBar[]> = {}\n resources.forEach((resource) => (allDayBars[resource.id] = []))\n weekdays.forEach((day, dayIndex) => {\n resources.forEach((resource) => {\n byDay[day].allDayEvents[resource.id]?.forEach((event) =>\n allDayBars[resource.id].push({\n event,\n startDayIndex: dayIndex,\n endDayIndex: dayIndex,\n row: 0,\n }),\n )\n })\n })\n expanded?.forEach((event) => {\n if (!spanning(event) || event.resourceId === undefined || !(event.resourceId in allDayBars))\n return\n const days = calculateEventDays({\n event,\n weekDays: weekdays,\n actualEndDate: getEventEndDate(event),\n })\n if (!days.length) return\n allDayBars[event.resourceId].push({\n event,\n startDayIndex: weekdays.indexOf(days[0]),\n endDayIndex: weekdays.indexOf(days.at(-1)!),\n row: 0,\n })\n })\n resources.forEach((resource) => assignAllDayRows(allDayBars[resource.id]))\n return { byDay, allDayBars }\n}\n",".resourcesWeekView {\n --resources-week-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-week-view-resource-label-width: 120px;\n --resources-week-view-slot-width: 60px;\n --resources-week-view-row-height: 64px;\n --resources-week-view-group-label-width: 80px;\n --resources-week-view-all-day-height: 20px;\n @mixin where-light {\n --resources-week-view-border-color: var(--mantine-color-gray-3);\n --resources-week-view-business-hours-bg: var(--mantine-color-white);\n --resources-week-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n --resources-week-view-border-color: var(--mantine-color-dark-4);\n --resources-week-view-business-hours-bg: var(--mantine-color-dark-7);\n --resources-week-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n.resourcesWeekViewRoot {\n border: 1px solid var(--resources-week-view-border-color);\n border-radius: var(--resources-week-view-radius);\n overflow: hidden;\n max-width: fit-content;\n position: relative;\n}\n.resourcesWeekViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n.resourcesWeekViewInner {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n}\n.resourcesWeekViewHeaderRows {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-week-view-border-color);\n margin-bottom: -1px;\n}\n.resourcesWeekViewCorner {\n flex: 0 0 var(--resources-week-view-resource-label-width);\n min-width: var(--resources-week-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n position: sticky;\n left: 0;\n z-index: 6;\n background-color: var(--mantine-color-body);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n}\n.resourcesWeekViewHeaderContent {\n display: flex;\n flex-direction: column;\n}\n.resourcesWeekViewDayLabelsRow {\n display: flex;\n border-bottom: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewDayLabel {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n cursor: default;\n height: 32px;\n text-transform: capitalize;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n &:where([data-today]) {\n color: var(--mantine-primary-color-contrast);\n background-color: var(--mantine-primary-color-filled);\n font-weight: var(--mantine-font-weight-bold);\n }\n}\n.resourcesWeekViewTimeLabelsRow {\n display: flex;\n}\n.resourcesWeekViewTimeLabel {\n flex: 0 0 var(--resources-week-view-slot-width);\n min-width: var(--resources-week-view-slot-width);\n max-width: var(--resources-week-view-slot-width);\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-week-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-week-view-non-business-hours-bg);\n }\n}\n.resourcesWeekViewRow {\n display: flex;\n border-top: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewResourceLabel {\n flex: 0 0 var(--resources-week-view-resource-label-width);\n min-width: var(--resources-week-view-resource-label-width);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n min-height: var(--resources-week-view-row-height);\n position: sticky;\n left: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n transition: box-shadow 100ms ease;\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n &:where([data-has-groups]) {\n left: var(--resources-week-view-group-label-width);\n }\n}\n.resourcesWeekViewGroupColumn,\n.resourcesWeekViewGroupColumnEmpty {\n flex: 0 0 var(--resources-week-view-group-label-width);\n min-width: var(--resources-week-view-group-label-width);\n min-height: var(--resources-week-view-row-height);\n position: sticky;\n left: 0;\n z-index: 12;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 13;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-week-view-row-height) + 1px);\n }\n}\n.resourcesWeekViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-week-view-row-height);\n}\n.resourcesWeekViewRowSlot {\n flex: 0 0 var(--resources-week-view-slot-width);\n min-width: var(--resources-week-view-slot-width);\n max-width: var(--resources-week-view-slot-width);\n min-height: var(--resources-week-view-row-height);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n cursor: pointer;\n position: relative;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-week-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-week-view-non-business-hours-bg);\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-color-blue-4);\n border-radius: 2px;\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n}\n.resourcesWeekViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--resources-week-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n.resourcesWeekViewAllDayEvent {\n position: absolute;\n height: var(--resources-week-view-all-day-height);\n z-index: 2;\n}\n.resourcesWeekViewEventWrapper {\n position: absolute;\n z-index: 3;\n}\n.resourcesWeekViewResizeHandle {\n position: absolute;\n top: 20%;\n width: 4px;\n height: 60%;\n cursor: ew-resize;\n z-index: 5;\n border-radius: 2px;\n opacity: 0;\n transition: opacity 100ms ease;\n pointer-events: all;\n background-color: var(--event-color);\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n &:where([data-edge='start']) {\n left: -2px;\n }\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n.resourcesWeekViewEventWrapper:hover .resourcesWeekViewResizeHandle {\n opacity: 0.5;\n}\n.resourcesWeekViewEventWrapper .resourcesWeekViewResizeHandle:hover,\n.resourcesWeekViewEventWrapper[data-resizing] .resourcesWeekViewResizeHandle[data-active] {\n opacity: 0.8;\n}\n.resourcesWeekViewEventWrapper[data-resizing] .resourcesWeekViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n}\n.resourcesWeekView:where([data-event-interaction]) .resourcesWeekViewRowSlot {\n pointer-events: none;\n}\n.resourcesWeekView:where([data-resizing]) * {\n cursor: ew-resize !important;\n}\n.resourcesWeekViewCurrentTimeIndicator {\n --_indicator-color: var(--resources-week-view-indicator-color, var(--mantine-color-red-7));\n --_time-bubble-height: 18px;\n --_thumb-size: 12px;\n position: absolute;\n pointer-events: none;\n top: 62px;\n bottom: 0;\n left: var(--indicator-left-offset);\n width: 2px;\n z-index: 3;\n}\n.resourcesWeekViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n inset-block: 0;\n background-color: var(--_indicator-color);\n}\n.resourcesWeekViewCurrentTimeIndicatorThumb {\n position: absolute;\n top: -5px;\n left: -5px;\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n}\n.resourcesWeekViewCurrentTimeIndicatorTimeBubble {\n position: absolute;\n top: 0;\n height: var(--_time-bubble-height);\n width: var(--_time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n text-transform: uppercase;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\n","import dayjs from 'dayjs'\nimport {\n computed,\n defineComponent,\n h,\n nextTick,\n onMounted,\n ref,\n type CSSProperties,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useSafeMantineTheme } from '@mantine-vue/core'\nimport type {\n EventDropData,\n NativeButtonProps,\n RenderEvent,\n RenderEventBody,\n ViewSelectProps,\n} from '../../component-props'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n getWeekDays,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { MoreEvents } from '../MoreEvents/MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent/ScheduleEvent'\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { forwardEventSlots, getDropEvent, moveEventTo, resolveScheduleRadius } from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getWeekLabel } from '../WeekView/get-week-label/get-week-label'\nimport { getOverlapClusters } from '../ResourcesDayView/get-overlap-clusters/get-overlap-clusters'\nimport type { ResourceViewDropData } from '../ResourcesDayView/ResourcesDayView'\nimport { getResourcesWeekViewEvents } from './get-resources-week-view-events/get-resources-week-view-events'\nimport classes from './ResourcesWeekView.module.css'\n\nexport interface ResourcesWeekViewProps {\n date: Date | string\n onDateChange?: (value: DateStringValue) => void\n resources: ScheduleResourceData[]\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n slotLabelFormat?: DateLabelFormat\n radius?: string | number\n startScrollDateTime?: string\n scrollAreaProps?: Record<string, unknown>\n locale?: string\n withCurrentTimeIndicator?: boolean\n withCurrentTimeBubble?: boolean\n getCurrentTime?: () => AnyDateValue\n withHeader?: boolean\n onViewChange?: (view: ScheduleViewLevel) => void\n previousControlProps?: NativeButtonProps\n nextControlProps?: NativeButtonProps\n todayControlProps?: NativeButtonProps\n viewSelectProps?: Partial<ViewSelectProps>\n weekLabelFormat?: DateLabelFormat\n renderWeekLabel?: (params: { weekStart: DateStringValue; weekEnd: DateStringValue }) => VNodeChild\n events?: ScheduleEventData[]\n slotWidth?: CSSProperties['width']\n rowHeight?: CSSProperties['height']\n labels?: ScheduleLabelsOverride\n highlightBusinessHours?: boolean\n businessHours?: [string, string]\n renderEventBody?: RenderEventBody\n renderEvent?: RenderEvent\n renderResourceLabel?: (resource: ScheduleResourceData) => VNodeChild\n groups?: ScheduleResourceGroup[]\n renderGroupLabel?: (group: ScheduleResourceGroup) => VNodeChild\n groupLabelWidth?: CSSProperties['width']\n withEventsDragAndDrop?: boolean\n onEventDrop?: (data: ResourceViewDropData) => void\n canDragEvent?: (event: ScheduleEventData) => boolean\n onEventDragStart?: (event: ScheduleEventData) => void\n onEventDragEnd?: () => void\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue\n slotEnd: DateTimeStringValue\n nativeEvent: MouseEvent\n resourceId?: string | number\n }) => void\n onEventClick?: (event: ScheduleEventData, nativeEvent: MouseEvent) => void\n withDragSlotSelect?: boolean\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue\n rangeEnd: DateTimeStringValue\n resourceId?: string | number\n }) => void\n mode?: ScheduleMode\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer\n dropDateTime: DateTimeStringValue\n resourceId?: string | number\n }) => void\n withEventResize?: boolean\n onEventResize?: (data: EventDropData) => void\n canResizeEvent?: (event: ScheduleEventData) => boolean\n recurrenceExpansionLimit?: number\n maxEventsPerTimeSlot?: number\n moreEventsProps?: Record<string, unknown>\n firstDayOfWeek?: DayOfWeek\n weekendDays?: DayOfWeek[]\n withWeekendDays?: boolean\n weekdayFormat?: DateLabelFormat\n highlightToday?: boolean\n}\n\nexport interface ResourcesWeekViewSlots {\n header?: (props: {\n weekStart: DateStringValue\n weekEnd: DateStringValue\n label: VNodeChild\n }) => VNodeChild\n corner?: (props: { resources: ScheduleResourceData[] }) => VNodeChild\n dayLabel?: (props: { date: DateStringValue; label: VNodeChild }) => VNodeChild\n timeLabel?: (props: {\n date: DateStringValue\n label: VNodeChild\n startTime: string\n endTime: string\n }) => VNodeChild\n resourceLabel?: (props: { resource: ScheduleResourceData }) => VNodeChild\n groupLabel?: (props: { group: ScheduleResourceGroup }) => VNodeChild\n timeSlot?: (props: {\n resource: ScheduleResourceData\n date: DateStringValue\n startTime: string\n endTime: string\n }) => VNodeChild\n backgroundEvent?: (props: { event: ScheduleEventData; date: DateStringValue }) => VNodeChild\n allDayEvent?: (props: {\n event: ScheduleEventData\n startDayIndex: number\n endDayIndex: number\n }) => VNodeChild\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n moreEvents?: (props: {\n events: ScheduleEventData[]\n hiddenCount: number\n date: DateStringValue\n }) => VNodeChild\n currentTimeIndicator?: (props: {\n time: VNodeChild\n offset: number\n date: DateStringValue\n }) => VNodeChild\n}\n\nfunction cssSize(value: CSSProperties['width']): string | undefined {\n return typeof value === 'number' ? `${value}px` : value\n}\n\nexport const ResourcesWeekView = defineComponent({\n name: 'ResourcesWeekView',\n inheritAttrs: false,\n slots: Object as SlotsType<ResourcesWeekViewSlots>,\n props: {\n date: { type: [String, Date] as PropType<Date | string>, required: true },\n onDateChange: Function as PropType<ResourcesWeekViewProps['onDateChange']>,\n resources: { type: Array as PropType<ScheduleResourceData[]>, required: true },\n startTime: { type: String, default: '00:00:00' },\n endTime: { type: String, default: '23:59:59' },\n intervalMinutes: { type: Number, default: 60 },\n slotLabelFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'HH:mm' },\n radius: [String, Number] as PropType<string | number>,\n startScrollDateTime: String,\n scrollAreaProps: Object as PropType<Record<string, unknown>>,\n locale: String,\n withCurrentTimeIndicator: { type: Boolean, default: undefined },\n withCurrentTimeBubble: { type: Boolean, default: true },\n getCurrentTime: Function as PropType<() => AnyDateValue>,\n withHeader: { type: Boolean, default: true },\n onViewChange: Function as PropType<ResourcesWeekViewProps['onViewChange']>,\n previousControlProps: Object as PropType<NativeButtonProps>,\n nextControlProps: Object as PropType<NativeButtonProps>,\n todayControlProps: Object as PropType<NativeButtonProps>,\n viewSelectProps: Object as PropType<Partial<ViewSelectProps>>,\n weekLabelFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'MMM DD' },\n renderWeekLabel: Function as PropType<ResourcesWeekViewProps['renderWeekLabel']>,\n events: Array as PropType<ScheduleEventData[]>,\n slotWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 60 },\n rowHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 64 },\n labels: Object as PropType<ScheduleLabelsOverride>,\n highlightBusinessHours: Boolean,\n businessHours: {\n type: Array as unknown as PropType<[string, string]>,\n default: () => ['09:00:00', '17:00:00'],\n },\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n renderResourceLabel: Function as PropType<ResourcesWeekViewProps['renderResourceLabel']>,\n groups: Array as PropType<ScheduleResourceGroup[]>,\n renderGroupLabel: Function as PropType<ResourcesWeekViewProps['renderGroupLabel']>,\n groupLabelWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 80 },\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<ResourcesWeekViewProps['onEventDrop']>,\n canDragEvent: Function as PropType<ResourcesWeekViewProps['canDragEvent']>,\n onEventDragStart: Function as PropType<ResourcesWeekViewProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<ResourcesWeekViewProps['onEventDragEnd']>,\n onTimeSlotClick: Function as PropType<ResourcesWeekViewProps['onTimeSlotClick']>,\n onEventClick: Function as PropType<ResourcesWeekViewProps['onEventClick']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<ResourcesWeekViewProps['onSlotDragEnd']>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n onExternalEventDrop: Function as PropType<ResourcesWeekViewProps['onExternalEventDrop']>,\n withEventResize: Boolean,\n onEventResize: Function as PropType<ResourcesWeekViewProps['onEventResize']>,\n canResizeEvent: Function as PropType<ResourcesWeekViewProps['canResizeEvent']>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n maxEventsPerTimeSlot: { type: Number, default: 2 },\n moreEventsProps: Object as PropType<Record<string, unknown>>,\n firstDayOfWeek: { type: Number as PropType<DayOfWeek>, default: 1 },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n withWeekendDays: { type: Boolean, default: true },\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'ddd D' },\n highlightToday: { type: Boolean, default: true },\n },\n setup(props, { attrs, slots }) {\n const theme = useSafeMantineTheme()\n const controls: ResourcesGridControls = []\n const rootElement = ref<HTMLElement | null>(null)\n const rowContainers = new Map<number, HTMLElement>()\n const dropTarget = ref<{ resourceId: string | number; flatIndex: number } | null>(null)\n const scrolledX = ref(false)\n const intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n }),\n )\n const weekdays = computed(() =>\n getWeekDays({\n week: props.date,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n }).map((day) => dayjs(day).format('YYYY-MM-DD')),\n )\n const ordered = computed(() => getOrderedResources(props.resources, props.groups))\n const resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\n const weekEvents = computed(() =>\n getResourcesWeekViewEvents({\n events: props.events,\n resources: props.resources,\n weekdays: weekdays.value,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n expansionLimit: props.recurrenceExpansionLimit,\n }),\n )\n\n onMounted(async () => {\n if (!props.startScrollDateTime) return\n await nextTick()\n const target = dayjs(props.startScrollDateTime)\n const dayIndex = weekdays.value.findIndex((day) => dayjs(day).isSame(target, 'day'))\n if (dayIndex < 0) return\n const targetTime = target.format('HH:mm:ss')\n const intervalIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= targetTime,\n )\n if (intervalIndex < 0) return\n const flatIndex = dayIndex * intervals.value.length + intervalIndex\n const targetSlot = controls[0]?.[flatIndex]\n const viewport = rootElement.value?.querySelector<HTMLElement>('.mantine-ScrollArea-viewport')\n if (targetSlot && viewport) {\n viewport.scrollLeft = targetSlot.offsetLeft\n requestAnimationFrame(() => (viewport.scrollLeft = targetSlot.offsetLeft))\n }\n })\n const slotSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () => (start, end, group) => {\n const count = intervals.value.length\n const startDay = Math.floor(start / count)\n const endDay = Math.floor(end / count)\n const first = intervals.value[start % count]\n const last = intervals.value[end % count]\n if (first && last && weekdays.value[startDay] && weekdays.value[endDay]) {\n props.onSlotDragEnd?.({\n rangeStart: `${dayjs(weekdays.value[startDay]).format('YYYY-MM-DD')} ${first.startTime}`,\n rangeEnd: `${dayjs(weekdays.value[endDay]).format('YYYY-MM-DD')} ${last.endTime}`,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n })\n const resize = useHorizontalEventResize({\n enabled: () => props.withEventResize,\n mode: () => props.mode,\n startTime: () => props.startTime,\n endTime: () => props.endTime,\n intervalMinutes: () => props.intervalMinutes,\n onEventResize: () => props.onEventResize,\n canResizeEvent: () => props.canResizeEvent,\n })\n const emitDrop = (nativeEvent: DragEvent, resourceId: string | number, flatIndex: number) => {\n nativeEvent.preventDefault()\n dropTarget.value = null\n const count = intervals.value.length\n const day = weekdays.value[Math.floor(flatIndex / count)]\n const interval = intervals.value[flatIndex % count]\n if (!day || !interval) return\n const target = `${dayjs(day).format('YYYY-MM-DD')} ${interval.startTime}`\n const event = getDropEvent(props.events, nativeEvent.dataTransfer)\n if (event) props.onEventDrop?.({ ...moveEventTo(event, target), resourceId })\n else if (nativeEvent.dataTransfer)\n props.onExternalEventDrop?.({\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n const getFlatIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n const count = intervals.value.length * weekdays.value.length\n if (!container || count === 0) return -1\n const rect = container.getBoundingClientRect()\n if (rect.width <= 0) return -1\n return Math.max(\n 0,\n Math.min(count - 1, Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * count)),\n )\n }\n const groupCell = (info: ResourceGroupInfo | null | undefined) => {\n if (info === undefined) return null\n if (info === null) return h(Box, { class: classes.resourcesWeekViewGroupColumnEmpty })\n const starts = info.position === 'first' || info.position === 'only'\n return h(\n Box,\n { class: classes.resourcesWeekViewGroupColumn, 'data-group-position': info.position },\n () =>\n starts\n ? h(\n 'span',\n {\n style:\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-week-view-row-height) + 1px)) / 2))`,\n }\n : undefined,\n },\n slots.groupLabel?.({ group: info.group }) ??\n props.renderGroupLabel?.(info.group) ??\n info.group.label ??\n undefined,\n )\n : null,\n )\n }\n\n return () => {\n const dayCount = weekdays.value.length\n const slotsPerDay = intervals.value.length\n const hasGroups = ordered.value.groupRanges.length > 0\n const now = dayjs(props.getCurrentTime?.() ?? new Date())\n const todayIndex = weekdays.value.findIndex((day) => dayjs(day).isSame(now, 'day'))\n const showIndicator =\n (props.withCurrentTimeIndicator ?? todayIndex !== -1) &&\n todayIndex !== -1 &&\n isInTimeRange({ date: now.toDate(), startTime: props.startTime, endTime: props.endTime })\n const timeOffset = getCurrentTimePosition({\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n now,\n })\n const indicatorOffset = ((todayIndex + timeOffset / 100) / dayCount) * 100\n const currentTime = formatDate({\n date: now,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n })\n\n const dayLabels = weekdays.value.map((day) => {\n const label = formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n })\n return h(\n Box,\n {\n key: day,\n class: classes.resourcesWeekViewDayLabel,\n style: { flex: `0 0 calc(var(--resources-week-view-slot-width) * ${slotsPerDay})` },\n 'data-weekend': props.weekendDays.includes(dayjs(day).day() as DayOfWeek) || undefined,\n 'data-today': (props.highlightToday && dayjs(day).isSame(now, 'day')) || undefined,\n },\n () => slots.dayLabel?.({ date: day, label }) ?? label,\n )\n })\n const timeLabels = weekdays.value.flatMap((day) =>\n intervals.value.map((interval) => {\n const label = formatDate({\n date: `${day} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat,\n })\n const mod = getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(day).day() as DayOfWeek,\n })\n return h(\n Box,\n {\n key: `${day}-${interval.startTime}`,\n class: classes.resourcesWeekViewTimeLabel,\n 'data-business-hours': mod['business-hours'] || undefined,\n 'data-non-business-hours': mod['non-business-hours'] || undefined,\n },\n () =>\n slots.timeLabel?.({\n date: day,\n label,\n startTime: interval.startTime,\n endTime: interval.endTime,\n }) ?? label,\n )\n }),\n )\n\n const rows = ordered.value.orderedResources.map((resource, resourceIndex) => {\n const background: VNodeChild[] = []\n const regular: VNodeChild[] = []\n const more: VNodeChild[] = []\n weekdays.value.forEach((day, dayIndex) => {\n const data = weekEvents.value.byDay[day]\n const dayOffset = (dayIndex / dayCount) * 100\n const dayWidth = 100 / dayCount\n ;[\n ...(data.backgroundTimedEvents[resource.id] || []),\n ...(data.backgroundAllDayEvents[resource.id] || []),\n ].forEach((event) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n background.push(\n slots.backgroundEvent?.({ event, date: day }) ??\n h(\n Box,\n {\n key: `bg-${day}-${event.id}`,\n class: classes.resourcesWeekViewBackgroundEvent,\n style: {\n left: `${dayOffset + (event.position.top / 100) * dayWidth}%`,\n right: `${\n 100 -\n dayOffset -\n ((event.position.top + event.position.height) / 100) * dayWidth\n }%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n },\n },\n () =>\n props.renderEventBody?.(event) ?? slots.eventBody?.({ event }) ?? event.title,\n ),\n )\n })\n const allRegular = data.regularEvents[resource.id] || []\n allRegular\n .filter((event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot))\n .forEach((event) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n const position = resize.getResizePosition(event.id)\n const relativeLeft = position?.left ?? event.position.top\n const relativeWidth = position?.width ?? event.position.height\n const isResizable = resize.isResizableEvent(event)\n regular.push(\n h(\n Box,\n {\n key: `${day}-${event.id}`,\n class: classes.resourcesWeekViewEventWrapper,\n 'data-resizing': position !== null || undefined,\n style: {\n '--event-color': colors.color,\n left: `calc(${dayOffset + (relativeLeft / 100) * dayWidth}% + 1px)`,\n width: `calc(${(relativeWidth / 100) * dayWidth}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n },\n },\n () => [\n h(\n ScheduleEvent,\n {\n event,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n draggable:\n props.withEventsDragAndDrop &&\n props.mode !== 'static' &&\n (props.canDragEvent?.(event) ?? true),\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) props.onEventClick?.(event, nativeEvent)\n },\n style: { width: '100%', height: '100%' },\n },\n forwardEventSlots(slots),\n ),\n isResizable\n ? ['start', 'end'].map((edge) =>\n h('div', {\n class: classes.resourcesWeekViewResizeHandle,\n 'data-edge': edge,\n 'data-active': resize.state.value?.edge === edge || undefined,\n 'aria-label': `${edge === 'start' ? 'Resize event start' : 'Resize event end'} ${event.title}`,\n onDragstart: (nativeEvent: DragEvent) => nativeEvent.preventDefault(),\n onPointerdown: (pointerEvent: PointerEvent) => {\n const container = rowContainers.get(resourceIndex)\n if (container)\n resize.handleResizeStart({\n event,\n edge: edge as 'start' | 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dayjs(day).format('YYYY-MM-DD'),\n dayIndex,\n dayCount,\n pointerEvent,\n })\n },\n }),\n )\n : null,\n ],\n ),\n )\n })\n getOverlapClusters(allRegular)\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot),\n )\n .forEach((cluster) => {\n const hiddenCount = cluster.filter(\n (event) => event.position.column >= props.maxEventsPerTimeSlot,\n ).length\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(\n ...cluster.map((event) => event.position.top + event.position.height),\n )\n more.push(\n slots.moreEvents?.({ events: cluster, hiddenCount, date: day }) ??\n h(\n MoreEvents,\n {\n ...props.moreEventsProps,\n key: `more-${day}-${cluster[0].id}`,\n events: cluster,\n moreEventsCount: hiddenCount,\n mode: props.mode,\n labels: props.labels,\n renderEventBody: props.renderEventBody,\n renderEvent: props.renderEvent,\n onEventClick: props.onEventClick,\n style: {\n position: 'absolute',\n left: `calc(${dayOffset + (left / 100) * dayWidth}% + 1px)`,\n width: `calc(${((right - left) / 100) * dayWidth}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n },\n forwardEventSlots(slots),\n ),\n )\n })\n })\n const allDayBars = weekEvents.value.allDayBars[resource.id] || []\n const allDay = allDayBars.map((bar) =>\n h(\n Box,\n {\n key: `all-${bar.event.id}`,\n class: classes.resourcesWeekViewAllDayEvent,\n style: {\n left: `calc(${(bar.startDayIndex / dayCount) * 100}% + 1px)`,\n width: `calc(${((bar.endDayIndex - bar.startDayIndex + 1) / dayCount) * 100}% - 2px)`,\n top: `calc(${bar.row} * (var(--resources-week-view-all-day-height) + 2px) + 2px)`,\n },\n },\n () =>\n slots.allDayEvent?.({\n event: bar.event,\n startDayIndex: bar.startDayIndex,\n endDayIndex: bar.endDayIndex,\n }) ??\n h(\n ScheduleEvent,\n {\n event: bar.event,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => props.onEventClick?.(bar.event, nativeEvent),\n style: { width: '100%', height: '100%' },\n },\n forwardEventSlots(slots),\n ),\n ),\n )\n const slotGroup = String(resource.id)\n const buttons = weekdays.value.flatMap((day, dayIndex) =>\n intervals.value.map((interval, slotIndex) => {\n const flatIndex = dayIndex * slotsPerDay + slotIndex\n const mod = getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(day).day() as DayOfWeek,\n })\n return h(\n UnstyledButton,\n {\n key: `${day}-${interval.startTime}`,\n ref: (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][flatIndex] =\n button instanceof HTMLButtonElement ? button : undefined\n },\n class: classes.resourcesWeekViewRowSlot,\n 'data-business-hours': mod['business-hours'] || undefined,\n 'data-non-business-hours': mod['non-business-hours'] || undefined,\n 'data-drop-target':\n dropTarget.value?.resourceId === resource.id &&\n dropTarget.value.flatIndex === flatIndex\n ? true\n : undefined,\n 'data-drag-selected': slotSelect.isSlotSelected(flatIndex, slotGroup) || undefined,\n 'data-static': props.mode === 'static' || undefined,\n 'data-drag-slot-index': props.withDragSlotSelect ? flatIndex : undefined,\n 'data-drag-slot-group': props.withDragSlotSelect ? slotGroup : undefined,\n 'aria-label': `${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${day} ${interval.startTime} - ${interval.endTime}`,\n tabindex:\n props.mode === 'static' ? -1 : resourceIndex === 0 && flatIndex === 0 ? 0 : -1,\n onKeydown: (event: KeyboardEvent) =>\n handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex: flatIndex,\n event,\n }),\n onPointerdown:\n props.mode === 'static'\n ? undefined\n : (event: PointerEvent) =>\n slotSelect.handleSlotPointerDown(event, flatIndex, slotGroup),\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) =>\n props.onTimeSlotClick?.({\n slotStart: `${day} ${interval.startTime}`,\n slotEnd: `${day} ${interval.endTime}`,\n nativeEvent,\n resourceId: resource.id,\n }),\n },\n () =>\n slots.timeSlot?.({\n resource,\n date: day,\n startTime: interval.startTime,\n endTime: interval.endTime,\n }),\n )\n }),\n )\n const info = hasGroups ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n const allDayRows = allDayBars.length ? Math.max(...allDayBars.map((bar) => bar.row)) + 1 : 0\n return h(Box, { key: resource.id, class: classes.resourcesWeekViewRow }, () => [\n groupCell(info),\n h(\n Box,\n {\n class: classes.resourcesWeekViewResourceLabel,\n 'data-scrolled-x': scrolledX.value || undefined,\n 'data-has-groups': info !== undefined || undefined,\n },\n () =>\n slots.resourceLabel?.({ resource }) ??\n props.renderResourceLabel?.(resource) ??\n resource.label,\n ),\n h(\n Box,\n {\n class: classes.resourcesWeekViewRowSlots,\n ref: (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n if (node instanceof HTMLElement) rowContainers.set(resourceIndex, node)\n },\n style: allDayRows\n ? {\n minHeight: `max(var(--resources-week-view-row-height), calc(${allDayRows} * (var(--resources-week-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined,\n onDragover:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n if (props.mode === 'static') return\n nativeEvent.preventDefault()\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n if (\n flatIndex >= 0 &&\n (dropTarget.value?.resourceId !== resource.id ||\n dropTarget.value.flatIndex !== flatIndex)\n ) {\n dropTarget.value = { resourceId: resource.id, flatIndex }\n }\n }\n : undefined,\n onDragleave:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n dropTarget.value = null\n }\n }\n : undefined,\n onDrop:\n props.withEventsDragAndDrop || props.onExternalEventDrop\n ? (nativeEvent: DragEvent) => {\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n if (flatIndex >= 0) emitDrop(nativeEvent, resource.id, flatIndex)\n }\n : undefined,\n },\n () => [...background, ...allDay, ...regular, ...more, ...buttons],\n ),\n ])\n })\n\n const weekStart = dayjs(weekdays.value[0]).format('YYYY-MM-DD')\n const weekEnd = dayjs(weekdays.value.at(-1)).format('YYYY-MM-DD')\n const headerLabel =\n props.renderWeekLabel?.({ weekStart, weekEnd }) ??\n getWeekLabel({\n weekdays: weekdays.value,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat,\n })\n const header = props.withHeader\n ? (slots.header?.({ weekStart, weekEnd, label: headerLabel }) ??\n h(ScheduleHeaderBase, {\n view: 'week',\n navigationHandlers: {\n previous: () => dayjs(props.date).subtract(1, 'week').format('YYYY-MM-DD'),\n next: () => dayjs(props.date).add(1, 'week').format('YYYY-MM-DD'),\n today: () => now.format('YYYY-MM-DD'),\n },\n control: { title: headerLabel },\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: { views: ['day', 'week', 'month'], ...props.viewSelectProps },\n }))\n : null\n const indicator = showIndicator\n ? (slots.currentTimeIndicator?.({\n time: currentTime,\n offset: indicatorOffset,\n date: weekdays.value[todayIndex],\n }) ??\n h(\n Box,\n {\n class: classes.resourcesWeekViewCurrentTimeIndicator,\n style: {\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width) + (100% - var(--resources-week-view-resource-label-width) - var(--resources-week-view-group-label-width)) * ${indicatorOffset} / 100)`\n : `calc(var(--resources-week-view-resource-label-width) + (100% - var(--resources-week-view-resource-label-width)) * ${indicatorOffset} / 100)`,\n '--_time-bubble-width': String(currentTime).toLowerCase().includes('m')\n ? '64px'\n : '46px',\n },\n },\n () => [\n props.withCurrentTimeBubble\n ? h(\n 'div',\n { class: classes.resourcesWeekViewCurrentTimeIndicatorTimeBubble },\n currentTime,\n )\n : h('div', { class: classes.resourcesWeekViewCurrentTimeIndicatorThumb }),\n h('div', { class: classes.resourcesWeekViewCurrentTimeIndicatorLine }),\n ],\n ))\n : null\n\n return h(\n Box,\n {\n ...attrs,\n ref: (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n rootElement.value = node instanceof HTMLElement ? node : null\n },\n class: [classes.resourcesWeekView, attrs.class],\n style: [\n {\n '--resources-week-view-radius': resolveScheduleRadius(props.radius),\n '--resources-week-view-slot-width': cssSize(props.slotWidth),\n '--resources-week-view-row-height': cssSize(props.rowHeight),\n '--resources-week-view-group-label-width': cssSize(props.groupLabelWidth),\n },\n attrs.style,\n ],\n 'data-resizing': resize.state.value ? true : undefined,\n 'data-event-interaction': resize.state.value ? true : undefined,\n },\n () => [\n header,\n h(Box, { class: classes.resourcesWeekViewRoot }, () =>\n h(\n ScrollArea,\n {\n scrollbarSize: 4,\n ...props.scrollAreaProps,\n class: classes.resourcesWeekViewScrollArea,\n onScrollPositionChange: (position: { x: number }) =>\n (scrolledX.value = position.x !== 0),\n },\n () =>\n h('div', { class: classes.resourcesWeekViewInner }, [\n h(Box, { class: classes.resourcesWeekViewHeaderRows }, () => [\n h(\n 'div',\n {\n class: classes.resourcesWeekViewCorner,\n style: hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n }\n : undefined,\n },\n slots.corner?.({ resources: ordered.value.orderedResources }) ??\n getLabel('resources', props.labels),\n ),\n h('div', { class: classes.resourcesWeekViewHeaderContent }, [\n h('div', { class: classes.resourcesWeekViewDayLabelsRow }, dayLabels),\n h('div', { class: classes.resourcesWeekViewTimeLabelsRow }, timeLabels),\n ]),\n ]),\n ...rows,\n indicator,\n ]),\n ),\n ),\n ],\n )\n }\n },\n})\n\nexport type ResourcesWeekViewStylesNames = keyof typeof classes\n",".resourcesMonthView {\n --resources-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-month-view-resource-label-width: 120px;\n --resources-month-view-day-width: 80px;\n --resources-month-view-row-height: 64px;\n --resources-month-view-group-label-width: 80px;\n\n @mixin where-light {\n --resources-month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --resources-month-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.resourcesMonthViewRoot {\n border: 1px solid var(--resources-month-view-border-color);\n border-radius: var(--resources-month-view-radius);\n overflow: hidden;\n max-width: fit-content;\n}\n\n.resourcesMonthViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n\n.resourcesMonthViewInner {\n display: inline-flex;\n flex-direction: column;\n}\n.resourcesMonthViewDayLabelsRow {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-month-view-border-color);\n margin-bottom: -1px;\n}\n.resourcesMonthViewCorner {\n flex: 0 0 var(--resources-month-view-resource-label-width);\n min-width: var(--resources-month-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n position: sticky;\n left: 0;\n z-index: 6;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n background-color: var(--mantine-color-body);\n}\n.resourcesMonthViewDayLabel {\n flex: 0 0 var(--resources-month-view-day-width);\n min-width: var(--resources-month-view-day-width);\n max-width: var(--resources-month-view-day-width);\n height: 42px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n user-select: none;\n cursor: default;\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n &:where([data-today]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n.resourcesMonthViewDayLabelWeekday {\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n line-height: 1;\n margin-bottom: 3px;\n}\n.resourcesMonthViewDayLabelNumber {\n font-weight: var(--mantine-font-weight-medium);\n font-size: 12px;\n line-height: 1;\n}\n.resourcesMonthViewRow {\n display: flex;\n border-top: 1px solid var(--resources-month-view-border-color);\n}\n.resourcesMonthViewResourceLabel {\n flex: 0 0 var(--resources-month-view-resource-label-width);\n min-width: var(--resources-month-view-resource-label-width);\n display: flex;\n align-items: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n min-height: var(--resources-month-view-row-height);\n position: sticky;\n left: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n &:where([data-has-groups]) {\n left: var(--resources-month-view-group-label-width);\n }\n}\n.resourcesMonthViewGroupColumn,\n.resourcesMonthViewGroupColumnEmpty {\n flex: 0 0 var(--resources-month-view-group-label-width);\n min-width: var(--resources-month-view-group-label-width);\n min-height: var(--resources-month-view-row-height);\n position: sticky;\n left: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n}\n.resourcesMonthViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 6;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-month-view-row-height) + 1px);\n }\n}\n.resourcesMonthViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-month-view-row-height);\n}\n.resourcesMonthViewCell {\n flex: 0 0 var(--resources-month-view-day-width);\n min-width: var(--resources-month-view-day-width);\n max-width: var(--resources-month-view-day-width);\n min-height: var(--resources-month-view-row-height);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n cursor: pointer;\n position: relative;\n overflow: hidden;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n @mixin hover {\n &:where(:not([data-static])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n &:where([data-weekend]) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-8);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-color-blue-4);\n border-radius: 2px;\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n.resourcesMonthView:where([data-event-interaction]) .resourcesMonthViewCell {\n pointer-events: none;\n}\n","import { Box, ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport dayjs from 'dayjs'\nimport {\n computed,\n defineComponent,\n h,\n nextTick,\n onMounted,\n ref,\n type CSSProperties,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport type {\n MonthYearSelectProps,\n NativeButtonProps,\n RenderEvent,\n RenderEventBody,\n ViewSelectProps,\n} from '../../component-props'\nimport { getLabel, type ScheduleLabelsOverride } from '../../labels'\nimport type {\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n calculateMonthDropDate,\n expandRecurringEvents,\n formatDate,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n type ResourcesGridControls,\n} from '../../utils'\nimport { MoreEvents } from '../MoreEvents/MoreEvents'\nimport type { ResourceViewDropData } from '../ResourcesDayView/ResourcesDayView'\nimport { ScheduleEvent } from '../ScheduleEvent/ScheduleEvent'\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { forwardEventSlots, getDropEvent, resolveScheduleRadius } from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport classes from './ResourcesMonthView.module.css'\n\ninterface CellLayout {\n visible: Array<{ event: ScheduleEventData; row: number }>\n hiddenCount: number\n}\ninterface Segment {\n event: ScheduleEventData\n start: number\n end: number\n row: number\n hanging: 'start' | 'end' | 'both' | 'none'\n hidden: boolean\n}\n\nexport interface ResourcesMonthViewProps {\n date: Date | string\n onDateChange?: (value: DateStringValue) => void\n resources: ScheduleResourceData[]\n locale?: string\n weekdayFormat?: DateLabelFormat\n weekendDays?: DayOfWeek[]\n withWeekendDays?: boolean\n startScrollDate?: string\n onDayClick?: (data: {\n date: DateStringValue\n nativeEvent: MouseEvent\n resourceId?: string | number\n }) => void\n highlightToday?: boolean\n radius?: string | number\n withHeader?: boolean\n monthYearSelectProps?: Partial<MonthYearSelectProps>\n onViewChange?: (view: ScheduleViewLevel) => void\n previousControlProps?: NativeButtonProps\n nextControlProps?: NativeButtonProps\n todayControlProps?: NativeButtonProps\n viewSelectProps?: Partial<ViewSelectProps>\n events?: ScheduleEventData[]\n dayWidth?: CSSProperties['width']\n rowHeight?: CSSProperties['height']\n renderEventBody?: RenderEventBody\n renderEvent?: RenderEvent\n renderResourceLabel?: (resource: ScheduleResourceData) => VNodeChild\n groups?: ScheduleResourceGroup[]\n renderGroupLabel?: (group: ScheduleResourceGroup) => VNodeChild\n groupLabelWidth?: CSSProperties['width']\n withEventsDragAndDrop?: boolean\n onEventDrop?: (data: ResourceViewDropData) => void\n canDragEvent?: (event: ScheduleEventData) => boolean\n onEventDragStart?: (event: ScheduleEventData) => void\n onEventDragEnd?: () => void\n onEventClick?: (event: ScheduleEventData, nativeEvent: MouseEvent) => void\n withDragSlotSelect?: boolean\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue\n rangeEnd: DateTimeStringValue\n resourceId?: string | number\n }) => void\n labels?: ScheduleLabelsOverride\n mode?: ScheduleMode\n scrollAreaProps?: Record<string, unknown>\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer\n dropDateTime: DateTimeStringValue\n resourceId?: string | number\n }) => void\n maxEventsPerTimeSlot?: number\n moreEventsProps?: Record<string, unknown>\n recurrenceExpansionLimit?: number\n}\n\nexport interface ResourcesMonthViewSlots {\n header?: (props: { month: DateStringValue }) => VNodeChild\n corner?: (props: { resources: ScheduleResourceData[] }) => VNodeChild\n dayLabel?: (props: { date: DateStringValue; weekday: VNodeChild; day: number }) => VNodeChild\n resourceLabel?: (props: { resource: ScheduleResourceData }) => VNodeChild\n groupLabel?: (props: { group: ScheduleResourceGroup }) => VNodeChild\n dayCell?: (props: { resource: ScheduleResourceData; date: DateStringValue }) => VNodeChild\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n moreEvents?: (props: {\n events: ScheduleEventData[]\n hiddenCount: number\n resource: ScheduleResourceData\n date: DateStringValue\n }) => VNodeChild\n}\n\nconst cssSize = (value: CSSProperties['width']) =>\n typeof value === 'number' ? `${value}px` : value\nconst isMulti = (event: ScheduleEventData) =>\n dayjs(event.end).startOf('day').isAfter(dayjs(event.start).startOf('day'))\nconst compareEvents = (a: ScheduleEventData, b: ScheduleEventData) => {\n const aSpan = dayjs(a.end).startOf('day').diff(dayjs(a.start).startOf('day'), 'day')\n const bSpan = dayjs(b.end).startOf('day').diff(dayjs(b.start).startOf('day'), 'day')\n return aSpan === bSpan ? dayjs(a.start).valueOf() - dayjs(b.start).valueOf() : bSpan - aSpan\n}\n\nexport const ResourcesMonthView = defineComponent({\n name: 'ResourcesMonthView',\n inheritAttrs: false,\n slots: Object as SlotsType<ResourcesMonthViewSlots>,\n props: {\n date: { type: [String, Date] as PropType<Date | string>, required: true },\n onDateChange: Function as PropType<ResourcesMonthViewProps['onDateChange']>,\n resources: { type: Array as PropType<ScheduleResourceData[]>, required: true },\n locale: String,\n weekdayFormat: { type: [String, Function] as PropType<DateLabelFormat>, default: 'ddd' },\n weekendDays: { type: Array as PropType<DayOfWeek[]>, default: () => [0, 6] },\n withWeekendDays: { type: Boolean, default: true },\n startScrollDate: String,\n onDayClick: Function as PropType<ResourcesMonthViewProps['onDayClick']>,\n highlightToday: { type: Boolean, default: true },\n radius: [String, Number] as PropType<string | number>,\n withHeader: { type: Boolean, default: true },\n monthYearSelectProps: Object as PropType<Partial<MonthYearSelectProps>>,\n onViewChange: Function as PropType<ResourcesMonthViewProps['onViewChange']>,\n previousControlProps: Object as PropType<NativeButtonProps>,\n nextControlProps: Object as PropType<NativeButtonProps>,\n todayControlProps: Object as PropType<NativeButtonProps>,\n viewSelectProps: Object as PropType<Partial<ViewSelectProps>>,\n events: Array as PropType<ScheduleEventData[]>,\n dayWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 80 },\n rowHeight: { type: [String, Number] as PropType<CSSProperties['height']>, default: 64 },\n renderEventBody: Function as PropType<RenderEventBody>,\n renderEvent: Function as PropType<RenderEvent>,\n renderResourceLabel: Function as PropType<ResourcesMonthViewProps['renderResourceLabel']>,\n groups: Array as PropType<ScheduleResourceGroup[]>,\n renderGroupLabel: Function as PropType<ResourcesMonthViewProps['renderGroupLabel']>,\n groupLabelWidth: { type: [String, Number] as PropType<CSSProperties['width']>, default: 80 },\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<ResourcesMonthViewProps['onEventDrop']>,\n canDragEvent: Function as PropType<ResourcesMonthViewProps['canDragEvent']>,\n onEventDragStart: Function as PropType<ResourcesMonthViewProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<ResourcesMonthViewProps['onEventDragEnd']>,\n onEventClick: Function as PropType<ResourcesMonthViewProps['onEventClick']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<ResourcesMonthViewProps['onSlotDragEnd']>,\n labels: Object as PropType<ScheduleLabelsOverride>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n scrollAreaProps: Object as PropType<Record<string, unknown>>,\n onExternalEventDrop: Function as PropType<ResourcesMonthViewProps['onExternalEventDrop']>,\n maxEventsPerTimeSlot: { type: Number, default: 2 },\n moreEventsProps: Object as PropType<Record<string, unknown>>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n },\n setup(props, { attrs, slots }) {\n const controls: ResourcesGridControls = []\n const rowContainers = new Map<number, HTMLElement>()\n const rootElement = ref<HTMLElement | null>(null)\n const dropTarget = ref<{ resourceId: string | number; dayIndex: number } | null>(null)\n const days = computed(() => {\n const month = dayjs(props.date).startOf('month')\n return Array.from({ length: month.daysInMonth() }, (_, index) => month.date(index + 1))\n .filter(\n (day) => props.withWeekendDays || !props.weekendDays.includes(day.day() as DayOfWeek),\n )\n .map((day) => day.format('YYYY-MM-DD'))\n })\n const ordered = computed(() => getOrderedResources(props.resources, props.groups))\n const idMap = computed(() => getGroupToResourceIdMap(props.resources))\n const expanded = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: dayjs(props.date).startOf('month').toDate(),\n rangeEnd: dayjs(props.date).endOf('month').toDate(),\n expansionLimit: props.recurrenceExpansionLimit,\n }),\n )\n const slotSelect = useSlotDragSelect({\n enabled: () => props.withDragSlotSelect && props.mode !== 'static',\n onDragEnd: () =>\n props.onSlotDragEnd\n ? (start, end, group) => {\n const first = days.value[start]\n const last = days.value[end]\n if (first && last)\n props.onSlotDragEnd?.({\n rangeStart: `${first} 00:00:00`,\n rangeEnd: dayjs(last).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n resourceId: idMap.value.get(group) ?? group,\n })\n }\n : undefined,\n })\n\n onMounted(async () => {\n if (!props.startScrollDate) return\n await nextTick()\n const index = days.value.indexOf(dayjs(props.startScrollDate).format('YYYY-MM-DD'))\n const target = controls[0]?.[index]\n const viewport = rootElement.value?.querySelector<HTMLElement>('.mantine-ScrollArea-viewport')\n if (target && viewport) {\n viewport.scrollLeft = target.offsetLeft\n requestAnimationFrame(() => (viewport.scrollLeft = target.offsetLeft))\n }\n })\n\n const indexAtPoint = (event: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n if (!container || !days.value.length) return -1\n const rect = container.getBoundingClientRect()\n if (rect.width <= 0) return -1\n return Math.max(\n 0,\n Math.min(\n days.value.length - 1,\n Math.floor(((event.clientX - rect.left) / rect.width) * days.value.length),\n ),\n )\n }\n const emitDrop = (event: DragEvent, resourceId: string | number, dayIndex: number) => {\n event.preventDefault()\n dropTarget.value = null\n const day = days.value[dayIndex]\n if (!day) return\n const dragged = getDropEvent(expanded.value, event.dataTransfer)\n if (dragged) {\n const next = calculateMonthDropDate({ draggedEvent: dragged, targetDay: day })\n props.onEventDrop?.({\n eventId: dragged.id,\n newStart: dayjs(next.start).format('YYYY-MM-DD HH:mm:ss'),\n newEnd: dayjs(next.end).format('YYYY-MM-DD HH:mm:ss'),\n event: dragged,\n resourceId,\n })\n } else if (event.dataTransfer)\n props.onExternalEventDrop?.({\n dataTransfer: event.dataTransfer,\n dropDateTime: `${day} 00:00:00`,\n resourceId,\n })\n }\n\n return () => {\n const maxRows = Math.min(10, Math.max(1, props.maxEventsPerTimeSlot))\n const hasGroups = ordered.value.groupRanges.length > 0\n const monthStart = dayjs(days.value[0]).startOf('day')\n const monthEnd = dayjs(days.value.at(-1)).add(1, 'day').startOf('day')\n const rows = ordered.value.orderedResources.map((resource, resourceIndex) => {\n const eventsByDay = days.value.map((day) =>\n (expanded.value || [])\n .filter(\n (event) =>\n event.resourceId === resource.id &&\n dayjs(event.start).isBefore(dayjs(day).endOf('day')) &&\n dayjs(event.end).isAfter(dayjs(day).startOf('day')),\n )\n .sort(compareEvents),\n )\n const layouts: CellLayout[] = []\n const lastRow = new Map<string | number, number>()\n const rowByEvent = new Map<string | number, Map<number, number>>()\n eventsByDay.forEach((eventList, dayIndex) => {\n const used = new Set<number>()\n const visible: CellLayout['visible'] = []\n let hiddenCount = 0\n eventList.forEach((event) => {\n let row = lastRow.get(event.id)\n if (row === undefined || row >= maxRows || used.has(row))\n row = Array.from({ length: maxRows }, (_, i) => i).find((i) => !used.has(i))\n if (row === undefined) {\n hiddenCount++\n return\n }\n used.add(row)\n visible.push({ event, row })\n lastRow.set(event.id, row)\n if (!rowByEvent.has(event.id)) rowByEvent.set(event.id, new Map())\n rowByEvent.get(event.id)!.set(dayIndex, row)\n })\n layouts.push({ visible, hiddenCount })\n })\n const segments: Segment[] = []\n const multiEvents = Array.from(\n new Map(\n eventsByDay\n .flat()\n .filter(isMulti)\n .map((event) => [event.id, event]),\n ).values(),\n )\n multiEvents.forEach((event) => {\n const rowsForEvent = rowByEvent.get(event.id)\n let run: { start: number; end: number; row: number } | null = null\n const flush = () => {\n if (!run) return\n const before = dayjs(event.start).isBefore(monthStart)\n const after = dayjs(event.end).isAfter(monthEnd)\n segments.push({\n event,\n ...run,\n hanging: before && after ? 'both' : before ? 'start' : after ? 'end' : 'none',\n hidden: Array.from(\n { length: run.end - run.start + 1 },\n (_, i) => layouts[run!.start + i].hiddenCount > 0,\n ).some(Boolean),\n })\n run = null\n }\n days.value.forEach((_day, index) => {\n const row = rowsForEvent?.get(index)\n if (row === undefined) flush()\n else if (run && run.row === row && run.end === index - 1) run.end = index\n else {\n flush()\n run = { start: index, end: index, row }\n }\n })\n flush()\n })\n const eventNodes: VNodeChild[] = []\n layouts.forEach((layout, dayIndex) =>\n layout.visible.forEach(({ event, row }) => {\n if (isMulti(event)) return\n const compressed = layout.hiddenCount > 0 && props.mode !== 'static'\n eventNodes.push(\n h(\n ScheduleEvent,\n {\n key: `${event.id}-${dayIndex}`,\n event,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n draggable:\n props.withEventsDragAndDrop &&\n props.mode !== 'static' &&\n (props.canDragEvent?.(event) ?? true),\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => props.onEventClick?.(event, nativeEvent),\n style: {\n position: 'absolute',\n left: `calc(${(dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n top: compressed\n ? `calc((100% - 18px) * ${row} / ${maxRows} + 1px)`\n : `calc(${(row / maxRows) * 100}% + 1px)`,\n height: compressed\n ? `calc((100% - 18px) / ${maxRows} - 2px)`\n : `calc(${100 / maxRows}% - 2px)`,\n zIndex: 3,\n },\n },\n forwardEventSlots(slots),\n ),\n )\n }),\n )\n segments.forEach((segment) =>\n eventNodes.push(\n h(\n ScheduleEvent,\n {\n key: `${segment.event.id}-${segment.start}`,\n event: segment.event,\n hanging: segment.hanging,\n autoSize: true,\n nowrap: true,\n radius: props.radius,\n mode: props.mode,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n draggable:\n props.withEventsDragAndDrop &&\n props.mode !== 'static' &&\n (props.canDragEvent?.(segment.event) ?? true),\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) => props.onEventClick?.(segment.event, nativeEvent),\n style: {\n position: 'absolute',\n left: `calc(${(segment.start / days.value.length) * 100}% + 1px)`,\n width: `calc(${((segment.end - segment.start + 1) / days.value.length) * 100}% - 2px)`,\n top: segment.hidden\n ? `calc((100% - 18px) * ${segment.row} / ${maxRows} + 1px)`\n : `calc(${(segment.row / maxRows) * 100}% + 1px)`,\n height: segment.hidden\n ? `calc((100% - 18px) / ${maxRows} - 2px)`\n : `calc(${100 / maxRows}% - 2px)`,\n zIndex: 3,\n },\n },\n forwardEventSlots(slots),\n ),\n ),\n )\n const moreNodes = layouts.map((layout, dayIndex) =>\n layout.hiddenCount && props.mode !== 'static'\n ? (slots.moreEvents?.({\n events: eventsByDay[dayIndex],\n hiddenCount: layout.hiddenCount,\n resource,\n date: days.value[dayIndex],\n }) ??\n h(\n MoreEvents,\n {\n ...props.moreEventsProps,\n key: `more-${dayIndex}`,\n events: eventsByDay[dayIndex],\n moreEventsCount: layout.hiddenCount,\n mode: props.mode,\n labels: props.labels,\n renderEvent: props.renderEvent,\n renderEventBody: props.renderEventBody,\n onEventClick: props.onEventClick,\n style: {\n position: 'absolute',\n bottom: '1px',\n left: `calc(${(dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n height: '18px',\n zIndex: 4,\n },\n },\n forwardEventSlots(slots),\n ))\n : null,\n )\n const group = hasGroups ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n const groupCell =\n group === undefined\n ? null\n : group === null\n ? h(Box, { class: classes.resourcesMonthViewGroupColumnEmpty })\n : h(\n Box,\n {\n class: classes.resourcesMonthViewGroupColumn,\n 'data-group-position': group.position,\n },\n () =>\n group.position === 'first' || group.position === 'only'\n ? h(\n 'span',\n {\n style:\n group.count > 1\n ? {\n transform: `translateY(calc((${group.count - 1} * (var(--resources-month-view-row-height) + 1px)) / 2))`,\n }\n : undefined,\n },\n slots.groupLabel?.({ group: group.group }) ??\n props.renderGroupLabel?.(group.group) ??\n group.group.label ??\n undefined,\n )\n : null,\n )\n const cells = days.value.map((day, dayIndex) => {\n const weekend = props.weekendDays.includes(dayjs(day).day() as DayOfWeek)\n const groupId = String(resource.id)\n return h(\n UnstyledButton,\n {\n key: day,\n ref: (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][dayIndex] =\n button instanceof HTMLButtonElement ? button : undefined\n },\n class: classes.resourcesMonthViewCell,\n 'data-weekend': weekend || undefined,\n 'data-drop-target':\n (dropTarget.value?.resourceId === resource.id &&\n dropTarget.value.dayIndex === dayIndex) ||\n undefined,\n 'data-drag-selected': slotSelect.isSlotSelected(dayIndex, groupId) || undefined,\n 'data-static': props.mode === 'static' || undefined,\n 'data-drag-slot-index': props.withDragSlotSelect ? dayIndex : undefined,\n 'data-drag-slot-group': props.withDragSlotSelect ? groupId : undefined,\n tabindex:\n props.mode === 'static' ? -1 : resourceIndex === 0 && dayIndex === 0 ? 0 : -1,\n 'aria-label': `${String(resource.label)} ${dayjs(day).format('MMMM D, YYYY')}`,\n onKeydown: (event: KeyboardEvent) =>\n handleResourcesGridKeyDown({ controls, resourceIndex, slotIndex: dayIndex, event }),\n onPointerdown:\n props.mode === 'static'\n ? undefined\n : (event: PointerEvent) =>\n slotSelect.handleSlotPointerDown(event, dayIndex, groupId),\n onClick:\n props.mode === 'static'\n ? undefined\n : (nativeEvent: MouseEvent) =>\n props.onDayClick?.({ date: day, nativeEvent, resourceId: resource.id }),\n },\n () => slots.dayCell?.({ resource, date: day }),\n )\n })\n return h('div', { class: classes.resourcesMonthViewRow, key: resource.id }, [\n groupCell,\n h(\n 'div',\n {\n class: classes.resourcesMonthViewResourceLabel,\n 'data-has-groups': hasGroups || undefined,\n },\n slots.resourceLabel?.({ resource }) ??\n props.renderResourceLabel?.(resource) ??\n resource.label ??\n undefined,\n ),\n h(\n 'div',\n {\n class: classes.resourcesMonthViewRowSlots,\n ref: (element: unknown) => {\n if (element instanceof HTMLElement) rowContainers.set(resourceIndex, element)\n },\n onDragover:\n props.mode !== 'static' &&\n (props.withEventsDragAndDrop || props.onExternalEventDrop)\n ? (event: DragEvent) => {\n event.preventDefault()\n const dayIndex = indexAtPoint(event, resourceIndex)\n if (\n dayIndex >= 0 &&\n (dropTarget.value?.resourceId !== resource.id ||\n dropTarget.value.dayIndex !== dayIndex)\n )\n dropTarget.value = { resourceId: resource.id, dayIndex }\n }\n : undefined,\n onDragleave: (event: DragEvent) => {\n const current = event.currentTarget\n if (\n !(event.relatedTarget instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(event.relatedTarget)\n )\n dropTarget.value = null\n },\n onDrop:\n props.mode !== 'static' &&\n (props.withEventsDragAndDrop || props.onExternalEventDrop)\n ? (event: DragEvent) => {\n const dayIndex = indexAtPoint(event, resourceIndex)\n if (dayIndex >= 0) emitDrop(event, resource.id, dayIndex)\n }\n : undefined,\n },\n [...eventNodes, ...moreNodes, ...cells],\n ),\n ])\n })\n const month = dayjs(props.date).startOf('month')\n const monthString = month.format('YYYY-MM-DD')\n const header = props.withHeader\n ? (slots.header?.({ month: monthString }) ??\n h(ScheduleHeaderBase, {\n view: 'month',\n navigationHandlers: {\n previous: () => month.subtract(1, 'month').format('YYYY-MM-DD'),\n next: () => month.add(1, 'month').format('YYYY-MM-DD'),\n today: () => dayjs().format('YYYY-MM-DD'),\n },\n control: {\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.month(),\n yearValue: month.year(),\n onMonthChange: (value: number) =>\n props.onDateChange?.(month.month(value).format('YYYY-MM-DD')),\n onYearChange: (value: number) =>\n props.onDateChange?.(month.year(value).format('YYYY-MM-DD')),\n ...props.monthYearSelectProps,\n },\n },\n labels: props.labels,\n onDateChange: props.onDateChange,\n onViewChange: props.onViewChange,\n previousControlProps: props.previousControlProps,\n nextControlProps: props.nextControlProps,\n todayControlProps: props.todayControlProps,\n viewSelectProps: { views: ['day', 'week', 'month'], ...props.viewSelectProps },\n }))\n : null\n const labels = days.value.map((day) => {\n const weekday = formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat,\n })\n return (\n slots.dayLabel?.({ date: day, weekday, day: dayjs(day).date() }) ??\n h(\n 'div',\n {\n key: day,\n class: classes.resourcesMonthViewDayLabel,\n 'data-weekend':\n props.weekendDays.includes(dayjs(day).day() as DayOfWeek) || undefined,\n 'data-today':\n (props.highlightToday && dayjs(day).isSame(dayjs(), 'day')) || undefined,\n },\n [\n h('span', { class: classes.resourcesMonthViewDayLabelWeekday }, weekday),\n h('span', { class: classes.resourcesMonthViewDayLabelNumber }, dayjs(day).date()),\n ],\n )\n )\n })\n return h(\n Box,\n {\n ...attrs,\n ref: (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n rootElement.value = node instanceof HTMLElement ? node : null\n },\n class: [classes.resourcesMonthView, attrs.class],\n style: [\n {\n '--resources-month-view-radius': resolveScheduleRadius(props.radius),\n '--resources-month-view-day-width': cssSize(props.dayWidth),\n '--resources-month-view-row-height': cssSize(props.rowHeight),\n '--resources-month-view-group-label-width': cssSize(props.groupLabelWidth),\n },\n attrs.style,\n ],\n 'data-event-interaction': dropTarget.value ? true : undefined,\n },\n () => [\n header,\n h(Box, { class: classes.resourcesMonthViewRoot }, () =>\n h(\n ScrollArea,\n {\n scrollbarSize: 4,\n scrollbars: 'x',\n ...props.scrollAreaProps,\n class: classes.resourcesMonthViewScrollArea,\n },\n () =>\n h('div', { class: classes.resourcesMonthViewInner }, [\n h('div', { class: classes.resourcesMonthViewDayLabelsRow }, [\n h(\n 'div',\n {\n class: classes.resourcesMonthViewCorner,\n style: hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n }\n : undefined,\n },\n slots.corner?.({ resources: ordered.value.orderedResources }) ??\n getLabel('resources', props.labels),\n ),\n ...labels,\n ]),\n ...rows,\n ]),\n ),\n ),\n ],\n )\n }\n },\n})\n\nexport type ResourcesMonthViewStylesNames = keyof typeof classes\n",".root {\n height: 100%;\n}\n","import dayjs from 'dayjs'\nimport { defineComponent, h, ref, watch, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport type { RenderEventBody } from '../../component-props'\nimport type { ScheduleLabelsOverride } from '../../labels'\nimport type {\n DateStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types'\nimport { toDateString } from '../../utils'\nimport {\n ResourcesDayView,\n type ResourcesDayViewProps,\n type ResourcesDayViewStylesNames,\n} from '../ResourcesDayView/ResourcesDayView'\nimport {\n ResourcesMonthView,\n type ResourcesMonthViewProps,\n type ResourcesMonthViewStylesNames,\n} from '../ResourcesMonthView/ResourcesMonthView'\nimport {\n ResourcesWeekView,\n type ResourcesWeekViewProps,\n type ResourcesWeekViewStylesNames,\n} from '../ResourcesWeekView/ResourcesWeekView'\nimport classes from './ResourcesSchedule.module.css'\n\nexport type ResourcesScheduleStylesNames =\n | 'root'\n | ResourcesDayViewStylesNames\n | ResourcesWeekViewStylesNames\n | ResourcesMonthViewStylesNames\n\nexport type ResourcesScheduleViewLevel = 'day' | 'week' | 'month'\n\ntype ResourcesScheduleCommonProps =\n | 'date'\n | 'onDateChange'\n | 'resources'\n | 'events'\n | 'locale'\n | 'radius'\n | 'labels'\n | 'renderEventBody'\n | 'renderResourceLabel'\n | 'withEventsDragAndDrop'\n | 'onEventDrop'\n | 'canDragEvent'\n | 'onEventDragStart'\n | 'onEventDragEnd'\n | 'onTimeSlotClick'\n | 'onEventClick'\n | 'onDayClick'\n | 'withDragSlotSelect'\n | 'onSlotDragEnd'\n | 'onViewChange'\n | 'mode'\n | 'onExternalEventDrop'\n | 'withEventResize'\n | 'onEventResize'\n | 'canResizeEvent'\n | 'recurrenceExpansionLimit'\n\n/** View-specific props with the shared/common props removed */\nexport type ResourcesScheduleViewProps<T> = Partial<Omit<T, ResourcesScheduleCommonProps>>\n\nexport interface ResourcesScheduleProps {\n /** List of resources to display */\n resources: ScheduleResourceData[]\n\n /** Current date to display (controlled) */\n date?: Date | DateStringValue\n\n /** Default date (uncontrolled) */\n defaultDate?: Date | DateStringValue\n\n /** Called when date changes via navigation */\n onDateChange?: (date: DateStringValue) => void\n\n /** Current view level (controlled) */\n view?: ResourcesScheduleViewLevel\n\n /** Default view level (uncontrolled) @default 'day' */\n defaultView?: ResourcesScheduleViewLevel\n\n /** Called when view level changes */\n onViewChange?: (view: ResourcesScheduleViewLevel) => void\n\n /** Events to display across all views */\n events?: ScheduleEventData[]\n\n /** Locale for date formatting */\n locale?: string\n\n /** Key of theme.radius or any valid CSS value to set border-radius */\n radius?: string | number\n\n /** Labels override for i18n */\n labels?: ScheduleLabelsOverride\n\n /** Custom event body renderer */\n renderEventBody?: RenderEventBody\n\n /** Custom resource label renderer */\n renderResourceLabel?: (resource: ScheduleResourceData) => VNodeChild\n\n /** Enable drag and drop for events @default false */\n withEventsDragAndDrop?: boolean\n\n /** Called when event is dropped */\n onEventDrop?: ResourcesDayViewProps['onEventDrop']\n\n /** Function to determine if event can be dragged */\n canDragEvent?: ResourcesDayViewProps['canDragEvent']\n\n /** Called when any event drag starts */\n onEventDragStart?: ResourcesDayViewProps['onEventDragStart']\n\n /** Called when any event drag ends */\n onEventDragEnd?: ResourcesDayViewProps['onEventDragEnd']\n\n /** Called when time slot is clicked (day/week views) */\n onTimeSlotClick?: ResourcesDayViewProps['onTimeSlotClick']\n\n /** Called when day is clicked in month view */\n onDayClick?: ResourcesMonthViewProps['onDayClick']\n\n /** Called when event is clicked */\n onEventClick?: ResourcesDayViewProps['onEventClick']\n\n /** If set, enables drag-to-select slot ranges @default false */\n withDragSlotSelect?: boolean\n\n /** Called when a slot range is selected by dragging */\n onSlotDragEnd?: ResourcesDayViewProps['onSlotDragEnd']\n\n /** Interaction mode @default 'default' */\n mode?: ScheduleMode\n\n /** Called when an external item is dropped onto the schedule */\n onExternalEventDrop?: ResourcesDayViewProps['onExternalEventDrop']\n\n /** If true, events can be resized (day/week views) @default false */\n withEventResize?: boolean\n\n /** Called when event is resized */\n onEventResize?: ResourcesDayViewProps['onEventResize']\n\n /** Function to determine if event can be resized */\n canResizeEvent?: ResourcesDayViewProps['canResizeEvent']\n\n /** Max number of generated recurring instances @default 2000 */\n recurrenceExpansionLimit?: number\n\n /** Props specific to ResourcesDayView */\n dayViewProps?: ResourcesScheduleViewProps<ResourcesDayViewProps>\n\n /** Props specific to ResourcesWeekView */\n weekViewProps?: ResourcesScheduleViewProps<ResourcesWeekViewProps>\n\n /** Props specific to ResourcesMonthView */\n monthViewProps?: ResourcesScheduleViewProps<ResourcesMonthViewProps>\n}\n\nexport interface ResourcesScheduleSlots {\n /** Scoped alternative to the `renderResourceLabel` prop */\n resourceLabel?: (props: { resource: ScheduleResourceData }) => VNodeChild\n /** Scoped alternative to the `renderGroupLabel` view prop */\n groupLabel?: (props: { group: ScheduleResourceGroup }) => VNodeChild\n /** Content rendered in the top-left corner of the grid */\n corner?: (props: { resources: ScheduleResourceData[] }) => VNodeChild\n /** Scoped alternative to the `renderEventBody` prop */\n eventBody?: (props: { event: ScheduleEventData }) => VNodeChild\n /** Scoped alternative to the `renderEvent` view prop */\n event?: (props: Record<string, unknown> & { event: ScheduleEventData }) => VNodeChild\n}\n\nexport const ResourcesSchedule = defineComponent({\n name: 'ResourcesSchedule',\n inheritAttrs: false,\n slots: Object as SlotsType<ResourcesScheduleSlots>,\n props: {\n resources: { type: Array as PropType<ScheduleResourceData[]>, required: true },\n date: [String, Date] as PropType<Date | DateStringValue>,\n defaultDate: [String, Date] as PropType<Date | DateStringValue>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n view: String as PropType<ResourcesScheduleViewLevel>,\n defaultView: { type: String as PropType<ResourcesScheduleViewLevel>, default: 'day' },\n onViewChange: Function as PropType<(view: ResourcesScheduleViewLevel) => void>,\n events: Array as PropType<ScheduleEventData[]>,\n locale: String,\n radius: [String, Number] as PropType<string | number>,\n labels: Object as PropType<ScheduleLabelsOverride>,\n renderEventBody: Function as PropType<RenderEventBody>,\n renderResourceLabel: Function as PropType<ResourcesScheduleProps['renderResourceLabel']>,\n withEventsDragAndDrop: Boolean,\n onEventDrop: Function as PropType<ResourcesScheduleProps['onEventDrop']>,\n canDragEvent: Function as PropType<ResourcesScheduleProps['canDragEvent']>,\n onEventDragStart: Function as PropType<ResourcesScheduleProps['onEventDragStart']>,\n onEventDragEnd: Function as PropType<ResourcesScheduleProps['onEventDragEnd']>,\n onTimeSlotClick: Function as PropType<ResourcesScheduleProps['onTimeSlotClick']>,\n onDayClick: Function as PropType<ResourcesScheduleProps['onDayClick']>,\n onEventClick: Function as PropType<ResourcesScheduleProps['onEventClick']>,\n withDragSlotSelect: Boolean,\n onSlotDragEnd: Function as PropType<ResourcesScheduleProps['onSlotDragEnd']>,\n mode: { type: String as PropType<ScheduleMode>, default: 'default' },\n onExternalEventDrop: Function as PropType<ResourcesScheduleProps['onExternalEventDrop']>,\n withEventResize: Boolean,\n onEventResize: Function as PropType<ResourcesScheduleProps['onEventResize']>,\n canResizeEvent: Function as PropType<ResourcesScheduleProps['canResizeEvent']>,\n recurrenceExpansionLimit: { type: Number, default: 2000 },\n dayViewProps: Object as PropType<ResourcesScheduleViewProps<ResourcesDayViewProps>>,\n weekViewProps: Object as PropType<ResourcesScheduleViewProps<ResourcesWeekViewProps>>,\n monthViewProps: Object as PropType<ResourcesScheduleViewProps<ResourcesMonthViewProps>>,\n },\n setup(props, { attrs, slots }) {\n const currentDate = ref(toDateString(props.date ?? props.defaultDate ?? dayjs()))\n const currentView = ref<ResourcesScheduleViewLevel>(props.view ?? props.defaultView)\n\n watch(\n () => props.date,\n (value) => {\n if (value !== undefined) currentDate.value = toDateString(value)\n },\n )\n watch(\n () => props.view,\n (value) => {\n if (value !== undefined) currentView.value = value\n },\n )\n\n const changeDate = (date: DateStringValue) => {\n if (props.date === undefined) currentDate.value = date\n props.onDateChange?.(date)\n }\n const changeView = (view: ScheduleViewLevel) => {\n if (view !== 'day' && view !== 'week' && view !== 'month') return\n if (props.view === undefined) currentView.value = view\n props.onViewChange?.(view)\n }\n\n return () => {\n const isStatic = props.mode === 'static'\n const shared = {\n resources: props.resources,\n date: currentDate.value,\n onDateChange: changeDate,\n onViewChange: changeView,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n renderEventBody: props.renderEventBody,\n renderResourceLabel: props.renderResourceLabel,\n withEventsDragAndDrop: isStatic ? false : props.withEventsDragAndDrop,\n onEventDrop: props.onEventDrop,\n canDragEvent: props.canDragEvent,\n onEventDragStart: props.onEventDragStart,\n onEventDragEnd: props.onEventDragEnd,\n onEventClick: props.onEventClick,\n withDragSlotSelect: props.withDragSlotSelect,\n onSlotDragEnd: props.onSlotDragEnd,\n onExternalEventDrop: props.onExternalEventDrop,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n mode: props.mode,\n }\n\n const forwarded: Record<string, unknown> = {}\n for (const key of Object.keys(slots)) {\n const slot = (slots as Record<string, unknown>)[key]\n if (typeof slot === 'function') forwarded[key] = slot\n }\n const forwardedSlots = Object.keys(forwarded).length ? forwarded : undefined\n\n const content = (() => {\n switch (currentView.value) {\n case 'day':\n return h(\n ResourcesDayView,\n {\n ...shared,\n onTimeSlotClick: props.onTimeSlotClick,\n withEventResize: isStatic ? false : props.withEventResize,\n onEventResize: props.onEventResize,\n canResizeEvent: props.canResizeEvent,\n ...props.dayViewProps,\n },\n forwardedSlots,\n )\n case 'week':\n return h(\n ResourcesWeekView,\n {\n ...shared,\n onTimeSlotClick: props.onTimeSlotClick,\n withEventResize: isStatic ? false : props.withEventResize,\n onEventResize: props.onEventResize,\n canResizeEvent: props.canResizeEvent,\n ...props.weekViewProps,\n },\n forwardedSlots,\n )\n case 'month':\n return h(\n ResourcesMonthView,\n { ...shared, onDayClick: props.onDayClick, ...props.monthViewProps },\n forwardedSlots,\n )\n default:\n return null\n }\n })()\n\n return h(Box, { ...attrs, class: [classes.root, attrs.class], style: attrs.style }, () => [\n content,\n ])\n }\n },\n})\n","import { inject, provide, type InjectionKey } from 'vue'\nimport type { DropTarget, ScheduleEventData } from '../../types'\n\nexport interface DragContextValue {\n draggedEvent: ScheduleEventData | null\n dragOverTarget: DropTarget | null\n isDragging: boolean\n isSlotDragging: boolean\n}\n\nexport const DragContext: InjectionKey<DragContextValue> = Symbol('mantine-schedule-drag-context')\n\nexport function provideDragContext(value: DragContextValue) {\n provide(DragContext, value)\n}\n\nexport function useDragContext() {\n return inject(DragContext, {\n draggedEvent: null,\n dragOverTarget: null,\n isDragging: false,\n isSlotDragging: false,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,0BAA0C;CACrD,OAAO;CACP,MAAM;CACN,UAAU;CACV,MAAM;CACN,KAAK;CACL,MAAM;CACN,OAAO;CACP,MAAM;CACN,QAAQ;CACR,SAAS;CACT,UAAU;CACV,aAAa;CACb,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,mBA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;CAC1D,CAAA,GAAA,IAAA,SAAQ,aAAa,KAAK;AAC5B;AAEA,SAAgB,iBAAiB;CAC/B,QAAA,GAAA,IAAA,QAAc,aAAa;EACzB,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;CAClB,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/labels.ts","../src/utils/format-date/format-date.ts","../src/utils/get-weekdays-names/get-weekdays-names.ts","../src/utils/get-start-of-week/get-start-of-week.ts","../src/utils/get-end-of-week/get-end-of-week.ts","../src/utils/get-week-number/get-week-number.ts","../src/utils/get-month-days/get-month-days.ts","../src/utils/is-after-min-date/is-after-min-date.ts","../src/utils/is-before-max-date/is-before-max-date.ts","../src/utils/is-same-month/is-same-month.ts","../src/utils/get-months-by-quarter/get-months-by-quarter.ts","../src/utils/clamp-interval-minutes/clamp-interval-minutes.ts","../src/utils/parse-time-string/parse-time-string.ts","../src/utils/to-time-string/to-time-string.ts","../src/utils/get-day-time-intervals/get-day-time-intervals.ts","../src/utils/to-date-string/to-date-string.ts","../src/utils/get-week-days/get-week-days.ts","../src/utils/get-months-list/get-months-list.ts","../src/utils/get-years-list/get-years-list.ts","../src/utils/next-week/next-week.ts","../src/utils/previous-week/previous-week.ts","../src/utils/get-current-time-position/get-current-time-position.ts","../src/utils/is-in-time-range/is-in-time-range.ts","../src/utils/is-all-day-event/is-all-day-event.ts","../src/utils/validate-event/validate-event.ts","../src/utils/sort-events/sort-events.ts","../src/utils/is-events-overlap/is-events-overlap.ts","../src/utils/get-visible-events/get-visible-events.ts","../src/utils/is-multiday-event/is-multiday-event.ts","../src/utils/is-event-in-time-range/is-event-in-time-range.ts","../src/utils/is-within-week/is-within-week.ts","../src/utils/get-month-range/get-month-range.ts","../src/utils/get-day-position/get-day-position.ts","../src/utils/calculate-drop-time/calculate-drop-time.ts","../src/utils/calculate-month-drop-date/calculate-month-drop-date.ts","../src/utils/get-business-hours-mod/get-business-hours-mod.ts","../src/utils/expand-recurring-events/expand-recurring-events.ts","../src/utils/get-ordered-resources/get-ordered-resources.ts","../src/utils/get-group-to-resource-id-map/get-group-to-resource-id-map.ts","../src/utils/handle-resources-grid-key-down/handle-resources-grid-key-down.ts","../src/components/shared.ts","../src/hooks/use-event-resize.ts","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.module.css","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.vue","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.vue","../src/components/CurrentTimeIndicator/CurrentTimeIndicator.ts","../src/components/DragContext/DragContext.ts","../src/components/ScheduleEvent/ScheduleEvent.module.css","../src/components/ScheduleEvent/ScheduleEvent.vue","../src/components/ScheduleEvent/ScheduleEvent.vue","../src/components/ScheduleEvent/ScheduleEvent.ts","../src/components/MoreEvents/MoreEvents.module.css","../src/components/MoreEvents/MoreEvents.vue","../src/components/MoreEvents/MoreEvents.vue","../src/components/MoreEvents/MoreEvents.ts","../src/components/ScheduleHeader/ScheduleHeader.context.ts","../src/components/ScheduleHeader/ScheduleHeader.module.css","../src/components/ScheduleHeader/ScheduleHeader.vue","../src/components/ScheduleHeader/ScheduleHeader.vue","../src/components/ScheduleHeader/HeaderControl/HeaderControl.module.css","../src/components/ScheduleHeader/HeaderControl/HeaderControl.vue","../src/components/ScheduleHeader/HeaderControl/HeaderControl.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderNext.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderNext.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderPrevious.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderPrevious.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderToday.vue","../src/components/ScheduleHeader/HeaderControl/ScheduleHeaderToday.vue","../src/components/ScheduleHeader/HeaderControl/HeaderControl.ts","../src/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.module.css","../src/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.vue","../src/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.vue","../src/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.ts","../src/components/ScheduleHeader/ViewSelect/ViewSelect.module.css","../src/components/ScheduleHeader/ViewSelect/ViewSelect.vue","../src/components/ScheduleHeader/ViewSelect/ViewSelect.vue","../src/components/ScheduleHeader/ViewSelect/ViewSelect.ts","../src/components/ScheduleHeader/ScheduleHeader.ts","../src/components/ScheduleHeader/ScheduleHeaderBase.vue","../src/components/ScheduleHeader/ScheduleHeaderBase.vue","../src/components/ScheduleHeader/ScheduleHeaderBase.ts","../src/components/use-slot-drag-select.ts","../src/components/use-slot-drop-target.ts","../src/components/DayView/get-day-view-events/get-day-positioned-events.ts","../src/components/DayView/get-day-view-events/get-day-view-events.ts","../src/components/DayView/DayView.module.css","../src/components/DayView/DayView.vue","../src/components/DayView/DayView.vue","../src/components/DayView/DayView.ts","../src/components/MobileMonthView/get-mobile-month-view-events.ts","../src/components/MobileMonthView/MobileMonthView.module.css","../src/components/MobileMonthView/MobileMonthView.vue","../src/components/MobileMonthView/MobileMonthView.vue","../src/components/MobileMonthView/MobileMonthView.ts","../src/components/keyboard-navigation.ts","../src/components/MonthView/get-month-view-events/add-event-to-day-groups.ts","../src/components/MonthView/get-month-view-events/calculate-event-position-in-week.ts","../src/components/MonthView/get-month-view-events/find-available-row.ts","../src/components/MonthView/get-month-view-events/get-weeks-in-range.ts","../src/components/MonthView/get-month-view-events/get-month-positioned-events.ts","../src/components/MonthView/get-month-view-events/get-month-view-events.ts","../src/components/MonthView/get-renderable-month-event-segments.ts","../src/components/MonthView/MonthView.module.css","../src/components/MonthView/MonthView.vue","../src/components/MonthView/MonthView.vue","../src/components/MonthView/MonthView.ts","../src/components/WeekView/get-week-label/get-week-label.ts","../src/components/WeekView/get-week-view-events/filter-week-view-events.ts","../src/components/WeekView/get-week-view-events/assign-event-rows.ts","../src/components/WeekView/get-week-view-events/calculate-all-day-event-offset.ts","../src/components/WeekView/get-week-view-events/calculate-all-day-event-width.ts","../src/components/WeekView/get-week-view-events/calculate-event-days.ts","../src/components/WeekView/get-week-view-events/calculate-regular-event-overlaps.ts","../src/components/WeekView/get-week-view-events/find-available-column.ts","../src/components/WeekView/get-week-view-events/get-event-end-date.ts","../src/components/WeekView/get-week-view-events/get-hanging-status.ts","../src/components/WeekView/get-week-view-events/get-week-positioned-events.ts","../src/components/WeekView/get-week-view-events/get-week-view-events.ts","../src/components/WeekView/WeekView.module.css","../src/components/WeekView/WeekView.vue","../src/components/WeekView/WeekView.vue","../src/components/WeekView/WeekView.ts","../src/components/YearView/get-year-view-events/get-year-view-events.ts","../src/components/YearView/YearView.module.css","../src/components/YearView/YearView.vue","../src/components/YearView/YearView.vue","../src/components/YearView/YearView.ts","../src/components/Schedule/Schedule.module.css","../src/components/Schedule/Schedule.vue","../src/components/Schedule/Schedule.vue","../src/components/Schedule/Schedule.ts","../src/hooks/use-horizontal-event-resize.ts","../src/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.ts","../src/components/ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events.ts","../src/components/ResourcesDayView/ResourcesDayView.module.css","../src/components/ResourcesDayView/ResourcesDayView.vue","../src/components/ResourcesDayView/ResourcesDayView.vue","../src/components/ResourcesDayView/ResourcesDayView.ts","../src/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.ts","../src/components/ResourcesWeekView/ResourcesWeekView.module.css","../src/components/ResourcesWeekView/ResourcesWeekView.vue","../src/components/ResourcesWeekView/ResourcesWeekView.vue","../src/components/ResourcesWeekView/ResourcesWeekView.ts","../src/components/ResourcesMonthView/get-resources-month-view-layout/get-resources-month-view-layout.ts","../src/components/ResourcesMonthView/ResourcesMonthView.module.css","../src/components/ResourcesMonthView/ResourcesMonthView.vue","../src/components/ResourcesMonthView/ResourcesMonthView.vue","../src/components/ResourcesMonthView/ResourcesMonthView.ts","../src/components/ResourcesSchedule/ResourcesSchedule.module.css","../src/components/ResourcesSchedule/ResourcesSchedule.vue","../src/components/ResourcesSchedule/ResourcesSchedule.vue","../src/components/ResourcesSchedule/ResourcesSchedule.ts"],"sourcesContent":["export interface ScheduleLabels {\n day: string\n week: string\n month: string\n year: string\n allDay: string\n weekday: string\n timeSlot: string\n today: string\n next: string\n previous: string\n more: string\n selectMonth: string\n selectYear: string\n switchToDayView: string\n switchToWeekView: string\n switchToMonthView: string\n switchToYearView: string\n viewSelectLabel: string\n noEvents: string\n moreLabel: (hiddenEventsCount: number) => string\n resource?: string\n resources?: string\n resourceSlot?: string\n}\n\nexport const DEFAULT_SCHEDULE_LABELS: ScheduleLabels = {\n today: 'Today',\n next: 'Next',\n previous: 'Previous',\n more: 'More',\n day: 'Day',\n week: 'Week',\n month: 'Month',\n year: 'Year',\n allDay: 'All day',\n weekday: 'Weekday',\n timeSlot: 'Time slot',\n selectMonth: 'Select month',\n selectYear: 'Select year',\n switchToDayView: 'Switch to day view',\n switchToWeekView: 'Switch to week view',\n switchToMonthView: 'Switch to month view',\n switchToYearView: 'Switch to year view',\n viewSelectLabel: 'Calendar view',\n noEvents: 'No events',\n moreLabel: (hiddenEventsCount: number) => `+${hiddenEventsCount} more`,\n resource: 'Resource',\n resources: 'Resources',\n resourceSlot: 'Resource time slot',\n}\n\nexport type ScheduleLabelsOverride = Partial<ScheduleLabels>\n\nexport function getLabel<K extends keyof ScheduleLabels>(\n key: K,\n override?: ScheduleLabelsOverride,\n): ScheduleLabels[K] {\n if (override) {\n return { ...DEFAULT_SCHEDULE_LABELS, ...override }[key]\n }\n\n return DEFAULT_SCHEDULE_LABELS[key]\n}\n","import dayjs from 'dayjs'\nimport { DateLabelFormat } from '../../types'\n\nexport interface FormatDateInput {\n locale: string\n date: string | Date | dayjs.Dayjs\n format: DateLabelFormat\n}\n\nexport function formatDate({ locale, date, format }: FormatDateInput) {\n if (typeof format === 'function') {\n return format(dayjs(date).format('YYYY-MM-DD HH:mm:ss'))\n }\n\n return dayjs(date).locale(locale).format(format)\n}\n","import dayjs from 'dayjs'\nimport type { VNodeChild } from 'vue'\nimport type { DateLabelFormat, DayOfWeek } from '../../types'\nimport { formatDate } from '../format-date/format-date'\n\ninterface GetWeekdaysNamesInput {\n locale: string\n format?: DateLabelFormat\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function getWeekdaysNames({\n locale,\n format = 'dd',\n firstDayOfWeek = 1,\n}: GetWeekdaysNamesInput) {\n const baseDate = dayjs().day(firstDayOfWeek)\n const labels: VNodeChild[] = []\n\n for (let i = 0; i < 7; i += 1) {\n labels.push(formatDate({ locale, date: baseDate.add(i, 'days'), format }))\n }\n\n return labels\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\n\ninterface GetStartOfWeekInput {\n date: AnyDateValue\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function getStartOfWeek({ date, firstDayOfWeek = 1 }: GetStartOfWeekInput) {\n let value = dayjs(date)\n\n while (value.day() !== firstDayOfWeek) {\n value = value.subtract(1, 'day')\n }\n\n return value.format('YYYY-MM-DD')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\n\nexport function getEndOfWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek = 1) {\n let value = dayjs(date)\n\n if (!value.isValid()) {\n return value\n }\n\n const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1\n while (value.day() !== lastDayOfWeek) {\n value = value.add(1, 'day')\n }\n\n return value.format('YYYY-MM-DD')\n}\n","import dayjs from 'dayjs'\nimport isoWeek from 'dayjs/plugin/isoWeek.js'\nimport { AnyDateValue } from '../../types'\n\ndayjs.extend(isoWeek)\n\nexport function getWeekNumber(week: AnyDateValue | AnyDateValue[]): number {\n if (Array.isArray(week)) {\n const monday = week.find((date) => dayjs(date).day() === 1)\n return dayjs(monday).isoWeek()\n }\n\n return dayjs(week).isoWeek()\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getEndOfWeek } from '../get-end-of-week/get-end-of-week'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\n\ninterface GetMonthDaysInput {\n month: AnyDateValue\n firstDayOfWeek: DayOfWeek | undefined\n consistentWeeks: boolean | undefined\n}\n\nexport function getMonthDays({\n month,\n firstDayOfWeek = 1,\n consistentWeeks,\n}: GetMonthDaysInput): DateStringValue[][] {\n const day = dayjs(month).subtract(dayjs(month).date() - 1, 'day')\n const start = dayjs(day.format('YYYY-MM-DD'))\n const startOfMonth = start.format('YYYY-MM-DD')\n const endOfMonth = start.add(+start.daysInMonth() - 1, 'day').format('YYYY-MM-DD')\n const endDate = getEndOfWeek(endOfMonth, firstDayOfWeek)\n const weeks: DateStringValue[][] = []\n\n let date = dayjs(getStartOfWeek({ date: startOfMonth, firstDayOfWeek }))\n\n while (dayjs(date).isBefore(endDate, 'day')) {\n const days: DateStringValue[] = []\n\n for (let i = 0; i < 7; i += 1) {\n days.push(date.format('YYYY-MM-DD 00:00:00'))\n date = date.add(1, 'day')\n }\n\n weeks.push(days)\n }\n\n if (consistentWeeks && weeks.length < 6) {\n const lastWeek = weeks[weeks.length - 1]\n const lastDay = lastWeek[lastWeek.length - 1]\n let nextDay = dayjs(lastDay).add(1, 'day')\n\n while (weeks.length < 6) {\n const days: DateStringValue[] = []\n\n for (let i = 0; i < 7; i += 1) {\n days.push(nextDay.format('YYYY-MM-DD 00:00:00'))\n nextDay = nextDay.add(1, 'day')\n }\n\n weeks.push(days)\n }\n }\n\n return weeks\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isAfterMinDate(date: AnyDateValue, minDate: AnyDateValue | undefined) {\n return minDate ? dayjs(date).isAfter(dayjs(minDate).subtract(1, 'day'), 'day') : true\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isBeforeMaxDate(date: AnyDateValue, maxDate: AnyDateValue | undefined) {\n return maxDate ? dayjs(date).isBefore(dayjs(maxDate).add(1, 'day'), 'day') : true\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\n\nexport function isSameMonth(date: AnyDateValue, comparison: AnyDateValue) {\n return dayjs(date).format('YYYY-MM') === dayjs(comparison).format('YYYY-MM')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue } from '../../types'\n\nexport function getMonthsByQuarter(year: AnyDateValue) {\n const startOfYear = dayjs(year).startOf('year').toDate()\n\n const results: DateStringValue[][] = [[], [], [], []]\n let currentMonthIndex = 0\n\n for (let i = 0; i < 4; i += 1) {\n for (let j = 0; j < 3; j += 1) {\n results[i].push(dayjs(startOfYear).add(currentMonthIndex, 'months').format('YYYY-MM-DD'))\n currentMonthIndex += 1\n }\n }\n\n return results\n}\n","/**\n * Clamps interval minutes to a value that keeps the time grid consistent:\n *\n * - Values of 60 or less must divide evenly into an hour.\n * - Values above an hour must be a whole number of hours.\n *\n * Invalid values fall back to 60 and the result is capped to one day.\n */\nexport function clampIntervalMinutes(intervalMinutes: number): number {\n const rounded = Math.round(Math.max(1, Math.min(1440, intervalMinutes)))\n\n if (rounded <= 60) {\n return 60 % rounded === 0 ? rounded : 60\n }\n\n return rounded % 60 === 0 ? rounded : 60\n}\n","export interface ParsedTime {\n hours: number\n minutes: number\n seconds: number\n}\n\nexport function parseTimeString(time: string): ParsedTime {\n const [hours, minutes, seconds] = time.split(':').map(Number)\n return { hours, minutes, seconds: seconds || 0 }\n}\n","import { ParsedTime } from '../parse-time-string/parse-time-string'\n\nexport function toTimeString({ hours, minutes, seconds }: ParsedTime) {\n return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`\n}\n","import { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\nimport { toTimeString } from '../to-time-string/to-time-string'\n\nexport interface DayTimeInterval {\n /** Start time of the interval in HH:mm:ss format */\n startTime: string\n\n /** End time of the interval in HH:mm:ss format */\n endTime: string\n\n /** Duration of the interval in seconds */\n duration: number\n\n /** Indicates if the interval starts at the beginning of an hour */\n isHourStart: boolean\n}\n\nexport interface GetDayTimeIntervalsInput {\n /** Start time in HH:mm:ss format */\n startTime: string\n\n /** End time in HH:mm:ss format, end of the day by default */\n endTime?: string\n\n /** Interval in minutes, 60 by default */\n intervalMinutes?: number\n}\n\nexport function getDayTimeIntervals({\n startTime,\n endTime,\n intervalMinutes: _intervalMinutes = 60,\n}: GetDayTimeIntervalsInput): DayTimeInterval[] {\n const intervalMinutes = clampIntervalMinutes(_intervalMinutes)\n\n const start = parseTimeString(startTime)\n const end = endTime ? parseTimeString(endTime) : { hours: 23, minutes: 59, seconds: 59 }\n\n const startSeconds = start.hours * 3600 + start.minutes * 60 + start.seconds\n const endSeconds = end.hours * 3600 + end.minutes * 60 + end.seconds\n const intervalSeconds = intervalMinutes * 60\n\n const intervals: DayTimeInterval[] = []\n let currentSeconds = startSeconds\n\n while (currentSeconds < endSeconds) {\n const intervalStartSeconds = currentSeconds\n let intervalEndSeconds = currentSeconds + intervalSeconds\n\n if (intervalEndSeconds > endSeconds) {\n intervalEndSeconds = endSeconds\n }\n\n const startHours = Math.floor(intervalStartSeconds / 3600)\n const startMinutes = Math.floor((intervalStartSeconds % 3600) / 60)\n const startSecs = intervalStartSeconds % 60\n\n const endHours = Math.floor(intervalEndSeconds / 3600)\n const endMinutes = Math.floor((intervalEndSeconds % 3600) / 60)\n const endSecs = intervalEndSeconds % 60\n\n const durationSeconds = intervalEndSeconds - intervalStartSeconds\n const isHourStart = startMinutes === 0 && startSecs === 0\n\n intervals.push({\n startTime: toTimeString({ hours: startHours, minutes: startMinutes, seconds: startSecs }),\n endTime: toTimeString({ hours: endHours, minutes: endMinutes, seconds: endSecs }),\n duration: durationSeconds,\n isHourStart,\n })\n\n currentSeconds = intervalEndSeconds\n }\n\n return intervals\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue } from '../../types'\n\nexport function toDateString(date: AnyDateValue): DateStringValue {\n return dayjs(date).format('YYYY-MM-DD 00:00:00')\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport interface GetWeekDaysInput {\n /** Week to generate days for */\n week: AnyDateValue\n\n /** Indices of weekend days, 0-6, where 0 is Sunday and 6 is Saturday. The default value is defined by `DatesProvider`. */\n weekendDays?: DayOfWeek[]\n\n /** If set to false, weekend days are hidden @default true */\n withWeekendDays?: boolean\n\n /** Number 0-6, where 0 – Sunday and 6 – Saturday @default 1 */\n firstDayOfWeek?: DayOfWeek\n}\n\n/** Returns a list of days in a given week */\nexport function getWeekDays({\n week,\n weekendDays,\n withWeekendDays = true,\n firstDayOfWeek = 1,\n}: GetWeekDaysInput): DateStringValue[] {\n const days: DateStringValue[] = []\n\n let current = dayjs(getStartOfWeek({ date: week, firstDayOfWeek }))\n\n for (let i = 0; i < 7; i += 1) {\n const dayOfWeek = current.day()\n const isWeekend = weekendDays && weekendDays.includes(dayOfWeek as DayOfWeek)\n\n if (!isWeekend || withWeekendDays) {\n days.push(toDateString(current))\n }\n\n current = current.add(1, 'day')\n }\n\n return days\n}\n","import dayjs from 'dayjs'\nimport { DateLabelFormat } from '../../types'\nimport { formatDate } from '../format-date/format-date'\n\ninterface GetMonthsListInput {\n locale: string\n format: DateLabelFormat\n}\n\ninterface MonthData {\n month: number\n name: string\n}\n\nexport function getMonthsList({ locale, format }: GetMonthsListInput) {\n const months: MonthData[] = []\n const date = dayjs().locale(locale).startOf('year')\n\n for (let i = 0; i < 12; i++) {\n months.push({ month: i, name: formatDate({ date: date.add(i, 'month'), format, locale }) })\n }\n\n return months\n}\n","interface GetYearsListInput {\n startYear: number\n endYear: number\n}\n\nexport function getYearsList({ startYear, endYear }: GetYearsListInput) {\n const years: number[] = []\n\n for (let year = startYear; year <= endYear; year++) {\n years.push(year)\n }\n\n return years\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport function nextWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek): DateStringValue {\n const start = getStartOfWeek({ date, firstDayOfWeek })\n return toDateString(dayjs(start).set('date', dayjs(start).date() + 7))\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, DayOfWeek } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\nimport { toDateString } from '../to-date-string/to-date-string'\n\nexport function previousWeek(date: AnyDateValue, firstDayOfWeek: DayOfWeek): DateStringValue {\n const start = getStartOfWeek({ date, firstDayOfWeek })\n return toDateString(dayjs(start).set('date', dayjs(start).date() - 7))\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\nimport { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\n\ninterface GetCurrentTimePositionInput {\n startTime?: string\n endTime?: string\n now?: AnyDateValue\n\n /** Number of minutes per time slot. Used to align the indicator to whole slots when `endTime` does not divide evenly. */\n intervalMinutes?: number\n}\n\nexport function getCurrentTimePosition(input?: GetCurrentTimePositionInput) {\n const now = dayjs(input?.now)\n\n if (!input?.startTime || !input?.endTime) {\n const startOf = now.startOf('date')\n const diffInMinutes = now.diff(startOf, 'minute')\n return (diffInMinutes / 1440) * 100\n }\n\n const [startHour, startMinute, startSecond = 0] = input.startTime.split(':').map(Number)\n const [endHour, endMinute, endSecond = 0] = input.endTime.split(':').map(Number)\n\n const startOfDay = now.startOf('date')\n const startDateTime = startOfDay.hour(startHour).minute(startMinute).second(startSecond)\n const endDateTime = startOfDay.hour(endHour).minute(endMinute).second(endSecond)\n\n const literalSeconds = endDateTime.diff(startDateTime, 'second')\n const intervalSeconds =\n input.intervalMinutes !== undefined\n ? clampIntervalMinutes(input.intervalMinutes) * 60\n : undefined\n const totalSeconds = intervalSeconds\n ? Math.ceil(literalSeconds / intervalSeconds) * intervalSeconds\n : literalSeconds\n const currentSeconds = now.diff(startDateTime, 'second')\n\n return (currentSeconds / totalSeconds) * 100\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue } from '../../types'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\ninterface IsInTimeRangeInput {\n date: AnyDateValue\n startTime?: string\n endTime?: string\n}\n\n/** Returns true if the given date's time is within the specified time range */\nexport function isInTimeRange({\n date,\n startTime = '00:00:00',\n endTime = '23:59:59',\n}: IsInTimeRangeInput) {\n const targetDate = dayjs(date)\n const parsedStartTime = parseTimeString(startTime)\n const parsedEndTime = parseTimeString(endTime)\n\n const startDateTime = targetDate\n .hour(parsedStartTime.hours)\n .minute(parsedStartTime.minutes)\n .second(parsedStartTime.seconds)\n\n const endDateTime = targetDate\n .hour(parsedEndTime.hours)\n .minute(parsedEndTime.minutes)\n .second(parsedEndTime.seconds)\n\n return targetDate.isAfter(startDateTime) && targetDate.isBefore(endDateTime)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, ScheduleEventData } from '../../types'\n\ninterface IsAllDayEventInput {\n event: ScheduleEventData\n date: AnyDateValue\n}\n\nexport function isAllDayEvent({ event, date }: IsAllDayEventInput) {\n const dayStart = dayjs(date).startOf('day')\n const nextDayStart = dayStart.add(1, 'day')\n const sameDayEnd = nextDayStart.subtract(1, 'second')\n const startTime = dayjs(event.start)\n const endTime = dayjs(event.end)\n\n return startTime.isSame(dayStart) && (endTime.isSame(nextDayStart) || endTime.isSame(sameDayEnd))\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\nexport function validateEvent(eventData: ScheduleEventData) {\n if (!dayjs(eventData.start).isValid()) {\n throw new Error(`[@mantine/schedule] Invalid start date for event id: ${eventData.id}`)\n }\n\n if (!dayjs(eventData.end).isValid()) {\n throw new Error(`[@mantine/schedule] Invalid end date for event id: ${eventData.id}`)\n }\n\n if (dayjs(eventData.end).isBefore(dayjs(eventData.start))) {\n throw new Error(\n `[@mantine/schedule] Event end date is before start date for event id: ${eventData.id}`,\n )\n }\n\n return eventData\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\n/** Sorts events by start time, then by duration (longer first) */\nexport function sortEvents<T extends ScheduleEventData>(events: T[]): T[] {\n return [...events].sort((a: T, b: T) => {\n const startDiff = dayjs(a.start).diff(dayjs(b.start))\n\n if (startDiff !== 0) {\n return startDiff\n }\n\n return dayjs(b.end).diff(dayjs(b.start)) - dayjs(a.end).diff(dayjs(a.start))\n })\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\n/** Returns true if two events overlap in time */\nexport function isEventsOverlap(event1: ScheduleEventData, event2: ScheduleEventData) {\n const start1 = dayjs(event1.start).valueOf()\n const end1 = dayjs(event1.end).valueOf()\n const start2 = dayjs(event2.start).valueOf()\n const end2 = dayjs(event2.end).valueOf()\n return start1 < end2 && start2 < end1\n}\n","interface GetVisibleEventsInput {\n maxEvents: number\n totalEvents: number\n}\n\nexport function getVisibleEvents({ maxEvents, totalEvents }: GetVisibleEventsInput) {\n if (totalEvents <= maxEvents) {\n return {\n visibleEventsCount: totalEvents,\n hiddenEventsCount: 0,\n }\n }\n\n return {\n visibleEventsCount: maxEvents - 1,\n hiddenEventsCount: totalEvents - (maxEvents - 1),\n }\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\n\nexport function isMultidayEvent(event: ScheduleEventData) {\n const startDate = dayjs(event.start).startOf('day')\n const rawEnd = dayjs(event.end)\n const endAtMidnight = rawEnd.hour() === 0 && rawEnd.minute() === 0 && rawEnd.second() === 0\n const endDate = endAtMidnight ? rawEnd.startOf('day').subtract(1, 'day') : rawEnd.startOf('day')\n return endDate.isAfter(startDate)\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\nimport { isMultidayEvent } from '../is-multiday-event/is-multiday-event'\n\ninterface IsEventInTimeRangeInput {\n event: ScheduleEventData\n startTime?: string\n endTime?: string\n}\n\nfunction spansFullDay(event: ScheduleEventData) {\n const start = dayjs(event.start)\n const end = dayjs(event.end)\n if (!start.isSame(start.startOf('day'))) {\n return false\n }\n const nextDayStart = start.startOf('day').add(1, 'day')\n return end.isSame(nextDayStart) || end.isSame(nextDayStart.subtract(1, 'second'))\n}\n\nexport function isEventInTimeRange({ event, startTime, endTime }: IsEventInTimeRangeInput) {\n if (isMultidayEvent(event) || spansFullDay(event)) {\n return true\n }\n\n if (!startTime || !endTime) {\n return true\n }\n\n const [startHour, startMinute] = startTime.split(':').map(Number)\n const [endHour, endMinute] = endTime.split(':').map(Number)\n const timeWindowStartMinutes = startHour * 60 + startMinute\n const timeWindowEndMinutes = endHour * 60 + endMinute\n\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const eventStartMinutes = eventStart.hour() * 60 + eventStart.minute()\n const eventEndMinutes = eventEnd.hour() * 60 + eventEnd.minute()\n\n return !(eventEndMinutes <= timeWindowStartMinutes || eventStartMinutes >= timeWindowEndMinutes)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport { getStartOfWeek } from '../get-start-of-week/get-start-of-week'\n\ninterface IsWithinWeekInput {\n event: ScheduleEventData\n targetWeek: AnyDateValue\n firstDayOfWeek: DayOfWeek\n}\n\nexport function isWithinWeek({ event, targetWeek, firstDayOfWeek }: IsWithinWeekInput) {\n const startOfWeek = dayjs(getStartOfWeek({ date: targetWeek, firstDayOfWeek }))\n const endOfWeek = startOfWeek.add(7, 'day')\n return dayjs(event.start).isBefore(endOfWeek) && dayjs(event.end).isAfter(startOfWeek)\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek } from '../../types'\nimport { getMonthDays } from '../get-month-days/get-month-days'\nimport { toDateString } from '../to-date-string/to-date-string'\n\ninterface GetMonthRangeInput {\n month: AnyDateValue\n withOutsideDays: boolean | undefined\n consistentWeeks: boolean | undefined\n firstDayOfWeek: DayOfWeek\n}\n\n/** Returns start and end dates as displayed in MonthView */\nexport function getMonthRange({\n month,\n withOutsideDays,\n consistentWeeks,\n firstDayOfWeek,\n}: GetMonthRangeInput) {\n if (!withOutsideDays) {\n return {\n start: toDateString(dayjs(month).startOf('month')),\n end: toDateString(dayjs(month).endOf('month')),\n }\n }\n\n const days = getMonthDays({ month, firstDayOfWeek, consistentWeeks })\n\n return {\n start: days[0][0],\n end: days[days.length - 1][6],\n }\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../types'\nimport { clampIntervalMinutes } from '../clamp-interval-minutes/clamp-interval-minutes'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\ninterface GetDayPositionInput {\n /** Event data to calculate position for */\n event: ScheduleEventData\n\n /** Start time boundary for the day in HH:mm:ss format, `00:00:00` by default */\n startTime?: string\n\n /** End time boundary for the day in HH:mm:ss format, `23:59:59` by default */\n endTime?: string\n\n /** Number of minutes per time slot, `60` by default. Used to align the canvas to whole slots when `endTime` does not divide evenly. */\n intervalMinutes?: number\n}\n\n/** Calculates day position within given start and end time boundaries. Returns top and height in percentages. */\nexport function getDayPosition({\n event,\n startTime = '00:00:00',\n endTime = '23:59:59',\n intervalMinutes = 60,\n}: GetDayPositionInput) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n\n const parsedStartTime = parseTimeString(startTime)\n const parsedEndTime = parseTimeString(endTime)\n\n const startOfDay = eventStart.startOf('date')\n const boundaryStart = startOfDay\n .hour(parsedStartTime.hours)\n .minute(parsedStartTime.minutes)\n .second(parsedStartTime.seconds)\n const literalEnd = startOfDay\n .hour(parsedEndTime.hours)\n .minute(parsedEndTime.minutes)\n .second(parsedEndTime.seconds)\n\n const intervalSeconds = clampIntervalMinutes(intervalMinutes) * 60\n const literalRangeSeconds = literalEnd.diff(boundaryStart, 'second')\n const totalSeconds = Math.ceil(literalRangeSeconds / intervalSeconds) * intervalSeconds\n\n const clippedEventStart = eventStart.isBefore(boundaryStart) ? boundaryStart : eventStart\n const eventStartSeconds = clippedEventStart.diff(boundaryStart, 'second')\n\n const clippedEventEnd = eventEnd.isAfter(literalEnd) ? literalEnd : eventEnd\n const eventEndSeconds = clippedEventEnd.diff(boundaryStart, 'second')\n\n const startPercent = (eventStartSeconds / totalSeconds) * 100\n const endPercent = (eventEndSeconds / totalSeconds) * 100\n\n return {\n top: startPercent,\n height: endPercent - startPercent,\n }\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, ScheduleEventData } from '../../types'\nimport { parseTimeString } from '../parse-time-string/parse-time-string'\n\nexport interface CalculateDropTimeInput {\n /** The event being dragged */\n draggedEvent: ScheduleEventData\n\n /** Target date where event will be dropped */\n targetDate: AnyDateValue\n\n /** Target time slot start time in HH:mm:ss format */\n targetSlotTime: string\n\n /** Mouse Y position relative to the slot */\n mouseYOffset?: number\n\n /** Height of one slot in pixels */\n slotHeight?: number\n\n /** Minutes per slot */\n intervalMinutes?: number\n}\n\nexport interface CalculateDropTimeResult {\n /** New start date/time for the event */\n start: Date\n\n /** New end date/time for the event */\n end: Date\n}\n\nexport function calculateDropTime({\n draggedEvent,\n targetDate,\n targetSlotTime,\n mouseYOffset = 0,\n slotHeight = 64,\n intervalMinutes = 15,\n}: CalculateDropTimeInput): CalculateDropTimeResult {\n const eventDuration = dayjs(draggedEvent.end).diff(dayjs(draggedEvent.start), 'millisecond')\n\n const parsedTime = parseTimeString(targetSlotTime)\n const targetDay = dayjs(targetDate).startOf('day')\n\n const baseTargetTime = targetDay.hour(parsedTime.hours).minute(parsedTime.minutes).second(0)\n\n let finalTargetTime = baseTargetTime\n\n if (mouseYOffset > 0 && slotHeight > 0) {\n const offsetRatio = mouseYOffset / slotHeight\n const offsetMinutes = Math.round(offsetRatio * intervalMinutes)\n finalTargetTime = baseTargetTime.add(offsetMinutes, 'minute')\n }\n\n const newStart = finalTargetTime.toDate()\n const newEnd = finalTargetTime.add(eventDuration, 'millisecond').toDate()\n\n return {\n start: newStart,\n end: newEnd,\n }\n}\n","import dayjs from 'dayjs'\nimport { DateStringValue, ScheduleEventData } from '../../types'\n\nexport interface CalculateMonthDropDateInput {\n /** The event being dragged */\n draggedEvent: ScheduleEventData\n\n /** The target day where the event is being dropped */\n targetDay: DateStringValue\n}\n\nexport interface CalculateMonthDropDateResult {\n /** New start date for the event */\n start: Date\n\n /** New end date for the event */\n end: Date\n}\n\nexport function calculateMonthDropDate({\n draggedEvent,\n targetDay,\n}: CalculateMonthDropDateInput): CalculateMonthDropDateResult {\n const eventDuration = dayjs(draggedEvent.end).diff(dayjs(draggedEvent.start), 'millisecond')\n\n const originalStartTime = dayjs(draggedEvent.start)\n const targetDayStart = dayjs(targetDay).startOf('day')\n\n const newStart = targetDayStart\n .hour(originalStartTime.hour())\n .minute(originalStartTime.minute())\n .second(originalStartTime.second())\n .millisecond(originalStartTime.millisecond())\n\n const newEnd = newStart.add(eventDuration, 'millisecond')\n\n return {\n start: newStart.toDate(),\n end: newEnd.toDate(),\n }\n}\n","import { DayOfWeek } from '../../types'\n\n/** Business hours range in `HH:mm:ss` format */\nexport type BusinessHoursRange = [string, string]\n\n/** Per-day business hours map keyed by day of the week (0 – Sunday, 6 – Saturday). `null` marks a day as fully outside business hours. */\nexport type BusinessHoursPerDay = Partial<Record<DayOfWeek, BusinessHoursRange | null>>\n\n/** Business hours value – tuple applies to every day, record configures business hours per day */\nexport type BusinessHoursValue = BusinessHoursRange | BusinessHoursPerDay\n\nexport interface GetBusinessHoursModInput {\n time: string\n businessHours?: BusinessHoursValue\n highlightBusinessHours?: boolean\n dayOfWeek?: DayOfWeek\n}\n\nexport interface BusinessHoursMod {\n 'business-hours': boolean\n 'non-business-hours': boolean\n}\n\nfunction isBusinessHoursRange(value: BusinessHoursValue): value is BusinessHoursRange {\n return (\n Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'string' &&\n typeof value[1] === 'string'\n )\n}\n\n/**\n * Determines if a given time is within business hours and returns modifier object\n * @param time - Time string in HH:mm:ss format\n * @param businessHours - Tuple of [start, end] times in HH:mm:ss format, or per-day record keyed by day of the week\n * @param highlightBusinessHours - Whether to highlight business hours\n * @param dayOfWeek - Day of the week (0 – Sunday, 6 – Saturday), used to resolve per-day business hours\n * @returns Modifier object for styling business/non-business hours\n */\nexport function getBusinessHoursMod({\n time,\n businessHours,\n highlightBusinessHours,\n dayOfWeek,\n}: GetBusinessHoursModInput): BusinessHoursMod {\n if (!highlightBusinessHours || !businessHours) {\n return {\n 'business-hours': false,\n 'non-business-hours': false,\n }\n }\n\n let range: [string, string] | null\n if (isBusinessHoursRange(businessHours)) {\n range = businessHours\n } else {\n if (dayOfWeek === undefined) {\n return {\n 'business-hours': false,\n 'non-business-hours': false,\n }\n }\n range = businessHours[dayOfWeek] ?? null\n }\n\n if (!range) {\n return {\n 'business-hours': false,\n 'non-business-hours': true,\n }\n }\n\n const [start, end] = range\n const isInBusinessHours = time >= start && time < end\n\n return {\n 'business-hours': isInBusinessHours,\n 'non-business-hours': !isInBusinessHours,\n }\n}\n","import dayjs from 'dayjs'\nimport * as rruleAll from 'rrule'\n\nfunction resolveRRule(ns: Record<string, unknown>): typeof rruleAll.RRule {\n const interop = (ns.default ?? ns) as typeof rruleAll\n return interop.RRule\n}\nconst RRule = resolveRRule(rruleAll as unknown as Record<string, unknown>)\nimport { DateTimeStringValue, ScheduleEventData, ScheduleRecurrenceData } from '../../types'\nimport { validateEvent } from '../validate-event/validate-event'\n\ninterface ExpandRecurringEventsInput {\n events: ScheduleEventData[] | undefined\n rangeStart: Date | string\n rangeEnd: Date | string\n expansionLimit?: number\n}\n\nfunction getRecurrenceKey(recurringEventId: string | number, recurrenceId: DateTimeStringValue) {\n return `${recurringEventId}::${recurrenceId}`\n}\n\nfunction overlapsRange(\n eventStart: dayjs.Dayjs,\n eventEnd: dayjs.Dayjs,\n rangeStart: dayjs.Dayjs,\n rangeEnd: dayjs.Dayjs,\n) {\n return (\n (eventEnd.isAfter(rangeStart) || eventEnd.isSame(rangeStart)) &&\n (eventStart.isBefore(rangeEnd) || eventStart.isSame(rangeEnd))\n )\n}\n\nfunction getExdateSet(recurrence: ScheduleRecurrenceData | undefined) {\n if (!recurrence?.exdate) {\n return new Set<string>()\n }\n\n const values = recurrence.exdate\n .map((value) => dayjs(value))\n .filter((value) => value.isValid())\n .map((value) => value.format('YYYY-MM-DD HH:mm:ss'))\n\n return new Set(values)\n}\n\nfunction getRRuleString(rule: string) {\n const normalized = rule.trim()\n if (!normalized.includes('\\n')) {\n return normalized.startsWith('RRULE:') ? normalized.replace(/^RRULE:/, '') : normalized\n }\n\n const rruleLine = normalized\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.startsWith('RRULE:'))\n\n return rruleLine ? rruleLine.replace(/^RRULE:/, '') : normalized\n}\n\nfunction getOccurrenceStartsInRange(\n event: ScheduleEventData,\n rangeStart: dayjs.Dayjs,\n rangeEnd: dayjs.Dayjs,\n expansionLimit: number,\n durationMs: number,\n) {\n const dtstart = dayjs(event.recurrence?.dtstart || event.start)\n if (!dtstart.isValid() || !event.recurrence) {\n return []\n }\n\n try {\n const options = RRule.parseString(getRRuleString(event.recurrence.rrule))\n options.dtstart = dtstart.toDate()\n const rule = new RRule(options)\n\n const searchStart = rangeStart.subtract(Math.max(0, durationMs), 'millisecond').toDate()\n const results = rule.between(searchStart, rangeEnd.toDate(), true)\n return results.slice(0, expansionLimit).map((value) => dayjs(value))\n } catch {\n return []\n }\n}\n\nfunction isEventInRange(event: ScheduleEventData, rangeStart: dayjs.Dayjs, rangeEnd: dayjs.Dayjs) {\n const start = dayjs(event.start)\n const end = dayjs(event.end)\n\n if (!start.isValid() || !end.isValid()) {\n return false\n }\n\n return overlapsRange(start, end, rangeStart, rangeEnd)\n}\n\nfunction createGeneratedInstance(\n event: ScheduleEventData,\n occurrenceStart: dayjs.Dayjs,\n durationMs: number,\n): ScheduleEventData {\n const occurrenceEnd = occurrenceStart.add(durationMs, 'millisecond')\n const recurrenceId = occurrenceStart.format('YYYY-MM-DD HH:mm:ss')\n const { recurrence: _recurrence, ...eventWithoutRecurrence } = event\n\n return {\n ...eventWithoutRecurrence,\n id: `${event.id}::${recurrenceId}`,\n start: occurrenceStart.format('YYYY-MM-DD HH:mm:ss'),\n end: occurrenceEnd.format('YYYY-MM-DD HH:mm:ss'),\n recurringEventId: event.id,\n recurrenceId,\n recurringInstance: {\n isRecurringInstance: true,\n recurringEventId: event.id,\n recurrenceId,\n originalStart: occurrenceStart.format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: occurrenceEnd.format('YYYY-MM-DD HH:mm:ss'),\n },\n }\n}\n\nconst DEFAULT_EXPANSION_LIMIT = 2000\n\nexport function expandRecurringEvents({\n events,\n rangeStart,\n rangeEnd,\n expansionLimit = DEFAULT_EXPANSION_LIMIT,\n}: ExpandRecurringEventsInput): ScheduleEventData[] {\n if (!events || events.length === 0) {\n return []\n }\n\n const start = dayjs(rangeStart)\n const end = dayjs(rangeEnd)\n\n if (!start.isValid() || !end.isValid()) {\n return []\n }\n\n const regularEvents: ScheduleEventData[] = []\n const recurringEvents: ScheduleEventData[] = []\n const overrides = new Map<string, ScheduleEventData>()\n\n for (const event of events) {\n if (event.recurringEventId && event.recurrenceId) {\n overrides.set(getRecurrenceKey(event.recurringEventId, event.recurrenceId), event)\n continue\n }\n\n if (event.recurrence?.rrule) {\n recurringEvents.push(event)\n continue\n }\n\n regularEvents.push(event)\n }\n\n const output: ScheduleEventData[] = []\n const consumedOverrideIds = new Set<string | number>()\n\n for (const event of regularEvents) {\n if (isEventInRange(event, start, end)) {\n output.push(validateEvent(event))\n }\n }\n\n for (const event of recurringEvents) {\n const eventStart = dayjs(event.recurrence?.dtstart || event.start)\n const eventEnd = dayjs(event.end)\n\n if (!eventStart.isValid() || !eventEnd.isValid()) {\n continue\n }\n\n const durationMs = eventEnd.diff(dayjs(event.start), 'millisecond')\n if (durationMs < 0) {\n continue\n }\n\n const exdate = getExdateSet(event.recurrence)\n const starts = getOccurrenceStartsInRange(event, start, end, expansionLimit, durationMs)\n\n for (const occurrenceStart of starts) {\n const recurrenceId = occurrenceStart.format('YYYY-MM-DD HH:mm:ss')\n if (exdate.has(recurrenceId)) {\n continue\n }\n\n const overrideKey = getRecurrenceKey(event.id, recurrenceId)\n const override = overrides.get(overrideKey)\n if (override) {\n if (isEventInRange(override, start, end)) {\n output.push(validateEvent(override))\n consumedOverrideIds.add(override.id)\n }\n continue\n }\n\n const generated = createGeneratedInstance(event, occurrenceStart, durationMs)\n if (overlapsRange(dayjs(generated.start), dayjs(generated.end), start, end)) {\n output.push(validateEvent(generated))\n }\n }\n }\n\n for (const override of overrides.values()) {\n if (consumedOverrideIds.has(override.id)) {\n continue\n }\n if (isEventInRange(override, start, end)) {\n output.push(validateEvent(override))\n }\n }\n\n return output\n}\n\nexport { DEFAULT_EXPANSION_LIMIT }\n","import type { ScheduleResourceData, ScheduleResourceGroup } from '../../types'\n\nexport interface GroupRange {\n group: ScheduleResourceGroup\n startIndex: number\n count: number\n}\n\nexport interface ResourceGroupInfo {\n group: ScheduleResourceGroup\n position: 'first' | 'middle' | 'last' | 'only'\n count: number\n}\n\nexport interface OrderedResourcesResult {\n orderedResources: ScheduleResourceData[]\n groupRanges: GroupRange[]\n resourceGroupMap: Array<ResourceGroupInfo | null>\n}\n\nexport function getOrderedResources(\n resources: ScheduleResourceData[],\n groups: ScheduleResourceGroup[] | undefined,\n): OrderedResourcesResult {\n if (!groups?.length) {\n return { orderedResources: resources, groupRanges: [], resourceGroupMap: [] }\n }\n\n const resourceMap = new Map(resources.map((resource) => [resource.id, resource]))\n const usedIds = new Set<string | number>()\n const orderedResources: ScheduleResourceData[] = []\n const groupRanges: GroupRange[] = []\n\n groups.forEach((group) => {\n const startIndex = orderedResources.length\n group.resourceIds.forEach((id) => {\n const resource = resourceMap.get(id)\n if (resource && !usedIds.has(id)) {\n orderedResources.push(resource)\n usedIds.add(id)\n }\n })\n const count = orderedResources.length - startIndex\n if (count) groupRanges.push({ group, startIndex, count })\n })\n\n resources.forEach((resource) => {\n if (!usedIds.has(resource.id)) orderedResources.push(resource)\n })\n\n const resourceGroupMap: Array<ResourceGroupInfo | null> = Array(orderedResources.length).fill(\n null,\n )\n groupRanges.forEach(({ group, startIndex, count }) => {\n for (let index = 0; index < count; index += 1) {\n const position: ResourceGroupInfo['position'] =\n count === 1 ? 'only' : index === 0 ? 'first' : index === count - 1 ? 'last' : 'middle'\n resourceGroupMap[startIndex + index] = { group, position, count }\n }\n })\n\n return { orderedResources, groupRanges, resourceGroupMap }\n}\n","import type { ScheduleResourceData } from '../../types'\n\nexport function getGroupToResourceIdMap(\n resources: ScheduleResourceData[],\n): Map<string, string | number> {\n return new Map(resources.map((resource) => [String(resource.id), resource.id]))\n}\n","export type ResourcesGridControls = Array<Array<HTMLButtonElement | undefined>>\n\nexport interface HandleResourcesGridKeyDownInput {\n controls: ResourcesGridControls\n resourceIndex: number\n slotIndex: number\n event: KeyboardEvent\n}\n\nexport function handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex,\n event,\n}: HandleResourcesGridKeyDownInput): void {\n const deltas: Record<string, [number, number]> = {\n ArrowLeft: [0, -1],\n ArrowRight: [0, 1],\n ArrowUp: [-1, 0],\n ArrowDown: [1, 0],\n }\n const delta = deltas[event.key]\n if (!delta) return\n event.preventDefault()\n\n let row = resourceIndex + delta[0]\n let column = slotIndex + delta[1]\n while (row >= 0 && row < controls.length) {\n const rowControls = controls[row] || []\n if (delta[0] !== 0) column = Math.min(column, rowControls.length - 1)\n if (column < 0 || column >= rowControls.length) return\n const control = rowControls[column]\n if (control && !control.disabled && !control.hasAttribute('data-hidden')) {\n control.focus()\n return\n }\n row += delta[0]\n column += delta[1]\n }\n}\n","import dayjs from 'dayjs'\nimport { computed, onScopeDispose, type ComputedRef } from 'vue'\nimport type { EventSlots, RenderEvent, RenderEventBody } from '../component-props'\nimport type {\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n} from '../types'\nimport { expandRecurringEvents, formatDate, toDateString } from '../utils'\n\n/**\n * Resolves a schedule `radius` prop to a CSS value.\n *\n * Deliberately not `getRadius` from the core package: this accepts any CSS length\n * (`12px`, `1em`, `clamp(...)`) alongside the `theme.radius` keys, and treats a plain\n * number as pixels rather than rem.\n */\nexport function resolveScheduleRadius(radius: string | number | undefined): string | undefined {\n if (radius === undefined) {\n return undefined\n }\n\n if (typeof radius === 'number') {\n return `${radius}px`\n }\n\n return ['xs', 'sm', 'md', 'lg', 'xl'].includes(radius)\n ? `var(--mantine-radius-${radius})`\n : radius\n}\n\n/** A callback coalesced to one animation frame, with the pending frame cancellable. */\nexport interface RafThrottled<Args extends unknown[]> {\n (...args: Args): void\n\n /** Drops the pending frame. Call this the moment the gesture ends. */\n cancel: () => void\n}\n\n/**\n * Runs `callback` at most once per animation frame with the most recent arguments.\n *\n * Pointer and drag events fire far faster than the browser paints. Handling every one of them\n * means the schedule reads layout and re-renders several times per frame, which makes the drag\n * fall behind the pointer and keep catching up after it has stopped. Coalescing to one frame\n * keeps the work bounded, and `cancel` guarantees nothing lands after the drop.\n */\nexport function rafThrottle<Args extends unknown[]>(\n callback: (...args: Args) => void,\n): RafThrottled<Args> {\n let frame = 0\n let pending: Args | null = null\n\n const run = () => {\n frame = 0\n const args = pending\n pending = null\n\n if (args) {\n callback(...args)\n }\n }\n\n const throttled = ((...args: Args) => {\n pending = args\n\n if (frame === 0) {\n frame = requestAnimationFrame(run)\n }\n }) as RafThrottled<Args>\n\n throttled.cancel = () => {\n if (frame !== 0) {\n cancelAnimationFrame(frame)\n }\n\n frame = 0\n pending = null\n }\n\n onScopeDispose(throttled.cancel, true)\n\n return throttled\n}\n\n/**\n * Styles produced by `getStyles` for one selector. `any` matches the core signature: the value\n * is spread onto an element, where `class` and `style` accept every shape Vue supports.\n */\nexport type SelectorStyles = { class: any; style: any }\n\n/**\n * Memoizes `getStyles(selector)` for selectors that take no per-element options.\n *\n * A view renders the same selector for hundreds of slots, and every `getStyles` call rebuilds\n * the class list and merges the resolved styles and CSS variables. Wrapping each selector in a\n * `computed` turns that into one evaluation per selector per change of the theme or the props,\n * instead of one per element per render — which is what a drag re-render is made of.\n */\nexport function useStaticStyles<Selector extends string>(\n getStyles: (selector: Selector) => SelectorStyles,\n) {\n const cache = new Map<Selector, ComputedRef<SelectorStyles>>()\n\n return (selector: Selector): SelectorStyles => {\n let entry = cache.get(selector)\n\n if (!entry) {\n entry = computed(() => getStyles(selector))\n cache.set(selector, entry)\n }\n\n return entry.value\n }\n}\n\n/** Converts a `slotHeight` / `rowHeight` style prop to a CSS length. */\nexport function cssSize(value: string | number | undefined): string | undefined {\n return typeof value === 'number' ? `${value}px` : value\n}\n\nexport function getExpandedEvents(\n events: ScheduleEventData[] | undefined,\n rangeStart: Date | string,\n rangeEnd: Date | string,\n expansionLimit: number,\n) {\n return expandRecurringEvents({ events, rangeStart, rangeEnd, expansionLimit })\n}\n\nexport function formatLabel(\n date: Date | string,\n locale: string | undefined,\n format: DateLabelFormat,\n) {\n return formatDate({ date, locale: locale || 'en', format })\n}\n\n/** The `renderEvent` / `renderEventBody` pair a view hands down to `ScheduleEvent`. */\nexport interface EventRenderers {\n renderEvent?: RenderEvent\n renderEventBody?: RenderEventBody\n}\n\n/**\n * Folds the `event` / `eventBody` scoped slots into the equivalent render props, so a view\n * forwards a single object down to every `ScheduleEvent` it renders instead of re-declaring\n * the slots at each call site. Slots win over props, matching the rest of the library.\n */\nexport function resolveEventRenderers(props: EventRenderers, slots: EventSlots): EventRenderers {\n return {\n renderEvent: slots.event\n ? (event, renderProps) => slots.event!({ ...renderProps, event })\n : props.renderEvent,\n renderEventBody: slots.eventBody\n ? (event) => slots.eventBody!({ event })\n : props.renderEventBody,\n }\n}\n\n/** Reads the event referenced by a native drag payload, if the drag started inside a schedule. */\nexport function getDropEvent(\n events: ScheduleEventData[] | undefined,\n transfer: DataTransfer | null,\n) {\n const raw = transfer?.getData('application/json')\n\n if (!raw) {\n return undefined\n }\n\n try {\n const data: unknown = JSON.parse(raw)\n\n if (typeof data !== 'object' || data === null || !('eventId' in data)) {\n return undefined\n }\n\n const eventId = (data as { eventId: unknown }).eventId\n\n if (typeof eventId !== 'string' && typeof eventId !== 'number') {\n return undefined\n }\n\n return events?.find((event) => String(event.id) === String(eventId))\n } catch {\n return undefined\n }\n}\n\n/**\n * Attribute the views put on their `ScrollArea` viewport so they can find it again without\n * depending on Mantine static classes, which a consumer can turn off.\n */\nexport const SCROLL_VIEWPORT_ATTRIBUTE = 'data-schedule-viewport'\n\n/** Props spread onto the viewport of a view's `ScrollArea`. */\nexport const scheduleViewportProps = { [SCROLL_VIEWPORT_ATTRIBUTE]: '' }\n\n/** Finds the `ScrollArea` viewport that contains `node`. */\nexport function getScrollAreaViewport(node: HTMLElement | null | undefined) {\n return node?.closest<HTMLElement>(`[${SCROLL_VIEWPORT_ATTRIBUTE}]`) ?? null\n}\n\n/**\n * Scrolls the viewport around `target` so that `target` sits at its start.\n *\n * The second pass runs a frame later because a `ScrollArea` viewport is still being laid out\n * on the tick it mounts, so the first offsets it reports are not final.\n */\nexport function scrollSlotIntoView(target: HTMLElement | null | undefined, axis: 'x' | 'y' = 'y') {\n const viewport = getScrollAreaViewport(target)\n\n if (!viewport || !target) {\n return\n }\n\n const scroll = () => {\n if (axis === 'x') {\n viewport.scrollLeft = target.offsetLeft\n } else {\n viewport.scrollTop = target.offsetTop\n }\n }\n\n scroll()\n requestAnimationFrame(scroll)\n}\n\nexport function moveEventTo(event: ScheduleEventData, newStart: dayjs.ConfigType) {\n const start = dayjs(event.start)\n const duration = dayjs(event.end).diff(start, 'second')\n const nextStart = dayjs(newStart)\n\n return {\n eventId: event.id,\n newStart: nextStart.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: nextStart.add(duration, 'second').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event,\n }\n}\n\nexport function moveEventToAllDay(event: ScheduleEventData, date: dayjs.ConfigType) {\n const dayStart = dayjs(date).startOf('day')\n const spanDays = Math.max(\n 1,\n dayjs(event.end).startOf('day').diff(dayjs(event.start).startOf('day'), 'day'),\n )\n\n return {\n eventId: event.id,\n newStart: dayStart.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: dayStart.add(spanDays, 'day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event,\n }\n}\n\nexport function todayString(): DateStringValue {\n return toDateString(dayjs())\n}\n","import dayjs from 'dayjs'\nimport { onBeforeUnmount, shallowRef } from 'vue'\nimport { rafThrottle } from '../components/shared'\nimport type { EventDropData } from '../component-props'\nimport type { DateTimeStringValue, ScheduleEventData, ScheduleMode } from '../types'\nimport { clampIntervalMinutes, parseTimeString } from '../utils'\n\ntype ResizeEdge = 'top' | 'bottom'\n\ninterface ResizeState {\n eventId: string | number\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalTop: number\n originalHeight: number\n currentTop: number\n currentHeight: number\n eventDate: string\n originalStart: DateTimeStringValue\n originalEnd: DateTimeStringValue\n startMinutes: number\n literalRange: number\n totalMinutes: number\n intervalMinutes: number\n minHeightPercent: number\n}\n\ninterface HandleResizeStartInput {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalTop: number\n originalHeight: number\n eventDate: string\n pointerEvent: PointerEvent\n}\n\nexport interface UseEventResizeInput {\n enabled: () => boolean\n mode: () => ScheduleMode\n startTime: () => string\n endTime: () => string\n intervalMinutes: () => number\n onEventResize: (data: EventDropData) => void\n canResizeEvent: () => ((event: ScheduleEventData) => boolean) | undefined\n}\n\nexport function useEventResize(input: UseEventResizeInput) {\n const resizeState = shallowRef<ResizeState | null>(null)\n let justResized = false\n let savedUserSelect: string | null = null\n\n const clampAndSnap = (minutes: number, state: ResizeState): number => {\n const snapped = Math.round(minutes / state.intervalMinutes) * state.intervalMinutes\n return Math.max(0, Math.min(state.literalRange, snapped))\n }\n\n const snapPercent = (percent: number, state: ResizeState): number => {\n const minutes = (percent / 100) * state.totalMinutes\n return (clampAndSnap(minutes, state) / state.totalMinutes) * 100\n }\n\n const percentToDateTime = (\n percent: number,\n eventDate: string,\n state: ResizeState,\n ): DateTimeStringValue => {\n const minutes = (percent / 100) * state.totalMinutes\n const totalMinutes = state.startMinutes + clampAndSnap(minutes, state)\n const hours = Math.floor(totalMinutes / 60)\n const mins = totalMinutes % 60\n return `${eventDate} ${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}:00`\n }\n\n /**\n * Coalesced to one animation frame: `pointermove` outruns paint, and each step reads layout\n * and re-renders the grid. Without this the preview trails the pointer and keeps moving after\n * it stops.\n */\n const handlePointerMove = rafThrottle((clientY: number) => {\n const state = resizeState.value\n if (!state) return\n\n const containerRect = state.container.getBoundingClientRect()\n if (containerRect.height === 0) return\n\n const relativeY = clientY - containerRect.top\n const rawPercent = Math.max(0, Math.min(100, (relativeY / containerRect.height) * 100))\n const snappedPercent = snapPercent(rawPercent, state)\n let currentTop = state.originalTop\n let currentHeight = state.originalHeight\n\n if (state.edge === 'bottom') {\n currentHeight = Math.max(state.minHeightPercent, snappedPercent - state.originalTop)\n } else {\n const originalBottom = state.originalTop + state.originalHeight\n currentTop = Math.min(snappedPercent, originalBottom - state.minHeightPercent)\n currentHeight = originalBottom - currentTop\n }\n\n resizeState.value = { ...state, currentTop, currentHeight }\n })\n\n const trackPointer = (event: PointerEvent) => handlePointerMove(event.clientY)\n\n const removeDocumentListeners = () => {\n handlePointerMove.cancel()\n document.removeEventListener('pointermove', trackPointer)\n document.removeEventListener('pointerup', handlePointerUp)\n if (savedUserSelect !== null) {\n document.body.style.userSelect = savedUserSelect\n savedUserSelect = null\n }\n }\n\n const handlePointerUp = () => {\n // Drop the pending frame first, so a stale step cannot land after the gesture ended.\n handlePointerMove.cancel()\n const state = resizeState.value\n if (\n state &&\n (state.currentTop !== state.originalTop || state.currentHeight !== state.originalHeight)\n ) {\n const newStart =\n state.edge === 'top'\n ? percentToDateTime(state.currentTop, state.eventDate, state)\n : state.originalStart\n const newEnd =\n state.edge === 'bottom'\n ? percentToDateTime(state.currentTop + state.currentHeight, state.eventDate, state)\n : state.originalEnd\n\n input.onEventResize({ eventId: state.eventId, newStart, newEnd, event: state.event })\n }\n\n resizeState.value = null\n removeDocumentListeners()\n justResized = true\n requestAnimationFrame(() => {\n justResized = false\n })\n }\n\n const handleResizeStart = ({\n event,\n edge,\n container,\n originalTop,\n originalHeight,\n eventDate,\n pointerEvent,\n }: HandleResizeStartInput) => {\n if (!input.enabled() || input.mode() === 'static') return\n\n pointerEvent.preventDefault()\n pointerEvent.stopPropagation()\n\n const parsedStartTime = parseTimeString(input.startTime())\n const parsedEndTime = parseTimeString(input.endTime())\n const startMinutes = parsedStartTime.hours * 60 + parsedStartTime.minutes\n const endMinutes = parsedEndTime.hours * 60 + parsedEndTime.minutes\n const intervalMinutes = clampIntervalMinutes(input.intervalMinutes())\n const literalRange = endMinutes - startMinutes\n const totalMinutes = Math.ceil(literalRange / intervalMinutes) * intervalMinutes\n\n resizeState.value = {\n eventId: event.id,\n event,\n edge,\n container,\n originalTop,\n originalHeight,\n currentTop: originalTop,\n currentHeight: originalHeight,\n eventDate,\n originalStart: dayjs(event.start).format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: dayjs(event.end).format('YYYY-MM-DD HH:mm:ss'),\n startMinutes,\n literalRange,\n totalMinutes,\n intervalMinutes,\n minHeightPercent: (intervalMinutes / totalMinutes) * 100,\n }\n\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', trackPointer)\n document.addEventListener('pointerup', handlePointerUp)\n }\n\n const getResizePosition = (eventId: string | number) => {\n const state = resizeState.value\n return state?.eventId === eventId\n ? { top: state.currentTop, height: state.currentHeight }\n : null\n }\n\n const isResizableEvent = (event: ScheduleEventData): boolean =>\n input.enabled() &&\n input.mode() !== 'static' &&\n event.display !== 'background' &&\n (input.canResizeEvent()?.(event) ?? true)\n\n onBeforeUnmount(removeDocumentListeners)\n\n return {\n handleResizeStart,\n getResizePosition,\n isResizableEvent,\n wasResizing: () => justResized,\n }\n}\n",".currentTimeIndicator {\n --time-bubble-height: 18px;\n --thumb-size: 12px;\n --_indicator-color: var(--indicator-color, var(--mantine-color-red-7));\n\n position: absolute;\n pointer-events: none;\n left: 0;\n right: 0;\n top: var(--top-offset);\n height: 2px;\n z-index: 2;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--_indicator-color);\n opacity: 0.2;\n }\n}\n\n.currentTimeIndicatorLine {\n height: 100%;\n position: absolute;\n top: 0;\n background-color: var(--_indicator-color);\n inset-inline-start: var(--start-offset);\n inset-inline-end: var(--end-offset);\n}\n\n.currentTimeIndicatorThumb {\n position: absolute;\n top: calc(-1 * (var(--thumb-size) / 2 - 1px));\n width: var(--thumb-size);\n height: var(--thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n inset-inline-start: calc(var(--start-offset) - (var(--thumb-size) / 2 - 1px));\n}\n\n.currentTimeIndicatorTimeBubble {\n position: absolute;\n height: var(--time-bubble-height);\n width: var(--time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n inset-inline-start: var(--time-bubble-start-offset);\n top: calc(-1 * (var(--time-bubble-height) / 2 - 1px));\n z-index: 2;\n text-transform: uppercase;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver, getThemeColor } from '@mantine-vue/core'\n\nconst defaultProps = {\n color: 'red',\n startOffset: '0px',\n endOffset: '0px',\n topOffset: '0px',\n timeBubbleStartOffset: '0px',\n withTimeBubble: true,\n withThumb: true,\n currentTimeFormat: 'HH:mm',\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n} as const\n\n// Time-dependent values reach the module-scoped resolver through the styles context.\nconst varsResolver = createVarsResolver<any>(\n (theme, { color, startOffset, endOffset, topOffset, timeBubbleStartOffset }, ctx) => ({\n currentTimeIndicator: {\n '--indicator-color': getThemeColor(color, theme),\n '--start-offset': startOffset,\n '--end-offset': endOffset,\n '--top-offset': `calc(${ctx.offsetPercent}% + ${topOffset})`,\n '--time-bubble-start-offset': timeBubbleStartOffset,\n // A format with AM/PM needs a wider bubble than a 24h one.\n '--time-bubble-width': ctx.hasMeridiem ? '64px' : '46px',\n },\n }),\n)\n\nconst TICK_INTERVAL = 30_000\n\nexport { defaultProps, varsResolver, TICK_INTERVAL }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { formatDate, getCurrentTimePosition, isInTimeRange } from '../../utils'\nimport type { CurrentTimeIndicatorOwnProps } from './CurrentTimeIndicator.types'\nimport classes from './CurrentTimeIndicator.module.css'\n\ndefineOptions({\n name: 'CurrentTimeIndicator',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<CurrentTimeIndicatorOwnProps>(), {\n color: undefined,\n startOffset: undefined,\n endOffset: undefined,\n topOffset: undefined,\n timeBubbleStartOffset: undefined,\n withTimeBubble: undefined,\n withThumb: undefined,\n currentTimeFormat: undefined,\n locale: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n getCurrentTime: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst attrs = useAttrs()\n\nconst props = useProps('CurrentTimeIndicator', defaultProps, rawProps)\n\n/** Bumped on every tick so the computed values below re-evaluate. */\nconst tick = ref(0)\nlet timer: ReturnType<typeof setInterval> | undefined\n\nonMounted(() => {\n timer = setInterval(() => {\n tick.value += 1\n }, TICK_INTERVAL)\n})\n\nonBeforeUnmount(() => clearInterval(timer))\n\nconst now = computed(() => {\n void tick.value\n return props.getCurrentTime ? dayjs(props.getCurrentTime()) : dayjs()\n})\n\nconst visible = computed(() =>\n isInTimeRange({ date: now.value, startTime: props.startTime, endTime: props.endTime }),\n)\n\nconst offsetPercent = computed(() =>\n getCurrentTimePosition({\n now: now.value,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n }),\n)\n\nconst formattedTime = computed(() =>\n props.withTimeBubble\n ? formatDate({\n date: now.value,\n locale: props.locale || 'en',\n format: props.currentTimeFormat!,\n })\n : '',\n)\n\nconst getStyles = useStyles({\n name: 'CurrentTimeIndicator',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'currentTimeIndicator',\n // Getters keep the context live without re-creating the styles resolver on every tick.\n stylesCtx: {\n get offsetPercent() {\n return offsetPercent.value\n },\n get hasMeridiem() {\n return String(formattedTime.value).toLowerCase().includes('m')\n },\n },\n})\n</script>\n\n<template>\n <Box v-if=\"visible\" v-bind=\"{ ...attrs, ...getStyles('currentTimeIndicator') }\">\n <div v-if=\"props.withTimeBubble\" v-bind=\"getStyles('currentTimeIndicatorTimeBubble')\">\n {{ formattedTime }}\n </div>\n <div v-if=\"props.withThumb\" v-bind=\"getStyles('currentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('currentTimeIndicatorLine')\" />\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver, getThemeColor } from '@mantine-vue/core'\n\nconst defaultProps = {\n color: 'red',\n startOffset: '0px',\n endOffset: '0px',\n topOffset: '0px',\n timeBubbleStartOffset: '0px',\n withTimeBubble: true,\n withThumb: true,\n currentTimeFormat: 'HH:mm',\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n} as const\n\n// Time-dependent values reach the module-scoped resolver through the styles context.\nconst varsResolver = createVarsResolver<any>(\n (theme, { color, startOffset, endOffset, topOffset, timeBubbleStartOffset }, ctx) => ({\n currentTimeIndicator: {\n '--indicator-color': getThemeColor(color, theme),\n '--start-offset': startOffset,\n '--end-offset': endOffset,\n '--top-offset': `calc(${ctx.offsetPercent}% + ${topOffset})`,\n '--time-bubble-start-offset': timeBubbleStartOffset,\n // A format with AM/PM needs a wider bubble than a 24h one.\n '--time-bubble-width': ctx.hasMeridiem ? '64px' : '46px',\n },\n }),\n)\n\nconst TICK_INTERVAL = 30_000\n\nexport { defaultProps, varsResolver, TICK_INTERVAL }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { formatDate, getCurrentTimePosition, isInTimeRange } from '../../utils'\nimport type { CurrentTimeIndicatorOwnProps } from './CurrentTimeIndicator.types'\nimport classes from './CurrentTimeIndicator.module.css'\n\ndefineOptions({\n name: 'CurrentTimeIndicator',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<CurrentTimeIndicatorOwnProps>(), {\n color: undefined,\n startOffset: undefined,\n endOffset: undefined,\n topOffset: undefined,\n timeBubbleStartOffset: undefined,\n withTimeBubble: undefined,\n withThumb: undefined,\n currentTimeFormat: undefined,\n locale: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n getCurrentTime: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst attrs = useAttrs()\n\nconst props = useProps('CurrentTimeIndicator', defaultProps, rawProps)\n\n/** Bumped on every tick so the computed values below re-evaluate. */\nconst tick = ref(0)\nlet timer: ReturnType<typeof setInterval> | undefined\n\nonMounted(() => {\n timer = setInterval(() => {\n tick.value += 1\n }, TICK_INTERVAL)\n})\n\nonBeforeUnmount(() => clearInterval(timer))\n\nconst now = computed(() => {\n void tick.value\n return props.getCurrentTime ? dayjs(props.getCurrentTime()) : dayjs()\n})\n\nconst visible = computed(() =>\n isInTimeRange({ date: now.value, startTime: props.startTime, endTime: props.endTime }),\n)\n\nconst offsetPercent = computed(() =>\n getCurrentTimePosition({\n now: now.value,\n startTime: props.startTime,\n endTime: props.endTime,\n intervalMinutes: props.intervalMinutes,\n }),\n)\n\nconst formattedTime = computed(() =>\n props.withTimeBubble\n ? formatDate({\n date: now.value,\n locale: props.locale || 'en',\n format: props.currentTimeFormat!,\n })\n : '',\n)\n\nconst getStyles = useStyles({\n name: 'CurrentTimeIndicator',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'currentTimeIndicator',\n // Getters keep the context live without re-creating the styles resolver on every tick.\n stylesCtx: {\n get offsetPercent() {\n return offsetPercent.value\n },\n get hasMeridiem() {\n return String(formattedTime.value).toLowerCase().includes('m')\n },\n },\n})\n</script>\n\n<template>\n <Box v-if=\"visible\" v-bind=\"{ ...attrs, ...getStyles('currentTimeIndicator') }\">\n <div v-if=\"props.withTimeBubble\" v-bind=\"getStyles('currentTimeIndicatorTimeBubble')\">\n {{ formattedTime }}\n </div>\n <div v-if=\"props.withThumb\" v-bind=\"getStyles('currentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('currentTimeIndicatorLine')\" />\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport CurrentTimeIndicatorComponent, { varsResolver } from './CurrentTimeIndicator.vue'\nimport type { CurrentTimeIndicatorFactory } from './CurrentTimeIndicator.types'\nimport classes from './CurrentTimeIndicator.module.css'\n\nexport const CurrentTimeIndicator = factory<CurrentTimeIndicatorFactory>(\n CurrentTimeIndicatorComponent,\n { classes, varsResolver },\n)\n\nexport type {\n CurrentTimeIndicatorCssVariables,\n CurrentTimeIndicatorFactory,\n CurrentTimeIndicatorOwnProps,\n CurrentTimeIndicatorProps,\n CurrentTimeIndicatorStylesNames,\n} from './CurrentTimeIndicator.types'\n","import {\n inject,\n onScopeDispose,\n provide,\n shallowRef,\n type InjectionKey,\n type ShallowRef,\n} from 'vue'\nimport type { DropTarget, ScheduleEventData } from '../../types'\n\nexport interface DragContextValue {\n readonly draggedEvent: ScheduleEventData | null\n\n readonly dragOverTarget: DropTarget | null\n\n readonly isDragging: boolean\n\n readonly isSlotDragging: boolean\n}\n\nconst IDLE: DragContextValue = {\n draggedEvent: null,\n dragOverTarget: null,\n isDragging: false,\n isSlotDragging: false,\n}\n\nexport const DragContext: InjectionKey<DragContextValue> = Symbol('mantine-schedule-drag-context')\n\nexport function provideDragContext(value: DragContextValue) {\n provide(DragContext, value)\n}\n\n/**\n * Reads the drag state of the surrounding view. Components rendered outside a schedule get an\n * idle state rather than `undefined`, so they never have to null-check it.\n */\nexport function useDragContext(): DragContextValue {\n return inject(DragContext, IDLE)\n}\n\nexport interface ScheduleDragState {\n draggedEvent: ShallowRef<ScheduleEventData | null>\n\n startEventDrag: (event: ScheduleEventData) => void\n\n /**\n * Ends the drag. Safe to call more than once: only the first call after a `startEventDrag`\n * takes effect, so the component's own `dragend` and the document safety net cannot both\n * report the same drag.\n */\n endEventDrag: () => void\n}\n\nexport interface ProvideScheduleDragStateInput {\n /** Slot the pointer is currently over, owned by the view because it also drives the highlight. */\n dragOverTarget?: () => DropTarget | null\n\n isSlotDragging?: () => boolean\n\n /**\n * Called exactly once per drag, however it ended: dropped, cancelled, or ended after the\n * dragged element was already replaced. Use it to clear view-local drag state.\n */\n onDragEnd?: () => void\n}\n\n/**\n * Publishes the view's drag state to the events it renders, so an event can tell that *some*\n * other event is being dragged and dim itself.\n *\n * The context is a getter-backed object rather than a snapshot: it is provided once during\n * `setup`, and every read stays reactive as the drag progresses.\n *\n * The end of a drag is detected on `document` rather than only through the dragged event's own\n * `dragend`. A successful drop usually makes the consumer move the event, which re-renders it\n * under a different key: the original element is gone by the time the browser would fire\n * `dragend` on it, so that event never arrives. Relying on it alone would leave the schedule\n * stuck in the dragging state, with every event non-interactive.\n */\nexport function provideScheduleDragState(\n input: ProvideScheduleDragStateInput = {},\n): ScheduleDragState {\n const draggedEvent = shallowRef<ScheduleEventData | null>(null)\n\n provideDragContext({\n get draggedEvent() {\n return draggedEvent.value\n },\n get dragOverTarget() {\n return input.dragOverTarget?.() ?? null\n },\n get isDragging() {\n return draggedEvent.value !== null\n },\n get isSlotDragging() {\n return input.isSlotDragging?.() ?? false\n },\n })\n\n const endEventDrag = () => {\n if (draggedEvent.value === null) {\n return\n }\n\n draggedEvent.value = null\n stopWatchingDocument()\n input.onDragEnd?.()\n }\n\n // Capture phase, so the drag cannot be left open by a handler that stops propagation.\n const watchOptions = { capture: true } as const\n\n function startWatchingDocument() {\n document.addEventListener('drop', endEventDrag, watchOptions)\n document.addEventListener('dragend', endEventDrag, watchOptions)\n }\n\n function stopWatchingDocument() {\n document.removeEventListener('drop', endEventDrag, watchOptions)\n document.removeEventListener('dragend', endEventDrag, watchOptions)\n }\n\n onScopeDispose(stopWatchingDocument, true)\n\n return {\n draggedEvent,\n startEventDrag: (event) => {\n if (draggedEvent.value === null) {\n startWatchingDocument()\n }\n\n draggedEvent.value = event\n },\n endEventDrag,\n }\n}\n",".event {\n padding: 1px;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n flex: 1 0 auto;\n position: relative;\n z-index: 3;\n\n &:where([data-auto-size]) {\n container-type: size;\n }\n\n &:where([data-draggable]) .eventInner {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n }\n\n &:where([data-dragging]) {\n opacity: 0.2;\n\n .eventInner {\n cursor: grabbing;\n }\n }\n\n &:where([data-any-dragging]:not([data-dragging])) {\n pointer-events: none;\n\n .eventInner {\n pointer-events: none;\n }\n }\n\n &:where([data-static]) {\n pointer-events: none;\n cursor: default;\n }\n\n &:where([data-resizing]) {\n z-index: 10;\n\n .eventInner {\n @mixin hover {\n background-color: var(--event-bg);\n }\n }\n }\n\n &:where([data-hanging='start'], [data-hanging='both']) {\n &::before {\n content: '';\n position: absolute;\n inset-block: 2px;\n inset-inline-start: 2px;\n width: 2px;\n background-color: var(--event-color);\n border-radius: 10px;\n opacity: 0.3;\n }\n\n .eventInner {\n padding-inline-start: 6px;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n\n &:where([data-hanging='end'], [data-hanging='both']) {\n &::after {\n content: '';\n position: absolute;\n inset-block: 2px;\n inset-inline-end: 2px;\n width: 2px;\n background-color: var(--event-color);\n border-radius: 10px;\n opacity: 0.3;\n }\n\n .eventInner {\n padding-inline-end: 6px;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n }\n\n &:where([data-clip-start]) {\n .eventInner {\n padding-inline-start: 12px;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);\n }\n }\n\n &:where([data-clip-end]) {\n .eventInner {\n padding-inline-end: 12px;\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);\n }\n }\n\n &:where([data-clip-start][data-clip-end]) {\n .eventInner {\n clip-path: polygon(\n 10px 0,\n calc(100% - 10px) 0,\n 100% 50%,\n calc(100% - 10px) 100%,\n 10px 100%,\n 0 50%\n );\n }\n }\n}\n\n.eventInner {\n background-color: var(--event-bg);\n color: var(--event-color);\n pointer-events: all;\n border-radius: min(var(--event-radius), 50%);\n font-weight: var(--mantine-font-weight-medium);\n font-size: 12px;\n line-height: 1;\n padding: 3px 4px;\n width: 100%;\n height: 100%;\n cursor: pointer;\n user-select: none;\n overflow: hidden;\n\n &:where([data-nowrap]) {\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.25;\n }\n\n &:where([data-size='md']) {\n font-size: 14px;\n padding: 4px 6px;\n }\n\n @mixin hover {\n background-color: var(--event-hover);\n }\n\n &:where([data-auto-size]) {\n @container (max-width: 12px) {\n padding-inline: 0;\n }\n\n @container (min-width: 16px) {\n width: calc(100% - 2px);\n margin-inline: auto;\n }\n\n @container (max-height: 18px) {\n font-size: 9px;\n padding-block: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n }\n\n .event[data-static] & {\n cursor: default;\n pointer-events: none;\n\n @mixin hover {\n background-color: var(--event-bg);\n }\n }\n\n :where([data-slot-dragging]) & {\n pointer-events: none;\n }\n}\n\n.eventResizeHandle {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n width: 40%;\n max-width: 40px;\n height: 4px;\n border-radius: 2px;\n cursor: ns-resize;\n pointer-events: all;\n z-index: 4;\n touch-action: none;\n background-color: var(--event-color);\n opacity: 0;\n transition: opacity 100ms ease;\n\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n\n &:where([data-edge='top']) {\n top: -2px;\n }\n\n &:where([data-edge='bottom']) {\n bottom: -2px;\n }\n\n .event:where(:hover, [data-resizing]) & {\n opacity: 0.5;\n }\n\n @mixin hover {\n opacity: 0.8;\n }\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\n\nconst defaultProps = {\n radius: 'sm',\n size: 'sm',\n mode: 'default',\n} as const\n\n// Colors come from each event's data rather than a component-level color prop.\nconst varsResolver = createVarsResolver<any>((theme, { event, radius }) => {\n const colors = theme.variantColorResolver({\n color: event?.color || theme.primaryColor,\n theme,\n variant: event?.variant || 'light',\n autoContrast: true,\n })\n\n return {\n event: {\n '--event-color': colors.color,\n '--event-bg': colors.background,\n '--event-hover': colors.hover,\n '--event-radius': resolveScheduleRadius(radius),\n },\n }\n})\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, h, onBeforeUnmount, ref, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport { Box, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useDragContext } from '../DragContext'\nimport type {\n ScheduleEventEmits,\n ScheduleEventOwnProps,\n ScheduleEventResizeEdge,\n ScheduleEventSlots,\n} from './ScheduleEvent.types'\nimport classes from './ScheduleEvent.module.css'\n\ndefineOptions({\n name: 'ScheduleEvent',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleEventOwnProps>(), {\n radius: undefined,\n size: undefined,\n mode: undefined,\n hanging: undefined,\n renderEvent: undefined,\n renderEventBody: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleEventSlots>()\n\nconst emit = defineEmits<ScheduleEventEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst dragContext = useDragContext()\n\nconst props = useProps('ScheduleEvent', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ScheduleEvent',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'event',\n})\n\nconst isNativeDragging = ref(false)\n\n/**\n * Ends the native drag, however it ended. Idempotent, because it is reached from both the\n * element's own `dragend` and a `document` listener.\n *\n * The element handler alone is not enough: `dragend` fires on the element the drag started\n * from, which a schedule usually re-renders under a different key the moment the drop is\n * handled — so this element can be gone before the browser gets there and the event never\n * arrives. `document` catches both the drop and the cancel: exactly one of them always fires,\n * and both bubble.\n */\nconst stopNativeDrag = () => {\n if (!isNativeDragging.value) {\n return\n }\n\n isNativeDragging.value = false\n document.removeEventListener('drop', stopNativeDrag, true)\n document.removeEventListener('dragend', stopNativeDrag, true)\n emit('eventDragEnd')\n}\n\nonBeforeUnmount(() => {\n document.removeEventListener('drop', stopNativeDrag, true)\n document.removeEventListener('dragend', stopNativeDrag, true)\n})\n\nconst isStatic = computed(() => props.mode === 'static')\nconst isDraggable = computed(() => props.draggable && !isStatic.value)\nconst withResizeHandles = computed(() => Boolean(props.withResize) && !isStatic.value)\n\nconst body = computed<VNodeChild>(\n () =>\n slots.eventBody?.({ event: props.event }) ??\n props.renderEventBody?.(props.event) ??\n slots.default?.() ??\n props.event.title,\n)\n\nconst handleDragStart = (nativeEvent: DragEvent) => {\n if (!isDraggable.value) {\n nativeEvent.preventDefault()\n return\n }\n\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.effectAllowed = 'move'\n nativeEvent.dataTransfer.setData(\n 'application/json',\n JSON.stringify({ eventId: props.event.id }),\n )\n }\n\n isNativeDragging.value = true\n document.addEventListener('drop', stopNativeDrag, true)\n document.addEventListener('dragend', stopNativeDrag, true)\n emit('eventDragStart', props.event)\n}\n\nconst handleResizeStart = (edge: ScheduleEventResizeEdge, nativeEvent: PointerEvent) => {\n emit('resizeStart', edge, nativeEvent)\n}\n\nconst isBeingDragged = computed(() => props.isDragging || isNativeDragging.value)\n\nconst rootMod = computed(() => [\n {\n autoSize: props.autoSize,\n hanging: props.hanging,\n draggable: isDraggable.value,\n dragging: isBeingDragged.value,\n // Set on every event while a drag is in progress, so the ones that are not being dragged\n // can step back visually.\n anyDragging: dragContext.isDragging,\n static: isStatic.value,\n resizing: props.isResizing,\n resizable: withResizeHandles.value,\n },\n (attrs as any).mod,\n])\n\n/**\n * Everything spread onto the root element. `renderEvent` receives the same object, so a\n * custom root behaves like the built-in one.\n */\nconst rootProps = computed(() => ({\n ...attrs,\n ...getStyles('event'),\n 'data-event-id': props.event.id,\n title: props.event.title,\n mod: rootMod.value,\n draggable: isDraggable.value,\n tabindex: isStatic.value ? -1 : 0,\n onDragstart: handleDragStart,\n // The element's own `dragend` is the fast path; `stopNativeDrag` also listens on `document`\n // for the case where this element is replaced before the browser gets to fire it.\n onDragend: isStatic.value ? undefined : stopNativeDrag,\n onClick: isStatic.value\n ? undefined\n : (attrs.onClick as ((event: MouseEvent) => void) | undefined),\n}))\n\n/**\n * Default children as a functional component, so the template and the `renderEvent`\n * payload share one definition instead of building the tree twice.\n */\nconst EventChildren = () => [\n withResizeHandles.value\n ? h(Box, {\n ...getStyles('eventResizeHandle'),\n mod: { edge: 'top' },\n onPointerdown: (nativeEvent: PointerEvent) => handleResizeStart('top', nativeEvent),\n })\n : null,\n h(\n Box,\n {\n ...getStyles('eventInner'),\n mod: {\n nowrap: props.nowrap,\n size: props.size,\n autoSize: props.autoSize,\n hanging: props.hanging,\n },\n },\n () => body.value,\n ),\n withResizeHandles.value\n ? h(Box, {\n ...getStyles('eventResizeHandle'),\n mod: { edge: 'bottom' },\n onPointerdown: (nativeEvent: PointerEvent) => handleResizeStart('bottom', nativeEvent),\n })\n : null,\n]\n\nconst customEvent = computed<VNodeChild>(() => {\n if (!slots.event && !props.renderEvent) {\n return null\n }\n\n const payload = { ...rootProps.value, children: h(EventChildren) }\n return (\n slots.event?.({ ...payload, event: props.event }) ??\n props.renderEvent?.(props.event, payload) ??\n null\n )\n})\n\nconst renderCustomEvent = () => customEvent.value\n</script>\n\n<template>\n <component :is=\"renderCustomEvent\" v-if=\"customEvent\" />\n <UnstyledButton v-else v-bind=\"rootProps\">\n <EventChildren />\n </UnstyledButton>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\n\nconst defaultProps = {\n radius: 'sm',\n size: 'sm',\n mode: 'default',\n} as const\n\n// Colors come from each event's data rather than a component-level color prop.\nconst varsResolver = createVarsResolver<any>((theme, { event, radius }) => {\n const colors = theme.variantColorResolver({\n color: event?.color || theme.primaryColor,\n theme,\n variant: event?.variant || 'light',\n autoContrast: true,\n })\n\n return {\n event: {\n '--event-color': colors.color,\n '--event-bg': colors.background,\n '--event-hover': colors.hover,\n '--event-radius': resolveScheduleRadius(radius),\n },\n }\n})\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, h, onBeforeUnmount, ref, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport { Box, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useDragContext } from '../DragContext'\nimport type {\n ScheduleEventEmits,\n ScheduleEventOwnProps,\n ScheduleEventResizeEdge,\n ScheduleEventSlots,\n} from './ScheduleEvent.types'\nimport classes from './ScheduleEvent.module.css'\n\ndefineOptions({\n name: 'ScheduleEvent',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleEventOwnProps>(), {\n radius: undefined,\n size: undefined,\n mode: undefined,\n hanging: undefined,\n renderEvent: undefined,\n renderEventBody: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleEventSlots>()\n\nconst emit = defineEmits<ScheduleEventEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst dragContext = useDragContext()\n\nconst props = useProps('ScheduleEvent', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ScheduleEvent',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'event',\n})\n\nconst isNativeDragging = ref(false)\n\n/**\n * Ends the native drag, however it ended. Idempotent, because it is reached from both the\n * element's own `dragend` and a `document` listener.\n *\n * The element handler alone is not enough: `dragend` fires on the element the drag started\n * from, which a schedule usually re-renders under a different key the moment the drop is\n * handled — so this element can be gone before the browser gets there and the event never\n * arrives. `document` catches both the drop and the cancel: exactly one of them always fires,\n * and both bubble.\n */\nconst stopNativeDrag = () => {\n if (!isNativeDragging.value) {\n return\n }\n\n isNativeDragging.value = false\n document.removeEventListener('drop', stopNativeDrag, true)\n document.removeEventListener('dragend', stopNativeDrag, true)\n emit('eventDragEnd')\n}\n\nonBeforeUnmount(() => {\n document.removeEventListener('drop', stopNativeDrag, true)\n document.removeEventListener('dragend', stopNativeDrag, true)\n})\n\nconst isStatic = computed(() => props.mode === 'static')\nconst isDraggable = computed(() => props.draggable && !isStatic.value)\nconst withResizeHandles = computed(() => Boolean(props.withResize) && !isStatic.value)\n\nconst body = computed<VNodeChild>(\n () =>\n slots.eventBody?.({ event: props.event }) ??\n props.renderEventBody?.(props.event) ??\n slots.default?.() ??\n props.event.title,\n)\n\nconst handleDragStart = (nativeEvent: DragEvent) => {\n if (!isDraggable.value) {\n nativeEvent.preventDefault()\n return\n }\n\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.effectAllowed = 'move'\n nativeEvent.dataTransfer.setData(\n 'application/json',\n JSON.stringify({ eventId: props.event.id }),\n )\n }\n\n isNativeDragging.value = true\n document.addEventListener('drop', stopNativeDrag, true)\n document.addEventListener('dragend', stopNativeDrag, true)\n emit('eventDragStart', props.event)\n}\n\nconst handleResizeStart = (edge: ScheduleEventResizeEdge, nativeEvent: PointerEvent) => {\n emit('resizeStart', edge, nativeEvent)\n}\n\nconst isBeingDragged = computed(() => props.isDragging || isNativeDragging.value)\n\nconst rootMod = computed(() => [\n {\n autoSize: props.autoSize,\n hanging: props.hanging,\n draggable: isDraggable.value,\n dragging: isBeingDragged.value,\n // Set on every event while a drag is in progress, so the ones that are not being dragged\n // can step back visually.\n anyDragging: dragContext.isDragging,\n static: isStatic.value,\n resizing: props.isResizing,\n resizable: withResizeHandles.value,\n },\n (attrs as any).mod,\n])\n\n/**\n * Everything spread onto the root element. `renderEvent` receives the same object, so a\n * custom root behaves like the built-in one.\n */\nconst rootProps = computed(() => ({\n ...attrs,\n ...getStyles('event'),\n 'data-event-id': props.event.id,\n title: props.event.title,\n mod: rootMod.value,\n draggable: isDraggable.value,\n tabindex: isStatic.value ? -1 : 0,\n onDragstart: handleDragStart,\n // The element's own `dragend` is the fast path; `stopNativeDrag` also listens on `document`\n // for the case where this element is replaced before the browser gets to fire it.\n onDragend: isStatic.value ? undefined : stopNativeDrag,\n onClick: isStatic.value\n ? undefined\n : (attrs.onClick as ((event: MouseEvent) => void) | undefined),\n}))\n\n/**\n * Default children as a functional component, so the template and the `renderEvent`\n * payload share one definition instead of building the tree twice.\n */\nconst EventChildren = () => [\n withResizeHandles.value\n ? h(Box, {\n ...getStyles('eventResizeHandle'),\n mod: { edge: 'top' },\n onPointerdown: (nativeEvent: PointerEvent) => handleResizeStart('top', nativeEvent),\n })\n : null,\n h(\n Box,\n {\n ...getStyles('eventInner'),\n mod: {\n nowrap: props.nowrap,\n size: props.size,\n autoSize: props.autoSize,\n hanging: props.hanging,\n },\n },\n () => body.value,\n ),\n withResizeHandles.value\n ? h(Box, {\n ...getStyles('eventResizeHandle'),\n mod: { edge: 'bottom' },\n onPointerdown: (nativeEvent: PointerEvent) => handleResizeStart('bottom', nativeEvent),\n })\n : null,\n]\n\nconst customEvent = computed<VNodeChild>(() => {\n if (!slots.event && !props.renderEvent) {\n return null\n }\n\n const payload = { ...rootProps.value, children: h(EventChildren) }\n return (\n slots.event?.({ ...payload, event: props.event }) ??\n props.renderEvent?.(props.event, payload) ??\n null\n )\n})\n\nconst renderCustomEvent = () => customEvent.value\n</script>\n\n<template>\n <component :is=\"renderCustomEvent\" v-if=\"customEvent\" />\n <UnstyledButton v-else v-bind=\"rootProps\">\n <EventChildren />\n </UnstyledButton>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ScheduleEventComponent, { varsResolver } from './ScheduleEvent.vue'\nimport type { ScheduleEventFactory } from './ScheduleEvent.types'\nimport classes from './ScheduleEvent.module.css'\n\nexport const ScheduleEvent = factory<ScheduleEventFactory>(ScheduleEventComponent, {\n classes,\n varsResolver,\n})\n\nexport type { RenderEvent, RenderEventBody, ScheduleEventRenderProps } from '../../component-props'\n\nexport type {\n ScheduleEventCssVariables,\n ScheduleEventEmits,\n ScheduleEventFactory,\n ScheduleEventHanging,\n ScheduleEventOwnProps,\n ScheduleEventProps,\n ScheduleEventResizeEdge,\n ScheduleEventSlots,\n ScheduleEventStylesNames,\n} from './ScheduleEvent.types'\n",".moreEventsButton {\n color: var(--mantine-color-dimmed);\n font-size: 13px;\n pointer-events: all;\n flex: 1;\n\n @mixin hover {\n color: var(--mantine-color-bright);\n text-decoration: underline;\n }\n\n &:where([data-static]) {\n cursor: default;\n\n @mixin hover {\n color: var(--mantine-color-dimmed);\n text-decoration: none;\n }\n }\n}\n\n.moreEventsDropdown {\n padding: 4px;\n}\n\n.moreEventsList {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n","<script lang=\"ts\">\nconst defaultProps = {\n dropdownType: 'popover',\n mode: 'default',\n} as const\n\n/** Pulls the popover back over the control it replaces, so the list covers the day cell. */\nconst POPOVER_OFFSET = -46\n\nexport { defaultProps, POPOVER_OFFSET }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { Box, Modal, Popover, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport type { ScheduleEventData } from '../../types'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { resolveEventRenderers } from '../shared'\nimport type { MoreEventsEmits, MoreEventsOwnProps, MoreEventsSlots } from './MoreEvents.types'\nimport classes from './MoreEvents.module.css'\n\ndefineOptions({\n name: 'MoreEvents',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MoreEventsOwnProps>(), {\n radius: undefined,\n modalTitle: undefined,\n dropdownType: undefined,\n popoverProps: undefined,\n modalProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n labels: undefined,\n mode: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MoreEventsSlots>()\n\nconst emit = defineEmits<MoreEventsEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('MoreEvents', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MoreEvents',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'moreEventsButton',\n})\n\nconst opened = ref(false)\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst close = () => {\n opened.value = false\n emit('dropdownClose')\n}\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n emit('eventClick', event, nativeEvent)\n}\n\nconst handlePopoverChange = (value: boolean) => {\n if (!value) {\n close()\n }\n}\n</script>\n\n<template>\n <!--\n The modal and the popover both wrap the same list. Rendering the modal alongside a\n disabled popover keeps a single target control for either dropdown type.\n -->\n <Modal\n v-if=\"props.dropdownType === 'modal'\"\n v-bind=\"props.modalProps\"\n :opened=\"opened\"\n :radius=\"props.radius\"\n :title=\"props.modalTitle\"\n @close=\"close\"\n >\n <Box v-bind=\"getStyles('moreEventsList')\">\n <ScheduleEvent\n v-for=\"event in props.events\"\n :key=\"event.id\"\n :event=\"event\"\n :radius=\"props.radius ?? 'sm'\"\n size=\"md\"\n :mode=\"props.mode\"\n v-bind=\"eventRenderers\"\n @click=\"clickEvent(event, $event)\"\n />\n </Box>\n </Modal>\n\n <Popover\n position=\"bottom-start\"\n :width=\"260\"\n :opened=\"opened\"\n trap-focus\n :return-focus=\"false\"\n :disabled=\"props.dropdownType === 'modal'\"\n :radius=\"props.radius\"\n :transition-props=\"{ transition: 'pop', duration: 120 }\"\n :offset=\"POPOVER_OFFSET\"\n v-bind=\"props.popoverProps\"\n @change=\"handlePopoverChange\"\n >\n <Popover.Target>\n <UnstyledButton\n v-bind=\"{ ...attrs, ...getStyles('moreEventsButton') }\"\n :mod=\"{ static: props.mode === 'static' }\"\n :aria-expanded=\"opened\"\n @click=\"opened = !opened\"\n >\n {{ getLabel('moreLabel', props.labels)(props.moreEventsCount) }}\n </UnstyledButton>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"getStyles('moreEventsDropdown')\">\n <Box v-bind=\"getStyles('moreEventsList')\">\n <ScheduleEvent\n v-for=\"event in props.events\"\n :key=\"event.id\"\n :event=\"event\"\n :radius=\"props.radius ?? 'sm'\"\n size=\"md\"\n :mode=\"props.mode\"\n v-bind=\"eventRenderers\"\n @click=\"clickEvent(event, $event)\"\n />\n </Box>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script lang=\"ts\">\nconst defaultProps = {\n dropdownType: 'popover',\n mode: 'default',\n} as const\n\n/** Pulls the popover back over the control it replaces, so the list covers the day cell. */\nconst POPOVER_OFFSET = -46\n\nexport { defaultProps, POPOVER_OFFSET }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { Box, Modal, Popover, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport type { ScheduleEventData } from '../../types'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { resolveEventRenderers } from '../shared'\nimport type { MoreEventsEmits, MoreEventsOwnProps, MoreEventsSlots } from './MoreEvents.types'\nimport classes from './MoreEvents.module.css'\n\ndefineOptions({\n name: 'MoreEvents',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MoreEventsOwnProps>(), {\n radius: undefined,\n modalTitle: undefined,\n dropdownType: undefined,\n popoverProps: undefined,\n modalProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n labels: undefined,\n mode: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MoreEventsSlots>()\n\nconst emit = defineEmits<MoreEventsEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('MoreEvents', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MoreEvents',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'moreEventsButton',\n})\n\nconst opened = ref(false)\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst close = () => {\n opened.value = false\n emit('dropdownClose')\n}\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n emit('eventClick', event, nativeEvent)\n}\n\nconst handlePopoverChange = (value: boolean) => {\n if (!value) {\n close()\n }\n}\n</script>\n\n<template>\n <!--\n The modal and the popover both wrap the same list. Rendering the modal alongside a\n disabled popover keeps a single target control for either dropdown type.\n -->\n <Modal\n v-if=\"props.dropdownType === 'modal'\"\n v-bind=\"props.modalProps\"\n :opened=\"opened\"\n :radius=\"props.radius\"\n :title=\"props.modalTitle\"\n @close=\"close\"\n >\n <Box v-bind=\"getStyles('moreEventsList')\">\n <ScheduleEvent\n v-for=\"event in props.events\"\n :key=\"event.id\"\n :event=\"event\"\n :radius=\"props.radius ?? 'sm'\"\n size=\"md\"\n :mode=\"props.mode\"\n v-bind=\"eventRenderers\"\n @click=\"clickEvent(event, $event)\"\n />\n </Box>\n </Modal>\n\n <Popover\n position=\"bottom-start\"\n :width=\"260\"\n :opened=\"opened\"\n trap-focus\n :return-focus=\"false\"\n :disabled=\"props.dropdownType === 'modal'\"\n :radius=\"props.radius\"\n :transition-props=\"{ transition: 'pop', duration: 120 }\"\n :offset=\"POPOVER_OFFSET\"\n v-bind=\"props.popoverProps\"\n @change=\"handlePopoverChange\"\n >\n <Popover.Target>\n <UnstyledButton\n v-bind=\"{ ...attrs, ...getStyles('moreEventsButton') }\"\n :mod=\"{ static: props.mode === 'static' }\"\n :aria-expanded=\"opened\"\n @click=\"opened = !opened\"\n >\n {{ getLabel('moreLabel', props.labels)(props.moreEventsCount) }}\n </UnstyledButton>\n </Popover.Target>\n\n <Popover.Dropdown v-bind=\"getStyles('moreEventsDropdown')\">\n <Box v-bind=\"getStyles('moreEventsList')\">\n <ScheduleEvent\n v-for=\"event in props.events\"\n :key=\"event.id\"\n :event=\"event\"\n :radius=\"props.radius ?? 'sm'\"\n size=\"md\"\n :mode=\"props.mode\"\n v-bind=\"eventRenderers\"\n @click=\"clickEvent(event, $event)\"\n />\n </Box>\n </Popover.Dropdown>\n </Popover>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport MoreEventsComponent from './MoreEvents.vue'\nimport type { MoreEventsFactory } from './MoreEvents.types'\nimport classes from './MoreEvents.module.css'\n\nexport const MoreEvents = factory<MoreEventsFactory>(MoreEventsComponent, { classes })\n\nexport type {\n MoreEventsDropdownType,\n MoreEventsEmits,\n MoreEventsFactory,\n MoreEventsOwnProps,\n MoreEventsProps,\n MoreEventsSlots,\n MoreEventsStylesNames,\n} from './MoreEvents.types'\n","import { computed, inject, provide, type ComputedRef, type InjectionKey } from 'vue'\nimport type { ScheduleLabelsOverride } from '../../labels'\n\nconst ScheduleHeaderLabelsKey: InjectionKey<() => ScheduleLabelsOverride | undefined> = Symbol(\n 'mantine-schedule-header-labels',\n)\n\n/**\n * Shares the header's `labels` with the compound components rendered inside it.\n * A getter is provided rather than the value so the labels stay reactive.\n */\nexport function provideScheduleHeaderLabels(labels: () => ScheduleLabelsOverride | undefined) {\n provide(ScheduleHeaderLabelsKey, labels)\n}\n\n/**\n * Merges a control's own `labels` over the ones provided by the surrounding `ScheduleHeader`,\n * so overriding a single key does not drop the rest. Must be called during `setup`.\n */\nexport function useScheduleHeaderLabels(\n override: () => ScheduleLabelsOverride | undefined,\n): ComputedRef<ScheduleLabelsOverride | undefined> {\n const contextLabels = inject(ScheduleHeaderLabelsKey, undefined)\n\n return computed(() => {\n const inherited = contextLabels?.()\n const own = override()\n\n if (!own) {\n return inherited\n }\n\n if (!inherited) {\n return own\n }\n\n return { ...inherited, ...own }\n })\n}\n",".header {\n --schedule-header-gap: 8px;\n\n display: flex;\n flex-wrap: wrap;\n gap: var(--schedule-header-gap);\n margin-bottom: var(--schedule-header-gap);\n container-type: inline-size;\n}\n\n.navigationGroup {\n display: flex;\n gap: var(--schedule-header-gap);\n align-items: center;\n\n @container (width <= 600px) {\n flex: 1;\n\n & > :not([data-square]) {\n flex: 1;\n }\n }\n}\n\n.todayControl {\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.viewSelect {\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.compactViewSelect {\n display: none;\n font-weight: var(--mantine-font-weight-medium);\n\n @container (width <= 600px) {\n display: block;\n flex: 1 1 100%;\n }\n}\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { provideScheduleHeaderLabels } from './ScheduleHeader.context'\nimport type { ScheduleHeaderOwnProps, ScheduleHeaderSlots } from './ScheduleHeader.types'\nimport classes from './ScheduleHeader.module.css'\n\ndefineOptions({\n name: 'ScheduleHeader',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleHeaderOwnProps>(), {\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleHeaderSlots>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ScheduleHeader', null, rawProps)\n\nconst getStyles = useStyles({\n name: 'ScheduleHeader',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'header',\n})\n\nprovideScheduleHeaderLabels(() => props.labels)\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('header') }\">\n <slot />\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { provideScheduleHeaderLabels } from './ScheduleHeader.context'\nimport type { ScheduleHeaderOwnProps, ScheduleHeaderSlots } from './ScheduleHeader.types'\nimport classes from './ScheduleHeader.module.css'\n\ndefineOptions({\n name: 'ScheduleHeader',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleHeaderOwnProps>(), {\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleHeaderSlots>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ScheduleHeader', null, rawProps)\n\nconst getStyles = useStyles({\n name: 'ScheduleHeader',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'header',\n})\n\nprovideScheduleHeaderLabels(() => props.labels)\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('header') }\">\n <slot />\n </Box>\n</template>\n",".headerControl {\n --control-size: 32px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n min-width: var(--control-size);\n height: var(--control-size);\n border-radius: var(--schedule-radius, var(--control-radius, var(--mantine-radius-default)));\n border: 1px solid var(--mantine-color-default-border);\n color: var(--mantine-color-default-color);\n background: var(--mantine-color-default);\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-transform: capitalize;\n\n &:where([data-interactive]) {\n cursor: pointer;\n\n @mixin hover {\n background-color: var(--mantine-color-default-hover);\n }\n }\n\n &:where(:not([data-square])) {\n padding-inline: 12px;\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-filled);\n border-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n border-color: var(--mantine-primary-color-filled-hover);\n }\n }\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../../shared'\n\nconst defaultProps = {\n interactive: true,\n} as const\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n headerControl: {\n '--control-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\nimport classes from './HeaderControl.module.css'\n\ndefineOptions({\n name: 'HeaderControl',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('HeaderControl', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'HeaderControl',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'headerControl',\n})\n\nconst rootStyles = computed(() => getStyles('headerControl', { active: props.interactive }))\n\nconst rootMod = computed(() => [\n { active: props.active, square: props.square, interactive: props.interactive },\n (attrs as any).mod,\n])\n\n/** A non-interactive control stays in the DOM as a button but out of the tab order. */\nconst tabindex = computed(() =>\n props.interactive ? (attrs as { tabindex?: number | string }).tabindex : -1,\n)\n</script>\n\n<template>\n <UnstyledButton v-bind=\"{ ...attrs, ...rootStyles }\" :mod=\"rootMod\" :tabindex=\"tabindex\">\n <slot />\n </UnstyledButton>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../../shared'\n\nconst defaultProps = {\n interactive: true,\n} as const\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n headerControl: {\n '--control-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\nimport classes from './HeaderControl.module.css'\n\ndefineOptions({\n name: 'HeaderControl',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('HeaderControl', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'HeaderControl',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'headerControl',\n})\n\nconst rootStyles = computed(() => getStyles('headerControl', { active: props.interactive }))\n\nconst rootMod = computed(() => [\n { active: props.active, square: props.square, interactive: props.interactive },\n (attrs as any).mod,\n])\n\n/** A non-interactive control stays in the DOM as a button but out of the tab order. */\nconst tabindex = computed(() =>\n props.interactive ? (attrs as { tabindex?: number | string }).tabindex : -1,\n)\n</script>\n\n<template>\n <UnstyledButton v-bind=\"{ ...attrs, ...rootStyles }\" :mod=\"rootMod\" :tabindex=\"tabindex\">\n <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, useDirection } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderNext',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\n/** The chevron points down by default, so it is rotated onto the reading direction. */\nconst chevronStyle = computed(() => ({\n transform: `rotate(${dir.value === 'rtl' ? 90 : -90}deg)`,\n}))\n</script>\n\n<template>\n <HeaderControl\n data-type=\"next\"\n :aria-label=\"getLabel('next', labels)\"\n square\n :active=\"props.active\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>\n <AccordionChevron :style=\"chevronStyle\" />\n </slot>\n </HeaderControl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, useDirection } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderNext',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\n/** The chevron points down by default, so it is rotated onto the reading direction. */\nconst chevronStyle = computed(() => ({\n transform: `rotate(${dir.value === 'rtl' ? 90 : -90}deg)`,\n}))\n</script>\n\n<template>\n <HeaderControl\n data-type=\"next\"\n :aria-label=\"getLabel('next', labels)\"\n square\n :active=\"props.active\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>\n <AccordionChevron :style=\"chevronStyle\" />\n </slot>\n </HeaderControl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, useDirection } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderPrevious',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\n/** The chevron points down by default, so it is rotated onto the reading direction. */\nconst chevronStyle = computed(() => ({\n transform: `rotate(${dir.value === 'rtl' ? -90 : 90}deg)`,\n}))\n</script>\n\n<template>\n <HeaderControl\n data-type=\"previous\"\n :aria-label=\"getLabel('previous', labels)\"\n square\n :active=\"props.active\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>\n <AccordionChevron :style=\"chevronStyle\" />\n </slot>\n </HeaderControl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, useDirection } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderPrevious',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\n/** The chevron points down by default, so it is rotated onto the reading direction. */\nconst chevronStyle = computed(() => ({\n transform: `rotate(${dir.value === 'rtl' ? -90 : 90}deg)`,\n}))\n</script>\n\n<template>\n <HeaderControl\n data-type=\"previous\"\n :aria-label=\"getLabel('previous', labels)\"\n square\n :active=\"props.active\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>\n <AccordionChevron :style=\"chevronStyle\" />\n </slot>\n </HeaderControl>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderToday',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n</script>\n\n<template>\n <HeaderControl\n data-type=\"today\"\n :aria-label=\"getLabel('today', labels)\"\n :active=\"props.active\"\n :square=\"props.square\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>{{ getLabel('today', labels) }}</slot>\n </HeaderControl>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { getLabel } from '../../../labels'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport HeaderControl from './HeaderControl.vue'\nimport type { HeaderControlOwnProps, HeaderControlSlots } from './HeaderControl.types'\n\ndefineOptions({\n name: 'ScheduleHeaderToday',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<HeaderControlOwnProps>(), {\n interactive: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<HeaderControlSlots>()\n\nconst attrs = useAttrs()\nconst labels = useScheduleHeaderLabels(() => props.labels)\n</script>\n\n<template>\n <HeaderControl\n data-type=\"today\"\n :aria-label=\"getLabel('today', labels)\"\n :active=\"props.active\"\n :square=\"props.square\"\n :radius=\"props.radius\"\n :interactive=\"props.interactive\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n :styles=\"props.styles\"\n :vars=\"props.vars\"\n :unstyled=\"props.unstyled\"\n v-bind=\"attrs\"\n >\n <slot>{{ getLabel('today', labels) }}</slot>\n </HeaderControl>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport HeaderControlComponent, { varsResolver } from './HeaderControl.vue'\nimport ScheduleHeaderNextComponent from './ScheduleHeaderNext.vue'\nimport ScheduleHeaderPreviousComponent from './ScheduleHeaderPrevious.vue'\nimport ScheduleHeaderTodayComponent from './ScheduleHeaderToday.vue'\nimport type { HeaderControlFactory } from './HeaderControl.types'\nimport classes from './HeaderControl.module.css'\n\nexport const HeaderControl = factory<HeaderControlFactory>(HeaderControlComponent, {\n classes,\n varsResolver,\n})\n\n/** `HeaderControl` preset that navigates to the next period. */\nexport const ScheduleHeaderNext = factory<HeaderControlFactory>(ScheduleHeaderNextComponent, {\n classes,\n varsResolver,\n})\n\n/** `HeaderControl` preset that navigates to the previous period. */\nexport const ScheduleHeaderPrevious = factory<HeaderControlFactory>(\n ScheduleHeaderPreviousComponent,\n { classes, varsResolver },\n)\n\n/** `HeaderControl` preset that navigates to today. */\nexport const ScheduleHeaderToday = factory<HeaderControlFactory>(ScheduleHeaderTodayComponent, {\n classes,\n varsResolver,\n})\n\nexport type {\n HeaderControlCssVariables,\n HeaderControlFactory,\n HeaderControlOwnProps,\n HeaderControlProps,\n HeaderControlSlots,\n HeaderControlStylesNames,\n} from './HeaderControl.types'\n",".monthYearSelectTarget {\n text-transform: capitalize;\n min-width: 80px;\n\n &:where([data-with-months]) {\n min-width: 140px;\n }\n}\n\n.monthYearSelectList {\n flex: 1;\n}\n\n.monthYearSelectDropdown {\n display: flex;\n gap: var(--mantine-spacing-sm);\n padding: 8px 4px;\n\n &:where([data-with-months]) {\n padding: var(--mantine-spacing-sm);\n }\n}\n\n.monthYearSelectLabel {\n font-weight: var(--mantine-font-weight-medium);\n font-size: var(--mantine-font-size-sm);\n padding-inline: 8px;\n margin-bottom: 6px;\n}\n\n.monthYearSelectControl {\n display: block;\n width: 100%;\n padding: 6px 8px;\n font-size: var(--mantine-font-size-sm);\n line-height: 1;\n border-radius: var(--schedule-radius, var(--control-radius, var(--mantine-radius-default)));\n font-variant-numeric: tabular-nums;\n text-transform: capitalize;\n\n &:where([data-type='year']) {\n text-align: center;\n }\n\n @mixin hover {\n background-color: var(--mantine-color-default-hover);\n }\n\n &:where([data-active]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n}\n","<script lang=\"ts\">\nconst defaultProps = {\n monthsListFormat: 'MMMM',\n withMonths: true,\n} as const\n\n/** Fallback radius of the dropdown, so it follows the schedule radius when one is set. */\nconst DEFAULT_DROPDOWN_RADIUS = 'var(--schedule-radius, var(--mantine-radius-default))'\n\nexport { defaultProps, DEFAULT_DROPDOWN_RADIUS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport {\n Box,\n createScopedKeydownHandler,\n Popover,\n UnstyledButton,\n useProps,\n useStyles,\n} from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { formatDate, getMonthsList, getYearsList } from '../../../utils'\nimport { HeaderControl } from '../HeaderControl'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport type { MonthYearSelectEmits, MonthYearSelectOwnProps } from './MonthYearSelect.types'\nimport classes from './MonthYearSelect.module.css'\n\ndefineOptions({\n name: 'MonthYearSelect',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MonthYearSelectOwnProps>(), {\n locale: undefined,\n startYear: undefined,\n endYear: undefined,\n yearValue: undefined,\n monthValue: undefined,\n monthsListFormat: undefined,\n labelFormat: undefined,\n radius: undefined,\n getYearControlProps: undefined,\n getMonthControlProps: undefined,\n withMonths: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<MonthYearSelectEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('MonthYearSelect', defaultProps, rawProps)\n\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\nconst getStyles = useStyles({\n name: 'MonthYearSelect',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'monthYearSelectTarget',\n})\n\nconst opened = ref(false)\n\n/** Captured once so the default year range does not shift while the dropdown is open. */\nconst today = new Date()\n\nconst startYear = computed(() => props.startYear ?? today.getFullYear() - 5)\nconst endYear = computed(() => props.endYear ?? today.getFullYear() + 5)\n\nconst selectedDate = computed(\n () => new Date(props.yearValue ?? today.getFullYear(), props.monthValue ?? today.getMonth(), 1),\n)\n\n/**\n * When the selected year falls outside the offered range no control can be focused by the\n * roving tabindex, so the first one takes the tab stop instead.\n */\nconst hasActiveYear = computed(\n () =>\n props.yearValue !== undefined &&\n props.yearValue >= startYear.value &&\n props.yearValue <= endYear.value,\n)\n\nconst months = computed(() =>\n props.withMonths\n ? getMonthsList({ locale: props.locale || 'en', format: props.monthsListFormat! })\n : [],\n)\n\nconst years = computed(() => getYearsList({ startYear: startYear.value, endYear: endYear.value }))\n\nconst targetLabel = computed(() =>\n formatDate({\n date: selectedDate.value,\n locale: props.locale || 'en',\n format: props.labelFormat || (props.withMonths ? 'MMMM YYYY' : 'YYYY'),\n }),\n)\n\nconst selectMonth = (month: number) => {\n emit('update:monthValue', month)\n emit('monthChange', month)\n}\n\nconst selectYear = (year: number) => {\n emit('update:yearValue', year)\n emit('yearChange', year)\n\n // Without a month list there is nothing left to pick, so the dropdown closes itself.\n if (!props.withMonths) {\n opened.value = false\n }\n}\n\n/**\n * Roving focus inside one dropdown list. A handler returned by `getMonthControlProps` or\n * `getYearControlProps` is not composed in here: Vue already merges the two `keydown`\n * listeners and would otherwise call the consumer's twice.\n */\nconst monthKeydownHandler = createScopedKeydownHandler({\n siblingSelector: '[data-type=\"month\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n})\n\nconst yearKeydownHandler = createScopedKeydownHandler({\n siblingSelector: '[data-type=\"year\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n})\n\nconst monthControlProps = (month: number) => props.getMonthControlProps?.(month) ?? {}\nconst yearControlProps = (year: number) => props.getYearControlProps?.(year) ?? {}\n</script>\n\n<template>\n <Popover\n position=\"bottom-start\"\n trap-focus\n :transition-props=\"{ transition: 'pop', duration: 120 }\"\n :radius=\"props.radius || DEFAULT_DROPDOWN_RADIUS\"\n shadow=\"md\"\n :offset=\"3\"\n :width=\"props.withMonths ? undefined : 'target'\"\n :opened=\"opened\"\n @change=\"opened = $event\"\n >\n <Popover.Target>\n <HeaderControl\n v-bind=\"{ ...attrs, ...getStyles('monthYearSelectTarget') }\"\n :radius=\"props.radius\"\n :data-with-months=\"props.withMonths || undefined\"\n @click=\"opened = !opened\"\n >\n {{ targetLabel }}\n </HeaderControl>\n </Popover.Target>\n\n <Popover.Dropdown\n v-bind=\"getStyles('monthYearSelectDropdown')\"\n :data-with-months=\"props.withMonths || undefined\"\n >\n <Box v-if=\"props.withMonths\" v-bind=\"getStyles('monthYearSelectList')\" data-list>\n <Box v-bind=\"getStyles('monthYearSelectLabel')\">{{ getLabel('month', labels) }}</Box>\n <UnstyledButton\n v-for=\"month in months\"\n :key=\"month.month\"\n v-bind=\"{\n ...monthControlProps(month.month),\n ...getStyles('monthYearSelectControl', {\n className: monthControlProps(month.month).class,\n }),\n }\"\n :mod=\"{ type: 'month', active: month.month === props.monthValue }\"\n :tabindex=\"month.month === props.monthValue ? 0 : -1\"\n :aria-label=\"`${getLabel('selectMonth', labels)} ${month.name}`\"\n @keydown=\"monthKeydownHandler\"\n @click=\"selectMonth(month.month)\"\n >\n {{ month.name }}\n </UnstyledButton>\n </Box>\n\n <Box v-bind=\"getStyles('monthYearSelectList')\" data-list>\n <Box v-if=\"props.withMonths\" v-bind=\"getStyles('monthYearSelectLabel')\">\n {{ getLabel('year', labels) }}\n </Box>\n <UnstyledButton\n v-for=\"(year, index) in years\"\n :key=\"year\"\n v-bind=\"{\n ...yearControlProps(year),\n ...getStyles('monthYearSelectControl', { className: yearControlProps(year).class }),\n }\"\n :mod=\"{ type: 'year', active: year === props.yearValue }\"\n :tabindex=\"hasActiveYear ? (year === props.yearValue ? 0 : -1) : index === 0 ? 0 : -1\"\n :aria-label=\"`${getLabel('selectYear', labels)} ${year}`\"\n @keydown=\"yearKeydownHandler\"\n @click=\"selectYear(year)\"\n >\n {{ year }}\n </UnstyledButton>\n </Box>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script lang=\"ts\">\nconst defaultProps = {\n monthsListFormat: 'MMMM',\n withMonths: true,\n} as const\n\n/** Fallback radius of the dropdown, so it follows the schedule radius when one is set. */\nconst DEFAULT_DROPDOWN_RADIUS = 'var(--schedule-radius, var(--mantine-radius-default))'\n\nexport { defaultProps, DEFAULT_DROPDOWN_RADIUS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport {\n Box,\n createScopedKeydownHandler,\n Popover,\n UnstyledButton,\n useProps,\n useStyles,\n} from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { formatDate, getMonthsList, getYearsList } from '../../../utils'\nimport { HeaderControl } from '../HeaderControl'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport type { MonthYearSelectEmits, MonthYearSelectOwnProps } from './MonthYearSelect.types'\nimport classes from './MonthYearSelect.module.css'\n\ndefineOptions({\n name: 'MonthYearSelect',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MonthYearSelectOwnProps>(), {\n locale: undefined,\n startYear: undefined,\n endYear: undefined,\n yearValue: undefined,\n monthValue: undefined,\n monthsListFormat: undefined,\n labelFormat: undefined,\n radius: undefined,\n getYearControlProps: undefined,\n getMonthControlProps: undefined,\n withMonths: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<MonthYearSelectEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('MonthYearSelect', defaultProps, rawProps)\n\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\nconst getStyles = useStyles({\n name: 'MonthYearSelect',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'monthYearSelectTarget',\n})\n\nconst opened = ref(false)\n\n/** Captured once so the default year range does not shift while the dropdown is open. */\nconst today = new Date()\n\nconst startYear = computed(() => props.startYear ?? today.getFullYear() - 5)\nconst endYear = computed(() => props.endYear ?? today.getFullYear() + 5)\n\nconst selectedDate = computed(\n () => new Date(props.yearValue ?? today.getFullYear(), props.monthValue ?? today.getMonth(), 1),\n)\n\n/**\n * When the selected year falls outside the offered range no control can be focused by the\n * roving tabindex, so the first one takes the tab stop instead.\n */\nconst hasActiveYear = computed(\n () =>\n props.yearValue !== undefined &&\n props.yearValue >= startYear.value &&\n props.yearValue <= endYear.value,\n)\n\nconst months = computed(() =>\n props.withMonths\n ? getMonthsList({ locale: props.locale || 'en', format: props.monthsListFormat! })\n : [],\n)\n\nconst years = computed(() => getYearsList({ startYear: startYear.value, endYear: endYear.value }))\n\nconst targetLabel = computed(() =>\n formatDate({\n date: selectedDate.value,\n locale: props.locale || 'en',\n format: props.labelFormat || (props.withMonths ? 'MMMM YYYY' : 'YYYY'),\n }),\n)\n\nconst selectMonth = (month: number) => {\n emit('update:monthValue', month)\n emit('monthChange', month)\n}\n\nconst selectYear = (year: number) => {\n emit('update:yearValue', year)\n emit('yearChange', year)\n\n // Without a month list there is nothing left to pick, so the dropdown closes itself.\n if (!props.withMonths) {\n opened.value = false\n }\n}\n\n/**\n * Roving focus inside one dropdown list. A handler returned by `getMonthControlProps` or\n * `getYearControlProps` is not composed in here: Vue already merges the two `keydown`\n * listeners and would otherwise call the consumer's twice.\n */\nconst monthKeydownHandler = createScopedKeydownHandler({\n siblingSelector: '[data-type=\"month\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n})\n\nconst yearKeydownHandler = createScopedKeydownHandler({\n siblingSelector: '[data-type=\"year\"]:not(:disabled)',\n parentSelector: '[data-list]',\n activateOnFocus: false,\n loop: true,\n orientation: 'vertical',\n})\n\nconst monthControlProps = (month: number) => props.getMonthControlProps?.(month) ?? {}\nconst yearControlProps = (year: number) => props.getYearControlProps?.(year) ?? {}\n</script>\n\n<template>\n <Popover\n position=\"bottom-start\"\n trap-focus\n :transition-props=\"{ transition: 'pop', duration: 120 }\"\n :radius=\"props.radius || DEFAULT_DROPDOWN_RADIUS\"\n shadow=\"md\"\n :offset=\"3\"\n :width=\"props.withMonths ? undefined : 'target'\"\n :opened=\"opened\"\n @change=\"opened = $event\"\n >\n <Popover.Target>\n <HeaderControl\n v-bind=\"{ ...attrs, ...getStyles('monthYearSelectTarget') }\"\n :radius=\"props.radius\"\n :data-with-months=\"props.withMonths || undefined\"\n @click=\"opened = !opened\"\n >\n {{ targetLabel }}\n </HeaderControl>\n </Popover.Target>\n\n <Popover.Dropdown\n v-bind=\"getStyles('monthYearSelectDropdown')\"\n :data-with-months=\"props.withMonths || undefined\"\n >\n <Box v-if=\"props.withMonths\" v-bind=\"getStyles('monthYearSelectList')\" data-list>\n <Box v-bind=\"getStyles('monthYearSelectLabel')\">{{ getLabel('month', labels) }}</Box>\n <UnstyledButton\n v-for=\"month in months\"\n :key=\"month.month\"\n v-bind=\"{\n ...monthControlProps(month.month),\n ...getStyles('monthYearSelectControl', {\n className: monthControlProps(month.month).class,\n }),\n }\"\n :mod=\"{ type: 'month', active: month.month === props.monthValue }\"\n :tabindex=\"month.month === props.monthValue ? 0 : -1\"\n :aria-label=\"`${getLabel('selectMonth', labels)} ${month.name}`\"\n @keydown=\"monthKeydownHandler\"\n @click=\"selectMonth(month.month)\"\n >\n {{ month.name }}\n </UnstyledButton>\n </Box>\n\n <Box v-bind=\"getStyles('monthYearSelectList')\" data-list>\n <Box v-if=\"props.withMonths\" v-bind=\"getStyles('monthYearSelectLabel')\">\n {{ getLabel('year', labels) }}\n </Box>\n <UnstyledButton\n v-for=\"(year, index) in years\"\n :key=\"year\"\n v-bind=\"{\n ...yearControlProps(year),\n ...getStyles('monthYearSelectControl', { className: yearControlProps(year).class }),\n }\"\n :mod=\"{ type: 'year', active: year === props.yearValue }\"\n :tabindex=\"hasActiveYear ? (year === props.yearValue ? 0 : -1) : index === 0 ? 0 : -1\"\n :aria-label=\"`${getLabel('selectYear', labels)} ${year}`\"\n @keydown=\"yearKeydownHandler\"\n @click=\"selectYear(year)\"\n >\n {{ year }}\n </UnstyledButton>\n </Box>\n </Popover.Dropdown>\n </Popover>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport MonthYearSelectComponent from './MonthYearSelect.vue'\nimport type { MonthYearSelectFactory } from './MonthYearSelect.types'\nimport classes from './MonthYearSelect.module.css'\n\nexport const MonthYearSelect = factory<MonthYearSelectFactory>(MonthYearSelectComponent, {\n classes,\n})\n\nexport type {\n MonthYearSelectEmits,\n MonthYearSelectFactory,\n MonthYearSelectOwnProps,\n MonthYearSelectProps,\n MonthYearSelectStylesNames,\n} from './MonthYearSelect.types'\n",".viewSelect {\n display: flex;\n gap: 4px;\n}\n","<script lang=\"ts\">\nimport type { ScheduleViewLevel } from '../../../types'\n\nconst defaultProps = {\n views: ['day', 'week', 'month', 'year'],\n} as const\n\nconst SWITCH_LABELS: Record<\n ScheduleViewLevel,\n 'switchToDayView' | 'switchToWeekView' | 'switchToMonthView' | 'switchToYearView'\n> = {\n day: 'switchToDayView',\n week: 'switchToWeekView',\n month: 'switchToMonthView',\n year: 'switchToYearView',\n}\n\nexport { defaultProps, SWITCH_LABELS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { HeaderControl } from '../HeaderControl'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport type { ViewSelectEmits, ViewSelectOwnProps } from './ViewSelect.types'\nimport classes from './ViewSelect.module.css'\n\ndefineOptions({\n name: 'ViewSelect',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ViewSelectOwnProps>(), {\n views: undefined,\n modelValue: undefined,\n value: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<ViewSelectEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ViewSelect', defaultProps, rawProps)\n\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\nconst getStyles = useStyles({\n name: 'ViewSelect',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'viewSelect',\n})\n\nconst selected = computed(() => props.modelValue ?? props.value)\n\nconst select = (view: ScheduleViewLevel) => {\n emit('update:modelValue', view)\n emit('change', view)\n}\n\n/** Roving tabindex across the tablist, matching the WAI-ARIA tabs pattern. */\nconst handleKeydown = (nativeEvent: KeyboardEvent, index: number) => {\n const controls = (\n nativeEvent.currentTarget as HTMLElement\n ).parentElement?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')\n\n if (!controls?.length) {\n return\n }\n\n let next = index\n\n if (nativeEvent.key === 'ArrowRight') {\n next = (index + 1) % controls.length\n } else if (nativeEvent.key === 'ArrowLeft') {\n next = (index - 1 + controls.length) % controls.length\n } else if (nativeEvent.key === 'Home') {\n next = 0\n } else if (nativeEvent.key === 'End') {\n next = controls.length - 1\n } else {\n return\n }\n\n nativeEvent.preventDefault()\n controls[next]?.focus()\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('viewSelect') }\"\n role=\"tablist\"\n :aria-label=\"getLabel('viewSelectLabel', labels)\"\n >\n <HeaderControl\n v-for=\"(view, index) in props.views\"\n :key=\"view\"\n :active=\"view === selected\"\n :radius=\"props.radius\"\n role=\"tab\"\n :data-type=\"view\"\n :aria-selected=\"view === selected\"\n :aria-label=\"getLabel(SWITCH_LABELS[view], labels)\"\n :tabindex=\"view === selected ? 0 : -1\"\n @click=\"select(view)\"\n @keydown=\"handleKeydown($event, index)\"\n >\n {{ getLabel(view, labels) }}\n </HeaderControl>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport type { ScheduleViewLevel } from '../../../types'\n\nconst defaultProps = {\n views: ['day', 'week', 'month', 'year'],\n} as const\n\nconst SWITCH_LABELS: Record<\n ScheduleViewLevel,\n 'switchToDayView' | 'switchToWeekView' | 'switchToMonthView' | 'switchToYearView'\n> = {\n day: 'switchToDayView',\n week: 'switchToWeekView',\n month: 'switchToMonthView',\n year: 'switchToYearView',\n}\n\nexport { defaultProps, SWITCH_LABELS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../../labels'\nimport { HeaderControl } from '../HeaderControl'\nimport { useScheduleHeaderLabels } from '../ScheduleHeader.context'\nimport type { ViewSelectEmits, ViewSelectOwnProps } from './ViewSelect.types'\nimport classes from './ViewSelect.module.css'\n\ndefineOptions({\n name: 'ViewSelect',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ViewSelectOwnProps>(), {\n views: undefined,\n modelValue: undefined,\n value: undefined,\n radius: undefined,\n labels: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<ViewSelectEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ViewSelect', defaultProps, rawProps)\n\nconst labels = useScheduleHeaderLabels(() => props.labels)\n\nconst getStyles = useStyles({\n name: 'ViewSelect',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'viewSelect',\n})\n\nconst selected = computed(() => props.modelValue ?? props.value)\n\nconst select = (view: ScheduleViewLevel) => {\n emit('update:modelValue', view)\n emit('change', view)\n}\n\n/** Roving tabindex across the tablist, matching the WAI-ARIA tabs pattern. */\nconst handleKeydown = (nativeEvent: KeyboardEvent, index: number) => {\n const controls = (\n nativeEvent.currentTarget as HTMLElement\n ).parentElement?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')\n\n if (!controls?.length) {\n return\n }\n\n let next = index\n\n if (nativeEvent.key === 'ArrowRight') {\n next = (index + 1) % controls.length\n } else if (nativeEvent.key === 'ArrowLeft') {\n next = (index - 1 + controls.length) % controls.length\n } else if (nativeEvent.key === 'Home') {\n next = 0\n } else if (nativeEvent.key === 'End') {\n next = controls.length - 1\n } else {\n return\n }\n\n nativeEvent.preventDefault()\n controls[next]?.focus()\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('viewSelect') }\"\n role=\"tablist\"\n :aria-label=\"getLabel('viewSelectLabel', labels)\"\n >\n <HeaderControl\n v-for=\"(view, index) in props.views\"\n :key=\"view\"\n :active=\"view === selected\"\n :radius=\"props.radius\"\n role=\"tab\"\n :data-type=\"view\"\n :aria-selected=\"view === selected\"\n :aria-label=\"getLabel(SWITCH_LABELS[view], labels)\"\n :tabindex=\"view === selected ? 0 : -1\"\n @click=\"select(view)\"\n @keydown=\"handleKeydown($event, index)\"\n >\n {{ getLabel(view, labels) }}\n </HeaderControl>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ViewSelectComponent from './ViewSelect.vue'\nimport type { ViewSelectFactory } from './ViewSelect.types'\nimport classes from './ViewSelect.module.css'\n\nexport const ViewSelect = factory<ViewSelectFactory>(ViewSelectComponent, { classes })\n\nexport type {\n ViewSelectEmits,\n ViewSelectFactory,\n ViewSelectOwnProps,\n ViewSelectProps,\n ViewSelectStylesNames,\n} from './ViewSelect.types'\n","import { factory } from '@mantine-vue/core'\nimport ScheduleHeaderComponent from './ScheduleHeader.vue'\nimport {\n HeaderControl,\n ScheduleHeaderNext,\n ScheduleHeaderPrevious,\n ScheduleHeaderToday,\n} from './HeaderControl'\nimport { MonthYearSelect } from './MonthYearSelect'\nimport { ViewSelect } from './ViewSelect'\nimport type { ScheduleHeaderFactory } from './ScheduleHeader.types'\nimport classes from './ScheduleHeader.module.css'\n\nexport const ScheduleHeader = factory<\n ScheduleHeaderFactory & {\n staticComponents: {\n Control: typeof HeaderControl\n Previous: typeof ScheduleHeaderPrevious\n Next: typeof ScheduleHeaderNext\n Today: typeof ScheduleHeaderToday\n ViewSelect: typeof ViewSelect\n MonthYearSelect: typeof MonthYearSelect\n }\n }\n>(ScheduleHeaderComponent, {\n classes,\n Control: HeaderControl,\n Previous: ScheduleHeaderPrevious,\n Next: ScheduleHeaderNext,\n Today: ScheduleHeaderToday,\n ViewSelect,\n MonthYearSelect,\n})\n\nexport type {\n CombinedScheduleHeaderStylesNames,\n ScheduleHeaderFactory,\n ScheduleHeaderOwnProps,\n ScheduleHeaderProps,\n ScheduleHeaderSlots,\n ScheduleHeaderStylesNames,\n} from './ScheduleHeader.types'\n","<script lang=\"ts\">\nimport dayjs from 'dayjs'\nimport type { ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport type { ScheduleHeaderNavigationHandlers } from './ScheduleHeaderBase.types'\n\nconst DEFAULT_VIEWS: ScheduleViewLevel[] = ['day', 'week', 'month', 'year']\n\n/** Builds the previous/next/today handlers for a view that steps by a single `unit`. */\nexport function createHeaderNavigation(\n date: Date | string,\n unit: 'day' | 'week' | 'month' | 'year',\n): ScheduleHeaderNavigationHandlers {\n return {\n previous: () => toDateString(dayjs(date).subtract(1, unit)),\n next: () => toDateString(dayjs(date).add(1, unit)),\n today: () => toDateString(dayjs()),\n }\n}\n\nexport { DEFAULT_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, NativeSelect, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport { ScheduleHeader } from './ScheduleHeader'\nimport type {\n ScheduleHeaderBaseEmits,\n ScheduleHeaderBaseProps,\n ScheduleHeaderBaseSlots,\n} from './ScheduleHeaderBase.types'\nimport classes from './ScheduleHeader.module.css'\n\ndefineOptions({\n name: 'ScheduleHeaderBase',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleHeaderBaseProps>(), {\n labels: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleHeaderBaseSlots>()\n\nconst emit = defineEmits<ScheduleHeaderBaseEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ScheduleHeader', null, rawProps)\n\n/**\n * The layout selectors live in the `ScheduleHeader` Styles API, so a view that forwards its\n * `classNames` reaches them through the same names it documents.\n */\nconst getStyles = useStyles({\n name: 'ScheduleHeader',\n props,\n classes,\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'header',\n})\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst views = computed(() => props.viewSelectProps?.views ?? DEFAULT_VIEWS)\n\nconst compactData = computed(() =>\n views.value.map((view) => ({ value: view, label: getLabel(view, props.labels) })),\n)\n\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n\nconst renderTitle = () => props.control.title\n</script>\n\n<template>\n <ScheduleHeader v-bind=\"{ ...attrs, ...stylesApi }\" :labels=\"props.labels\">\n <Box v-bind=\"getStyles('navigationGroup')\">\n <ScheduleHeader.Previous\n v-bind=\"{ ...stylesApi, ...props.previousControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.previous())\"\n />\n\n <ScheduleHeader.MonthYearSelect\n v-if=\"props.control.monthYearSelect\"\n v-bind=\"{ ...stylesApi, ...props.control.monthYearSelect }\"\n :labels=\"props.labels\"\n />\n <ScheduleHeader.Control\n v-else\n v-bind=\"stylesApi\"\n :interactive=\"false\"\n :style=\"props.control.miw === undefined ? undefined : { minWidth: props.control.miw }\"\n >\n <component :is=\"renderTitle\" v-if=\"props.control.title !== undefined\" />\n <slot v-else name=\"title\" />\n </ScheduleHeader.Control>\n\n <ScheduleHeader.Next\n v-bind=\"{ ...stylesApi, ...props.nextControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.next())\"\n />\n </Box>\n\n <Box v-bind=\"getStyles('todayControl')\">\n <ScheduleHeader.Today\n v-bind=\"{ ...stylesApi, ...props.todayControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.today())\"\n />\n </Box>\n\n <NativeSelect\n :class=\"getStyles('compactViewSelect').class\"\n :model-value=\"props.view\"\n size=\"sm\"\n :data=\"compactData\"\n :aria-label=\"getLabel('viewSelectLabel', props.labels)\"\n @change=\"changeView($event as ScheduleViewLevel)\"\n />\n\n <Box v-bind=\"getStyles('viewSelect', { style: { marginInlineStart: 'auto' } })\">\n <ScheduleHeader.ViewSelect\n v-bind=\"{ ...stylesApi, ...props.viewSelectProps }\"\n :model-value=\"props.view\"\n :labels=\"props.labels\"\n @change=\"changeView\"\n />\n </Box>\n </ScheduleHeader>\n</template>\n","<script lang=\"ts\">\nimport dayjs from 'dayjs'\nimport type { ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport type { ScheduleHeaderNavigationHandlers } from './ScheduleHeaderBase.types'\n\nconst DEFAULT_VIEWS: ScheduleViewLevel[] = ['day', 'week', 'month', 'year']\n\n/** Builds the previous/next/today handlers for a view that steps by a single `unit`. */\nexport function createHeaderNavigation(\n date: Date | string,\n unit: 'day' | 'week' | 'month' | 'year',\n): ScheduleHeaderNavigationHandlers {\n return {\n previous: () => toDateString(dayjs(date).subtract(1, unit)),\n next: () => toDateString(dayjs(date).add(1, unit)),\n today: () => toDateString(dayjs()),\n }\n}\n\nexport { DEFAULT_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, NativeSelect, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport { ScheduleHeader } from './ScheduleHeader'\nimport type {\n ScheduleHeaderBaseEmits,\n ScheduleHeaderBaseProps,\n ScheduleHeaderBaseSlots,\n} from './ScheduleHeaderBase.types'\nimport classes from './ScheduleHeader.module.css'\n\ndefineOptions({\n name: 'ScheduleHeaderBase',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleHeaderBaseProps>(), {\n labels: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleHeaderBaseSlots>()\n\nconst emit = defineEmits<ScheduleHeaderBaseEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('ScheduleHeader', null, rawProps)\n\n/**\n * The layout selectors live in the `ScheduleHeader` Styles API, so a view that forwards its\n * `classNames` reaches them through the same names it documents.\n */\nconst getStyles = useStyles({\n name: 'ScheduleHeader',\n props,\n classes,\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n rootSelector: 'header',\n})\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst views = computed(() => props.viewSelectProps?.views ?? DEFAULT_VIEWS)\n\nconst compactData = computed(() =>\n views.value.map((view) => ({ value: view, label: getLabel(view, props.labels) })),\n)\n\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n\nconst renderTitle = () => props.control.title\n</script>\n\n<template>\n <ScheduleHeader v-bind=\"{ ...attrs, ...stylesApi }\" :labels=\"props.labels\">\n <Box v-bind=\"getStyles('navigationGroup')\">\n <ScheduleHeader.Previous\n v-bind=\"{ ...stylesApi, ...props.previousControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.previous())\"\n />\n\n <ScheduleHeader.MonthYearSelect\n v-if=\"props.control.monthYearSelect\"\n v-bind=\"{ ...stylesApi, ...props.control.monthYearSelect }\"\n :labels=\"props.labels\"\n />\n <ScheduleHeader.Control\n v-else\n v-bind=\"stylesApi\"\n :interactive=\"false\"\n :style=\"props.control.miw === undefined ? undefined : { minWidth: props.control.miw }\"\n >\n <component :is=\"renderTitle\" v-if=\"props.control.title !== undefined\" />\n <slot v-else name=\"title\" />\n </ScheduleHeader.Control>\n\n <ScheduleHeader.Next\n v-bind=\"{ ...stylesApi, ...props.nextControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.next())\"\n />\n </Box>\n\n <Box v-bind=\"getStyles('todayControl')\">\n <ScheduleHeader.Today\n v-bind=\"{ ...stylesApi, ...props.todayControlProps }\"\n @click=\"emit('dateChange', props.navigationHandlers.today())\"\n />\n </Box>\n\n <NativeSelect\n :class=\"getStyles('compactViewSelect').class\"\n :model-value=\"props.view\"\n size=\"sm\"\n :data=\"compactData\"\n :aria-label=\"getLabel('viewSelectLabel', props.labels)\"\n @change=\"changeView($event as ScheduleViewLevel)\"\n />\n\n <Box v-bind=\"getStyles('viewSelect', { style: { marginInlineStart: 'auto' } })\">\n <ScheduleHeader.ViewSelect\n v-bind=\"{ ...stylesApi, ...props.viewSelectProps }\"\n :model-value=\"props.view\"\n :labels=\"props.labels\"\n @change=\"changeView\"\n />\n </Box>\n </ScheduleHeader>\n</template>\n","import ScheduleHeaderBaseComponent, { createHeaderNavigation } from './ScheduleHeaderBase.vue'\n\n/**\n * Header shared by every view. Internal building block: views expose the parts of it they\n * support through their own props rather than rendering it directly.\n */\nexport const ScheduleHeaderBase = ScheduleHeaderBaseComponent\n\nexport { createHeaderNavigation }\n\nexport type {\n ScheduleHeaderBaseEmits,\n ScheduleHeaderBaseProps,\n ScheduleHeaderBaseSlots,\n ScheduleHeaderControl,\n ScheduleHeaderNavigationHandlers,\n} from './ScheduleHeaderBase.types'\n","import { onBeforeUnmount, shallowRef, watch, type Ref } from 'vue'\nimport { rafThrottle } from './shared'\n\ninterface SelectedRange {\n group: string\n start: number\n end: number\n}\n\ninterface DragState {\n group: string\n startIndex: number\n currentIndex: number\n}\n\nexport interface UseSlotDragSelectInput {\n enabled: () => boolean\n\n onDragEnd?: (startIndex: number, endIndex: number, group: string) => void\n}\n\nexport interface SlotDragSelect {\n handleSlotPointerDown: (event: PointerEvent, index: number, group: string) => void\n\n isSlotSelected: (index: number, group: string) => boolean\n\n isDragging: () => boolean\n}\n\n/**\n * Slot drag-selection shared by the day, week and month views. It tracks a selected range as the\n * pointer moves across elements carrying `data-drag-slot-index` / `data-drag-slot-group`.\n *\n * Hit testing goes through `elementsFromPoint`, which reads layout, so it is coalesced to one\n * animation frame: a fast pointer would otherwise queue up more hit tests and re-renders than the\n * browser can paint, and the selection would keep growing after the pointer stopped.\n */\nexport function useSlotDragSelect(input: UseSlotDragSelectInput): SlotDragSelect {\n const selectedRange = shallowRef<SelectedRange | null>(null)\n let drag: DragState | null = null\n let savedUserSelect = ''\n\n const resolveIndexAt = rafThrottle((clientX: number, clientY: number) => {\n if (!drag) {\n return\n }\n\n for (const element of document.elementsFromPoint(clientX, clientY)) {\n const indexAttr = element.getAttribute?.('data-drag-slot-index')\n const groupAttr = element.getAttribute?.('data-drag-slot-group')\n\n if (indexAttr == null || groupAttr == null) {\n continue\n }\n\n if (groupAttr === drag.group) {\n const nextIndex = Number(indexAttr)\n\n if (!Number.isNaN(nextIndex) && nextIndex !== drag.currentIndex) {\n drag.currentIndex = nextIndex\n selectedRange.value = {\n group: groupAttr,\n start: Math.min(drag.startIndex, nextIndex),\n end: Math.max(drag.startIndex, nextIndex),\n }\n }\n }\n\n // The topmost slot under the pointer decides; anything below it is covered.\n break\n }\n })\n\n const handlePointerMove = (event: PointerEvent) => {\n if (drag) {\n resolveIndexAt(event.clientX, event.clientY)\n }\n }\n\n const handlePointerUp = () => {\n // Drop the pending hit test first: the gesture is over, so its result is stale by definition.\n resolveIndexAt.cancel()\n\n if (drag) {\n const { startIndex, currentIndex, group } = drag\n\n if (startIndex !== currentIndex) {\n input.onDragEnd?.(\n Math.min(startIndex, currentIndex),\n Math.max(startIndex, currentIndex),\n group,\n )\n }\n }\n\n drag = null\n selectedRange.value = null\n }\n\n const removeListeners = () => {\n resolveIndexAt.cancel()\n document.body.style.userSelect = savedUserSelect\n document.removeEventListener('pointermove', handlePointerMove)\n document.removeEventListener('pointerup', handlePointerUp)\n }\n\n watch(\n () => selectedRange.value !== null,\n (isDragging) => {\n if (isDragging) {\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', handlePointerMove)\n document.addEventListener('pointerup', handlePointerUp)\n } else {\n removeListeners()\n }\n },\n )\n\n onBeforeUnmount(() => {\n if (selectedRange.value !== null) {\n removeListeners()\n }\n })\n\n const handleSlotPointerDown = (_event: PointerEvent, index: number, group: string) => {\n if (!input.enabled()) {\n return\n }\n\n drag = { group, startIndex: index, currentIndex: index }\n selectedRange.value = { group, start: index, end: index }\n }\n\n const isSlotSelected = (index: number, group: string) => {\n const range = selectedRange.value\n\n if (!range || range.group !== group) {\n return false\n }\n\n return index >= range.start && index <= range.end\n }\n\n const isDragging = () => selectedRange.value !== null\n\n return { handleSlotPointerDown, isSlotSelected, isDragging }\n}\n\nexport type SelectedRangeRef = Ref<SelectedRange | null>\n","import { shallowRef } from 'vue'\nimport type { DateStringValue, DateTimeStringValue } from '../types'\nimport { rafThrottle } from './shared'\n\nexport interface SlotDropTarget {\n date: DateStringValue\n\n slotIndex: number\n}\n\nexport interface SlotDropInterval {\n startTime: string\n}\n\nexport interface ResolveSlotInput {\n container: HTMLElement | null | undefined\n\n date: DateStringValue\n\n intervals: SlotDropInterval[]\n}\n\nexport interface ResolvedSlotDrop {\n slotIndex: number\n target: DateTimeStringValue\n}\n\nfunction resolveSlotIndex(\n { container, intervals }: ResolveSlotInput,\n clientY: number,\n eventTarget: Element | null,\n) {\n if (!container || intervals.length === 0) {\n return -1\n }\n\n // Fast path: the pointer is over a slot, so the index is already on the element.\n const slot = eventTarget?.closest<HTMLElement>('[data-time-slot-index]')\n\n if (slot && container.contains(slot)) {\n const index = Number(slot.dataset.timeSlotIndex)\n\n if (Number.isInteger(index)) {\n return index\n }\n }\n\n // Slow path: the pointer is over an event or a gap, so the slots have to be measured. This\n // reads layout, which is why the caller only ever reaches it once per animation frame.\n const slots = container.querySelectorAll<HTMLElement>('[data-time-slot-index]')\n\n return Array.from(slots).findIndex((element) => {\n const rect = element.getBoundingClientRect()\n return clientY >= rect.top && clientY <= rect.bottom\n })\n}\n\n/**\n * Tracks the time slot a drag is hovering over.\n *\n * `dragover` fires many times per frame and the fallback that measures slots reads layout, so\n * resolving the target on every event makes the highlight lag behind the pointer and keep\n * catching up after it stops. The resolution is therefore coalesced to one animation frame, the\n * state is only written when the slot actually changes, and any pending frame is dropped as soon\n * as the drag leaves or the drop happens — so nothing lands after the fact.\n */\nexport function useSlotDropTarget() {\n const dropTarget = shallowRef<SlotDropTarget | null>(null)\n\n const setTarget = (next: SlotDropTarget | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (current && next && current.date === next.date && current.slotIndex === next.slotIndex) {\n return\n }\n\n dropTarget.value = next\n }\n\n const resolveLater = rafThrottle(\n (input: ResolveSlotInput, clientY: number, eventTarget: Element | null) => {\n const slotIndex = resolveSlotIndex(input, clientY, eventTarget)\n setTarget(slotIndex < 0 ? null : { date: input.date, slotIndex })\n },\n )\n\n const reset = () => {\n resolveLater.cancel()\n setTarget(null)\n }\n\n return {\n dropTarget,\n\n isTarget: (date: DateStringValue, slotIndex: number) =>\n dropTarget.value?.date === date && dropTarget.value.slotIndex === slotIndex,\n\n /**\n * Accepts the drag and schedules the target update. `preventDefault` and `dropEffect` run\n * synchronously because the browser reads them as the handler returns.\n */\n dragOver: (nativeEvent: DragEvent, input: ResolveSlotInput) => {\n nativeEvent.preventDefault()\n\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.dropEffect = nativeEvent.dataTransfer.types.includes(\n 'application/json',\n )\n ? 'move'\n : 'copy'\n }\n\n resolveLater(\n input,\n nativeEvent.clientY,\n nativeEvent.target instanceof Element ? nativeEvent.target : null,\n )\n },\n\n dragLeave: (nativeEvent: DragEvent, container: HTMLElement | null | undefined) => {\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !container?.contains(nativeEvent.relatedTarget)\n ) {\n reset()\n }\n },\n\n drop: (nativeEvent: DragEvent, input: ResolveSlotInput): ResolvedSlotDrop | undefined => {\n const slotIndex = resolveSlotIndex(\n input,\n nativeEvent.clientY,\n nativeEvent.target instanceof Element ? nativeEvent.target : null,\n )\n\n reset()\n\n const interval = input.intervals[slotIndex]\n\n return interval\n ? { slotIndex, target: `${input.date} ${interval.startTime}` as DateTimeStringValue }\n : undefined\n },\n\n reset,\n }\n}\n","import { AnyDateValue, DayPositionedEventData, ScheduleEventData } from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventsOverlap, sortEvents } from '../../../utils'\n\ninterface ColumnHasConflictOptions {\n columns: ScheduleEventData[][]\n columnIndex: number\n event: ScheduleEventData\n allDay: boolean\n date: AnyDateValue\n}\n\nfunction columnHasConflict({\n columns,\n columnIndex,\n event,\n allDay,\n date,\n}: ColumnHasConflictOptions): boolean {\n if (!columns[columnIndex]) {\n return false\n }\n\n return columns[columnIndex].some((e) => {\n const eAllDay = isAllDayEvent({ event: e, date })\n const hasTimeConflict = isEventsOverlap(e, event)\n\n // Don't count all-day events as overlaps\n if (allDay || eAllDay) {\n return false\n }\n\n return hasTimeConflict\n })\n}\n\ninterface GetDayPositionedEventsInput {\n /** Date at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given date, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** Start time of the day view, used to calculate event positions */\n startTime?: string\n\n /** End time of the day view, used to calculate event positions */\n endTime?: string\n\n /** Number of minutes per time slot, used to align the canvas to whole slots */\n intervalMinutes?: number\n}\n\nexport function getDayPositionedEvents({\n events,\n startTime,\n endTime,\n intervalMinutes,\n date,\n}: GetDayPositionedEventsInput) {\n const columns: ScheduleEventData[][] = []\n const positioned: DayPositionedEventData[] = []\n\n const sorted = sortEvents(events)\n\n for (const event of sorted) {\n const allDay = isAllDayEvent({ event, date })\n\n let column = 0\n\n while (columnHasConflict({ columns, columnIndex: column, event, allDay, date })) {\n column++\n }\n\n if (!columns[column]) {\n columns[column] = []\n }\n\n columns[column].push(event)\n\n const verticalPosition = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event, startTime, endTime, intervalMinutes })\n\n positioned.push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n\n // set later\n width: 0,\n offset: 0,\n overlaps: 0,\n },\n })\n }\n for (const positionedEvent of positioned) {\n const { allDay, column } = positionedEvent.position\n\n if (allDay) {\n positionedEvent.position.overlaps = 1\n positionedEvent.position.width = 100\n positionedEvent.position.offset = 0\n continue\n }\n\n // Find events that directly overlap with this event\n const directlyOverlapping: DayPositionedEventData[] = []\n\n for (const otherEvent of positioned) {\n if (otherEvent === positionedEvent || otherEvent.position.allDay) {\n continue\n }\n\n if (isEventsOverlap(otherEvent, positionedEvent)) {\n directlyOverlapping.push(otherEvent)\n }\n }\n\n // Find the max column by also checking overlaps of overlapping events\n // This ensures we account for the full column group\n let maxColumn = column\n\n for (const overlappingEvent of directlyOverlapping) {\n maxColumn = Math.max(maxColumn, overlappingEvent.position.column)\n\n // Check what overlaps with each overlapping event\n for (const otherEvent of positioned) {\n if (otherEvent === overlappingEvent || otherEvent.position.allDay) {\n continue\n }\n\n if (isEventsOverlap(otherEvent, overlappingEvent)) {\n maxColumn = Math.max(maxColumn, otherEvent.position.column)\n }\n }\n }\n\n const totalColumns = maxColumn + 1\n\n // Find the first occupied column to the right of this event\n // Events expand to fill empty columns but stop at the next occupied column\n let nextOccupiedColumn = totalColumns\n\n for (const other of directlyOverlapping) {\n if (other.position.column > column && other.position.column < nextOccupiedColumn) {\n nextOccupiedColumn = other.position.column\n }\n }\n\n const columnsSpanned = nextOccupiedColumn - column\n\n positionedEvent.position.overlaps = totalColumns\n positionedEvent.position.width = (columnsSpanned / totalColumns) * 100\n positionedEvent.position.offset = (column * 100) / totalColumns\n }\n\n return positioned\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayPositionedEventData, ScheduleEventData } from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventInTimeRange, validateEvent } from '../../../utils'\nimport { getDayPositionedEvents } from './get-day-positioned-events'\n\ninterface GetDayViewEventsInput {\n events: ScheduleEventData[] | undefined\n date: AnyDateValue\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n}\n\nexport function getDayViewEvents({\n events,\n date,\n startTime,\n endTime,\n intervalMinutes,\n}: GetDayViewEventsInput) {\n if (events === undefined) {\n return {\n allDayEvents: [],\n regularEvents: [],\n backgroundTimedEvents: [],\n backgroundAllDayEvents: [],\n }\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n const backgroundFiltered: ScheduleEventData[] = []\n const dayStart = dayjs(date).startOf('day')\n const dayEnd = dayjs(date).endOf('day')\n\n for (const event of events) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const isOnDay = eventStart.isSame(dayStart, 'day')\n const spansIntoDay =\n !isOnDay &&\n event.display === 'background' &&\n eventStart.isBefore(dayEnd) &&\n eventEnd.isAfter(dayStart)\n\n if (isOnDay || spansIntoDay) {\n if (isOnDay && !isEventInTimeRange({ event, startTime, endTime })) {\n continue\n }\n\n const validated = validateEvent(event)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] DayView: Duplicated event ids found: ${event.id}`)\n }\n\n if (event.display === 'background') {\n backgroundFiltered.push(validated)\n } else {\n filteredEvents.push(validated)\n }\n }\n }\n\n const positionedEvents = getDayPositionedEvents({\n events: filteredEvents,\n startTime,\n endTime,\n intervalMinutes,\n date,\n })\n\n const allDayEvents: DayPositionedEventData[] = []\n const regularEvents: DayPositionedEventData[] = []\n\n for (const event of positionedEvents) {\n if (event.position.allDay) {\n allDayEvents.push(event)\n } else {\n regularEvents.push(event)\n }\n }\n\n const backgroundTimedEvents: DayPositionedEventData[] = []\n const backgroundAllDayEvents: DayPositionedEventData[] = []\n for (const event of backgroundFiltered) {\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const clippedStart = eventStart.isBefore(dayStart) ? dayStart : eventStart\n const clippedEnd = eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd\n\n const clippedEvent = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n\n const allDay = isAllDayEvent({ event: clippedEvent, date })\n\n if (allDay) {\n backgroundAllDayEvents.push({\n ...event,\n position: {\n top: 0,\n height: 100,\n allDay: true,\n width: 100,\n offset: 0,\n column: 0,\n overlaps: 1,\n },\n })\n } else {\n const { top, height } = getDayPosition({\n event: clippedEvent,\n startTime,\n endTime,\n intervalMinutes,\n })\n if (height <= 0) {\n continue\n }\n backgroundTimedEvents.push({\n ...event,\n position: { top, height, allDay: false, width: 100, offset: 0, column: 0, overlaps: 1 },\n })\n }\n }\n\n return { allDayEvents, regularEvents, backgroundTimedEvents, backgroundAllDayEvents }\n}\n",".dayView {\n --slot-height: var(--day-view-slot-height, 64px); /* total height of 1 hour slot */\n --all-day-slot-height: var(--day-view-all-day-slot-height, 44px); /* height of all day slot */\n --day-view-slot-labels-width: 80px;\n --day-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n border-radius: var(--day-view-radius);\n overflow: hidden;\n\n @mixin where-light {\n --day-view-border-color: var(--mantine-color-gray-3);\n --day-view-business-hours-bg: var(--mantine-color-white);\n --day-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --day-view-border-color: var(--mantine-color-dark-4);\n --day-view-business-hours-bg: var(--mantine-color-dark-7);\n --day-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.dayViewScrollArea {\n border: 1px solid var(--day-view-border-color);\n border-radius: var(--day-view-radius);\n overflow: hidden;\n\n :where(:global(.mantine-ScrollArea-scrollbar)) {\n z-index: 4;\n }\n}\n\n.dayViewInner {\n display: flex;\n}\n\n.dayViewTimeSlots {\n position: relative;\n\n &:where(:first-of-type) .dayViewSlot:where([data-first]) {\n border-top-color: transparent;\n }\n}\n\n.dayViewSlotLabels {\n width: var(--day-view-slot-labels-width);\n}\n\n.dayViewSlotLabel {\n height: var(--slot-height);\n border-top: 1px solid var(--day-view-border-color);\n font-size: var(--mantine-font-size-sm);\n text-align: right;\n padding: 4px 8px;\n font-variant-numeric: tabular-nums;\n\n &:where([data-all-day]) {\n height: var(--all-day-slot-height);\n border-top: 0;\n }\n\n &:where(:first-of-type) {\n border-top: 0;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--day-view-non-business-hours-bg);\n }\n}\n\n.dayViewSlots {\n flex: 1;\n}\n\n.dayViewSlot {\n display: block;\n width: 100%;\n border-top: 1px dotted var(--day-view-border-color);\n height: calc(var(--slot-height) * var(--slot-size));\n position: relative;\n\n &:where(:focus) {\n z-index: 1;\n }\n\n &:where([data-hour-start]) {\n border-top: 1px solid var(--day-view-border-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n\n &:where([data-all-day]) {\n height: var(--all-day-slot-height);\n border-top: 0;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--day-view-non-business-hours-bg);\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.dayViewBackgroundEvent {\n position: absolute;\n border-radius: 0;\n pointer-events: none;\n z-index: 2;\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.dayViewAllDay {\n position: relative;\n height: var(--all-day-slot-height);\n}\n\n.dayViewAllDayEvents {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n z-index: 3;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 15,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n slotHeight: 64,\n headerFormat: 'MMMM D, YYYY',\n withAllDaySlot: true,\n allDaySlotHeight: 44,\n maxAllDayEvents: 3,\n} as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotHeight, allDaySlotHeight }) => ({\n dayView: {\n '--day-view-radius': resolveScheduleRadius(radius),\n '--day-view-slot-height': cssSize(slotHeight),\n '--day-view-all-day-slot-height': cssSize(allDaySlotHeight),\n },\n }),\n)\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport { getLabel } from '../../labels'\nimport type { DateTimeStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getVisibleEvents,\n toDateString,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n moveEventToAllDay,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { useSlotDropTarget } from '../use-slot-drop-target'\nimport { getDayViewEvents } from './get-day-view-events/get-day-view-events'\nimport type { DayViewEmits, DayViewOwnProps, DayViewSlots } from './DayView.types'\nimport classes from './DayView.module.css'\n\ndefineOptions({\n name: 'DayView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<DayViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n slotHeight: undefined,\n businessHours: undefined,\n canDragEvent: undefined,\n startScrollTime: undefined,\n canResizeEvent: undefined,\n headerFormat: undefined,\n withAllDaySlot: undefined,\n allDaySlotHeight: undefined,\n maxAllDayEvents: undefined,\n moreEventsProps: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<DayViewSlots>()\n\nconst emit = defineEmits<DayViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('DayView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'DayView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'dayView',\n})\n\n/**\n * Cached per selector: the slot list re-renders on every step of a drag, and rebuilding the\n * same class list once per slot is what makes that re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst timeSlotsContainer = ref<HTMLElement | null>(null)\n\nconst slotDropTarget = useSlotDropTarget()\n\nconst date = computed(() => toDateString(props.date))\nconst datePart = computed(() => dayjs(date.value).format('YYYY-MM-DD'))\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? dayjs()))\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst showCurrentTimeIndicator = computed(\n () => props.withCurrentTimeIndicator ?? dayjs(date.value).isSame(now.value, 'day'),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n dayjs(date.value).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(date.value).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst dayEvents = computed(() =>\n getDayViewEvents({\n events: expandedEvents.value,\n date: date.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst hourStartIntervals = computed(() => intervals.value.filter((slot) => slot.isHourStart))\n\nconst allDayCounts = computed(() =>\n getVisibleEvents({\n maxEvents: props.maxAllDayEvents!,\n totalEvents: dayEvents.value.allDayEvents.length,\n }),\n)\n\nconst visibleAllDayEvents = computed(() =>\n dayEvents.value.allDayEvents.slice(0, allDayCounts.value.visibleEventsCount),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst eventResize = useEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex) => {\n const startSlot = intervals.value[startIndex]\n const endSlot = intervals.value[endIndex]\n\n if (startSlot && endSlot) {\n emit(\n 'slotDragEnd',\n `${datePart.value} ${startSlot.startTime}` as DateTimeStringValue,\n `${datePart.value} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n },\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = slotDropTarget.dropTarget.value\n return target\n ? {\n date: target.date,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n slotDropTarget.reset()\n emit('eventDragEnd')\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n const target = timeSlotsContainer.value?.querySelector<HTMLElement>(\n `[data-time-slot-index=\"${targetIndex}\"]`,\n )\n\n scrollSlotIntoView(target)\n})\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst emitDrop = (nativeEvent: DragEvent, target: DateTimeStringValue) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventTo(event, target))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, target)\n }\n}\n\nconst emitAllDayDrop = (nativeEvent: DragEvent) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventToAllDay(event, datePart.value))\n } else if (nativeEvent.dataTransfer) {\n emit(\n 'externalEventDrop',\n nativeEvent.dataTransfer,\n `${datePart.value} 00:00:00` as DateTimeStringValue,\n )\n }\n}\n\nconst clickAllDaySlot = (nativeEvent: MouseEvent) =>\n emit('allDaySlotClick', date.value, nativeEvent)\n\nconst clickTimeSlot = (slotIndex: number, nativeEvent: MouseEvent) => {\n const slot = intervals.value[slotIndex]\n const start = dayjs(`${datePart.value} ${slot.startTime}`)\n emit('timeSlotClick', {\n slotStart: start.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n slotEnd: start\n .add(props.intervalMinutes!, 'minute')\n .format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n nativeEvent,\n })\n}\n\nconst dropInput = () => ({\n container: timeSlotsContainer.value,\n date: datePart.value,\n intervals: intervals.value,\n})\n\nconst handleGridDragOver = (nativeEvent: DragEvent) =>\n slotDropTarget.dragOver(nativeEvent, dropInput())\n\nconst handleGridDragLeave = (nativeEvent: DragEvent) =>\n slotDropTarget.dragLeave(nativeEvent, timeSlotsContainer.value)\n\nconst handleGridDrop = (nativeEvent: DragEvent) => {\n const target = slotDropTarget.drop(nativeEvent, dropInput())\n\n if (target) {\n emitDrop(nativeEvent, target.target)\n }\n}\n\nconst handleSlotKeydown = (nativeEvent: KeyboardEvent, index: number) => {\n const nextIndex =\n nativeEvent.key === 'ArrowDown' ? index + 1 : nativeEvent.key === 'ArrowUp' ? index - 1 : -1\n\n if (nextIndex < 0 || nextIndex >= intervals.value.length) {\n return\n }\n\n nativeEvent.preventDefault()\n timeSlotsContainer.value\n ?.querySelector<HTMLButtonElement>(`[data-time-slot-index=\"${nextIndex}\"]`)\n ?.focus()\n}\n\nconst businessHoursMods = computed(() =>\n intervals.value.map((slot) =>\n props.highlightBusinessHours\n ? getBusinessHoursMod({\n time: slot.startTime,\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: true,\n dayOfWeek: dayjs(`${datePart.value} ${slot.startTime}`).day() as DayOfWeek,\n })\n : { 'business-hours': false, 'non-business-hours': false },\n ),\n)\n\nconst backgroundEventStyle = (position: { top: number; height: number }) => ({\n top: `${position.top}%`,\n bottom: `${100 - position.top - position.height}%`,\n minHeight: '1px',\n})\n\nconst regularEventStyle = (event: ScheduleEventData & { position: any }) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const top = resizePosition?.top ?? event.position.top\n const height = resizePosition?.height ?? event.position.height\n\n return {\n position: 'absolute' as const,\n top: `${top}%`,\n bottom: `${100 - top - height}%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n }\n}\n\nconst startEventResize = (\n event: ScheduleEventData & { position: any },\n edge: 'top' | 'bottom',\n pointerEvent: PointerEvent,\n) => {\n if (!timeSlotsContainer.value) {\n return\n }\n\n eventResize.handleResizeStart({\n event,\n edge,\n container: timeSlotsContainer.value,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: datePart.value,\n pointerEvent,\n })\n}\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickResizableEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n clickEvent(event, nativeEvent)\n }\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('dayView') }\"\n :mod=\"[{ static: isStatic, 'slot-dragging': slotDragSelect.isDragging() }, (attrs as any).mod]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"day\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(date, 'day')\"\n :control=\"{\n title: formatDate({ date, locale: props.locale || 'en', format: props.headerFormat! }),\n }\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"emit('dateChange', $event)\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <ScrollArea.Autosize\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('dayViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <Box v-bind=\"getStyles('dayViewInner')\">\n <div v-bind=\"getStyles('dayViewSlotLabels')\">\n <Box\n v-if=\"props.withAllDaySlot\"\n v-bind=\"getStyles('dayViewSlotLabel')\"\n :mod=\"{ 'all-day': true }\"\n >\n {{ getLabel('allDay', props.labels) }}\n </Box>\n <Box\n v-for=\"slot in hourStartIntervals\"\n :key=\"slot.startTime\"\n v-bind=\"staticStyles('dayViewSlotLabel')\"\n >\n {{\n formatDate({\n date: `${datePart} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </Box>\n </div>\n\n <div v-bind=\"getStyles('dayViewSlots')\">\n <div v-if=\"props.withAllDaySlot\" v-bind=\"getStyles('dayViewAllDay')\">\n <div\n v-for=\"event in dayEvents.backgroundAllDayEvents\"\n :key=\"event.id\"\n v-bind=\"staticStyles('dayViewBackgroundEvent')\"\n />\n\n <div v-bind=\"getStyles('dayViewAllDayEvents')\">\n <ScheduleEvent\n v-for=\"event in visibleAllDayEvents\"\n :key=\"event.id\"\n :event=\"event\"\n nowrap\n :mode=\"props.mode\"\n :draggable=\"\n !isStatic &&\n props.withEventsDragAndDrop === true &&\n (props.canDragEvent?.(event) ?? true)\n \"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(event, $event)\"\n />\n\n <MoreEvents\n v-if=\"allDayCounts.hiddenEventsCount > 0\"\n :events=\"dayEvents.allDayEvents\"\n :more-events-count=\"allDayCounts.hiddenEventsCount\"\n :labels=\"props.labels\"\n :mode=\"props.mode\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"clickEvent\"\n />\n </div>\n\n <UnstyledButton\n v-bind=\"getStyles('dayViewSlot')\"\n :mod=\"{ 'all-day': true, static: isStatic }\"\n :tabindex=\"isStatic ? -1 : 0\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${getLabel('allDay', props.labels)}`\"\n @click=\"isStatic ? undefined : clickAllDaySlot($event)\"\n @dragover.prevent\n @drop=\"emitAllDayDrop\"\n />\n </div>\n\n <div\n ref=\"timeSlotsContainer\"\n v-bind=\"getStyles('dayViewTimeSlots')\"\n @dragover=\"withDragHandlers ? handleGridDragOver($event) : undefined\"\n @dragleave=\"withDragHandlers ? handleGridDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleGridDrop($event) : undefined\"\n >\n <div\n v-for=\"event in dayEvents.backgroundTimedEvents\"\n :key=\"event.id\"\n v-bind=\"staticStyles('dayViewBackgroundEvent')\"\n :style=\"backgroundEventStyle(event.position)\"\n />\n\n <ScheduleEvent\n v-for=\"event in dayEvents.regularEvents\"\n :key=\"event.id\"\n :event=\"event\"\n auto-size\n :mode=\"props.mode\"\n :style=\"regularEventStyle(event)\"\n :draggable=\"\n !isStatic &&\n props.withEventsDragAndDrop === true &&\n (props.canDragEvent?.(event) ?? true)\n \"\n :with-resize=\"eventResize.isResizableEvent(event)\"\n :is-resizing=\"eventResize.getResizePosition(event.id) !== null\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickResizableEvent(event, $event)\"\n @resize-start=\"(edge, pointerEvent) => startEventResize(event, edge, pointerEvent)\"\n />\n\n <CurrentTimeIndicator\n v-if=\"showCurrentTimeIndicator\"\n start-offset=\"calc(var(--day-view-slot-labels-width) * -1)\"\n end-offset=\"0rem\"\n top-offset=\"0rem\"\n time-bubble-start-offset=\"calc(var(--day-view-slot-labels-width) * -1 + 30px)\"\n :current-time-format=\"props.slotLabelFormat\"\n :start-time=\"props.startTime\"\n :end-time=\"props.endTime\"\n :interval-minutes=\"props.intervalMinutes\"\n :with-time-bubble=\"props.withCurrentTimeBubble\"\n :with-thumb=\"!props.withCurrentTimeBubble\"\n :get-current-time=\"props.getCurrentTime\"\n :locale=\"props.locale\"\n v-bind=\"stylesApi\"\n />\n\n <UnstyledButton\n v-for=\"(slot, index) in intervals\"\n :key=\"slot.startTime\"\n v-bind=\"staticStyles('dayViewSlot')\"\n :data-time-slot-index=\"index\"\n :data-drag-slot-index=\"withSlotSelect ? index : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? datePart : undefined\"\n :style=\"{ '--slot-size': String(props.intervalMinutes! / 60) }\"\n :mod=\"{\n first: index === 0,\n 'hour-start': slot.isHourStart,\n static: isStatic,\n 'drop-target': slotDropTarget.isTarget(datePart, index),\n 'drag-selected': slotDragSelect.isSlotSelected(index, datePart),\n 'business-hours': businessHoursMods[index]['business-hours'],\n 'non-business-hours': businessHoursMods[index]['non-business-hours'],\n }\"\n :tabindex=\"isStatic ? -1 : index === 0 ? 0 : -1\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${slot.startTime} - ${slot.endTime}`\"\n @keydown=\"isStatic ? undefined : handleSlotKeydown($event, index)\"\n @click=\"clickTimeSlot(index, $event)\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown($event, index, datePart)\n : undefined\n \"\n @dragover.prevent\n />\n </div>\n </div>\n </Box>\n </ScrollArea.Autosize>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 15,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n slotHeight: 64,\n headerFormat: 'MMMM D, YYYY',\n withAllDaySlot: true,\n allDaySlotHeight: 44,\n maxAllDayEvents: 3,\n} as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotHeight, allDaySlotHeight }) => ({\n dayView: {\n '--day-view-radius': resolveScheduleRadius(radius),\n '--day-view-slot-height': cssSize(slotHeight),\n '--day-view-all-day-slot-height': cssSize(allDaySlotHeight),\n },\n }),\n)\n\nexport { defaultProps, varsResolver }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport { getLabel } from '../../labels'\nimport type { DateTimeStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getVisibleEvents,\n toDateString,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n moveEventToAllDay,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { useSlotDropTarget } from '../use-slot-drop-target'\nimport { getDayViewEvents } from './get-day-view-events/get-day-view-events'\nimport type { DayViewEmits, DayViewOwnProps, DayViewSlots } from './DayView.types'\nimport classes from './DayView.module.css'\n\ndefineOptions({\n name: 'DayView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<DayViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n slotHeight: undefined,\n businessHours: undefined,\n canDragEvent: undefined,\n startScrollTime: undefined,\n canResizeEvent: undefined,\n headerFormat: undefined,\n withAllDaySlot: undefined,\n allDaySlotHeight: undefined,\n maxAllDayEvents: undefined,\n moreEventsProps: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<DayViewSlots>()\n\nconst emit = defineEmits<DayViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('DayView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'DayView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'dayView',\n})\n\n/**\n * Cached per selector: the slot list re-renders on every step of a drag, and rebuilding the\n * same class list once per slot is what makes that re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst timeSlotsContainer = ref<HTMLElement | null>(null)\n\nconst slotDropTarget = useSlotDropTarget()\n\nconst date = computed(() => toDateString(props.date))\nconst datePart = computed(() => dayjs(date.value).format('YYYY-MM-DD'))\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? dayjs()))\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst showCurrentTimeIndicator = computed(\n () => props.withCurrentTimeIndicator ?? dayjs(date.value).isSame(now.value, 'day'),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n dayjs(date.value).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(date.value).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst dayEvents = computed(() =>\n getDayViewEvents({\n events: expandedEvents.value,\n date: date.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst hourStartIntervals = computed(() => intervals.value.filter((slot) => slot.isHourStart))\n\nconst allDayCounts = computed(() =>\n getVisibleEvents({\n maxEvents: props.maxAllDayEvents!,\n totalEvents: dayEvents.value.allDayEvents.length,\n }),\n)\n\nconst visibleAllDayEvents = computed(() =>\n dayEvents.value.allDayEvents.slice(0, allDayCounts.value.visibleEventsCount),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst eventResize = useEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex) => {\n const startSlot = intervals.value[startIndex]\n const endSlot = intervals.value[endIndex]\n\n if (startSlot && endSlot) {\n emit(\n 'slotDragEnd',\n `${datePart.value} ${startSlot.startTime}` as DateTimeStringValue,\n `${datePart.value} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n },\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = slotDropTarget.dropTarget.value\n return target\n ? {\n date: target.date,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n slotDropTarget.reset()\n emit('eventDragEnd')\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n const target = timeSlotsContainer.value?.querySelector<HTMLElement>(\n `[data-time-slot-index=\"${targetIndex}\"]`,\n )\n\n scrollSlotIntoView(target)\n})\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst emitDrop = (nativeEvent: DragEvent, target: DateTimeStringValue) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventTo(event, target))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, target)\n }\n}\n\nconst emitAllDayDrop = (nativeEvent: DragEvent) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventToAllDay(event, datePart.value))\n } else if (nativeEvent.dataTransfer) {\n emit(\n 'externalEventDrop',\n nativeEvent.dataTransfer,\n `${datePart.value} 00:00:00` as DateTimeStringValue,\n )\n }\n}\n\nconst clickAllDaySlot = (nativeEvent: MouseEvent) =>\n emit('allDaySlotClick', date.value, nativeEvent)\n\nconst clickTimeSlot = (slotIndex: number, nativeEvent: MouseEvent) => {\n const slot = intervals.value[slotIndex]\n const start = dayjs(`${datePart.value} ${slot.startTime}`)\n emit('timeSlotClick', {\n slotStart: start.format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n slotEnd: start\n .add(props.intervalMinutes!, 'minute')\n .format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n nativeEvent,\n })\n}\n\nconst dropInput = () => ({\n container: timeSlotsContainer.value,\n date: datePart.value,\n intervals: intervals.value,\n})\n\nconst handleGridDragOver = (nativeEvent: DragEvent) =>\n slotDropTarget.dragOver(nativeEvent, dropInput())\n\nconst handleGridDragLeave = (nativeEvent: DragEvent) =>\n slotDropTarget.dragLeave(nativeEvent, timeSlotsContainer.value)\n\nconst handleGridDrop = (nativeEvent: DragEvent) => {\n const target = slotDropTarget.drop(nativeEvent, dropInput())\n\n if (target) {\n emitDrop(nativeEvent, target.target)\n }\n}\n\nconst handleSlotKeydown = (nativeEvent: KeyboardEvent, index: number) => {\n const nextIndex =\n nativeEvent.key === 'ArrowDown' ? index + 1 : nativeEvent.key === 'ArrowUp' ? index - 1 : -1\n\n if (nextIndex < 0 || nextIndex >= intervals.value.length) {\n return\n }\n\n nativeEvent.preventDefault()\n timeSlotsContainer.value\n ?.querySelector<HTMLButtonElement>(`[data-time-slot-index=\"${nextIndex}\"]`)\n ?.focus()\n}\n\nconst businessHoursMods = computed(() =>\n intervals.value.map((slot) =>\n props.highlightBusinessHours\n ? getBusinessHoursMod({\n time: slot.startTime,\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: true,\n dayOfWeek: dayjs(`${datePart.value} ${slot.startTime}`).day() as DayOfWeek,\n })\n : { 'business-hours': false, 'non-business-hours': false },\n ),\n)\n\nconst backgroundEventStyle = (position: { top: number; height: number }) => ({\n top: `${position.top}%`,\n bottom: `${100 - position.top - position.height}%`,\n minHeight: '1px',\n})\n\nconst regularEventStyle = (event: ScheduleEventData & { position: any }) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const top = resizePosition?.top ?? event.position.top\n const height = resizePosition?.height ?? event.position.height\n\n return {\n position: 'absolute' as const,\n top: `${top}%`,\n bottom: `${100 - top - height}%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n }\n}\n\nconst startEventResize = (\n event: ScheduleEventData & { position: any },\n edge: 'top' | 'bottom',\n pointerEvent: PointerEvent,\n) => {\n if (!timeSlotsContainer.value) {\n return\n }\n\n eventResize.handleResizeStart({\n event,\n edge,\n container: timeSlotsContainer.value,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: datePart.value,\n pointerEvent,\n })\n}\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickResizableEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n clickEvent(event, nativeEvent)\n }\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('dayView') }\"\n :mod=\"[{ static: isStatic, 'slot-dragging': slotDragSelect.isDragging() }, (attrs as any).mod]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"day\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(date, 'day')\"\n :control=\"{\n title: formatDate({ date, locale: props.locale || 'en', format: props.headerFormat! }),\n }\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"emit('dateChange', $event)\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <ScrollArea.Autosize\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('dayViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <Box v-bind=\"getStyles('dayViewInner')\">\n <div v-bind=\"getStyles('dayViewSlotLabels')\">\n <Box\n v-if=\"props.withAllDaySlot\"\n v-bind=\"getStyles('dayViewSlotLabel')\"\n :mod=\"{ 'all-day': true }\"\n >\n {{ getLabel('allDay', props.labels) }}\n </Box>\n <Box\n v-for=\"slot in hourStartIntervals\"\n :key=\"slot.startTime\"\n v-bind=\"staticStyles('dayViewSlotLabel')\"\n >\n {{\n formatDate({\n date: `${datePart} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </Box>\n </div>\n\n <div v-bind=\"getStyles('dayViewSlots')\">\n <div v-if=\"props.withAllDaySlot\" v-bind=\"getStyles('dayViewAllDay')\">\n <div\n v-for=\"event in dayEvents.backgroundAllDayEvents\"\n :key=\"event.id\"\n v-bind=\"staticStyles('dayViewBackgroundEvent')\"\n />\n\n <div v-bind=\"getStyles('dayViewAllDayEvents')\">\n <ScheduleEvent\n v-for=\"event in visibleAllDayEvents\"\n :key=\"event.id\"\n :event=\"event\"\n nowrap\n :mode=\"props.mode\"\n :draggable=\"\n !isStatic &&\n props.withEventsDragAndDrop === true &&\n (props.canDragEvent?.(event) ?? true)\n \"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(event, $event)\"\n />\n\n <MoreEvents\n v-if=\"allDayCounts.hiddenEventsCount > 0\"\n :events=\"dayEvents.allDayEvents\"\n :more-events-count=\"allDayCounts.hiddenEventsCount\"\n :labels=\"props.labels\"\n :mode=\"props.mode\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"clickEvent\"\n />\n </div>\n\n <UnstyledButton\n v-bind=\"getStyles('dayViewSlot')\"\n :mod=\"{ 'all-day': true, static: isStatic }\"\n :tabindex=\"isStatic ? -1 : 0\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${getLabel('allDay', props.labels)}`\"\n @click=\"isStatic ? undefined : clickAllDaySlot($event)\"\n @dragover.prevent\n @drop=\"emitAllDayDrop\"\n />\n </div>\n\n <div\n ref=\"timeSlotsContainer\"\n v-bind=\"getStyles('dayViewTimeSlots')\"\n @dragover=\"withDragHandlers ? handleGridDragOver($event) : undefined\"\n @dragleave=\"withDragHandlers ? handleGridDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleGridDrop($event) : undefined\"\n >\n <div\n v-for=\"event in dayEvents.backgroundTimedEvents\"\n :key=\"event.id\"\n v-bind=\"staticStyles('dayViewBackgroundEvent')\"\n :style=\"backgroundEventStyle(event.position)\"\n />\n\n <ScheduleEvent\n v-for=\"event in dayEvents.regularEvents\"\n :key=\"event.id\"\n :event=\"event\"\n auto-size\n :mode=\"props.mode\"\n :style=\"regularEventStyle(event)\"\n :draggable=\"\n !isStatic &&\n props.withEventsDragAndDrop === true &&\n (props.canDragEvent?.(event) ?? true)\n \"\n :with-resize=\"eventResize.isResizableEvent(event)\"\n :is-resizing=\"eventResize.getResizePosition(event.id) !== null\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickResizableEvent(event, $event)\"\n @resize-start=\"(edge, pointerEvent) => startEventResize(event, edge, pointerEvent)\"\n />\n\n <CurrentTimeIndicator\n v-if=\"showCurrentTimeIndicator\"\n start-offset=\"calc(var(--day-view-slot-labels-width) * -1)\"\n end-offset=\"0rem\"\n top-offset=\"0rem\"\n time-bubble-start-offset=\"calc(var(--day-view-slot-labels-width) * -1 + 30px)\"\n :current-time-format=\"props.slotLabelFormat\"\n :start-time=\"props.startTime\"\n :end-time=\"props.endTime\"\n :interval-minutes=\"props.intervalMinutes\"\n :with-time-bubble=\"props.withCurrentTimeBubble\"\n :with-thumb=\"!props.withCurrentTimeBubble\"\n :get-current-time=\"props.getCurrentTime\"\n :locale=\"props.locale\"\n v-bind=\"stylesApi\"\n />\n\n <UnstyledButton\n v-for=\"(slot, index) in intervals\"\n :key=\"slot.startTime\"\n v-bind=\"staticStyles('dayViewSlot')\"\n :data-time-slot-index=\"index\"\n :data-drag-slot-index=\"withSlotSelect ? index : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? datePart : undefined\"\n :style=\"{ '--slot-size': String(props.intervalMinutes! / 60) }\"\n :mod=\"{\n first: index === 0,\n 'hour-start': slot.isHourStart,\n static: isStatic,\n 'drop-target': slotDropTarget.isTarget(datePart, index),\n 'drag-selected': slotDragSelect.isSlotSelected(index, datePart),\n 'business-hours': businessHoursMods[index]['business-hours'],\n 'non-business-hours': businessHoursMods[index]['non-business-hours'],\n }\"\n :tabindex=\"isStatic ? -1 : index === 0 ? 0 : -1\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${slot.startTime} - ${slot.endTime}`\"\n @keydown=\"isStatic ? undefined : handleSlotKeydown($event, index)\"\n @click=\"clickTimeSlot(index, $event)\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown($event, index, datePart)\n : undefined\n \"\n @dragover.prevent\n />\n </div>\n </div>\n </Box>\n </ScrollArea.Autosize>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport DayViewComponent, { varsResolver } from './DayView.vue'\nimport type { DayViewFactory } from './DayView.types'\nimport classes from './DayView.module.css'\n\nexport const DayView = factory<DayViewFactory>(DayViewComponent, { classes, varsResolver })\n\nexport type {\n DayViewCssVariables,\n DayViewEmits,\n DayViewFactory,\n DayViewOwnProps,\n DayViewOwnStylesNames,\n DayViewProps,\n DayViewSlots,\n DayViewStylesNames,\n} from './DayView.types'\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, ScheduleEventData } from '../../types'\nimport { isMultidayEvent, validateEvent } from '../../utils'\n\nexport type GroupedEvents = Record<DateStringValue, ScheduleEventData[]>\n\nfunction groupEventByDate(event: ScheduleEventData, groupedEvents: GroupedEvents) {\n if (isMultidayEvent(event)) {\n const startDate = dayjs(event.start).startOf('day')\n const endDate = dayjs(event.end).startOf('day')\n\n for (\n let date = startDate;\n date.isBefore(endDate) || date.isSame(endDate);\n date = date.add(1, 'day')\n ) {\n const dateKey = date.format('YYYY-MM-DD')\n if (!groupedEvents[dateKey]) {\n groupedEvents[dateKey] = []\n }\n groupedEvents[dateKey].push(event)\n }\n\n return\n }\n\n const eventDate = dayjs(event.start).format('YYYY-MM-DD')\n if (!groupedEvents[eventDate]) {\n groupedEvents[eventDate] = []\n }\n groupedEvents[eventDate].push(event)\n}\n\ninterface GetMobileMonthViewEventsInput {\n date: AnyDateValue\n events: ScheduleEventData[] | undefined\n}\n\nexport function getMobileMonthViewEvents({ date, events }: GetMobileMonthViewEventsInput) {\n const groupedEvents: GroupedEvents = {}\n\n if (events === undefined) {\n return groupedEvents\n }\n\n const ids = new Set<string | number>()\n\n for (const event of events) {\n if (event.display === 'background') {\n continue\n }\n\n if (dayjs(event.start).isSame(dayjs(date), 'month')) {\n groupEventByDate(validateEvent(event), groupedEvents)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(\n `[@mantine/schedule] MobileMonthView: Duplicated event ids found: ${event.id}`,\n )\n }\n }\n }\n\n return groupedEvents\n}\n",".mobileMonthView {\n --mobile-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --week-numbers-offset: 0rem;\n --day-base-color: var(--mantine-color-text);\n --day-dimmed-color: alpha(var(--day-base-color), 0.5);\n\n display: flex;\n flex-direction: column;\n height: 100%;\n\n @mixin where-light {\n --mobile-month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --mobile-month-view-border-color: var(--mantine-color-dark-4);\n }\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 32px;\n }\n}\n\n.mobileMonthViewHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--mantine-spacing-sm);\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n}\n\n.mobileMonthViewHeaderBackButton {\n display: flex;\n align-items: center;\n gap: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n font-size: var(--mobile-month-view-font-size);\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewHeaderLabel {\n user-select: none;\n font-weight: var(--mantine-font-weight-semibold);\n text-transform: capitalize;\n}\n\n.mobileMonthViewCalendar {\n --mobile-month-view-font-size: clamp(6px, 3.5cqw, 22px);\n\n container-type: inline-size;\n padding: var(--mantine-spacing-sm);\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n}\n\n.mobileMonthViewWeekdays {\n display: flex;\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.mobileMonthViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n}\n\n.mobileMonthViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n font-size: var(--mobile-month-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n color: var(--day-dimmed-color);\n padding-block: 4px;\n}\n\n.mobileMonthViewWeek {\n display: flex;\n}\n\n.mobileMonthViewWeekNumber {\n flex: 0 0 calc(var(--week-numbers-offset) - rem(4px));\n margin-inline-end: rem(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n border-radius: var(--mobile-month-view-radius);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewDay {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: 48px;\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n font-size: var(--mobile-month-view-font-size);\n color: var(--day-base-color);\n cursor: pointer;\n user-select: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 0;\n\n &::before {\n width: 32px;\n height: 32px;\n border-radius: 100%;\n content: '';\n position: absolute;\n top: 7px;\n left: calc(50% - 16px);\n z-index: -1;\n pointer-events: none;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:where([data-hidden]) {\n visibility: hidden;\n pointer-events: none;\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: var(--day-dimmed-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-today]:not([data-selected])) {\n @mixin where-light {\n &::before {\n background-color: var(--mantine-color-gray-2);\n }\n }\n\n @mixin where-dark {\n &::before {\n background-color: var(--mantine-color-dark-5);\n }\n }\n }\n\n &:where([data-selected]) {\n color: var(--mantine-primary-color-contrast);\n\n &::before {\n background-color: var(--mantine-primary-color-filled);\n }\n\n @mixin hover {\n &::before {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.mobileMonthViewDayIndicators {\n position: absolute;\n bottom: 2px;\n inset-inline: 0;\n display: flex;\n justify-content: center;\n padding-inline-start: 2px;\n}\n\n.mobileMonthViewDayIndicator {\n width: 5px;\n height: 5px;\n border-radius: 100%;\n margin-inline-start: -1px;\n}\n\n.mobileMonthViewEventsList {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: var(--mantine-spacing-sm);\n}\n\n.mobileMonthViewEventsHeader {\n margin-bottom: var(--mantine-spacing-sm);\n font-weight: var(--mantine-font-weight-semibold);\n text-transform: capitalize;\n}\n\n.mobileMonthViewEvent {\n display: block;\n width: 100%;\n text-align: start;\n cursor: pointer;\n\n &:where(:not(:last-child)) {\n border-bottom: 1px solid var(--mobile-month-view-border-color);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n}\n\n.mobileMonthViewEventBody {\n display: flex;\n gap: var(--mantine-spacing-sm);\n padding: var(--mantine-spacing-xs) 0;\n}\n\n.mobileMonthViewEventColor {\n width: 4px;\n border-radius: 2px;\n flex-shrink: 0;\n}\n\n.mobileMonthViewEventTime {\n margin-top: 2px;\n font-size: var(--mantine-font-size-xs);\n color: var(--mantine-color-dimmed);\n}\n\n.mobileMonthViewNoEvents {\n color: var(--mantine-color-dimmed);\n text-align: center;\n padding-block: var(--mantine-spacing-xl);\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { MobileMonthViewOwnProps } from './MobileMonthView.types'\n\nconst defaultProps = {\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n withHeader: true,\n withWeekDays: true,\n firstDayOfWeek: 1,\n weekdayFormat: 'dd',\n weekendDays: [0, 6],\n consistentWeeks: true,\n highlightToday: true,\n eventsHeaderFormat: 'dddd, MMMM D',\n} satisfies Partial<MobileMonthViewOwnProps>\n\nconst MAX_DAY_INDICATORS = 3\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n mobileMonthView: {\n '--mobile-month-view-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver, MAX_DAY_INDICATORS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport {\n AccordionChevron,\n Box,\n getThemeColor,\n Text,\n UnstyledButton,\n useDirection,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { getLabel } from '../../labels'\nimport type { DateStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport { formatDate, getMonthDays, getWeekNumber, getWeekdaysNames } from '../../utils'\nimport { getExpandedEvents } from '../shared'\nimport { getMobileMonthViewEvents } from './get-mobile-month-view-events'\nimport type { MobileMonthViewEmits, MobileMonthViewSlots } from './MobileMonthView.types'\nimport classes from './MobileMonthView.module.css'\n\ndefineOptions({\n name: 'MobileMonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MobileMonthViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n selectedDate: undefined,\n defaultSelectedDate: undefined,\n withWeekDays: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n getWeekNumberProps: undefined,\n getDayProps: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n eventsHeaderFormat: undefined,\n renderHeader: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MobileMonthViewSlots>()\n\nconst emit = defineEmits<MobileMonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('MobileMonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MobileMonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'mobileMonthView',\n})\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst toDayKey = (value: Date | DateStringValue | null | undefined) =>\n value ? (dayjs(value).format('YYYY-MM-DD') as DateStringValue) : null\n\nconst [selected, setSelected] = useUncontrolled<DateStringValue | null>({\n // `null` is a meaningful selection (nothing selected), so only `undefined` means uncontrolled.\n value: () => (props.selectedDate === undefined ? undefined : toDayKey(props.selectedDate)),\n defaultValue: dayjs(props.defaultSelectedDate ?? undefined).format(\n 'YYYY-MM-DD',\n ) as DateStringValue,\n finalValue: null,\n onChange: (value) => {\n emit('update:selectedDate', value)\n emit('selectedDateChange', value)\n },\n})\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\n\nconst weeks = computed(() =>\n getMonthDays({\n month: month.value,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n weeks.value[0][0],\n dayjs(weeks.value.at(-1)!.at(-1)!).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst eventsByDay = computed(() =>\n getMobileMonthViewEvents({ date: month.value, events: expandedEvents.value }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\nconst selectedEvents = computed(() =>\n selected.value ? eventsByDay.value[selected.value] || [] : [],\n)\n\nconst dayProps = (date: string | Date) => props.getDayProps?.(toDayKey(date)!) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDayKey(weekStart)!) ?? {}\n\nconst isOutside = (date: string | Date) => !dayjs(date).isSame(month.value, 'month')\n\n/** Outside days keep their cell so the grid stays aligned, but render nothing. */\nconst isRendered = (date: string | Date) => !isOutside(date) || Boolean(props.withOutsideDays)\n\nconst dayIndicators = (date: string | Date) =>\n (eventsByDay.value[toDayKey(date)!] || []).slice(0, MAX_DAY_INDICATORS)\n\nconst indicatorStyle = (event: ScheduleEventData) => ({\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n})\n\nconst selectDay = (date: string | Date, nativeEvent: MouseEvent) => {\n const value = toDayKey(date)!\n setSelected(value)\n emit('dayClick', value, nativeEvent)\n}\n\nconst isAllDayEvent = (event: ScheduleEventData) =>\n dayjs(event.start).format('HH:mm') === '00:00' && dayjs(event.end).format('HH:mm') === '00:00'\n\nconst eventTimeLabel = (event: ScheduleEventData) =>\n isAllDayEvent(event)\n ? getLabel('allDay', props.labels)\n : `${dayjs(event.start).format('HH:mm')} – ${dayjs(event.end).format('HH:mm')}`\n\n/**\n * Default header as a functional component, so the template and the `renderHeader` payload\n * share one definition instead of building the tree twice.\n */\nconst DefaultHeader = () => [\n h(\n UnstyledButton,\n {\n ...getStyles('mobileMonthViewHeaderBackButton'),\n mod: { static: isStatic.value },\n tabindex: isStatic.value ? -1 : 0,\n onClick: isStatic.value ? undefined : () => emit('yearClick'),\n },\n () => [\n h(AccordionChevron, {\n size: 20,\n style: { transform: `rotate(${dir.value === 'rtl' ? -90 : 90}deg)` },\n }),\n month.value.format('YYYY'),\n ],\n ),\n h(Text, getStyles('mobileMonthViewHeaderLabel'), () =>\n formatDate({ date: month.value, locale: props.locale || 'en', format: 'MMMM YYYY' }),\n ),\n]\n\nconst headerPayload = computed(() => ({\n mode: props.mode!,\n date: props.date,\n defaultHeader: h(DefaultHeader) as VNodeChild,\n}))\n\nconst customHeader = computed<VNodeChild>(() => {\n if (!slots.header && !props.renderHeader) {\n return null\n }\n\n return slots.header?.(headerPayload.value) ?? props.renderHeader?.(headerPayload.value) ?? null\n})\n\nconst renderHeaderContent = () => customHeader.value ?? h(DefaultHeader)\n\nconst listEventProps = (event: ScheduleEventData) => ({\n type: 'button' as const,\n ...getStyles('mobileMonthViewEvent'),\n tabindex: isStatic.value ? -1 : 0,\n onClick: isStatic.value\n ? undefined\n : (nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n})\n\nconst EventBody = (event: ScheduleEventData) => () =>\n h(Box, getStyles('mobileMonthViewEventBody'), () => [\n h(\n 'div',\n getStyles('mobileMonthViewEventColor', {\n style: { backgroundColor: getThemeColor(event.color, theme.value) },\n }),\n ),\n h('div', [\n h(Text, getStyles('mobileMonthViewEventTitle'), () => event.title),\n h(Text, getStyles('mobileMonthViewEventTime'), () => eventTimeLabel(event)),\n ]),\n ])\n\nconst renderListEvent = (event: ScheduleEventData) => () => {\n const children = h(EventBody(event))\n const rootProps = listEventProps(event)\n const payload = { ...rootProps, children }\n\n return (\n slots.event?.({ ...payload, event }) ??\n props.renderEvent?.(event, payload) ??\n h(UnstyledButton, rootProps, () => children)\n )\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('mobileMonthView') }\"\n :mod=\"[{ 'with-week-numbers': props.withWeekNumbers }, (attrs as any).mod]\"\n >\n <div v-if=\"props.withHeader\" v-bind=\"getStyles('mobileMonthViewHeader')\">\n <component :is=\"renderHeaderContent\" />\n </div>\n\n <Box\n v-bind=\"getStyles('mobileMonthViewCalendar')\"\n :mod=\"{ 'with-weekdays': props.withWeekDays }\"\n >\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('mobileMonthViewWeekdays')\">\n <span v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('mobileMonthViewWeekdaysCorner')\" />\n <span\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"getStyles('mobileMonthViewWeekday')\"\n >\n {{ weekday }}\n </span>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"getStyles('mobileMonthViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('mobileMonthViewWeekNumber', {\n className: weekNumberProps(week[0]).class,\n }),\n }\"\n :mod=\"{ static: isStatic }\"\n :tabindex=\"isStatic ? -1 : 0\"\n @click=\"emit('weekNumberClick', toDayKey(week[0])!, $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <UnstyledButton\n v-for=\"date in week\"\n :key=\"toDayKey(date)!\"\n v-bind=\"{\n ...dayProps(date),\n ...getStyles('mobileMonthViewDay', { className: dayProps(date).class }),\n }\"\n :mod=\"{\n outside: isOutside(date),\n weekend: props.weekendDays!.includes(dayjs(date).day() as DayOfWeek),\n today: props.highlightToday && dayjs(date).isSame(dayjs(), 'day'),\n selected: selected === toDayKey(date),\n static: isStatic,\n hidden: !isRendered(date),\n }\"\n :tabindex=\"isStatic || !isRendered(date) ? -1 : 0\"\n :aria-label=\"formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\"\n :aria-selected=\"selected === toDayKey(date) || undefined\"\n @click=\"isStatic || !isRendered(date) ? undefined : selectDay(date, $event)\"\n >\n <template v-if=\"isRendered(date)\">\n {{ dayjs(date).date() }}\n <span\n v-if=\"dayIndicators(date).length\"\n v-bind=\"getStyles('mobileMonthViewDayIndicators')\"\n >\n <span\n v-for=\"event in dayIndicators(date)\"\n :key=\"event.id\"\n v-bind=\"getStyles('mobileMonthViewDayIndicator')\"\n :style=\"indicatorStyle(event)\"\n />\n </span>\n </template>\n </UnstyledButton>\n </div>\n </Box>\n\n <Box v-bind=\"getStyles('mobileMonthViewEventsList')\">\n <Text v-bind=\"getStyles('mobileMonthViewEventsHeader')\">\n {{\n selected\n ? formatDate({\n date: selected,\n locale: props.locale || 'en',\n format: props.eventsHeaderFormat!,\n })\n : ''\n }}\n </Text>\n\n <template v-if=\"selectedEvents.length\">\n <component :is=\"renderListEvent(event)\" v-for=\"event in selectedEvents\" :key=\"event.id\" />\n </template>\n <Text v-else v-bind=\"getStyles('mobileMonthViewNoEvents')\">\n {{ getLabel('noEvents', props.labels) }}\n </Text>\n </Box>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { MobileMonthViewOwnProps } from './MobileMonthView.types'\n\nconst defaultProps = {\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n withHeader: true,\n withWeekDays: true,\n firstDayOfWeek: 1,\n weekdayFormat: 'dd',\n weekendDays: [0, 6],\n consistentWeeks: true,\n highlightToday: true,\n eventsHeaderFormat: 'dddd, MMMM D',\n} satisfies Partial<MobileMonthViewOwnProps>\n\nconst MAX_DAY_INDICATORS = 3\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n mobileMonthView: {\n '--mobile-month-view-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver, MAX_DAY_INDICATORS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, h, useAttrs, useSlots, type VNodeChild } from 'vue'\nimport {\n AccordionChevron,\n Box,\n getThemeColor,\n Text,\n UnstyledButton,\n useDirection,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { getLabel } from '../../labels'\nimport type { DateStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport { formatDate, getMonthDays, getWeekNumber, getWeekdaysNames } from '../../utils'\nimport { getExpandedEvents } from '../shared'\nimport { getMobileMonthViewEvents } from './get-mobile-month-view-events'\nimport type { MobileMonthViewEmits, MobileMonthViewSlots } from './MobileMonthView.types'\nimport classes from './MobileMonthView.module.css'\n\ndefineOptions({\n name: 'MobileMonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MobileMonthViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n selectedDate: undefined,\n defaultSelectedDate: undefined,\n withWeekDays: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n getWeekNumberProps: undefined,\n getDayProps: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n eventsHeaderFormat: undefined,\n renderHeader: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MobileMonthViewSlots>()\n\nconst emit = defineEmits<MobileMonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst { dir } = useDirection()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('MobileMonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MobileMonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'mobileMonthView',\n})\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst toDayKey = (value: Date | DateStringValue | null | undefined) =>\n value ? (dayjs(value).format('YYYY-MM-DD') as DateStringValue) : null\n\nconst [selected, setSelected] = useUncontrolled<DateStringValue | null>({\n // `null` is a meaningful selection (nothing selected), so only `undefined` means uncontrolled.\n value: () => (props.selectedDate === undefined ? undefined : toDayKey(props.selectedDate)),\n defaultValue: dayjs(props.defaultSelectedDate ?? undefined).format(\n 'YYYY-MM-DD',\n ) as DateStringValue,\n finalValue: null,\n onChange: (value) => {\n emit('update:selectedDate', value)\n emit('selectedDateChange', value)\n },\n})\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\n\nconst weeks = computed(() =>\n getMonthDays({\n month: month.value,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n weeks.value[0][0],\n dayjs(weeks.value.at(-1)!.at(-1)!).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst eventsByDay = computed(() =>\n getMobileMonthViewEvents({ date: month.value, events: expandedEvents.value }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\nconst selectedEvents = computed(() =>\n selected.value ? eventsByDay.value[selected.value] || [] : [],\n)\n\nconst dayProps = (date: string | Date) => props.getDayProps?.(toDayKey(date)!) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDayKey(weekStart)!) ?? {}\n\nconst isOutside = (date: string | Date) => !dayjs(date).isSame(month.value, 'month')\n\n/** Outside days keep their cell so the grid stays aligned, but render nothing. */\nconst isRendered = (date: string | Date) => !isOutside(date) || Boolean(props.withOutsideDays)\n\nconst dayIndicators = (date: string | Date) =>\n (eventsByDay.value[toDayKey(date)!] || []).slice(0, MAX_DAY_INDICATORS)\n\nconst indicatorStyle = (event: ScheduleEventData) => ({\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n})\n\nconst selectDay = (date: string | Date, nativeEvent: MouseEvent) => {\n const value = toDayKey(date)!\n setSelected(value)\n emit('dayClick', value, nativeEvent)\n}\n\nconst isAllDayEvent = (event: ScheduleEventData) =>\n dayjs(event.start).format('HH:mm') === '00:00' && dayjs(event.end).format('HH:mm') === '00:00'\n\nconst eventTimeLabel = (event: ScheduleEventData) =>\n isAllDayEvent(event)\n ? getLabel('allDay', props.labels)\n : `${dayjs(event.start).format('HH:mm')} – ${dayjs(event.end).format('HH:mm')}`\n\n/**\n * Default header as a functional component, so the template and the `renderHeader` payload\n * share one definition instead of building the tree twice.\n */\nconst DefaultHeader = () => [\n h(\n UnstyledButton,\n {\n ...getStyles('mobileMonthViewHeaderBackButton'),\n mod: { static: isStatic.value },\n tabindex: isStatic.value ? -1 : 0,\n onClick: isStatic.value ? undefined : () => emit('yearClick'),\n },\n () => [\n h(AccordionChevron, {\n size: 20,\n style: { transform: `rotate(${dir.value === 'rtl' ? -90 : 90}deg)` },\n }),\n month.value.format('YYYY'),\n ],\n ),\n h(Text, getStyles('mobileMonthViewHeaderLabel'), () =>\n formatDate({ date: month.value, locale: props.locale || 'en', format: 'MMMM YYYY' }),\n ),\n]\n\nconst headerPayload = computed(() => ({\n mode: props.mode!,\n date: props.date,\n defaultHeader: h(DefaultHeader) as VNodeChild,\n}))\n\nconst customHeader = computed<VNodeChild>(() => {\n if (!slots.header && !props.renderHeader) {\n return null\n }\n\n return slots.header?.(headerPayload.value) ?? props.renderHeader?.(headerPayload.value) ?? null\n})\n\nconst renderHeaderContent = () => customHeader.value ?? h(DefaultHeader)\n\nconst listEventProps = (event: ScheduleEventData) => ({\n type: 'button' as const,\n ...getStyles('mobileMonthViewEvent'),\n tabindex: isStatic.value ? -1 : 0,\n onClick: isStatic.value\n ? undefined\n : (nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n})\n\nconst EventBody = (event: ScheduleEventData) => () =>\n h(Box, getStyles('mobileMonthViewEventBody'), () => [\n h(\n 'div',\n getStyles('mobileMonthViewEventColor', {\n style: { backgroundColor: getThemeColor(event.color, theme.value) },\n }),\n ),\n h('div', [\n h(Text, getStyles('mobileMonthViewEventTitle'), () => event.title),\n h(Text, getStyles('mobileMonthViewEventTime'), () => eventTimeLabel(event)),\n ]),\n ])\n\nconst renderListEvent = (event: ScheduleEventData) => () => {\n const children = h(EventBody(event))\n const rootProps = listEventProps(event)\n const payload = { ...rootProps, children }\n\n return (\n slots.event?.({ ...payload, event }) ??\n props.renderEvent?.(event, payload) ??\n h(UnstyledButton, rootProps, () => children)\n )\n}\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('mobileMonthView') }\"\n :mod=\"[{ 'with-week-numbers': props.withWeekNumbers }, (attrs as any).mod]\"\n >\n <div v-if=\"props.withHeader\" v-bind=\"getStyles('mobileMonthViewHeader')\">\n <component :is=\"renderHeaderContent\" />\n </div>\n\n <Box\n v-bind=\"getStyles('mobileMonthViewCalendar')\"\n :mod=\"{ 'with-weekdays': props.withWeekDays }\"\n >\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('mobileMonthViewWeekdays')\">\n <span v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('mobileMonthViewWeekdaysCorner')\" />\n <span\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"getStyles('mobileMonthViewWeekday')\"\n >\n {{ weekday }}\n </span>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"getStyles('mobileMonthViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('mobileMonthViewWeekNumber', {\n className: weekNumberProps(week[0]).class,\n }),\n }\"\n :mod=\"{ static: isStatic }\"\n :tabindex=\"isStatic ? -1 : 0\"\n @click=\"emit('weekNumberClick', toDayKey(week[0])!, $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <UnstyledButton\n v-for=\"date in week\"\n :key=\"toDayKey(date)!\"\n v-bind=\"{\n ...dayProps(date),\n ...getStyles('mobileMonthViewDay', { className: dayProps(date).class }),\n }\"\n :mod=\"{\n outside: isOutside(date),\n weekend: props.weekendDays!.includes(dayjs(date).day() as DayOfWeek),\n today: props.highlightToday && dayjs(date).isSame(dayjs(), 'day'),\n selected: selected === toDayKey(date),\n static: isStatic,\n hidden: !isRendered(date),\n }\"\n :tabindex=\"isStatic || !isRendered(date) ? -1 : 0\"\n :aria-label=\"formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\"\n :aria-selected=\"selected === toDayKey(date) || undefined\"\n @click=\"isStatic || !isRendered(date) ? undefined : selectDay(date, $event)\"\n >\n <template v-if=\"isRendered(date)\">\n {{ dayjs(date).date() }}\n <span\n v-if=\"dayIndicators(date).length\"\n v-bind=\"getStyles('mobileMonthViewDayIndicators')\"\n >\n <span\n v-for=\"event in dayIndicators(date)\"\n :key=\"event.id\"\n v-bind=\"getStyles('mobileMonthViewDayIndicator')\"\n :style=\"indicatorStyle(event)\"\n />\n </span>\n </template>\n </UnstyledButton>\n </div>\n </Box>\n\n <Box v-bind=\"getStyles('mobileMonthViewEventsList')\">\n <Text v-bind=\"getStyles('mobileMonthViewEventsHeader')\">\n {{\n selected\n ? formatDate({\n date: selected,\n locale: props.locale || 'en',\n format: props.eventsHeaderFormat!,\n })\n : ''\n }}\n </Text>\n\n <template v-if=\"selectedEvents.length\">\n <component :is=\"renderListEvent(event)\" v-for=\"event in selectedEvents\" :key=\"event.id\" />\n </template>\n <Text v-else v-bind=\"getStyles('mobileMonthViewNoEvents')\">\n {{ getLabel('noEvents', props.labels) }}\n </Text>\n </Box>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport MobileMonthViewComponent, { varsResolver } from './MobileMonthView.vue'\nimport type { MobileMonthViewFactory } from './MobileMonthView.types'\nimport classes from './MobileMonthView.module.css'\n\nexport const MobileMonthView = factory<MobileMonthViewFactory>(MobileMonthViewComponent, {\n classes,\n varsResolver,\n})\n\nexport type {\n MobileMonthViewCssVariables,\n MobileMonthViewEmits,\n MobileMonthViewFactory,\n MobileMonthViewHeaderPayload,\n MobileMonthViewOwnProps,\n MobileMonthViewProps,\n MobileMonthViewSlots,\n MobileMonthViewStylesNames,\n} from './MobileMonthView.types'\n","export function handleGridKeydown({\n event,\n index,\n columns,\n total,\n getControl,\n}: {\n event: KeyboardEvent\n index: number\n columns: number\n total: number\n getControl: (index: number) => HTMLButtonElement | null\n}): void {\n const step =\n event.key === 'ArrowRight'\n ? 1\n : event.key === 'ArrowLeft'\n ? -1\n : event.key === 'ArrowDown'\n ? columns\n : event.key === 'ArrowUp'\n ? -columns\n : 0\n\n if (step === 0) return\n event.preventDefault()\n\n for (let next = index + step; next >= 0 && next < total; next += step) {\n const control = getControl(next)\n if (control && !control.disabled && !control.hasAttribute('data-hidden')) {\n control.focus()\n return\n }\n }\n}\n","import dayjs from 'dayjs'\nimport { MonthPositionedEventData } from '../../../types'\n\ninterface AddEventToDayGroupsInput {\n positionedEvent: MonthPositionedEventData\n eventStart: dayjs.Dayjs\n eventEnd: dayjs.Dayjs\n groupedByDay: { [date: string]: MonthPositionedEventData[] }\n eventsAddedToDay: Set<string>\n weekIdx: number\n}\n\nexport function addEventToDayGroups({\n positionedEvent,\n eventStart,\n eventEnd,\n groupedByDay,\n eventsAddedToDay,\n weekIdx,\n}: AddEventToDayGroupsInput): void {\n if (weekIdx === 0 || !eventsAddedToDay.has(positionedEvent.id.toString())) {\n let dayDate = eventStart\n while (dayDate.isBefore(eventEnd) || dayDate.isSame(eventEnd, 'day')) {\n const dayDateStr = dayDate.format('YYYY-MM-DD 00:00:00')\n if (groupedByDay[dayDateStr]) {\n groupedByDay[dayDateStr].push(positionedEvent)\n }\n dayDate = dayDate.add(1, 'day')\n }\n eventsAddedToDay.add(positionedEvent.id.toString())\n }\n}\n","import dayjs from 'dayjs'\n\nexport type HangingStatus = 'none' | 'start' | 'end' | 'both'\n\ninterface CalculateEventPositionInput {\n eventStart: dayjs.Dayjs\n eventEnd: dayjs.Dayjs\n weekStart: dayjs.Dayjs\n weekEnd: dayjs.Dayjs\n isMultiday: boolean\n}\n\ninterface EventPositionInWeek {\n startDayIndex: number\n daysSpanned: number\n startOffset: number\n width: number\n hanging: HangingStatus\n}\n\nexport function calculateEventPositionInWeek({\n eventStart,\n eventEnd,\n weekStart,\n weekEnd,\n isMultiday,\n}: CalculateEventPositionInput): EventPositionInWeek {\n let displayStart = eventStart\n let displayEnd = eventEnd\n\n const hangingStart = eventStart.isBefore(weekStart)\n const hangingEnd = eventEnd.isAfter(weekEnd)\n const hanging: HangingStatus =\n hangingStart && hangingEnd ? 'both' : hangingStart ? 'start' : hangingEnd ? 'end' : 'none'\n\n if (displayStart.isBefore(weekStart)) {\n displayStart = weekStart\n }\n if (displayEnd.isAfter(weekEnd)) {\n displayEnd = weekEnd\n }\n\n const startDayIndex = displayStart.diff(weekStart, 'day')\n const endDayIndex = displayEnd.diff(weekStart, 'day')\n const daysSpanned = Math.max(1, endDayIndex - startDayIndex + (isMultiday ? 1 : 0))\n\n const startOffset = (startDayIndex / 7) * 100\n const width = (daysSpanned / 7) * 100\n\n return {\n startDayIndex,\n daysSpanned,\n startOffset,\n width,\n hanging,\n }\n}\n","import dayjs from 'dayjs'\nimport { MonthPositionedEventData } from '../../../types'\n\ninterface FindAvailableRowInput {\n existingEvents: MonthPositionedEventData[]\n startDayIndex: number\n daysSpanned: number\n weekStart: dayjs.Dayjs\n}\n\nexport function findAvailableRow({\n existingEvents,\n startDayIndex,\n daysSpanned,\n weekStart,\n}: FindAvailableRowInput): number {\n let row = 0\n\n for (const existing of existingEvents) {\n const existingStart = dayjs(existing.start).startOf('day')\n const existingDisplayStart =\n existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, 'day')\n ? weekStart\n : existingStart\n const existingDayIndex = existingDisplayStart.diff(weekStart, 'day')\n const existingWidth = existing.position?.width || 0\n const existingDaysSpanned = (existingWidth / 100) * 7\n\n if (\n existingDayIndex + existingDaysSpanned > startDayIndex &&\n existingDayIndex < startDayIndex + daysSpanned\n ) {\n row = Math.max(row, (existing.position?.row || 0) + 1)\n }\n }\n\n return row\n}\n","import dayjs from 'dayjs'\nimport { DateStringValue, DayOfWeek, MonthPositionedEventData } from '../../../types'\nimport { getStartOfWeek } from '../../../utils'\n\ninterface GetWeeksInRangeInput {\n rangeStart: dayjs.Dayjs\n rangeEnd: dayjs.Dayjs\n firstDayOfWeek: DayOfWeek\n}\n\ninterface GetWeeksInRangeOutput {\n weeks: DateStringValue[][]\n groupedByDay: Record<string, MonthPositionedEventData[]>\n}\n\nexport function getWeeksInRange({\n rangeStart,\n rangeEnd,\n firstDayOfWeek,\n}: GetWeeksInRangeInput): GetWeeksInRangeOutput {\n const weeks: DateStringValue[][] = []\n const groupedByDay: Record<string, MonthPositionedEventData[]> = {}\n\n const startOfFirstWeekStr = getStartOfWeek({\n date: rangeStart.format('YYYY-MM-DD'),\n firstDayOfWeek,\n })\n\n let currentDate = dayjs(startOfFirstWeekStr)\n\n while (currentDate.isBefore(rangeEnd) || currentDate.isSame(rangeEnd, 'day')) {\n const week: DateStringValue[] = []\n for (let i = 0; i < 7; i++) {\n const dateStr = currentDate.format('YYYY-MM-DD 00:00:00')\n week.push(dateStr)\n if (!groupedByDay[dateStr]) {\n groupedByDay[dateStr] = []\n }\n currentDate = currentDate.add(1, 'day')\n }\n weeks.push(week)\n }\n\n return { weeks, groupedByDay }\n}\n","import dayjs from 'dayjs'\nimport {\n AnyDateValue,\n DateStringValue,\n DayOfWeek,\n MonthPositionedEventData,\n ScheduleEventData,\n} from '../../../types'\nimport { addEventToDayGroups } from './add-event-to-day-groups'\nimport { calculateEventPositionInWeek } from './calculate-event-position-in-week'\nimport { findAvailableRow } from './find-available-row'\nimport { getWeeksInRange } from './get-weeks-in-range'\n\ninterface GetMonthPositionedEventsInput {\n /** Date (month start) at which events are positioned */\n date: AnyDateValue\n\n /** List of all events that belong to the given month, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** Range of dates for which events should be displayed (includes outside days if withOutsideDays is true) */\n range?: {\n start: DateStringValue\n end: DateStringValue\n }\n}\n\n/** Events grouped by week index and by day */\nexport interface GroupedMonthEvents {\n /** Events grouped by week index (index within month) */\n groupedByWeek: {\n [weekIndex: string]: MonthPositionedEventData[]\n }\n\n /** Events grouped by day (YYYY-MM-DD format) */\n groupedByDay: {\n [date: string]: MonthPositionedEventData[]\n }\n\n /** Background events grouped by week index */\n backgroundByWeek: {\n [weekIndex: string]: MonthPositionedEventData[]\n }\n}\n\nexport function getMonthPositionedEvents({\n date,\n events,\n firstDayOfWeek = 1,\n range,\n}: GetMonthPositionedEventsInput): GroupedMonthEvents {\n const groupedByWeek: GroupedMonthEvents['groupedByWeek'] = {}\n const backgroundByWeek: GroupedMonthEvents['backgroundByWeek'] = {}\n const eventsAddedToDay = new Set<string>()\n\n const rangeStart = range ? dayjs(range.start) : dayjs(date).startOf('month')\n const rangeEnd = range ? dayjs(range.end) : dayjs(date).startOf('month').endOf('month')\n\n const { weeks, groupedByDay } = getWeeksInRange({\n rangeStart,\n rangeEnd,\n firstDayOfWeek,\n })\n\n for (let i = 0; i < weeks.length; i++) {\n groupedByWeek[i.toString()] = []\n backgroundByWeek[i.toString()] = []\n }\n\n for (const event of events) {\n const eventStart = dayjs(event.start).startOf('day')\n const rawEnd = dayjs(event.end)\n const endAtMidnight = rawEnd.hour() === 0 && rawEnd.minute() === 0 && rawEnd.second() === 0\n const eventEnd = endAtMidnight\n ? rawEnd.startOf('day').subtract(1, 'day')\n : rawEnd.startOf('day')\n const isMultiday = eventEnd.isAfter(eventStart)\n\n for (let weekIdx = 0; weekIdx < weeks.length; weekIdx++) {\n const week = weeks[weekIdx]\n const weekStart = dayjs(week[0]).startOf('day')\n const weekEnd = dayjs(week[6]).endOf('day')\n\n if (\n (eventStart.isBefore(weekEnd) || eventStart.isSame(weekEnd, 'day')) &&\n (eventEnd.isAfter(weekStart) || eventEnd.isSame(weekStart, 'day'))\n ) {\n const { startDayIndex, daysSpanned, startOffset, width, hanging } =\n calculateEventPositionInWeek({\n eventStart,\n eventEnd,\n weekStart,\n weekEnd,\n isMultiday,\n })\n\n if (event.display === 'background') {\n backgroundByWeek[weekIdx.toString()].push({\n ...event,\n position: {\n startOffset,\n width,\n weekIndex: weekIdx,\n row: 0,\n hanging,\n },\n })\n continue\n }\n\n const row = findAvailableRow({\n existingEvents: groupedByWeek[weekIdx.toString()],\n startDayIndex,\n daysSpanned,\n weekStart,\n })\n\n const positionedEvent: MonthPositionedEventData = {\n ...event,\n position: {\n startOffset,\n width,\n weekIndex: weekIdx,\n row,\n hanging,\n },\n }\n\n groupedByWeek[weekIdx.toString()].push(positionedEvent)\n\n addEventToDayGroups({\n positionedEvent,\n eventStart,\n eventEnd,\n groupedByDay,\n eventsAddedToDay,\n weekIdx,\n })\n }\n }\n }\n\n return {\n groupedByWeek,\n groupedByDay,\n backgroundByWeek,\n }\n}\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../../types'\nimport { getMonthRange, validateEvent } from '../../../utils'\nimport { getMonthPositionedEvents, GroupedMonthEvents } from './get-month-positioned-events'\n\ninterface UseMonthViewEventsInput {\n /** Date (month start) at which events are positioned */\n date: AnyDateValue\n\n /** List of all events that belong to the given month, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[] | undefined\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** If true, events for outside days are included */\n withOutsideDays?: boolean\n\n /** If true, month will show events for consistent number of weeks (6) */\n consistentWeeks?: boolean\n}\n\nexport function getMonthViewEvents({\n date,\n events,\n firstDayOfWeek = 1,\n withOutsideDays,\n consistentWeeks,\n}: UseMonthViewEventsInput): GroupedMonthEvents {\n if (events === undefined) {\n return { groupedByDay: {}, groupedByWeek: {}, backgroundByWeek: {} }\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n\n const range = getMonthRange({ month: date, withOutsideDays, consistentWeeks, firstDayOfWeek })\n\n for (const event of events) {\n if (\n dayjs(event.end).isAfter(range.start, 'day') ||\n dayjs(event.start).isBefore(range.end, 'day')\n ) {\n filteredEvents.push(validateEvent(event))\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] MonthView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return getMonthPositionedEvents({\n date,\n events: filteredEvents,\n firstDayOfWeek,\n range,\n })\n}\n","import { DateStringValue, MonthEventPositionData, MonthPositionedEventData } from '../../types'\n\nconst DAYS_IN_WEEK = 7\nconst DAY_WIDTH = 100 / DAYS_IN_WEEK\n\ninterface GetRenderableMonthEventSegmentsInput {\n events: MonthPositionedEventData[]\n groupedByDay: Record<string, MonthPositionedEventData[]>\n maxEventsPerDay: number\n week: DateStringValue[]\n}\n\ninterface EventDayRange {\n startDayIndex: number\n endDayIndex: number\n}\n\ninterface SegmentRange extends EventDayRange {\n row: number\n}\n\nexport interface RenderableMonthEventSegment {\n event: MonthPositionedEventData\n position: MonthEventPositionData\n clipStart: boolean\n clipEnd: boolean\n key: string\n}\n\nfunction getEventDayRange(event: MonthPositionedEventData): EventDayRange {\n const startDayIndex = Math.max(0, Math.round(event.position.startOffset / DAY_WIDTH))\n const daysSpanned = Math.max(1, Math.round(event.position.width / DAY_WIDTH))\n\n return {\n startDayIndex,\n endDayIndex: Math.min(DAYS_IN_WEEK - 1, startDayIndex + daysSpanned - 1),\n }\n}\n\nfunction getFirstAvailableRow(usedRows: Set<number>, maxEventsPerDay: number): number | null {\n for (let row = 0; row < maxEventsPerDay; row += 1) {\n if (!usedRows.has(row)) {\n return row\n }\n }\n\n return null\n}\n\nfunction getSegmentHanging(\n originalHanging: MonthEventPositionData['hanging'],\n touchesStart: boolean,\n touchesEnd: boolean,\n): MonthEventPositionData['hanging'] {\n const hangsFromStart = touchesStart && (originalHanging === 'start' || originalHanging === 'both')\n const hangsFromEnd = touchesEnd && (originalHanging === 'end' || originalHanging === 'both')\n\n if (hangsFromStart && hangsFromEnd) {\n return 'both'\n }\n\n if (hangsFromStart) {\n return 'start'\n }\n\n if (hangsFromEnd) {\n return 'end'\n }\n\n return 'none'\n}\n\nfunction getSegmentPosition(\n event: MonthPositionedEventData,\n segment: SegmentRange,\n eventRange: EventDayRange,\n): MonthEventPositionData {\n const touchesStart = segment.startDayIndex === eventRange.startDayIndex\n const touchesEnd = segment.endDayIndex === eventRange.endDayIndex\n\n return {\n ...event.position,\n startOffset: (segment.startDayIndex / DAYS_IN_WEEK) * 100,\n width: ((segment.endDayIndex - segment.startDayIndex + 1) / DAYS_IN_WEEK) * 100,\n row: segment.row,\n hanging: getSegmentHanging(event.position.hanging, touchesStart, touchesEnd),\n }\n}\n\nfunction getEventKey(event: MonthPositionedEventData): string | number {\n return event.id\n}\n\nexport function getRenderableMonthEventSegments({\n events,\n groupedByDay,\n maxEventsPerDay,\n week,\n}: GetRenderableMonthEventSegmentsInput): RenderableMonthEventSegment[] {\n const eventIndexes = new Map<MonthPositionedEventData, number>()\n const eventRanges = new Map<MonthPositionedEventData, EventDayRange>()\n const renderRows = new Map<MonthPositionedEventData, Map<number, number>>()\n\n events.forEach((event, index) => {\n eventIndexes.set(event, index)\n eventRanges.set(event, getEventDayRange(event))\n })\n\n const setRenderRow = (event: MonthPositionedEventData, dayIndex: number, row: number) => {\n if (!renderRows.has(event)) {\n renderRows.set(event, new Map())\n }\n\n renderRows.get(event)!.set(dayIndex, row)\n }\n\n for (let dayIndex = 0; dayIndex < week.length; dayIndex += 1) {\n const dayEvents = groupedByDay[week[dayIndex]] || []\n const dayEventIds = new Set(dayEvents.map((event) => getEventKey(event)))\n const dayWeekEvents = events.filter((event) => {\n const range = eventRanges.get(event)!\n return (\n dayEventIds.has(getEventKey(event)) &&\n dayIndex >= range.startDayIndex &&\n dayIndex <= range.endDayIndex\n )\n })\n\n if (dayEvents.length > maxEventsPerDay) {\n dayWeekEvents.forEach((event) => {\n if (event.position.row < maxEventsPerDay) {\n setRenderRow(event, dayIndex, event.position.row)\n }\n })\n\n continue\n }\n\n const usedRows = new Set<number>()\n const sortedDayEvents = [...dayWeekEvents].sort((a, b) => {\n const rowDiff = a.position.row - b.position.row\n\n if (rowDiff !== 0) {\n return rowDiff\n }\n\n return eventIndexes.get(a)! - eventIndexes.get(b)!\n })\n\n sortedDayEvents.forEach((event) => {\n let row = event.position.row\n\n if (row >= maxEventsPerDay || usedRows.has(row)) {\n const availableRow = getFirstAvailableRow(usedRows, maxEventsPerDay)\n\n if (availableRow === null) {\n return\n }\n\n row = availableRow\n }\n\n usedRows.add(row)\n setRenderRow(event, dayIndex, row)\n })\n }\n\n return events.flatMap((event) => {\n const eventRange = eventRanges.get(event)!\n const eventRenderRows = renderRows.get(event)\n const segments: RenderableMonthEventSegment[] = []\n let currentSegment: SegmentRange | null = null\n\n const addSegment = (segment: SegmentRange) => {\n const position = getSegmentPosition(event, segment, eventRange)\n\n segments.push({\n event,\n position,\n clipStart: segment.startDayIndex > eventRange.startDayIndex,\n clipEnd: segment.endDayIndex < eventRange.endDayIndex,\n key: `${event.id}-${event.position.weekIndex}-${segment.startDayIndex}-${segment.endDayIndex}-${segment.row}`,\n })\n }\n\n for (\n let dayIndex = eventRange.startDayIndex;\n dayIndex <= eventRange.endDayIndex;\n dayIndex += 1\n ) {\n const row = eventRenderRows?.get(dayIndex)\n\n if (row === undefined) {\n if (currentSegment) {\n addSegment(currentSegment)\n currentSegment = null\n }\n\n continue\n }\n\n if (currentSegment && currentSegment.row === row) {\n currentSegment.endDayIndex = dayIndex\n } else {\n if (currentSegment) {\n addSegment(currentSegment)\n }\n\n currentSegment = {\n startDayIndex: dayIndex,\n endDayIndex: dayIndex,\n row,\n }\n }\n }\n\n if (currentSegment) {\n addSegment(currentSegment)\n }\n\n return segments\n })\n}\n",".monthView {\n --week-numbers-offset: 0rem;\n --month-view-border: 1px solid var(--month-view-border-color);\n --month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --day-base-color: var(--mantine-color-text);\n --min-day-width: 84px;\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 42px;\n }\n\n @mixin where-light {\n --month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --month-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.monthViewWeekdays {\n display: flex;\n}\n\n.monthViewWeek {\n display: flex;\n position: relative;\n min-width: calc(var(--min-day-width) * 7 + var(--week-numbers-offset));\n}\n\n.monthViewWeekNumber {\n flex: 0 0 var(--week-numbers-offset);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n padding: 4px;\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n\n :where(.monthViewWeek:first-child) & {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-weekdays] .monthView) & {\n border-start-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n border-end-start-radius: var(--month-view-radius);\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.monthViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n min-width: var(--min-day-width);\n height: 36px;\n font-size: var(--mantine-font-size-sm);\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n\n &:where(:first-child) {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-week-numbers] .monthView) & {\n border-start-start-radius: 0;\n }\n }\n\n &:where(:last-child) {\n border-inline-end: var(--month-view-border);\n border-start-end-radius: var(--month-view-radius);\n }\n}\n\n.monthViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n border-block-start: var(--month-view-border);\n border-inline-start: var(--month-view-border);\n border-start-start-radius: var(--month-view-radius);\n}\n\n.monthViewDay {\n min-width: var(--min-day-width);\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: calc(52px + var(--month-view-max-events, 2) * 24px);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n border-block-start: var(--month-view-border);\n border-block-end: none;\n border-inline-start: var(--month-view-border);\n border-inline-end: none;\n color: var(--day-base-color);\n cursor: pointer;\n display: flex;\n align-items: flex-start;\n position: relative;\n\n &:where(:last-child) {\n border-inline-end: var(--month-view-border);\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n border-end-end-radius: var(--month-view-radius);\n }\n\n :where(.monthViewWeek:first-child) & {\n border-start-end-radius: var(--month-view-radius);\n\n :where(:not([data-with-weekdays])) .monthView & {\n border-start-end-radius: var(--month-view-radius);\n }\n }\n }\n\n &:where(:first-of-type) {\n :where(.monthViewWeek:first-child) & {\n border-start-start-radius: var(--month-view-radius);\n\n :where([data-with-week-numbers]) .monthView & {\n border-start-start-radius: 0;\n }\n\n :where([data-with-weekdays]) .monthView & {\n border-start-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-end-start-radius: var(--month-view-radius);\n }\n\n :where([data-with-week-numbers]) .monthViewWeek:last-child & {\n border-end-start-radius: 0;\n }\n }\n\n :where(.monthViewWeek:last-child) & {\n border-block-end: var(--month-view-border);\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: alpha(var(--day-base-color), 0.4);\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n\n @mixin hover {\n &:where(:not([data-static])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n}\n\n.monthViewDayLabel {\n width: 26px;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n\n &:where([data-today]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n\n.monthViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--month-view-radius);\n background-color: var(--bg-event-bg);\n top: 0;\n bottom: -21px;\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.monthViewEvents {\n position: absolute;\n inset-inline: 0;\n inset-inline-start: var(--week-numbers-offset);\n top: 30px;\n bottom: 22px;\n pointer-events: none;\n z-index: 3;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { MonthViewOwnProps } from './MonthView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n firstDayOfWeek: 1,\n weekdayFormat: 'ddd',\n weekendDays: [0, 6],\n withWeekDays: true,\n consistentWeeks: true,\n highlightToday: true,\n withOutsideDays: true,\n maxEventsPerDay: 2,\n} satisfies Partial<MonthViewOwnProps>\n\n/** Vertical offset of the first event row, past the day label, in px. */\nconst EVENTS_TOP_OFFSET = 28\n\n/** Vertical step between stacked event rows, in px. */\nconst EVENT_ROW_HEIGHT = 22\n\n/** Group name of the month grid for slot drag selection – a month has a single grid. */\nconst MONTH_SLOT_GROUP = 'month'\n\nconst COLUMNS = 7\n\n/** `maxEventsPerDay` is clamped so the CSS grid keeps a workable row height. */\nfunction clampMaxEvents(value: number) {\n return Math.min(10, Math.max(1, value))\n}\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius, maxEventsPerDay }) => ({\n monthView: {\n '--month-view-radius': resolveScheduleRadius(radius),\n '--month-view-max-events': String(\n clampMaxEvents(maxEventsPerDay ?? defaultProps.maxEventsPerDay),\n ),\n },\n}))\n\nexport {\n defaultProps,\n varsResolver,\n clampMaxEvents,\n EVENTS_TOP_OFFSET,\n EVENT_ROW_HEIGHT,\n MONTH_SLOT_GROUP,\n COLUMNS,\n}\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n} from '../../types'\nimport {\n calculateMonthDropDate,\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getMonthViewEvents } from './get-month-view-events/get-month-view-events'\nimport { getRenderableMonthEventSegments } from './get-renderable-month-event-segments'\nimport type { MonthViewEmits, MonthViewSlots } from './MonthView.types'\nimport classes from './MonthView.module.css'\n\ndefineOptions({\n name: 'MonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MonthViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekDays: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n withOutsideDays: undefined,\n maxEventsPerDay: undefined,\n getDayProps: undefined,\n getWeekNumberProps: undefined,\n canDragEvent: undefined,\n monthYearSelectProps: undefined,\n moreEventsProps: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MonthViewSlots>()\n\nconst emit = defineEmits<MonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('MonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'monthView',\n})\n\n/**\n * Cached per selector: the grid renders one cell per day of the month, and rebuilding the same\n * class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst monthGrid = ref<HTMLElement | null>(null)\n\nconst dropTarget = shallowRef<DateStringValue | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\n\nconst maxEventsPerDay = computed(() => clampMaxEvents(props.maxEventsPerDay!))\n\nconst weeks = computed(() =>\n getMonthDays({\n month: month.value,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst flatDays = computed(() => weeks.value.flat().map((date) => toDateString(date)))\n\nconst firstFocusableDayIndex = computed(() =>\n weeks.value\n .flat()\n .findIndex((date) => props.withOutsideDays || dayjs(date).isSame(month.value, 'month')),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n weeks.value[0][0],\n dayjs(weeks.value.at(-1)!.at(-1)!).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst grouped = computed(() =>\n getMonthViewEvents({\n date: month.value,\n events: expandedEvents.value,\n firstDayOfWeek: props.firstDayOfWeek,\n withOutsideDays: props.withOutsideDays,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst weekSegments = computed(() =>\n weeks.value.map((week, weekIndex) =>\n getRenderableMonthEventSegments({\n events: grouped.value.groupedByWeek[String(weekIndex)] || [],\n groupedByDay: grouped.value.groupedByDay,\n maxEventsPerDay: maxEventsPerDay.value,\n week,\n }),\n ),\n)\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex) => {\n const startDay = flatDays.value[startIndex]\n const endDay = flatDays.value[endIndex]\n\n if (startDay && endDay) {\n emit(\n 'slotDragEnd',\n dayjs(startDay).startOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n dayjs(endDay).endOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n )\n }\n },\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => (dropTarget.value ? { date: dropTarget.value } : null),\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n highlightDay.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.value.month(),\n yearValue: month.value.year(),\n onMonthChange: (value: number) => changeDate(toDateString(month.value.month(value))),\n onYearChange: (value: number) => changeDate(toDateString(month.value.year(value))),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst dayProps = (date: string) => props.getDayProps?.(toDateString(date)) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDateString(weekStart)) ?? {}\n\nconst isOutside = (date: string | Date) => !dayjs(date).isSame(month.value, 'month')\n\n/** Outside days are rendered as empty placeholders when `withOutsideDays` is off. */\nconst isHiddenDay = (date: string | Date) => isOutside(date) && !props.withOutsideDays\n\nconst dayEvents = (date: string | Date) =>\n grouped.value.groupedByDay[dayjs(date).format('YYYY-MM-DD 00:00:00')] || []\n\nconst hiddenEventsCount = (date: string | Date) =>\n Math.max(0, dayEvents(date).length - maxEventsPerDay.value)\n\nconst handleDayKeydown = (nativeEvent: KeyboardEvent, gridIndex: number) => {\n handleGridKeydown({\n event: nativeEvent,\n index: gridIndex,\n columns: COLUMNS,\n total: weeks.value.length * COLUMNS,\n getControl: (index) =>\n monthGrid.value?.querySelector<HTMLButtonElement>(\n `[data-grid-index=\"${index}\"]:not([data-hidden])`,\n ) ?? null,\n })\n}\n\nconst setDropTarget = (next: DateStringValue | null) => {\n if (dropTarget.value !== next) {\n dropTarget.value = next\n }\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and every change\n * of the highlight re-renders the whole month grid.\n */\nconst highlightDay = rafThrottle((date: DateStringValue) => setDropTarget(date))\n\nconst handleDragOver = (nativeEvent: DragEvent, date: string | Date) => {\n // `preventDefault` and `dropEffect` stay synchronous: the browser reads them as the handler\n // returns, so they cannot be deferred to the next frame.\n nativeEvent.preventDefault()\n\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.dropEffect = nativeEvent.dataTransfer.types.includes(\n 'application/json',\n )\n ? 'move'\n : 'copy'\n }\n\n highlightDay(toDateString(date))\n}\n\nconst handleDragLeave = (nativeEvent: DragEvent) => {\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !monthGrid.value?.contains(nativeEvent.relatedTarget)\n ) {\n highlightDay.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleDrop = (nativeEvent: DragEvent, date: string | Date) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n highlightDay.cancel()\n setDropTarget(null)\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n const { start } = calculateMonthDropDate({\n draggedEvent: event,\n targetDay: toDateString(date),\n })\n emit('eventDrop', moveEventTo(event, start))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, toDateString(date))\n }\n}\n\nconst segmentStyle = (position: { startOffset: number; width: number; row: number }) => ({\n position: 'absolute' as const,\n insetInlineStart: `${position.startOffset}%`,\n width: `${position.width}%`,\n top: `${EVENTS_TOP_OFFSET + position.row * EVENT_ROW_HEIGHT}px`,\n})\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n !isStatic.value && props.withEventsDragAndDrop === true && (props.canDragEvent?.(event) ?? true)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('monthView') }\"\n :mod=\"[\n {\n 'with-week-numbers': props.withWeekNumbers,\n 'with-weekdays': props.withWeekDays,\n static: isStatic,\n 'slot-dragging': slotDragSelect.isDragging(),\n },\n (attrs as any).mod,\n ]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"month\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'month')\"\n :control=\"headerControl\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('monthViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div ref=\"monthGrid\" v-bind=\"getStyles('monthViewInner')\">\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('monthViewWeekdays')\">\n <div v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('monthViewWeekdaysCorner')\" />\n <div\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"staticStyles('monthViewWeekday')\"\n >\n {{ weekday }}\n </div>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"staticStyles('monthViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n type=\"button\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('monthViewWeekNumber', { className: weekNumberProps(week[0]).class }),\n }\"\n @click=\"emit('weekNumberClick', toDateString(week[0]), $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <div\n v-for=\"(date, dayIndex) in week\"\n :key=\"toDateString(date)\"\n v-bind=\"staticStyles('monthViewDay')\"\n :data-outside=\"isOutside(date) || undefined\"\n :data-weekend=\"props.weekendDays!.includes(dayjs(date).day() as DayOfWeek) || undefined\"\n :data-static=\"isStatic || undefined\"\n :data-drop-target=\"dropTarget === toDateString(date) || undefined\"\n :data-drag-selected=\"\n slotDragSelect.isSlotSelected(weekIndex * COLUMNS + dayIndex, MONTH_SLOT_GROUP) ||\n undefined\n \"\n :data-drag-slot-index=\"withSlotSelect ? weekIndex * COLUMNS + dayIndex : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? MONTH_SLOT_GROUP : undefined\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown(\n $event,\n weekIndex * COLUMNS + dayIndex,\n MONTH_SLOT_GROUP,\n )\n : undefined\n \"\n @dragover=\"withDragHandlers ? handleDragOver($event, date) : $event.preventDefault()\"\n @dragleave=\"withDragHandlers ? handleDragLeave($event) : undefined\"\n @drop=\"handleDrop($event, date)\"\n >\n <UnstyledButton\n type=\"button\"\n v-bind=\"{\n ...dayProps(date as string),\n ...getStyles('monthViewDayLabel', { className: dayProps(date as string).class }),\n }\"\n :disabled=\"isStatic\"\n :data-grid-index=\"weekIndex * COLUMNS + dayIndex\"\n :data-outside=\"isOutside(date) || undefined\"\n :data-hidden=\"isHiddenDay(date) || undefined\"\n :aria-label=\"\n formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\n \"\n :data-today=\"\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) || undefined\n \"\n :tabindex=\"\n isStatic ? -1 : weekIndex * COLUMNS + dayIndex === firstFocusableDayIndex ? 0 : -1\n \"\n @click=\"emit('dayClick', toDateString(date), $event)\"\n @keydown=\"\n isStatic ? undefined : handleDayKeydown($event, weekIndex * COLUMNS + dayIndex)\n \"\n >\n {{ isHiddenDay(date) ? '' : dayjs(date).date() }}\n </UnstyledButton>\n\n <MoreEvents\n v-if=\"hiddenEventsCount(date) > 0\"\n :events=\"dayEvents(date)\"\n :more-events-count=\"hiddenEventsCount(date)\"\n :labels=\"props.labels\"\n :mode=\"props.mode\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"clickEvent\"\n />\n </div>\n\n <div v-bind=\"getStyles('monthViewEvents')\">\n <ScheduleEvent\n v-for=\"segment in weekSegments[weekIndex]\"\n :key=\"segment.key\"\n :event=\"segment.event\"\n nowrap\n :hanging=\"segment.position.hanging\"\n :mode=\"props.mode\"\n :data-clip-start=\"segment.clipStart || undefined\"\n :data-clip-end=\"segment.clipEnd || undefined\"\n :style=\"segmentStyle(segment.position)\"\n :draggable=\"isDraggableEvent(segment.event)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(segment.event, $event)\"\n />\n </div>\n </div>\n </div>\n </ScrollArea>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { MonthViewOwnProps } from './MonthView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n firstDayOfWeek: 1,\n weekdayFormat: 'ddd',\n weekendDays: [0, 6],\n withWeekDays: true,\n consistentWeeks: true,\n highlightToday: true,\n withOutsideDays: true,\n maxEventsPerDay: 2,\n} satisfies Partial<MonthViewOwnProps>\n\n/** Vertical offset of the first event row, past the day label, in px. */\nconst EVENTS_TOP_OFFSET = 28\n\n/** Vertical step between stacked event rows, in px. */\nconst EVENT_ROW_HEIGHT = 22\n\n/** Group name of the month grid for slot drag selection – a month has a single grid. */\nconst MONTH_SLOT_GROUP = 'month'\n\nconst COLUMNS = 7\n\n/** `maxEventsPerDay` is clamped so the CSS grid keeps a workable row height. */\nfunction clampMaxEvents(value: number) {\n return Math.min(10, Math.max(1, value))\n}\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius, maxEventsPerDay }) => ({\n monthView: {\n '--month-view-radius': resolveScheduleRadius(radius),\n '--month-view-max-events': String(\n clampMaxEvents(maxEventsPerDay ?? defaultProps.maxEventsPerDay),\n ),\n },\n}))\n\nexport {\n defaultProps,\n varsResolver,\n clampMaxEvents,\n EVENTS_TOP_OFFSET,\n EVENT_ROW_HEIGHT,\n MONTH_SLOT_GROUP,\n COLUMNS,\n}\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n} from '../../types'\nimport {\n calculateMonthDropDate,\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getMonthViewEvents } from './get-month-view-events/get-month-view-events'\nimport { getRenderableMonthEventSegments } from './get-renderable-month-event-segments'\nimport type { MonthViewEmits, MonthViewSlots } from './MonthView.types'\nimport classes from './MonthView.module.css'\n\ndefineOptions({\n name: 'MonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<MonthViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekDays: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n withOutsideDays: undefined,\n maxEventsPerDay: undefined,\n getDayProps: undefined,\n getWeekNumberProps: undefined,\n canDragEvent: undefined,\n monthYearSelectProps: undefined,\n moreEventsProps: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<MonthViewSlots>()\n\nconst emit = defineEmits<MonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('MonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'MonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'monthView',\n})\n\n/**\n * Cached per selector: the grid renders one cell per day of the month, and rebuilding the same\n * class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst monthGrid = ref<HTMLElement | null>(null)\n\nconst dropTarget = shallowRef<DateStringValue | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\n\nconst maxEventsPerDay = computed(() => clampMaxEvents(props.maxEventsPerDay!))\n\nconst weeks = computed(() =>\n getMonthDays({\n month: month.value,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst flatDays = computed(() => weeks.value.flat().map((date) => toDateString(date)))\n\nconst firstFocusableDayIndex = computed(() =>\n weeks.value\n .flat()\n .findIndex((date) => props.withOutsideDays || dayjs(date).isSame(month.value, 'month')),\n)\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n weeks.value[0][0],\n dayjs(weeks.value.at(-1)!.at(-1)!).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst grouped = computed(() =>\n getMonthViewEvents({\n date: month.value,\n events: expandedEvents.value,\n firstDayOfWeek: props.firstDayOfWeek,\n withOutsideDays: props.withOutsideDays,\n consistentWeeks: props.consistentWeeks,\n }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst weekSegments = computed(() =>\n weeks.value.map((week, weekIndex) =>\n getRenderableMonthEventSegments({\n events: grouped.value.groupedByWeek[String(weekIndex)] || [],\n groupedByDay: grouped.value.groupedByDay,\n maxEventsPerDay: maxEventsPerDay.value,\n week,\n }),\n ),\n)\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex) => {\n const startDay = flatDays.value[startIndex]\n const endDay = flatDays.value[endIndex]\n\n if (startDay && endDay) {\n emit(\n 'slotDragEnd',\n dayjs(startDay).startOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n dayjs(endDay).endOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n )\n }\n },\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => (dropTarget.value ? { date: dropTarget.value } : null),\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n highlightDay.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.value.month(),\n yearValue: month.value.year(),\n onMonthChange: (value: number) => changeDate(toDateString(month.value.month(value))),\n onYearChange: (value: number) => changeDate(toDateString(month.value.year(value))),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst dayProps = (date: string) => props.getDayProps?.(toDateString(date)) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDateString(weekStart)) ?? {}\n\nconst isOutside = (date: string | Date) => !dayjs(date).isSame(month.value, 'month')\n\n/** Outside days are rendered as empty placeholders when `withOutsideDays` is off. */\nconst isHiddenDay = (date: string | Date) => isOutside(date) && !props.withOutsideDays\n\nconst dayEvents = (date: string | Date) =>\n grouped.value.groupedByDay[dayjs(date).format('YYYY-MM-DD 00:00:00')] || []\n\nconst hiddenEventsCount = (date: string | Date) =>\n Math.max(0, dayEvents(date).length - maxEventsPerDay.value)\n\nconst handleDayKeydown = (nativeEvent: KeyboardEvent, gridIndex: number) => {\n handleGridKeydown({\n event: nativeEvent,\n index: gridIndex,\n columns: COLUMNS,\n total: weeks.value.length * COLUMNS,\n getControl: (index) =>\n monthGrid.value?.querySelector<HTMLButtonElement>(\n `[data-grid-index=\"${index}\"]:not([data-hidden])`,\n ) ?? null,\n })\n}\n\nconst setDropTarget = (next: DateStringValue | null) => {\n if (dropTarget.value !== next) {\n dropTarget.value = next\n }\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and every change\n * of the highlight re-renders the whole month grid.\n */\nconst highlightDay = rafThrottle((date: DateStringValue) => setDropTarget(date))\n\nconst handleDragOver = (nativeEvent: DragEvent, date: string | Date) => {\n // `preventDefault` and `dropEffect` stay synchronous: the browser reads them as the handler\n // returns, so they cannot be deferred to the next frame.\n nativeEvent.preventDefault()\n\n if (nativeEvent.dataTransfer) {\n nativeEvent.dataTransfer.dropEffect = nativeEvent.dataTransfer.types.includes(\n 'application/json',\n )\n ? 'move'\n : 'copy'\n }\n\n highlightDay(toDateString(date))\n}\n\nconst handleDragLeave = (nativeEvent: DragEvent) => {\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !monthGrid.value?.contains(nativeEvent.relatedTarget)\n ) {\n highlightDay.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleDrop = (nativeEvent: DragEvent, date: string | Date) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n highlightDay.cancel()\n setDropTarget(null)\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n const { start } = calculateMonthDropDate({\n draggedEvent: event,\n targetDay: toDateString(date),\n })\n emit('eventDrop', moveEventTo(event, start))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, toDateString(date))\n }\n}\n\nconst segmentStyle = (position: { startOffset: number; width: number; row: number }) => ({\n position: 'absolute' as const,\n insetInlineStart: `${position.startOffset}%`,\n width: `${position.width}%`,\n top: `${EVENTS_TOP_OFFSET + position.row * EVENT_ROW_HEIGHT}px`,\n})\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n !isStatic.value && props.withEventsDragAndDrop === true && (props.canDragEvent?.(event) ?? true)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('monthView') }\"\n :mod=\"[\n {\n 'with-week-numbers': props.withWeekNumbers,\n 'with-weekdays': props.withWeekDays,\n static: isStatic,\n 'slot-dragging': slotDragSelect.isDragging(),\n },\n (attrs as any).mod,\n ]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"month\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'month')\"\n :control=\"headerControl\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('monthViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div ref=\"monthGrid\" v-bind=\"getStyles('monthViewInner')\">\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('monthViewWeekdays')\">\n <div v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('monthViewWeekdaysCorner')\" />\n <div\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"staticStyles('monthViewWeekday')\"\n >\n {{ weekday }}\n </div>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"staticStyles('monthViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n type=\"button\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('monthViewWeekNumber', { className: weekNumberProps(week[0]).class }),\n }\"\n @click=\"emit('weekNumberClick', toDateString(week[0]), $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <div\n v-for=\"(date, dayIndex) in week\"\n :key=\"toDateString(date)\"\n v-bind=\"staticStyles('monthViewDay')\"\n :data-outside=\"isOutside(date) || undefined\"\n :data-weekend=\"props.weekendDays!.includes(dayjs(date).day() as DayOfWeek) || undefined\"\n :data-static=\"isStatic || undefined\"\n :data-drop-target=\"dropTarget === toDateString(date) || undefined\"\n :data-drag-selected=\"\n slotDragSelect.isSlotSelected(weekIndex * COLUMNS + dayIndex, MONTH_SLOT_GROUP) ||\n undefined\n \"\n :data-drag-slot-index=\"withSlotSelect ? weekIndex * COLUMNS + dayIndex : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? MONTH_SLOT_GROUP : undefined\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown(\n $event,\n weekIndex * COLUMNS + dayIndex,\n MONTH_SLOT_GROUP,\n )\n : undefined\n \"\n @dragover=\"withDragHandlers ? handleDragOver($event, date) : $event.preventDefault()\"\n @dragleave=\"withDragHandlers ? handleDragLeave($event) : undefined\"\n @drop=\"handleDrop($event, date)\"\n >\n <UnstyledButton\n type=\"button\"\n v-bind=\"{\n ...dayProps(date as string),\n ...getStyles('monthViewDayLabel', { className: dayProps(date as string).class }),\n }\"\n :disabled=\"isStatic\"\n :data-grid-index=\"weekIndex * COLUMNS + dayIndex\"\n :data-outside=\"isOutside(date) || undefined\"\n :data-hidden=\"isHiddenDay(date) || undefined\"\n :aria-label=\"\n formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\n \"\n :data-today=\"\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) || undefined\n \"\n :tabindex=\"\n isStatic ? -1 : weekIndex * COLUMNS + dayIndex === firstFocusableDayIndex ? 0 : -1\n \"\n @click=\"emit('dayClick', toDateString(date), $event)\"\n @keydown=\"\n isStatic ? undefined : handleDayKeydown($event, weekIndex * COLUMNS + dayIndex)\n \"\n >\n {{ isHiddenDay(date) ? '' : dayjs(date).date() }}\n </UnstyledButton>\n\n <MoreEvents\n v-if=\"hiddenEventsCount(date) > 0\"\n :events=\"dayEvents(date)\"\n :more-events-count=\"hiddenEventsCount(date)\"\n :labels=\"props.labels\"\n :mode=\"props.mode\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"clickEvent\"\n />\n </div>\n\n <div v-bind=\"getStyles('monthViewEvents')\">\n <ScheduleEvent\n v-for=\"segment in weekSegments[weekIndex]\"\n :key=\"segment.key\"\n :event=\"segment.event\"\n nowrap\n :hanging=\"segment.position.hanging\"\n :mode=\"props.mode\"\n :data-clip-start=\"segment.clipStart || undefined\"\n :data-clip-end=\"segment.clipEnd || undefined\"\n :style=\"segmentStyle(segment.position)\"\n :draggable=\"isDraggableEvent(segment.event)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(segment.event, $event)\"\n />\n </div>\n </div>\n </div>\n </ScrollArea>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport MonthViewComponent, { varsResolver } from './MonthView.vue'\nimport type { MonthViewFactory } from './MonthView.types'\nimport classes from './MonthView.module.css'\n\nexport const MonthView = factory<MonthViewFactory>(MonthViewComponent, { classes, varsResolver })\n\nexport type {\n MonthViewCssVariables,\n MonthViewEmits,\n MonthViewFactory,\n MonthViewOwnProps,\n MonthViewOwnStylesNames,\n MonthViewProps,\n MonthViewSlots,\n MonthViewStylesNames,\n} from './MonthView.types'\n","import dayjs from 'dayjs'\nimport type { VNodeChild } from 'vue'\nimport { DateLabelFormat, DateStringValue } from '../../../types'\nimport { formatDate } from '../../../utils'\n\ninterface GetWeekLabelInput {\n weekdays: Date[] | string[]\n locale: string\n weekLabelFormat: DateLabelFormat\n renderWeekLabel?: (params: { weekStart: DateStringValue; weekEnd: DateStringValue }) => VNodeChild\n}\n\nexport function getWeekLabel({\n weekdays,\n locale,\n weekLabelFormat,\n renderWeekLabel,\n}: GetWeekLabelInput) {\n if (renderWeekLabel) {\n return renderWeekLabel({\n weekStart: dayjs(weekdays[0]).format('YYYY-MM-DD'),\n weekEnd: dayjs(weekdays[weekdays.length - 1]).format('YYYY-MM-DD'),\n })\n }\n\n return `${formatDate({\n locale,\n date: weekdays[0],\n format: weekLabelFormat,\n })} – ${formatDate({\n locale,\n date: weekdays[weekdays.length - 1],\n format: weekLabelFormat,\n })}, ${formatDate({ locale, date: weekdays[0], format: 'YYYY' })}`\n}\n","import { AnyDateValue, DayOfWeek, ScheduleEventData } from '../../../types'\nimport { isEventInTimeRange, isWithinWeek, validateEvent } from '../../../utils'\n\nexport interface FilterWeekViewEventsInput {\n /** Date (week start) at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given week, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[] | undefined\n\n /** Start time of the week view, used to calculate event positions */\n startTime?: string\n\n /** End time of the week view, used to calculate event positions */\n endTime?: string\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n}\n\nexport function filterWeekViewEvents({\n date,\n events,\n startTime,\n endTime,\n firstDayOfWeek = 1,\n}: FilterWeekViewEventsInput): ScheduleEventData[] {\n if (events === undefined) {\n return []\n }\n\n const ids = new Set<string | number>()\n const filteredEvents: ScheduleEventData[] = []\n\n for (const event of events) {\n if (\n isWithinWeek({ event, targetWeek: date, firstDayOfWeek }) &&\n isEventInTimeRange({ event, startTime, endTime })\n ) {\n filteredEvents.push(validateEvent(event))\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] WeekView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return filteredEvents\n}\n","import { ScheduleEventData, WeekPositionedEventData } from '../../../types'\nimport { isEventsOverlap } from '../../../utils'\n\nexport function assignEventRows(events: WeekPositionedEventData[]): Map<ScheduleEventData, number> {\n const eventRows = new Map<ScheduleEventData, number>()\n\n for (const event of events) {\n let row = 0\n\n while (true) {\n let hasConflict = false\n\n for (const [otherEvent, otherRow] of eventRows.entries()) {\n if (otherRow === row && isEventsOverlap(event, otherEvent)) {\n hasConflict = true\n break\n }\n }\n\n if (!hasConflict) {\n break\n }\n\n row++\n }\n\n eventRows.set(event, row)\n }\n\n return eventRows\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface CalculateAllDayEventOffsetInput {\n eventStartDate: Dayjs\n weekStartDate: Dayjs\n weekDays: DateStringValue[]\n visibleDaysCount: number\n hangingStart: boolean\n}\n\nexport function calculateAllDayEventOffset({\n eventStartDate,\n weekStartDate,\n weekDays,\n visibleDaysCount,\n hangingStart,\n}: CalculateAllDayEventOffsetInput): number {\n let displayStartDate = eventStartDate\n\n if (hangingStart) {\n displayStartDate = weekStartDate\n }\n\n if (!weekDays.some((day) => dayjs(day).isSame(displayStartDate, 'day'))) {\n displayStartDate = dayjs(weekDays[0])\n }\n\n const visibleDaysBeforeEvent =\n weekDays.filter(\n (day) => dayjs(day).isBefore(displayStartDate) || dayjs(day).isSame(displayStartDate, 'day'),\n ).length - 1\n\n return (visibleDaysBeforeEvent / visibleDaysCount) * 100\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface CalculateAllDayEventWidthInput {\n eventStartDate: Dayjs\n actualEndDate: Dayjs\n weekStartDate: Dayjs\n weekEndDate: Dayjs\n weekDays: DateStringValue[]\n visibleDaysCount: number\n}\n\nexport function calculateAllDayEventWidth({\n eventStartDate,\n actualEndDate,\n weekStartDate,\n weekEndDate,\n weekDays,\n visibleDaysCount,\n}: CalculateAllDayEventWidthInput): number {\n let displayStartDate = eventStartDate\n if (eventStartDate.isBefore(weekStartDate)) {\n displayStartDate = weekStartDate\n }\n\n let displayEndDate = actualEndDate\n if (actualEndDate.isAfter(weekEndDate)) {\n displayEndDate = weekEndDate\n }\n\n const visibleDaysSpanned = weekDays.filter(\n (day) =>\n (dayjs(day).isAfter(displayStartDate) || dayjs(day).isSame(displayStartDate, 'day')) &&\n (dayjs(day).isBefore(displayEndDate) || dayjs(day).isSame(displayEndDate, 'day')),\n ).length\n\n return (visibleDaysSpanned / visibleDaysCount) * 100\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue, ScheduleEventData } from '../../../types'\n\ninterface CalculateEventDaysInput {\n event: ScheduleEventData\n weekDays: DateStringValue[]\n actualEndDate: Dayjs\n}\n\nexport function calculateEventDays({ event, weekDays, actualEndDate }: CalculateEventDaysInput) {\n const eventStartDate = dayjs(event.start).startOf('day')\n\n return weekDays.filter((day) => {\n const dayDate = dayjs(day).startOf('day')\n return (\n (dayDate.isAfter(eventStartDate) || dayDate.isSame(eventStartDate)) &&\n (dayDate.isBefore(actualEndDate) || dayDate.isSame(actualEndDate))\n )\n })\n}\n","import { WeekPositionedEventData } from '../../../types'\nimport { isEventsOverlap } from '../../../utils'\n\nexport function calculateRegularEventOverlaps(events: WeekPositionedEventData[]): void {\n for (const event of events) {\n let maxOverlappingColumn = event.position.column\n\n for (const otherEvent of events) {\n if (isEventsOverlap(event, otherEvent)) {\n maxOverlappingColumn = Math.max(maxOverlappingColumn, otherEvent.position.column)\n }\n }\n\n const overlaps = maxOverlappingColumn + 1\n event.position.overlaps = overlaps\n event.position.width = 100 / overlaps\n event.position.offset = (event.position.column * 100) / overlaps\n }\n}\n","import { DateStringValue, ScheduleEventData } from '../../../types'\nimport { isAllDayEvent, isEventsOverlap } from '../../../utils'\n\ninterface FindAvailableColumnInput {\n columns: Map<string, ScheduleEventData[]>\n event: ScheduleEventData\n allDay: boolean\n allWeekDays: DateStringValue[]\n}\n\nfunction columnHasConflict({\n columns,\n columnIndex,\n event,\n allDay,\n allWeekDays,\n}: FindAvailableColumnInput & { columnIndex: number }): boolean {\n const columnKey = `col-${columnIndex}`\n if (!columns.has(columnKey)) {\n return false\n }\n\n const columnEvents = columns.get(columnKey)!\n\n return columnEvents.some((e) => {\n const eAllDay = allWeekDays.some((day) => isAllDayEvent({ event: e, date: day }))\n const hasTimeConflict = isEventsOverlap(e, event)\n\n if (allDay && eAllDay) {\n return hasTimeConflict\n }\n\n if (allDay || eAllDay) {\n return false\n }\n\n return hasTimeConflict\n })\n}\n\nexport function findAvailableColumn(input: FindAvailableColumnInput): number {\n let column = 0\n\n while (columnHasConflict({ ...input, columnIndex: column })) {\n column++\n }\n\n return column\n}\n","import dayjs from 'dayjs'\nimport { ScheduleEventData } from '../../../types'\n\nexport function getEventEndDate(event: ScheduleEventData) {\n const eventEndDate = dayjs(event.end).startOf('day')\n\n if (dayjs(event.end).hour() === 0 && dayjs(event.end).minute() === 0) {\n return eventEndDate.subtract(1, 'day')\n }\n\n return eventEndDate\n}\n","import dayjs, { Dayjs } from 'dayjs'\nimport { DateStringValue } from '../../../types'\n\ninterface GetHangingStatusInput {\n eventStartDate: Dayjs\n actualEndDate: Dayjs\n weekDays: DateStringValue[]\n}\n\nexport function getHangingStatus({\n eventStartDate,\n actualEndDate,\n weekDays,\n}: GetHangingStatusInput): 'start' | 'end' | 'both' | 'none' {\n const weekStartDate = dayjs(weekDays[0])\n const weekEndDate = dayjs(weekDays[weekDays.length - 1])\n\n const hangingStart = eventStartDate.isBefore(weekStartDate)\n const hangingEnd = actualEndDate.isAfter(weekEndDate)\n\n if (hangingStart && hangingEnd) {\n return 'both'\n }\n\n if (hangingStart) {\n return 'start'\n }\n\n if (hangingEnd) {\n return 'end'\n }\n\n return 'none'\n}\n","import dayjs from 'dayjs'\nimport {\n AnyDateValue,\n DateStringValue,\n DayOfWeek,\n ScheduleEventData,\n WeekPositionedEventData,\n} from '../../../types'\nimport { getDayPosition, getWeekDays, isAllDayEvent, sortEvents } from '../../../utils'\nimport { assignEventRows } from './assign-event-rows'\nimport { calculateAllDayEventOffset } from './calculate-all-day-event-offset'\nimport { calculateAllDayEventWidth } from './calculate-all-day-event-width'\nimport { calculateEventDays } from './calculate-event-days'\nimport { calculateRegularEventOverlaps } from './calculate-regular-event-overlaps'\nimport { findAvailableColumn } from './find-available-column'\nimport { getEventEndDate } from './get-event-end-date'\nimport { getHangingStatus } from './get-hanging-status'\n\nexport interface GetWeekPositionedEventsInput {\n /** Date (week start) at which events are positioned, used to check if events are all-day */\n date: AnyDateValue\n\n /** List of all events that belong to the given week, extra events must be filtered out before passing to the function */\n events: ScheduleEventData[]\n\n /** Start time of the week view, used to calculate event positions */\n startTime?: string\n\n /** End time of the week view, used to calculate event positions */\n endTime?: string\n\n /** Number of minutes per time slot, used to align the canvas to whole slots */\n intervalMinutes?: number\n\n /** First day of the week, 0 - Sunday, 1 - Monday, etc., used to calculate events positions */\n firstDayOfWeek?: DayOfWeek\n\n /** Indices of weekend days, 0-6, where 0 is Sunday and 6 is Saturday */\n weekendDays?: DayOfWeek[]\n\n /** If set to false, weekend days are hidden @default true */\n withWeekendDays?: boolean\n}\n\n/** Events grouped by week day date (YYYY-MM-DD 00:00:00) and by columns */\nexport interface GroupedWeekEvents {\n allDayEvents: WeekPositionedEventData[]\n regularEvents: Record<DateStringValue, WeekPositionedEventData[]>\n backgroundEvents: Record<DateStringValue, WeekPositionedEventData[]>\n}\n\nexport function getWeekPositionedEvents({\n date,\n events,\n startTime,\n endTime,\n intervalMinutes,\n firstDayOfWeek = 1,\n weekendDays = [0, 6],\n withWeekendDays = true,\n}: GetWeekPositionedEventsInput): GroupedWeekEvents {\n const weekDays = getWeekDays({ week: date, firstDayOfWeek, withWeekendDays, weekendDays })\n const visibleDaysCount = weekDays.length\n const weekStartDate = dayjs(weekDays[0])\n const weekEndDate = dayjs(weekDays[weekDays.length - 1])\n\n const grouped: GroupedWeekEvents = {\n allDayEvents: [],\n regularEvents: Object.fromEntries(weekDays.map((day) => [day, []])),\n backgroundEvents: Object.fromEntries(weekDays.map((day) => [day, []])),\n }\n\n const columns = new Map<string, ScheduleEventData[]>()\n const allDayColumns = new Map<string, ScheduleEventData[]>()\n const sorted = sortEvents(events)\n\n for (const event of sorted) {\n if (event.display === 'background') {\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n const eventWeekDays = calculateEventDays({ event, weekDays, actualEndDate })\n const hanging = getHangingStatus({ eventStartDate, actualEndDate, weekDays })\n\n for (const day of eventWeekDays) {\n const visibleDayIndex = weekDays.indexOf(day)\n if (visibleDayIndex === -1) {\n continue\n }\n\n const dayStart = dayjs(day)\n const dayEnd = dayStart.endOf('day')\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n\n const clippedStart = eventStart.isBefore(dayStart) ? dayStart : eventStart\n const clippedEnd = eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd\n\n const clippedEvent = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n\n const isAllDay = isAllDayEvent({ event: clippedEvent, date: day })\n const verticalPosition = isAllDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event: clippedEvent, startTime, endTime, intervalMinutes })\n\n if (!isAllDay && verticalPosition.height <= 0) {\n continue\n }\n\n const dayWeekOffset = (visibleDayIndex / visibleDaysCount) * 100\n\n grouped.backgroundEvents[day].push({\n ...event,\n position: {\n ...verticalPosition,\n allDay: isAllDay,\n column: 0,\n width: 100,\n offset: 0,\n overlaps: 1,\n weekOffset: dayWeekOffset,\n row: 0,\n hanging,\n },\n })\n }\n\n continue\n }\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n const eventWeekDays = calculateEventDays({ event, weekDays, actualEndDate })\n\n if (eventWeekDays.length === 0) {\n continue\n }\n\n const isMultiday = actualEndDate.isAfter(eventStartDate)\n const hanging = getHangingStatus({ eventStartDate, actualEndDate, weekDays })\n const isActuallyAllDay = eventWeekDays.some((day) => isAllDayEvent({ event, date: day }))\n const allDay = isMultiday || isActuallyAllDay\n\n const columnMap = allDay ? allDayColumns : columns\n const column = findAvailableColumn({\n columns: columnMap,\n event,\n allDay,\n allWeekDays: weekDays,\n })\n\n const columnKey = `col-${column}`\n if (!columnMap.has(columnKey)) {\n columnMap.set(columnKey, [])\n }\n columnMap.get(columnKey)!.push(event)\n\n const verticalPosition = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event, startTime, endTime, intervalMinutes })\n\n if (allDay) {\n const offset = calculateAllDayEventOffset({\n eventStartDate,\n weekStartDate,\n weekDays,\n visibleDaysCount,\n hangingStart: hanging === 'start' || hanging === 'both',\n })\n\n grouped.allDayEvents.push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n width: 0,\n offset,\n overlaps: 0,\n row: 0,\n hanging,\n },\n })\n } else {\n for (const day of eventWeekDays) {\n const visibleDayIndex = weekDays.indexOf(day)\n\n if (visibleDayIndex === -1) {\n continue\n }\n\n const dayWeekOffset = (visibleDayIndex / visibleDaysCount) * 100\n\n grouped.regularEvents[day].push({\n ...event,\n position: {\n ...verticalPosition,\n allDay,\n column,\n width: 0,\n offset: 0,\n overlaps: 0,\n weekOffset: dayWeekOffset,\n row: 0,\n hanging,\n },\n })\n }\n }\n }\n\n for (const day of weekDays) {\n calculateRegularEventOverlaps(grouped.regularEvents[day])\n }\n\n if (grouped.allDayEvents.length > 0) {\n const eventRows = assignEventRows(grouped.allDayEvents)\n const assignedRows = new Set<number>()\n\n for (const event of grouped.allDayEvents) {\n const row = eventRows.get(event)!\n event.position.row = row\n assignedRows.add(row)\n }\n\n const rowCount = Math.max(...assignedRows) + 1\n\n for (const event of grouped.allDayEvents) {\n const eventStartDate = dayjs(event.start).startOf('day')\n const actualEndDate = getEventEndDate(event)\n\n event.position.width = calculateAllDayEventWidth({\n eventStartDate,\n actualEndDate,\n weekStartDate,\n weekEndDate,\n weekDays,\n visibleDaysCount,\n })\n\n event.position.overlaps = rowCount\n }\n }\n\n return grouped\n}\n","import { ScheduleEventData } from '../../../types'\nimport { filterWeekViewEvents } from './filter-week-view-events'\nimport {\n getWeekPositionedEvents,\n GetWeekPositionedEventsInput,\n GroupedWeekEvents,\n} from './get-week-positioned-events'\n\ninterface GetWeekViewEventsInput extends Omit<GetWeekPositionedEventsInput, 'events'> {\n events: ScheduleEventData[] | undefined\n}\n\nexport function getWeekViewEvents(input: GetWeekViewEventsInput): GroupedWeekEvents {\n return getWeekPositionedEvents({ ...input, events: filterWeekViewEvents(input) })\n}\n",".weekView {\n --week-view-week-day-height: 58px;\n --week-view-all-day-slots-height: 48px;\n --week-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --week-view-slots-label-width: 80px;\n --week-view-min-slot-width: 80px;\n --week-view-slot-height: 64px;\n\n @mixin where-light {\n --week-view-border-color: var(--mantine-color-gray-3);\n --week-view-business-hours-bg: var(--mantine-color-white);\n --week-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --week-view-border-color: var(--mantine-color-dark-4);\n --week-view-business-hours-bg: var(--mantine-color-dark-7);\n --week-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.weekViewRoot {\n --indicator-labels-offset: calc(var(--week-view-slots-label-width) / var(--number-of-days));\n\n border: 1px solid var(--week-view-border-color);\n border-radius: var(--week-view-radius);\n overflow: hidden;\n}\n\n.weekViewInner {\n display: flex;\n position: relative;\n overflow: hidden;\n}\n\n.weekViewScrollArea {\n :where(:global(.mantine-ScrollArea-scrollbar)) {\n z-index: 4;\n }\n}\n\n.weekViewHeader {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--week-view-border-color);\n margin-bottom: -1px;\n transition: box-shadow 100ms ease;\n\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n}\n\n.weekViewCorner {\n height: var(--week-view-week-day-height);\n flex: 0 0 var(--week-view-slots-label-width);\n min-width: var(--week-view-slots-label-width);\n line-height: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.weekViewSlotLabels {\n flex: 0 0 var(--week-view-slots-label-width);\n min-width: var(--week-view-slots-label-width);\n background-color: var(--mantine-color-body);\n}\n\n.weekViewSlotLabel {\n border-top: 1px solid var(--week-view-border-color);\n text-align: right;\n height: var(--week-view-slot-height);\n padding: 4px;\n padding-inline-end: 8px;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n\n &:where([data-business-hours]) {\n background-color: var(--week-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--week-view-non-business-hours-bg);\n }\n}\n\n.weekViewDay {\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n}\n\n.weekViewDayLabel {\n height: var(--week-view-week-day-height);\n min-width: var(--week-view-min-slot-width);\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n cursor: pointer;\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n padding-inline-start: 5px;\n\n &:where([data-weekend]) {\n color: var(--mantine-color-error);\n }\n\n &:where([data-today]) {\n gap: 6px;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.weekViewDayNumber {\n text-align: center;\n width: 26px;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n font-size: var(--mantine-font-size-sm);\n\n :where(.weekViewDayLabel[data-today]) & {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n\n.weekViewDayWeekday {\n text-align: center;\n font-size: var(--mantine-font-size-sm);\n text-transform: capitalize;\n}\n\n.weekViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--week-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n\n.weekViewDaySlots {\n position: relative;\n}\n\n.weekViewDaySlot {\n display: block;\n width: 100%;\n border-top: 1px solid var(--week-view-border-color);\n height: var(--week-view-slot-height);\n min-width: var(--week-view-min-slot-width);\n padding: 4px;\n cursor: pointer;\n position: relative;\n\n &:where(:focus) {\n z-index: 1;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n\n &:where([data-business-hours]) {\n background-color: var(--week-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--week-view-non-business-hours-bg);\n }\n\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n\n @mixin where-light {\n border-color: var(--mantine-primary-color-2);\n }\n\n @mixin where-dark {\n border-color: var(--mantine-primary-color-9);\n }\n }\n }\n\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.weekViewWeekLabel {\n text-align: center;\n margin-bottom: 4px;\n font-size: var(--mantine-font-size-sm);\n}\n\n.weekViewWeekNumber {\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n font-size: var(--mantine-font-size-lg);\n}\n\n.weekViewAllDaySlots {\n display: flex;\n height: var(--week-view-all-day-slots-height);\n}\n\n.weekViewAllDaySlotsLabel {\n flex: 0 0 var(--week-view-slots-label-width);\n text-align: right;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n}\n\n.weekViewAllDaySlotsEvents {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.weekViewAllDaySlotsList {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n\n & > .weekViewDaySlot {\n flex: 1;\n border-inline-start: 1px solid var(--week-view-border-color);\n height: 100%;\n }\n\n &:hover,\n &:focus-within {\n .weekViewAllDaySlotsEvents {\n overflow: visible;\n\n &::before {\n content: '';\n position: absolute;\n top: 100%;\n height: calc(var(--week-view-all-day-slots-height) / 2 * var(--extra-rows));\n inset-inline: 0;\n z-index: 1;\n pointer-events: all;\n }\n }\n }\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { WeekViewOwnProps } from './WeekView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeIndicator: true,\n withCurrentTimeBubble: true,\n slotHeight: 64,\n firstDayOfWeek: 1,\n weekdayFormat: 'ddd',\n dayFormat: 'D',\n withWeekNumber: true,\n withAllDaySlots: true,\n allDaySlotHeight: 44,\n weekendDays: [0, 6],\n withWeekendDays: true,\n weekLabelFormat: 'MMM D',\n} satisfies Partial<WeekViewOwnProps>\n\n/** Vertical step between stacked all-day event rows, in px. */\nconst ALL_DAY_ROW_HEIGHT = 22\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotHeight, allDaySlotHeight, allDaySlotsHeight }) => ({\n weekView: {\n '--week-view-radius': resolveScheduleRadius(radius),\n '--week-view-slot-height': cssSize(slotHeight),\n '--week-view-all-day-slots-height': cssSize(allDaySlotsHeight ?? allDaySlotHeight),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, ALL_DAY_ROW_HEIGHT }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n} from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getWeekDays,\n getWeekNumber,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n moveEventToAllDay,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { useSlotDropTarget } from '../use-slot-drop-target'\nimport { getWeekLabel } from './get-week-label/get-week-label'\nimport { getWeekViewEvents } from './get-week-view-events/get-week-view-events'\nimport type { WeekViewEmits, WeekViewSlots } from './WeekView.types'\nimport classes from './WeekView.module.css'\n\ndefineOptions({\n name: 'WeekView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<WeekViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n slotHeight: undefined,\n businessHours: undefined,\n canDragEvent: undefined,\n startScrollTime: undefined,\n canResizeEvent: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n dayFormat: undefined,\n withWeekNumber: undefined,\n withWeekNumbers: undefined,\n withAllDaySlots: undefined,\n withAllDaySlot: undefined,\n allDaySlotHeight: undefined,\n allDaySlotsHeight: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n weekLabelFormat: undefined,\n renderWeekLabel: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<WeekViewSlots>()\n\nconst emit = defineEmits<WeekViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('WeekView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'WeekView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'weekView',\n})\n\n/**\n * Cached per selector: a week renders one slot per day and interval, and rebuilding the same\n * class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst weekRoot = ref<HTMLElement | null>(null)\nconst setWeekRoot = (node: Element | null) => {\n weekRoot.value = node instanceof HTMLElement ? node : null\n}\n\nconst daySlotsContainers = new Map<string, HTMLElement>()\n\nconst slotDropTarget = useSlotDropTarget()\n\nconst isStatic = computed(() => props.mode === 'static')\n\n/** The plural names are the deprecated aliases; the canonical prop wins when both are set. */\nconst withWeekNumber = computed(() => props.withWeekNumbers ?? props.withWeekNumber)\nconst withAllDaySlots = computed(() => props.withAllDaySlot ?? props.withAllDaySlots)\n\nconst days = computed(() =>\n getWeekDays({\n week: props.date,\n firstDayOfWeek: props.firstDayOfWeek,\n withWeekendDays: props.withWeekendDays,\n weekendDays: props.weekendDays,\n }),\n)\n\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? dayjs()))\n\nconst currentWeekdayIndex = computed(() => {\n if (!props.withCurrentTimeIndicator) {\n return -1\n }\n\n return props.forceCurrentTimeIndicator\n ? days.value.findIndex((date) => dayjs(date).day() === now.value.day())\n : days.value.findIndex((date) => dayjs(date).isSame(now.value, 'day'))\n})\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n dayjs(days.value[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(days.value.at(-1)).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst grouped = computed(() =>\n getWeekViewEvents({\n date: props.date,\n events: expandedEvents.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n }),\n)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst weekLabel = computed(() =>\n getWeekLabel({\n weekdays: days.value,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat!,\n renderWeekLabel: slots.weekLabel\n ? (payload) => slots.weekLabel!(payload)\n : props.renderWeekLabel,\n }),\n)\n\nconst rootVars = computed(() => ({\n '--number-of-days': String(days.value.length),\n '--indicator-offset-index':\n currentWeekdayIndex.value === -1 ? undefined : String(currentWeekdayIndex.value + 1),\n}))\n\n/**\n * Everything the template needs per day column.\n *\n * `days` holds `YYYY-MM-DD 00:00:00` strings, so the grid used to re-derive the day key, the\n * weekend flag and both labels for each of the hundreds of slots it renders. Doing it once per\n * day instead is what keeps a drag re-render cheap.\n */\nconst dayColumns = computed(() =>\n days.value.map((date) => {\n const day = dayjs(date)\n\n return {\n date,\n key: day.format('YYYY-MM-DD') as DateStringValue,\n isWeekend: props.weekendDays!.includes(day.day() as DayOfWeek),\n isToday: day.isSame(now.value, 'day'),\n weekdayLabel: formatDate({\n date,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n }),\n dayLabel: formatDate({ date, locale: props.locale || 'en', format: props.dayFormat! }),\n }\n }),\n)\n\nconst slotLabels = computed(() =>\n intervals.value.map((slot) =>\n formatDate({\n date: `${dayColumns.value[0]?.key} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n }),\n ),\n)\n\nconst businessHoursMods = computed(() =>\n days.value.map((date) =>\n intervals.value.map((slot) =>\n getBusinessHoursMod({\n time: slot.startTime,\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(date).day() as DayOfWeek,\n }),\n ),\n ),\n)\n\nconst eventResize = useEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex, group) => {\n const slotDate = dayjs(group).format('YYYY-MM-DD')\n const startSlot = intervals.value[startIndex]\n const endSlot = intervals.value[endIndex]\n\n if (startSlot && endSlot) {\n emit(\n 'slotDragEnd',\n `${slotDate} ${startSlot.startTime}` as DateTimeStringValue,\n `${slotDate} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n const target = weekRoot.value?.querySelector<HTMLElement>(\n `[data-week-day-index=\"0\"][data-time-slot-index=\"${targetIndex}\"]`,\n )\n\n scrollSlotIntoView(target)\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = slotDropTarget.dropTarget.value\n return target\n ? {\n date: target.date,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n slotDropTarget.reset()\n emit('eventDragEnd')\n },\n})\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst setDaySlotsContainer = (date: string) => (element: unknown) => {\n if (element instanceof HTMLElement) {\n daySlotsContainers.set(date, element)\n } else {\n daySlotsContainers.delete(date)\n }\n}\n\nconst focusWeekControl = (nativeEvent: KeyboardEvent, selector: string) => {\n const control = weekRoot.value?.querySelector<HTMLButtonElement>(selector)\n\n if (!control || control.disabled) {\n return\n }\n\n nativeEvent.preventDefault()\n control.focus()\n}\n\nconst handleDayLabelKeydown = (nativeEvent: KeyboardEvent, dayIndex: number) => {\n const next =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n\n if (next >= 0 && next < days.value.length) {\n focusWeekControl(nativeEvent, `[data-weekday-index=\"${next}\"]`)\n }\n}\n\nconst handleAllDaySlotKeydown = (nativeEvent: KeyboardEvent, dayIndex: number) => {\n if (nativeEvent.key === 'ArrowDown') {\n focusWeekControl(nativeEvent, `[data-week-day-index=\"${dayIndex}\"][data-time-slot-index=\"0\"]`)\n return\n }\n\n const next =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n\n if (next >= 0 && next < days.value.length) {\n focusWeekControl(nativeEvent, `[data-all-day-index=\"${next}\"]`)\n }\n}\n\nconst handleTimeSlotKeydown = (nativeEvent: KeyboardEvent, dayIndex: number, slotIndex: number) => {\n if (nativeEvent.key === 'ArrowUp' && slotIndex === 0 && withAllDaySlots.value) {\n focusWeekControl(nativeEvent, `[data-all-day-index=\"${dayIndex}\"]`)\n return\n }\n\n const nextDay =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : dayIndex\n const nextSlot =\n nativeEvent.key === 'ArrowDown'\n ? slotIndex + 1\n : nativeEvent.key === 'ArrowUp'\n ? slotIndex - 1\n : slotIndex\n\n if (\n nextDay >= 0 &&\n nextDay < days.value.length &&\n nextSlot >= 0 &&\n nextSlot < intervals.value.length &&\n (nextDay !== dayIndex || nextSlot !== slotIndex)\n ) {\n focusWeekControl(\n nativeEvent,\n `[data-week-day-index=\"${nextDay}\"][data-time-slot-index=\"${nextSlot}\"]`,\n )\n }\n}\n\nconst clickDayLabel = (date: string) => {\n emit('viewChange', 'day')\n emit('dateChange', date as DateStringValue)\n}\n\nconst clickTimeSlot = (date: string, slotIndex: number, nativeEvent: MouseEvent) => {\n const datePart = dayjs(date).format('YYYY-MM-DD')\n const slot = intervals.value[slotIndex]\n\n emit('timeSlotClick', {\n slotStart: `${datePart} ${slot.startTime}` as DateTimeStringValue,\n slotEnd: `${datePart} ${slot.endTime}` as DateTimeStringValue,\n nativeEvent,\n })\n}\n\nconst emitDrop = (nativeEvent: DragEvent, target: DateTimeStringValue) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventTo(event, target))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, target)\n }\n}\n\nconst emitAllDayDrop = (nativeEvent: DragEvent, date: string) => {\n nativeEvent.preventDefault()\n const dayKey = dayjs(date).format('YYYY-MM-DD')\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventToAllDay(event, dayKey))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, `${dayKey} 00:00:00` as DateTimeStringValue)\n }\n}\n\nconst dropInput = (date: string) => ({\n container: daySlotsContainers.get(date),\n date: dayjs(date).format('YYYY-MM-DD') as DateStringValue,\n intervals: intervals.value,\n})\n\nconst handleDayDragOver = (nativeEvent: DragEvent, date: string) =>\n slotDropTarget.dragOver(nativeEvent, dropInput(date))\n\nconst handleDayDragLeave = (nativeEvent: DragEvent, date: string) =>\n slotDropTarget.dragLeave(nativeEvent, daySlotsContainers.get(date))\n\nconst handleDayDrop = (nativeEvent: DragEvent, date: string) => {\n const target = slotDropTarget.drop(nativeEvent, dropInput(date))\n\n if (target) {\n emitDrop(nativeEvent, target.target)\n }\n}\n\nconst allDayEventStyle = (position: { offset: number; width: number; row: number }) => ({\n position: 'absolute' as const,\n insetInlineStart: `${position.offset}%`,\n width: `${position.width}%`,\n top: `${position.row * ALL_DAY_ROW_HEIGHT}px`,\n})\n\nconst backgroundEventStyle = (position: { top: number; height: number }) => ({\n top: `${position.top}%`,\n bottom: `${100 - position.top - position.height}%`,\n minHeight: '1px',\n width: '100%',\n})\n\nconst regularEventStyle = (event: ScheduleEventData & { position: any }) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const top = resizePosition?.top ?? event.position.top\n const height = resizePosition?.height ?? event.position.height\n\n return {\n position: 'absolute' as const,\n top: `${top}%`,\n bottom: `${100 - top - height}%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n }\n}\n\nconst startEventResize = (\n event: ScheduleEventData & { position: any },\n date: string,\n edge: 'top' | 'bottom',\n pointerEvent: PointerEvent,\n) => {\n const container = daySlotsContainers.get(date)\n\n if (!container) {\n return\n }\n\n eventResize.handleResizeStart({\n event,\n edge,\n container,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: dayjs(date).format('YYYY-MM-DD'),\n pointerEvent,\n })\n}\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickResizableEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n clickEvent(event, nativeEvent)\n }\n}\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n !isStatic.value && props.withEventsDragAndDrop === true && (props.canDragEvent?.(event) ?? true)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('weekView') }\"\n :mod=\"[{ static: isStatic, 'slot-dragging': slotDragSelect.isDragging() }, (attrs as any).mod]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"week\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'week')\"\n :control=\"{ title: weekLabel }\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"emit('dateChange', $event)\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <Box\n :root-ref=\"setWeekRoot\"\n v-bind=\"getStyles('weekViewRoot', { style: rootVars })\"\n :mod=\"{ 'with-weekends': props.withWeekendDays }\"\n >\n <ScrollArea.Autosize\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('weekViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div v-bind=\"getStyles('weekViewHeader')\">\n <div v-bind=\"getStyles('weekViewCorner')\">\n <template v-if=\"withWeekNumber\">\n <div v-bind=\"getStyles('weekViewWeekLabel')\">\n {{ getLabel('week', props.labels) }}\n </div>\n <div v-bind=\"getStyles('weekViewWeekNumber')\">{{ getWeekNumber(days) }}</div>\n </template>\n </div>\n\n <UnstyledButton\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDayLabel')\"\n :data-weekday-index=\"dayIndex\"\n :data-weekend=\"column.isWeekend || undefined\"\n :aria-label=\"`${getLabel('weekday', props.labels)} ${column.key}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleDayLabelKeydown($event, dayIndex)\"\n @click=\"isStatic ? undefined : clickDayLabel(column.date)\"\n >\n <span v-bind=\"staticStyles('weekViewDayWeekday')\">{{ column.weekdayLabel }}</span>\n <span\n v-bind=\"staticStyles('weekViewDayNumber')\"\n :data-today=\"column.isToday || undefined\"\n >\n {{ column.dayLabel }}\n </span>\n </UnstyledButton>\n </div>\n\n <div v-if=\"withAllDaySlots\" v-bind=\"getStyles('weekViewAllDaySlots')\">\n <div v-bind=\"getStyles('weekViewAllDaySlotsLabel')\">\n {{ getLabel('allDay', props.labels) }}\n </div>\n\n <div v-bind=\"getStyles('weekViewAllDaySlotsList')\">\n <div v-bind=\"getStyles('weekViewAllDaySlotsEvents')\">\n <ScheduleEvent\n v-for=\"event in grouped.allDayEvents\"\n :key=\"event.id\"\n :event=\"event\"\n nowrap\n :hanging=\"event.position.hanging\"\n :mode=\"props.mode\"\n :style=\"allDayEventStyle(event.position)\"\n :draggable=\"isDraggableEvent(event)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(event, $event)\"\n />\n </div>\n\n <UnstyledButton\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDaySlot')\"\n :disabled=\"isStatic\"\n :data-all-day-index=\"dayIndex\"\n :aria-label=\"`${getLabel('allDay', props.labels)} ${column.key}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleAllDaySlotKeydown($event, dayIndex)\"\n @click=\"emit('allDaySlotClick', column.date, $event)\"\n @dragover.prevent\n @drop=\"emitAllDayDrop($event, column.date)\"\n />\n </div>\n </div>\n\n <Box v-bind=\"getStyles('weekViewInner')\">\n <div v-bind=\"getStyles('weekViewSlotLabels')\">\n <div\n v-for=\"(label, slotIndex) in slotLabels\"\n :key=\"slotIndex\"\n v-bind=\"staticStyles('weekViewSlotLabel')\"\n >\n {{ label }}\n </div>\n </div>\n\n <CurrentTimeIndicator\n v-if=\"props.withCurrentTimeIndicator && currentWeekdayIndex !== -1\"\n start-offset=\"calc(100% - (100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index) + 1) + ((var(--number-of-days) - var(--indicator-offset-index) + 1) * var(--indicator-labels-offset)))\"\n end-offset=\"calc((100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index)) - (var(--number-of-days) - var(--indicator-offset-index)) * var(--indicator-labels-offset))\"\n time-bubble-start-offset=\"calc(var(--week-view-slots-label-width) - var(--time-bubble-width))\"\n :current-time-format=\"props.slotLabelFormat\"\n :with-time-bubble=\"props.withCurrentTimeBubble\"\n :with-thumb=\"props.withCurrentTimeBubble ? currentWeekdayIndex !== 0 : true\"\n :locale=\"props.locale\"\n :start-time=\"props.startTime\"\n :end-time=\"props.endTime\"\n :interval-minutes=\"props.intervalMinutes\"\n :get-current-time=\"props.getCurrentTime\"\n v-bind=\"stylesApi\"\n />\n\n <div\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n v-bind=\"staticStyles('weekViewDay')\"\n >\n <div\n :ref=\"setDaySlotsContainer(column.date)\"\n v-bind=\"staticStyles('weekViewDaySlots')\"\n @dragover=\"withDragHandlers ? handleDayDragOver($event, column.date) : undefined\"\n @dragleave=\"withDragHandlers ? handleDayDragLeave($event, column.date) : undefined\"\n @drop=\"withDragHandlers ? handleDayDrop($event, column.date) : undefined\"\n >\n <UnstyledButton\n v-for=\"(slot, slotIndex) in intervals\"\n :key=\"slot.startTime\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDaySlot')\"\n :data-week-day-index=\"dayIndex\"\n :data-time-slot-index=\"slotIndex\"\n :data-drag-slot-index=\"withSlotSelect ? slotIndex : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? column.key : undefined\"\n :data-drop-target=\"slotDropTarget.isTarget(column.key, slotIndex) || undefined\"\n :data-drag-selected=\"\n slotDragSelect.isSlotSelected(slotIndex, column.key) || undefined\n \"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n :disabled=\"isStatic\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${column.key} ${slot.startTime} - ${slot.endTime}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 && slotIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleTimeSlotKeydown($event, dayIndex, slotIndex)\"\n @click=\"clickTimeSlot(column.date, slotIndex, $event)\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown($event, slotIndex, column.key)\n : undefined\n \"\n @dragover.prevent\n />\n\n <div\n v-for=\"event in grouped.backgroundEvents[column.date] || []\"\n :key=\"`background-${event.id}`\"\n v-bind=\"staticStyles('weekViewBackgroundEvent')\"\n :style=\"backgroundEventStyle(event.position)\"\n />\n\n <ScheduleEvent\n v-for=\"event in grouped.regularEvents[column.date] || []\"\n :key=\"`${event.id}-${column.date}`\"\n :event=\"event\"\n auto-size\n :mode=\"props.mode\"\n :style=\"regularEventStyle(event)\"\n :draggable=\"isDraggableEvent(event)\"\n :with-resize=\"eventResize.isResizableEvent(event)\"\n :is-resizing=\"eventResize.getResizePosition(event.id) !== null\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickResizableEvent(event, $event)\"\n @resize-start=\"\n (edge, pointerEvent) => startEventResize(event, column.date, edge, pointerEvent)\n \"\n />\n </div>\n </div>\n </Box>\n </ScrollArea.Autosize>\n </Box>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { WeekViewOwnProps } from './WeekView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeIndicator: true,\n withCurrentTimeBubble: true,\n slotHeight: 64,\n firstDayOfWeek: 1,\n weekdayFormat: 'ddd',\n dayFormat: 'D',\n withWeekNumber: true,\n withAllDaySlots: true,\n allDaySlotHeight: 44,\n weekendDays: [0, 6],\n withWeekendDays: true,\n weekLabelFormat: 'MMM D',\n} satisfies Partial<WeekViewOwnProps>\n\n/** Vertical step between stacked all-day event rows, in px. */\nconst ALL_DAY_ROW_HEIGHT = 22\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotHeight, allDaySlotHeight, allDaySlotsHeight }) => ({\n weekView: {\n '--week-view-radius': resolveScheduleRadius(radius),\n '--week-view-slot-height': cssSize(slotHeight),\n '--week-view-all-day-slots-height': cssSize(allDaySlotsHeight ?? allDaySlotHeight),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, ALL_DAY_ROW_HEIGHT }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { useEventResize } from '../../hooks/use-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n} from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getDayTimeIntervals,\n getWeekDays,\n getWeekNumber,\n} from '../../utils'\nimport { CurrentTimeIndicator } from '../CurrentTimeIndicator'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { provideScheduleDragState } from '../DragContext'\nimport {\n getDropEvent,\n getExpandedEvents,\n moveEventTo,\n moveEventToAllDay,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { useSlotDropTarget } from '../use-slot-drop-target'\nimport { getWeekLabel } from './get-week-label/get-week-label'\nimport { getWeekViewEvents } from './get-week-view-events/get-week-view-events'\nimport type { WeekViewEmits, WeekViewSlots } from './WeekView.types'\nimport classes from './WeekView.module.css'\n\ndefineOptions({\n name: 'WeekView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<WeekViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n slotHeight: undefined,\n businessHours: undefined,\n canDragEvent: undefined,\n startScrollTime: undefined,\n canResizeEvent: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n dayFormat: undefined,\n withWeekNumber: undefined,\n withWeekNumbers: undefined,\n withAllDaySlots: undefined,\n withAllDaySlot: undefined,\n allDaySlotHeight: undefined,\n allDaySlotsHeight: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n weekLabelFormat: undefined,\n renderWeekLabel: undefined,\n scrollAreaProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<WeekViewSlots>()\n\nconst emit = defineEmits<WeekViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('WeekView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'WeekView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'weekView',\n})\n\n/**\n * Cached per selector: a week renders one slot per day and interval, and rebuilding the same\n * class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst weekRoot = ref<HTMLElement | null>(null)\nconst setWeekRoot = (node: Element | null) => {\n weekRoot.value = node instanceof HTMLElement ? node : null\n}\n\nconst daySlotsContainers = new Map<string, HTMLElement>()\n\nconst slotDropTarget = useSlotDropTarget()\n\nconst isStatic = computed(() => props.mode === 'static')\n\n/** The plural names are the deprecated aliases; the canonical prop wins when both are set. */\nconst withWeekNumber = computed(() => props.withWeekNumbers ?? props.withWeekNumber)\nconst withAllDaySlots = computed(() => props.withAllDaySlot ?? props.withAllDaySlots)\n\nconst days = computed(() =>\n getWeekDays({\n week: props.date,\n firstDayOfWeek: props.firstDayOfWeek,\n withWeekendDays: props.withWeekendDays,\n weekendDays: props.weekendDays,\n }),\n)\n\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? dayjs()))\n\nconst currentWeekdayIndex = computed(() => {\n if (!props.withCurrentTimeIndicator) {\n return -1\n }\n\n return props.forceCurrentTimeIndicator\n ? days.value.findIndex((date) => dayjs(date).day() === now.value.day())\n : days.value.findIndex((date) => dayjs(date).isSame(now.value, 'day'))\n})\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n dayjs(days.value[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),\n dayjs(days.value.at(-1)).endOf('day').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst grouped = computed(() =>\n getWeekViewEvents({\n date: props.date,\n events: expandedEvents.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n }),\n)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst withSlotSelect = computed(() => Boolean(props.withDragSlotSelect) && !isStatic.value)\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst weekLabel = computed(() =>\n getWeekLabel({\n weekdays: days.value,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat!,\n renderWeekLabel: slots.weekLabel\n ? (payload) => slots.weekLabel!(payload)\n : props.renderWeekLabel,\n }),\n)\n\nconst rootVars = computed(() => ({\n '--number-of-days': String(days.value.length),\n '--indicator-offset-index':\n currentWeekdayIndex.value === -1 ? undefined : String(currentWeekdayIndex.value + 1),\n}))\n\n/**\n * Everything the template needs per day column.\n *\n * `days` holds `YYYY-MM-DD 00:00:00` strings, so the grid used to re-derive the day key, the\n * weekend flag and both labels for each of the hundreds of slots it renders. Doing it once per\n * day instead is what keeps a drag re-render cheap.\n */\nconst dayColumns = computed(() =>\n days.value.map((date) => {\n const day = dayjs(date)\n\n return {\n date,\n key: day.format('YYYY-MM-DD') as DateStringValue,\n isWeekend: props.weekendDays!.includes(day.day() as DayOfWeek),\n isToday: day.isSame(now.value, 'day'),\n weekdayLabel: formatDate({\n date,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n }),\n dayLabel: formatDate({ date, locale: props.locale || 'en', format: props.dayFormat! }),\n }\n }),\n)\n\nconst slotLabels = computed(() =>\n intervals.value.map((slot) =>\n formatDate({\n date: `${dayColumns.value[0]?.key} ${slot.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n }),\n ),\n)\n\nconst businessHoursMods = computed(() =>\n days.value.map((date) =>\n intervals.value.map((slot) =>\n getBusinessHoursMod({\n time: slot.startTime,\n businessHours: props.businessHours || ['09:00:00', '17:00:00'],\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(date).day() as DayOfWeek,\n }),\n ),\n ),\n)\n\nconst eventResize = useEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nconst slotDragSelect = useSlotDragSelect({\n enabled: () => withSlotSelect.value,\n onDragEnd: (startIndex, endIndex, group) => {\n const slotDate = dayjs(group).format('YYYY-MM-DD')\n const startSlot = intervals.value[startIndex]\n const endSlot = intervals.value[endIndex]\n\n if (startSlot && endSlot) {\n emit(\n 'slotDragEnd',\n `${slotDate} ${startSlot.startTime}` as DateTimeStringValue,\n `${slotDate} ${endSlot.endTime}` as DateTimeStringValue,\n )\n }\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n const target = weekRoot.value?.querySelector<HTMLElement>(\n `[data-week-day-index=\"0\"][data-time-slot-index=\"${targetIndex}\"]`,\n )\n\n scrollSlotIntoView(target)\n})\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = slotDropTarget.dropTarget.value\n return target\n ? {\n date: target.date,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotDragSelect.isDragging(),\n onDragEnd: () => {\n slotDropTarget.reset()\n emit('eventDragEnd')\n },\n})\n\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) =>\n emit('eventClick', event, nativeEvent)\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst setDaySlotsContainer = (date: string) => (element: unknown) => {\n if (element instanceof HTMLElement) {\n daySlotsContainers.set(date, element)\n } else {\n daySlotsContainers.delete(date)\n }\n}\n\nconst focusWeekControl = (nativeEvent: KeyboardEvent, selector: string) => {\n const control = weekRoot.value?.querySelector<HTMLButtonElement>(selector)\n\n if (!control || control.disabled) {\n return\n }\n\n nativeEvent.preventDefault()\n control.focus()\n}\n\nconst handleDayLabelKeydown = (nativeEvent: KeyboardEvent, dayIndex: number) => {\n const next =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n\n if (next >= 0 && next < days.value.length) {\n focusWeekControl(nativeEvent, `[data-weekday-index=\"${next}\"]`)\n }\n}\n\nconst handleAllDaySlotKeydown = (nativeEvent: KeyboardEvent, dayIndex: number) => {\n if (nativeEvent.key === 'ArrowDown') {\n focusWeekControl(nativeEvent, `[data-week-day-index=\"${dayIndex}\"][data-time-slot-index=\"0\"]`)\n return\n }\n\n const next =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : -1\n\n if (next >= 0 && next < days.value.length) {\n focusWeekControl(nativeEvent, `[data-all-day-index=\"${next}\"]`)\n }\n}\n\nconst handleTimeSlotKeydown = (nativeEvent: KeyboardEvent, dayIndex: number, slotIndex: number) => {\n if (nativeEvent.key === 'ArrowUp' && slotIndex === 0 && withAllDaySlots.value) {\n focusWeekControl(nativeEvent, `[data-all-day-index=\"${dayIndex}\"]`)\n return\n }\n\n const nextDay =\n nativeEvent.key === 'ArrowRight'\n ? dayIndex + 1\n : nativeEvent.key === 'ArrowLeft'\n ? dayIndex - 1\n : dayIndex\n const nextSlot =\n nativeEvent.key === 'ArrowDown'\n ? slotIndex + 1\n : nativeEvent.key === 'ArrowUp'\n ? slotIndex - 1\n : slotIndex\n\n if (\n nextDay >= 0 &&\n nextDay < days.value.length &&\n nextSlot >= 0 &&\n nextSlot < intervals.value.length &&\n (nextDay !== dayIndex || nextSlot !== slotIndex)\n ) {\n focusWeekControl(\n nativeEvent,\n `[data-week-day-index=\"${nextDay}\"][data-time-slot-index=\"${nextSlot}\"]`,\n )\n }\n}\n\nconst clickDayLabel = (date: string) => {\n emit('viewChange', 'day')\n emit('dateChange', date as DateStringValue)\n}\n\nconst clickTimeSlot = (date: string, slotIndex: number, nativeEvent: MouseEvent) => {\n const datePart = dayjs(date).format('YYYY-MM-DD')\n const slot = intervals.value[slotIndex]\n\n emit('timeSlotClick', {\n slotStart: `${datePart} ${slot.startTime}` as DateTimeStringValue,\n slotEnd: `${datePart} ${slot.endTime}` as DateTimeStringValue,\n nativeEvent,\n })\n}\n\nconst emitDrop = (nativeEvent: DragEvent, target: DateTimeStringValue) => {\n nativeEvent.preventDefault()\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventTo(event, target))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, target)\n }\n}\n\nconst emitAllDayDrop = (nativeEvent: DragEvent, date: string) => {\n nativeEvent.preventDefault()\n const dayKey = dayjs(date).format('YYYY-MM-DD')\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', moveEventToAllDay(event, dayKey))\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', nativeEvent.dataTransfer, `${dayKey} 00:00:00` as DateTimeStringValue)\n }\n}\n\nconst dropInput = (date: string) => ({\n container: daySlotsContainers.get(date),\n date: dayjs(date).format('YYYY-MM-DD') as DateStringValue,\n intervals: intervals.value,\n})\n\nconst handleDayDragOver = (nativeEvent: DragEvent, date: string) =>\n slotDropTarget.dragOver(nativeEvent, dropInput(date))\n\nconst handleDayDragLeave = (nativeEvent: DragEvent, date: string) =>\n slotDropTarget.dragLeave(nativeEvent, daySlotsContainers.get(date))\n\nconst handleDayDrop = (nativeEvent: DragEvent, date: string) => {\n const target = slotDropTarget.drop(nativeEvent, dropInput(date))\n\n if (target) {\n emitDrop(nativeEvent, target.target)\n }\n}\n\nconst allDayEventStyle = (position: { offset: number; width: number; row: number }) => ({\n position: 'absolute' as const,\n insetInlineStart: `${position.offset}%`,\n width: `${position.width}%`,\n top: `${position.row * ALL_DAY_ROW_HEIGHT}px`,\n})\n\nconst backgroundEventStyle = (position: { top: number; height: number }) => ({\n top: `${position.top}%`,\n bottom: `${100 - position.top - position.height}%`,\n minHeight: '1px',\n width: '100%',\n})\n\nconst regularEventStyle = (event: ScheduleEventData & { position: any }) => {\n const resizePosition = eventResize.getResizePosition(event.id)\n const top = resizePosition?.top ?? event.position.top\n const height = resizePosition?.height ?? event.position.height\n\n return {\n position: 'absolute' as const,\n top: `${top}%`,\n bottom: `${100 - top - height}%`,\n minHeight: '1px',\n width: `${event.position.width}%`,\n insetInlineStart: `${event.position.offset}%`,\n }\n}\n\nconst startEventResize = (\n event: ScheduleEventData & { position: any },\n date: string,\n edge: 'top' | 'bottom',\n pointerEvent: PointerEvent,\n) => {\n const container = daySlotsContainers.get(date)\n\n if (!container) {\n return\n }\n\n eventResize.handleResizeStart({\n event,\n edge,\n container,\n originalTop: event.position.top,\n originalHeight: event.position.height,\n eventDate: dayjs(date).format('YYYY-MM-DD'),\n pointerEvent,\n })\n}\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickResizableEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!eventResize.wasResizing()) {\n clickEvent(event, nativeEvent)\n }\n}\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n !isStatic.value && props.withEventsDragAndDrop === true && (props.canDragEvent?.(event) ?? true)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('weekView') }\"\n :mod=\"[{ static: isStatic, 'slot-dragging': slotDragSelect.isDragging() }, (attrs as any).mod]\"\n >\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"week\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'week')\"\n :control=\"{ title: weekLabel }\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"emit('dateChange', $event)\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <Box\n :root-ref=\"setWeekRoot\"\n v-bind=\"getStyles('weekViewRoot', { style: rootVars })\"\n :mod=\"{ 'with-weekends': props.withWeekendDays }\"\n >\n <ScrollArea.Autosize\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('weekViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div v-bind=\"getStyles('weekViewHeader')\">\n <div v-bind=\"getStyles('weekViewCorner')\">\n <template v-if=\"withWeekNumber\">\n <div v-bind=\"getStyles('weekViewWeekLabel')\">\n {{ getLabel('week', props.labels) }}\n </div>\n <div v-bind=\"getStyles('weekViewWeekNumber')\">{{ getWeekNumber(days) }}</div>\n </template>\n </div>\n\n <UnstyledButton\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDayLabel')\"\n :data-weekday-index=\"dayIndex\"\n :data-weekend=\"column.isWeekend || undefined\"\n :aria-label=\"`${getLabel('weekday', props.labels)} ${column.key}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleDayLabelKeydown($event, dayIndex)\"\n @click=\"isStatic ? undefined : clickDayLabel(column.date)\"\n >\n <span v-bind=\"staticStyles('weekViewDayWeekday')\">{{ column.weekdayLabel }}</span>\n <span\n v-bind=\"staticStyles('weekViewDayNumber')\"\n :data-today=\"column.isToday || undefined\"\n >\n {{ column.dayLabel }}\n </span>\n </UnstyledButton>\n </div>\n\n <div v-if=\"withAllDaySlots\" v-bind=\"getStyles('weekViewAllDaySlots')\">\n <div v-bind=\"getStyles('weekViewAllDaySlotsLabel')\">\n {{ getLabel('allDay', props.labels) }}\n </div>\n\n <div v-bind=\"getStyles('weekViewAllDaySlotsList')\">\n <div v-bind=\"getStyles('weekViewAllDaySlotsEvents')\">\n <ScheduleEvent\n v-for=\"event in grouped.allDayEvents\"\n :key=\"event.id\"\n :event=\"event\"\n nowrap\n :hanging=\"event.position.hanging\"\n :mode=\"props.mode\"\n :style=\"allDayEventStyle(event.position)\"\n :draggable=\"isDraggableEvent(event)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickEvent(event, $event)\"\n />\n </div>\n\n <UnstyledButton\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDaySlot')\"\n :disabled=\"isStatic\"\n :data-all-day-index=\"dayIndex\"\n :aria-label=\"`${getLabel('allDay', props.labels)} ${column.key}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleAllDaySlotKeydown($event, dayIndex)\"\n @click=\"emit('allDaySlotClick', column.date, $event)\"\n @dragover.prevent\n @drop=\"emitAllDayDrop($event, column.date)\"\n />\n </div>\n </div>\n\n <Box v-bind=\"getStyles('weekViewInner')\">\n <div v-bind=\"getStyles('weekViewSlotLabels')\">\n <div\n v-for=\"(label, slotIndex) in slotLabels\"\n :key=\"slotIndex\"\n v-bind=\"staticStyles('weekViewSlotLabel')\"\n >\n {{ label }}\n </div>\n </div>\n\n <CurrentTimeIndicator\n v-if=\"props.withCurrentTimeIndicator && currentWeekdayIndex !== -1\"\n start-offset=\"calc(100% - (100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index) + 1) + ((var(--number-of-days) - var(--indicator-offset-index) + 1) * var(--indicator-labels-offset)))\"\n end-offset=\"calc((100% / var(--number-of-days)) * (var(--number-of-days) - var(--indicator-offset-index)) - (var(--number-of-days) - var(--indicator-offset-index)) * var(--indicator-labels-offset))\"\n time-bubble-start-offset=\"calc(var(--week-view-slots-label-width) - var(--time-bubble-width))\"\n :current-time-format=\"props.slotLabelFormat\"\n :with-time-bubble=\"props.withCurrentTimeBubble\"\n :with-thumb=\"props.withCurrentTimeBubble ? currentWeekdayIndex !== 0 : true\"\n :locale=\"props.locale\"\n :start-time=\"props.startTime\"\n :end-time=\"props.endTime\"\n :interval-minutes=\"props.intervalMinutes\"\n :get-current-time=\"props.getCurrentTime\"\n v-bind=\"stylesApi\"\n />\n\n <div\n v-for=\"(column, dayIndex) in dayColumns\"\n :key=\"column.date\"\n v-bind=\"staticStyles('weekViewDay')\"\n >\n <div\n :ref=\"setDaySlotsContainer(column.date)\"\n v-bind=\"staticStyles('weekViewDaySlots')\"\n @dragover=\"withDragHandlers ? handleDayDragOver($event, column.date) : undefined\"\n @dragleave=\"withDragHandlers ? handleDayDragLeave($event, column.date) : undefined\"\n @drop=\"withDragHandlers ? handleDayDrop($event, column.date) : undefined\"\n >\n <UnstyledButton\n v-for=\"(slot, slotIndex) in intervals\"\n :key=\"slot.startTime\"\n type=\"button\"\n v-bind=\"staticStyles('weekViewDaySlot')\"\n :data-week-day-index=\"dayIndex\"\n :data-time-slot-index=\"slotIndex\"\n :data-drag-slot-index=\"withSlotSelect ? slotIndex : undefined\"\n :data-drag-slot-group=\"withSlotSelect ? column.key : undefined\"\n :data-drop-target=\"slotDropTarget.isTarget(column.key, slotIndex) || undefined\"\n :data-drag-selected=\"\n slotDragSelect.isSlotSelected(slotIndex, column.key) || undefined\n \"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n :disabled=\"isStatic\"\n :aria-label=\"`${getLabel('timeSlot', props.labels)} ${column.key} ${slot.startTime} - ${slot.endTime}`\"\n :tabindex=\"isStatic ? -1 : dayIndex === 0 && slotIndex === 0 ? 0 : -1\"\n @keydown=\"isStatic ? undefined : handleTimeSlotKeydown($event, dayIndex, slotIndex)\"\n @click=\"clickTimeSlot(column.date, slotIndex, $event)\"\n @pointerdown=\"\n withSlotSelect\n ? slotDragSelect.handleSlotPointerDown($event, slotIndex, column.key)\n : undefined\n \"\n @dragover.prevent\n />\n\n <div\n v-for=\"event in grouped.backgroundEvents[column.date] || []\"\n :key=\"`background-${event.id}`\"\n v-bind=\"staticStyles('weekViewBackgroundEvent')\"\n :style=\"backgroundEventStyle(event.position)\"\n />\n\n <ScheduleEvent\n v-for=\"event in grouped.regularEvents[column.date] || []\"\n :key=\"`${event.id}-${column.date}`\"\n :event=\"event\"\n auto-size\n :mode=\"props.mode\"\n :style=\"regularEventStyle(event)\"\n :draggable=\"isDraggableEvent(event)\"\n :with-resize=\"eventResize.isResizableEvent(event)\"\n :is-resizing=\"eventResize.getResizePosition(event.id) !== null\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"clickResizableEvent(event, $event)\"\n @resize-start=\"\n (edge, pointerEvent) => startEventResize(event, column.date, edge, pointerEvent)\n \"\n />\n </div>\n </div>\n </Box>\n </ScrollArea.Autosize>\n </Box>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport WeekViewComponent, { varsResolver } from './WeekView.vue'\nimport type { WeekViewFactory } from './WeekView.types'\nimport classes from './WeekView.module.css'\n\nexport const WeekView = factory<WeekViewFactory>(WeekViewComponent, { classes, varsResolver })\n\nexport type {\n WeekLabelPayload,\n WeekViewCssVariables,\n WeekViewEmits,\n WeekViewFactory,\n WeekViewOwnProps,\n WeekViewOwnStylesNames,\n WeekViewProps,\n WeekViewSlots,\n WeekViewStylesNames,\n} from './WeekView.types'\n","import dayjs from 'dayjs'\nimport { AnyDateValue, DateStringValue, ScheduleEventData } from '../../../types'\nimport { isMultidayEvent, validateEvent } from '../../../utils'\n\nexport type GroupedEvents = Record<DateStringValue, ScheduleEventData[]>\n\nfunction groupEventByDate(event: ScheduleEventData, groupedEvents: GroupedEvents) {\n if (isMultidayEvent(event)) {\n const startDate = dayjs(event.start).startOf('day')\n const endDate = dayjs(event.end).startOf('day')\n\n for (\n let date = startDate;\n date.isBefore(endDate) || date.isSame(endDate);\n date = date.add(1, 'day')\n ) {\n const dateKey = date.format('YYYY-MM-DD')\n if (!groupedEvents[dateKey]) {\n groupedEvents[dateKey] = []\n }\n groupedEvents[dateKey].push(event)\n }\n\n return\n }\n\n const eventDate = dayjs(event.start).format('YYYY-MM-DD')\n if (!groupedEvents[eventDate]) {\n groupedEvents[eventDate] = []\n }\n groupedEvents[eventDate].push(event)\n}\n\ninterface GetYearViewEventsInput {\n date: AnyDateValue\n events: ScheduleEventData[] | undefined\n}\n\nexport function getYearViewEvents({ date, events }: GetYearViewEventsInput) {\n const groupedEvents: GroupedEvents = {}\n\n if (events === undefined) {\n return groupedEvents\n }\n\n const ids = new Set<string | number>()\n\n for (const event of events) {\n if (dayjs(event.start).isSame(dayjs(date), 'year')) {\n groupEventByDate(validateEvent(event), groupedEvents)\n\n if (!ids.has(event.id)) {\n ids.add(event.id)\n } else {\n throw new Error(`[@mantine/schedule] YearView: Duplicated event ids found: ${event.id}`)\n }\n }\n }\n\n return groupedEvents\n}\n",".yearView {\n --year-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --year-view-font-size: var(--mantine-font-size-sm);\n container-type: inline-size;\n\n @mixin where-light {\n --year-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --year-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.yearViewMonths {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n\n @container (width <= 850px) {\n --year-view-font-size: calc(var(--mantine-font-size-sm) - 2px);\n }\n\n @container (width <= 750px) {\n grid-template-columns: repeat(2, 1fr);\n --year-view-font-size: var(--mantine-font-size-xs);\n }\n\n @container (width <= 520px) {\n --year-view-font-size: calc(var(--mantine-font-size-xs) - 2px);\n }\n\n @container (width <= 420px) {\n grid-template-columns: 1fr;\n --year-view-font-size: var(--mantine-font-size-xs);\n }\n}\n\n.yearViewMonth {\n --week-numbers-offset: 0rem;\n --day-base-color: var(--mantine-color-text);\n --day-dimmed-color: alpha(var(--day-base-color), 0.35);\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 28px;\n }\n\n min-width: 0;\n border: 1px solid var(--year-view-border-color);\n padding: var(--mantine-spacing-md);\n margin-top: -1px;\n margin-inline-start: -1px;\n\n &:where(:nth-child(3n + 1)) {\n margin-inline-start: 0;\n }\n\n &:where(:nth-child(-n + 3)) {\n margin-top: 0;\n }\n\n &:where(:nth-child(1)) {\n border-start-start-radius: var(--year-view-radius);\n }\n\n &:where(:nth-child(3)) {\n border-start-end-radius: var(--year-view-radius);\n }\n\n &:where(:nth-last-child(3)) {\n border-end-start-radius: var(--year-view-radius);\n }\n\n &:where(:nth-last-child(1)) {\n border-end-end-radius: var(--year-view-radius);\n }\n\n @container (width <= 750px) {\n border: 0;\n padding: 8px;\n margin: 0;\n\n &:where([data-with-week-numbers]) {\n --week-numbers-offset: 14px;\n }\n }\n\n @container (width <= 420px) {\n padding: 6px;\n }\n}\n\n.yearViewWeekdays {\n display: flex;\n}\n\n.yearViewWeek {\n display: flex;\n}\n\n.yearViewWeekNumber {\n flex: 0 0 calc(var(--week-numbers-offset) - rem(4px));\n margin-inline-end: rem(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--year-view-font-size);\n border-radius: var(--year-view-radius);\n padding: 4px;\n font-weight: var(--mantine-font-weight-medium);\n cursor: pointer;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @container (width <= 750px) {\n padding: 0;\n }\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewWeekday {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n height: 36px;\n font-size: var(--year-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-align: center;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n user-select: none;\n color: var(--day-dimmed-color);\n\n @container (width <= 750px) {\n height: auto;\n padding-block: 2px;\n }\n}\n\n.yearViewWeekdaysCorner {\n flex: 0 0 var(--week-numbers-offset);\n}\n\n.yearViewDay {\n flex: 0 0 calc(100% / 7 - var(--week-numbers-offset) / 7);\n padding: 4px;\n font-size: var(--year-view-font-size);\n color: var(--day-base-color);\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n aspect-ratio: 1;\n position: relative;\n\n @container (width <= 750px) {\n padding: 0;\n }\n\n &:where([data-day-placeholder]) {\n background-color: transparent;\n cursor: default;\n pointer-events: none;\n }\n\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n\n &:where([data-outside]) {\n color: var(--day-dimmed-color);\n }\n\n @mixin hover {\n &:where(:not([data-today], [data-day-placeholder])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n\n &:where([data-today]:not([data-outside])) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n\n @mixin hover {\n background-color: var(--mantine-primary-color-filled-hover);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewMonthCaption {\n padding-inline: var(--mantine-spacing-sm);\n width: 100%;\n padding-block: 4px;\n margin-bottom: 4px;\n font-size: var(--year-view-font-size);\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n border-radius: var(--year-view-radius);\n\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n\n.yearViewDayIndicators {\n position: absolute;\n bottom: 0;\n inset-inline: 0;\n display: flex;\n justify-content: center;\n padding-inline-start: 2px;\n}\n\n.yearViewDayIndicator {\n width: 8px;\n height: 8px;\n border-radius: 100%;\n margin-inline-start: -2px;\n border: 1px solid var(--mantine-color-body);\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { YearViewOwnProps } from './YearView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n firstDayOfWeek: 1,\n weekdayFormat: 'dd',\n weekendDays: [0, 6],\n withWeekDays: true,\n highlightToday: true,\n withOutsideDays: true,\n monthsListFormat: 'MMMM',\n} satisfies Partial<YearViewOwnProps>\n\nconst COLUMNS = 7\n\nconst MAX_DAY_INDICATORS = 3\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n yearView: {\n '--year-view-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver, COLUMNS, MAX_DAY_INDICATORS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { Box, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type { DateStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport {\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { getExpandedEvents, useStaticStyles } from '../shared'\nimport { getYearViewEvents } from './get-year-view-events/get-year-view-events'\nimport type { YearViewEmits } from './YearView.types'\nimport classes from './YearView.module.css'\n\ndefineOptions({\n name: 'YearView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<YearViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekDays: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n withOutsideDays: undefined,\n monthsListFormat: undefined,\n getDayProps: undefined,\n getWeekNumberProps: undefined,\n monthYearSelectProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<YearViewEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('YearView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'YearView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'yearView',\n})\n\n/**\n * Cached per selector: a year renders twelve month grids, so the same class list would\n * otherwise be rebuilt for several hundred day cells on every render.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst yearGrid = ref<HTMLElement | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst year = computed(() => dayjs(props.date).startOf('year'))\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n year.value.startOf('year').format('YYYY-MM-DD HH:mm:ss'),\n year.value.endOf('year').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst eventsByDay = computed(() =>\n getYearViewEvents({ date: year.value, events: expandedEvents.value }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\n/**\n * Every month with the grid offset its cells start at, so a single roving tabindex can walk\n * the whole year rather than restarting in each month.\n */\nconst months = computed(() => {\n let offset = 0\n\n return Array.from({ length: 12 }, (_, monthIndex) => {\n const month = year.value.month(monthIndex)\n const weeks = getMonthDays({\n month,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n })\n const entry = { month, monthIndex, weeks, offset }\n offset += weeks.length * COLUMNS\n return entry\n })\n})\n\nconst totalYearGridCells = computed(() =>\n months.value.reduce((total, { weeks }) => total + weeks.length * COLUMNS, 0),\n)\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n yearValue: year.value.year(),\n withMonths: false,\n labelFormat: 'YYYY',\n onYearChange: (value: number) => emit('dateChange', toDateString(year.value.year(value))),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\n\nconst dayProps = (date: string | Date) => props.getDayProps?.(toDateString(date)) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDateString(weekStart)) ?? {}\n\nconst isOutside = (date: string | Date, month: dayjs.Dayjs) => !dayjs(date).isSame(month, 'month')\n\nconst dayEvents = (date: string | Date) =>\n (eventsByDay.value[dayjs(date).format('YYYY-MM-DD')] || []).slice(0, MAX_DAY_INDICATORS)\n\nconst indicatorStyle = (event: ScheduleEventData) => ({\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n})\n\nconst handleDayKeydown = (nativeEvent: KeyboardEvent, gridIndex: number) => {\n handleGridKeydown({\n event: nativeEvent,\n index: gridIndex,\n columns: COLUMNS,\n total: totalYearGridCells.value,\n getControl: (index) => {\n const control =\n yearGrid.value?.querySelector<HTMLButtonElement>(`[data-year-grid-index=\"${index}\"]`) ??\n null\n // Days of the neighbouring months are visible but never focusable.\n return control?.hasAttribute('data-outside') ? null : control\n },\n })\n}\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('yearView') }\">\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"year\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'year')\"\n :control=\"headerControl\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <div ref=\"yearGrid\" v-bind=\"getStyles('yearViewMonths')\">\n <section\n v-for=\"{ month, weeks, offset } in months\"\n :key=\"month.month()\"\n v-bind=\"getStyles('yearViewMonth')\"\n :data-with-week-numbers=\"props.withWeekNumbers || undefined\"\n >\n <UnstyledButton\n type=\"button\"\n v-bind=\"getStyles('yearViewMonthCaption')\"\n @click=\"emit('monthClick', toDateString(month))\"\n >\n {{\n formatDate({\n date: month,\n locale: props.locale || 'en',\n format: props.monthsListFormat!,\n })\n }}\n </UnstyledButton>\n\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('yearViewWeekdays')\">\n <span v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('yearViewWeekdaysCorner')\" />\n <span\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"staticStyles('yearViewWeekday')\"\n >\n {{ weekday }}\n </span>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"staticStyles('yearViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n type=\"button\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('yearViewWeekNumber', { className: weekNumberProps(week[0]).class }),\n }\"\n @click=\"emit('weekNumberClick', toDateString(week[0]), $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <template v-for=\"(date, dayIndex) in week\" :key=\"toDateString(date)\">\n <div\n v-if=\"isOutside(date, month) && !props.withOutsideDays\"\n v-bind=\"staticStyles('yearViewDay')\"\n data-day-placeholder\n />\n <UnstyledButton\n v-else\n type=\"button\"\n v-bind=\"{\n ...dayProps(date),\n ...getStyles('yearViewDay', { className: dayProps(date).class }),\n }\"\n :disabled=\"isStatic\"\n :data-year-grid-index=\"offset + weekIndex * COLUMNS + dayIndex\"\n :data-outside=\"isOutside(date, month) || undefined\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(date).day() as DayOfWeek) || undefined\n \"\n :data-today=\"\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) || undefined\n \"\n :aria-label=\"\n formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\n \"\n :tabindex=\"\n isStatic || isOutside(date, month) ? -1 : dayjs(date).date() === 1 ? 0 : -1\n \"\n @keydown=\"\n isStatic\n ? undefined\n : handleDayKeydown($event, offset + weekIndex * COLUMNS + dayIndex)\n \"\n @click=\"emit('dayClick', toDateString(date), $event)\"\n >\n {{ dayjs(date).date() }}\n <span v-if=\"dayEvents(date).length\" v-bind=\"getStyles('yearViewDayIndicators')\">\n <span\n v-for=\"event in dayEvents(date)\"\n :key=\"event.id\"\n v-bind=\"getStyles('yearViewDayIndicator')\"\n :style=\"indicatorStyle(event)\"\n />\n </span>\n </UnstyledButton>\n </template>\n </div>\n </section>\n </div>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { resolveScheduleRadius } from '../shared'\nimport type { YearViewOwnProps } from './YearView.types'\n\nconst defaultProps = {\n mode: 'default',\n withHeader: true,\n recurrenceExpansionLimit: 2000,\n firstDayOfWeek: 1,\n weekdayFormat: 'dd',\n weekendDays: [0, 6],\n withWeekDays: true,\n highlightToday: true,\n withOutsideDays: true,\n monthsListFormat: 'MMMM',\n} satisfies Partial<YearViewOwnProps>\n\nconst COLUMNS = 7\n\nconst MAX_DAY_INDICATORS = 3\n\nconst varsResolver = createVarsResolver<any>((_theme, { radius }) => ({\n yearView: {\n '--year-view-radius': resolveScheduleRadius(radius),\n },\n}))\n\nexport { defaultProps, varsResolver, COLUMNS, MAX_DAY_INDICATORS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { Box, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport type { DateStringValue, DayOfWeek, ScheduleEventData } from '../../types'\nimport {\n formatDate,\n getMonthDays,\n getWeekNumber,\n getWeekdaysNames,\n toDateString,\n} from '../../utils'\nimport { handleGridKeydown } from '../keyboard-navigation'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport { getExpandedEvents, useStaticStyles } from '../shared'\nimport { getYearViewEvents } from './get-year-view-events/get-year-view-events'\nimport type { YearViewEmits } from './YearView.types'\nimport classes from './YearView.module.css'\n\ndefineOptions({\n name: 'YearView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<YearViewOwnProps>(), {\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n mode: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n recurrenceExpansionLimit: undefined,\n firstDayOfWeek: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekDays: undefined,\n consistentWeeks: undefined,\n highlightToday: undefined,\n withOutsideDays: undefined,\n monthsListFormat: undefined,\n getDayProps: undefined,\n getWeekNumberProps: undefined,\n monthYearSelectProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\nconst emit = defineEmits<YearViewEmits>()\n\nconst attrs = useAttrs()\n\nconst props = useProps('YearView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'YearView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'yearView',\n})\n\n/**\n * Cached per selector: a year renders twelve month grids, so the same class list would\n * otherwise be rebuilt for several hundred day cells on every render.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst yearGrid = ref<HTMLElement | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst year = computed(() => dayjs(props.date).startOf('year'))\n\nconst expandedEvents = computed(() =>\n getExpandedEvents(\n props.events,\n year.value.startOf('year').format('YYYY-MM-DD HH:mm:ss'),\n year.value.endOf('year').format('YYYY-MM-DD HH:mm:ss'),\n props.recurrenceExpansionLimit!,\n ),\n)\n\nconst eventsByDay = computed(() =>\n getYearViewEvents({ date: year.value, events: expandedEvents.value }),\n)\n\nconst weekdays = computed(() =>\n getWeekdaysNames({\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n firstDayOfWeek: props.firstDayOfWeek,\n }),\n)\n\n/**\n * Every month with the grid offset its cells start at, so a single roving tabindex can walk\n * the whole year rather than restarting in each month.\n */\nconst months = computed(() => {\n let offset = 0\n\n return Array.from({ length: 12 }, (_, monthIndex) => {\n const month = year.value.month(monthIndex)\n const weeks = getMonthDays({\n month,\n firstDayOfWeek: props.firstDayOfWeek,\n consistentWeeks: props.consistentWeeks,\n })\n const entry = { month, monthIndex, weeks, offset }\n offset += weeks.length * COLUMNS\n return entry\n })\n})\n\nconst totalYearGridCells = computed(() =>\n months.value.reduce((total, { weeks }) => total + weeks.length * COLUMNS, 0),\n)\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n yearValue: year.value.year(),\n withMonths: false,\n labelFormat: 'YYYY',\n onYearChange: (value: number) => emit('dateChange', toDateString(year.value.year(value))),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\n\nconst dayProps = (date: string | Date) => props.getDayProps?.(toDateString(date)) ?? {}\nconst weekNumberProps = (weekStart: string | Date) =>\n props.getWeekNumberProps?.(toDateString(weekStart)) ?? {}\n\nconst isOutside = (date: string | Date, month: dayjs.Dayjs) => !dayjs(date).isSame(month, 'month')\n\nconst dayEvents = (date: string | Date) =>\n (eventsByDay.value[dayjs(date).format('YYYY-MM-DD')] || []).slice(0, MAX_DAY_INDICATORS)\n\nconst indicatorStyle = (event: ScheduleEventData) => ({\n background: `var(--mantine-color-${event.color}-6, ${event.color})`,\n})\n\nconst handleDayKeydown = (nativeEvent: KeyboardEvent, gridIndex: number) => {\n handleGridKeydown({\n event: nativeEvent,\n index: gridIndex,\n columns: COLUMNS,\n total: totalYearGridCells.value,\n getControl: (index) => {\n const control =\n yearGrid.value?.querySelector<HTMLButtonElement>(`[data-year-grid-index=\"${index}\"]`) ??\n null\n // Days of the neighbouring months are visible but never focusable.\n return control?.hasAttribute('data-outside') ? null : control\n },\n })\n}\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('yearView') }\">\n <ScheduleHeaderBase\n v-if=\"props.withHeader\"\n view=\"year\"\n :labels=\"props.labels\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'year')\"\n :control=\"headerControl\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"props.viewSelectProps\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"emit('viewChange', $event)\"\n />\n\n <div ref=\"yearGrid\" v-bind=\"getStyles('yearViewMonths')\">\n <section\n v-for=\"{ month, weeks, offset } in months\"\n :key=\"month.month()\"\n v-bind=\"getStyles('yearViewMonth')\"\n :data-with-week-numbers=\"props.withWeekNumbers || undefined\"\n >\n <UnstyledButton\n type=\"button\"\n v-bind=\"getStyles('yearViewMonthCaption')\"\n @click=\"emit('monthClick', toDateString(month))\"\n >\n {{\n formatDate({\n date: month,\n locale: props.locale || 'en',\n format: props.monthsListFormat!,\n })\n }}\n </UnstyledButton>\n\n <div v-if=\"props.withWeekDays\" v-bind=\"getStyles('yearViewWeekdays')\">\n <span v-if=\"props.withWeekNumbers\" v-bind=\"getStyles('yearViewWeekdaysCorner')\" />\n <span\n v-for=\"(weekday, index) in weekdays\"\n :key=\"index\"\n v-bind=\"staticStyles('yearViewWeekday')\"\n >\n {{ weekday }}\n </span>\n </div>\n\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"`week-${weekIndex}`\"\n v-bind=\"staticStyles('yearViewWeek')\"\n >\n <UnstyledButton\n v-if=\"props.withWeekNumbers\"\n type=\"button\"\n v-bind=\"{\n ...weekNumberProps(week[0]),\n ...getStyles('yearViewWeekNumber', { className: weekNumberProps(week[0]).class }),\n }\"\n @click=\"emit('weekNumberClick', toDateString(week[0]), $event)\"\n >\n {{ getWeekNumber(week) }}\n </UnstyledButton>\n\n <template v-for=\"(date, dayIndex) in week\" :key=\"toDateString(date)\">\n <div\n v-if=\"isOutside(date, month) && !props.withOutsideDays\"\n v-bind=\"staticStyles('yearViewDay')\"\n data-day-placeholder\n />\n <UnstyledButton\n v-else\n type=\"button\"\n v-bind=\"{\n ...dayProps(date),\n ...getStyles('yearViewDay', { className: dayProps(date).class }),\n }\"\n :disabled=\"isStatic\"\n :data-year-grid-index=\"offset + weekIndex * COLUMNS + dayIndex\"\n :data-outside=\"isOutside(date, month) || undefined\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(date).day() as DayOfWeek) || undefined\n \"\n :data-today=\"\n (props.highlightToday && dayjs(date).isSame(dayjs(), 'day')) || undefined\n \"\n :aria-label=\"\n formatDate({ date, locale: props.locale || 'en', format: 'MMMM D, YYYY' })\n \"\n :tabindex=\"\n isStatic || isOutside(date, month) ? -1 : dayjs(date).date() === 1 ? 0 : -1\n \"\n @keydown=\"\n isStatic\n ? undefined\n : handleDayKeydown($event, offset + weekIndex * COLUMNS + dayIndex)\n \"\n @click=\"emit('dayClick', toDateString(date), $event)\"\n >\n {{ dayjs(date).date() }}\n <span v-if=\"dayEvents(date).length\" v-bind=\"getStyles('yearViewDayIndicators')\">\n <span\n v-for=\"event in dayEvents(date)\"\n :key=\"event.id\"\n v-bind=\"getStyles('yearViewDayIndicator')\"\n :style=\"indicatorStyle(event)\"\n />\n </span>\n </UnstyledButton>\n </template>\n </div>\n </section>\n </div>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport YearViewComponent, { varsResolver } from './YearView.vue'\nimport type { YearViewFactory } from './YearView.types'\nimport classes from './YearView.module.css'\n\nexport const YearView = factory<YearViewFactory>(YearViewComponent, { classes, varsResolver })\n\nexport type {\n YearViewCssVariables,\n YearViewEmits,\n YearViewFactory,\n YearViewOwnProps,\n YearViewOwnStylesNames,\n YearViewProps,\n YearViewStylesNames,\n} from './YearView.types'\n",".root {\n &:where([data-layout='responsive']) {\n container-type: inline-size;\n }\n}\n\n.desktopView {\n display: block;\n height: 100%;\n\n @container (width <= 600px) {\n display: none;\n }\n}\n\n.mobileView {\n display: none;\n height: 100%;\n\n @container (width <= 600px) {\n display: block;\n }\n}\n","<script lang=\"ts\">\nimport type { ScheduleOwnProps } from './Schedule.types'\n\nconst defaultProps = {\n defaultView: 'week',\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n layout: 'default',\n} satisfies Partial<ScheduleOwnProps>\n\nexport { defaultProps }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { DateStringValue, ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport { DayView } from '../DayView'\nimport { MobileMonthView } from '../MobileMonthView'\nimport { MonthView } from '../MonthView'\nimport { resolveEventRenderers } from '../shared'\nimport { WeekView } from '../WeekView'\nimport { YearView } from '../YearView'\nimport type { ScheduleEmits, ScheduleSlots } from './Schedule.types'\nimport classes from './Schedule.module.css'\n\ndefineOptions({\n name: 'Schedule',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleOwnProps>(), {\n date: undefined,\n defaultDate: undefined,\n view: undefined,\n defaultView: undefined,\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n renderEventBody: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n layout: undefined,\n dayViewProps: undefined,\n weekViewProps: undefined,\n monthViewProps: undefined,\n yearViewProps: undefined,\n mobileMonthViewProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleSlots>()\n\nconst emit = defineEmits<ScheduleEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('Schedule', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'Schedule',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n})\n\nconst [currentDate, setCurrentDate] = useUncontrolled<DateStringValue>({\n value: () => (props.date === undefined ? undefined : toDateString(props.date)),\n defaultValue: toDateString(props.defaultDate ?? dayjs()),\n onChange: (value) => {\n emit('update:date', value)\n emit('dateChange', value)\n },\n})\n\nconst [currentView, setCurrentView] = useUncontrolled<ScheduleViewLevel>({\n value: () => props.view,\n defaultValue: props.defaultView,\n finalValue: 'week',\n onChange: (value) => {\n emit('update:view', value)\n emit('viewChange', value)\n },\n})\n\nconst eventRenderers = computed(() =>\n resolveEventRenderers({ renderEventBody: props.renderEventBody }, slots),\n)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst sharedProps = computed(() => ({\n date: currentDate.value,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n mode: props.mode,\n withEventsDragAndDrop: props.withEventsDragAndDrop,\n canDragEvent: props.canDragEvent,\n withDragSlotSelect: props.withDragSlotSelect,\n withExternalEventDrop: props.withExternalEventDrop,\n withEventResize: props.withEventResize,\n canResizeEvent: props.canResizeEvent,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n ...eventRenderers.value,\n ...stylesApi.value,\n}))\n\n/**\n * Listeners re-emitted from the active view. They are `on*` keys rather than template `@`\n * bindings because a single object has to be spread onto whichever view is rendered — which is\n * exactly what the compiler produces for a template listener anyway.\n */\nconst sharedListeners = {\n onDateChange: (date: DateStringValue) => setCurrentDate(date),\n onViewChange: (view: ScheduleViewLevel) => setCurrentView(view),\n onEventDrop: (data: any) => emit('eventDrop', data),\n onEventDragStart: (event: any) => emit('eventDragStart', event),\n onEventDragEnd: () => emit('eventDragEnd'),\n onTimeSlotClick: (data: any) => emit('timeSlotClick', data),\n onAllDaySlotClick: (date: any, nativeEvent: MouseEvent) =>\n emit('allDaySlotClick', date, nativeEvent),\n onEventClick: (event: any, nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n onDayClick: (date: any, nativeEvent: MouseEvent) => emit('dayClick', date, nativeEvent),\n onMonthClick: (month: any) => emit('monthClick', month),\n onSlotDragEnd: (rangeStart: any, rangeEnd: any) => emit('slotDragEnd', rangeStart, rangeEnd),\n onExternalEventDrop: (dataTransfer: DataTransfer, dateTime: any) =>\n emit('externalEventDrop', dataTransfer, dateTime),\n onEventResize: (data: any) => emit('eventResize', data),\n}\n\nconst views = {\n day: DayView,\n week: WeekView,\n month: MonthView,\n year: YearView,\n} as const\n\nconst activeView = computed(() => views[currentView.value])\n\nconst activeViewProps = computed(() => {\n const perView = {\n day: props.dayViewProps,\n week: {\n ...(slots.weekLabel ? { renderWeekLabel: (payload: any) => slots.weekLabel!(payload) } : {}),\n ...props.weekViewProps,\n },\n month: props.monthViewProps,\n year: props.yearViewProps,\n }\n\n return { ...sharedProps.value, ...sharedListeners, ...perView[currentView.value] }\n})\n\n/**\n * The responsive layout shows the year view unchanged on narrow screens, because\n * `MobileMonthView` has no year equivalent.\n */\nconst mobileView = computed(() => (currentView.value === 'year' ? YearView : MobileMonthView))\n\nconst mobileViewProps = computed(() => {\n if (currentView.value === 'year') {\n return { ...sharedProps.value, ...sharedListeners, ...props.yearViewProps }\n }\n\n const viewProps = props.mobileMonthViewProps\n\n return {\n ...sharedProps.value,\n ...sharedListeners,\n ...(slots.header ? { renderHeader: (payload: any) => slots.header!(payload) } : {}),\n ...viewProps,\n onYearClick: () => setCurrentView('year'),\n // Both the schedule-level and the view-level listener run, matching the desktop view.\n onDayClick: (date: DateStringValue, nativeEvent: MouseEvent) => {\n emit('dayClick', date, nativeEvent)\n viewProps?.onDayClick?.(date, nativeEvent)\n },\n }\n})\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('root') }\"\n :mod=\"[{ layout: props.layout }, (attrs as any).mod]\"\n >\n <template v-if=\"props.layout !== 'responsive'\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\" />\n </template>\n\n <template v-else>\n <Box v-bind=\"getStyles('desktopView')\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\" />\n </Box>\n <Box v-bind=\"getStyles('mobileView')\">\n <component :is=\"mobileView\" v-bind=\"mobileViewProps\" />\n </Box>\n </template>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport type { ScheduleOwnProps } from './Schedule.types'\n\nconst defaultProps = {\n defaultView: 'week',\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n layout: 'default',\n} satisfies Partial<ScheduleOwnProps>\n\nexport { defaultProps }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { DateStringValue, ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport { DayView } from '../DayView'\nimport { MobileMonthView } from '../MobileMonthView'\nimport { MonthView } from '../MonthView'\nimport { resolveEventRenderers } from '../shared'\nimport { WeekView } from '../WeekView'\nimport { YearView } from '../YearView'\nimport type { ScheduleEmits, ScheduleSlots } from './Schedule.types'\nimport classes from './Schedule.module.css'\n\ndefineOptions({\n name: 'Schedule',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ScheduleOwnProps>(), {\n date: undefined,\n defaultDate: undefined,\n view: undefined,\n defaultView: undefined,\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n renderEventBody: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n layout: undefined,\n dayViewProps: undefined,\n weekViewProps: undefined,\n monthViewProps: undefined,\n yearViewProps: undefined,\n mobileMonthViewProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ScheduleSlots>()\n\nconst emit = defineEmits<ScheduleEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('Schedule', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'Schedule',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n})\n\nconst [currentDate, setCurrentDate] = useUncontrolled<DateStringValue>({\n value: () => (props.date === undefined ? undefined : toDateString(props.date)),\n defaultValue: toDateString(props.defaultDate ?? dayjs()),\n onChange: (value) => {\n emit('update:date', value)\n emit('dateChange', value)\n },\n})\n\nconst [currentView, setCurrentView] = useUncontrolled<ScheduleViewLevel>({\n value: () => props.view,\n defaultValue: props.defaultView,\n finalValue: 'week',\n onChange: (value) => {\n emit('update:view', value)\n emit('viewChange', value)\n },\n})\n\nconst eventRenderers = computed(() =>\n resolveEventRenderers({ renderEventBody: props.renderEventBody }, slots),\n)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst sharedProps = computed(() => ({\n date: currentDate.value,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n mode: props.mode,\n withEventsDragAndDrop: props.withEventsDragAndDrop,\n canDragEvent: props.canDragEvent,\n withDragSlotSelect: props.withDragSlotSelect,\n withExternalEventDrop: props.withExternalEventDrop,\n withEventResize: props.withEventResize,\n canResizeEvent: props.canResizeEvent,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n ...eventRenderers.value,\n ...stylesApi.value,\n}))\n\n/**\n * Listeners re-emitted from the active view. They are `on*` keys rather than template `@`\n * bindings because a single object has to be spread onto whichever view is rendered — which is\n * exactly what the compiler produces for a template listener anyway.\n */\nconst sharedListeners = {\n onDateChange: (date: DateStringValue) => setCurrentDate(date),\n onViewChange: (view: ScheduleViewLevel) => setCurrentView(view),\n onEventDrop: (data: any) => emit('eventDrop', data),\n onEventDragStart: (event: any) => emit('eventDragStart', event),\n onEventDragEnd: () => emit('eventDragEnd'),\n onTimeSlotClick: (data: any) => emit('timeSlotClick', data),\n onAllDaySlotClick: (date: any, nativeEvent: MouseEvent) =>\n emit('allDaySlotClick', date, nativeEvent),\n onEventClick: (event: any, nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n onDayClick: (date: any, nativeEvent: MouseEvent) => emit('dayClick', date, nativeEvent),\n onMonthClick: (month: any) => emit('monthClick', month),\n onSlotDragEnd: (rangeStart: any, rangeEnd: any) => emit('slotDragEnd', rangeStart, rangeEnd),\n onExternalEventDrop: (dataTransfer: DataTransfer, dateTime: any) =>\n emit('externalEventDrop', dataTransfer, dateTime),\n onEventResize: (data: any) => emit('eventResize', data),\n}\n\nconst views = {\n day: DayView,\n week: WeekView,\n month: MonthView,\n year: YearView,\n} as const\n\nconst activeView = computed(() => views[currentView.value])\n\nconst activeViewProps = computed(() => {\n const perView = {\n day: props.dayViewProps,\n week: {\n ...(slots.weekLabel ? { renderWeekLabel: (payload: any) => slots.weekLabel!(payload) } : {}),\n ...props.weekViewProps,\n },\n month: props.monthViewProps,\n year: props.yearViewProps,\n }\n\n return { ...sharedProps.value, ...sharedListeners, ...perView[currentView.value] }\n})\n\n/**\n * The responsive layout shows the year view unchanged on narrow screens, because\n * `MobileMonthView` has no year equivalent.\n */\nconst mobileView = computed(() => (currentView.value === 'year' ? YearView : MobileMonthView))\n\nconst mobileViewProps = computed(() => {\n if (currentView.value === 'year') {\n return { ...sharedProps.value, ...sharedListeners, ...props.yearViewProps }\n }\n\n const viewProps = props.mobileMonthViewProps\n\n return {\n ...sharedProps.value,\n ...sharedListeners,\n ...(slots.header ? { renderHeader: (payload: any) => slots.header!(payload) } : {}),\n ...viewProps,\n onYearClick: () => setCurrentView('year'),\n // Both the schedule-level and the view-level listener run, matching the desktop view.\n onDayClick: (date: DateStringValue, nativeEvent: MouseEvent) => {\n emit('dayClick', date, nativeEvent)\n viewProps?.onDayClick?.(date, nativeEvent)\n },\n }\n})\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('root') }\"\n :mod=\"[{ layout: props.layout }, (attrs as any).mod]\"\n >\n <template v-if=\"props.layout !== 'responsive'\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\" />\n </template>\n\n <template v-else>\n <Box v-bind=\"getStyles('desktopView')\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\" />\n </Box>\n <Box v-bind=\"getStyles('mobileView')\">\n <component :is=\"mobileView\" v-bind=\"mobileViewProps\" />\n </Box>\n </template>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ScheduleComponent from './Schedule.vue'\nimport type { ScheduleFactory } from './Schedule.types'\nimport classes from './Schedule.module.css'\n\nexport const Schedule = factory<ScheduleFactory>(ScheduleComponent, { classes })\n\nexport type {\n ScheduleEmits,\n ScheduleFactory,\n ScheduleLayout,\n ScheduleOwnProps,\n ScheduleOwnStylesNames,\n ScheduleProps,\n ScheduleSlots,\n ScheduleStylesNames,\n} from './Schedule.types'\n","import dayjs from 'dayjs'\nimport { onBeforeUnmount, shallowRef } from 'vue'\nimport { rafThrottle } from '../components/shared'\nimport type { EventDropData } from '../component-props'\nimport type { DateTimeStringValue, ScheduleEventData, ScheduleMode } from '../types'\nimport { clampIntervalMinutes, parseTimeString } from '../utils'\n\ntype ResizeEdge = 'start' | 'end'\n\ninterface ResizeState {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalLeft: number\n originalWidth: number\n currentLeft: number\n currentWidth: number\n eventDate: string\n originalStart: DateTimeStringValue\n originalEnd: DateTimeStringValue\n dayIndex: number\n dayCount: number\n}\n\nexport function useHorizontalEventResize(input: {\n enabled: () => boolean\n mode: () => ScheduleMode\n startTime: () => string\n endTime: () => string\n intervalMinutes: () => number\n onEventResize: (data: EventDropData) => void\n canResizeEvent: () => ((event: ScheduleEventData) => boolean) | undefined\n}) {\n const state = shallowRef<ResizeState | null>(null)\n let justResized = false\n let savedUserSelect = ''\n\n const metrics = () => {\n const start = parseTimeString(input.startTime())\n const end = parseTimeString(input.endTime())\n const startMinutes = start.hours * 60 + start.minutes\n const literalRange = end.hours * 60 + end.minutes - startMinutes\n const interval = clampIntervalMinutes(input.intervalMinutes())\n const total = Math.ceil(literalRange / interval) * interval\n return { startMinutes, literalRange, interval, total, minWidth: (interval / total) * 100 }\n }\n const snap = (percent: number) => {\n const { literalRange, interval, total } = metrics()\n const minutes = Math.max(\n 0,\n Math.min(literalRange, Math.round(((percent / 100) * total) / interval) * interval),\n )\n return (minutes / total) * 100\n }\n const toDateTime = (percent: number, date: string): DateTimeStringValue => {\n const { startMinutes, total } = metrics()\n const minutes = startMinutes + Math.round((snap(percent) / 100) * total)\n return `${date} ${String(Math.floor(minutes / 60)).padStart(2, '0')}:${String(minutes % 60).padStart(2, '0')}:00`\n }\n /**\n * Coalesced to one animation frame: `pointermove` outruns paint, and each step reads layout\n * and re-renders the grid.\n */\n const move = rafThrottle((clientX: number) => {\n if (!state.value) return\n const rect = state.value.container.getBoundingClientRect()\n const dayWidth = rect.width / state.value.dayCount\n const raw = ((clientX - rect.left - state.value.dayIndex * dayWidth) / dayWidth) * 100\n const point = snap(raw)\n const { minWidth } = metrics()\n const current = state.value\n if (current.edge === 'end') {\n current.currentWidth = Math.max(minWidth, point - current.originalLeft)\n } else {\n const right = current.originalLeft + current.originalWidth\n current.currentLeft = Math.min(point, right - minWidth)\n current.currentWidth = right - current.currentLeft\n }\n state.value = { ...current }\n })\n const trackPointer = (event: PointerEvent) => move(event.clientX)\n const cleanup = () => {\n move.cancel()\n document.removeEventListener('pointermove', trackPointer)\n document.removeEventListener('pointerup', finish)\n document.body.style.userSelect = savedUserSelect\n }\n const finish = () => {\n // Drop the pending frame first, so a stale step cannot land after the gesture ended.\n move.cancel()\n const current = state.value\n if (\n current &&\n (current.currentLeft !== current.originalLeft ||\n current.currentWidth !== current.originalWidth)\n ) {\n input.onEventResize({\n eventId: current.event.id,\n newStart:\n current.edge === 'start'\n ? toDateTime(current.currentLeft, current.eventDate)\n : current.originalStart,\n newEnd:\n current.edge === 'end'\n ? toDateTime(current.currentLeft + current.currentWidth, current.eventDate)\n : current.originalEnd,\n event: current.event,\n })\n }\n state.value = null\n cleanup()\n justResized = true\n requestAnimationFrame(() => (justResized = false))\n }\n const handleResizeStart = (params: {\n event: ScheduleEventData\n edge: ResizeEdge\n container: HTMLElement\n originalLeft: number\n originalWidth: number\n eventDate: string\n pointerEvent: PointerEvent\n dayIndex?: number\n dayCount?: number\n }) => {\n if (!input.enabled() || input.mode() === 'static') return\n params.pointerEvent.preventDefault()\n params.pointerEvent.stopPropagation()\n state.value = {\n ...params,\n currentLeft: params.originalLeft,\n currentWidth: params.originalWidth,\n originalStart: dayjs(params.event.start).format('YYYY-MM-DD HH:mm:ss'),\n originalEnd: dayjs(params.event.end).format('YYYY-MM-DD HH:mm:ss'),\n dayIndex: params.dayIndex ?? 0,\n dayCount: params.dayCount ?? 1,\n }\n savedUserSelect = document.body.style.userSelect\n document.body.style.userSelect = 'none'\n document.addEventListener('pointermove', trackPointer)\n document.addEventListener('pointerup', finish)\n }\n onBeforeUnmount(cleanup)\n return {\n state,\n handleResizeStart,\n getResizePosition: (id: string | number) =>\n state.value?.event.id === id\n ? { left: state.value.currentLeft, width: state.value.currentWidth }\n : null,\n isResizableEvent: (event: ScheduleEventData) =>\n input.enabled() &&\n input.mode() !== 'static' &&\n event.display !== 'background' &&\n (input.canResizeEvent()?.(event) ?? true),\n wasResizing: () => justResized,\n }\n}\n","import type { DayPositionedEventData } from '../../../types'\n\nexport function getOverlapClusters(events: DayPositionedEventData[]): DayPositionedEventData[][] {\n const sorted = [...events].sort((a, b) => a.position.top - b.position.top)\n const clusters: DayPositionedEventData[][] = []\n let current: DayPositionedEventData[] = []\n let end = -1\n sorted.forEach((event) => {\n if (current.length && event.position.top >= end) {\n clusters.push(current)\n current = []\n end = -1\n }\n current.push(event)\n end = Math.max(end, event.position.top + event.position.height)\n })\n if (current.length) clusters.push(current)\n return clusters\n}\n","import dayjs from 'dayjs'\nimport type {\n AnyDateValue,\n DayPositionedEventData,\n ScheduleEventData,\n ScheduleResourceData,\n} from '../../../types'\nimport { getDayPosition, isAllDayEvent, isEventInTimeRange, validateEvent } from '../../../utils'\nimport { getDayPositionedEvents } from '../../DayView/get-day-view-events/get-day-positioned-events'\n\nexport interface ResourcesDayViewEventsResult {\n regularEvents: Record<string | number, DayPositionedEventData[]>\n allDayEvents: Record<string | number, DayPositionedEventData[]>\n backgroundTimedEvents: Record<string | number, DayPositionedEventData[]>\n backgroundAllDayEvents: Record<string | number, DayPositionedEventData[]>\n}\n\nexport function getResourcesDayViewEvents({\n events,\n resources,\n date,\n startTime,\n endTime,\n intervalMinutes,\n}: {\n events: ScheduleEventData[] | undefined\n resources: ScheduleResourceData[]\n date: AnyDateValue\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n}): ResourcesDayViewEventsResult {\n const result: ResourcesDayViewEventsResult = {\n regularEvents: {},\n allDayEvents: {},\n backgroundTimedEvents: {},\n backgroundAllDayEvents: {},\n }\n resources.forEach((resource) => {\n result.regularEvents[resource.id] = []\n result.allDayEvents[resource.id] = []\n result.backgroundTimedEvents[resource.id] = []\n result.backgroundAllDayEvents[resource.id] = []\n })\n if (!events) return result\n\n const dayStart = dayjs(date).startOf('day')\n const dayEnd = dayjs(date).endOf('day')\n const regular = new Map<string | number, ScheduleEventData[]>(\n resources.map((resource) => [resource.id, []]),\n )\n const background = new Map<string | number, ScheduleEventData[]>(\n resources.map((resource) => [resource.id, []]),\n )\n const seen = new Set<string | number>()\n\n events.forEach((event) => {\n if (event.resourceId === undefined || !regular.has(event.resourceId)) return\n const eventStart = dayjs(event.start)\n const eventEnd = dayjs(event.end)\n const startsOnDay = eventStart.isSame(dayStart, 'day')\n if (!startsOnDay && !(eventStart.isBefore(dayEnd) && eventEnd.isAfter(dayStart))) return\n if (startsOnDay && !isEventInTimeRange({ event, startTime, endTime })) return\n if (seen.has(event.id)) {\n throw new Error(\n `[@mantine/schedule] ResourcesDayView: Duplicated event ids found: ${event.id}`,\n )\n }\n seen.add(event.id)\n const validated = validateEvent(event)\n if (event.display === 'background') {\n background.get(event.resourceId)!.push(validated)\n return\n }\n const clipped = startsOnDay\n ? validated\n : {\n ...validated,\n start: (eventStart.isBefore(dayStart) ? dayStart : eventStart).format(\n 'YYYY-MM-DD HH:mm:ss',\n ),\n end: (eventEnd.isAfter(dayEnd) ? dayEnd : eventEnd).format('YYYY-MM-DD HH:mm:ss'),\n }\n if (isEventInTimeRange({ event: clipped, startTime, endTime })) {\n regular.get(event.resourceId)!.push(clipped)\n }\n })\n\n resources.forEach((resource) => {\n getDayPositionedEvents({\n events: regular.get(resource.id)!,\n startTime,\n endTime,\n date,\n intervalMinutes,\n }).forEach((event) => {\n const target = event.position.allDay ? result.allDayEvents : result.regularEvents\n target[resource.id].push(event)\n })\n\n background.get(resource.id)!.forEach((event) => {\n const clippedStart = dayjs(event.start).isBefore(dayStart) ? dayStart : dayjs(event.start)\n const clippedEnd = dayjs(event.end).isAfter(dayEnd) ? dayEnd : dayjs(event.end)\n const clipped = {\n ...event,\n start: clippedStart.format('YYYY-MM-DD HH:mm:ss'),\n end: clippedEnd.format('YYYY-MM-DD HH:mm:ss'),\n }\n const allDay = isAllDayEvent({ event: clipped, date })\n const position = allDay\n ? { top: 0, height: 100 }\n : getDayPosition({ event: clipped, startTime, endTime, intervalMinutes })\n if (!allDay && position.height <= 0) return\n const target = allDay ? result.backgroundAllDayEvents : result.backgroundTimedEvents\n target[resource.id].push({\n ...event,\n position: {\n ...position,\n allDay,\n width: 100,\n offset: 0,\n column: 0,\n overlaps: 1,\n },\n })\n })\n })\n return result\n}\n",".resourcesDayView {\n --resources-day-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-day-view-resource-label-width: 120px;\n --resources-day-view-slot-width: 80px;\n --resources-day-view-row-height: 64px;\n --resources-day-view-group-label-width: 80px;\n --resources-day-view-all-day-height: 20px;\n\n @mixin where-light {\n --resources-day-view-border-color: var(--mantine-color-gray-3);\n --resources-day-view-business-hours-bg: var(--mantine-color-white);\n --resources-day-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --resources-day-view-border-color: var(--mantine-color-dark-4);\n --resources-day-view-business-hours-bg: var(--mantine-color-dark-7);\n --resources-day-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n\n.resourcesDayViewRoot {\n border: 1px solid var(--resources-day-view-border-color);\n border-radius: var(--resources-day-view-radius);\n overflow: hidden;\n max-width: fit-content;\n position: relative;\n}\n\n.resourcesDayViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n\n.resourcesDayViewInner {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n}\n.resourcesDayViewTimeLabelsRow {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-day-view-border-color);\n margin-bottom: -1px;\n transition: box-shadow 100ms ease;\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n}\n.resourcesDayViewCorner {\n flex: 0 0 var(--resources-day-view-resource-label-width);\n min-width: var(--resources-day-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n position: sticky;\n left: 0;\n z-index: 11;\n background-color: var(--mantine-color-body);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n}\n.resourcesDayViewTimeLabel {\n flex: 0 0 var(--resources-day-view-slot-width);\n min-width: var(--resources-day-view-slot-width);\n max-width: var(--resources-day-view-slot-width);\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n}\n.resourcesDayViewRow {\n display: flex;\n border-top: 1px solid var(--resources-day-view-border-color);\n}\n.resourcesDayViewResourceLabel {\n flex: 0 0 var(--resources-day-view-resource-label-width);\n min-width: var(--resources-day-view-resource-label-width);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n min-height: var(--resources-day-view-row-height);\n position: sticky;\n left: 0;\n z-index: 11;\n background-color: var(--mantine-color-body);\n transition: box-shadow 100ms ease;\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n &:where([data-has-groups]) {\n left: var(--resources-day-view-group-label-width);\n }\n}\n.resourcesDayViewGroupColumn,\n.resourcesDayViewGroupColumnEmpty {\n flex: 0 0 var(--resources-day-view-group-label-width);\n min-width: var(--resources-day-view-group-label-width);\n min-height: var(--resources-day-view-row-height);\n position: sticky;\n left: 0;\n z-index: 12;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n}\n.resourcesDayViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 13;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-day-view-row-height) + 1px);\n }\n}\n.resourcesDayViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-day-view-row-height);\n}\n.resourcesDayViewRowSlot {\n flex: 0 0 var(--resources-day-view-slot-width);\n min-width: var(--resources-day-view-slot-width);\n max-width: var(--resources-day-view-slot-width);\n min-height: var(--resources-day-view-row-height);\n border-inline-end: 1px solid var(--resources-day-view-border-color);\n cursor: pointer;\n position: relative;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid;\n border-radius: 2px;\n @mixin where-light {\n border-color: var(--mantine-color-blue-4);\n }\n @mixin where-dark {\n border-color: var(--mantine-color-blue-6);\n }\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n.resourcesDayViewCurrentTimeIndicator {\n --_indicator-color: var(--resources-day-view-indicator-color, var(--mantine-color-red-7));\n --_time-bubble-height: 18px;\n --_thumb-size: 12px;\n position: absolute;\n pointer-events: none;\n top: 37px;\n bottom: 0;\n left: var(--indicator-left-offset);\n width: 2px;\n z-index: 3;\n}\n.resourcesDayViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n inset-block: 0;\n background-color: var(--_indicator-color);\n}\n.resourcesDayViewCurrentTimeIndicatorThumb {\n position: absolute;\n top: -5px;\n left: -5px;\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n}\n.resourcesDayViewCurrentTimeIndicatorTimeBubble {\n position: absolute;\n height: var(--_time-bubble-height);\n width: var(--_time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n text-transform: uppercase;\n top: 0;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\n.resourcesDayViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--resources-day-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n.resourcesDayViewAllDayEvent {\n position: absolute;\n inset-inline: 1px;\n height: var(--resources-day-view-all-day-height);\n z-index: 3;\n}\n.resourcesDayViewEventWrapper {\n position: absolute;\n z-index: 3;\n}\n.resourcesDayViewResizeHandle {\n position: absolute;\n top: 20%;\n width: 4px;\n height: 60%;\n cursor: ew-resize;\n z-index: 5;\n border-radius: 2px;\n opacity: 0;\n transition: opacity 100ms ease;\n pointer-events: all;\n background-color: var(--event-color);\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n &:where([data-edge='start']) {\n left: -2px;\n }\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n.resourcesDayViewEventWrapper:hover .resourcesDayViewResizeHandle {\n opacity: 0.5;\n}\n.resourcesDayViewEventWrapper .resourcesDayViewResizeHandle:hover,\n.resourcesDayViewEventWrapper[data-resizing] .resourcesDayViewResizeHandle[data-active] {\n opacity: 0.8;\n}\n.resourcesDayViewEventWrapper[data-resizing] .resourcesDayViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n}\n.resourcesDayView:where([data-event-interaction]) .resourcesDayViewRowSlot {\n pointer-events: none;\n}\n.resourcesDayView:where([data-resizing]) * {\n cursor: ew-resize !important;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesDayViewOwnProps } from './ResourcesDayView.types'\n\nconst defaultProps = {\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n slotWidth: 80,\n rowHeight: 64,\n groupLabelWidth: 80,\n businessHours: ['09:00:00', '17:00:00'],\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n maxEventsPerTimeSlot: 2,\n} satisfies Partial<ResourcesDayViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': resolveScheduleRadius(radius),\n '--resources-day-view-slot-width': cssSize(slotWidth),\n '--resources-day-view-row-height': cssSize(rowHeight),\n '--resources-day-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, RESOURCE_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport {\n Box,\n ScrollArea,\n UnstyledButton,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters'\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events'\nimport type { ResourcesDayViewEmits, ResourcesDayViewSlots } from './ResourcesDayView.types'\nimport classes from './ResourcesDayView.module.css'\n\ndefineOptions({\n name: 'ResourcesDayView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesDayViewOwnProps>(), {\n groups: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n radius: undefined,\n startScrollTime: undefined,\n scrollAreaProps: undefined,\n locale: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n headerFormat: undefined,\n events: undefined,\n slotWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n labels: undefined,\n businessHours: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesDayViewSlots>()\n\nconst emit = defineEmits<ResourcesDayViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('ResourcesDayView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesDayView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesDayView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; slotIndex: number } | null>(null)\nconst scrolled = ref(false)\nconst scrolledX = ref(false)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst date = computed(() => dayjs(props.date).format('YYYY-MM-DD') as DateStringValue)\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? new Date()))\nconst dayOfWeek = computed(() => dayjs(props.date).day() as DayOfWeek)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst expandedEvents = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: dayjs(props.date).startOf('day').toDate(),\n rangeEnd: dayjs(props.date).endOf('day').toDate(),\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst positioned = computed(() =>\n getResourcesDayViewEvents({\n date: props.date,\n events: expandedEvents.value,\n resources: props.resources,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst businessHoursMods = computed(() =>\n intervals.value.map((interval) =>\n getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayOfWeek.value,\n }),\n ),\n)\n\nconst showIndicator = computed(\n () =>\n (props.withCurrentTimeIndicator ?? dayjs(props.date).isSame(now.value, 'day')) &&\n isInTimeRange({\n date: now.value.toDate(),\n startTime: props.startTime!,\n endTime: props.endTime!,\n }),\n)\n\nconst indicatorOffset = computed(() =>\n getCurrentTimePosition({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n now: now.value,\n }),\n)\n\nconst currentTime = computed(() =>\n formatDate({ date: now.value, locale: props.locale || 'en', format: props.slotLabelFormat! }),\n)\n\nconst headerLabel = computed(() =>\n formatDate({ date: props.date, locale: props.locale || 'en', format: props.headerFormat! }),\n)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const first = intervals.value[start]\n const last = intervals.value[end]\n\n if (first && last) {\n emit('slotDragEnd', {\n rangeStart: `${date.value} ${first.startTime}` as DateTimeStringValue,\n rangeEnd: `${date.value} ${last.endTime}` as DateTimeStringValue,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n})\n\nconst resize = useHorizontalEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n scrollSlotIntoView(controls[0]?.[targetIndex], 'x')\n})\n\nconst setControl = (resourceIndex: number, slotIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][slotIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n\n if (node instanceof HTMLElement) {\n rowContainers.set(resourceIndex, node)\n }\n}\n\nconst withDragHandlers = computed(\n () => Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop),\n)\n\nconst getSlotIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container || intervals.value.length === 0) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(\n intervals.value.length - 1,\n Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * intervals.value.length),\n ),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, slotIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const interval = intervals.value[slotIndex]\n\n if (!interval) {\n return\n }\n\n const target = `${date.value} ${interval.startTime}` as DateTimeStringValue\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', { ...moveEventTo(event, target), resourceId })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; slotIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.slotIndex === next.slotIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(slotIndex < 0 ? null : { resourceId, slotIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n if (isStatic.value) {\n return\n }\n\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n\n if (slotIndex >= 0) {\n emitDrop(nativeEvent, resource.id, slotIndex)\n }\n}\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-day-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst backgroundEvents = (resourceId: string | number) => [\n ...(positioned.value.backgroundTimedEvents[resourceId] || []),\n ...(positioned.value.backgroundAllDayEvents[resourceId] || []),\n]\n\nconst backgroundEventStyle = (event: ScheduleEventData & { position: any }) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n\n return {\n left: `${event.position.top}%`,\n right: `${100 - event.position.top - event.position.height}%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n }\n}\n\nconst allDayEvents = (resourceId: string | number) =>\n positioned.value.allDayEvents[resourceId] || []\n\nconst allDayEventStyle = (index: number) => ({\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n})\n\nconst allRegularEvents = (resourceId: string | number) =>\n positioned.value.regularEvents[resourceId] || []\n\nconst visibleRegularEvents = (resourceId: string | number) =>\n allRegularEvents(resourceId).filter(\n (event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot!),\n )\n\nconst eventWrapperStyle = (event: ScheduleEventData & { position: any }) => {\n const position = resize.getResizePosition(event.id)\n const left = position?.left ?? event.position.top\n const width = position?.width ?? event.position.height\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n\n return {\n left: `calc(${left}% + 1px)`,\n width: `calc(${width}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n '--event-color': colors.color,\n }\n}\n\nconst moreClusters = (resourceId: string | number) =>\n getOverlapClusters(allRegularEvents(resourceId))\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot!),\n )\n .map((cluster) => {\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(...cluster.map((event) => event.position.top + event.position.height))\n\n return {\n cluster,\n hiddenCount: cluster.filter((event) => event.position.column >= props.maxEventsPerTimeSlot!)\n .length,\n style: {\n position: 'absolute' as const,\n left: `calc(${left}% + 1px)`,\n width: `calc(${right - left}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n }\n })\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n }\n : undefined,\n)\n\nconst indicatorStyle = computed(() => ({\n '--indicator-left-offset': hasGroups.value\n ? `calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width) + (100% - var(--resources-day-view-resource-label-width) - var(--resources-day-view-group-label-width)) * ${indicatorOffset.value} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${indicatorOffset.value} / 100)`,\n '--_time-bubble-width': String(currentTime.value).toLowerCase().includes('m') ? '64px' : '46px',\n}))\n\nconst rowMinHeight = (resourceId: string | number) => {\n const count = allDayEvents(resourceId).length\n\n return count\n ? {\n minHeight: `max(var(--resources-day-view-row-height), calc(${count} * (var(--resources-day-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined\n}\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) {\n emit('eventClick', event, nativeEvent)\n }\n}\n\nconst startResize = (\n event: ScheduleEventData & { position: any },\n resourceIndex: number,\n edge: 'start' | 'end',\n pointerEvent: PointerEvent,\n) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container) {\n return\n }\n\n resize.handleResizeStart({\n event,\n edge,\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: date.value,\n pointerEvent,\n })\n}\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n return target\n ? {\n date: date.value,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesDayView') }\"\n :root-ref=\"setRootElement\"\n :data-resizing=\"resize.state.value ? true : undefined\"\n :data-event-interaction=\"resize.state.value ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :date=\"date\" :label=\"headerLabel\">\n <ScheduleHeaderBase\n view=\"day\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'day')\"\n :control=\"{ title: headerLabel }\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesDayViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesDayViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n @scroll-position-change=\"\n (position) => {\n scrolled = position.y !== 0\n scrolledX = position.x !== 0\n }\n \"\n >\n <div v-bind=\"getStyles('resourcesDayViewInner')\">\n <Box\n v-bind=\"getStyles('resourcesDayViewTimeLabelsRow')\"\n :data-scrolled=\"scrolled || undefined\"\n >\n <div v-bind=\"getStyles('resourcesDayViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <Box\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"interval.startTime\"\n v-bind=\"staticStyles('resourcesDayViewTimeLabel')\"\n :data-business-hours=\"businessHoursMods[slotIndex]['business-hours'] || undefined\"\n :data-non-business-hours=\"\n businessHoursMods[slotIndex]['non-business-hours'] || undefined\n \"\n >\n <slot\n name=\"timeLabel\"\n :label=\"\n formatDate({\n date: `${date} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n \"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n >\n {{\n formatDate({\n date: `${date} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </slot>\n </Box>\n </Box>\n\n <Box\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesDayViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesDayViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesDayViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <Box\n v-bind=\"staticStyles('resourcesDayViewResourceLabel')\"\n :data-scrolled-x=\"scrolledX || undefined\"\n :data-has-groups=\"groupInfo(resourceIndex) !== undefined || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </Box>\n\n <Box\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"getStyles('resourcesDayViewRowSlots', { style: rowMinHeight(resource.id) })\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"withDragHandlers ? handleRowDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <template v-for=\"event in backgroundEvents(resource.id)\" :key=\"`bg-${event.id}`\">\n <slot name=\"backgroundEvent\" :event=\"event\">\n <Box\n v-bind=\"\n getStyles('resourcesDayViewBackgroundEvent', {\n style: backgroundEventStyle(event),\n })\n \"\n >\n <component\n :is=\"() => eventRenderers.renderEventBody!(event)\"\n v-if=\"eventRenderers.renderEventBody\"\n />\n <template v-else>{{ event.title }}</template>\n </Box>\n </slot>\n </template>\n\n <template\n v-for=\"(event, index) in allDayEvents(resource.id)\"\n :key=\"`all-${event.id}`\"\n >\n <Box\n v-bind=\"\n getStyles('resourcesDayViewAllDayEvent', { style: allDayEventStyle(index) })\n \"\n >\n <slot name=\"allDayEvent\" :event=\"event\">\n <ScheduleEvent\n :event=\"event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @click=\"\n isStatic ? undefined : emit('eventClick', event, $event as MouseEvent)\n \"\n />\n </slot>\n </Box>\n </template>\n\n <Box\n v-for=\"event in visibleRegularEvents(resource.id)\"\n :key=\"event.id\"\n v-bind=\"\n getStyles('resourcesDayViewEventWrapper', { style: eventWrapperStyle(event) })\n \"\n :data-resizing=\"resize.getResizePosition(event.id) !== null || undefined\"\n >\n <ScheduleEvent\n :event=\"event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(event)\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"isStatic ? undefined : clickEvent(event, $event as MouseEvent)\"\n />\n\n <template v-if=\"resize.isResizableEvent(event)\">\n <div\n v-for=\"edge in ['start', 'end'] as const\"\n :key=\"edge\"\n v-bind=\"staticStyles('resourcesDayViewResizeHandle')\"\n :data-edge=\"edge\"\n :data-active=\"resize.state.value?.edge === edge || undefined\"\n :aria-label=\"`${\n edge === 'start' ? 'Resize event start' : 'Resize event end'\n } ${event.title}`\"\n @dragstart.prevent\n @pointerdown=\"startResize(event, resourceIndex, edge, $event)\"\n />\n </template>\n </Box>\n\n <template\n v-for=\"entry in moreClusters(resource.id)\"\n :key=\"`more-${entry.cluster[0].id}`\"\n >\n <slot name=\"moreEvents\" :events=\"entry.cluster\" :hidden-count=\"entry.hiddenCount\">\n <MoreEvents\n :events=\"entry.cluster\"\n :more-events-count=\"entry.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"entry.style\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <UnstyledButton\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"interval.startTime\"\n :ref=\"setControl(resourceIndex, slotIndex)\"\n v-bind=\"staticStyles('resourcesDayViewRowSlot')\"\n :data-business-hours=\"businessHoursMods[slotIndex]['business-hours'] || undefined\"\n :data-non-business-hours=\"\n businessHoursMods[slotIndex]['non-business-hours'] || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id && dropTarget.slotIndex === slotIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(slotIndex, String(resource.id)) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"props.withDragSlotSelect ? slotIndex : undefined\"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :aria-label=\"`${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${date} ${interval.startTime} - ${interval.endTime}`\"\n :tabindex=\"isStatic ? -1 : resourceIndex === 0 && slotIndex === 0 ? 0 : -1\"\n @keydown=\"\n handleResourcesGridKeyDown({ controls, resourceIndex, slotIndex, event: $event })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown($event, slotIndex, String(resource.id))\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('timeSlotClick', {\n slotStart: `${date} ${interval.startTime}` as DateTimeStringValue,\n slotEnd: `${date} ${interval.endTime}` as DateTimeStringValue,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot\n name=\"timeSlot\"\n :resource=\"resource\"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n />\n </UnstyledButton>\n </Box>\n </Box>\n\n <template v-if=\"showIndicator\">\n <slot name=\"currentTimeIndicator\" :time=\"currentTime\" :offset=\"indicatorOffset\">\n <Box\n v-bind=\"\n getStyles('resourcesDayViewCurrentTimeIndicator', { style: indicatorStyle })\n \"\n >\n <div\n v-if=\"props.withCurrentTimeBubble\"\n v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')\"\n >\n {{ currentTime }}\n </div>\n <div v-else v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorLine')\" />\n </Box>\n </slot>\n </template>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesDayViewOwnProps } from './ResourcesDayView.types'\n\nconst defaultProps = {\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n slotWidth: 80,\n rowHeight: 64,\n groupLabelWidth: 80,\n businessHours: ['09:00:00', '17:00:00'],\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n maxEventsPerTimeSlot: 2,\n} satisfies Partial<ResourcesDayViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': resolveScheduleRadius(radius),\n '--resources-day-view-slot-width': cssSize(slotWidth),\n '--resources-day-view-row-height': cssSize(rowHeight),\n '--resources-day-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, RESOURCE_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport {\n Box,\n ScrollArea,\n UnstyledButton,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters'\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events'\nimport type { ResourcesDayViewEmits, ResourcesDayViewSlots } from './ResourcesDayView.types'\nimport classes from './ResourcesDayView.module.css'\n\ndefineOptions({\n name: 'ResourcesDayView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesDayViewOwnProps>(), {\n groups: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n radius: undefined,\n startScrollTime: undefined,\n scrollAreaProps: undefined,\n locale: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n headerFormat: undefined,\n events: undefined,\n slotWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n labels: undefined,\n businessHours: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesDayViewSlots>()\n\nconst emit = defineEmits<ResourcesDayViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('ResourcesDayView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesDayView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesDayView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; slotIndex: number } | null>(null)\nconst scrolled = ref(false)\nconst scrolledX = ref(false)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst date = computed(() => dayjs(props.date).format('YYYY-MM-DD') as DateStringValue)\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? new Date()))\nconst dayOfWeek = computed(() => dayjs(props.date).day() as DayOfWeek)\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst expandedEvents = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: dayjs(props.date).startOf('day').toDate(),\n rangeEnd: dayjs(props.date).endOf('day').toDate(),\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst positioned = computed(() =>\n getResourcesDayViewEvents({\n date: props.date,\n events: expandedEvents.value,\n resources: props.resources,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst businessHoursMods = computed(() =>\n intervals.value.map((interval) =>\n getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayOfWeek.value,\n }),\n ),\n)\n\nconst showIndicator = computed(\n () =>\n (props.withCurrentTimeIndicator ?? dayjs(props.date).isSame(now.value, 'day')) &&\n isInTimeRange({\n date: now.value.toDate(),\n startTime: props.startTime!,\n endTime: props.endTime!,\n }),\n)\n\nconst indicatorOffset = computed(() =>\n getCurrentTimePosition({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n now: now.value,\n }),\n)\n\nconst currentTime = computed(() =>\n formatDate({ date: now.value, locale: props.locale || 'en', format: props.slotLabelFormat! }),\n)\n\nconst headerLabel = computed(() =>\n formatDate({ date: props.date, locale: props.locale || 'en', format: props.headerFormat! }),\n)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const first = intervals.value[start]\n const last = intervals.value[end]\n\n if (first && last) {\n emit('slotDragEnd', {\n rangeStart: `${date.value} ${first.startTime}` as DateTimeStringValue,\n rangeEnd: `${date.value} ${last.endTime}` as DateTimeStringValue,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n})\n\nconst resize = useHorizontalEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nonMounted(async () => {\n if (!props.startScrollTime) {\n return\n }\n\n await nextTick()\n\n const targetIndex = intervals.value.findIndex(\n (interval) => interval.startTime >= props.startScrollTime!,\n )\n\n if (targetIndex < 0) {\n return\n }\n\n scrollSlotIntoView(controls[0]?.[targetIndex], 'x')\n})\n\nconst setControl = (resourceIndex: number, slotIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][slotIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n\n if (node instanceof HTMLElement) {\n rowContainers.set(resourceIndex, node)\n }\n}\n\nconst withDragHandlers = computed(\n () => Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop),\n)\n\nconst getSlotIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container || intervals.value.length === 0) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(\n intervals.value.length - 1,\n Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * intervals.value.length),\n ),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, slotIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const interval = intervals.value[slotIndex]\n\n if (!interval) {\n return\n }\n\n const target = `${date.value} ${interval.startTime}` as DateTimeStringValue\n const event = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', { ...moveEventTo(event, target), resourceId })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; slotIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.slotIndex === next.slotIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(slotIndex < 0 ? null : { resourceId, slotIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n if (isStatic.value) {\n return\n }\n\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const slotIndex = getSlotIndexAtPoint(nativeEvent, resourceIndex)\n\n if (slotIndex >= 0) {\n emitDrop(nativeEvent, resource.id, slotIndex)\n }\n}\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-day-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst backgroundEvents = (resourceId: string | number) => [\n ...(positioned.value.backgroundTimedEvents[resourceId] || []),\n ...(positioned.value.backgroundAllDayEvents[resourceId] || []),\n]\n\nconst backgroundEventStyle = (event: ScheduleEventData & { position: any }) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n\n return {\n left: `${event.position.top}%`,\n right: `${100 - event.position.top - event.position.height}%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n }\n}\n\nconst allDayEvents = (resourceId: string | number) =>\n positioned.value.allDayEvents[resourceId] || []\n\nconst allDayEventStyle = (index: number) => ({\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n})\n\nconst allRegularEvents = (resourceId: string | number) =>\n positioned.value.regularEvents[resourceId] || []\n\nconst visibleRegularEvents = (resourceId: string | number) =>\n allRegularEvents(resourceId).filter(\n (event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot!),\n )\n\nconst eventWrapperStyle = (event: ScheduleEventData & { position: any }) => {\n const position = resize.getResizePosition(event.id)\n const left = position?.left ?? event.position.top\n const width = position?.width ?? event.position.height\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n\n return {\n left: `calc(${left}% + 1px)`,\n width: `calc(${width}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n '--event-color': colors.color,\n }\n}\n\nconst moreClusters = (resourceId: string | number) =>\n getOverlapClusters(allRegularEvents(resourceId))\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot!),\n )\n .map((cluster) => {\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(...cluster.map((event) => event.position.top + event.position.height))\n\n return {\n cluster,\n hiddenCount: cluster.filter((event) => event.position.column >= props.maxEventsPerTimeSlot!)\n .length,\n style: {\n position: 'absolute' as const,\n left: `calc(${left}% + 1px)`,\n width: `calc(${right - left}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n }\n })\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n }\n : undefined,\n)\n\nconst indicatorStyle = computed(() => ({\n '--indicator-left-offset': hasGroups.value\n ? `calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width) + (100% - var(--resources-day-view-resource-label-width) - var(--resources-day-view-group-label-width)) * ${indicatorOffset.value} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${indicatorOffset.value} / 100)`,\n '--_time-bubble-width': String(currentTime.value).toLowerCase().includes('m') ? '64px' : '46px',\n}))\n\nconst rowMinHeight = (resourceId: string | number) => {\n const count = allDayEvents(resourceId).length\n\n return count\n ? {\n minHeight: `max(var(--resources-day-view-row-height), calc(${count} * (var(--resources-day-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined\n}\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) {\n emit('eventClick', event, nativeEvent)\n }\n}\n\nconst startResize = (\n event: ScheduleEventData & { position: any },\n resourceIndex: number,\n edge: 'start' | 'end',\n pointerEvent: PointerEvent,\n) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container) {\n return\n }\n\n resize.handleResizeStart({\n event,\n edge,\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: date.value,\n pointerEvent,\n })\n}\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n return target\n ? {\n date: date.value,\n slotIndex: target.slotIndex,\n time: intervals.value[target.slotIndex]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesDayView') }\"\n :root-ref=\"setRootElement\"\n :data-resizing=\"resize.state.value ? true : undefined\"\n :data-event-interaction=\"resize.state.value ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :date=\"date\" :label=\"headerLabel\">\n <ScheduleHeaderBase\n view=\"day\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'day')\"\n :control=\"{ title: headerLabel }\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesDayViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesDayViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n @scroll-position-change=\"\n (position) => {\n scrolled = position.y !== 0\n scrolledX = position.x !== 0\n }\n \"\n >\n <div v-bind=\"getStyles('resourcesDayViewInner')\">\n <Box\n v-bind=\"getStyles('resourcesDayViewTimeLabelsRow')\"\n :data-scrolled=\"scrolled || undefined\"\n >\n <div v-bind=\"getStyles('resourcesDayViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <Box\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"interval.startTime\"\n v-bind=\"staticStyles('resourcesDayViewTimeLabel')\"\n :data-business-hours=\"businessHoursMods[slotIndex]['business-hours'] || undefined\"\n :data-non-business-hours=\"\n businessHoursMods[slotIndex]['non-business-hours'] || undefined\n \"\n >\n <slot\n name=\"timeLabel\"\n :label=\"\n formatDate({\n date: `${date} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n \"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n >\n {{\n formatDate({\n date: `${date} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </slot>\n </Box>\n </Box>\n\n <Box\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesDayViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesDayViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesDayViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <Box\n v-bind=\"staticStyles('resourcesDayViewResourceLabel')\"\n :data-scrolled-x=\"scrolledX || undefined\"\n :data-has-groups=\"groupInfo(resourceIndex) !== undefined || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </Box>\n\n <Box\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"getStyles('resourcesDayViewRowSlots', { style: rowMinHeight(resource.id) })\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"withDragHandlers ? handleRowDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <template v-for=\"event in backgroundEvents(resource.id)\" :key=\"`bg-${event.id}`\">\n <slot name=\"backgroundEvent\" :event=\"event\">\n <Box\n v-bind=\"\n getStyles('resourcesDayViewBackgroundEvent', {\n style: backgroundEventStyle(event),\n })\n \"\n >\n <component\n :is=\"() => eventRenderers.renderEventBody!(event)\"\n v-if=\"eventRenderers.renderEventBody\"\n />\n <template v-else>{{ event.title }}</template>\n </Box>\n </slot>\n </template>\n\n <template\n v-for=\"(event, index) in allDayEvents(resource.id)\"\n :key=\"`all-${event.id}`\"\n >\n <Box\n v-bind=\"\n getStyles('resourcesDayViewAllDayEvent', { style: allDayEventStyle(index) })\n \"\n >\n <slot name=\"allDayEvent\" :event=\"event\">\n <ScheduleEvent\n :event=\"event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @click=\"\n isStatic ? undefined : emit('eventClick', event, $event as MouseEvent)\n \"\n />\n </slot>\n </Box>\n </template>\n\n <Box\n v-for=\"event in visibleRegularEvents(resource.id)\"\n :key=\"event.id\"\n v-bind=\"\n getStyles('resourcesDayViewEventWrapper', { style: eventWrapperStyle(event) })\n \"\n :data-resizing=\"resize.getResizePosition(event.id) !== null || undefined\"\n >\n <ScheduleEvent\n :event=\"event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(event)\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"isStatic ? undefined : clickEvent(event, $event as MouseEvent)\"\n />\n\n <template v-if=\"resize.isResizableEvent(event)\">\n <div\n v-for=\"edge in ['start', 'end'] as const\"\n :key=\"edge\"\n v-bind=\"staticStyles('resourcesDayViewResizeHandle')\"\n :data-edge=\"edge\"\n :data-active=\"resize.state.value?.edge === edge || undefined\"\n :aria-label=\"`${\n edge === 'start' ? 'Resize event start' : 'Resize event end'\n } ${event.title}`\"\n @dragstart.prevent\n @pointerdown=\"startResize(event, resourceIndex, edge, $event)\"\n />\n </template>\n </Box>\n\n <template\n v-for=\"entry in moreClusters(resource.id)\"\n :key=\"`more-${entry.cluster[0].id}`\"\n >\n <slot name=\"moreEvents\" :events=\"entry.cluster\" :hidden-count=\"entry.hiddenCount\">\n <MoreEvents\n :events=\"entry.cluster\"\n :more-events-count=\"entry.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"entry.style\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <UnstyledButton\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"interval.startTime\"\n :ref=\"setControl(resourceIndex, slotIndex)\"\n v-bind=\"staticStyles('resourcesDayViewRowSlot')\"\n :data-business-hours=\"businessHoursMods[slotIndex]['business-hours'] || undefined\"\n :data-non-business-hours=\"\n businessHoursMods[slotIndex]['non-business-hours'] || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id && dropTarget.slotIndex === slotIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(slotIndex, String(resource.id)) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"props.withDragSlotSelect ? slotIndex : undefined\"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :aria-label=\"`${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${date} ${interval.startTime} - ${interval.endTime}`\"\n :tabindex=\"isStatic ? -1 : resourceIndex === 0 && slotIndex === 0 ? 0 : -1\"\n @keydown=\"\n handleResourcesGridKeyDown({ controls, resourceIndex, slotIndex, event: $event })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown($event, slotIndex, String(resource.id))\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('timeSlotClick', {\n slotStart: `${date} ${interval.startTime}` as DateTimeStringValue,\n slotEnd: `${date} ${interval.endTime}` as DateTimeStringValue,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot\n name=\"timeSlot\"\n :resource=\"resource\"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n />\n </UnstyledButton>\n </Box>\n </Box>\n\n <template v-if=\"showIndicator\">\n <slot name=\"currentTimeIndicator\" :time=\"currentTime\" :offset=\"indicatorOffset\">\n <Box\n v-bind=\"\n getStyles('resourcesDayViewCurrentTimeIndicator', { style: indicatorStyle })\n \"\n >\n <div\n v-if=\"props.withCurrentTimeBubble\"\n v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')\"\n >\n {{ currentTime }}\n </div>\n <div v-else v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('resourcesDayViewCurrentTimeIndicatorLine')\" />\n </Box>\n </slot>\n </template>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ResourcesDayViewComponent, { varsResolver } from './ResourcesDayView.vue'\nimport type { ResourcesDayViewFactory } from './ResourcesDayView.types'\nimport classes from './ResourcesDayView.module.css'\n\nexport const ResourcesDayView = factory<ResourcesDayViewFactory>(ResourcesDayViewComponent, {\n classes,\n varsResolver,\n})\n\nexport type {\n ResourceExternalDropData,\n ResourceSlotDragEndData,\n ResourceTimeSlotClickData,\n ResourceViewDropData,\n ResourcesDayViewCssVariables,\n ResourcesDayViewEmits,\n ResourcesDayViewFactory,\n ResourcesDayViewOwnProps,\n ResourcesDayViewOwnStylesNames,\n ResourcesDayViewProps,\n ResourcesDayViewSlots,\n ResourcesDayViewStylesNames,\n} from './ResourcesDayView.types'\n","import dayjs from 'dayjs'\nimport type { ScheduleEventData, ScheduleResourceData } from '../../../types'\nimport { expandRecurringEvents, isMultidayEvent } from '../../../utils'\nimport {\n getResourcesDayViewEvents,\n type ResourcesDayViewEventsResult,\n} from '../../ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events'\nimport { calculateEventDays } from '../../WeekView/get-week-view-events/calculate-event-days'\nimport { getEventEndDate } from '../../WeekView/get-week-view-events/get-event-end-date'\n\nexport interface ResourcesWeekViewAllDayBar {\n event: ScheduleEventData\n startDayIndex: number\n endDayIndex: number\n row: number\n}\n\nexport interface ResourcesWeekViewEventsResult {\n byDay: Record<string, ResourcesDayViewEventsResult>\n allDayBars: Record<string | number, ResourcesWeekViewAllDayBar[]>\n}\n\nfunction assignAllDayRows(bars: ResourcesWeekViewAllDayBar[]): void {\n const rowEnds: number[] = []\n ;[...bars]\n .sort((a, b) => a.startDayIndex - b.startDayIndex || a.endDayIndex - b.endDayIndex)\n .forEach((bar) => {\n let row = 0\n while (row < rowEnds.length && rowEnds[row] >= bar.startDayIndex) row += 1\n rowEnds[row] = bar.endDayIndex\n bar.row = row\n })\n}\n\nexport function getResourcesWeekViewEvents({\n events,\n resources,\n weekdays,\n startTime,\n endTime,\n intervalMinutes,\n expansionLimit,\n}: {\n events: ScheduleEventData[] | undefined\n resources: ScheduleResourceData[]\n weekdays: string[]\n startTime?: string\n endTime?: string\n intervalMinutes?: number\n expansionLimit?: number\n}): ResourcesWeekViewEventsResult {\n const expanded = expandRecurringEvents({\n events,\n rangeStart: dayjs(weekdays[0]).startOf('day').toDate(),\n rangeEnd: dayjs(weekdays.at(-1)).endOf('day').toDate(),\n expansionLimit,\n })\n const seen = new Set<string | number>()\n expanded?.forEach((event) => {\n if (seen.has(event.id)) {\n throw new Error(\n `[@mantine/schedule] ResourcesWeekView: Duplicated event ids found: ${event.id}`,\n )\n }\n seen.add(event.id)\n })\n\n const byDay: Record<string, ResourcesDayViewEventsResult> = {}\n const assigned = new Set<string | number>()\n const spanning = (event: ScheduleEventData) =>\n event.display !== 'background' && isMultidayEvent(event)\n weekdays.forEach((day) => {\n const dayEvents = expanded?.filter((event) => {\n if (assigned.has(event.id) || spanning(event)) return false\n const start = dayjs(event.start)\n const dayStart = dayjs(day).startOf('day')\n if (start.isSame(dayStart, 'day')) {\n assigned.add(event.id)\n return true\n }\n return (\n event.display === 'background' &&\n start.isBefore(dayjs(day).endOf('day')) &&\n dayjs(event.end).isAfter(dayStart)\n )\n })\n byDay[day] = getResourcesDayViewEvents({\n events: dayEvents,\n resources,\n date: day,\n startTime,\n endTime,\n intervalMinutes,\n })\n })\n\n const allDayBars: Record<string | number, ResourcesWeekViewAllDayBar[]> = {}\n resources.forEach((resource) => (allDayBars[resource.id] = []))\n weekdays.forEach((day, dayIndex) => {\n resources.forEach((resource) => {\n byDay[day].allDayEvents[resource.id]?.forEach((event) =>\n allDayBars[resource.id].push({\n event,\n startDayIndex: dayIndex,\n endDayIndex: dayIndex,\n row: 0,\n }),\n )\n })\n })\n expanded?.forEach((event) => {\n if (!spanning(event) || event.resourceId === undefined || !(event.resourceId in allDayBars))\n return\n const days = calculateEventDays({\n event,\n weekDays: weekdays,\n actualEndDate: getEventEndDate(event),\n })\n if (!days.length) return\n allDayBars[event.resourceId].push({\n event,\n startDayIndex: weekdays.indexOf(days[0]),\n endDayIndex: weekdays.indexOf(days.at(-1)!),\n row: 0,\n })\n })\n resources.forEach((resource) => assignAllDayRows(allDayBars[resource.id]))\n return { byDay, allDayBars }\n}\n",".resourcesWeekView {\n --resources-week-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-week-view-resource-label-width: 120px;\n --resources-week-view-slot-width: 60px;\n --resources-week-view-row-height: 64px;\n --resources-week-view-group-label-width: 80px;\n --resources-week-view-all-day-height: 20px;\n @mixin where-light {\n --resources-week-view-border-color: var(--mantine-color-gray-3);\n --resources-week-view-business-hours-bg: var(--mantine-color-white);\n --resources-week-view-non-business-hours-bg: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n --resources-week-view-border-color: var(--mantine-color-dark-4);\n --resources-week-view-business-hours-bg: var(--mantine-color-dark-7);\n --resources-week-view-non-business-hours-bg: var(--mantine-color-dark-6);\n }\n}\n.resourcesWeekViewRoot {\n border: 1px solid var(--resources-week-view-border-color);\n border-radius: var(--resources-week-view-radius);\n overflow: hidden;\n max-width: fit-content;\n position: relative;\n}\n.resourcesWeekViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n.resourcesWeekViewInner {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n}\n.resourcesWeekViewHeaderRows {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-week-view-border-color);\n margin-bottom: -1px;\n}\n.resourcesWeekViewCorner {\n flex: 0 0 var(--resources-week-view-resource-label-width);\n min-width: var(--resources-week-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n position: sticky;\n left: 0;\n z-index: 6;\n background-color: var(--mantine-color-body);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n}\n.resourcesWeekViewHeaderContent {\n display: flex;\n flex-direction: column;\n}\n.resourcesWeekViewDayLabelsRow {\n display: flex;\n border-bottom: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewDayLabel {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n cursor: default;\n height: 32px;\n text-transform: capitalize;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n &:where([data-today]) {\n color: var(--mantine-primary-color-contrast);\n background-color: var(--mantine-primary-color-filled);\n font-weight: var(--mantine-font-weight-bold);\n }\n}\n.resourcesWeekViewTimeLabelsRow {\n display: flex;\n}\n.resourcesWeekViewTimeLabel {\n flex: 0 0 var(--resources-week-view-slot-width);\n min-width: var(--resources-week-view-slot-width);\n max-width: var(--resources-week-view-slot-width);\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n user-select: none;\n cursor: default;\n font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-week-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-week-view-non-business-hours-bg);\n }\n}\n.resourcesWeekViewRow {\n display: flex;\n border-top: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewResourceLabel {\n flex: 0 0 var(--resources-week-view-resource-label-width);\n min-width: var(--resources-week-view-resource-label-width);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n min-height: var(--resources-week-view-row-height);\n position: sticky;\n left: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n transition: box-shadow 100ms ease;\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n &:where([data-has-groups]) {\n left: var(--resources-week-view-group-label-width);\n }\n}\n.resourcesWeekViewGroupColumn,\n.resourcesWeekViewGroupColumnEmpty {\n flex: 0 0 var(--resources-week-view-group-label-width);\n min-width: var(--resources-week-view-group-label-width);\n min-height: var(--resources-week-view-row-height);\n position: sticky;\n left: 0;\n z-index: 12;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n}\n.resourcesWeekViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 13;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-week-view-row-height) + 1px);\n }\n}\n.resourcesWeekViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-week-view-row-height);\n}\n.resourcesWeekViewRowSlot {\n flex: 0 0 var(--resources-week-view-slot-width);\n min-width: var(--resources-week-view-slot-width);\n max-width: var(--resources-week-view-slot-width);\n min-height: var(--resources-week-view-row-height);\n border-inline-end: 1px solid var(--resources-week-view-border-color);\n cursor: pointer;\n position: relative;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n &:where([data-business-hours]) {\n background-color: var(--resources-week-view-business-hours-bg);\n }\n &:where([data-non-business-hours]) {\n background-color: var(--resources-week-view-non-business-hours-bg);\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-color-blue-4);\n border-radius: 2px;\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n}\n.resourcesWeekViewBackgroundEvent {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: var(--resources-week-view-radius);\n background-color: var(--bg-event-bg);\n overflow: hidden;\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n padding: 3px 4px;\n color: var(--bg-event-color);\n}\n.resourcesWeekViewAllDayEvent {\n position: absolute;\n height: var(--resources-week-view-all-day-height);\n z-index: 2;\n}\n.resourcesWeekViewEventWrapper {\n position: absolute;\n z-index: 3;\n}\n.resourcesWeekViewResizeHandle {\n position: absolute;\n top: 20%;\n width: 4px;\n height: 60%;\n cursor: ew-resize;\n z-index: 5;\n border-radius: 2px;\n opacity: 0;\n transition: opacity 100ms ease;\n pointer-events: all;\n background-color: var(--event-color);\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n &:where([data-edge='start']) {\n left: -2px;\n }\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n.resourcesWeekViewEventWrapper:hover .resourcesWeekViewResizeHandle {\n opacity: 0.5;\n}\n.resourcesWeekViewEventWrapper .resourcesWeekViewResizeHandle:hover,\n.resourcesWeekViewEventWrapper[data-resizing] .resourcesWeekViewResizeHandle[data-active] {\n opacity: 0.8;\n}\n.resourcesWeekViewEventWrapper[data-resizing] .resourcesWeekViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n}\n.resourcesWeekView:where([data-event-interaction]) .resourcesWeekViewRowSlot {\n pointer-events: none;\n}\n.resourcesWeekView:where([data-resizing]) * {\n cursor: ew-resize !important;\n}\n.resourcesWeekViewCurrentTimeIndicator {\n --_indicator-color: var(--resources-week-view-indicator-color, var(--mantine-color-red-7));\n --_time-bubble-height: 18px;\n --_thumb-size: 12px;\n position: absolute;\n pointer-events: none;\n top: 62px;\n bottom: 0;\n left: var(--indicator-left-offset);\n width: 2px;\n z-index: 3;\n}\n.resourcesWeekViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n inset-block: 0;\n background-color: var(--_indicator-color);\n}\n.resourcesWeekViewCurrentTimeIndicatorThumb {\n position: absolute;\n top: -5px;\n left: -5px;\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n border-radius: 50%;\n border: 1px solid var(--mantine-color-body);\n background-color: var(--_indicator-color);\n}\n.resourcesWeekViewCurrentTimeIndicatorTimeBubble {\n position: absolute;\n top: 0;\n height: var(--_time-bubble-height);\n width: var(--_time-bubble-width);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 1000px;\n background-color: var(--_indicator-color);\n color: var(--mantine-color-white);\n font-size: var(--mantine-font-size-xs);\n font-weight: var(--mantine-font-weight-bold);\n box-shadow: var(--mantine-shadow-sm);\n white-space: nowrap;\n text-transform: uppercase;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesWeekViewOwnProps } from './ResourcesWeekView.types'\n\nconst defaultProps = {\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n withHeader: true,\n weekLabelFormat: 'MMM DD',\n slotWidth: 60,\n rowHeight: 64,\n groupLabelWidth: 80,\n businessHours: ['09:00:00', '17:00:00'],\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n maxEventsPerTimeSlot: 2,\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n withWeekendDays: true,\n weekdayFormat: 'ddd D',\n highlightToday: true,\n} satisfies Partial<ResourcesWeekViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesWeekView: {\n '--resources-week-view-radius': resolveScheduleRadius(radius),\n '--resources-week-view-slot-width': cssSize(slotWidth),\n '--resources-week-view-row-height': cssSize(rowHeight),\n '--resources-week-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, RESOURCE_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport {\n Box,\n ScrollArea,\n UnstyledButton,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n getWeekDays,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { getOverlapClusters } from '../ResourcesDayView/get-overlap-clusters/get-overlap-clusters'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getWeekLabel } from '../WeekView/get-week-label/get-week-label'\nimport { getResourcesWeekViewEvents } from './get-resources-week-view-events/get-resources-week-view-events'\nimport type { ResourcesWeekViewEmits, ResourcesWeekViewSlots } from './ResourcesWeekView.types'\nimport classes from './ResourcesWeekView.module.css'\n\ndefineOptions({\n name: 'ResourcesWeekView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesWeekViewOwnProps>(), {\n groups: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n radius: undefined,\n startScrollDateTime: undefined,\n scrollAreaProps: undefined,\n locale: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n weekLabelFormat: undefined,\n renderWeekLabel: undefined,\n events: undefined,\n slotWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n labels: undefined,\n businessHours: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n firstDayOfWeek: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n weekdayFormat: undefined,\n highlightToday: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesWeekViewSlots>()\n\nconst emit = defineEmits<ResourcesWeekViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('ResourcesWeekView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesWeekView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesWeekView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; flatIndex: number } | null>(null)\nconst scrolledX = ref(false)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst weekdays = computed(() =>\n getWeekDays({\n week: props.date,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n }).map((day) => dayjs(day).format('YYYY-MM-DD') as DateStringValue),\n)\n\nconst slotsPerDay = computed(() => intervals.value.length)\nconst dayCount = computed(() => weekdays.value.length)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst weekEvents = computed(() =>\n getResourcesWeekViewEvents({\n events: props.events,\n resources: props.resources,\n weekdays: weekdays.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? new Date()))\n\nconst todayIndex = computed(() =>\n weekdays.value.findIndex((day) => dayjs(day).isSame(now.value, 'day')),\n)\n\nconst showIndicator = computed(\n () =>\n (props.withCurrentTimeIndicator ?? todayIndex.value !== -1) &&\n todayIndex.value !== -1 &&\n isInTimeRange({\n date: now.value.toDate(),\n startTime: props.startTime!,\n endTime: props.endTime!,\n }),\n)\n\nconst indicatorOffset = computed(() => {\n const timeOffset = getCurrentTimePosition({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n now: now.value,\n })\n\n return ((todayIndex.value + timeOffset / 100) / dayCount.value) * 100\n})\n\nconst currentTime = computed(() =>\n formatDate({ date: now.value, locale: props.locale || 'en', format: props.slotLabelFormat! }),\n)\n\nconst weekStart = computed(() => weekdays.value[0])\nconst weekEnd = computed(() => weekdays.value.at(-1)!)\n\nconst headerLabel = computed(\n () =>\n props.renderWeekLabel?.({ weekStart: weekStart.value, weekEnd: weekEnd.value }) ??\n getWeekLabel({\n weekdays: weekdays.value,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat!,\n }),\n)\n\nconst businessHoursMods = computed(() =>\n weekdays.value.map((day) =>\n intervals.value.map((interval) =>\n getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(day).day() as DayOfWeek,\n }),\n ),\n ),\n)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const count = slotsPerDay.value\n const startDay = weekdays.value[Math.floor(start / count)]\n const endDay = weekdays.value[Math.floor(end / count)]\n const first = intervals.value[start % count]\n const last = intervals.value[end % count]\n\n if (first && last && startDay && endDay) {\n emit('slotDragEnd', {\n rangeStart: `${startDay} ${first.startTime}` as DateTimeStringValue,\n rangeEnd: `${endDay} ${last.endTime}` as DateTimeStringValue,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n})\n\nconst resize = useHorizontalEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nonMounted(async () => {\n if (!props.startScrollDateTime) {\n return\n }\n\n await nextTick()\n\n const target = dayjs(props.startScrollDateTime)\n const dayIndex = weekdays.value.findIndex((day) => dayjs(day).isSame(target, 'day'))\n\n if (dayIndex < 0) {\n return\n }\n\n const targetTime = target.format('HH:mm:ss')\n const intervalIndex = intervals.value.findIndex((interval) => interval.startTime >= targetTime)\n\n if (intervalIndex < 0) {\n return\n }\n\n const flatIndex = dayIndex * slotsPerDay.value + intervalIndex\n\n scrollSlotIntoView(controls[0]?.[flatIndex], 'x')\n})\n\nconst setControl = (resourceIndex: number, flatIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][flatIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n\n if (node instanceof HTMLElement) {\n rowContainers.set(resourceIndex, node)\n }\n}\n\nconst withDragHandlers = computed(\n () => Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop),\n)\n\nconst getFlatIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n const count = slotsPerDay.value * dayCount.value\n\n if (!container || count === 0) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(count - 1, Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * count)),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, flatIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const count = slotsPerDay.value\n const day = weekdays.value[Math.floor(flatIndex / count)]\n const interval = intervals.value[flatIndex % count]\n\n if (!day || !interval) {\n return\n }\n\n const target = `${day} ${interval.startTime}` as DateTimeStringValue\n const event = getDropEvent(props.events, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', { ...moveEventTo(event, target), resourceId })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; flatIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.flatIndex === next.flatIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(flatIndex < 0 ? null : { resourceId, flatIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n if (isStatic.value) {\n return\n }\n\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n\n if (flatIndex >= 0) {\n emitDrop(nativeEvent, resource.id, flatIndex)\n }\n}\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-week-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst dayOffset = (dayIndex: number) => (dayIndex / dayCount.value) * 100\nconst dayWidth = computed(() => 100 / dayCount.value)\n\nconst backgroundEvents = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) => {\n const data = weekEvents.value.byDay[day]\n\n return [\n ...(data.backgroundTimedEvents[resourceId] || []),\n ...(data.backgroundAllDayEvents[resourceId] || []),\n ].map((event) => ({ event, day, dayIndex }))\n })\n\nconst backgroundEventStyle = (event: ScheduleEventData & { position: any }, dayIndex: number) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n\n return {\n left: `${dayOffset(dayIndex) + (event.position.top / 100) * dayWidth.value}%`,\n right: `${\n 100 -\n dayOffset(dayIndex) -\n ((event.position.top + event.position.height) / 100) * dayWidth.value\n }%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n }\n}\n\nconst regularEvents = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) =>\n (weekEvents.value.byDay[day].regularEvents[resourceId] || [])\n .filter((event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot!))\n .map((event) => ({ event, day, dayIndex })),\n )\n\nconst eventWrapperStyle = (event: ScheduleEventData & { position: any }, dayIndex: number) => {\n const position = resize.getResizePosition(event.id)\n const relativeLeft = position?.left ?? event.position.top\n const relativeWidth = position?.width ?? event.position.height\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n\n return {\n '--event-color': colors.color,\n left: `calc(${dayOffset(dayIndex) + (relativeLeft / 100) * dayWidth.value}% + 1px)`,\n width: `calc(${(relativeWidth / 100) * dayWidth.value}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n }\n}\n\nconst moreClusters = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) =>\n getOverlapClusters(weekEvents.value.byDay[day].regularEvents[resourceId] || [])\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot!),\n )\n .map((cluster) => {\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(\n ...cluster.map((event) => event.position.top + event.position.height),\n )\n\n return {\n cluster,\n day,\n hiddenCount: cluster.filter(\n (event) => event.position.column >= props.maxEventsPerTimeSlot!,\n ).length,\n style: {\n position: 'absolute' as const,\n left: `calc(${dayOffset(dayIndex) + (left / 100) * dayWidth.value}% + 1px)`,\n width: `calc(${((right - left) / 100) * dayWidth.value}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n }\n }),\n )\n\nconst allDayBars = (resourceId: string | number) => weekEvents.value.allDayBars[resourceId] || []\n\nconst allDayBarStyle = (bar: { startDayIndex: number; endDayIndex: number; row: number }) => ({\n left: `calc(${(bar.startDayIndex / dayCount.value) * 100}% + 1px)`,\n width: `calc(${((bar.endDayIndex - bar.startDayIndex + 1) / dayCount.value) * 100}% - 2px)`,\n top: `calc(${bar.row} * (var(--resources-week-view-all-day-height) + 2px) + 2px)`,\n})\n\nconst rowMinHeight = (resourceId: string | number) => {\n const bars = allDayBars(resourceId)\n const rows = bars.length ? Math.max(...bars.map((bar) => bar.row)) + 1 : 0\n\n return rows\n ? {\n minHeight: `max(var(--resources-week-view-row-height), calc(${rows} * (var(--resources-week-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined\n}\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n }\n : undefined,\n)\n\nconst dayLabelStyle = computed(() => ({\n flex: `0 0 calc(var(--resources-week-view-slot-width) * ${slotsPerDay.value})`,\n}))\n\nconst indicatorStyle = computed(() => ({\n '--indicator-left-offset': hasGroups.value\n ? `calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width) + (100% - var(--resources-week-view-resource-label-width) - var(--resources-week-view-group-label-width)) * ${indicatorOffset.value} / 100)`\n : `calc(var(--resources-week-view-resource-label-width) + (100% - var(--resources-week-view-resource-label-width)) * ${indicatorOffset.value} / 100)`,\n '--_time-bubble-width': String(currentTime.value).toLowerCase().includes('m') ? '64px' : '46px',\n}))\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) {\n emit('eventClick', event, nativeEvent)\n }\n}\n\nconst startResize = (\n event: ScheduleEventData & { position: any },\n day: DateStringValue,\n dayIndex: number,\n resourceIndex: number,\n edge: 'start' | 'end',\n pointerEvent: PointerEvent,\n) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container) {\n return\n }\n\n resize.handleResizeStart({\n event,\n edge,\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: day,\n dayIndex,\n dayCount: dayCount.value,\n pointerEvent,\n })\n}\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n\n if (!target) {\n return null\n }\n\n const count = slotsPerDay.value\n const day = weekdays.value[Math.floor(target.flatIndex / count)]\n\n return day\n ? {\n date: day,\n slotIndex: target.flatIndex % count,\n time: intervals.value[target.flatIndex % count]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesWeekView') }\"\n :root-ref=\"setRootElement\"\n :data-resizing=\"resize.state.value ? true : undefined\"\n :data-event-interaction=\"resize.state.value ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :week-start=\"weekStart\" :week-end=\"weekEnd\" :label=\"headerLabel\">\n <ScheduleHeaderBase\n view=\"week\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'week')\"\n :control=\"{ title: headerLabel }\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesWeekViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesWeekViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n @scroll-position-change=\"(position) => (scrolledX = position.x !== 0)\"\n >\n <div v-bind=\"getStyles('resourcesWeekViewInner')\">\n <Box v-bind=\"getStyles('resourcesWeekViewHeaderRows')\">\n <div v-bind=\"getStyles('resourcesWeekViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <div v-bind=\"getStyles('resourcesWeekViewHeaderContent')\">\n <div v-bind=\"getStyles('resourcesWeekViewDayLabelsRow')\">\n <Box\n v-for=\"day in weekdays\"\n :key=\"day\"\n v-bind=\"getStyles('resourcesWeekViewDayLabel', { style: dayLabelStyle })\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-today=\"(props.highlightToday && dayjs(day).isSame(now, 'day')) || undefined\"\n >\n <slot\n name=\"dayLabel\"\n :date=\"day\"\n :label=\"\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n \"\n >\n {{\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n }}\n </slot>\n </Box>\n </div>\n\n <div v-bind=\"getStyles('resourcesWeekViewTimeLabelsRow')\">\n <template v-for=\"(day, dayIndex) in weekdays\" :key=\"day\">\n <Box\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"`${day}-${interval.startTime}`\"\n v-bind=\"staticStyles('resourcesWeekViewTimeLabel')\"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n >\n <slot\n name=\"timeLabel\"\n :date=\"day\"\n :label=\"\n formatDate({\n date: `${day} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n \"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n >\n {{\n formatDate({\n date: `${day} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </slot>\n </Box>\n </template>\n </div>\n </div>\n </Box>\n\n <Box\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesWeekViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesWeekViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesWeekViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <Box\n v-bind=\"staticStyles('resourcesWeekViewResourceLabel')\"\n :data-scrolled-x=\"scrolledX || undefined\"\n :data-has-groups=\"groupInfo(resourceIndex) !== undefined || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </Box>\n\n <Box\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"getStyles('resourcesWeekViewRowSlots', { style: rowMinHeight(resource.id) })\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"withDragHandlers ? handleRowDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <template\n v-for=\"entry in backgroundEvents(resource.id)\"\n :key=\"`bg-${entry.day}-${entry.event.id}`\"\n >\n <slot name=\"backgroundEvent\" :event=\"entry.event\" :date=\"entry.day\">\n <Box\n v-bind=\"\n getStyles('resourcesWeekViewBackgroundEvent', {\n style: backgroundEventStyle(entry.event, entry.dayIndex),\n })\n \"\n >\n <component\n :is=\"() => eventRenderers.renderEventBody!(entry.event)\"\n v-if=\"eventRenderers.renderEventBody\"\n />\n <template v-else>{{ entry.event.title }}</template>\n </Box>\n </slot>\n </template>\n\n <template v-for=\"bar in allDayBars(resource.id)\" :key=\"`all-${bar.event.id}`\">\n <Box\n v-bind=\"getStyles('resourcesWeekViewAllDayEvent', { style: allDayBarStyle(bar) })\"\n >\n <slot\n name=\"allDayEvent\"\n :event=\"bar.event\"\n :start-day-index=\"bar.startDayIndex\"\n :end-day-index=\"bar.endDayIndex\"\n >\n <ScheduleEvent\n :event=\"bar.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @click=\"\n isStatic ? undefined : emit('eventClick', bar.event, $event as MouseEvent)\n \"\n />\n </slot>\n </Box>\n </template>\n\n <Box\n v-for=\"entry in regularEvents(resource.id)\"\n :key=\"`${entry.day}-${entry.event.id}`\"\n v-bind=\"\n getStyles('resourcesWeekViewEventWrapper', {\n style: eventWrapperStyle(entry.event, entry.dayIndex),\n })\n \"\n :data-resizing=\"resize.getResizePosition(entry.event.id) !== null || undefined\"\n >\n <ScheduleEvent\n :event=\"entry.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(entry.event)\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"isStatic ? undefined : clickEvent(entry.event, $event as MouseEvent)\"\n />\n\n <template v-if=\"resize.isResizableEvent(entry.event)\">\n <div\n v-for=\"edge in ['start', 'end'] as const\"\n :key=\"edge\"\n v-bind=\"staticStyles('resourcesWeekViewResizeHandle')\"\n :data-edge=\"edge\"\n :data-active=\"resize.state.value?.edge === edge || undefined\"\n :aria-label=\"`${\n edge === 'start' ? 'Resize event start' : 'Resize event end'\n } ${entry.event.title}`\"\n @dragstart.prevent\n @pointerdown=\"\n startResize(\n entry.event,\n entry.day,\n entry.dayIndex,\n resourceIndex,\n edge,\n $event,\n )\n \"\n />\n </template>\n </Box>\n\n <template\n v-for=\"entry in moreClusters(resource.id)\"\n :key=\"`more-${entry.day}-${entry.cluster[0].id}`\"\n >\n <slot\n name=\"moreEvents\"\n :events=\"entry.cluster\"\n :hidden-count=\"entry.hiddenCount\"\n :date=\"entry.day\"\n >\n <MoreEvents\n :events=\"entry.cluster\"\n :more-events-count=\"entry.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"entry.style\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <template v-for=\"(day, dayIndex) in weekdays\" :key=\"`slots-${day}`\">\n <UnstyledButton\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"`${day}-${interval.startTime}`\"\n :ref=\"setControl(resourceIndex, dayIndex * slotsPerDay + slotIndex)\"\n v-bind=\"staticStyles('resourcesWeekViewRowSlot')\"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id &&\n dropTarget.flatIndex === dayIndex * slotsPerDay + slotIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(\n dayIndex * slotsPerDay + slotIndex,\n String(resource.id),\n ) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"\n props.withDragSlotSelect ? dayIndex * slotsPerDay + slotIndex : undefined\n \"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :aria-label=\"`${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${day} ${interval.startTime} - ${interval.endTime}`\"\n :tabindex=\"\n isStatic\n ? -1\n : resourceIndex === 0 && dayIndex === 0 && slotIndex === 0\n ? 0\n : -1\n \"\n @keydown=\"\n handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex: dayIndex * slotsPerDay + slotIndex,\n event: $event,\n })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown(\n $event,\n dayIndex * slotsPerDay + slotIndex,\n String(resource.id),\n )\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('timeSlotClick', {\n slotStart: `${day} ${interval.startTime}` as DateTimeStringValue,\n slotEnd: `${day} ${interval.endTime}` as DateTimeStringValue,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot\n name=\"timeSlot\"\n :resource=\"resource\"\n :date=\"day\"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n />\n </UnstyledButton>\n </template>\n </Box>\n </Box>\n\n <template v-if=\"showIndicator\">\n <slot\n name=\"currentTimeIndicator\"\n :time=\"currentTime\"\n :offset=\"indicatorOffset\"\n :date=\"weekdays[todayIndex]\"\n >\n <Box\n v-bind=\"\n getStyles('resourcesWeekViewCurrentTimeIndicator', { style: indicatorStyle })\n \"\n >\n <div\n v-if=\"props.withCurrentTimeBubble\"\n v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorTimeBubble')\"\n >\n {{ currentTime }}\n </div>\n <div v-else v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorLine')\" />\n </Box>\n </slot>\n </template>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesWeekViewOwnProps } from './ResourcesWeekView.types'\n\nconst defaultProps = {\n startTime: '00:00:00',\n endTime: '23:59:59',\n intervalMinutes: 60,\n slotLabelFormat: 'HH:mm',\n withCurrentTimeBubble: true,\n withHeader: true,\n weekLabelFormat: 'MMM DD',\n slotWidth: 60,\n rowHeight: 64,\n groupLabelWidth: 80,\n businessHours: ['09:00:00', '17:00:00'],\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n maxEventsPerTimeSlot: 2,\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n withWeekendDays: true,\n weekdayFormat: 'ddd D',\n highlightToday: true,\n} satisfies Partial<ResourcesWeekViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesWeekView: {\n '--resources-week-view-radius': resolveScheduleRadius(radius),\n '--resources-week-view-slot-width': cssSize(slotWidth),\n '--resources-week-view-row-height': cssSize(rowHeight),\n '--resources-week-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, RESOURCE_VIEWS }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport {\n Box,\n ScrollArea,\n UnstyledButton,\n useProps,\n useSafeMantineTheme,\n useStyles,\n} from '@mantine-vue/core'\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getOrderedResources,\n getWeekDays,\n handleResourcesGridKeyDown,\n isInTimeRange,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { getOverlapClusters } from '../ResourcesDayView/get-overlap-clusters/get-overlap-clusters'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase, createHeaderNavigation } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n moveEventTo,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport { getWeekLabel } from '../WeekView/get-week-label/get-week-label'\nimport { getResourcesWeekViewEvents } from './get-resources-week-view-events/get-resources-week-view-events'\nimport type { ResourcesWeekViewEmits, ResourcesWeekViewSlots } from './ResourcesWeekView.types'\nimport classes from './ResourcesWeekView.module.css'\n\ndefineOptions({\n name: 'ResourcesWeekView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesWeekViewOwnProps>(), {\n groups: undefined,\n startTime: undefined,\n endTime: undefined,\n intervalMinutes: undefined,\n slotLabelFormat: undefined,\n radius: undefined,\n startScrollDateTime: undefined,\n scrollAreaProps: undefined,\n locale: undefined,\n withCurrentTimeIndicator: undefined,\n withCurrentTimeBubble: undefined,\n getCurrentTime: undefined,\n withHeader: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n weekLabelFormat: undefined,\n renderWeekLabel: undefined,\n events: undefined,\n slotWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n labels: undefined,\n businessHours: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n mode: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n firstDayOfWeek: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n weekdayFormat: undefined,\n highlightToday: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesWeekViewSlots>()\n\nconst emit = defineEmits<ResourcesWeekViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\nconst theme = useSafeMantineTheme()\n\nconst props = useProps('ResourcesWeekView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesWeekView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesWeekView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; flatIndex: number } | null>(null)\nconst scrolledX = ref(false)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst intervals = computed(() =>\n getDayTimeIntervals({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n }),\n)\n\nconst weekdays = computed(() =>\n getWeekDays({\n week: props.date,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n withWeekendDays: props.withWeekendDays,\n }).map((day) => dayjs(day).format('YYYY-MM-DD') as DateStringValue),\n)\n\nconst slotsPerDay = computed(() => intervals.value.length)\nconst dayCount = computed(() => weekdays.value.length)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst resourceIdMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst weekEvents = computed(() =>\n getResourcesWeekViewEvents({\n events: props.events,\n resources: props.resources,\n weekdays: weekdays.value,\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst now = computed(() => dayjs(props.getCurrentTime?.() ?? new Date()))\n\nconst todayIndex = computed(() =>\n weekdays.value.findIndex((day) => dayjs(day).isSame(now.value, 'day')),\n)\n\nconst showIndicator = computed(\n () =>\n (props.withCurrentTimeIndicator ?? todayIndex.value !== -1) &&\n todayIndex.value !== -1 &&\n isInTimeRange({\n date: now.value.toDate(),\n startTime: props.startTime!,\n endTime: props.endTime!,\n }),\n)\n\nconst indicatorOffset = computed(() => {\n const timeOffset = getCurrentTimePosition({\n startTime: props.startTime!,\n endTime: props.endTime!,\n intervalMinutes: props.intervalMinutes!,\n now: now.value,\n })\n\n return ((todayIndex.value + timeOffset / 100) / dayCount.value) * 100\n})\n\nconst currentTime = computed(() =>\n formatDate({ date: now.value, locale: props.locale || 'en', format: props.slotLabelFormat! }),\n)\n\nconst weekStart = computed(() => weekdays.value[0])\nconst weekEnd = computed(() => weekdays.value.at(-1)!)\n\nconst headerLabel = computed(\n () =>\n props.renderWeekLabel?.({ weekStart: weekStart.value, weekEnd: weekEnd.value }) ??\n getWeekLabel({\n weekdays: weekdays.value,\n locale: props.locale || 'en',\n weekLabelFormat: props.weekLabelFormat!,\n }),\n)\n\nconst businessHoursMods = computed(() =>\n weekdays.value.map((day) =>\n intervals.value.map((interval) =>\n getBusinessHoursMod({\n time: interval.startTime,\n businessHours: props.businessHours,\n highlightBusinessHours: props.highlightBusinessHours,\n dayOfWeek: dayjs(day).day() as DayOfWeek,\n }),\n ),\n ),\n)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const count = slotsPerDay.value\n const startDay = weekdays.value[Math.floor(start / count)]\n const endDay = weekdays.value[Math.floor(end / count)]\n const first = intervals.value[start % count]\n const last = intervals.value[end % count]\n\n if (first && last && startDay && endDay) {\n emit('slotDragEnd', {\n rangeStart: `${startDay} ${first.startTime}` as DateTimeStringValue,\n rangeEnd: `${endDay} ${last.endTime}` as DateTimeStringValue,\n resourceId: resourceIdMap.value.get(group),\n })\n }\n },\n})\n\nconst resize = useHorizontalEventResize({\n enabled: () => Boolean(props.withEventResize),\n mode: () => props.mode!,\n startTime: () => props.startTime!,\n endTime: () => props.endTime!,\n intervalMinutes: () => props.intervalMinutes!,\n onEventResize: (data) => emit('eventResize', data),\n canResizeEvent: () => props.canResizeEvent,\n})\n\nonMounted(async () => {\n if (!props.startScrollDateTime) {\n return\n }\n\n await nextTick()\n\n const target = dayjs(props.startScrollDateTime)\n const dayIndex = weekdays.value.findIndex((day) => dayjs(day).isSame(target, 'day'))\n\n if (dayIndex < 0) {\n return\n }\n\n const targetTime = target.format('HH:mm:ss')\n const intervalIndex = intervals.value.findIndex((interval) => interval.startTime >= targetTime)\n\n if (intervalIndex < 0) {\n return\n }\n\n const flatIndex = dayIndex * slotsPerDay.value + intervalIndex\n\n scrollSlotIntoView(controls[0]?.[flatIndex], 'x')\n})\n\nconst setControl = (resourceIndex: number, flatIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][flatIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n const node = (element as { $el?: HTMLElement } | null)?.$el ?? element\n\n if (node instanceof HTMLElement) {\n rowContainers.set(resourceIndex, node)\n }\n}\n\nconst withDragHandlers = computed(\n () => Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop),\n)\n\nconst getFlatIndexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n const count = slotsPerDay.value * dayCount.value\n\n if (!container || count === 0) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(count - 1, Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * count)),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, flatIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const count = slotsPerDay.value\n const day = weekdays.value[Math.floor(flatIndex / count)]\n const interval = intervals.value[flatIndex % count]\n\n if (!day || !interval) {\n return\n }\n\n const target = `${day} ${interval.startTime}` as DateTimeStringValue\n const event = getDropEvent(props.events, nativeEvent.dataTransfer)\n\n if (event) {\n emit('eventDrop', { ...moveEventTo(event, target), resourceId })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: target,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; flatIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.flatIndex === next.flatIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(flatIndex < 0 ? null : { resourceId, flatIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n if (isStatic.value) {\n return\n }\n\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const related = nativeEvent.relatedTarget\n const current = nativeEvent.currentTarget\n\n if (\n !(related instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(related)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const flatIndex = getFlatIndexAtPoint(nativeEvent, resourceIndex)\n\n if (flatIndex >= 0) {\n emitDrop(nativeEvent, resource.id, flatIndex)\n }\n}\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-week-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst dayOffset = (dayIndex: number) => (dayIndex / dayCount.value) * 100\nconst dayWidth = computed(() => 100 / dayCount.value)\n\nconst backgroundEvents = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) => {\n const data = weekEvents.value.byDay[day]\n\n return [\n ...(data.backgroundTimedEvents[resourceId] || []),\n ...(data.backgroundAllDayEvents[resourceId] || []),\n ].map((event) => ({ event, day, dayIndex }))\n })\n\nconst backgroundEventStyle = (event: ScheduleEventData & { position: any }, dayIndex: number) => {\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: 'light',\n autoContrast: true,\n })\n\n return {\n left: `${dayOffset(dayIndex) + (event.position.top / 100) * dayWidth.value}%`,\n right: `${\n 100 -\n dayOffset(dayIndex) -\n ((event.position.top + event.position.height) / 100) * dayWidth.value\n }%`,\n minWidth: '1px',\n top: 0,\n height: '100%',\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n }\n}\n\nconst regularEvents = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) =>\n (weekEvents.value.byDay[day].regularEvents[resourceId] || [])\n .filter((event) => event.position.column < Math.max(1, props.maxEventsPerTimeSlot!))\n .map((event) => ({ event, day, dayIndex })),\n )\n\nconst eventWrapperStyle = (event: ScheduleEventData & { position: any }, dayIndex: number) => {\n const position = resize.getResizePosition(event.id)\n const relativeLeft = position?.left ?? event.position.top\n const relativeWidth = position?.width ?? event.position.height\n const colors = theme.value.variantColorResolver({\n color: event.color || theme.value.primaryColor,\n theme: theme.value,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n\n return {\n '--event-color': colors.color,\n left: `calc(${dayOffset(dayIndex) + (relativeLeft / 100) * dayWidth.value}% + 1px)`,\n width: `calc(${(relativeWidth / 100) * dayWidth.value}% - 2px)`,\n top: `${event.position.offset}%`,\n height: `${event.position.width}%`,\n }\n}\n\nconst moreClusters = (resourceId: string | number) =>\n weekdays.value.flatMap((day, dayIndex) =>\n getOverlapClusters(weekEvents.value.byDay[day].regularEvents[resourceId] || [])\n .filter((cluster) =>\n cluster.some((event) => event.position.column >= props.maxEventsPerTimeSlot!),\n )\n .map((cluster) => {\n const left = Math.min(...cluster.map((event) => event.position.top))\n const right = Math.max(\n ...cluster.map((event) => event.position.top + event.position.height),\n )\n\n return {\n cluster,\n day,\n hiddenCount: cluster.filter(\n (event) => event.position.column >= props.maxEventsPerTimeSlot!,\n ).length,\n style: {\n position: 'absolute' as const,\n left: `calc(${dayOffset(dayIndex) + (left / 100) * dayWidth.value}% + 1px)`,\n width: `calc(${((right - left) / 100) * dayWidth.value}% - 2px)`,\n bottom: 0,\n height: '22px',\n zIndex: 4,\n },\n }\n }),\n )\n\nconst allDayBars = (resourceId: string | number) => weekEvents.value.allDayBars[resourceId] || []\n\nconst allDayBarStyle = (bar: { startDayIndex: number; endDayIndex: number; row: number }) => ({\n left: `calc(${(bar.startDayIndex / dayCount.value) * 100}% + 1px)`,\n width: `calc(${((bar.endDayIndex - bar.startDayIndex + 1) / dayCount.value) * 100}% - 2px)`,\n top: `calc(${bar.row} * (var(--resources-week-view-all-day-height) + 2px) + 2px)`,\n})\n\nconst rowMinHeight = (resourceId: string | number) => {\n const bars = allDayBars(resourceId)\n const rows = bars.length ? Math.max(...bars.map((bar) => bar.row)) + 1 : 0\n\n return rows\n ? {\n minHeight: `max(var(--resources-week-view-row-height), calc(${rows} * (var(--resources-week-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined\n}\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n }\n : undefined,\n)\n\nconst dayLabelStyle = computed(() => ({\n flex: `0 0 calc(var(--resources-week-view-slot-width) * ${slotsPerDay.value})`,\n}))\n\nconst indicatorStyle = computed(() => ({\n '--indicator-left-offset': hasGroups.value\n ? `calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width) + (100% - var(--resources-week-view-resource-label-width) - var(--resources-week-view-group-label-width)) * ${indicatorOffset.value} / 100)`\n : `calc(var(--resources-week-view-resource-label-width) + (100% - var(--resources-week-view-resource-label-width)) * ${indicatorOffset.value} / 100)`,\n '--_time-bubble-width': String(currentTime.value).toLowerCase().includes('m') ? '64px' : '46px',\n}))\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\n/** A click that ends a resize gesture must not be reported as an event click. */\nconst clickEvent = (event: ScheduleEventData, nativeEvent: MouseEvent) => {\n if (!resize.wasResizing()) {\n emit('eventClick', event, nativeEvent)\n }\n}\n\nconst startResize = (\n event: ScheduleEventData & { position: any },\n day: DateStringValue,\n dayIndex: number,\n resourceIndex: number,\n edge: 'start' | 'end',\n pointerEvent: PointerEvent,\n) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container) {\n return\n }\n\n resize.handleResizeStart({\n event,\n edge,\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: day,\n dayIndex,\n dayCount: dayCount.value,\n pointerEvent,\n })\n}\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n\n if (!target) {\n return null\n }\n\n const count = slotsPerDay.value\n const day = weekdays.value[Math.floor(target.flatIndex / count)]\n\n return day\n ? {\n date: day,\n slotIndex: target.flatIndex % count,\n time: intervals.value[target.flatIndex % count]?.startTime,\n }\n : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesWeekView') }\"\n :root-ref=\"setRootElement\"\n :data-resizing=\"resize.state.value ? true : undefined\"\n :data-event-interaction=\"resize.state.value ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :week-start=\"weekStart\" :week-end=\"weekEnd\" :label=\"headerLabel\">\n <ScheduleHeaderBase\n view=\"week\"\n :navigation-handlers=\"createHeaderNavigation(props.date, 'week')\"\n :control=\"{ title: headerLabel }\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesWeekViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesWeekViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n @scroll-position-change=\"(position) => (scrolledX = position.x !== 0)\"\n >\n <div v-bind=\"getStyles('resourcesWeekViewInner')\">\n <Box v-bind=\"getStyles('resourcesWeekViewHeaderRows')\">\n <div v-bind=\"getStyles('resourcesWeekViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <div v-bind=\"getStyles('resourcesWeekViewHeaderContent')\">\n <div v-bind=\"getStyles('resourcesWeekViewDayLabelsRow')\">\n <Box\n v-for=\"day in weekdays\"\n :key=\"day\"\n v-bind=\"getStyles('resourcesWeekViewDayLabel', { style: dayLabelStyle })\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-today=\"(props.highlightToday && dayjs(day).isSame(now, 'day')) || undefined\"\n >\n <slot\n name=\"dayLabel\"\n :date=\"day\"\n :label=\"\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n \"\n >\n {{\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n }}\n </slot>\n </Box>\n </div>\n\n <div v-bind=\"getStyles('resourcesWeekViewTimeLabelsRow')\">\n <template v-for=\"(day, dayIndex) in weekdays\" :key=\"day\">\n <Box\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"`${day}-${interval.startTime}`\"\n v-bind=\"staticStyles('resourcesWeekViewTimeLabel')\"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n >\n <slot\n name=\"timeLabel\"\n :date=\"day\"\n :label=\"\n formatDate({\n date: `${day} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n \"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n >\n {{\n formatDate({\n date: `${day} ${interval.startTime}`,\n locale: props.locale || 'en',\n format: props.slotLabelFormat!,\n })\n }}\n </slot>\n </Box>\n </template>\n </div>\n </div>\n </Box>\n\n <Box\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesWeekViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesWeekViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesWeekViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <Box\n v-bind=\"staticStyles('resourcesWeekViewResourceLabel')\"\n :data-scrolled-x=\"scrolledX || undefined\"\n :data-has-groups=\"groupInfo(resourceIndex) !== undefined || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </Box>\n\n <Box\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"getStyles('resourcesWeekViewRowSlots', { style: rowMinHeight(resource.id) })\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"withDragHandlers ? handleRowDragLeave($event) : undefined\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <template\n v-for=\"entry in backgroundEvents(resource.id)\"\n :key=\"`bg-${entry.day}-${entry.event.id}`\"\n >\n <slot name=\"backgroundEvent\" :event=\"entry.event\" :date=\"entry.day\">\n <Box\n v-bind=\"\n getStyles('resourcesWeekViewBackgroundEvent', {\n style: backgroundEventStyle(entry.event, entry.dayIndex),\n })\n \"\n >\n <component\n :is=\"() => eventRenderers.renderEventBody!(entry.event)\"\n v-if=\"eventRenderers.renderEventBody\"\n />\n <template v-else>{{ entry.event.title }}</template>\n </Box>\n </slot>\n </template>\n\n <template v-for=\"bar in allDayBars(resource.id)\" :key=\"`all-${bar.event.id}`\">\n <Box\n v-bind=\"getStyles('resourcesWeekViewAllDayEvent', { style: allDayBarStyle(bar) })\"\n >\n <slot\n name=\"allDayEvent\"\n :event=\"bar.event\"\n :start-day-index=\"bar.startDayIndex\"\n :end-day-index=\"bar.endDayIndex\"\n >\n <ScheduleEvent\n :event=\"bar.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @click=\"\n isStatic ? undefined : emit('eventClick', bar.event, $event as MouseEvent)\n \"\n />\n </slot>\n </Box>\n </template>\n\n <Box\n v-for=\"entry in regularEvents(resource.id)\"\n :key=\"`${entry.day}-${entry.event.id}`\"\n v-bind=\"\n getStyles('resourcesWeekViewEventWrapper', {\n style: eventWrapperStyle(entry.event, entry.dayIndex),\n })\n \"\n :data-resizing=\"resize.getResizePosition(entry.event.id) !== null || undefined\"\n >\n <ScheduleEvent\n :event=\"entry.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(entry.event)\"\n :style=\"{ width: '100%', height: '100%' }\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"isStatic ? undefined : clickEvent(entry.event, $event as MouseEvent)\"\n />\n\n <template v-if=\"resize.isResizableEvent(entry.event)\">\n <div\n v-for=\"edge in ['start', 'end'] as const\"\n :key=\"edge\"\n v-bind=\"staticStyles('resourcesWeekViewResizeHandle')\"\n :data-edge=\"edge\"\n :data-active=\"resize.state.value?.edge === edge || undefined\"\n :aria-label=\"`${\n edge === 'start' ? 'Resize event start' : 'Resize event end'\n } ${entry.event.title}`\"\n @dragstart.prevent\n @pointerdown=\"\n startResize(\n entry.event,\n entry.day,\n entry.dayIndex,\n resourceIndex,\n edge,\n $event,\n )\n \"\n />\n </template>\n </Box>\n\n <template\n v-for=\"entry in moreClusters(resource.id)\"\n :key=\"`more-${entry.day}-${entry.cluster[0].id}`\"\n >\n <slot\n name=\"moreEvents\"\n :events=\"entry.cluster\"\n :hidden-count=\"entry.hiddenCount\"\n :date=\"entry.day\"\n >\n <MoreEvents\n :events=\"entry.cluster\"\n :more-events-count=\"entry.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"entry.style\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <template v-for=\"(day, dayIndex) in weekdays\" :key=\"`slots-${day}`\">\n <UnstyledButton\n v-for=\"(interval, slotIndex) in intervals\"\n :key=\"`${day}-${interval.startTime}`\"\n :ref=\"setControl(resourceIndex, dayIndex * slotsPerDay + slotIndex)\"\n v-bind=\"staticStyles('resourcesWeekViewRowSlot')\"\n :data-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['business-hours'] || undefined\n \"\n :data-non-business-hours=\"\n businessHoursMods[dayIndex][slotIndex]['non-business-hours'] || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id &&\n dropTarget.flatIndex === dayIndex * slotsPerDay + slotIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(\n dayIndex * slotsPerDay + slotIndex,\n String(resource.id),\n ) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"\n props.withDragSlotSelect ? dayIndex * slotsPerDay + slotIndex : undefined\n \"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :aria-label=\"`${getLabel('resourceSlot', props.labels)} ${String(resource.label)} ${day} ${interval.startTime} - ${interval.endTime}`\"\n :tabindex=\"\n isStatic\n ? -1\n : resourceIndex === 0 && dayIndex === 0 && slotIndex === 0\n ? 0\n : -1\n \"\n @keydown=\"\n handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex: dayIndex * slotsPerDay + slotIndex,\n event: $event,\n })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown(\n $event,\n dayIndex * slotsPerDay + slotIndex,\n String(resource.id),\n )\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('timeSlotClick', {\n slotStart: `${day} ${interval.startTime}` as DateTimeStringValue,\n slotEnd: `${day} ${interval.endTime}` as DateTimeStringValue,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot\n name=\"timeSlot\"\n :resource=\"resource\"\n :date=\"day\"\n :start-time=\"interval.startTime\"\n :end-time=\"interval.endTime\"\n />\n </UnstyledButton>\n </template>\n </Box>\n </Box>\n\n <template v-if=\"showIndicator\">\n <slot\n name=\"currentTimeIndicator\"\n :time=\"currentTime\"\n :offset=\"indicatorOffset\"\n :date=\"weekdays[todayIndex]\"\n >\n <Box\n v-bind=\"\n getStyles('resourcesWeekViewCurrentTimeIndicator', { style: indicatorStyle })\n \"\n >\n <div\n v-if=\"props.withCurrentTimeBubble\"\n v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorTimeBubble')\"\n >\n {{ currentTime }}\n </div>\n <div v-else v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorThumb')\" />\n <div v-bind=\"getStyles('resourcesWeekViewCurrentTimeIndicatorLine')\" />\n </Box>\n </slot>\n </template>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ResourcesWeekViewComponent, { varsResolver } from './ResourcesWeekView.vue'\nimport type { ResourcesWeekViewFactory } from './ResourcesWeekView.types'\nimport classes from './ResourcesWeekView.module.css'\n\nexport const ResourcesWeekView = factory<ResourcesWeekViewFactory>(ResourcesWeekViewComponent, {\n classes,\n varsResolver,\n})\n\nexport type {\n ResourcesWeekViewCssVariables,\n ResourcesWeekViewEmits,\n ResourcesWeekViewFactory,\n ResourcesWeekViewOwnProps,\n ResourcesWeekViewOwnStylesNames,\n ResourcesWeekViewProps,\n ResourcesWeekViewSlots,\n ResourcesWeekViewStylesNames,\n} from './ResourcesWeekView.types'\n","import dayjs from 'dayjs'\nimport type { DateStringValue, ScheduleEventData } from '../../../types'\n\n/** One day cell of a resource row: the events that fit, and how many did not. */\nexport interface ResourcesMonthViewCellLayout {\n /** Events that fit into the cell, with the row they occupy. */\n visible: Array<{ event: ScheduleEventData; row: number }>\n\n /** Number of events that did not fit. */\n hiddenCount: number\n}\n\n/** A multi-day event bar spanning a run of consecutive day columns on one row. */\nexport interface ResourcesMonthViewSegment {\n event: ScheduleEventData\n\n /** Index of the first day column the bar covers. */\n start: number\n\n /** Index of the last day column the bar covers. */\n end: number\n\n /** Row the bar occupies inside the cells it covers. */\n row: number\n\n /** Which ends of the bar continue outside the displayed month. */\n hanging: 'start' | 'end' | 'both' | 'none'\n\n /** Whether any covered cell also hides events, which shortens the bar. */\n hidden: boolean\n}\n\nexport interface ResourcesMonthViewRowLayout {\n /** Events of the resource per day column, sorted the way they are laid out. */\n eventsByDay: ScheduleEventData[][]\n\n /** Layout of every day cell of the row. */\n layouts: ResourcesMonthViewCellLayout[]\n\n /** Multi-day bars of the row. */\n segments: ResourcesMonthViewSegment[]\n}\n\nexport interface GetResourcesMonthViewLayoutInput {\n /** Day columns of the month, `YYYY-MM-DD`. */\n days: DateStringValue[]\n\n /** Events already expanded for the displayed month. */\n events: ScheduleEventData[] | undefined\n\n /** Resource the row belongs to. */\n resourceId: string | number\n\n /** Number of event rows a cell can show before the rest collapse into a \"more\" control. */\n maxRows: number\n}\n\n/** An event is multi-day when it ends on a later calendar day than it starts. */\nexport function isMultiDayEvent(event: ScheduleEventData) {\n return dayjs(event.end).startOf('day').isAfter(dayjs(event.start).startOf('day'))\n}\n\n/** Longer events come first, then earlier ones, so bars stack predictably. */\nexport function compareMonthEvents(a: ScheduleEventData, b: ScheduleEventData) {\n const aSpan = dayjs(a.end).startOf('day').diff(dayjs(a.start).startOf('day'), 'day')\n const bSpan = dayjs(b.end).startOf('day').diff(dayjs(b.start).startOf('day'), 'day')\n return aSpan === bSpan ? dayjs(a.start).valueOf() - dayjs(b.start).valueOf() : bSpan - aSpan\n}\n\n/**\n * Lays out one resource row of the month grid.\n *\n * Each event keeps the row it was given on the previous day whenever that row is still free,\n * so a multi-day event forms an unbroken bar instead of stepping between rows.\n */\nexport function getResourcesMonthViewLayout({\n days,\n events,\n resourceId,\n maxRows,\n}: GetResourcesMonthViewLayoutInput): ResourcesMonthViewRowLayout {\n const monthStart = dayjs(days[0]).startOf('day')\n const monthEnd = dayjs(days.at(-1)).add(1, 'day').startOf('day')\n\n const eventsByDay = days.map((day) =>\n (events || [])\n .filter(\n (event) =>\n event.resourceId === resourceId &&\n dayjs(event.start).isBefore(dayjs(day).endOf('day')) &&\n dayjs(event.end).isAfter(dayjs(day).startOf('day')),\n )\n .sort(compareMonthEvents),\n )\n\n const layouts: ResourcesMonthViewCellLayout[] = []\n const lastRow = new Map<string | number, number>()\n const rowByEvent = new Map<string | number, Map<number, number>>()\n\n eventsByDay.forEach((eventList, dayIndex) => {\n const used = new Set<number>()\n const visible: ResourcesMonthViewCellLayout['visible'] = []\n let hiddenCount = 0\n\n eventList.forEach((event) => {\n let row = lastRow.get(event.id)\n\n if (row === undefined || row >= maxRows || used.has(row)) {\n row = Array.from({ length: maxRows }, (_, index) => index).find((index) => !used.has(index))\n }\n\n if (row === undefined) {\n hiddenCount += 1\n return\n }\n\n used.add(row)\n visible.push({ event, row })\n lastRow.set(event.id, row)\n\n if (!rowByEvent.has(event.id)) {\n rowByEvent.set(event.id, new Map())\n }\n\n rowByEvent.get(event.id)!.set(dayIndex, row)\n })\n\n layouts.push({ visible, hiddenCount })\n })\n\n const segments: ResourcesMonthViewSegment[] = []\n const multiDayEvents = [\n ...new Map(\n eventsByDay\n .flat()\n .filter(isMultiDayEvent)\n .map((event) => [event.id, event]),\n ).values(),\n ]\n\n multiDayEvents.forEach((event) => {\n const rowsForEvent = rowByEvent.get(event.id)\n let run: { start: number; end: number; row: number } | null = null\n\n const flush = () => {\n if (!run) {\n return\n }\n\n const before = dayjs(event.start).isBefore(monthStart)\n const after = dayjs(event.end).isAfter(monthEnd)\n\n segments.push({\n event,\n ...run,\n hanging: before && after ? 'both' : before ? 'start' : after ? 'end' : 'none',\n hidden: Array.from(\n { length: run.end - run.start + 1 },\n (_, index) => layouts[run!.start + index].hiddenCount > 0,\n ).some(Boolean),\n })\n\n run = null\n }\n\n days.forEach((_day, index) => {\n const row = rowsForEvent?.get(index)\n\n if (row === undefined) {\n flush()\n } else if (run && run.row === row && run.end === index - 1) {\n run.end = index\n } else {\n flush()\n run = { start: index, end: index, row }\n }\n })\n\n flush()\n })\n\n return { eventsByDay, layouts, segments }\n}\n",".resourcesMonthView {\n --resources-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));\n --resources-month-view-resource-label-width: 120px;\n --resources-month-view-day-width: 80px;\n --resources-month-view-row-height: 64px;\n --resources-month-view-group-label-width: 80px;\n\n @mixin where-light {\n --resources-month-view-border-color: var(--mantine-color-gray-3);\n }\n\n @mixin where-dark {\n --resources-month-view-border-color: var(--mantine-color-dark-4);\n }\n}\n\n.resourcesMonthViewRoot {\n border: 1px solid var(--resources-month-view-border-color);\n border-radius: var(--resources-month-view-radius);\n overflow: hidden;\n max-width: fit-content;\n}\n\n.resourcesMonthViewScrollArea {\n :where([data-mantine-scrollbar]) {\n z-index: 20;\n }\n :where([data-scrollarea-viewport]) {\n overscroll-behavior-x: none;\n }\n}\n\n.resourcesMonthViewInner {\n display: inline-flex;\n flex-direction: column;\n}\n.resourcesMonthViewDayLabelsRow {\n display: flex;\n position: sticky;\n top: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-bottom: 1px solid var(--resources-month-view-border-color);\n margin-bottom: -1px;\n}\n.resourcesMonthViewCorner {\n flex: 0 0 var(--resources-month-view-resource-label-width);\n min-width: var(--resources-month-view-resource-label-width);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n position: sticky;\n left: 0;\n z-index: 6;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n background-color: var(--mantine-color-body);\n}\n.resourcesMonthViewDayLabel {\n flex: 0 0 var(--resources-month-view-day-width);\n min-width: var(--resources-month-view-day-width);\n max-width: var(--resources-month-view-day-width);\n height: 42px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: var(--mantine-font-size-xs);\n user-select: none;\n cursor: default;\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where([data-weekend]) {\n color: var(--mantine-color-red-6);\n }\n &:where([data-today]) {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-primary-color-contrast);\n }\n}\n.resourcesMonthViewDayLabelWeekday {\n font-size: 12px;\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n line-height: 1;\n margin-bottom: 3px;\n}\n.resourcesMonthViewDayLabelNumber {\n font-weight: var(--mantine-font-weight-medium);\n font-size: 12px;\n line-height: 1;\n}\n.resourcesMonthViewRow {\n display: flex;\n border-top: 1px solid var(--resources-month-view-border-color);\n}\n.resourcesMonthViewResourceLabel {\n flex: 0 0 var(--resources-month-view-resource-label-width);\n min-width: var(--resources-month-view-resource-label-width);\n display: flex;\n align-items: center;\n padding: 4px 8px;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n min-height: var(--resources-month-view-row-height);\n position: sticky;\n left: 0;\n z-index: 4;\n background-color: var(--mantine-color-body);\n &:where([data-has-groups]) {\n left: var(--resources-month-view-group-label-width);\n }\n}\n.resourcesMonthViewGroupColumn,\n.resourcesMonthViewGroupColumnEmpty {\n flex: 0 0 var(--resources-month-view-group-label-width);\n min-width: var(--resources-month-view-group-label-width);\n min-height: var(--resources-month-view-row-height);\n position: sticky;\n left: 0;\n z-index: 5;\n background-color: var(--mantine-color-body);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n}\n.resourcesMonthViewGroupColumn {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: break-word;\n font-size: var(--mantine-font-size-sm);\n font-weight: var(--mantine-font-weight-medium);\n user-select: none;\n overflow: visible;\n &:where([data-group-position='first'], [data-group-position='only']) {\n z-index: 6;\n }\n &:where([data-group-position='middle'], [data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-month-view-row-height) + 1px);\n }\n}\n.resourcesMonthViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-month-view-row-height);\n}\n.resourcesMonthViewCell {\n flex: 0 0 var(--resources-month-view-day-width);\n min-width: var(--resources-month-view-day-width);\n max-width: var(--resources-month-view-day-width);\n min-height: var(--resources-month-view-row-height);\n border-inline-end: 1px solid var(--resources-month-view-border-color);\n cursor: pointer;\n position: relative;\n overflow: hidden;\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n &:where(:focus) {\n z-index: 1;\n }\n @mixin hover {\n &:where(:not([data-static])) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n &:where([data-weekend]) {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-8);\n }\n }\n &:where([data-drop-target]) {\n @mixin where-light {\n background-color: var(--mantine-color-blue-1);\n }\n @mixin where-dark {\n background-color: var(--mantine-color-dark-5);\n }\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-color-blue-4);\n border-radius: 2px;\n }\n }\n &:where([data-drag-selected]) {\n &,\n &:hover {\n background-color: var(--mantine-primary-color-light);\n }\n &::before {\n content: '';\n position: absolute;\n inset: -1px;\n pointer-events: none;\n z-index: 2;\n border: 1px solid var(--mantine-primary-color-2);\n }\n }\n &:where([data-drag-slot-index]) {\n touch-action: none;\n }\n &:where([data-static]) {\n cursor: default;\n pointer-events: none;\n }\n}\n.resourcesMonthView:where([data-event-interaction]) .resourcesMonthViewCell {\n pointer-events: none;\n}\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesMonthViewOwnProps } from './ResourcesMonthView.types'\n\nconst defaultProps = {\n weekdayFormat: 'ddd',\n weekendDays: [0, 6],\n withWeekendDays: true,\n highlightToday: true,\n withHeader: true,\n dayWidth: 80,\n rowHeight: 64,\n groupLabelWidth: 80,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n recurrenceExpansionLimit: 2000,\n} satisfies Partial<ResourcesMonthViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\n/** Height reserved for the \"more events\" control at the bottom of a cell, in px. */\nconst MORE_EVENTS_HEIGHT = 18\n\n/** `maxEventsPerTimeSlot` is clamped so the cells keep a workable row height. */\nfunction clampMaxRows(value: number) {\n return Math.min(10, Math.max(1, value))\n}\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, dayWidth, rowHeight, groupLabelWidth }) => ({\n resourcesMonthView: {\n '--resources-month-view-radius': resolveScheduleRadius(radius),\n '--resources-month-view-day-width': cssSize(dayWidth),\n '--resources-month-view-row-height': cssSize(rowHeight),\n '--resources-month-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, clampMaxRows, RESOURCE_VIEWS, MORE_EVENTS_HEIGHT }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n calculateMonthDropDate,\n expandRecurringEvents,\n formatDate,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport {\n getResourcesMonthViewLayout,\n isMultiDayEvent,\n type ResourcesMonthViewSegment,\n} from './get-resources-month-view-layout/get-resources-month-view-layout'\nimport type { ResourcesMonthViewEmits, ResourcesMonthViewSlots } from './ResourcesMonthView.types'\nimport classes from './ResourcesMonthView.module.css'\n\ndefineOptions({\n name: 'ResourcesMonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesMonthViewOwnProps>(), {\n groups: undefined,\n locale: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n startScrollDate: undefined,\n highlightToday: undefined,\n radius: undefined,\n withHeader: undefined,\n monthYearSelectProps: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n events: undefined,\n dayWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n labels: undefined,\n mode: undefined,\n scrollAreaProps: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n recurrenceExpansionLimit: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesMonthViewSlots>()\n\nconst emit = defineEmits<ResourcesMonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('ResourcesMonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesMonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesMonthView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; dayIndex: number } | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\nconst monthString = computed(() => month.value.format('YYYY-MM-DD') as DateStringValue)\n\nconst maxRows = computed(() => clampMaxRows(props.maxEventsPerTimeSlot!))\n\nconst days = computed(() =>\n Array.from({ length: month.value.daysInMonth() }, (_, index) => month.value.date(index + 1))\n .filter((day) => props.withWeekendDays || !props.weekendDays!.includes(day.day() as DayOfWeek))\n .map((day) => day.format('YYYY-MM-DD') as DateStringValue),\n)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst idMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst expandedEvents = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: month.value.toDate(),\n rangeEnd: month.value.endOf('month').toDate(),\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst rowLayouts = computed(() =>\n ordered.value.orderedResources.map((resource) =>\n getResourcesMonthViewLayout({\n days: days.value,\n events: expandedEvents.value,\n resourceId: resource.id,\n maxRows: maxRows.value,\n }),\n ),\n)\n\nconst singleDayEvents = (rowIndex: number) =>\n rowLayouts.value[rowIndex].layouts.flatMap((layout, dayIndex) =>\n layout.visible\n .filter(({ event }) => !isMultiDayEvent(event))\n .map(({ event, row }) => ({\n event,\n row,\n dayIndex,\n compressed: layout.hiddenCount > 0 && !isStatic.value,\n })),\n )\n\nconst cellsWithHiddenEvents = (rowIndex: number) =>\n rowLayouts.value[rowIndex].layouts\n .map((layout, dayIndex) => ({ layout, dayIndex }))\n .filter(({ layout }) => layout.hiddenCount > 0 && !isStatic.value)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const first = days.value[start]\n const last = days.value[end]\n\n if (first && last) {\n emit('slotDragEnd', {\n rangeStart: `${first} 00:00:00` as DateTimeStringValue,\n rangeEnd: dayjs(last).endOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n resourceId: idMap.value.get(group) ?? group,\n })\n }\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollDate) {\n return\n }\n\n await nextTick()\n\n const index = days.value.indexOf(\n dayjs(props.startScrollDate).format('YYYY-MM-DD') as DateStringValue,\n )\n\n if (index < 0) {\n return\n }\n\n scrollSlotIntoView(controls[0]?.[index], 'x')\n})\n\nconst setControl = (resourceIndex: number, dayIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][dayIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n if (element instanceof HTMLElement) {\n rowContainers.set(resourceIndex, element)\n }\n}\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst indexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container || !days.value.length) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(\n days.value.length - 1,\n Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * days.value.length),\n ),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, dayIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const day = days.value[dayIndex]\n\n if (!day) {\n return\n }\n\n const dragged = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (dragged) {\n const next = calculateMonthDropDate({ draggedEvent: dragged, targetDay: day })\n\n emit('eventDrop', {\n eventId: dragged.id,\n newStart: dayjs(next.start).format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: dayjs(next.end).format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event: dragged,\n resourceId,\n })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: `${day} 00:00:00` as DateTimeStringValue,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; dayIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.dayIndex === next.dayIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const dayIndex = indexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(dayIndex < 0 ? null : { resourceId, dayIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const current = nativeEvent.currentTarget\n\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(nativeEvent.relatedTarget)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const dayIndex = indexAtPoint(nativeEvent, resourceIndex)\n\n if (dayIndex >= 0) {\n emitDrop(nativeEvent, resource.id, dayIndex)\n }\n}\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-month-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst rowGeometry = (row: number, compressed: boolean) =>\n compressed\n ? {\n top: `calc((100% - ${MORE_EVENTS_HEIGHT}px) * ${row} / ${maxRows.value} + 1px)`,\n height: `calc((100% - ${MORE_EVENTS_HEIGHT}px) / ${maxRows.value} - 2px)`,\n }\n : {\n top: `calc(${(row / maxRows.value) * 100}% + 1px)`,\n height: `calc(${100 / maxRows.value}% - 2px)`,\n }\n\nconst singleEventStyle = (entry: { row: number; dayIndex: number; compressed: boolean }) => ({\n position: 'absolute' as const,\n left: `calc(${(entry.dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n ...rowGeometry(entry.row, entry.compressed),\n zIndex: 3,\n})\n\nconst segmentStyle = (segment: ResourcesMonthViewSegment) => ({\n position: 'absolute' as const,\n left: `calc(${(segment.start / days.value.length) * 100}% + 1px)`,\n width: `calc(${((segment.end - segment.start + 1) / days.value.length) * 100}% - 2px)`,\n ...rowGeometry(segment.row, segment.hidden),\n zIndex: 3,\n})\n\nconst moreEventsStyle = (dayIndex: number) => ({\n position: 'absolute' as const,\n bottom: '1px',\n left: `calc(${(dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n height: `${MORE_EVENTS_HEIGHT}px`,\n zIndex: 4,\n})\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n }\n : undefined,\n)\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.value.month(),\n yearValue: month.value.year(),\n onMonthChange: (value: number) =>\n emit('dateChange', month.value.month(value).format('YYYY-MM-DD') as DateStringValue),\n onYearChange: (value: number) =>\n emit('dateChange', month.value.year(value).format('YYYY-MM-DD') as DateStringValue),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n const day = target ? days.value[target.dayIndex] : undefined\n return day ? { date: day } : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesMonthView') }\"\n :root-ref=\"setRootElement\"\n :data-event-interaction=\"dropTarget ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :month=\"monthString\">\n <ScheduleHeaderBase\n view=\"month\"\n :navigation-handlers=\"{\n previous: () => month.subtract(1, 'month').format('YYYY-MM-DD'),\n next: () => month.add(1, 'month').format('YYYY-MM-DD'),\n today: () => dayjs().format('YYYY-MM-DD'),\n }\"\n :control=\"headerControl\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesMonthViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n scrollbars=\"x\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesMonthViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div v-bind=\"getStyles('resourcesMonthViewInner')\">\n <div v-bind=\"getStyles('resourcesMonthViewDayLabelsRow')\">\n <div v-bind=\"getStyles('resourcesMonthViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <template v-for=\"day in days\" :key=\"day\">\n <slot\n name=\"dayLabel\"\n :date=\"day\"\n :weekday=\"\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n \"\n :day=\"dayjs(day).date()\"\n >\n <div\n v-bind=\"staticStyles('resourcesMonthViewDayLabel')\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-today=\"\n (props.highlightToday && dayjs(day).isSame(dayjs(), 'day')) || undefined\n \"\n >\n <span v-bind=\"staticStyles('resourcesMonthViewDayLabelWeekday')\">\n {{\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n }}\n </span>\n <span v-bind=\"staticStyles('resourcesMonthViewDayLabelNumber')\">\n {{ dayjs(day).date() }}\n </span>\n </div>\n </slot>\n </template>\n </div>\n\n <div\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesMonthViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesMonthViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesMonthViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <div\n v-bind=\"staticStyles('resourcesMonthViewResourceLabel')\"\n :data-has-groups=\"hasGroups || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </div>\n\n <div\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"staticStyles('resourcesMonthViewRowSlots')\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"handleRowDragLeave($event)\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <ScheduleEvent\n v-for=\"entry in singleDayEvents(resourceIndex)\"\n :key=\"`${entry.event.id}-${entry.dayIndex}`\"\n :event=\"entry.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(entry.event)\"\n :style=\"singleEventStyle(entry)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"\n isStatic ? undefined : emit('eventClick', entry.event, $event as MouseEvent)\n \"\n />\n\n <ScheduleEvent\n v-for=\"segment in rowLayouts[resourceIndex].segments\"\n :key=\"`${segment.event.id}-${segment.start}`\"\n :event=\"segment.event\"\n :hanging=\"segment.hanging\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(segment.event)\"\n :style=\"segmentStyle(segment)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"\n isStatic ? undefined : emit('eventClick', segment.event, $event as MouseEvent)\n \"\n />\n\n <template\n v-for=\"entry in cellsWithHiddenEvents(resourceIndex)\"\n :key=\"`more-${entry.dayIndex}`\"\n >\n <slot\n name=\"moreEvents\"\n :events=\"rowLayouts[resourceIndex].eventsByDay[entry.dayIndex]\"\n :hidden-count=\"entry.layout.hiddenCount\"\n :resource=\"resource\"\n :date=\"days[entry.dayIndex]\"\n >\n <MoreEvents\n :events=\"rowLayouts[resourceIndex].eventsByDay[entry.dayIndex]\"\n :more-events-count=\"entry.layout.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"moreEventsStyle(entry.dayIndex)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <UnstyledButton\n v-for=\"(day, dayIndex) in days\"\n :key=\"day\"\n :ref=\"setControl(resourceIndex, dayIndex)\"\n v-bind=\"staticStyles('resourcesMonthViewCell')\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id && dropTarget.dayIndex === dayIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(dayIndex, String(resource.id)) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"props.withDragSlotSelect ? dayIndex : undefined\"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :tabindex=\"isStatic ? -1 : resourceIndex === 0 && dayIndex === 0 ? 0 : -1\"\n :aria-label=\"`${String(resource.label)} ${dayjs(day).format('MMMM D, YYYY')}`\"\n @keydown=\"\n handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex: dayIndex,\n event: $event,\n })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown($event, dayIndex, String(resource.id))\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('dayClick', {\n date: day,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot name=\"dayCell\" :resource=\"resource\" :date=\"day\" />\n </UnstyledButton>\n </div>\n </div>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport { createVarsResolver } from '@mantine-vue/core'\nimport { cssSize, resolveScheduleRadius } from '../shared'\nimport type { ResourcesMonthViewOwnProps } from './ResourcesMonthView.types'\n\nconst defaultProps = {\n weekdayFormat: 'ddd',\n weekendDays: [0, 6],\n withWeekendDays: true,\n highlightToday: true,\n withHeader: true,\n dayWidth: 80,\n rowHeight: 64,\n groupLabelWidth: 80,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n recurrenceExpansionLimit: 2000,\n} satisfies Partial<ResourcesMonthViewOwnProps>\n\n/** View levels the header offers – a resource schedule has no year view. */\nconst RESOURCE_VIEWS = ['day', 'week', 'month'] as const\n\n/** Height reserved for the \"more events\" control at the bottom of a cell, in px. */\nconst MORE_EVENTS_HEIGHT = 18\n\n/** `maxEventsPerTimeSlot` is clamped so the cells keep a workable row height. */\nfunction clampMaxRows(value: number) {\n return Math.min(10, Math.max(1, value))\n}\n\nconst varsResolver = createVarsResolver<any>(\n (_theme, { radius, dayWidth, rowHeight, groupLabelWidth }) => ({\n resourcesMonthView: {\n '--resources-month-view-radius': resolveScheduleRadius(radius),\n '--resources-month-view-day-width': cssSize(dayWidth),\n '--resources-month-view-row-height': cssSize(rowHeight),\n '--resources-month-view-group-label-width': cssSize(groupLabelWidth),\n },\n }),\n)\n\nexport { defaultProps, varsResolver, clampMaxRows, RESOURCE_VIEWS, MORE_EVENTS_HEIGHT }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, nextTick, onMounted, ref, shallowRef, useAttrs, useSlots } from 'vue'\nimport { Box, ScrollArea, UnstyledButton, useProps, useStyles } from '@mantine-vue/core'\nimport { getLabel } from '../../labels'\nimport type {\n DateStringValue,\n DateTimeStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleViewLevel,\n} from '../../types'\nimport {\n calculateMonthDropDate,\n expandRecurringEvents,\n formatDate,\n getGroupToResourceIdMap,\n getOrderedResources,\n handleResourcesGridKeyDown,\n type ResourceGroupInfo,\n type ResourcesGridControls,\n} from '../../utils'\nimport { provideScheduleDragState } from '../DragContext'\nimport { MoreEvents } from '../MoreEvents'\nimport { ScheduleEvent } from '../ScheduleEvent'\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase'\nimport {\n getDropEvent,\n rafThrottle,\n resolveEventRenderers,\n scheduleViewportProps,\n scrollSlotIntoView,\n useStaticStyles,\n} from '../shared'\nimport { useSlotDragSelect } from '../use-slot-drag-select'\nimport {\n getResourcesMonthViewLayout,\n isMultiDayEvent,\n type ResourcesMonthViewSegment,\n} from './get-resources-month-view-layout/get-resources-month-view-layout'\nimport type { ResourcesMonthViewEmits, ResourcesMonthViewSlots } from './ResourcesMonthView.types'\nimport classes from './ResourcesMonthView.module.css'\n\ndefineOptions({\n name: 'ResourcesMonthView',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesMonthViewOwnProps>(), {\n groups: undefined,\n locale: undefined,\n weekdayFormat: undefined,\n weekendDays: undefined,\n withWeekendDays: undefined,\n startScrollDate: undefined,\n highlightToday: undefined,\n radius: undefined,\n withHeader: undefined,\n monthYearSelectProps: undefined,\n previousControlProps: undefined,\n nextControlProps: undefined,\n todayControlProps: undefined,\n viewSelectProps: undefined,\n events: undefined,\n dayWidth: undefined,\n rowHeight: undefined,\n groupLabelWidth: undefined,\n renderEventBody: undefined,\n renderEvent: undefined,\n renderResourceLabel: undefined,\n renderGroupLabel: undefined,\n canDragEvent: undefined,\n labels: undefined,\n mode: undefined,\n scrollAreaProps: undefined,\n maxEventsPerTimeSlot: undefined,\n moreEventsProps: undefined,\n recurrenceExpansionLimit: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesMonthViewSlots>()\n\nconst emit = defineEmits<ResourcesMonthViewEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('ResourcesMonthView', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesMonthView',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n varsResolver,\n rootSelector: 'resourcesMonthView',\n})\n\n/**\n * Cached per selector: a resource grid renders one cell per resource and slot, and rebuilding\n * the same class list for each of them is what makes a drag re-render expensive.\n */\nconst staticStyles = useStaticStyles(getStyles)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst eventRenderers = computed(() => resolveEventRenderers(props, slots))\n\nconst controls: ResourcesGridControls = []\nconst rowContainers = new Map<number, HTMLElement>()\n\nconst rootElement = ref<HTMLElement | null>(null)\nconst setRootElement = (node: Element | null) => {\n rootElement.value = node instanceof HTMLElement ? node : null\n}\n\nconst dropTarget = shallowRef<{ resourceId: string | number; dayIndex: number } | null>(null)\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst month = computed(() => dayjs(props.date).startOf('month'))\nconst monthString = computed(() => month.value.format('YYYY-MM-DD') as DateStringValue)\n\nconst maxRows = computed(() => clampMaxRows(props.maxEventsPerTimeSlot!))\n\nconst days = computed(() =>\n Array.from({ length: month.value.daysInMonth() }, (_, index) => month.value.date(index + 1))\n .filter((day) => props.withWeekendDays || !props.weekendDays!.includes(day.day() as DayOfWeek))\n .map((day) => day.format('YYYY-MM-DD') as DateStringValue),\n)\n\nconst ordered = computed(() => getOrderedResources(props.resources, props.groups))\nconst idMap = computed(() => getGroupToResourceIdMap(props.resources))\nconst hasGroups = computed(() => ordered.value.groupRanges.length > 0)\n\nconst expandedEvents = computed(() =>\n expandRecurringEvents({\n events: props.events,\n rangeStart: month.value.toDate(),\n rangeEnd: month.value.endOf('month').toDate(),\n expansionLimit: props.recurrenceExpansionLimit!,\n }),\n)\n\nconst rowLayouts = computed(() =>\n ordered.value.orderedResources.map((resource) =>\n getResourcesMonthViewLayout({\n days: days.value,\n events: expandedEvents.value,\n resourceId: resource.id,\n maxRows: maxRows.value,\n }),\n ),\n)\n\nconst singleDayEvents = (rowIndex: number) =>\n rowLayouts.value[rowIndex].layouts.flatMap((layout, dayIndex) =>\n layout.visible\n .filter(({ event }) => !isMultiDayEvent(event))\n .map(({ event, row }) => ({\n event,\n row,\n dayIndex,\n compressed: layout.hiddenCount > 0 && !isStatic.value,\n })),\n )\n\nconst cellsWithHiddenEvents = (rowIndex: number) =>\n rowLayouts.value[rowIndex].layouts\n .map((layout, dayIndex) => ({ layout, dayIndex }))\n .filter(({ layout }) => layout.hiddenCount > 0 && !isStatic.value)\n\nconst slotSelect = useSlotDragSelect({\n enabled: () => Boolean(props.withDragSlotSelect) && !isStatic.value,\n onDragEnd: (start, end, group) => {\n const first = days.value[start]\n const last = days.value[end]\n\n if (first && last) {\n emit('slotDragEnd', {\n rangeStart: `${first} 00:00:00` as DateTimeStringValue,\n rangeEnd: dayjs(last).endOf('day').format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n resourceId: idMap.value.get(group) ?? group,\n })\n }\n },\n})\n\nonMounted(async () => {\n if (!props.startScrollDate) {\n return\n }\n\n await nextTick()\n\n const index = days.value.indexOf(\n dayjs(props.startScrollDate).format('YYYY-MM-DD') as DateStringValue,\n )\n\n if (index < 0) {\n return\n }\n\n scrollSlotIntoView(controls[0]?.[index], 'x')\n})\n\nconst setControl = (resourceIndex: number, dayIndex: number) => (element: unknown) => {\n const button = (element as { $el?: HTMLButtonElement } | null)?.$el ?? element\n controls[resourceIndex] ||= []\n controls[resourceIndex][dayIndex] = button instanceof HTMLButtonElement ? button : undefined\n}\n\nconst setRowContainer = (resourceIndex: number) => (element: unknown) => {\n if (element instanceof HTMLElement) {\n rowContainers.set(resourceIndex, element)\n }\n}\n\nconst withDragHandlers = computed(\n () =>\n !isStatic.value &&\n (Boolean(props.withEventsDragAndDrop) || Boolean(props.withExternalEventDrop)),\n)\n\nconst indexAtPoint = (nativeEvent: DragEvent, resourceIndex: number) => {\n const container = rowContainers.get(resourceIndex)\n\n if (!container || !days.value.length) {\n return -1\n }\n\n const rect = container.getBoundingClientRect()\n\n if (rect.width <= 0) {\n return -1\n }\n\n return Math.max(\n 0,\n Math.min(\n days.value.length - 1,\n Math.floor(((nativeEvent.clientX - rect.left) / rect.width) * days.value.length),\n ),\n )\n}\n\nconst emitDrop = (nativeEvent: DragEvent, resourceId: string | number, dayIndex: number) => {\n nativeEvent.preventDefault()\n // Drop the pending frame first, so a stale highlight cannot land after the drop.\n resolveDropTarget.cancel()\n setDropTarget(null)\n const day = days.value[dayIndex]\n\n if (!day) {\n return\n }\n\n const dragged = getDropEvent(expandedEvents.value, nativeEvent.dataTransfer)\n\n if (dragged) {\n const next = calculateMonthDropDate({ draggedEvent: dragged, targetDay: day })\n\n emit('eventDrop', {\n eventId: dragged.id,\n newStart: dayjs(next.start).format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n newEnd: dayjs(next.end).format('YYYY-MM-DD HH:mm:ss') as DateTimeStringValue,\n event: dragged,\n resourceId,\n })\n } else if (nativeEvent.dataTransfer) {\n emit('externalEventDrop', {\n dataTransfer: nativeEvent.dataTransfer,\n dropDateTime: `${day} 00:00:00` as DateTimeStringValue,\n resourceId,\n })\n }\n}\n\nconst setDropTarget = (next: { resourceId: string | number; dayIndex: number } | null) => {\n const current = dropTarget.value\n\n if (current === next) {\n return\n }\n\n if (\n current &&\n next &&\n current.resourceId === next.resourceId &&\n current.dayIndex === next.dayIndex\n ) {\n return\n }\n\n dropTarget.value = next\n}\n\n/**\n * Coalesced to one animation frame: `dragover` fires several times per frame, and resolving the\n * target measures the row, so handling every event would read layout and re-render the grid\n * faster than the browser can paint.\n */\nconst resolveDropTarget = rafThrottle(\n (nativeEvent: DragEvent, resourceId: string | number, resourceIndex: number) => {\n const dayIndex = indexAtPoint(nativeEvent, resourceIndex)\n setDropTarget(dayIndex < 0 ? null : { resourceId, dayIndex })\n },\n)\n\nconst handleRowDragOver = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n // `preventDefault` stays synchronous: the browser reads it as the handler returns.\n nativeEvent.preventDefault()\n resolveDropTarget(nativeEvent, resource.id, resourceIndex)\n}\n\nconst handleRowDragLeave = (nativeEvent: DragEvent) => {\n const current = nativeEvent.currentTarget\n\n if (\n !(nativeEvent.relatedTarget instanceof Node) ||\n !(current instanceof HTMLElement) ||\n !current.contains(nativeEvent.relatedTarget)\n ) {\n resolveDropTarget.cancel()\n setDropTarget(null)\n }\n}\n\nconst handleRowDrop = (\n nativeEvent: DragEvent,\n resource: { id: string | number },\n resourceIndex: number,\n) => {\n const dayIndex = indexAtPoint(nativeEvent, resourceIndex)\n\n if (dayIndex >= 0) {\n emitDrop(nativeEvent, resource.id, dayIndex)\n }\n}\n\nconst groupInfo = (resourceIndex: number) =>\n hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : undefined\n\nconst groupStarts = (info: ResourceGroupInfo) =>\n info.position === 'first' || info.position === 'only'\n\nconst groupCellStyle = (info: ResourceGroupInfo) =>\n info.count > 1\n ? {\n transform: `translateY(calc((${info.count - 1} * (var(--resources-month-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n\nconst rowGeometry = (row: number, compressed: boolean) =>\n compressed\n ? {\n top: `calc((100% - ${MORE_EVENTS_HEIGHT}px) * ${row} / ${maxRows.value} + 1px)`,\n height: `calc((100% - ${MORE_EVENTS_HEIGHT}px) / ${maxRows.value} - 2px)`,\n }\n : {\n top: `calc(${(row / maxRows.value) * 100}% + 1px)`,\n height: `calc(${100 / maxRows.value}% - 2px)`,\n }\n\nconst singleEventStyle = (entry: { row: number; dayIndex: number; compressed: boolean }) => ({\n position: 'absolute' as const,\n left: `calc(${(entry.dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n ...rowGeometry(entry.row, entry.compressed),\n zIndex: 3,\n})\n\nconst segmentStyle = (segment: ResourcesMonthViewSegment) => ({\n position: 'absolute' as const,\n left: `calc(${(segment.start / days.value.length) * 100}% + 1px)`,\n width: `calc(${((segment.end - segment.start + 1) / days.value.length) * 100}% - 2px)`,\n ...rowGeometry(segment.row, segment.hidden),\n zIndex: 3,\n})\n\nconst moreEventsStyle = (dayIndex: number) => ({\n position: 'absolute' as const,\n bottom: '1px',\n left: `calc(${(dayIndex / days.value.length) * 100}% + 1px)`,\n width: `calc(${100 / days.value.length}% - 2px)`,\n height: `${MORE_EVENTS_HEIGHT}px`,\n zIndex: 4,\n})\n\nconst cornerStyle = computed(() =>\n hasGroups.value\n ? {\n flexBasis:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-month-view-resource-label-width) + var(--resources-month-view-group-label-width))',\n }\n : undefined,\n)\n\nconst headerControl = computed(() => ({\n monthYearSelect: {\n locale: props.locale,\n monthValue: month.value.month(),\n yearValue: month.value.year(),\n onMonthChange: (value: number) =>\n emit('dateChange', month.value.month(value).format('YYYY-MM-DD') as DateStringValue),\n onYearChange: (value: number) =>\n emit('dateChange', month.value.year(value).format('YYYY-MM-DD') as DateStringValue),\n ...props.monthYearSelectProps,\n },\n}))\n\nconst isDraggableEvent = (event: ScheduleEventData) =>\n Boolean(props.withEventsDragAndDrop) && !isStatic.value && (props.canDragEvent?.(event) ?? true)\n\nconst dragState = provideScheduleDragState({\n dragOverTarget: () => {\n const target = dropTarget.value\n const day = target ? days.value[target.dayIndex] : undefined\n return day ? { date: day } : null\n },\n isSlotDragging: () => slotSelect.isDragging(),\n onDragEnd: () => {\n resolveDropTarget.cancel()\n setDropTarget(null)\n emit('eventDragEnd')\n },\n})\n\nconst dragStart = (event: ScheduleEventData) => {\n dragState.startEventDrag(event)\n emit('eventDragStart', event)\n}\n\nconst dragEnd = () => dragState.endEventDrag()\n\nconst changeDate = (value: DateStringValue) => emit('dateChange', value)\nconst changeView = (view: ScheduleViewLevel) => emit('viewChange', view)\n</script>\n\n<template>\n <Box\n v-bind=\"{ ...attrs, ...getStyles('resourcesMonthView') }\"\n :root-ref=\"setRootElement\"\n :data-event-interaction=\"dropTarget ? true : undefined\"\n >\n <template v-if=\"props.withHeader\">\n <slot name=\"header\" :month=\"monthString\">\n <ScheduleHeaderBase\n view=\"month\"\n :navigation-handlers=\"{\n previous: () => month.subtract(1, 'month').format('YYYY-MM-DD'),\n next: () => month.add(1, 'month').format('YYYY-MM-DD'),\n today: () => dayjs().format('YYYY-MM-DD'),\n }\"\n :control=\"headerControl\"\n :labels=\"props.labels\"\n :previous-control-props=\"props.previousControlProps\"\n :next-control-props=\"props.nextControlProps\"\n :today-control-props=\"props.todayControlProps\"\n :view-select-props=\"{ views: RESOURCE_VIEWS, ...props.viewSelectProps }\"\n v-bind=\"stylesApi\"\n @date-change=\"changeDate\"\n @view-change=\"changeView\"\n />\n </slot>\n </template>\n\n <Box v-bind=\"getStyles('resourcesMonthViewRoot')\">\n <ScrollArea\n :scrollbar-size=\"4\"\n scrollbars=\"x\"\n v-bind=\"{ ...props.scrollAreaProps, ...getStyles('resourcesMonthViewScrollArea') }\"\n :viewport-props=\"{ ...scheduleViewportProps, ...props.scrollAreaProps?.viewportProps }\"\n >\n <div v-bind=\"getStyles('resourcesMonthViewInner')\">\n <div v-bind=\"getStyles('resourcesMonthViewDayLabelsRow')\">\n <div v-bind=\"getStyles('resourcesMonthViewCorner', { style: cornerStyle })\">\n <slot name=\"corner\" :resources=\"ordered.orderedResources\">\n {{ getLabel('resources', props.labels) }}\n </slot>\n </div>\n\n <template v-for=\"day in days\" :key=\"day\">\n <slot\n name=\"dayLabel\"\n :date=\"day\"\n :weekday=\"\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n \"\n :day=\"dayjs(day).date()\"\n >\n <div\n v-bind=\"staticStyles('resourcesMonthViewDayLabel')\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-today=\"\n (props.highlightToday && dayjs(day).isSame(dayjs(), 'day')) || undefined\n \"\n >\n <span v-bind=\"staticStyles('resourcesMonthViewDayLabelWeekday')\">\n {{\n formatDate({\n date: day,\n locale: props.locale || 'en',\n format: props.weekdayFormat!,\n })\n }}\n </span>\n <span v-bind=\"staticStyles('resourcesMonthViewDayLabelNumber')\">\n {{ dayjs(day).date() }}\n </span>\n </div>\n </slot>\n </template>\n </div>\n\n <div\n v-for=\"(resource, resourceIndex) in ordered.orderedResources\"\n :key=\"resource.id\"\n v-bind=\"staticStyles('resourcesMonthViewRow')\"\n >\n <template v-if=\"groupInfo(resourceIndex) !== undefined\">\n <Box\n v-if=\"groupInfo(resourceIndex) === null\"\n v-bind=\"staticStyles('resourcesMonthViewGroupColumnEmpty')\"\n />\n <Box\n v-else\n v-bind=\"staticStyles('resourcesMonthViewGroupColumn')\"\n :data-group-position=\"groupInfo(resourceIndex)!.position\"\n >\n <span\n v-if=\"groupStarts(groupInfo(resourceIndex)!)\"\n :style=\"groupCellStyle(groupInfo(resourceIndex)!)\"\n >\n <slot name=\"groupLabel\" :group=\"groupInfo(resourceIndex)!.group\">\n <component\n :is=\"() => props.renderGroupLabel!(groupInfo(resourceIndex)!.group)\"\n v-if=\"props.renderGroupLabel\"\n />\n <template v-else>{{ groupInfo(resourceIndex)!.group.label }}</template>\n </slot>\n </span>\n </Box>\n </template>\n\n <div\n v-bind=\"staticStyles('resourcesMonthViewResourceLabel')\"\n :data-has-groups=\"hasGroups || undefined\"\n >\n <slot name=\"resourceLabel\" :resource=\"resource\">\n <component\n :is=\"() => props.renderResourceLabel!(resource)\"\n v-if=\"props.renderResourceLabel\"\n />\n <template v-else>{{ resource.label }}</template>\n </slot>\n </div>\n\n <div\n :ref=\"setRowContainer(resourceIndex)\"\n v-bind=\"staticStyles('resourcesMonthViewRowSlots')\"\n @dragover=\"\n withDragHandlers ? handleRowDragOver($event, resource, resourceIndex) : undefined\n \"\n @dragleave=\"handleRowDragLeave($event)\"\n @drop=\"withDragHandlers ? handleRowDrop($event, resource, resourceIndex) : undefined\"\n >\n <ScheduleEvent\n v-for=\"entry in singleDayEvents(resourceIndex)\"\n :key=\"`${entry.event.id}-${entry.dayIndex}`\"\n :event=\"entry.event\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(entry.event)\"\n :style=\"singleEventStyle(entry)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"\n isStatic ? undefined : emit('eventClick', entry.event, $event as MouseEvent)\n \"\n />\n\n <ScheduleEvent\n v-for=\"segment in rowLayouts[resourceIndex].segments\"\n :key=\"`${segment.event.id}-${segment.start}`\"\n :event=\"segment.event\"\n :hanging=\"segment.hanging\"\n auto-size\n nowrap\n :radius=\"props.radius\"\n :mode=\"props.mode\"\n :draggable=\"isDraggableEvent(segment.event)\"\n :style=\"segmentStyle(segment)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi }\"\n @event-drag-start=\"dragStart\"\n @event-drag-end=\"dragEnd\"\n @click=\"\n isStatic ? undefined : emit('eventClick', segment.event, $event as MouseEvent)\n \"\n />\n\n <template\n v-for=\"entry in cellsWithHiddenEvents(resourceIndex)\"\n :key=\"`more-${entry.dayIndex}`\"\n >\n <slot\n name=\"moreEvents\"\n :events=\"rowLayouts[resourceIndex].eventsByDay[entry.dayIndex]\"\n :hidden-count=\"entry.layout.hiddenCount\"\n :resource=\"resource\"\n :date=\"days[entry.dayIndex]\"\n >\n <MoreEvents\n :events=\"rowLayouts[resourceIndex].eventsByDay[entry.dayIndex]\"\n :more-events-count=\"entry.layout.hiddenCount\"\n :mode=\"props.mode\"\n :labels=\"props.labels\"\n :style=\"moreEventsStyle(entry.dayIndex)\"\n v-bind=\"{ ...eventRenderers, ...stylesApi, ...props.moreEventsProps }\"\n @event-click=\"(event, nativeEvent) => emit('eventClick', event, nativeEvent)\"\n />\n </slot>\n </template>\n\n <UnstyledButton\n v-for=\"(day, dayIndex) in days\"\n :key=\"day\"\n :ref=\"setControl(resourceIndex, dayIndex)\"\n v-bind=\"staticStyles('resourcesMonthViewCell')\"\n :data-weekend=\"\n props.weekendDays!.includes(dayjs(day).day() as DayOfWeek) || undefined\n \"\n :data-drop-target=\"\n (dropTarget?.resourceId === resource.id && dropTarget.dayIndex === dayIndex) ||\n undefined\n \"\n :data-drag-selected=\"\n slotSelect.isSlotSelected(dayIndex, String(resource.id)) || undefined\n \"\n :data-static=\"isStatic || undefined\"\n :data-drag-slot-index=\"props.withDragSlotSelect ? dayIndex : undefined\"\n :data-drag-slot-group=\"props.withDragSlotSelect ? String(resource.id) : undefined\"\n :tabindex=\"isStatic ? -1 : resourceIndex === 0 && dayIndex === 0 ? 0 : -1\"\n :aria-label=\"`${String(resource.label)} ${dayjs(day).format('MMMM D, YYYY')}`\"\n @keydown=\"\n handleResourcesGridKeyDown({\n controls,\n resourceIndex,\n slotIndex: dayIndex,\n event: $event,\n })\n \"\n @pointerdown=\"\n isStatic\n ? undefined\n : slotSelect.handleSlotPointerDown($event, dayIndex, String(resource.id))\n \"\n @click=\"\n isStatic\n ? undefined\n : emit('dayClick', {\n date: day,\n nativeEvent: $event,\n resourceId: resource.id,\n })\n \"\n >\n <slot name=\"dayCell\" :resource=\"resource\" :date=\"day\" />\n </UnstyledButton>\n </div>\n </div>\n </div>\n </ScrollArea>\n </Box>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ResourcesMonthViewComponent, { varsResolver } from './ResourcesMonthView.vue'\nimport type { ResourcesMonthViewFactory } from './ResourcesMonthView.types'\nimport classes from './ResourcesMonthView.module.css'\n\nexport const ResourcesMonthView = factory<ResourcesMonthViewFactory>(ResourcesMonthViewComponent, {\n classes,\n varsResolver,\n})\n\nexport type {\n ResourcesMonthViewCssVariables,\n ResourcesMonthViewDayClickData,\n ResourcesMonthViewEmits,\n ResourcesMonthViewFactory,\n ResourcesMonthViewOwnProps,\n ResourcesMonthViewOwnStylesNames,\n ResourcesMonthViewProps,\n ResourcesMonthViewSlots,\n ResourcesMonthViewStylesNames,\n} from './ResourcesMonthView.types'\n",".root {\n height: 100%;\n}\n","<script lang=\"ts\">\nimport type { ResourcesScheduleOwnProps } from './ResourcesSchedule.types'\n\nconst defaultProps = {\n defaultView: 'day',\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n} satisfies Partial<ResourcesScheduleOwnProps>\n\nexport { defaultProps }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { DateStringValue, ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport { ResourcesDayView } from '../ResourcesDayView'\nimport { ResourcesMonthView } from '../ResourcesMonthView'\nimport { ResourcesWeekView } from '../ResourcesWeekView'\nimport { resolveEventRenderers } from '../shared'\nimport type {\n ResourcesScheduleEmits,\n ResourcesScheduleSlots,\n ResourcesScheduleViewLevel,\n} from './ResourcesSchedule.types'\nimport classes from './ResourcesSchedule.module.css'\n\ndefineOptions({\n name: 'ResourcesSchedule',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesScheduleOwnProps>(), {\n date: undefined,\n defaultDate: undefined,\n onDateChange: undefined,\n view: undefined,\n defaultView: undefined,\n onViewChange: undefined,\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n renderEventBody: undefined,\n renderResourceLabel: undefined,\n onEventDrop: undefined,\n canDragEvent: undefined,\n onEventDragStart: undefined,\n onEventDragEnd: undefined,\n onTimeSlotClick: undefined,\n onDayClick: undefined,\n onEventClick: undefined,\n onSlotDragEnd: undefined,\n mode: undefined,\n onExternalEventDrop: undefined,\n onEventResize: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n dayViewProps: undefined,\n weekViewProps: undefined,\n monthViewProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesScheduleSlots>()\n\nconst emit = defineEmits<ResourcesScheduleEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('ResourcesSchedule', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesSchedule',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n})\n\nconst [currentDate, setCurrentDate] = useUncontrolled<DateStringValue>({\n value: () => (props.date === undefined ? undefined : toDateString(props.date)),\n defaultValue: toDateString(props.defaultDate ?? dayjs()),\n onChange: (value) => {\n emit('update:date', value)\n emit('dateChange', value)\n },\n})\n\nconst [currentView, setCurrentView] = useUncontrolled<ResourcesScheduleViewLevel>({\n value: () => props.view,\n defaultValue: props.defaultView,\n finalValue: 'day',\n onChange: (value) => {\n emit('update:view', value)\n emit('viewChange', value)\n },\n})\n\n/** The views offer a year level that this component does not support, so it is ignored. */\nconst changeView = (view: ScheduleViewLevel) => {\n if (view === 'day' || view === 'week' || view === 'month') {\n setCurrentView(view)\n }\n}\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst eventRenderers = computed(() =>\n resolveEventRenderers({ renderEventBody: props.renderEventBody }, slots),\n)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst sharedProps = computed(() => ({\n resources: props.resources,\n date: currentDate.value,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n mode: props.mode,\n renderResourceLabel: props.renderResourceLabel,\n withEventsDragAndDrop: isStatic.value ? false : props.withEventsDragAndDrop,\n canDragEvent: props.canDragEvent,\n withDragSlotSelect: props.withDragSlotSelect,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n onDateChange: setCurrentDate,\n onViewChange: changeView,\n onEventDrop: (data: any) => emit('eventDrop', data),\n onEventDragStart: (event: any) => emit('eventDragStart', event),\n onEventDragEnd: () => emit('eventDragEnd'),\n onEventClick: (event: any, nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n onSlotDragEnd: (data: any) => emit('slotDragEnd', data),\n onExternalEventDrop: (data: any) => emit('externalEventDrop', data),\n ...eventRenderers.value,\n ...stylesApi.value,\n}))\n\nconst timeViewProps = computed(() => ({\n onTimeSlotClick: (data: any) => emit('timeSlotClick', data),\n withEventResize: isStatic.value ? false : props.withEventResize,\n canResizeEvent: props.canResizeEvent,\n onEventResize: (data: any) => emit('eventResize', data),\n}))\n\nconst activeView = computed(() => {\n switch (currentView.value) {\n case 'week':\n return ResourcesWeekView\n case 'month':\n return ResourcesMonthView\n default:\n return ResourcesDayView\n }\n})\n\nconst activeViewProps = computed(() => {\n switch (currentView.value) {\n case 'week':\n return { ...sharedProps.value, ...timeViewProps.value, ...props.weekViewProps }\n case 'month':\n return {\n ...sharedProps.value,\n onDayClick: (data: any) => emit('dayClick', data),\n ...props.monthViewProps,\n }\n default:\n return { ...sharedProps.value, ...timeViewProps.value, ...props.dayViewProps }\n }\n})\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('root') }\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\">\n <template v-if=\"slots.corner\" #corner=\"payload\">\n <slot name=\"corner\" v-bind=\"payload\" />\n </template>\n <template v-if=\"slots.resourceLabel\" #resourceLabel=\"payload\">\n <slot name=\"resourceLabel\" v-bind=\"payload\" />\n </template>\n <template v-if=\"slots.groupLabel\" #groupLabel=\"payload\">\n <slot name=\"groupLabel\" v-bind=\"payload\" />\n </template>\n </component>\n </Box>\n</template>\n","<script lang=\"ts\">\nimport type { ResourcesScheduleOwnProps } from './ResourcesSchedule.types'\n\nconst defaultProps = {\n defaultView: 'day',\n mode: 'default',\n recurrenceExpansionLimit: 2000,\n} satisfies Partial<ResourcesScheduleOwnProps>\n\nexport { defaultProps }\n</script>\n\n<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, useSlots } from 'vue'\nimport { Box, useProps, useStyles } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { DateStringValue, ScheduleViewLevel } from '../../types'\nimport { toDateString } from '../../utils'\nimport { ResourcesDayView } from '../ResourcesDayView'\nimport { ResourcesMonthView } from '../ResourcesMonthView'\nimport { ResourcesWeekView } from '../ResourcesWeekView'\nimport { resolveEventRenderers } from '../shared'\nimport type {\n ResourcesScheduleEmits,\n ResourcesScheduleSlots,\n ResourcesScheduleViewLevel,\n} from './ResourcesSchedule.types'\nimport classes from './ResourcesSchedule.module.css'\n\ndefineOptions({\n name: 'ResourcesSchedule',\n inheritAttrs: false,\n})\n\nconst rawProps = withDefaults(defineProps<ResourcesScheduleOwnProps>(), {\n date: undefined,\n defaultDate: undefined,\n onDateChange: undefined,\n view: undefined,\n defaultView: undefined,\n onViewChange: undefined,\n events: undefined,\n locale: undefined,\n radius: undefined,\n labels: undefined,\n renderEventBody: undefined,\n renderResourceLabel: undefined,\n onEventDrop: undefined,\n canDragEvent: undefined,\n onEventDragStart: undefined,\n onEventDragEnd: undefined,\n onTimeSlotClick: undefined,\n onDayClick: undefined,\n onEventClick: undefined,\n onSlotDragEnd: undefined,\n mode: undefined,\n onExternalEventDrop: undefined,\n onEventResize: undefined,\n canResizeEvent: undefined,\n recurrenceExpansionLimit: undefined,\n dayViewProps: undefined,\n weekViewProps: undefined,\n monthViewProps: undefined,\n classNames: undefined,\n styles: undefined,\n vars: undefined,\n})\n\ndefineSlots<ResourcesScheduleSlots>()\n\nconst emit = defineEmits<ResourcesScheduleEmits>()\n\nconst slots = useSlots()\nconst attrs = useAttrs()\n\nconst props = useProps('ResourcesSchedule', defaultProps, rawProps)\n\nconst getStyles = useStyles({\n name: 'ResourcesSchedule',\n props,\n classes,\n get className() {\n return attrs.class\n },\n get style() {\n return attrs.style as any\n },\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n vars: props.vars as any,\n})\n\nconst [currentDate, setCurrentDate] = useUncontrolled<DateStringValue>({\n value: () => (props.date === undefined ? undefined : toDateString(props.date)),\n defaultValue: toDateString(props.defaultDate ?? dayjs()),\n onChange: (value) => {\n emit('update:date', value)\n emit('dateChange', value)\n },\n})\n\nconst [currentView, setCurrentView] = useUncontrolled<ResourcesScheduleViewLevel>({\n value: () => props.view,\n defaultValue: props.defaultView,\n finalValue: 'day',\n onChange: (value) => {\n emit('update:view', value)\n emit('viewChange', value)\n },\n})\n\n/** The views offer a year level that this component does not support, so it is ignored. */\nconst changeView = (view: ScheduleViewLevel) => {\n if (view === 'day' || view === 'week' || view === 'month') {\n setCurrentView(view)\n }\n}\n\nconst isStatic = computed(() => props.mode === 'static')\n\nconst eventRenderers = computed(() =>\n resolveEventRenderers({ renderEventBody: props.renderEventBody }, slots),\n)\n\nconst stylesApi = computed(() => ({\n classNames: props.classNames as any,\n styles: props.styles as any,\n unstyled: props.unstyled,\n}))\n\nconst sharedProps = computed(() => ({\n resources: props.resources,\n date: currentDate.value,\n events: props.events,\n locale: props.locale,\n radius: props.radius,\n labels: props.labels,\n mode: props.mode,\n renderResourceLabel: props.renderResourceLabel,\n withEventsDragAndDrop: isStatic.value ? false : props.withEventsDragAndDrop,\n canDragEvent: props.canDragEvent,\n withDragSlotSelect: props.withDragSlotSelect,\n recurrenceExpansionLimit: props.recurrenceExpansionLimit,\n onDateChange: setCurrentDate,\n onViewChange: changeView,\n onEventDrop: (data: any) => emit('eventDrop', data),\n onEventDragStart: (event: any) => emit('eventDragStart', event),\n onEventDragEnd: () => emit('eventDragEnd'),\n onEventClick: (event: any, nativeEvent: MouseEvent) => emit('eventClick', event, nativeEvent),\n onSlotDragEnd: (data: any) => emit('slotDragEnd', data),\n onExternalEventDrop: (data: any) => emit('externalEventDrop', data),\n ...eventRenderers.value,\n ...stylesApi.value,\n}))\n\nconst timeViewProps = computed(() => ({\n onTimeSlotClick: (data: any) => emit('timeSlotClick', data),\n withEventResize: isStatic.value ? false : props.withEventResize,\n canResizeEvent: props.canResizeEvent,\n onEventResize: (data: any) => emit('eventResize', data),\n}))\n\nconst activeView = computed(() => {\n switch (currentView.value) {\n case 'week':\n return ResourcesWeekView\n case 'month':\n return ResourcesMonthView\n default:\n return ResourcesDayView\n }\n})\n\nconst activeViewProps = computed(() => {\n switch (currentView.value) {\n case 'week':\n return { ...sharedProps.value, ...timeViewProps.value, ...props.weekViewProps }\n case 'month':\n return {\n ...sharedProps.value,\n onDayClick: (data: any) => emit('dayClick', data),\n ...props.monthViewProps,\n }\n default:\n return { ...sharedProps.value, ...timeViewProps.value, ...props.dayViewProps }\n }\n})\n</script>\n\n<template>\n <Box v-bind=\"{ ...attrs, ...getStyles('root') }\">\n <component :is=\"activeView\" v-bind=\"activeViewProps\">\n <template v-if=\"slots.corner\" #corner=\"payload\">\n <slot name=\"corner\" v-bind=\"payload\" />\n </template>\n <template v-if=\"slots.resourceLabel\" #resourceLabel=\"payload\">\n <slot name=\"resourceLabel\" v-bind=\"payload\" />\n </template>\n <template v-if=\"slots.groupLabel\" #groupLabel=\"payload\">\n <slot name=\"groupLabel\" v-bind=\"payload\" />\n </template>\n </component>\n </Box>\n</template>\n","import { factory } from '@mantine-vue/core'\nimport ResourcesScheduleComponent from './ResourcesSchedule.vue'\nimport type { ResourcesScheduleFactory } from './ResourcesSchedule.types'\nimport classes from './ResourcesSchedule.module.css'\n\nexport const ResourcesSchedule = factory<ResourcesScheduleFactory>(ResourcesScheduleComponent, {\n classes,\n})\n\nexport type {\n ResourcesScheduleEmits,\n ResourcesScheduleFactory,\n ResourcesScheduleOwnProps,\n ResourcesScheduleOwnStylesNames,\n ResourcesScheduleProps,\n ResourcesScheduleSlots,\n ResourcesScheduleStylesNames,\n ResourcesScheduleViewLevel,\n ResourcesScheduleViewProps,\n} from './ResourcesSchedule.types'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,0BAA0C;CACrD,OAAO;CACP,MAAM;CACN,UAAU;CACV,MAAM;CACN,KAAK;CACL,MAAM;CACN,OAAO;CACP,MAAM;CACN,QAAQ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