@mantine/schedule 9.6.0 → 9.6.2
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/components/DayView/DayView.cjs +48 -20
- package/cjs/components/DayView/DayView.cjs.map +1 -1
- package/cjs/components/DayView/DayView.module.cjs +3 -2
- package/cjs/components/DayView/DayView.module.cjs.map +1 -1
- package/cjs/components/DayView/get-day-view-events/get-day-positioned-events.cjs +12 -7
- package/cjs/components/DayView/get-day-view-events/get-day-positioned-events.cjs.map +1 -1
- package/cjs/components/DayView/get-day-view-events/get-day-view-events.cjs +3 -2
- package/cjs/components/DayView/get-day-view-events/get-day-view-events.cjs.map +1 -1
- package/cjs/components/MobileMonthView/MobileMonthView.cjs +1 -1
- package/cjs/components/MobileMonthView/MobileMonthView.cjs.map +1 -1
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs +40 -15
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs.map +1 -1
- package/cjs/components/ResourcesDayView/ResourcesDayView.module.cjs.map +1 -1
- package/cjs/components/ResourcesSchedule/ResourcesSchedule.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs +46 -16
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.module.cjs.map +1 -1
- package/cjs/components/Schedule/Schedule.cjs.map +1 -1
- package/cjs/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs +18 -3
- package/cjs/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs.map +1 -1
- package/cjs/components/ScheduleEvent/ScheduleEvent.module.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.cjs +47 -17
- package/cjs/components/WeekView/WeekView.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.module.cjs +3 -2
- package/cjs/components/WeekView/WeekView.module.cjs.map +1 -1
- package/cjs/components/WeekView/get-week-view-events/get-week-positioned-events.cjs +4 -2
- package/cjs/components/WeekView/get-week-view-events/get-week-positioned-events.cjs.map +1 -1
- package/cjs/hooks/use-event-resize.cjs +7 -4
- package/cjs/hooks/use-event-resize.cjs.map +1 -1
- package/cjs/hooks/use-horizontal-event-resize.cjs +7 -4
- package/cjs/hooks/use-horizontal-event-resize.cjs.map +1 -1
- package/cjs/index.cjs +4 -0
- package/cjs/utils/apply-cascade-layout/apply-cascade-layout.cjs +21 -0
- package/cjs/utils/apply-cascade-layout/apply-cascade-layout.cjs.map +1 -0
- package/cjs/{components/ResourcesDayView → utils}/get-overlap-clusters/get-overlap-clusters.cjs +2 -2
- package/cjs/utils/get-overlap-clusters/get-overlap-clusters.cjs.map +1 -0
- package/cjs/utils/is-event-in-time-range/is-event-in-time-range.cjs +2 -1
- package/cjs/utils/is-event-in-time-range/is-event-in-time-range.cjs.map +1 -1
- package/esm/components/DayView/DayView.mjs +48 -20
- package/esm/components/DayView/DayView.mjs.map +1 -1
- package/esm/components/DayView/DayView.module.mjs +3 -2
- package/esm/components/DayView/DayView.module.mjs.map +1 -1
- package/esm/components/DayView/get-day-view-events/get-day-positioned-events.mjs +12 -7
- package/esm/components/DayView/get-day-view-events/get-day-positioned-events.mjs.map +1 -1
- package/esm/components/DayView/get-day-view-events/get-day-view-events.mjs +3 -2
- package/esm/components/DayView/get-day-view-events/get-day-view-events.mjs.map +1 -1
- package/esm/components/MobileMonthView/MobileMonthView.mjs +1 -1
- package/esm/components/MobileMonthView/MobileMonthView.mjs.map +1 -1
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs +40 -15
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs.map +1 -1
- package/esm/components/ResourcesDayView/ResourcesDayView.module.mjs.map +1 -1
- package/esm/components/ResourcesSchedule/ResourcesSchedule.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs +46 -16
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.module.mjs.map +1 -1
- package/esm/components/Schedule/Schedule.mjs.map +1 -1
- package/esm/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.mjs +19 -4
- package/esm/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.mjs.map +1 -1
- package/esm/components/ScheduleEvent/ScheduleEvent.module.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.mjs +47 -17
- package/esm/components/WeekView/WeekView.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.module.mjs +3 -2
- package/esm/components/WeekView/WeekView.module.mjs.map +1 -1
- package/esm/components/WeekView/get-week-view-events/get-week-positioned-events.mjs +4 -2
- package/esm/components/WeekView/get-week-view-events/get-week-positioned-events.mjs.map +1 -1
- package/esm/hooks/use-event-resize.mjs +7 -4
- package/esm/hooks/use-event-resize.mjs.map +1 -1
- package/esm/hooks/use-horizontal-event-resize.mjs +7 -4
- package/esm/hooks/use-horizontal-event-resize.mjs.map +1 -1
- package/esm/index.mjs +3 -1
- package/esm/utils/apply-cascade-layout/apply-cascade-layout.mjs +21 -0
- package/esm/utils/apply-cascade-layout/apply-cascade-layout.mjs.map +1 -0
- package/esm/{components/ResourcesDayView → utils}/get-overlap-clusters/get-overlap-clusters.mjs +2 -2
- package/esm/utils/get-overlap-clusters/get-overlap-clusters.mjs.map +1 -0
- package/esm/utils/is-event-in-time-range/is-event-in-time-range.mjs +2 -1
- package/esm/utils/is-event-in-time-range/is-event-in-time-range.mjs.map +1 -1
- package/lib/components/DayView/DayView.d.ts +7 -3
- package/lib/components/DayView/get-day-view-events/get-day-positioned-events.d.ts +4 -2
- package/lib/components/DayView/get-day-view-events/get-day-view-events.d.ts +3 -2
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +1 -1
- package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +1 -1
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +1 -1
- package/lib/components/Schedule/Schedule.d.ts +1 -1
- package/lib/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.d.ts +15 -2
- package/lib/components/WeekView/WeekView.d.ts +7 -3
- package/lib/components/WeekView/get-week-view-events/get-week-positioned-events.d.ts +4 -2
- package/lib/hooks/use-event-resize.d.ts +3 -2
- package/lib/hooks/use-horizontal-event-resize.d.ts +3 -2
- package/lib/types.d.ts +2 -0
- package/lib/utils/apply-cascade-layout/apply-cascade-layout.d.ts +6 -0
- package/lib/utils/get-overlap-clusters/get-overlap-clusters.d.ts +2 -0
- package/lib/utils/index.d.ts +3 -0
- package/package.json +4 -4
- package/styles.css +315 -6
- package/styles.layer.css +315 -6
- package/cjs/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.cjs.map +0 -1
- package/esm/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.mjs.map +0 -1
- package/lib/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMonthView.cjs","names":["createVarsResolver","getRadius","factory","useProps","useDatesContext","useMantineTheme","useUncontrolled","toDateString","useStyles","useRef","expandRecurringEvents","getMobileMonthViewEvents","getWeekdaysNames","getMonthDays","isSameMonth","getThemeColor","UnstyledButton","getWeekNumber","sortEvents","Box","Text","React","formatDate","useDirection","AccordionChevron","getLabel","classes"],"sources":["../../../src/components/MobileMonthView/MobileMonthView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport React, { useRef } from 'react';\nimport {\n AccordionChevron,\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getThemeColor,\n MantineRadius,\n StylesApiProps,\n Text,\n UnstyledButton,\n useDirection,\n useMantineTheme,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useUncontrolled } from '@mantine/hooks';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n DateLabelFormat,\n DateStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleMode,\n} from '../../types';\nimport {\n expandRecurringEvents,\n formatDate,\n getMonthDays,\n getWeekdaysNames,\n getWeekNumber,\n isSameMonth,\n sortEvents,\n toDateString,\n} from '../../utils';\nimport {\n handleMonthViewKeyDown,\n MonthViewControlsRef,\n} from '../MonthView/handle-month-view-key-down';\nimport { RenderEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { getMobileMonthViewEvents } from './get-mobile-month-view-events';\nimport classes from './MobileMonthView.module.css';\n\nexport type MobileMonthViewStylesNames =\n | 'mobileMonthView'\n | 'mobileMonthViewHeader'\n | 'mobileMonthViewHeaderBackButton'\n | 'mobileMonthViewHeaderLabel'\n | 'mobileMonthViewCalendar'\n | 'mobileMonthViewWeekdays'\n | 'mobileMonthViewWeekday'\n | 'mobileMonthViewWeekdaysCorner'\n | 'mobileMonthViewWeek'\n | 'mobileMonthViewWeekNumber'\n | 'mobileMonthViewDay'\n | 'mobileMonthViewDayIndicators'\n | 'mobileMonthViewDayIndicator'\n | 'mobileMonthViewEventsList'\n | 'mobileMonthViewEventsHeader'\n | 'mobileMonthViewEvent'\n | 'mobileMonthViewEventColor'\n | 'mobileMonthViewEventBody'\n | 'mobileMonthViewEventTitle'\n | 'mobileMonthViewEventTime'\n | 'mobileMonthViewNoEvents';\n\nexport type MobileMonthViewCssVariables = {\n mobileMonthView: '--mobile-month-view-radius';\n};\n\nexport interface MobileMonthViewRenderHeaderInput {\n /** Current interaction mode */\n mode: ScheduleMode;\n /** Current date displayed in the view */\n date: Date | string;\n /** Default header element */\n defaultHeader: React.ReactNode;\n}\n\nexport interface MobileMonthViewProps\n extends BoxProps, StylesApiProps<MobileMonthViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Date to display, Date object or date string in `YYYY-MM-DD 00:00:00` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** Currently selected date (controlled) */\n selectedDate?: Date | string | null;\n\n /** Default selected date (uncontrolled) */\n defaultSelectedDate?: Date | string | null;\n\n /** Called when selected date changes */\n onSelectedDateChange?: (value: DateStringValue | null) => void;\n\n /** If set, week numbers are displayed in the first column @default false */\n withWeekNumbers?: boolean;\n\n /** If set, weekdays names are displayed in the first row @default true */\n withWeekDays?: boolean;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** Number 0-6, where 0 – Sunday and 6 – Saturday. @default 1 – Monday */\n firstDayOfWeek?: DayOfWeek;\n\n /** `dayjs` format for weekdays names. By default, the first letter of the weekday. */\n weekdayFormat?: DateLabelFormat;\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 /** Props passed down to the week number button */\n getWeekNumberProps?: (weekStartDate: DateStringValue) => Record<string, any>;\n\n /** Props passed down to the day button */\n getDayProps?: (date: DateStringValue) => Record<string, any>;\n\n /** Called when day is clicked */\n onDayClick?: (date: DateStringValue, event: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** Called with first day of the week when week number is clicked */\n onWeekNumberClick?: (date: DateStringValue, event: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, always renders 6 weeks in the month view @default true */\n consistentWeeks?: boolean;\n\n /** If set, highlights the current day @default true */\n highlightToday?: boolean;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** If set, days from the previous and next months are displayed to fill the weeks @default false */\n withOutsideDays?: boolean;\n\n /** Events to display */\n events?: ScheduleEventData[];\n\n /** Labels override for i18n */\n labels?: ScheduleLabelsOverride;\n\n /** Interaction mode: 'default' allows all interactions, 'static' disables event interactions @default 'default' */\n mode?: ScheduleMode;\n\n /** Function to fully customize event rendering, receives all props that would be passed to the root element including children */\n renderEvent?: RenderEvent;\n\n /** Format for the events list header date @default 'dddd, MMMM D' */\n eventsHeaderFormat?: DateLabelFormat;\n\n /** Called when the year back button in the header is clicked */\n onYearClick?: () => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** Custom header renderer, receives object with mode, date, and default header element */\n renderHeader?: (input: MobileMonthViewRenderHeaderInput) => React.ReactNode;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n}\n\nexport type MobileMonthViewFactory = Factory<{\n props: MobileMonthViewProps;\n ref: HTMLDivElement;\n stylesNames: MobileMonthViewStylesNames;\n vars: MobileMonthViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'MobileMonthView',\n withWeekDays: true,\n consistentWeeks: true,\n highlightToday: true,\n mode: 'default',\n eventsHeaderFormat: 'dddd, MMMM D',\n} satisfies Partial<MobileMonthViewProps>;\n\nconst varsResolver = createVarsResolver<MobileMonthViewFactory>((_theme, { radius }) => ({\n mobileMonthView: {\n '--mobile-month-view-radius': getRadius(radius),\n },\n}));\n\nexport const MobileMonthView = factory<MobileMonthViewFactory>((_props) => {\n const props = useProps('MobileMonthView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n attributes,\n __staticSelector,\n date,\n onDateChange,\n selectedDate,\n defaultSelectedDate,\n onSelectedDateChange,\n withWeekNumbers,\n withWeekDays,\n locale,\n firstDayOfWeek,\n weekdayFormat,\n weekendDays,\n getWeekNumberProps,\n getDayProps,\n onDayClick,\n onWeekNumberClick,\n consistentWeeks,\n highlightToday,\n radius,\n withOutsideDays,\n events,\n labels,\n mode,\n renderEvent,\n eventsHeaderFormat,\n onYearClick,\n onEventClick,\n renderHeader,\n recurrenceExpansionLimit,\n ...others\n } = props;\n\n const ctx = useDatesContext();\n const theme = useMantineTheme();\n const today = dayjs();\n\n const [_selectedDate, _setSelectedDate] = useUncontrolled<Date | string | null>({\n value: selectedDate,\n defaultValue: defaultSelectedDate ?? toDateString(today),\n onChange: (value) => onSelectedDateChange?.(value ? toDateString(dayjs(value)) : null),\n });\n\n const getStyles = useStyles<MobileMonthViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n rootSelector: 'mobileMonthView',\n });\n\n const daysRef: MonthViewControlsRef = useRef<HTMLButtonElement[][]>([]);\n const firstDayPosition = useRef<{ weekIndex: number; dayIndex: number } | null>(null);\n\n const expandedEvents = expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('month').toDate(),\n rangeEnd: dayjs(date).endOf('month').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n });\n\n const groupedEvents = getMobileMonthViewEvents({ date, events: expandedEvents });\n\n const weekdays = withWeekDays\n ? getWeekdaysNames({\n locale: ctx.getLocale(locale),\n format: weekdayFormat,\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n }).map((day, index) => (\n <div {...getStyles('mobileMonthViewWeekday')} key={index}>\n {day}\n </div>\n ))\n : null;\n\n const weeks = getMonthDays({\n month: dayjs(date).format('YYYY-MM-DD'),\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n consistentWeeks,\n }).map((week, weekIndex) => {\n const days = week.map((dayDate, dayIndex) => {\n const outside = !isSameMonth(dayDate, date);\n const weekend = ctx.getWeekendDays(weekendDays).includes(dayjs(dayDate).day());\n const ariaLabel = dayjs(dayDate)\n .locale(locale || ctx.locale)\n .format('MMMM D, YYYY');\n\n const dayProps = getDayProps?.(dayjs(dayDate).format('YYYY-MM-DD')) || {};\n const isToday = dayjs(dayDate).isSame(today, 'day') && highlightToday;\n const isSelected = _selectedDate && dayjs(dayDate).isSame(dayjs(_selectedDate), 'day');\n const dayEvents = groupedEvents[dayjs(dayDate).format('YYYY-MM-DD')] || [];\n\n const shouldRender = withOutsideDays || !outside;\n\n if (shouldRender && firstDayPosition.current === null) {\n firstDayPosition.current = { weekIndex, dayIndex };\n }\n\n const isFirstDay =\n firstDayPosition.current?.weekIndex === weekIndex &&\n firstDayPosition.current?.dayIndex === dayIndex;\n\n const indicators = dayEvents.slice(0, 3).map((event) => (\n <div\n {...getStyles('mobileMonthViewDayIndicator', {\n style: { backgroundColor: getThemeColor(event.color, theme) },\n })}\n key={event.id}\n />\n ));\n\n const handleDayClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n const dateStr = dayjs(dayDate).format('YYYY-MM-DD');\n _setSelectedDate(dateStr);\n onDayClick?.(dateStr, event);\n dayProps.onClick?.(event);\n };\n\n const handleDayKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n handleMonthViewKeyDown({\n controlsRef: daysRef,\n weekIndex,\n dayIndex,\n event,\n });\n };\n\n return (\n <UnstyledButton\n aria-label={ariaLabel}\n aria-selected={isSelected || undefined}\n {...dayProps}\n {...getStyles('mobileMonthViewDay', {\n className: dayProps.className,\n style: dayProps.style,\n })}\n key={dayDate}\n ref={(node) => {\n if (node) {\n if (!daysRef.current[weekIndex]) {\n daysRef.current[weekIndex] = [];\n }\n daysRef.current[weekIndex][dayIndex] = node;\n }\n }}\n mod={[\n {\n outside,\n weekend,\n today: isToday,\n selected: isSelected,\n static: mode === 'static',\n hidden: !shouldRender,\n },\n dayProps.mod,\n ]}\n tabIndex={mode === 'static' || !shouldRender ? -1 : isFirstDay ? 0 : -1}\n onClick={mode === 'static' || !shouldRender ? undefined : handleDayClick}\n onKeyDown={mode === 'static' || !shouldRender ? undefined : handleDayKeyDown}\n >\n {shouldRender ? dayjs(dayDate).format('D') : null}\n {shouldRender && <div {...getStyles('mobileMonthViewDayIndicators')}>{indicators}</div>}\n </UnstyledButton>\n );\n });\n\n const weekNumberProps = getWeekNumberProps?.(dayjs(week[0]).format('YYYY-MM-DD')) || {};\n const weekNumber = getWeekNumber(week);\n\n return (\n <div {...getStyles('mobileMonthViewWeek')} key={weekIndex}>\n {withWeekNumbers && (\n <UnstyledButton\n key={weekNumber}\n aria-label={`Week ${weekNumber}`}\n {...weekNumberProps}\n onClick={\n mode === 'static'\n ? undefined\n : (event) => {\n onWeekNumberClick?.(dayjs(week[0]).format('YYYY-MM-DD'), event);\n weekNumberProps.onClick?.(event);\n }\n }\n mod={{ static: mode === 'static' }}\n tabIndex={mode === 'static' ? -1 : 0}\n {...getStyles('mobileMonthViewWeekNumber', {\n className: weekNumberProps.className,\n style: weekNumberProps.style,\n })}\n >\n {weekNumber}\n </UnstyledButton>\n )}\n {days}\n </div>\n );\n });\n\n const selectedDateEvents = _selectedDate\n ? sortEvents(groupedEvents[dayjs(_selectedDate).format('YYYY-MM-DD')] || [])\n : [];\n\n const eventsList = selectedDateEvents.map((event) => {\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\n const eventChildren = (\n <Box {...getStyles('mobileMonthViewEventBody')}>\n <div\n {...getStyles('mobileMonthViewEventColor', {\n style: { backgroundColor: getThemeColor(event.color, theme) },\n })}\n />\n <div>\n <Text {...getStyles('mobileMonthViewEventTitle')}>{event.title}</Text>\n <Text {...getStyles('mobileMonthViewEventTime')}>\n {isAllDay ? 'All day' : `${startTime} – ${endTime}`}\n </Text>\n </div>\n </Box>\n );\n\n const rootProps: React.ComponentPropsWithoutRef<'button'> & { children: React.ReactNode } = {\n ...getStyles('mobileMonthViewEvent'),\n onClick:\n mode === 'static'\n ? undefined\n : (e: React.MouseEvent<HTMLButtonElement>) => {\n onEventClick?.(event, e);\n },\n tabIndex: mode === 'static' ? -1 : 0,\n children: eventChildren,\n };\n\n if (typeof renderEvent === 'function') {\n return <React.Fragment key={event.id}>{renderEvent(event, rootProps)}</React.Fragment>;\n }\n\n return <UnstyledButton {...rootProps} key={event.id} />;\n });\n\n const eventsHeader = _selectedDate\n ? formatDate({\n locale: ctx.getLocale(locale),\n date: _selectedDate,\n format: eventsHeaderFormat,\n })\n : '';\n\n const { dir } = useDirection();\n\n const headerLabel = formatDate({ locale: ctx.getLocale(locale), date, format: 'MMMM YYYY' });\n\n const defaultHeader = (\n <>\n <UnstyledButton\n {...getStyles('mobileMonthViewHeaderBackButton')}\n onClick={onYearClick}\n mod={{ static: mode === 'static' }}\n tabIndex={mode === 'static' ? -1 : 0}\n >\n <AccordionChevron\n style={{ transform: `rotate(${dir === 'rtl' ? -90 : 90}deg)` }}\n size={20}\n />\n {dayjs(date).format('YYYY')}\n </UnstyledButton>\n <Text {...getStyles('mobileMonthViewHeaderLabel')}>{headerLabel}</Text>\n </>\n );\n\n return (\n <Box\n {...getStyles('mobileMonthView')}\n mod={{ 'with-week-numbers': withWeekNumbers }}\n {...others}\n >\n <div {...getStyles('mobileMonthViewHeader')}>\n {typeof renderHeader === 'function'\n ? renderHeader({ mode: mode!, date, defaultHeader })\n : defaultHeader}\n </div>\n\n <Box {...getStyles('mobileMonthViewCalendar')} mod={{ 'with-weekdays': withWeekDays }}>\n {weekdays && (\n <div {...getStyles('mobileMonthViewWeekdays')}>\n {withWeekNumbers && <div {...getStyles('mobileMonthViewWeekdaysCorner')} />}\n {weekdays}\n </div>\n )}\n {weeks}\n </Box>\n\n <Box {...getStyles('mobileMonthViewEventsList')}>\n <Text {...getStyles('mobileMonthViewEventsHeader')}>{eventsHeader}</Text>\n\n {eventsList.length > 0 ? (\n eventsList\n ) : (\n <Text {...getStyles('mobileMonthViewNoEvents')}>{getLabel('noEvents', labels)}</Text>\n )}\n </Box>\n </Box>\n );\n});\n\nMobileMonthView.displayName = '@mantine/schedule/MobileMonthView';\nMobileMonthView.classes = classes;\nMobileMonthView.varsResolver = varsResolver;\n\nexport namespace MobileMonthView {\n export type Props = MobileMonthViewProps;\n export type Factory = MobileMonthViewFactory;\n export type StylesNames = MobileMonthViewStylesNames;\n export type CssVariables = MobileMonthViewCssVariables;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqLA,MAAM,eAAe;CACnB,kBAAkB;CAClB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,MAAM;CACN,oBAAoB;AACtB;AAEA,MAAM,gBAAA,GAAeA,cAAAA,mB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AAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,GAAI,UAAU,yBAAyB;KAA5C,UAAA,CACG,mBAAmB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,+BAA+B,EAAI,CAAA,GACzE,QACE;IAEN,CAAA,GAAA,KACE;;GAEL,iBAAA,GAAA,kBAAA,KAAA,CAACA,cAAAA,KAAD;IAAK,GAAI,UAAU,2BAA2B;IAA9C,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,MAAD;KAAM,GAAI,UAAU,6BAA6B;KAAI,UAAA;IAAmB,CAAA,GAEvE,WAAW,SAAS,IACnB,aAEA,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,MAAD;KAAM,GAAI,UAAU,yBAAyB;KAAIK,UAAAA,eAAAA,SAAS,YAAY,MAAM;IAAQ,CAAA,CAEnF;;EACF;;AAET,CAAC;AAED,gBAAgB,cAAc;AAC9B,gBAAgB,UAAUC,+BAAAA;AAC1B,gBAAgB,eAAe"}
|
|
1
|
+
{"version":3,"file":"MobileMonthView.cjs","names":["createVarsResolver","getRadius","factory","useProps","useDatesContext","useMantineTheme","useUncontrolled","toDateString","useStyles","useRef","expandRecurringEvents","getMobileMonthViewEvents","getWeekdaysNames","getMonthDays","isSameMonth","getThemeColor","UnstyledButton","getWeekNumber","sortEvents","Box","Text","getLabel","React","formatDate","useDirection","AccordionChevron","classes"],"sources":["../../../src/components/MobileMonthView/MobileMonthView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport React, { useRef } from 'react';\nimport {\n AccordionChevron,\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getThemeColor,\n MantineRadius,\n StylesApiProps,\n Text,\n UnstyledButton,\n useDirection,\n useMantineTheme,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useUncontrolled } from '@mantine/hooks';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n DateLabelFormat,\n DateStringValue,\n DayOfWeek,\n ScheduleEventData,\n ScheduleMode,\n} from '../../types';\nimport {\n expandRecurringEvents,\n formatDate,\n getMonthDays,\n getWeekdaysNames,\n getWeekNumber,\n isSameMonth,\n sortEvents,\n toDateString,\n} from '../../utils';\nimport {\n handleMonthViewKeyDown,\n MonthViewControlsRef,\n} from '../MonthView/handle-month-view-key-down';\nimport { RenderEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { getMobileMonthViewEvents } from './get-mobile-month-view-events';\nimport classes from './MobileMonthView.module.css';\n\nexport type MobileMonthViewStylesNames =\n | 'mobileMonthView'\n | 'mobileMonthViewHeader'\n | 'mobileMonthViewHeaderBackButton'\n | 'mobileMonthViewHeaderLabel'\n | 'mobileMonthViewCalendar'\n | 'mobileMonthViewWeekdays'\n | 'mobileMonthViewWeekday'\n | 'mobileMonthViewWeekdaysCorner'\n | 'mobileMonthViewWeek'\n | 'mobileMonthViewWeekNumber'\n | 'mobileMonthViewDay'\n | 'mobileMonthViewDayIndicators'\n | 'mobileMonthViewDayIndicator'\n | 'mobileMonthViewEventsList'\n | 'mobileMonthViewEventsHeader'\n | 'mobileMonthViewEvent'\n | 'mobileMonthViewEventColor'\n | 'mobileMonthViewEventBody'\n | 'mobileMonthViewEventTitle'\n | 'mobileMonthViewEventTime'\n | 'mobileMonthViewNoEvents';\n\nexport type MobileMonthViewCssVariables = {\n mobileMonthView: '--mobile-month-view-radius';\n};\n\nexport interface MobileMonthViewRenderHeaderInput {\n /** Current interaction mode */\n mode: ScheduleMode;\n /** Current date displayed in the view */\n date: Date | string;\n /** Default header element */\n defaultHeader: React.ReactNode;\n}\n\nexport interface MobileMonthViewProps\n extends BoxProps, StylesApiProps<MobileMonthViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Date to display, Date object or date string in `YYYY-MM-DD 00:00:00` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** Currently selected date (controlled) */\n selectedDate?: Date | string | null;\n\n /** Default selected date (uncontrolled) */\n defaultSelectedDate?: Date | string | null;\n\n /** Called when selected date changes */\n onSelectedDateChange?: (value: DateStringValue | null) => void;\n\n /** If set, week numbers are displayed in the first column @default false */\n withWeekNumbers?: boolean;\n\n /** If set, weekdays names are displayed in the first row @default true */\n withWeekDays?: boolean;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** Number 0-6, where 0 – Sunday and 6 – Saturday. @default 1 – Monday */\n firstDayOfWeek?: DayOfWeek;\n\n /** `dayjs` format for weekdays names. By default, the first letter of the weekday. */\n weekdayFormat?: DateLabelFormat;\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 /** Props passed down to the week number button */\n getWeekNumberProps?: (weekStartDate: DateStringValue) => Record<string, any>;\n\n /** Props passed down to the day button */\n getDayProps?: (date: DateStringValue) => Record<string, any>;\n\n /** Called when day is clicked */\n onDayClick?: (date: DateStringValue, event: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** Called with first day of the week when week number is clicked */\n onWeekNumberClick?: (date: DateStringValue, event: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, always renders 6 weeks in the month view @default true */\n consistentWeeks?: boolean;\n\n /** If set, highlights the current day @default true */\n highlightToday?: boolean;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** If set, days from the previous and next months are displayed to fill the weeks @default false */\n withOutsideDays?: boolean;\n\n /** Events to display */\n events?: ScheduleEventData[];\n\n /** Labels override for i18n */\n labels?: ScheduleLabelsOverride;\n\n /** Interaction mode: 'default' allows all interactions, 'static' disables event interactions @default 'default' */\n mode?: ScheduleMode;\n\n /** Function to fully customize event rendering, receives all props that would be passed to the root element including children */\n renderEvent?: RenderEvent;\n\n /** Format for the events list header date @default 'dddd, MMMM D' */\n eventsHeaderFormat?: DateLabelFormat;\n\n /** Called when the year back button in the header is clicked */\n onYearClick?: () => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** Custom header renderer, receives object with mode, date, and default header element */\n renderHeader?: (input: MobileMonthViewRenderHeaderInput) => React.ReactNode;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n}\n\nexport type MobileMonthViewFactory = Factory<{\n props: MobileMonthViewProps;\n ref: HTMLDivElement;\n stylesNames: MobileMonthViewStylesNames;\n vars: MobileMonthViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'MobileMonthView',\n withWeekDays: true,\n consistentWeeks: true,\n highlightToday: true,\n mode: 'default',\n eventsHeaderFormat: 'dddd, MMMM D',\n} satisfies Partial<MobileMonthViewProps>;\n\nconst varsResolver = createVarsResolver<MobileMonthViewFactory>((_theme, { radius }) => ({\n mobileMonthView: {\n '--mobile-month-view-radius': getRadius(radius),\n },\n}));\n\nexport const MobileMonthView = factory<MobileMonthViewFactory>((_props) => {\n const props = useProps('MobileMonthView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n attributes,\n __staticSelector,\n date,\n onDateChange,\n selectedDate,\n defaultSelectedDate,\n onSelectedDateChange,\n withWeekNumbers,\n withWeekDays,\n locale,\n firstDayOfWeek,\n weekdayFormat,\n weekendDays,\n getWeekNumberProps,\n getDayProps,\n onDayClick,\n onWeekNumberClick,\n consistentWeeks,\n highlightToday,\n radius,\n withOutsideDays,\n events,\n labels,\n mode,\n renderEvent,\n eventsHeaderFormat,\n onYearClick,\n onEventClick,\n renderHeader,\n recurrenceExpansionLimit,\n ...others\n } = props;\n\n const ctx = useDatesContext();\n const theme = useMantineTheme();\n const today = dayjs();\n\n const [_selectedDate, _setSelectedDate] = useUncontrolled<Date | string | null>({\n value: selectedDate,\n defaultValue: defaultSelectedDate ?? toDateString(today),\n onChange: (value) => onSelectedDateChange?.(value ? toDateString(dayjs(value)) : null),\n });\n\n const getStyles = useStyles<MobileMonthViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n rootSelector: 'mobileMonthView',\n });\n\n const daysRef: MonthViewControlsRef = useRef<HTMLButtonElement[][]>([]);\n const firstDayPosition = useRef<{ weekIndex: number; dayIndex: number } | null>(null);\n\n const expandedEvents = expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('month').toDate(),\n rangeEnd: dayjs(date).endOf('month').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n });\n\n const groupedEvents = getMobileMonthViewEvents({ date, events: expandedEvents });\n\n const weekdays = withWeekDays\n ? getWeekdaysNames({\n locale: ctx.getLocale(locale),\n format: weekdayFormat,\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n }).map((day, index) => (\n <div {...getStyles('mobileMonthViewWeekday')} key={index}>\n {day}\n </div>\n ))\n : null;\n\n const weeks = getMonthDays({\n month: dayjs(date).format('YYYY-MM-DD'),\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n consistentWeeks,\n }).map((week, weekIndex) => {\n const days = week.map((dayDate, dayIndex) => {\n const outside = !isSameMonth(dayDate, date);\n const weekend = ctx.getWeekendDays(weekendDays).includes(dayjs(dayDate).day());\n const ariaLabel = dayjs(dayDate)\n .locale(locale || ctx.locale)\n .format('MMMM D, YYYY');\n\n const dayProps = getDayProps?.(dayjs(dayDate).format('YYYY-MM-DD')) || {};\n const isToday = dayjs(dayDate).isSame(today, 'day') && highlightToday;\n const isSelected = _selectedDate && dayjs(dayDate).isSame(dayjs(_selectedDate), 'day');\n const dayEvents = groupedEvents[dayjs(dayDate).format('YYYY-MM-DD')] || [];\n\n const shouldRender = withOutsideDays || !outside;\n\n if (shouldRender && firstDayPosition.current === null) {\n firstDayPosition.current = { weekIndex, dayIndex };\n }\n\n const isFirstDay =\n firstDayPosition.current?.weekIndex === weekIndex &&\n firstDayPosition.current?.dayIndex === dayIndex;\n\n const indicators = dayEvents.slice(0, 3).map((event) => (\n <div\n {...getStyles('mobileMonthViewDayIndicator', {\n style: { backgroundColor: getThemeColor(event.color, theme) },\n })}\n key={event.id}\n />\n ));\n\n const handleDayClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n const dateStr = dayjs(dayDate).format('YYYY-MM-DD');\n _setSelectedDate(dateStr);\n onDayClick?.(dateStr, event);\n dayProps.onClick?.(event);\n };\n\n const handleDayKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n handleMonthViewKeyDown({\n controlsRef: daysRef,\n weekIndex,\n dayIndex,\n event,\n });\n };\n\n return (\n <UnstyledButton\n aria-label={ariaLabel}\n aria-selected={isSelected || undefined}\n {...dayProps}\n {...getStyles('mobileMonthViewDay', {\n className: dayProps.className,\n style: dayProps.style,\n })}\n key={dayDate}\n ref={(node) => {\n if (node) {\n if (!daysRef.current[weekIndex]) {\n daysRef.current[weekIndex] = [];\n }\n daysRef.current[weekIndex][dayIndex] = node;\n }\n }}\n mod={[\n {\n outside,\n weekend,\n today: isToday,\n selected: isSelected,\n static: mode === 'static',\n hidden: !shouldRender,\n },\n dayProps.mod,\n ]}\n tabIndex={mode === 'static' || !shouldRender ? -1 : isFirstDay ? 0 : -1}\n onClick={mode === 'static' || !shouldRender ? undefined : handleDayClick}\n onKeyDown={mode === 'static' || !shouldRender ? undefined : handleDayKeyDown}\n >\n {shouldRender ? dayjs(dayDate).format('D') : null}\n {shouldRender && <div {...getStyles('mobileMonthViewDayIndicators')}>{indicators}</div>}\n </UnstyledButton>\n );\n });\n\n const weekNumberProps = getWeekNumberProps?.(dayjs(week[0]).format('YYYY-MM-DD')) || {};\n const weekNumber = getWeekNumber(week);\n\n return (\n <div {...getStyles('mobileMonthViewWeek')} key={weekIndex}>\n {withWeekNumbers && (\n <UnstyledButton\n key={weekNumber}\n aria-label={`Week ${weekNumber}`}\n {...weekNumberProps}\n onClick={\n mode === 'static'\n ? undefined\n : (event) => {\n onWeekNumberClick?.(dayjs(week[0]).format('YYYY-MM-DD'), event);\n weekNumberProps.onClick?.(event);\n }\n }\n mod={{ static: mode === 'static' }}\n tabIndex={mode === 'static' ? -1 : 0}\n {...getStyles('mobileMonthViewWeekNumber', {\n className: weekNumberProps.className,\n style: weekNumberProps.style,\n })}\n >\n {weekNumber}\n </UnstyledButton>\n )}\n {days}\n </div>\n );\n });\n\n const selectedDateEvents = _selectedDate\n ? sortEvents(groupedEvents[dayjs(_selectedDate).format('YYYY-MM-DD')] || [])\n : [];\n\n const eventsList = selectedDateEvents.map((event) => {\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\n const eventChildren = (\n <Box {...getStyles('mobileMonthViewEventBody')}>\n <div\n {...getStyles('mobileMonthViewEventColor', {\n style: { backgroundColor: getThemeColor(event.color, theme) },\n })}\n />\n <div>\n <Text {...getStyles('mobileMonthViewEventTitle')}>{event.title}</Text>\n <Text {...getStyles('mobileMonthViewEventTime')}>\n {isAllDay ? getLabel('allDay', labels) : `${startTime} – ${endTime}`}\n </Text>\n </div>\n </Box>\n );\n\n const rootProps: React.ComponentPropsWithoutRef<'button'> & { children: React.ReactNode } = {\n ...getStyles('mobileMonthViewEvent'),\n onClick:\n mode === 'static'\n ? undefined\n : (e: React.MouseEvent<HTMLButtonElement>) => {\n onEventClick?.(event, e);\n },\n tabIndex: mode === 'static' ? -1 : 0,\n children: eventChildren,\n };\n\n if (typeof renderEvent === 'function') {\n return <React.Fragment key={event.id}>{renderEvent(event, rootProps)}</React.Fragment>;\n }\n\n return <UnstyledButton {...rootProps} key={event.id} />;\n });\n\n const eventsHeader = _selectedDate\n ? formatDate({\n locale: ctx.getLocale(locale),\n date: _selectedDate,\n format: eventsHeaderFormat,\n })\n : '';\n\n const { dir } = useDirection();\n\n const headerLabel = formatDate({ locale: ctx.getLocale(locale), date, format: 'MMMM YYYY' });\n\n const defaultHeader = (\n <>\n <UnstyledButton\n {...getStyles('mobileMonthViewHeaderBackButton')}\n onClick={onYearClick}\n mod={{ static: mode === 'static' }}\n tabIndex={mode === 'static' ? -1 : 0}\n >\n <AccordionChevron\n style={{ transform: `rotate(${dir === 'rtl' ? -90 : 90}deg)` }}\n size={20}\n />\n {dayjs(date).format('YYYY')}\n </UnstyledButton>\n <Text {...getStyles('mobileMonthViewHeaderLabel')}>{headerLabel}</Text>\n </>\n );\n\n return (\n <Box\n {...getStyles('mobileMonthView')}\n mod={{ 'with-week-numbers': withWeekNumbers }}\n {...others}\n >\n <div {...getStyles('mobileMonthViewHeader')}>\n {typeof renderHeader === 'function'\n ? renderHeader({ mode: mode!, date, defaultHeader })\n : defaultHeader}\n </div>\n\n <Box {...getStyles('mobileMonthViewCalendar')} mod={{ 'with-weekdays': withWeekDays }}>\n {weekdays && (\n <div {...getStyles('mobileMonthViewWeekdays')}>\n {withWeekNumbers && <div {...getStyles('mobileMonthViewWeekdaysCorner')} />}\n {weekdays}\n </div>\n )}\n {weeks}\n </Box>\n\n <Box {...getStyles('mobileMonthViewEventsList')}>\n <Text {...getStyles('mobileMonthViewEventsHeader')}>{eventsHeader}</Text>\n\n {eventsList.length > 0 ? (\n eventsList\n ) : (\n <Text {...getStyles('mobileMonthViewNoEvents')}>{getLabel('noEvents', labels)}</Text>\n )}\n </Box>\n </Box>\n );\n});\n\nMobileMonthView.displayName = '@mantine/schedule/MobileMonthView';\nMobileMonthView.classes = classes;\nMobileMonthView.varsResolver = varsResolver;\n\nexport namespace MobileMonthView {\n export type Props = MobileMonthViewProps;\n export type Factory = MobileMonthViewFactory;\n export type StylesNames = MobileMonthViewStylesNames;\n export type CssVariables = MobileMonthViewCssVariables;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqLA,MAAM,eAAe;CACnB,kBAAkB;CAClB,cAAc;CACd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kBAAA,KAAA,CAACA,cAAAA,KAAD;IAAK,GAAI,UAAU,yBAAyB;IAAG,KAAK,EAAE,iBAAiB,aAAa;IAApF,UAAA,CACG,YACC,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,GAAI,UAAU,yBAAyB;KAA5C,UAAA,CACG,mBAAmB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,+BAA+B,EAAI,CAAA,GACzE,QACE;IAEN,CAAA,GAAA,KACE;;GAEL,iBAAA,GAAA,kBAAA,KAAA,CAACA,cAAAA,KAAD;IAAK,GAAI,UAAU,2BAA2B;IAA9C,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,MAAD;KAAM,GAAI,UAAU,6BAA6B;KAAI,UAAA;IAAmB,CAAA,GAEvE,WAAW,SAAS,IACnB,aAEA,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,MAAD;KAAM,GAAI,UAAU,yBAAyB;KAAIC,UAAAA,eAAAA,SAAS,YAAY,MAAM;IAAQ,CAAA,CAEnF;;EACF;;AAET,CAAC;AAED,gBAAgB,cAAc;AAC9B,gBAAgB,UAAUK,+BAAAA;AAC1B,gBAAgB,eAAe"}
|
|
@@ -16,6 +16,7 @@ const require_get_ordered_resources = require("../../utils/get-ordered-resources
|
|
|
16
16
|
const require_handle_resources_grid_key_down = require("../../utils/handle-resources-grid-key-down/handle-resources-grid-key-down.cjs");
|
|
17
17
|
const require_get_group_to_resource_id_map = require("../../utils/get-group-to-resource-id-map/get-group-to-resource-id-map.cjs");
|
|
18
18
|
const require_get_index_from_drag_point = require("../../utils/get-index-from-drag-point/get-index-from-drag-point.cjs");
|
|
19
|
+
const require_get_overlap_clusters = require("../../utils/get-overlap-clusters/get-overlap-clusters.cjs");
|
|
19
20
|
const require_use_drag_drop_handlers = require("../../hooks/use-drag-drop-handlers.cjs");
|
|
20
21
|
const require_use_slot_drag_select = require("../../hooks/use-slot-drag-select.cjs");
|
|
21
22
|
const require_DragContext = require("../DragContext/DragContext.cjs");
|
|
@@ -24,7 +25,6 @@ const require_MoreEvents = require("../MoreEvents/MoreEvents.cjs");
|
|
|
24
25
|
const require_ScheduleBackgroundEvent = require("../ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs");
|
|
25
26
|
const require_ScheduleHeaderBase = require("../ScheduleHeader/ScheduleHeaderBase.cjs");
|
|
26
27
|
const require_use_horizontal_event_resize = require("../../hooks/use-horizontal-event-resize.cjs");
|
|
27
|
-
const require_get_overlap_clusters = require("./get-overlap-clusters/get-overlap-clusters.cjs");
|
|
28
28
|
const require_get_resources_day_view_events = require("./get-resources-day-view-events/get-resources-day-view-events.cjs");
|
|
29
29
|
const require_ResourcesDayViewColumn = require("./ResourcesDayViewColumn.cjs");
|
|
30
30
|
const require_ResourcesDayView_module = require("./ResourcesDayView.module.cjs");
|
|
@@ -209,7 +209,8 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
|
|
|
209
209
|
intervalMinutes,
|
|
210
210
|
resizeIntervalMinutes: eventResizeInterval,
|
|
211
211
|
onEventResize,
|
|
212
|
-
canResizeEvent
|
|
212
|
+
canResizeEvent,
|
|
213
|
+
withBackgroundEvents: withInteractiveBackgroundEvents
|
|
213
214
|
});
|
|
214
215
|
const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== "static";
|
|
215
216
|
const handleTimeSlotClick = (resourceId, slotTime, e) => {
|
|
@@ -344,19 +345,43 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
|
|
|
344
345
|
};
|
|
345
346
|
const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== "static";
|
|
346
347
|
const rows = orderedResources.map((resource, resourceIndex) => {
|
|
347
|
-
const
|
|
348
|
-
event
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
348
|
+
const renderBackgroundEvent = (event, allDay) => {
|
|
349
|
+
const isResizable = !allDay && eventResize.isResizableEvent(event);
|
|
350
|
+
const resizePosition = eventResize.getResizePosition(event.id);
|
|
351
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ScheduleBackgroundEvent.ScheduleBackgroundEvent, {
|
|
352
|
+
event,
|
|
353
|
+
renderEvent,
|
|
354
|
+
renderEventBody,
|
|
355
|
+
interactive: interactiveBackgroundEvents,
|
|
356
|
+
onEventClick: onEventClick ? (clickedEvent, e) => {
|
|
357
|
+
if (!eventResize.wasResizing()) onEventClick(clickedEvent, e);
|
|
358
|
+
} : void 0,
|
|
359
|
+
withResize: isResizable,
|
|
360
|
+
isResizing: resizePosition !== null,
|
|
361
|
+
activeResizeEdge: eventResize.resizingEdge,
|
|
362
|
+
resizeAxis: "horizontal",
|
|
363
|
+
resizeHandleProps: getStyles("resourcesDayViewResizeHandle"),
|
|
364
|
+
onResizeStart: isResizable ? (edge, e) => {
|
|
365
|
+
const container = rowSlotsContainersRef.current[resourceIndex];
|
|
366
|
+
if (container) eventResize.handleResizeStart({
|
|
367
|
+
event,
|
|
368
|
+
edge,
|
|
369
|
+
container,
|
|
370
|
+
originalLeft: event.position.top,
|
|
371
|
+
originalWidth: event.position.height,
|
|
372
|
+
eventDate: dateStr,
|
|
373
|
+
pointerEvent: e
|
|
374
|
+
});
|
|
375
|
+
} : void 0,
|
|
376
|
+
...getStyles("resourcesDayViewBackgroundEvent", { style: {
|
|
377
|
+
left: `${resizePosition ? resizePosition.left : event.position.top}%`,
|
|
378
|
+
width: `${resizePosition ? resizePosition.width : event.position.height}%`,
|
|
379
|
+
top: 0,
|
|
380
|
+
height: "100%"
|
|
381
|
+
} })
|
|
382
|
+
}, `bg-${event.id}`);
|
|
383
|
+
};
|
|
384
|
+
const backgroundEventNodes = [...(resourceEvents.backgroundTimedEvents[resource.id] || []).map((event) => renderBackgroundEvent(event, false)), ...(resourceEvents.backgroundAllDayEvents[resource.id] || []).map((event) => renderBackgroundEvent(event, true))];
|
|
360
385
|
const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter((event) => !require_is_all_day_event.isAllDayEvent({
|
|
361
386
|
event,
|
|
362
387
|
date
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesDayView.cjs","names":["createVarsResolver","getRadius","rem","factory","useProps","useStyles","useResolvedStylesApi","useMantineTheme","useDirection","useState","useDatesContext","getDayTimeIntervals","useMemo","getOrderedResources","useRef","useCallback","calculateDropTime","useDragDropHandlers","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","useMounted","getCurrentTimePosition","isInTimeRange","formatDate","expandRecurringEvents","getResourcesDayViewEvents","Box","getBusinessHoursMod","useMergedRef","classes","getIndexFromDragPoint","ScheduleBackgroundEvent","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesDayViewRow","getDayPosition","ScheduleHeaderBase","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineRadius,\n rem,\n ScrollArea,\n ScrollAreaProps,\n StylesApiProps,\n useDirection,\n useMantineTheme,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useInterval, useIsomorphicEffect, useMergedRef, useMounted } from '@mantine/hooks';\nimport { useDragDropHandlers } from '../../hooks/use-drag-drop-handlers';\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize';\nimport { useSlotDragSelect } from '../../hooks/use-slot-drag-select';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types';\nimport {\n calculateDropTime,\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getDayPosition,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getIndexFromDragPoint,\n getOrderedResources,\n getTimeAxisEventStyle,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n ResourcesGridControlsRef,\n toDateString,\n} from '../../utils';\nimport { DragContext, DragContextValue } from '../DragContext/DragContext';\nimport { MoreEvents, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents';\nimport { ScheduleBackgroundEvent } from '../ScheduleBackgroundEvent';\nimport { RenderEvent, RenderEventBody, ScheduleEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader';\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase';\nimport { ViewSelectProps } from '../ScheduleHeader/ViewSelect/ViewSelect';\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters';\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events';\nimport { ResourcesDayViewRow } from './ResourcesDayViewColumn';\nimport classes from './ResourcesDayView.module.css';\n\nexport type ResourcesDayViewStylesNames =\n | 'resourcesDayView'\n | 'resourcesDayViewRoot'\n | 'resourcesDayViewInner'\n | 'resourcesDayViewTimeLabelsRow'\n | 'resourcesDayViewScrollArea'\n | 'resourcesDayViewCorner'\n | 'resourcesDayViewTimeLabel'\n | 'resourcesDayViewResourceLabel'\n | 'resourcesDayViewRow'\n | 'resourcesDayViewRowSlot'\n | 'resourcesDayViewRowSlots'\n | 'resourcesDayViewBackgroundEvent'\n | 'resourcesDayViewAllDayEvent'\n | 'resourcesDayViewCurrentTimeIndicator'\n | 'resourcesDayViewCurrentTimeIndicatorLine'\n | 'resourcesDayViewCurrentTimeIndicatorThumb'\n | 'resourcesDayViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesDayViewEventWrapper'\n | 'resourcesDayViewDragPreview'\n | 'resourcesDayViewResizeHandle'\n | 'resourcesDayViewGroupColumn'\n | 'resourcesDayViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesDayViewCssVariables = {\n resourcesDayView:\n | '--resources-day-view-radius'\n | '--resources-day-view-slot-width'\n | '--resources-day-view-row-height'\n | '--resources-day-view-group-label-width';\n};\n\nexport interface ResourcesDayViewProps\n extends BoxProps, StylesApiProps<ResourcesDayViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Day to display, Date object or date string in `YYYY-MM-DD` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** List of resources to display as rows */\n resources: ScheduleResourceData[];\n\n /** Start time for the day view, in `HH:mm:ss` format @default 00:00:00 */\n startTime?: string;\n\n /** End time for the day view, in `HH:mm:ss` format @default 23:59:59 */\n endTime?: string;\n\n /** Number of minutes for each interval in the day view. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours (e.g. `120`, `240`) @default 60 */\n intervalMinutes?: number;\n\n /** Minimum on-screen size of an event along the time axis, in px. Prevents very short events from collapsing. Larger values make brief events easier to see but extend them past their real start time. @default 1 */\n minEventSize?: number;\n\n /** Dayjs format for slot labels or a callback function that returns formatted value @default HH:mm */\n slotLabelFormat?: DateLabelFormat;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Time to scroll to on initial render, in `HH:mm:ss` format */\n startScrollTime?: string;\n\n /** Props passed down to the `ScrollArea` component */\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** If set, displays a vertical line indicating the current time. By default, displayed only for the current day. */\n withCurrentTimeIndicator?: boolean;\n\n /** If set, the time indicator displays the current time in the bubble @default true */\n withCurrentTimeBubble?: boolean;\n\n /** A function to get the current time, called on every tick. Can be used to display the current time indicator in a different timezone. @default () => dayjs() */\n getCurrentTime?: () => AnyDateValue;\n\n /** If set, the header is displayed @default true */\n withHeader?: boolean;\n\n /** Called when view level select button is clicked */\n onViewChange?: (view: ScheduleViewLevel) => void;\n\n /** Props passed to previous control */\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to next control */\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to today control */\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to view level select */\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n\n /** Dayjs format for header label @default 'MMMM D, YYYY' */\n headerFormat?: DateLabelFormat;\n\n /** List of events to display */\n events?: ScheduleEventData[];\n\n /** Width of each time slot column @default 80px */\n slotWidth?: React.CSSProperties['width'];\n\n /** Height of each resource row @default 64px */\n rowHeight?: React.CSSProperties['height'];\n\n /** Labels override */\n labels?: ScheduleLabelsOverride;\n\n /** If set to true, highlights business hours with white background @default false */\n highlightBusinessHours?: boolean;\n\n /** Business hours range in `HH:mm:ss` format @default ['09:00:00', '17:00:00'] */\n businessHours?: [string, string];\n\n /** Function to customize event body */\n renderEventBody?: RenderEventBody;\n\n /** Function to fully customize event rendering */\n renderEvent?: RenderEvent;\n\n /** Function to customize resource label rendering */\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n\n /** List of resource groups to display as a column to the left of resource labels */\n groups?: ScheduleResourceGroup[];\n\n /** Function to customize group label rendering */\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n\n /** Width of the group label column @default 80px */\n groupLabelWidth?: React.CSSProperties['width'];\n\n /** If true, events can be dragged and dropped @default false */\n withEventsDragAndDrop?: boolean;\n\n /** Called when event is dropped at new time, includes target resourceId */\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n\n /** Function to determine if event can be dragged */\n canDragEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for moving events by drag and drop, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventDragInterval?: number;\n\n /** Called when any event drag starts */\n onEventDragStart?: (event: ScheduleEventData) => void;\n\n /** Called when any event drag ends */\n onEventDragEnd?: () => void;\n\n /** Called when time slot is clicked, includes resourceId */\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, background events (`display: 'background'`) can be clicked and trigger `onEventClick` @default false */\n withInteractiveBackgroundEvents?: boolean;\n\n /** If set, enables drag-to-select time slot ranges @default false */\n withDragSlotSelect?: boolean;\n\n /** Called when a time slot range is selected by dragging, includes resourceId */\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** Interaction mode @default default */\n mode?: ScheduleMode;\n\n /** Called when an external item is dropped onto the schedule */\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** If true, events can be resized by dragging their left/right edges @default false */\n withEventResize?: boolean;\n\n /** Called when event is resized */\n onEventResize?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => void;\n\n /** Function to determine if event can be resized */\n canResizeEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for resizing events, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventResizeInterval?: number;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n\n /** Maximum number of events visible per time slot before \"+more\" indicator shows, minimum value is 1 @default 2 */\n maxEventsPerTimeSlot?: number;\n\n /** Props passed down to `MoreEvents` component */\n moreEventsProps?: Partial<MoreEventsProps>;\n}\n\nexport type ResourcesDayViewFactory = Factory<{\n props: ResourcesDayViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesDayViewStylesNames;\n vars: ResourcesDayViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesDayView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withDragSlotSelect: false,\n withEventResize: false,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n withInteractiveBackgroundEvents: false,\n} satisfies Partial<ResourcesDayViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesDayViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-day-view-slot-width': rem(slotWidth),\n '--resources-day-view-row-height': rem(rowHeight),\n '--resources-day-view-group-label-width': rem(groupLabelWidth),\n },\n })\n);\n\nexport const ResourcesDayView = factory<ResourcesDayViewFactory>((_props) => {\n const props = useProps('ResourcesDayView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n attributes,\n vars,\n startTime,\n endTime,\n date,\n onDateChange,\n resources,\n intervalMinutes,\n minEventSize,\n slotLabelFormat,\n radius,\n startScrollTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble = true,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n headerFormat,\n events,\n slotWidth,\n rowHeight,\n labels,\n highlightBusinessHours,\n businessHours,\n renderEventBody,\n renderEvent,\n renderResourceLabel,\n groups,\n renderGroupLabel,\n groupLabelWidth,\n withEventsDragAndDrop,\n onEventDrop,\n canDragEvent,\n eventDragInterval,\n onEventDragStart,\n onEventDragEnd,\n onTimeSlotClick,\n onEventClick,\n withInteractiveBackgroundEvents,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n withEventResize,\n onEventResize,\n canResizeEvent,\n eventResizeInterval,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesDayViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'resourcesDayView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesDayViewFactory>({\n classNames,\n styles,\n props,\n });\n\n const stylesApiProps = {\n classNames: resolvedClassNames,\n styles: resolvedStyles,\n attributes,\n __staticSelector,\n radius,\n };\n\n const theme = useMantineTheme();\n const { dir } = useDirection();\n const [scrolled, setScrolled] = useState(false);\n const [scrolledX, setScrolledX] = useState(false);\n const ctx = useDatesContext();\n const slots = getDayTimeIntervals({ startTime, endTime, intervalMinutes });\n const { orderedResources, groupRanges, resourceGroupMap } = useMemo(\n () => getOrderedResources(resources, groups),\n [resources, groups]\n );\n const hasGroups = groupRanges.length > 0;\n\n type DropTargetSlot = { resourceId: string | number; slotIndex: number };\n\n const dragOffsetRef = useRef<{ offset: number; size: number }>({ offset: 0, size: 0 });\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotTime = slots[target.slotIndex].startTime;\n let dropDateTime: string = `${slotDate} ${slotTime}`;\n\n if (eventDragInterval != null) {\n const { start } = calculateDropTime({\n draggedEvent: { start: dropDateTime, end: dropDateTime } as ScheduleEventData,\n targetDate: slotDate,\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: dragOffsetRef.current.offset,\n slotSize: dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n dropDateTime = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n }\n\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, slots, date, eventDragInterval, intervalMinutes, startTime, endTime]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const getDropTimeForSlot = (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n const slotTime = slots[target.slotIndex].startTime;\n return calculateDropTime({\n draggedEvent,\n targetDate: dayjs(date).format('YYYY-MM-DD'),\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: eventDragInterval == null ? undefined : dragOffsetRef.current.offset,\n slotSize: eventDragInterval == null ? undefined : dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n };\n\n const handleInternalEventDrop = useCallback(\n (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => {\n onEventDrop?.({ ...data, resourceId: lastDropResourceId.current });\n },\n [onEventDrop]\n );\n\n const dragDrop = useDragDropHandlers<DropTargetSlot>({\n enabled: withEventsDragAndDrop,\n mode,\n onEventDrop: handleInternalEventDrop,\n canDragEvent,\n onEventDragStart,\n onEventDragEnd,\n calculateDropTarget: (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n lastDropResourceId.current = target.resourceId;\n return getDropTimeForSlot(target, draggedEvent);\n },\n onExternalDrop: onExternalEventDrop ? handleExternalDrop : undefined,\n });\n\n const updateDragPreview = (target: DropTargetSlot) => {\n const draggedEvent = dragDrop.dragContextValue.draggedEvent;\n if (eventDragInterval == null || !draggedEvent) {\n return;\n }\n const { start, end } = getDropTimeForSlot(target, draggedEvent);\n const newStart = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n if (\n dragDrop.dragPreview?.start !== newStart ||\n dragDrop.dragPreview?.target.resourceId !== target.resourceId\n ) {\n dragDrop.setDragPreview({\n start: newStart,\n end: dayjs(end).format('YYYY-MM-DD HH:mm:ss'),\n target,\n });\n }\n };\n\n const suppressDropHighlight = eventDragInterval != null && dragDrop.dragContextValue.isDragging;\n\n const groupToResourceId = useMemo(() => getGroupToResourceIdMap(resources), [resources]);\n\n const slotDragSelect = useSlotDragSelect({\n enabled: withDragSlotSelect && mode !== 'static',\n onDragEnd: (startIndex, endIndex, group) => {\n if (!onSlotDragEnd) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n onSlotDragEnd({\n rangeStart: `${slotDate} ${slots[startIndex].startTime}`,\n rangeEnd: `${slotDate} ${slots[endIndex].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\n },\n });\n\n const eventResize = useHorizontalEventResize({\n enabled: withEventResize,\n mode,\n startTime,\n endTime,\n intervalMinutes,\n resizeIntervalMinutes: eventResizeInterval,\n onEventResize,\n canResizeEvent,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n\n const slot = slots[slotIndex];\n onTimeSlotClick({\n slotStart: `${slotDate} ${slot.startTime}`,\n slotEnd: `${slotDate} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const dateStr = dayjs(date).format('YYYY-MM-DD');\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = dayjs(date).isSame(now, 'day');\n const withCurrentTimeIndicator = _withCurrentTimeIndicator ?? isToday;\n\n const mounted = useMounted();\n const [, setTimeIndicatorTick] = useState(0);\n useInterval(() => setTimeIndicatorTick((tick) => tick + 1), 60000, { autoInvoke: true });\n const timeIndicatorOffset = getCurrentTimePosition({ startTime, endTime, intervalMinutes, now });\n const showTimeIndicator =\n mounted &&\n withCurrentTimeIndicator &&\n isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\n\n const expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('day').toDate(),\n rangeEnd: dayjs(date).endOf('day').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, date, recurrenceExpansionLimit]\n );\n\n const resourceEvents = useMemo(\n () =>\n getResourcesDayViewEvents({\n date,\n events: expandedEvents,\n resources,\n startTime,\n endTime,\n intervalMinutes,\n }),\n [date, expandedEvents, resources, startTime, endTime, intervalMinutes]\n );\n\n const timeLabels = slots.map((interval) => {\n const intervalTime = dayjs(`${dateStr} ${interval.startTime}`);\n const label = formatDate({\n date: intervalTime,\n locale: ctx.getLocale(locale),\n format: slotLabelFormat,\n });\n\n return (\n <Box\n {...getStyles('resourcesDayViewTimeLabel')}\n key={interval.startTime}\n mod={{\n 'hour-start': interval.isHourStart,\n ...getBusinessHoursMod({\n time: interval.startTime,\n businessHours,\n highlightBusinessHours,\n }),\n }}\n >\n {label}\n </Box>\n );\n });\n\n const slotsRef: ResourcesGridControlsRef = useRef<HTMLButtonElement[][]>([]);\n const rowSlotsContainersRef = useRef<(HTMLDivElement | null)[]>([]);\n const viewportRef = useRef<HTMLDivElement>(null);\n const mergedViewportRef = useMergedRef(viewportRef, scrollAreaProps?.viewportRef);\n\n const firstSlotIndex = { resourceIndex: 0, slotIndex: 0 };\n\n useIsomorphicEffect(() => {\n if (!startScrollTime || !viewportRef.current) {\n return;\n }\n\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n\n const targetIndex = slots.findIndex((s) => s.startTime >= startScrollTime);\n if (targetIndex < 0) {\n return;\n }\n\n const targetSlot = firstResourceSlots[targetIndex];\n if (!targetSlot) {\n return;\n }\n\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesDayViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left - labelWidth,\n top: 0,\n });\n }, []);\n\n const getSlotIndexFromDragPoint = useCallback(\n (event: React.DragEvent, resourceIndex: number) => {\n const daySlots = slotsRef.current[resourceIndex] ?? [];\n const index = getIndexFromDragPoint(daySlots, event.clientX);\n if (index !== null) {\n const rect = daySlots[index]?.getBoundingClientRect();\n if (rect) {\n const rawOffset = dir === 'rtl' ? rect.right - event.clientX : event.clientX - rect.left;\n dragOffsetRef.current = {\n offset: Math.max(0, Math.min(rect.width, rawOffset)),\n size: rect.width,\n };\n }\n }\n return index;\n },\n [dir]\n );\n\n const handleSlotKeyDown = (\n event: React.KeyboardEvent<HTMLButtonElement>,\n resourceIndex: number,\n slotIndex: number\n ) => {\n handleResourcesGridKeyDown({\n controlsRef: slotsRef,\n resourceIndex,\n slotIndex,\n event,\n });\n };\n\n const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== 'static';\n\n const rows = orderedResources.map((resource, resourceIndex) => {\n const allBgEvents = [\n ...(resourceEvents.backgroundTimedEvents[resource.id] || []),\n ...(resourceEvents.backgroundAllDayEvents[resource.id] || []),\n ];\n\n const backgroundEventNodes = allBgEvents.map((event) => (\n <ScheduleBackgroundEvent\n key={`bg-${event.id}`}\n event={event}\n renderEvent={renderEvent}\n renderEventBody={renderEventBody}\n interactive={interactiveBackgroundEvents}\n onEventClick={onEventClick}\n {...getStyles('resourcesDayViewBackgroundEvent', {\n style: {\n left: `${event.position.top}%`,\n width: `${event.position.height}%`,\n top: 0,\n height: '100%',\n },\n })}\n />\n ));\n\n const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date })\n );\n\n const visibleRegularEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n const regularEvents = visibleRegularEvents.map((event) => {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const eventLeft = resizePosition ? resizePosition.left : event.position.top;\n const eventWidth = resizePosition ? resizePosition.width : event.position.height;\n\n const adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventColors = isResizable\n ? theme.variantColorResolver({\n color: event.color || theme.primaryColor,\n theme,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n : null;\n\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n return (\n <Box\n key={event.id}\n {...getStyles('resourcesDayViewEventWrapper')}\n __vars={eventColors ? { '--event-color': eventColors.color } : undefined}\n data-resizing={isThisEventResizing || undefined}\n style={{\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n minSize: minEventSize,\n }),\n top: adjustPosition\n ? `calc((100% - 22px) * ${event.position.column} / ${maxEventsPerTimeSlot})`\n : `${event.position.offset}%`,\n height: adjustPosition\n ? `calc((100% - 22px) / ${maxEventsPerTimeSlot})`\n : `${event.position.width}%`,\n }}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n draggable={isDraggable}\n isResizing={isThisEventResizing}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={\n onEventClick\n ? (e) => {\n if (!eventResize.wasResizing()) {\n onEventClick(event, e);\n }\n }\n : undefined\n }\n style={{ width: '100%', height: '100%', padding: 0 }}\n />\n {isResizable && mode !== 'static' && (\n <>\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"start\"\n data-active={activeEdge === 'start' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'start',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"end\"\n data-active={activeEdge === 'end' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n });\n\n const allDayEvents = resourceEvents.allDayEvents[resource.id] || [];\n\n const allDayEventNodes = allDayEvents.map((event, index) => (\n <Box\n key={`all-day-${event.id}`}\n {...getStyles('resourcesDayViewAllDayEvent', {\n style: {\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(event, e) : undefined}\n style={{ width: '100%', height: '100%' }}\n />\n </Box>\n ));\n\n const moreEventsForResource =\n maxEventsPerTimeSlot !== undefined\n ? getOverlapClusters(allRegularEvents)\n .filter((cluster) => cluster.some((e) => e.position.column >= maxEventsPerTimeSlot))\n .map((cluster) => {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n const leftPercent = Math.min(...cluster.map((e) => e.position.top));\n const rightPercent = Math.max(\n ...cluster.map((e) => e.position.top + e.position.height)\n );\n\n return (\n <MoreEvents\n key={`more-${cluster[0].id}`}\n events={cluster}\n moreEventsCount={hiddenCount}\n mode={mode}\n labels={labels}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n onEventClick={onEventClick}\n style={{\n position: 'absolute',\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${rightPercent - leftPercent}% - 2px)`,\n bottom: 0,\n height: '22px',\n paddingInline: 4,\n zIndex: 4,\n }}\n {...stylesApiProps}\n {...moreEventsProps}\n />\n );\n })\n : [];\n\n return (\n <ResourcesDayViewRow\n key={resource.id}\n resource={resource}\n resourceIndex={resourceIndex}\n date={dateStr}\n slots={slots}\n getStyles={getStyles}\n labels={labels}\n highlightBusinessHours={highlightBusinessHours}\n businessHours={businessHours}\n withEventsDragAndDrop={withDragHandlers}\n mode={mode}\n slotsRef={slotsRef}\n firstSlotIndex={firstSlotIndex}\n onSlotKeyDown={handleSlotKeyDown}\n onSlotClick={handleTimeSlotClick}\n onRowSlotsDragOver={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDragOver(event, { resourceId, slotIndex });\n updateDragPreview({ resourceId, slotIndex });\n }\n }}\n onRowSlotsDragLeave={dragDrop.handleDragLeave}\n onRowSlotsDrop={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDrop(event, { resourceId, slotIndex });\n }\n }}\n dropTargetSlotIndex={\n !suppressDropHighlight && dragDrop.dropTarget?.resourceId === resource.id\n ? dragDrop.dropTarget.slotIndex\n : undefined\n }\n withDragSlotSelect={withDragSlotSelect}\n onSlotPointerDown={slotDragSelect.handleSlotPointerDown}\n isSlotDragSelected={slotDragSelect.isSlotSelected}\n rowSlotsContainerRef={(node) => {\n rowSlotsContainersRef.current[resourceIndex] = node;\n }}\n renderResourceLabel={renderResourceLabel}\n renderGroupLabel={renderGroupLabel}\n scrolledX={scrolledX}\n groupInfo={hasGroups ? resourceGroupMap[resourceIndex] : undefined}\n allDayCount={allDayEvents.length}\n >\n {backgroundEventNodes}\n {allDayEventNodes}\n {regularEvents}\n {moreEventsForResource}\n {dragDrop.dragPreview?.target.resourceId === resource.id &&\n dragDrop.dragContextValue.draggedEvent && (\n <Box\n {...getStyles('resourcesDayViewDragPreview', {\n style: (() => {\n const { top, height } = getDayPosition({\n event: {\n ...dragDrop.dragContextValue.draggedEvent,\n start: dragDrop.dragPreview.start,\n end: dragDrop.dragPreview.end,\n },\n startTime,\n endTime,\n intervalMinutes,\n });\n return {\n position: 'absolute',\n insetBlockStart: 0,\n insetBlockEnd: 0,\n ...getTimeAxisEventStyle({ start: top, span: height, axis: 'horizontal' }),\n };\n })(),\n })}\n />\n )}\n </ResourcesDayViewRow>\n );\n });\n\n const headerLabel = formatDate({\n date: dayjs(date),\n locale: ctx.getLocale(locale),\n format: headerFormat,\n });\n\n const content = (\n <Box\n {...getStyles('resourcesDayView')}\n mod={{\n static: mode === 'static',\n 'slot-dragging': slotDragSelect.isDragging,\n resizing: eventResize.isResizing,\n 'event-interaction': eventResize.isResizing || dragDrop.dragContextValue.isDragging,\n }}\n {...others}\n >\n {withHeader && (\n <ScheduleHeaderBase\n view=\"day\"\n navigationHandlers={{\n previous: () => toDateString(dayjs(date).subtract(1, 'day')),\n next: () => toDateString(dayjs(date).add(1, 'day')),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 140,\n title: headerLabel,\n }}\n labels={labels}\n onDateChange={onDateChange}\n onViewChange={onViewChange}\n previousControlProps={previousControlProps}\n nextControlProps={nextControlProps}\n todayControlProps={todayControlProps}\n viewSelectProps={{ views: ['day', 'week', 'month'] as const, ...viewSelectProps }}\n stylesApiProps={stylesApiProps}\n />\n )}\n\n <Box {...getStyles('resourcesDayViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesDayViewScrollArea', {\n className: scrollAreaProps?.className,\n style: scrollAreaProps?.style,\n })}\n onScrollPositionChange={(position) => {\n scrollAreaProps?.onScrollPositionChange?.(position);\n setScrolled(position.y !== 0);\n setScrolledX(position.x !== 0);\n }}\n viewportRef={mergedViewportRef}\n >\n <div {...getStyles('resourcesDayViewInner')}>\n <Box {...getStyles('resourcesDayViewTimeLabelsRow')} mod={{ scrolled }}>\n <div\n {...getStyles('resourcesDayViewCorner')}\n key=\"corner\"\n style={\n 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 >\n {getLabel('resources', labels)}\n </div>\n {timeLabels}\n </Box>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesDayViewCurrentTimeIndicator')}\n __vars={{\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)) * ${timeIndicatorOffset} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${timeIndicatorOffset} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorLine')} />\n </Box>\n )}\n </div>\n </ScrollArea>\n </Box>\n </Box>\n );\n\n const dragContextValue = useMemo<DragContextValue>(\n () => dragDrop.dragContextValue,\n [dragDrop.dragContextValue]\n );\n\n if (withEventsDragAndDrop) {\n return <DragContext.Provider value={dragContextValue}>{content}</DragContext.Provider>;\n }\n\n return content;\n});\n\nResourcesDayView.displayName = '@mantine/schedule/ResourcesDayView';\nResourcesDayView.classes = classes;\nResourcesDayView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6SA,MAAM,eAAe;CACnB,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,cAAc;CACd,wBAAwB;CACxB,eAAe,CAAC,YAAY,UAAU;CACtC,uBAAuB;CACvB,oBAAoB;CACpB,iBAAiB;CACjB,MAAM;CACN,sBAAsB;CACtB,iCAAiC;AACnC;AAEA,MAAM,gBAAA,GAAeA,cAAAA,mBAAAA,EAClB,QAAQ,EAAE,QAAQ,WAAW,WAAW,uBAAuB,EAC9D,kBAAkB;CAChB,+BAA+B,UAAA,GAASC,cAAAA,UAAAA,CAAU,MAAM,IAAI,KAAA;CAC5D,oCAAA,GAAmCC,cAAAA,IAAAA,CAAI,SAAS;CAChD,oCAAA,GAAmCA,cAAAA,IAAAA,CAAI,SAAS;CAChD,2CAAA,GAA0CA,cAAAA,IAAAA,CAAI,eAAe;AAC/D,EACF,EACF;AAEA,MAAa,oBAAA,GAAmBC,cAAAA,QAAAA,EAAkC,WAAW;CAC3E,MAAM,SAAA,GAAQC,cAAAA,SAAAA,CAAS,oBAAoB,cAAc,MAAM;CAC/D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,YACA,MACA,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,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,0CAA0C,EAAI,CAAA;OAC9D;;KAEJ;;GACK,CAAA;EACT,CAAA,CACF;;CAGP,MAAM,oBAAA,GAAmBf,MAAAA,QAAAA,OACjB,SAAS,kBACf,CAAC,SAAS,gBAAgB,CAC5B;CAEA,IAAI,uBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACgC,oBAAAA,YAAY,UAAb;EAAsB,OAAO;EAAmB,UAAA;CAA8B,CAAA;CAGvF,OAAO;AACT,CAAC;AAED,iBAAiB,cAAc;AAC/B,iBAAiB,UAAUd,gCAAAA;AAC3B,iBAAiB,eAAe"}
|
|
1
|
+
{"version":3,"file":"ResourcesDayView.cjs","names":["createVarsResolver","getRadius","rem","factory","useProps","useStyles","useResolvedStylesApi","useMantineTheme","useDirection","useState","useDatesContext","getDayTimeIntervals","useMemo","getOrderedResources","useRef","useCallback","calculateDropTime","useDragDropHandlers","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","useMounted","getCurrentTimePosition","isInTimeRange","formatDate","expandRecurringEvents","getResourcesDayViewEvents","Box","getBusinessHoursMod","useMergedRef","classes","getIndexFromDragPoint","ScheduleBackgroundEvent","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesDayViewRow","getDayPosition","ScheduleHeaderBase","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineRadius,\n rem,\n ScrollArea,\n ScrollAreaProps,\n StylesApiProps,\n useDirection,\n useMantineTheme,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useInterval, useIsomorphicEffect, useMergedRef, useMounted } from '@mantine/hooks';\nimport { useDragDropHandlers } from '../../hooks/use-drag-drop-handlers';\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize';\nimport { useSlotDragSelect } from '../../hooks/use-slot-drag-select';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n DayPositionedEventData,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types';\nimport {\n calculateDropTime,\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getDayPosition,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getIndexFromDragPoint,\n getOrderedResources,\n getOverlapClusters,\n getTimeAxisEventStyle,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n ResourcesGridControlsRef,\n toDateString,\n} from '../../utils';\nimport { DragContext, DragContextValue } from '../DragContext/DragContext';\nimport { MoreEvents, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents';\nimport { ScheduleBackgroundEvent } from '../ScheduleBackgroundEvent';\nimport { RenderEvent, RenderEventBody, ScheduleEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader';\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase';\nimport { ViewSelectProps } from '../ScheduleHeader/ViewSelect/ViewSelect';\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events';\nimport { ResourcesDayViewRow } from './ResourcesDayViewColumn';\nimport classes from './ResourcesDayView.module.css';\n\nexport type ResourcesDayViewStylesNames =\n | 'resourcesDayView'\n | 'resourcesDayViewRoot'\n | 'resourcesDayViewInner'\n | 'resourcesDayViewTimeLabelsRow'\n | 'resourcesDayViewScrollArea'\n | 'resourcesDayViewCorner'\n | 'resourcesDayViewTimeLabel'\n | 'resourcesDayViewResourceLabel'\n | 'resourcesDayViewRow'\n | 'resourcesDayViewRowSlot'\n | 'resourcesDayViewRowSlots'\n | 'resourcesDayViewBackgroundEvent'\n | 'resourcesDayViewAllDayEvent'\n | 'resourcesDayViewCurrentTimeIndicator'\n | 'resourcesDayViewCurrentTimeIndicatorLine'\n | 'resourcesDayViewCurrentTimeIndicatorThumb'\n | 'resourcesDayViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesDayViewEventWrapper'\n | 'resourcesDayViewDragPreview'\n | 'resourcesDayViewResizeHandle'\n | 'resourcesDayViewGroupColumn'\n | 'resourcesDayViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesDayViewCssVariables = {\n resourcesDayView:\n | '--resources-day-view-radius'\n | '--resources-day-view-slot-width'\n | '--resources-day-view-row-height'\n | '--resources-day-view-group-label-width';\n};\n\nexport interface ResourcesDayViewProps\n extends BoxProps, StylesApiProps<ResourcesDayViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Day to display, Date object or date string in `YYYY-MM-DD` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** List of resources to display as rows */\n resources: ScheduleResourceData[];\n\n /** Start time for the day view, in `HH:mm:ss` format @default 00:00:00 */\n startTime?: string;\n\n /** End time for the day view, in `HH:mm:ss` format @default 23:59:59 */\n endTime?: string;\n\n /** Number of minutes for each interval in the day view. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours (e.g. `120`, `240`) @default 60 */\n intervalMinutes?: number;\n\n /** Minimum on-screen size of an event along the time axis, in px. Prevents very short events from collapsing. Larger values make brief events easier to see but extend them past their real start time. @default 1 */\n minEventSize?: number;\n\n /** Dayjs format for slot labels or a callback function that returns formatted value @default HH:mm */\n slotLabelFormat?: DateLabelFormat;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Time to scroll to on initial render, in `HH:mm:ss` format */\n startScrollTime?: string;\n\n /** Props passed down to the `ScrollArea` component */\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** If set, displays a vertical line indicating the current time. By default, displayed only for the current day. */\n withCurrentTimeIndicator?: boolean;\n\n /** If set, the time indicator displays the current time in the bubble @default true */\n withCurrentTimeBubble?: boolean;\n\n /** A function to get the current time, called on every tick. Can be used to display the current time indicator in a different timezone. @default () => dayjs() */\n getCurrentTime?: () => AnyDateValue;\n\n /** If set, the header is displayed @default true */\n withHeader?: boolean;\n\n /** Called when view level select button is clicked */\n onViewChange?: (view: ScheduleViewLevel) => void;\n\n /** Props passed to previous control */\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to next control */\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to today control */\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to view level select */\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n\n /** Dayjs format for header label @default 'MMMM D, YYYY' */\n headerFormat?: DateLabelFormat;\n\n /** List of events to display */\n events?: ScheduleEventData[];\n\n /** Width of each time slot column @default 80px */\n slotWidth?: React.CSSProperties['width'];\n\n /** Height of each resource row @default 64px */\n rowHeight?: React.CSSProperties['height'];\n\n /** Labels override */\n labels?: ScheduleLabelsOverride;\n\n /** If set to true, highlights business hours with white background @default false */\n highlightBusinessHours?: boolean;\n\n /** Business hours range in `HH:mm:ss` format @default ['09:00:00', '17:00:00'] */\n businessHours?: [string, string];\n\n /** Function to customize event body */\n renderEventBody?: RenderEventBody;\n\n /** Function to fully customize event rendering */\n renderEvent?: RenderEvent;\n\n /** Function to customize resource label rendering */\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n\n /** List of resource groups to display as a column to the left of resource labels */\n groups?: ScheduleResourceGroup[];\n\n /** Function to customize group label rendering */\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n\n /** Width of the group label column @default 80px */\n groupLabelWidth?: React.CSSProperties['width'];\n\n /** If true, events can be dragged and dropped @default false */\n withEventsDragAndDrop?: boolean;\n\n /** Called when event is dropped at new time, includes target resourceId */\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n\n /** Function to determine if event can be dragged */\n canDragEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for moving events by drag and drop, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventDragInterval?: number;\n\n /** Called when any event drag starts */\n onEventDragStart?: (event: ScheduleEventData) => void;\n\n /** Called when any event drag ends */\n onEventDragEnd?: () => void;\n\n /** Called when time slot is clicked, includes resourceId */\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, background events (`display: 'background'`) can be clicked and trigger `onEventClick`. Combined with `withEventResize`, timed background events can also be resized by dragging their edges. @default false */\n withInteractiveBackgroundEvents?: boolean;\n\n /** If set, enables drag-to-select time slot ranges @default false */\n withDragSlotSelect?: boolean;\n\n /** Called when a time slot range is selected by dragging, includes resourceId */\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** Interaction mode @default default */\n mode?: ScheduleMode;\n\n /** Called when an external item is dropped onto the schedule */\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** If true, events can be resized by dragging their left/right edges @default false */\n withEventResize?: boolean;\n\n /** Called when event is resized */\n onEventResize?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => void;\n\n /** Function to determine if event can be resized */\n canResizeEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for resizing events, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventResizeInterval?: number;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n\n /** Maximum number of events visible per time slot before \"+more\" indicator shows, minimum value is 1 @default 2 */\n maxEventsPerTimeSlot?: number;\n\n /** Props passed down to `MoreEvents` component */\n moreEventsProps?: Partial<MoreEventsProps>;\n}\n\nexport type ResourcesDayViewFactory = Factory<{\n props: ResourcesDayViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesDayViewStylesNames;\n vars: ResourcesDayViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesDayView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withDragSlotSelect: false,\n withEventResize: false,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n withInteractiveBackgroundEvents: false,\n} satisfies Partial<ResourcesDayViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesDayViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-day-view-slot-width': rem(slotWidth),\n '--resources-day-view-row-height': rem(rowHeight),\n '--resources-day-view-group-label-width': rem(groupLabelWidth),\n },\n })\n);\n\nexport const ResourcesDayView = factory<ResourcesDayViewFactory>((_props) => {\n const props = useProps('ResourcesDayView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n attributes,\n vars,\n startTime,\n endTime,\n date,\n onDateChange,\n resources,\n intervalMinutes,\n minEventSize,\n slotLabelFormat,\n radius,\n startScrollTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble = true,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n headerFormat,\n events,\n slotWidth,\n rowHeight,\n labels,\n highlightBusinessHours,\n businessHours,\n renderEventBody,\n renderEvent,\n renderResourceLabel,\n groups,\n renderGroupLabel,\n groupLabelWidth,\n withEventsDragAndDrop,\n onEventDrop,\n canDragEvent,\n eventDragInterval,\n onEventDragStart,\n onEventDragEnd,\n onTimeSlotClick,\n onEventClick,\n withInteractiveBackgroundEvents,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n withEventResize,\n onEventResize,\n canResizeEvent,\n eventResizeInterval,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesDayViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'resourcesDayView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesDayViewFactory>({\n classNames,\n styles,\n props,\n });\n\n const stylesApiProps = {\n classNames: resolvedClassNames,\n styles: resolvedStyles,\n attributes,\n __staticSelector,\n radius,\n };\n\n const theme = useMantineTheme();\n const { dir } = useDirection();\n const [scrolled, setScrolled] = useState(false);\n const [scrolledX, setScrolledX] = useState(false);\n const ctx = useDatesContext();\n const slots = getDayTimeIntervals({ startTime, endTime, intervalMinutes });\n const { orderedResources, groupRanges, resourceGroupMap } = useMemo(\n () => getOrderedResources(resources, groups),\n [resources, groups]\n );\n const hasGroups = groupRanges.length > 0;\n\n type DropTargetSlot = { resourceId: string | number; slotIndex: number };\n\n const dragOffsetRef = useRef<{ offset: number; size: number }>({ offset: 0, size: 0 });\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotTime = slots[target.slotIndex].startTime;\n let dropDateTime: string = `${slotDate} ${slotTime}`;\n\n if (eventDragInterval != null) {\n const { start } = calculateDropTime({\n draggedEvent: { start: dropDateTime, end: dropDateTime } as ScheduleEventData,\n targetDate: slotDate,\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: dragOffsetRef.current.offset,\n slotSize: dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n dropDateTime = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n }\n\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, slots, date, eventDragInterval, intervalMinutes, startTime, endTime]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const getDropTimeForSlot = (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n const slotTime = slots[target.slotIndex].startTime;\n return calculateDropTime({\n draggedEvent,\n targetDate: dayjs(date).format('YYYY-MM-DD'),\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: eventDragInterval == null ? undefined : dragOffsetRef.current.offset,\n slotSize: eventDragInterval == null ? undefined : dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n };\n\n const handleInternalEventDrop = useCallback(\n (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => {\n onEventDrop?.({ ...data, resourceId: lastDropResourceId.current });\n },\n [onEventDrop]\n );\n\n const dragDrop = useDragDropHandlers<DropTargetSlot>({\n enabled: withEventsDragAndDrop,\n mode,\n onEventDrop: handleInternalEventDrop,\n canDragEvent,\n onEventDragStart,\n onEventDragEnd,\n calculateDropTarget: (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n lastDropResourceId.current = target.resourceId;\n return getDropTimeForSlot(target, draggedEvent);\n },\n onExternalDrop: onExternalEventDrop ? handleExternalDrop : undefined,\n });\n\n const updateDragPreview = (target: DropTargetSlot) => {\n const draggedEvent = dragDrop.dragContextValue.draggedEvent;\n if (eventDragInterval == null || !draggedEvent) {\n return;\n }\n const { start, end } = getDropTimeForSlot(target, draggedEvent);\n const newStart = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n if (\n dragDrop.dragPreview?.start !== newStart ||\n dragDrop.dragPreview?.target.resourceId !== target.resourceId\n ) {\n dragDrop.setDragPreview({\n start: newStart,\n end: dayjs(end).format('YYYY-MM-DD HH:mm:ss'),\n target,\n });\n }\n };\n\n const suppressDropHighlight = eventDragInterval != null && dragDrop.dragContextValue.isDragging;\n\n const groupToResourceId = useMemo(() => getGroupToResourceIdMap(resources), [resources]);\n\n const slotDragSelect = useSlotDragSelect({\n enabled: withDragSlotSelect && mode !== 'static',\n onDragEnd: (startIndex, endIndex, group) => {\n if (!onSlotDragEnd) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n onSlotDragEnd({\n rangeStart: `${slotDate} ${slots[startIndex].startTime}`,\n rangeEnd: `${slotDate} ${slots[endIndex].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\n },\n });\n\n const eventResize = useHorizontalEventResize({\n enabled: withEventResize,\n mode,\n startTime,\n endTime,\n intervalMinutes,\n resizeIntervalMinutes: eventResizeInterval,\n onEventResize,\n canResizeEvent,\n withBackgroundEvents: withInteractiveBackgroundEvents,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n\n const slot = slots[slotIndex];\n onTimeSlotClick({\n slotStart: `${slotDate} ${slot.startTime}`,\n slotEnd: `${slotDate} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const dateStr = dayjs(date).format('YYYY-MM-DD');\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = dayjs(date).isSame(now, 'day');\n const withCurrentTimeIndicator = _withCurrentTimeIndicator ?? isToday;\n\n const mounted = useMounted();\n const [, setTimeIndicatorTick] = useState(0);\n useInterval(() => setTimeIndicatorTick((tick) => tick + 1), 60000, { autoInvoke: true });\n const timeIndicatorOffset = getCurrentTimePosition({ startTime, endTime, intervalMinutes, now });\n const showTimeIndicator =\n mounted &&\n withCurrentTimeIndicator &&\n isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\n\n const expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('day').toDate(),\n rangeEnd: dayjs(date).endOf('day').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, date, recurrenceExpansionLimit]\n );\n\n const resourceEvents = useMemo(\n () =>\n getResourcesDayViewEvents({\n date,\n events: expandedEvents,\n resources,\n startTime,\n endTime,\n intervalMinutes,\n }),\n [date, expandedEvents, resources, startTime, endTime, intervalMinutes]\n );\n\n const timeLabels = slots.map((interval) => {\n const intervalTime = dayjs(`${dateStr} ${interval.startTime}`);\n const label = formatDate({\n date: intervalTime,\n locale: ctx.getLocale(locale),\n format: slotLabelFormat,\n });\n\n return (\n <Box\n {...getStyles('resourcesDayViewTimeLabel')}\n key={interval.startTime}\n mod={{\n 'hour-start': interval.isHourStart,\n ...getBusinessHoursMod({\n time: interval.startTime,\n businessHours,\n highlightBusinessHours,\n }),\n }}\n >\n {label}\n </Box>\n );\n });\n\n const slotsRef: ResourcesGridControlsRef = useRef<HTMLButtonElement[][]>([]);\n const rowSlotsContainersRef = useRef<(HTMLDivElement | null)[]>([]);\n const viewportRef = useRef<HTMLDivElement>(null);\n const mergedViewportRef = useMergedRef(viewportRef, scrollAreaProps?.viewportRef);\n\n const firstSlotIndex = { resourceIndex: 0, slotIndex: 0 };\n\n useIsomorphicEffect(() => {\n if (!startScrollTime || !viewportRef.current) {\n return;\n }\n\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n\n const targetIndex = slots.findIndex((s) => s.startTime >= startScrollTime);\n if (targetIndex < 0) {\n return;\n }\n\n const targetSlot = firstResourceSlots[targetIndex];\n if (!targetSlot) {\n return;\n }\n\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesDayViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left - labelWidth,\n top: 0,\n });\n }, []);\n\n const getSlotIndexFromDragPoint = useCallback(\n (event: React.DragEvent, resourceIndex: number) => {\n const daySlots = slotsRef.current[resourceIndex] ?? [];\n const index = getIndexFromDragPoint(daySlots, event.clientX);\n if (index !== null) {\n const rect = daySlots[index]?.getBoundingClientRect();\n if (rect) {\n const rawOffset = dir === 'rtl' ? rect.right - event.clientX : event.clientX - rect.left;\n dragOffsetRef.current = {\n offset: Math.max(0, Math.min(rect.width, rawOffset)),\n size: rect.width,\n };\n }\n }\n return index;\n },\n [dir]\n );\n\n const handleSlotKeyDown = (\n event: React.KeyboardEvent<HTMLButtonElement>,\n resourceIndex: number,\n slotIndex: number\n ) => {\n handleResourcesGridKeyDown({\n controlsRef: slotsRef,\n resourceIndex,\n slotIndex,\n event,\n });\n };\n\n const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== 'static';\n\n const rows = orderedResources.map((resource, resourceIndex) => {\n const renderBackgroundEvent = (event: DayPositionedEventData, allDay: boolean) => {\n const isResizable = !allDay && eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n\n return (\n <ScheduleBackgroundEvent<'start' | 'end'>\n key={`bg-${event.id}`}\n event={event}\n renderEvent={renderEvent}\n renderEventBody={renderEventBody}\n interactive={interactiveBackgroundEvents}\n onEventClick={\n onEventClick\n ? (clickedEvent, e) => {\n if (!eventResize.wasResizing()) {\n onEventClick(clickedEvent, e);\n }\n }\n : undefined\n }\n withResize={isResizable}\n isResizing={resizePosition !== null}\n activeResizeEdge={eventResize.resizingEdge}\n resizeAxis=\"horizontal\"\n resizeHandleProps={getStyles('resourcesDayViewResizeHandle')}\n onResizeStart={\n isResizable\n ? (edge, e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge,\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }\n : undefined\n }\n {...getStyles('resourcesDayViewBackgroundEvent', {\n style: {\n left: `${resizePosition ? resizePosition.left : event.position.top}%`,\n width: `${resizePosition ? resizePosition.width : event.position.height}%`,\n top: 0,\n height: '100%',\n },\n })}\n />\n );\n };\n\n const backgroundEventNodes = [\n ...(resourceEvents.backgroundTimedEvents[resource.id] || []).map((event) =>\n renderBackgroundEvent(event, false)\n ),\n ...(resourceEvents.backgroundAllDayEvents[resource.id] || []).map((event) =>\n renderBackgroundEvent(event, true)\n ),\n ];\n\n const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date })\n );\n\n const visibleRegularEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n const regularEvents = visibleRegularEvents.map((event) => {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const eventLeft = resizePosition ? resizePosition.left : event.position.top;\n const eventWidth = resizePosition ? resizePosition.width : event.position.height;\n\n const adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventColors = isResizable\n ? theme.variantColorResolver({\n color: event.color || theme.primaryColor,\n theme,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n : null;\n\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n return (\n <Box\n key={event.id}\n {...getStyles('resourcesDayViewEventWrapper')}\n __vars={eventColors ? { '--event-color': eventColors.color } : undefined}\n data-resizing={isThisEventResizing || undefined}\n style={{\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n minSize: minEventSize,\n }),\n top: adjustPosition\n ? `calc((100% - 22px) * ${event.position.column} / ${maxEventsPerTimeSlot})`\n : `${event.position.offset}%`,\n height: adjustPosition\n ? `calc((100% - 22px) / ${maxEventsPerTimeSlot})`\n : `${event.position.width}%`,\n }}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n draggable={isDraggable}\n isResizing={isThisEventResizing}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={\n onEventClick\n ? (e) => {\n if (!eventResize.wasResizing()) {\n onEventClick(event, e);\n }\n }\n : undefined\n }\n style={{ width: '100%', height: '100%', padding: 0 }}\n />\n {isResizable && mode !== 'static' && (\n <>\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"start\"\n data-active={activeEdge === 'start' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'start',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"end\"\n data-active={activeEdge === 'end' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n });\n\n const allDayEvents = resourceEvents.allDayEvents[resource.id] || [];\n\n const allDayEventNodes = allDayEvents.map((event, index) => (\n <Box\n key={`all-day-${event.id}`}\n {...getStyles('resourcesDayViewAllDayEvent', {\n style: {\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(event, e) : undefined}\n style={{ width: '100%', height: '100%' }}\n />\n </Box>\n ));\n\n const moreEventsForResource =\n maxEventsPerTimeSlot !== undefined\n ? getOverlapClusters(allRegularEvents)\n .filter((cluster) => cluster.some((e) => e.position.column >= maxEventsPerTimeSlot))\n .map((cluster) => {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n const leftPercent = Math.min(...cluster.map((e) => e.position.top));\n const rightPercent = Math.max(\n ...cluster.map((e) => e.position.top + e.position.height)\n );\n\n return (\n <MoreEvents\n key={`more-${cluster[0].id}`}\n events={cluster}\n moreEventsCount={hiddenCount}\n mode={mode}\n labels={labels}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n onEventClick={onEventClick}\n style={{\n position: 'absolute',\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${rightPercent - leftPercent}% - 2px)`,\n bottom: 0,\n height: '22px',\n paddingInline: 4,\n zIndex: 4,\n }}\n {...stylesApiProps}\n {...moreEventsProps}\n />\n );\n })\n : [];\n\n return (\n <ResourcesDayViewRow\n key={resource.id}\n resource={resource}\n resourceIndex={resourceIndex}\n date={dateStr}\n slots={slots}\n getStyles={getStyles}\n labels={labels}\n highlightBusinessHours={highlightBusinessHours}\n businessHours={businessHours}\n withEventsDragAndDrop={withDragHandlers}\n mode={mode}\n slotsRef={slotsRef}\n firstSlotIndex={firstSlotIndex}\n onSlotKeyDown={handleSlotKeyDown}\n onSlotClick={handleTimeSlotClick}\n onRowSlotsDragOver={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDragOver(event, { resourceId, slotIndex });\n updateDragPreview({ resourceId, slotIndex });\n }\n }}\n onRowSlotsDragLeave={dragDrop.handleDragLeave}\n onRowSlotsDrop={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDrop(event, { resourceId, slotIndex });\n }\n }}\n dropTargetSlotIndex={\n !suppressDropHighlight && dragDrop.dropTarget?.resourceId === resource.id\n ? dragDrop.dropTarget.slotIndex\n : undefined\n }\n withDragSlotSelect={withDragSlotSelect}\n onSlotPointerDown={slotDragSelect.handleSlotPointerDown}\n isSlotDragSelected={slotDragSelect.isSlotSelected}\n rowSlotsContainerRef={(node) => {\n rowSlotsContainersRef.current[resourceIndex] = node;\n }}\n renderResourceLabel={renderResourceLabel}\n renderGroupLabel={renderGroupLabel}\n scrolledX={scrolledX}\n groupInfo={hasGroups ? resourceGroupMap[resourceIndex] : undefined}\n allDayCount={allDayEvents.length}\n >\n {backgroundEventNodes}\n {allDayEventNodes}\n {regularEvents}\n {moreEventsForResource}\n {dragDrop.dragPreview?.target.resourceId === resource.id &&\n dragDrop.dragContextValue.draggedEvent && (\n <Box\n {...getStyles('resourcesDayViewDragPreview', {\n style: (() => {\n const { top, height } = getDayPosition({\n event: {\n ...dragDrop.dragContextValue.draggedEvent,\n start: dragDrop.dragPreview.start,\n end: dragDrop.dragPreview.end,\n },\n startTime,\n endTime,\n intervalMinutes,\n });\n return {\n position: 'absolute',\n insetBlockStart: 0,\n insetBlockEnd: 0,\n ...getTimeAxisEventStyle({ start: top, span: height, axis: 'horizontal' }),\n };\n })(),\n })}\n />\n )}\n </ResourcesDayViewRow>\n );\n });\n\n const headerLabel = formatDate({\n date: dayjs(date),\n locale: ctx.getLocale(locale),\n format: headerFormat,\n });\n\n const content = (\n <Box\n {...getStyles('resourcesDayView')}\n mod={{\n static: mode === 'static',\n 'slot-dragging': slotDragSelect.isDragging,\n resizing: eventResize.isResizing,\n 'event-interaction': eventResize.isResizing || dragDrop.dragContextValue.isDragging,\n }}\n {...others}\n >\n {withHeader && (\n <ScheduleHeaderBase\n view=\"day\"\n navigationHandlers={{\n previous: () => toDateString(dayjs(date).subtract(1, 'day')),\n next: () => toDateString(dayjs(date).add(1, 'day')),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 140,\n title: headerLabel,\n }}\n labels={labels}\n onDateChange={onDateChange}\n onViewChange={onViewChange}\n previousControlProps={previousControlProps}\n nextControlProps={nextControlProps}\n todayControlProps={todayControlProps}\n viewSelectProps={{ views: ['day', 'week', 'month'] as const, ...viewSelectProps }}\n stylesApiProps={stylesApiProps}\n />\n )}\n\n <Box {...getStyles('resourcesDayViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesDayViewScrollArea', {\n className: scrollAreaProps?.className,\n style: scrollAreaProps?.style,\n })}\n onScrollPositionChange={(position) => {\n scrollAreaProps?.onScrollPositionChange?.(position);\n setScrolled(position.y !== 0);\n setScrolledX(position.x !== 0);\n }}\n viewportRef={mergedViewportRef}\n >\n <div {...getStyles('resourcesDayViewInner')}>\n <Box {...getStyles('resourcesDayViewTimeLabelsRow')} mod={{ scrolled }}>\n <div\n {...getStyles('resourcesDayViewCorner')}\n key=\"corner\"\n style={\n 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 >\n {getLabel('resources', labels)}\n </div>\n {timeLabels}\n </Box>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesDayViewCurrentTimeIndicator')}\n __vars={{\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)) * ${timeIndicatorOffset} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${timeIndicatorOffset} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorLine')} />\n </Box>\n )}\n </div>\n </ScrollArea>\n </Box>\n </Box>\n );\n\n const dragContextValue = useMemo<DragContextValue>(\n () => dragDrop.dragContextValue,\n [dragDrop.dragContextValue]\n );\n\n if (withEventsDragAndDrop) {\n return <DragContext.Provider value={dragContextValue}>{content}</DragContext.Provider>;\n }\n\n return content;\n});\n\nResourcesDayView.displayName = '@mantine/schedule/ResourcesDayView';\nResourcesDayView.classes = classes;\nResourcesDayView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8SA,MAAM,eAAe;CACnB,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,cAAc;CACd,wBAAwB;CACxB,eAAe,CAAC,YAAY,UAAU;CACtC,uBAAuB;CACvB,oBAAoB;CACpB,iBAAiB;CACjB,MAAM;CACN,sBAAsB;CACtB,iCAAiC;AACnC;AAEA,MAAM,gBAAA,GAAeA,cAAAA,mBAAAA,EAClB,QAAQ,EAAE,QAAQ,WAAW,WAAW,uBAAuB,EAC9D,kBAAkB;CAChB,+BAA+B,UAAA,GAASC,cAAAA,UAAAA,CAAU,MAAM,IAAI,KAAA;CAC5D,oCAAA,GAAmCC,cAAAA,IAAAA,CAAI,SAAS;CAChD,oCAAA,GAAmCA,cAAAA,IAAAA,CAAI,SAAS;CAChD,2CAAA,GAA0CA,cAAAA,IAAAA,CAAI,eAAe;AAC/D,EACF,EACF;AAEA,MAAa,oBAAA,GAAmBC,cAAAA,QAAAA,EAAkC,WAAW;CAC3E,MAAM,SAAA,GAAQC,cAAAA,SAAAA,CAAS,oBAAoB,cAAc,MAAM;CAC/D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,YACA,MACA,WACA,SACA,MACA,cACA,WACA,iBACA,cACA,iBACA,QACA,iBACA,iBACA,QACA,0BAA0B,2BAC1B,wBAAwB,MACxB,gBACA,kBACA,YACA,cACA,sBACA,kBACA,mBACA,iBACA,cACA,QACA,WACA,WACA,QACA,wBACA,eACA,iBACA,aACA,qBACA,QACA,kBACA,iBACA,uBACA,aACA,cACA,mBACA,kBACA,gBACA,iBACA,cACA,iCACA,oBACA,eACA,MACA,qBACA,iBACA,eACA,gBACA,qBACA,0BACA,sBAAsB,uBACtB,iBACA,GAAG,W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ACvB,+MAA+M,oBAAoB,WACnO,mHAAmH,oBAAoB;QAC3I,wBAAwB,sBACpB,SAAS,CAAC,CACX,YAAY,CAAC,CACb,SAAS,GAAG,IACX,SACA;OACN;OAZF,UAAA;QAcG,yBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;SAAK,GAAI,UAAU,gDAAgD;SAChE,UAAA;QACE,CAAA;QAEN,CAAC,yBACA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,2CAA2C,EAAI,CAAA;QAEpE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,0CAA0C,EAAI,CAAA;OAC9D;;KAEJ;;GACK,CAAA;EACT,CAAA,CACF;;CAGP,MAAM,oBAAA,GAAmBf,MAAAA,QAAAA,OACjB,SAAS,kBACf,CAAC,SAAS,gBAAgB,CAC5B;CAEA,IAAI,uBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACgC,oBAAAA,YAAY,UAAb;EAAsB,OAAO;EAAmB,UAAA;CAA8B,CAAA;CAGvF,OAAO;AACT,CAAC;AAED,iBAAiB,cAAc;AAC/B,iBAAiB,UAAUd,gCAAAA;AAC3B,iBAAiB,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesDayView.module.cjs","names":[],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.module.css"],"sourcesContent":[".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\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\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\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\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\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\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n}\n\n.resourcesDayViewRow {\n display: flex;\n border-top: 1px solid var(--resources-day-view-border-color);\n}\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\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n\n &:where([data-has-groups]) {\n left: var(--resources-day-view-group-label-width);\n }\n}\n\n.resourcesDayViewGroupColumn {\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 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 border-inline-end: 1px solid var(--resources-day-view-border-color);\n overflow: visible;\n\n &:where([data-group-position='first']),\n &:where([data-group-position='only']) {\n z-index: 13;\n }\n\n &:where([data-group-position='middle']),\n &:where([data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-day-view-row-height) + 1px);\n }\n}\n\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\n.resourcesDayViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-day-view-row-height);\n}\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\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(:last-of-type) {\n border-inline-end: none;\n }\n\n &:where(:focus) {\n z-index: 1;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--resources-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.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\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 &::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--_indicator-color);\n opacity: 0.2;\n }\n}\n\n.resourcesDayViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: var(--_indicator-color);\n}\n\n.resourcesDayViewCurrentTimeIndicatorThumb {\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 left: calc(-1 * (var(--_thumb-size) / 2 - 1px));\n}\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 font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n top: 0;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\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 &:where([data-interactive]) {\n pointer-events: auto;\n cursor: pointer;\n user-select: none;\n\n @mixin hover {\n background-color: var(--bg-event-hover);\n }\n }\n}\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\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\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n\n &:where([data-edge='start']) {\n left: -2px;\n }\n\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n\n.resourcesDayViewEventWrapper {\n position: absolute;\n z-index: 3;\n\n &:hover .resourcesDayViewResizeHandle {\n opacity: 0.5;\n }\n\n & .resourcesDayViewResizeHandle:hover {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:where([data-active]) {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n }\n}\n\n.resourcesDayView:where([data-event-interaction]) .resourcesDayViewRowSlot {\n pointer-events: none;\n}\n\n.resourcesDayView:where([data-event-interaction], [data-slot-dragging])\n .resourcesDayViewBackgroundEvent {\n pointer-events: none;\n}\n\n.resourcesDayView:where([data-resizing]) {\n & * {\n cursor: ew-resize !important;\n }\n\n & .resourcesDayViewEventWrapper:not([data-resizing]) {\n pointer-events: none;\n\n & .resourcesDayViewResizeHandle {\n opacity: 0;\n }\n }\n}\n\n.resourcesDayViewDragPreview {\n pointer-events: none;\n z-index: 3;\n border-radius: var(--resources-day-view-radius);\n border: 1px dashed var(--mantine-color-blue-filled);\n background-color: var(--mantine-color-blue-light);\n opacity: 0.6;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ResourcesDayView.module.cjs","names":[],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.module.css"],"sourcesContent":[".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\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\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\n &:where([data-scrolled]) {\n box-shadow: var(--mantine-shadow-sm);\n }\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\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\n &:where(:last-of-type) {\n border-inline-end: none;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--resources-day-view-non-business-hours-bg);\n }\n}\n\n.resourcesDayViewRow {\n display: flex;\n border-top: 1px solid var(--resources-day-view-border-color);\n}\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\n &:where([data-scrolled-x]) {\n box-shadow: var(--mantine-shadow-sm);\n }\n\n &:where([data-has-groups]) {\n left: var(--resources-day-view-group-label-width);\n }\n}\n\n.resourcesDayViewGroupColumn {\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 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 border-inline-end: 1px solid var(--resources-day-view-border-color);\n overflow: visible;\n\n &:where([data-group-position='first']),\n &:where([data-group-position='only']) {\n z-index: 13;\n }\n\n &:where([data-group-position='middle']),\n &:where([data-group-position='last']) {\n margin-top: -1px;\n min-height: calc(var(--resources-day-view-row-height) + 1px);\n }\n}\n\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\n.resourcesDayViewRowSlots {\n display: flex;\n position: relative;\n min-height: var(--resources-day-view-row-height);\n}\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\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(:last-of-type) {\n border-inline-end: none;\n }\n\n &:where(:focus) {\n z-index: 1;\n }\n\n &:where([data-business-hours]) {\n background-color: var(--resources-day-view-business-hours-bg);\n }\n\n &:where([data-non-business-hours]) {\n background-color: var(--resources-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.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\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 &::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--_indicator-color);\n opacity: 0.2;\n }\n}\n\n.resourcesDayViewCurrentTimeIndicatorLine {\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: var(--_indicator-color);\n}\n\n.resourcesDayViewCurrentTimeIndicatorThumb {\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 left: calc(-1 * (var(--_thumb-size) / 2 - 1px));\n}\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 font-variant-numeric: tabular-nums;\n text-transform: uppercase;\n top: 0;\n left: calc(-1 * (var(--_time-bubble-width) / 2 - 1px));\n z-index: 3;\n}\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 &:where([data-interactive]) {\n pointer-events: auto;\n cursor: pointer;\n user-select: none;\n\n @mixin hover {\n background-color: var(--bg-event-hover);\n }\n }\n\n /* The resized edge repeatedly crosses the pointer, so hover feedback would flicker */\n &:where([data-resizing]) {\n @mixin hover {\n background-color: var(--bg-event-bg);\n }\n }\n}\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\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\n &::before {\n content: '';\n position: absolute;\n inset: -4px -6px;\n }\n\n &:where([data-edge='start']) {\n left: -2px;\n }\n\n &:where([data-edge='end']) {\n right: -2px;\n }\n}\n\n.resourcesDayViewEventWrapper {\n position: absolute;\n z-index: 3;\n\n &:hover .resourcesDayViewResizeHandle {\n opacity: 0.5;\n }\n\n & .resourcesDayViewResizeHandle:hover {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:where([data-active]) {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n }\n}\n\n.resourcesDayView:where([data-event-interaction]) .resourcesDayViewRowSlot {\n pointer-events: none;\n}\n\n/* The resizing background event is the one that set `data-event-interaction`, so it must\n keep capturing pointer events. */\n.resourcesDayView:where([data-event-interaction], [data-slot-dragging])\n .resourcesDayViewBackgroundEvent:not([data-resizing]) {\n pointer-events: none;\n\n & .resourcesDayViewResizeHandle {\n pointer-events: none;\n opacity: 0;\n }\n}\n\n.resourcesDayViewBackgroundEvent {\n & .resourcesDayViewResizeHandle {\n background-color: var(--bg-event-color);\n\n &:where([data-edge='start']) {\n left: 0;\n }\n\n &:where([data-edge='end']) {\n right: 0;\n }\n }\n\n &:hover .resourcesDayViewResizeHandle {\n opacity: 0.5;\n }\n\n & .resourcesDayViewResizeHandle:hover {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:where([data-active]) {\n opacity: 0.8;\n }\n\n &:where([data-resizing]) .resourcesDayViewResizeHandle:not([data-active]) {\n opacity: 0;\n pointer-events: none;\n }\n}\n\n.resourcesDayView:where([data-resizing]) {\n & * {\n cursor: ew-resize !important;\n }\n\n & .resourcesDayViewEventWrapper:not([data-resizing]) {\n pointer-events: none;\n\n & .resourcesDayViewResizeHandle {\n opacity: 0;\n }\n }\n}\n\n.resourcesDayViewDragPreview {\n pointer-events: none;\n z-index: 3;\n border-radius: var(--resources-day-view-radius);\n border: 1px dashed var(--mantine-color-blue-filled);\n background-color: var(--mantine-color-blue-light);\n opacity: 0.6;\n}\n"],"mappings":""}
|