@mantine-vue/schedule 3.0.0 → 3.1.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.map +1 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +1 -1
- package/lib/components/DayView/DayView.d.ts +1 -1
- package/lib/components/MobileMonthView/MobileMonthView.d.ts +4 -4
- package/lib/components/MonthView/MonthView.d.ts +4 -4
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +1 -1
- package/lib/components/ResourcesMonthView/ResourcesMonthView.d.ts +2 -2
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +2 -2
- package/lib/components/ScheduleEvent/ScheduleEvent.d.ts +2 -2
- package/lib/components/WeekView/WeekView.d.ts +2 -2
- package/lib/components/YearView/YearView.d.ts +4 -4
- package/package.json +4 -4
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,mBAAmB;CACnB,kBAAkB;CAClB,iBAAiB;CACjB,UAAU;CACV,YAAY,sBAA8B,IAAI,kBAAkB;CAChE,UAAU;CACV,WAAW;CACX,cAAc;AAChB;AAIA,SAAgB,SACd,KACA,UACmB;CACnB,IAAI,UACF,OAAO;EAAE,GAAG;EAAyB,GAAG;CAAS,EAAE;CAGrD,OAAO,wBAAwB;AACjC;;;ACtDA,SAAgB,WAAW,EAAE,QAAQ,MAAM,UAA2B;CACpE,IAAI,OAAO,WAAW,YACpB,OAAO,QAAA,GAAA,MAAA,SAAa,IAAI,EAAE,OAAO,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YAAY,UAAU,OAAO;GACnD;GACA,MAAM,iBAAiB,OAAO,KAAK,SAAS,EAAE,SAAS,YAAY,KAAA;GAEnE,MAAM,iBAAiB;IACrB,QAAQ,YAAY,OAApB;KACE,KAAK,OACH,QAAA,GAAA,IAAA,GACE,kBACA;MACE,GAAG;MACH,iBAAiB,MAAM;MACvB,iBAAiB,WAAW,QAAQ,MAAM;MAC1C,eAAe,MAAM;MACrB,gBAAgB,MAAM;MACtB,GAAG,MAAM;KACX,GACA,cACF;KACF,KAAK,QACH,QAAA,GAAA,IAAA,GACE,mBACA;MACE,GAAG;MACH,iBAAiB,MAAM;MACvB,iBAAiB,WAAW,QAAQ,MAAM;MAC1C,eAAe,MAAM;MACrB,gBAAgB,MAAM;MACtB,GAAG,MAAM;KACX,GACA,cACF;KACF,KAAK,SACH,QAAA,GAAA,IAAA,GACE,oBACA;MAAE,GAAG;MAAQ,YAAY,MAAM;MAAY,GAAG,MAAM;KAAe,GACnE,cACF;KACF,SACE,OAAO;IACX;GACF,GAAG;GAEH,QAAA,GAAA,IAAA,GAAS,kBAAA,KAAK;IAAE,GAAG;IAAO,OAAO,CAAC,iCAAQ,MAAM,MAAM,KAAK;IAAG,OAAO,MAAM;GAAM,SAAS,CACxF,OACF,CAAC;EACH;CACF;AACF,CAAC;;;ACzTD,IAAa,cAA8C,OAAO,+BAA+B;AAEjG,SAAgB,mBAAmB,OAAyB;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/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<'button'>,\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<'button'>,\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<'button'>,\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<'button'>, {\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<'button'>, {\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<'button'>,\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<'button'>,\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<'button'>,\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,MAA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