@mantine/schedule 9.7.2 → 9.7.3
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 +45 -29
- package/cjs/components/DayView/DayView.cjs.map +1 -1
- package/cjs/components/DayView/DayView.module.cjs.map +1 -1
- package/cjs/components/MobileMonthView/MobileMonthView.cjs +54 -22
- package/cjs/components/MobileMonthView/MobileMonthView.cjs.map +1 -1
- package/cjs/components/MobileMonthView/MobileMonthView.module.cjs.map +1 -1
- package/cjs/components/MobileMonthView/get-mobile-month-view-weeks.cjs +32 -0
- package/cjs/components/MobileMonthView/get-mobile-month-view-weeks.cjs.map +1 -0
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs +15 -7
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs.map +1 -1
- package/cjs/components/ResourcesDayView/ResourcesDayView.module.cjs.map +1 -1
- package/cjs/components/ResourcesDayView/ResourcesDayViewColumn.cjs +11 -6
- package/cjs/components/ResourcesDayView/ResourcesDayViewColumn.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs +15 -7
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.module.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekViewRow.cjs +11 -6
- package/cjs/components/ResourcesWeekView/ResourcesWeekViewRow.cjs.map +1 -1
- package/cjs/components/Schedule/Schedule.cjs +2 -0
- package/cjs/components/Schedule/Schedule.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.cjs +29 -19
- package/cjs/components/WeekView/WeekView.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.module.cjs.map +1 -1
- package/cjs/components/WeekView/WeekViewDay.cjs +13 -7
- package/cjs/components/WeekView/WeekViewDay.cjs.map +1 -1
- package/cjs/components/YearView/YearView.cjs +1 -1
- package/cjs/components/YearView/YearView.cjs.map +1 -1
- package/cjs/components/YearView/YearViewMonth.cjs +1 -1
- package/cjs/components/YearView/YearViewMonth.cjs.map +1 -1
- package/cjs/index.cjs +10 -0
- package/cjs/utils/add-minutes-to-time/add-minutes-to-time.cjs +17 -0
- package/cjs/utils/add-minutes-to-time/add-minutes-to-time.cjs.map +1 -0
- package/cjs/utils/clamp-slot-label-interval/clamp-slot-label-interval.cjs +22 -0
- package/cjs/utils/clamp-slot-label-interval/clamp-slot-label-interval.cjs.map +1 -0
- package/cjs/utils/get-business-hours-mod/get-business-hours-mod.cjs +74 -17
- package/cjs/utils/get-business-hours-mod/get-business-hours-mod.cjs.map +1 -1
- package/cjs/utils/get-day-time-intervals/get-day-time-intervals.cjs +7 -2
- package/cjs/utils/get-day-time-intervals/get-day-time-intervals.cjs.map +1 -1
- package/cjs/utils/get-slot-label-groups/get-slot-label-groups.cjs +26 -0
- package/cjs/utils/get-slot-label-groups/get-slot-label-groups.cjs.map +1 -0
- package/cjs/{components/YearView → utils/get-visible-week-days}/get-visible-week-days.cjs +1 -1
- package/cjs/utils/get-visible-week-days/get-visible-week-days.cjs.map +1 -0
- package/esm/components/DayView/DayView.mjs +46 -30
- package/esm/components/DayView/DayView.mjs.map +1 -1
- package/esm/components/DayView/DayView.module.mjs.map +1 -1
- package/esm/components/MobileMonthView/MobileMonthView.mjs +54 -22
- package/esm/components/MobileMonthView/MobileMonthView.mjs.map +1 -1
- package/esm/components/MobileMonthView/MobileMonthView.module.mjs.map +1 -1
- package/esm/components/MobileMonthView/get-mobile-month-view-weeks.mjs +30 -0
- package/esm/components/MobileMonthView/get-mobile-month-view-weeks.mjs.map +1 -0
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs +16 -8
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs.map +1 -1
- package/esm/components/ResourcesDayView/ResourcesDayView.module.mjs.map +1 -1
- package/esm/components/ResourcesDayView/ResourcesDayViewColumn.mjs +12 -7
- package/esm/components/ResourcesDayView/ResourcesDayViewColumn.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs +16 -8
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.module.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekViewRow.mjs +12 -7
- package/esm/components/ResourcesWeekView/ResourcesWeekViewRow.mjs.map +1 -1
- package/esm/components/Schedule/Schedule.mjs +2 -0
- package/esm/components/Schedule/Schedule.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.mjs +30 -20
- package/esm/components/WeekView/WeekView.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.module.mjs.map +1 -1
- package/esm/components/WeekView/WeekViewDay.mjs +14 -8
- package/esm/components/WeekView/WeekViewDay.mjs.map +1 -1
- package/esm/components/YearView/YearView.mjs +1 -1
- package/esm/components/YearView/YearView.mjs.map +1 -1
- package/esm/components/YearView/YearViewMonth.mjs +1 -1
- package/esm/components/YearView/YearViewMonth.mjs.map +1 -1
- package/esm/index.mjs +6 -2
- package/esm/utils/add-minutes-to-time/add-minutes-to-time.mjs +17 -0
- package/esm/utils/add-minutes-to-time/add-minutes-to-time.mjs.map +1 -0
- package/esm/utils/clamp-slot-label-interval/clamp-slot-label-interval.mjs +22 -0
- package/esm/utils/clamp-slot-label-interval/clamp-slot-label-interval.mjs.map +1 -0
- package/esm/utils/get-business-hours-mod/get-business-hours-mod.mjs +74 -18
- package/esm/utils/get-business-hours-mod/get-business-hours-mod.mjs.map +1 -1
- package/esm/utils/get-day-time-intervals/get-day-time-intervals.mjs +7 -2
- package/esm/utils/get-day-time-intervals/get-day-time-intervals.mjs.map +1 -1
- package/esm/utils/get-slot-label-groups/get-slot-label-groups.mjs +26 -0
- package/esm/utils/get-slot-label-groups/get-slot-label-groups.mjs.map +1 -0
- package/esm/{components/YearView → utils/get-visible-week-days}/get-visible-week-days.mjs +1 -1
- package/esm/utils/get-visible-week-days/get-visible-week-days.mjs.map +1 -0
- package/lib/components/DayView/DayView.d.ts +3 -1
- package/lib/components/MobileMonthView/MobileMonthView.d.ts +2 -0
- package/lib/components/MobileMonthView/get-mobile-month-view-weeks.d.ts +11 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +1 -1
- package/lib/components/ResourcesDayView/ResourcesDayViewColumn.d.ts +2 -1
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +1 -1
- package/lib/components/ResourcesWeekView/ResourcesWeekViewRow.d.ts +2 -1
- package/lib/components/Schedule/Schedule.d.ts +1 -1
- package/lib/components/WeekView/WeekView.d.ts +3 -1
- package/lib/utils/add-minutes-to-time/add-minutes-to-time.d.ts +1 -0
- package/lib/utils/clamp-slot-label-interval/clamp-slot-label-interval.d.ts +9 -0
- package/lib/utils/get-business-hours-mod/get-business-hours-mod.d.ts +24 -5
- package/lib/utils/get-day-time-intervals/get-day-time-intervals.d.ts +5 -1
- package/lib/utils/get-slot-label-groups/get-slot-label-groups.d.ts +15 -0
- package/lib/utils/index.d.ts +7 -2
- package/package.json +4 -4
- package/styles.css +175 -6
- package/styles.layer.css +175 -6
- package/cjs/components/YearView/get-visible-week-days.cjs.map +0 -1
- package/esm/components/YearView/get-visible-week-days.mjs.map +0 -1
- /package/lib/{components/YearView → utils/get-visible-week-days}/get-visible-week-days.d.ts +0 -0
|
@@ -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: 14;\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 &:where([data-invalid]) {\n border-color: var(--mantine-color-error);\n background-color: transparent;\n opacity: 0.4;\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ResourcesDayView.module.cjs","names":[],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.module.css"],"sourcesContent":[".resourcesDayView {\n --_business-hours-direction: to right;\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 @mixin rtl {\n --_business-hours-direction: to left;\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: 14;\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 &:where([data-partial-business-hours]) {\n background-image: linear-gradient(\n var(--_business-hours-direction),\n var(--resources-day-view-non-business-hours-bg) var(--business-hours-from),\n var(--resources-day-view-business-hours-bg) var(--business-hours-from),\n var(--resources-day-view-business-hours-bg) var(--business-hours-to),\n var(--resources-day-view-non-business-hours-bg) var(--business-hours-to)\n );\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 background-image: none;\n\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-partial-business-hours]) {\n background-image: linear-gradient(\n var(--_business-hours-direction),\n var(--resources-day-view-non-business-hours-bg) var(--business-hours-from),\n var(--resources-day-view-business-hours-bg) var(--business-hours-from),\n var(--resources-day-view-business-hours-bg) var(--business-hours-to),\n var(--resources-day-view-non-business-hours-bg) var(--business-hours-to)\n );\n }\n\n &:where([data-drop-target]) {\n background-image: none;\n\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-image: none;\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 &:where([data-invalid]) {\n border-color: var(--mantine-color-error);\n background-color: transparent;\n opacity: 0.4;\n }\n}\n"],"mappings":""}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
const require_labels = require("../../labels.cjs");
|
|
3
|
+
const require_clamp_interval_minutes = require("../../utils/clamp-interval-minutes/clamp-interval-minutes.cjs");
|
|
3
4
|
const require_get_business_hours_mod = require("../../utils/get-business-hours-mod/get-business-hours-mod.cjs");
|
|
5
|
+
const require_add_minutes_to_time = require("../../utils/add-minutes-to-time/add-minutes-to-time.cjs");
|
|
4
6
|
let _mantine_core = require("@mantine/core");
|
|
5
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
8
|
//#region packages/@mantine/schedule/src/components/ResourcesDayView/ResourcesDayViewColumn.tsx
|
|
7
|
-
function ResourcesDayViewRow({ resource, resourceIndex, date, slots, getStyles, children, labels, highlightBusinessHours, businessHours, withEventsDragAndDrop, onRowSlotsDragOver, onRowSlotsDragLeave, onRowSlotsDrop, onSlotClick, dropTargetSlotIndex, mode, slotsRef, firstSlotIndex, onSlotKeyDown, withDragSlotSelect, onSlotPointerDown, isSlotDragSelected, rowSlotsContainerRef, renderResourceLabel, renderGroupLabel, scrolledX, groupInfo, allDayCount }) {
|
|
9
|
+
function ResourcesDayViewRow({ resource, resourceIndex, date, slots, intervalMinutes, getStyles, children, labels, highlightBusinessHours, businessHours, withEventsDragAndDrop, onRowSlotsDragOver, onRowSlotsDragLeave, onRowSlotsDrop, onSlotClick, dropTargetSlotIndex, mode, slotsRef, firstSlotIndex, onSlotKeyDown, withDragSlotSelect, onSlotPointerDown, isSlotDragSelected, rowSlotsContainerRef, renderResourceLabel, renderGroupLabel, scrolledX, groupInfo, allDayCount }) {
|
|
8
10
|
const slotGroup = String(resource.id);
|
|
9
11
|
const items = slots.map((slot, slotIndex) => {
|
|
10
12
|
const isDropTarget = dropTargetSlotIndex === slotIndex;
|
|
11
13
|
const isFirstSlot = firstSlotIndex?.resourceIndex === resourceIndex && firstSlotIndex?.slotIndex === slotIndex;
|
|
12
14
|
const isDragSelected = isSlotDragSelected?.(slotIndex, slotGroup) || false;
|
|
15
|
+
const businessHoursState = require_get_business_hours_mod.getBusinessHoursState({
|
|
16
|
+
time: slot.startTime,
|
|
17
|
+
endTime: require_add_minutes_to_time.addMinutesToTime(slot.startTime, require_clamp_interval_minutes.clampIntervalMinutes(intervalMinutes)),
|
|
18
|
+
businessHours,
|
|
19
|
+
highlightBusinessHours
|
|
20
|
+
});
|
|
13
21
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.UnstyledButton, {
|
|
14
22
|
ref: (node) => {
|
|
15
23
|
if (!slotsRef?.current) return;
|
|
@@ -24,15 +32,12 @@ function ResourcesDayViewRow({ resource, resourceIndex, date, slots, getStyles,
|
|
|
24
32
|
...getStyles("resourcesDayViewRowSlot"),
|
|
25
33
|
mod: {
|
|
26
34
|
"hour-start": slot.isHourStart,
|
|
27
|
-
...
|
|
28
|
-
time: slot.startTime,
|
|
29
|
-
businessHours,
|
|
30
|
-
highlightBusinessHours
|
|
31
|
-
}),
|
|
35
|
+
...businessHoursState.mod,
|
|
32
36
|
"drop-target": isDropTarget,
|
|
33
37
|
"drag-selected": isDragSelected,
|
|
34
38
|
static: mode === "static"
|
|
35
39
|
},
|
|
40
|
+
__vars: businessHoursState.vars,
|
|
36
41
|
"aria-label": `${require_labels.getLabel("resourceSlot", labels)} ${resource.label} ${date} ${slot.startTime} - ${slot.endTime}`,
|
|
37
42
|
tabIndex: mode === "static" ? -1 : isFirstSlot ? 0 : -1,
|
|
38
43
|
"data-drag-slot-index": withDragSlotSelect && mode !== "static" ? slotIndex : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesDayViewColumn.cjs","names":["UnstyledButton","getBusinessHoursMod","getLabel","Box"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayViewColumn.tsx"],"sourcesContent":["import { Box, GetStylesApi, UnstyledButton } from '@mantine/core';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport { ScheduleMode, ScheduleResourceData, ScheduleResourceGroup } from '../../types';\nimport {\n DayTimeInterval,\n getBusinessHoursMod,\n ResourceGroupInfo,\n ResourcesGridControlsRef,\n} from '../../utils';\nimport type { ResourcesDayViewFactory } from './ResourcesDayView';\n\nexport interface ResourcesDayViewRowProps {\n resource: ScheduleResourceData;\n resourceIndex: number;\n date: string;\n slots: DayTimeInterval[];\n getStyles: GetStylesApi<ResourcesDayViewFactory>;\n children?: React.ReactNode;\n labels?: ScheduleLabelsOverride;\n highlightBusinessHours?: boolean;\n businessHours?: [string, string];\n withEventsDragAndDrop?: boolean;\n onRowSlotsDragOver?: (\n e: React.DragEvent<HTMLDivElement>,\n resourceId: string | number,\n resourceIndex: number\n ) => void;\n onRowSlotsDragLeave?: () => void;\n onRowSlotsDrop?: (\n e: React.DragEvent<HTMLDivElement>,\n resourceId: string | number,\n resourceIndex: number\n ) => void;\n onSlotClick?: (\n resourceId: string | number,\n slotTime: string,\n event: React.MouseEvent<HTMLButtonElement>\n ) => void;\n dropTargetSlotIndex?: number;\n mode?: ScheduleMode;\n slotsRef?: ResourcesGridControlsRef;\n firstSlotIndex?: { resourceIndex: number; slotIndex: number };\n onSlotKeyDown?: (\n event: React.KeyboardEvent<HTMLButtonElement>,\n resourceIndex: number,\n slotIndex: number\n ) => void;\n withDragSlotSelect?: boolean;\n onSlotPointerDown?: (\n event: React.PointerEvent<HTMLButtonElement>,\n index: number,\n group: string\n ) => void;\n isSlotDragSelected?: (index: number, group: string) => boolean;\n rowSlotsContainerRef?: (node: HTMLDivElement | null) => void;\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n scrolledX?: boolean;\n groupInfo?: ResourceGroupInfo | null;\n allDayCount?: number;\n}\n\nexport function ResourcesDayViewRow({\n resource,\n resourceIndex,\n date,\n slots,\n getStyles,\n children,\n labels,\n highlightBusinessHours,\n businessHours,\n withEventsDragAndDrop,\n onRowSlotsDragOver,\n onRowSlotsDragLeave,\n onRowSlotsDrop,\n onSlotClick,\n dropTargetSlotIndex,\n mode,\n slotsRef,\n firstSlotIndex,\n onSlotKeyDown,\n withDragSlotSelect,\n onSlotPointerDown,\n isSlotDragSelected,\n rowSlotsContainerRef,\n renderResourceLabel,\n renderGroupLabel,\n scrolledX,\n groupInfo,\n allDayCount,\n}: ResourcesDayViewRowProps) {\n const slotGroup = String(resource.id);\n\n const items = slots.map((slot, slotIndex) => {\n const isDropTarget = dropTargetSlotIndex === slotIndex;\n const isFirstSlot =\n firstSlotIndex?.resourceIndex === resourceIndex && firstSlotIndex?.slotIndex === slotIndex;\n const isDragSelected = isSlotDragSelected?.(slotIndex, slotGroup) || false;\n\n return (\n <UnstyledButton\n key={slot.startTime}\n ref={(node) => {\n if (!slotsRef?.current) {\n return;\n }\n if (!slotsRef.current[resourceIndex]) {\n slotsRef.current[resourceIndex] = [];\n }\n const row = slotsRef.current[resourceIndex];\n if (node) {\n row[slotIndex] = node;\n } else {\n delete row[slotIndex];\n while (row.length > 0 && row[row.length - 1] == null) {\n row.length -= 1;\n }\n }\n }}\n {...getStyles('resourcesDayViewRowSlot')}\n mod={{\n 'hour-start': slot.isHourStart,\n ...getBusinessHoursMod({\n time: slot.startTime,\n businessHours,\n highlightBusinessHours,\n }),\n 'drop-target': isDropTarget,\n 'drag-selected': isDragSelected,\n static: mode === 'static',\n }}\n aria-label={`${getLabel('resourceSlot', labels)} ${resource.label} ${date} ${slot.startTime} - ${slot.endTime}`}\n tabIndex={mode === 'static' ? -1 : isFirstSlot ? 0 : -1}\n data-drag-slot-index={withDragSlotSelect && mode !== 'static' ? slotIndex : undefined}\n data-drag-slot-group={withDragSlotSelect && mode !== 'static' ? slotGroup : undefined}\n onKeyDown={(e) => {\n if (onSlotKeyDown) {\n onSlotKeyDown(e, resourceIndex, slotIndex);\n }\n }}\n onPointerDown={\n withDragSlotSelect && mode !== 'static'\n ? (e) => onSlotPointerDown?.(e, slotIndex, slotGroup)\n : undefined\n }\n onClick={\n mode === 'static' || !onSlotClick\n ? undefined\n : (e) => onSlotClick(resource.id, slot.startTime, e)\n }\n onDragOver={\n withEventsDragAndDrop && mode !== 'static' ? (e) => e.preventDefault() : undefined\n }\n />\n );\n });\n\n const isGroupStart = groupInfo?.position === 'first' || groupInfo?.position === 'only';\n const groupCell =\n groupInfo !== undefined ? (\n groupInfo !== null ? (\n <Box\n {...getStyles('resourcesDayViewGroupColumn')}\n mod={{ 'scrolled-x': scrolledX, 'group-position': groupInfo.position }}\n >\n {isGroupStart && (\n <span\n style={\n groupInfo.count > 1\n ? {\n transform: `translateY(calc((${groupInfo.count - 1} * (var(--resources-day-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n }\n >\n {renderGroupLabel ? renderGroupLabel(groupInfo.group) : groupInfo.group.label}\n </span>\n )}\n </Box>\n ) : (\n <Box {...getStyles('resourcesDayViewGroupColumnEmpty')} mod={{ 'scrolled-x': scrolledX }} />\n )\n ) : null;\n\n return (\n <Box {...getStyles('resourcesDayViewRow')}>\n {groupCell}\n <Box\n {...getStyles('resourcesDayViewResourceLabel')}\n mod={{ 'scrolled-x': scrolledX, 'has-groups': groupInfo !== undefined }}\n >\n {renderResourceLabel ? renderResourceLabel(resource) : resource.label}\n </Box>\n <Box\n ref={rowSlotsContainerRef}\n {...getStyles('resourcesDayViewRowSlots', {\n style: allDayCount\n ? {\n minHeight: `max(var(--resources-day-view-row-height), calc(${allDayCount} * (var(--resources-day-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined,\n })}\n onDragOver={\n withEventsDragAndDrop && mode !== 'static'\n ? (e) => onRowSlotsDragOver?.(e, resource.id, resourceIndex)\n : undefined\n }\n onDragLeave={withEventsDragAndDrop && mode !== 'static' ? onRowSlotsDragLeave : undefined}\n onDrop={\n withEventsDragAndDrop && mode !== 'static'\n ? (e) => onRowSlotsDrop?.(e, resource.id, resourceIndex)\n : undefined\n }\n >\n {children}\n {items}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;AA8DA,SAAgB,oBAAoB,EAClC,UACA,eACA,MACA,OACA,WACA,UACA,QACA,wBACA,eACA,uBACA,oBACA,qBACA,gBACA,aACA,qBACA,MACA,UACA,gBACA,eACA,oBACA,mBACA,oBACA,sBACA,qBACA,kBACA,WACA,WACA,eAC2B;CAC3B,MAAM,YAAY,OAAO,SAAS,EAAE;CAEpC,MAAM,QAAQ,MAAM,KAAK,MAAM,cAAc;EAC3C,MAAM,eAAe,wBAAwB;EAC7C,MAAM,cACJ,gBAAgB,kBAAkB,iBAAiB,gBAAgB,cAAc;EACnF,MAAM,iBAAiB,qBAAqB,WAAW,SAAS,KAAK;EAErE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,gBAAD;GAEE,MAAM,SAAS;IACb,IAAI,CAAC,UAAU,SACb;IAEF,IAAI,CAAC,SAAS,QAAQ,gBACpB,SAAS,QAAQ,iBAAiB,CAAC;IAErC,MAAM,MAAM,SAAS,QAAQ;IAC7B,IAAI,MACF,IAAI,aAAa;SACZ;KACL,OAAO,IAAI;KACX,OAAO,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,MAAM,MAC9C,IAAI,UAAU;IAElB;GACF;GACA,GAAI,UAAU,yBAAyB;GACvC,KAAK;IACH,cAAc,KAAK;IACnB,GAAGC,+BAAAA,oBAAoB;KACrB,MAAM,KAAK;KACX;KACA;IACF,CAAC;IACD,eAAe;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,cAAAA,KAAD;EAAK,GAAI,UAAU,qBAAqB;EAAxC,UAAA;GACG;GACD,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,KAAD;IACE,GAAI,UAAU,+BAA+B;IAC7C,KAAK;KAAE,cAAc;KAAW,cAAc,cAAc,KAAA;IAAU;IAErE,UAAA,sBAAsB,oBAAoB,QAAQ,IAAI,SAAS;GAC7D,CAAA;GACL,iBAAA,GAAA,kBAAA,KAAA,CAACA,cAAAA,KAAD;IACE,KAAK;IACL,GAAI,UAAU,4BAA4B,EACxC,OAAO,cACH,EACE,WAAW,kDAAkD,YAAY,6DAC3E,IACA,KAAA,EACN,CAAC;IACD,YACE,yBAAyB,SAAS,YAC7B,MAAM,qBAAqB,GAAG,SAAS,IAAI,aAAa,IACzD,KAAA;IAEN,aAAa,yBAAyB,SAAS,WAAW,sBAAsB,KAAA;IAChF,QACE,yBAAyB,SAAS,YAC7B,MAAM,iBAAiB,GAAG,SAAS,IAAI,aAAa,IACrD,KAAA;IAlBR,UAAA,CAqBG,UACA,KACE;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"ResourcesDayViewColumn.cjs","names":["getBusinessHoursState","addMinutesToTime","clampIntervalMinutes","UnstyledButton","getLabel","Box"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayViewColumn.tsx"],"sourcesContent":["import { Box, GetStylesApi, UnstyledButton } from '@mantine/core';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport { ScheduleMode, ScheduleResourceData, ScheduleResourceGroup } from '../../types';\nimport {\n DayTimeInterval,\n addMinutesToTime,\n clampIntervalMinutes,\n getBusinessHoursState,\n ResourceGroupInfo,\n ResourcesGridControlsRef,\n} from '../../utils';\nimport type { ResourcesDayViewFactory } from './ResourcesDayView';\n\nexport interface ResourcesDayViewRowProps {\n resource: ScheduleResourceData;\n resourceIndex: number;\n date: string;\n slots: DayTimeInterval[];\n intervalMinutes: number;\n getStyles: GetStylesApi<ResourcesDayViewFactory>;\n children?: React.ReactNode;\n labels?: ScheduleLabelsOverride;\n highlightBusinessHours?: boolean;\n businessHours?: [string, string];\n withEventsDragAndDrop?: boolean;\n onRowSlotsDragOver?: (\n e: React.DragEvent<HTMLDivElement>,\n resourceId: string | number,\n resourceIndex: number\n ) => void;\n onRowSlotsDragLeave?: () => void;\n onRowSlotsDrop?: (\n e: React.DragEvent<HTMLDivElement>,\n resourceId: string | number,\n resourceIndex: number\n ) => void;\n onSlotClick?: (\n resourceId: string | number,\n slotTime: string,\n event: React.MouseEvent<HTMLButtonElement>\n ) => void;\n dropTargetSlotIndex?: number;\n mode?: ScheduleMode;\n slotsRef?: ResourcesGridControlsRef;\n firstSlotIndex?: { resourceIndex: number; slotIndex: number };\n onSlotKeyDown?: (\n event: React.KeyboardEvent<HTMLButtonElement>,\n resourceIndex: number,\n slotIndex: number\n ) => void;\n withDragSlotSelect?: boolean;\n onSlotPointerDown?: (\n event: React.PointerEvent<HTMLButtonElement>,\n index: number,\n group: string\n ) => void;\n isSlotDragSelected?: (index: number, group: string) => boolean;\n rowSlotsContainerRef?: (node: HTMLDivElement | null) => void;\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n scrolledX?: boolean;\n groupInfo?: ResourceGroupInfo | null;\n allDayCount?: number;\n}\n\nexport function ResourcesDayViewRow({\n resource,\n resourceIndex,\n date,\n slots,\n intervalMinutes,\n getStyles,\n children,\n labels,\n highlightBusinessHours,\n businessHours,\n withEventsDragAndDrop,\n onRowSlotsDragOver,\n onRowSlotsDragLeave,\n onRowSlotsDrop,\n onSlotClick,\n dropTargetSlotIndex,\n mode,\n slotsRef,\n firstSlotIndex,\n onSlotKeyDown,\n withDragSlotSelect,\n onSlotPointerDown,\n isSlotDragSelected,\n rowSlotsContainerRef,\n renderResourceLabel,\n renderGroupLabel,\n scrolledX,\n groupInfo,\n allDayCount,\n}: ResourcesDayViewRowProps) {\n const slotGroup = String(resource.id);\n\n const items = slots.map((slot, slotIndex) => {\n const isDropTarget = dropTargetSlotIndex === slotIndex;\n const isFirstSlot =\n firstSlotIndex?.resourceIndex === resourceIndex && firstSlotIndex?.slotIndex === slotIndex;\n const isDragSelected = isSlotDragSelected?.(slotIndex, slotGroup) || false;\n\n const businessHoursState = getBusinessHoursState({\n time: slot.startTime,\n endTime: addMinutesToTime(slot.startTime, clampIntervalMinutes(intervalMinutes)),\n businessHours,\n highlightBusinessHours,\n });\n\n return (\n <UnstyledButton\n key={slot.startTime}\n ref={(node) => {\n if (!slotsRef?.current) {\n return;\n }\n if (!slotsRef.current[resourceIndex]) {\n slotsRef.current[resourceIndex] = [];\n }\n const row = slotsRef.current[resourceIndex];\n if (node) {\n row[slotIndex] = node;\n } else {\n delete row[slotIndex];\n while (row.length > 0 && row[row.length - 1] == null) {\n row.length -= 1;\n }\n }\n }}\n {...getStyles('resourcesDayViewRowSlot')}\n mod={{\n 'hour-start': slot.isHourStart,\n ...businessHoursState.mod,\n 'drop-target': isDropTarget,\n 'drag-selected': isDragSelected,\n static: mode === 'static',\n }}\n __vars={businessHoursState.vars}\n aria-label={`${getLabel('resourceSlot', labels)} ${resource.label} ${date} ${slot.startTime} - ${slot.endTime}`}\n tabIndex={mode === 'static' ? -1 : isFirstSlot ? 0 : -1}\n data-drag-slot-index={withDragSlotSelect && mode !== 'static' ? slotIndex : undefined}\n data-drag-slot-group={withDragSlotSelect && mode !== 'static' ? slotGroup : undefined}\n onKeyDown={(e) => {\n if (onSlotKeyDown) {\n onSlotKeyDown(e, resourceIndex, slotIndex);\n }\n }}\n onPointerDown={\n withDragSlotSelect && mode !== 'static'\n ? (e) => onSlotPointerDown?.(e, slotIndex, slotGroup)\n : undefined\n }\n onClick={\n mode === 'static' || !onSlotClick\n ? undefined\n : (e) => onSlotClick(resource.id, slot.startTime, e)\n }\n onDragOver={\n withEventsDragAndDrop && mode !== 'static' ? (e) => e.preventDefault() : undefined\n }\n />\n );\n });\n\n const isGroupStart = groupInfo?.position === 'first' || groupInfo?.position === 'only';\n const groupCell =\n groupInfo !== undefined ? (\n groupInfo !== null ? (\n <Box\n {...getStyles('resourcesDayViewGroupColumn')}\n mod={{ 'scrolled-x': scrolledX, 'group-position': groupInfo.position }}\n >\n {isGroupStart && (\n <span\n style={\n groupInfo.count > 1\n ? {\n transform: `translateY(calc((${groupInfo.count - 1} * (var(--resources-day-view-row-height) + 1px)) / 2))`,\n }\n : undefined\n }\n >\n {renderGroupLabel ? renderGroupLabel(groupInfo.group) : groupInfo.group.label}\n </span>\n )}\n </Box>\n ) : (\n <Box {...getStyles('resourcesDayViewGroupColumnEmpty')} mod={{ 'scrolled-x': scrolledX }} />\n )\n ) : null;\n\n return (\n <Box {...getStyles('resourcesDayViewRow')}>\n {groupCell}\n <Box\n {...getStyles('resourcesDayViewResourceLabel')}\n mod={{ 'scrolled-x': scrolledX, 'has-groups': groupInfo !== undefined }}\n >\n {renderResourceLabel ? renderResourceLabel(resource) : resource.label}\n </Box>\n <Box\n ref={rowSlotsContainerRef}\n {...getStyles('resourcesDayViewRowSlots', {\n style: allDayCount\n ? {\n minHeight: `max(var(--resources-day-view-row-height), calc(${allDayCount} * (var(--resources-day-view-all-day-height) + 2px) + 4px))`,\n }\n : undefined,\n })}\n onDragOver={\n withEventsDragAndDrop && mode !== 'static'\n ? (e) => onRowSlotsDragOver?.(e, resource.id, resourceIndex)\n : undefined\n }\n onDragLeave={withEventsDragAndDrop && mode !== 'static' ? onRowSlotsDragLeave : undefined}\n onDrop={\n withEventsDragAndDrop && mode !== 'static'\n ? (e) => onRowSlotsDrop?.(e, resource.id, resourceIndex)\n : undefined\n }\n >\n {children}\n {items}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;AAiEA,SAAgB,oBAAoB,EAClC,UACA,eACA,MACA,OACA,iBACA,WACA,UACA,QACA,wBACA,eACA,uBACA,oBACA,qBACA,gBACA,aACA,qBACA,MACA,UACA,gBACA,eACA,oBACA,mBACA,oBACA,sBACA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ACA,KAAA,EACN,CAAC;IACD,YACE,yBAAyB,SAAS,YAC7B,MAAM,qBAAqB,GAAG,SAAS,IAAI,aAAa,IACzD,KAAA;IAEN,aAAa,yBAAyB,SAAS,WAAW,sBAAsB,KAAA;IAChF,QACE,yBAAyB,SAAS,YAC7B,MAAM,iBAAiB,GAAG,SAAS,IAAI,aAAa,IACrD,KAAA;IAlBR,UAAA,CAqBG,UACA,KACE;;EACF;;AAET"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_labels = require("../../labels.cjs");
|
|
4
4
|
const require_format_date = require("../../utils/format-date/format-date.cjs");
|
|
5
|
+
const require_clamp_interval_minutes = require("../../utils/clamp-interval-minutes/clamp-interval-minutes.cjs");
|
|
5
6
|
const require_get_day_time_intervals = require("../../utils/get-day-time-intervals/get-day-time-intervals.cjs");
|
|
6
7
|
const require_to_date_string = require("../../utils/to-date-string/to-date-string.cjs");
|
|
7
8
|
const require_get_week_days = require("../../utils/get-week-days/get-week-days.cjs");
|
|
@@ -16,6 +17,7 @@ const require_calculate_drop_time = require("../../utils/calculate-drop-time/cal
|
|
|
16
17
|
const require_get_business_hours_mod = require("../../utils/get-business-hours-mod/get-business-hours-mod.cjs");
|
|
17
18
|
const require_expand_recurring_events = require("../../utils/expand-recurring-events/expand-recurring-events.cjs");
|
|
18
19
|
const require_get_ordered_resources = require("../../utils/get-ordered-resources/get-ordered-resources.cjs");
|
|
20
|
+
const require_add_minutes_to_time = require("../../utils/add-minutes-to-time/add-minutes-to-time.cjs");
|
|
19
21
|
const require_handle_resources_grid_key_down = require("../../utils/handle-resources-grid-key-down/handle-resources-grid-key-down.cjs");
|
|
20
22
|
const require_get_group_to_resource_id_map = require("../../utils/get-group-to-resource-id-map/get-group-to-resource-id-map.cjs");
|
|
21
23
|
const require_get_index_from_drag_point = require("../../utils/get-index-from-drag-point/get-index-from-drag-point.cjs");
|
|
@@ -66,7 +68,9 @@ const varsResolver = (0, _mantine_core.createVarsResolver)((_theme, { radius, sl
|
|
|
66
68
|
"--resources-week-view-radius": radius ? (0, _mantine_core.getRadius)(radius) : void 0,
|
|
67
69
|
"--resources-week-view-slot-width": (0, _mantine_core.rem)(slotWidth),
|
|
68
70
|
"--resources-week-view-row-height": (0, _mantine_core.rem)(rowHeight),
|
|
69
|
-
"--resources-week-view-group-label-width": (0, _mantine_core.rem)(groupLabelWidth)
|
|
71
|
+
"--resources-week-view-group-label-width": (0, _mantine_core.rem)(groupLabelWidth),
|
|
72
|
+
"--resources-week-view-business-hours-bg": void 0,
|
|
73
|
+
"--resources-week-view-non-business-hours-bg": void 0
|
|
70
74
|
} }));
|
|
71
75
|
const ResourcesWeekView = (0, _mantine_core.factory)((_props) => {
|
|
72
76
|
const props = (0, _mantine_core.useProps)("ResourcesWeekView", defaultProps, _props);
|
|
@@ -350,17 +354,20 @@ const ResourcesWeekView = (0, _mantine_core.factory)((_props) => {
|
|
|
350
354
|
locale: ctx.getLocale(locale),
|
|
351
355
|
format: slotLabelFormat
|
|
352
356
|
});
|
|
357
|
+
const labelBusinessHours = require_get_business_hours_mod.getBusinessHoursState({
|
|
358
|
+
time: interval.startTime,
|
|
359
|
+
endTime: require_add_minutes_to_time.addMinutesToTime(interval.startTime, require_clamp_interval_minutes.clampIntervalMinutes(intervalMinutes)),
|
|
360
|
+
businessHours,
|
|
361
|
+
highlightBusinessHours
|
|
362
|
+
});
|
|
353
363
|
return /* @__PURE__ */ (0, react.createElement)(_mantine_core.Box, {
|
|
354
364
|
...getStyles("resourcesWeekViewTimeLabel"),
|
|
355
365
|
key: `${day}-${interval.startTime}`,
|
|
356
366
|
mod: {
|
|
357
367
|
"hour-start": interval.isHourStart,
|
|
358
|
-
...
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
highlightBusinessHours
|
|
362
|
-
})
|
|
363
|
-
}
|
|
368
|
+
...labelBusinessHours.mod
|
|
369
|
+
},
|
|
370
|
+
__vars: labelBusinessHours.vars
|
|
364
371
|
}, label);
|
|
365
372
|
}));
|
|
366
373
|
const slotsRef = (0, react.useRef)([]);
|
|
@@ -639,6 +646,7 @@ const ResourcesWeekView = (0, _mantine_core.factory)((_props) => {
|
|
|
639
646
|
});
|
|
640
647
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_ResourcesWeekViewRow.ResourcesWeekViewRow, {
|
|
641
648
|
resource,
|
|
649
|
+
intervalMinutes,
|
|
642
650
|
resourceIndex,
|
|
643
651
|
weekdays,
|
|
644
652
|
slots,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesWeekView.cjs","names":["createVarsResolver","getRadius","rem","factory","useProps","useStyles","useResolvedStylesApi","useMantineTheme","useDirection","useState","useDatesContext","getDayTimeIntervals","useMemo","getOrderedResources","getWeekDays","useMounted","getCurrentTimePosition","isInTimeRange","formatDate","useRef","useCallback","calculateDropTime","expandRecurringEvents","useDragDropHandlers","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","getResourcesWeekViewEvents","Box","getBusinessHoursMod","useMergedRef","classes","getIndexFromDragPoint","ScheduleBackgroundEvent","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesWeekViewRow","getDayPosition","getWeekLabel","ScheduleHeaderBase","previousWeek","nextWeek","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesWeekView/ResourcesWeekView.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 DayOfWeek,\n DayPositionedEventData,\n PreventEventOverlap,\n ScheduleCanDropEventData,\n ScheduleCanDropExternalEventData,\n ScheduleCanResizeEventToData,\n ScheduleEventData,\n ScheduleEventPlacementRejectedData,\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 getWeekDays,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n nextWeek,\n previousWeek,\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 { getWeekLabel } from '../WeekView/get-week-label/get-week-label';\nimport { getResourcesWeekViewEvents } from './get-resources-week-view-events/get-resources-week-view-events';\nimport { ResourcesWeekViewRow } from './ResourcesWeekViewRow';\nimport classes from './ResourcesWeekView.module.css';\n\nexport type ResourcesWeekViewStylesNames =\n | 'resourcesWeekView'\n | 'resourcesWeekViewRoot'\n | 'resourcesWeekViewInner'\n | 'resourcesWeekViewHeaderRows'\n | 'resourcesWeekViewHeaderContent'\n | 'resourcesWeekViewDayLabelsRow'\n | 'resourcesWeekViewDayLabel'\n | 'resourcesWeekViewTimeLabelsRow'\n | 'resourcesWeekViewScrollArea'\n | 'resourcesWeekViewCorner'\n | 'resourcesWeekViewTimeLabel'\n | 'resourcesWeekViewResourceLabel'\n | 'resourcesWeekViewRow'\n | 'resourcesWeekViewRowSlot'\n | 'resourcesWeekViewRowSlots'\n | 'resourcesWeekViewBackgroundEvent'\n | 'resourcesWeekViewAllDayEvent'\n | 'resourcesWeekViewCurrentTimeIndicator'\n | 'resourcesWeekViewCurrentTimeIndicatorLine'\n | 'resourcesWeekViewCurrentTimeIndicatorThumb'\n | 'resourcesWeekViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesWeekViewEventWrapper'\n | 'resourcesWeekViewDragPreview'\n | 'resourcesWeekViewResizeHandle'\n | 'resourcesWeekViewGroupColumn'\n | 'resourcesWeekViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesWeekViewCssVariables = {\n resourcesWeekView:\n | '--resources-week-view-radius'\n | '--resources-week-view-slot-width'\n | '--resources-week-view-row-height'\n | '--resources-week-view-group-label-width';\n};\n\nexport interface ResourcesWeekViewProps\n extends BoxProps, StylesApiProps<ResourcesWeekViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n date: Date | string;\n onDateChange?: (value: DateStringValue) => void;\n resources: ScheduleResourceData[];\n startTime?: string;\n endTime?: string;\n /** Number of minutes for each interval in the week 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 /** 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 slotLabelFormat?: DateLabelFormat;\n radius?: MantineRadius;\n /** Date and time to scroll to on initial render, in `YYYY-MM-DD HH:mm:ss` format */\n startScrollDateTime?: string;\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n locale?: string;\n withCurrentTimeIndicator?: boolean;\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 withHeader?: boolean;\n onViewChange?: (view: ScheduleViewLevel) => void;\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n weekLabelFormat?: DateLabelFormat;\n renderWeekLabel?: (params: {\n weekStart: DateStringValue;\n weekEnd: DateStringValue;\n }) => React.ReactNode;\n events?: ScheduleEventData[];\n slotWidth?: React.CSSProperties['width'];\n rowHeight?: React.CSSProperties['height'];\n labels?: ScheduleLabelsOverride;\n highlightBusinessHours?: boolean;\n businessHours?: [string, string];\n renderEventBody?: RenderEventBody;\n renderEvent?: RenderEvent;\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 withEventsDragAndDrop?: boolean;\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n canDragEvent?: (event: ScheduleEventData) => boolean;\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 onEventDragStart?: (event: ScheduleEventData) => void;\n onEventDragEnd?: () => void;\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\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 withDragSlotSelect?: boolean;\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n mode?: ScheduleMode;\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\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 /** Called while an event is dragged over a target to compute live feedback and again before the drop is committed, return `false` to reject the drop. Must be pure and cheap. */\n canDropEvent?: (data: ScheduleCanDropEventData) => boolean;\n\n /** Called while an external item is dragged over a target to compute live feedback and again before the drop is committed, return `false` to reject the drop. Must be pure and cheap. Only `dataTransfer.types` can be read while the drag is in progress. */\n canDropExternalEvent?: (data: ScheduleCanDropExternalEventData) => boolean;\n\n /** Called on every pointer move while an event is resized to compute live feedback and again before the resize is committed, return `false` to reject the new size. Must be pure and cheap. */\n canResizeEventTo?: (data: ScheduleCanResizeEventToData) => boolean;\n\n /** If set, drops and resizes that would make the event overlap another event are rejected. Pass a function to decide per pair of events: return `true` to forbid the overlap. The function runs while dragging and resizing to compute live feedback, it must be pure and cheap. @default false */\n preventEventOverlap?: PreventEventOverlap;\n\n /** Called when a drop or resize is rejected */\n onEventPlacementRejected?: (data: ScheduleEventPlacementRejectedData) => void;\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 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 firstDayOfWeek?: DayOfWeek;\n weekendDays?: DayOfWeek[];\n withWeekendDays?: boolean;\n weekdayFormat?: DateLabelFormat;\n highlightToday?: boolean;\n}\n\nexport type ResourcesWeekViewFactory = Factory<{\n props: ResourcesWeekViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesWeekViewStylesNames;\n vars: ResourcesWeekViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesWeekView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n weekLabelFormat: 'MMM DD',\n weekdayFormat: 'ddd D',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withEventResize: false,\n withDragSlotSelect: false,\n withWeekendDays: true,\n withCurrentTimeBubble: true,\n highlightToday: true,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n withInteractiveBackgroundEvents: false,\n} satisfies Partial<ResourcesWeekViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesWeekViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesWeekView: {\n '--resources-week-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-week-view-slot-width': rem(slotWidth),\n '--resources-week-view-row-height': rem(rowHeight),\n '--resources-week-view-group-label-width': rem(groupLabelWidth),\n },\n })\n);\n\nexport const ResourcesWeekView = factory<ResourcesWeekViewFactory>((_props) => {\n const props = useProps('ResourcesWeekView', 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 startScrollDateTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n weekLabelFormat,\n renderWeekLabel,\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 withEventResize,\n onEventResize,\n canResizeEvent,\n canDropEvent,\n canDropExternalEvent,\n canResizeEventTo,\n preventEventOverlap,\n onEventPlacementRejected,\n eventResizeInterval,\n onTimeSlotClick,\n onEventClick,\n withInteractiveBackgroundEvents,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n firstDayOfWeek,\n weekendDays,\n withWeekendDays,\n weekdayFormat,\n highlightToday,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesWeekViewFactory>({\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: 'resourcesWeekView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesWeekViewFactory>({\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 const weekdays = useMemo(\n () =>\n getWeekDays({\n week: date,\n withWeekendDays,\n weekendDays: ctx.getWeekendDays(weekendDays),\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n }),\n [date, withWeekendDays, weekendDays, firstDayOfWeek, ctx]\n );\n\n const totalSlotsPerDay = slots.length;\n\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = weekdays.some((day) => dayjs(day).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\n const todayDayIndex = weekdays.findIndex((day) => dayjs(day).isSame(now, 'day'));\n const showTimeIndicator =\n mounted &&\n withCurrentTimeIndicator &&\n todayDayIndex >= 0 &&\n isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\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 getExternalDropDateTime = useCallback(\n (target: DropTargetSlot) => {\n const dayIndex = Math.floor(target.slotIndex / totalSlotsPerDay);\n const slotInDay = target.slotIndex % totalSlotsPerDay;\n const slotDay = weekdays[dayIndex];\n\n if (!slotDay) {\n return null;\n }\n\n const slotDate = dayjs(slotDay).format('YYYY-MM-DD');\n const slotTime = slots[slotInDay].startTime;\n const dropDateTime = `${slotDate} ${slotTime}`;\n\n if (eventDragInterval == null) {\n return dropDateTime;\n }\n\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\n return dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n },\n [slots, weekdays, totalSlotsPerDay, eventDragInterval, intervalMinutes, startTime, endTime]\n );\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n\n const dropDateTime = getExternalDropDateTime(target);\n\n if (dropDateTime === null) {\n return;\n }\n\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, getExternalDropDateTime]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const getDropTimeForSlot = (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n const dayIndex = Math.floor(target.slotIndex / totalSlotsPerDay);\n const slotInDay = target.slotIndex % totalSlotsPerDay;\n const slotTime = slots[slotInDay].startTime;\n const targetDay = weekdays[dayIndex] || weekdays[0];\n return calculateDropTime({\n draggedEvent,\n targetDate: targetDay,\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 expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(weekdays[0]).startOf('day').toDate(),\n rangeEnd: dayjs(weekdays[weekdays.length - 1])\n .endOf('day')\n .toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, weekdays, recurrenceExpansionLimit]\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 events: expandedEvents,\n preventEventOverlap,\n canDropEvent,\n canDropExternalEvent,\n onEventPlacementRejected,\n getExternalDropDateTime,\n getTargetResourceId: (target) => target.resourceId,\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 startDayIndex = Math.floor(startIndex / totalSlotsPerDay);\n const startSlotInDay = startIndex % totalSlotsPerDay;\n const endDayIndex = Math.floor(endIndex / totalSlotsPerDay);\n const endSlotInDay = endIndex % totalSlotsPerDay;\n const startDay = weekdays[startDayIndex];\n const endDay = weekdays[endDayIndex];\n if (startDay && endDay) {\n onSlotDragEnd({\n rangeStart: `${dayjs(startDay).format('YYYY-MM-DD')} ${slots[startSlotInDay].startTime}`,\n rangeEnd: `${dayjs(endDay).format('YYYY-MM-DD')} ${slots[endSlotInDay].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\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 events: expandedEvents,\n preventEventOverlap,\n canResizeEventTo,\n onEventPlacementRejected,\n withBackgroundEvents: withInteractiveBackgroundEvents,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n day: string,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n const slot = slots[slotIndex];\n const dayStr = dayjs(day).format('YYYY-MM-DD');\n onTimeSlotClick({\n slotStart: `${dayStr} ${slot.startTime}`,\n slotEnd: `${dayStr} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const weekViewEvents = useMemo(\n () =>\n getResourcesWeekViewEvents({\n events,\n resources,\n weekdays,\n startTime,\n endTime,\n intervalMinutes,\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, resources, weekdays, startTime, endTime, intervalMinutes, recurrenceExpansionLimit]\n );\n\n const dayLabels = weekdays.map((day) => {\n const d = dayjs(day);\n const today = d.isSame(now, 'day') && highlightToday;\n const weekend = ctx.getWeekendDays(weekendDays).includes(d.day() as DayOfWeek);\n\n return (\n <Box\n {...getStyles('resourcesWeekViewDayLabel')}\n key={day}\n mod={{ today, weekend }}\n style={{ width: `calc(var(--resources-week-view-slot-width) * ${totalSlotsPerDay})` }}\n >\n {formatDate({ date: d, locale: ctx.getLocale(locale), format: weekdayFormat })}\n </Box>\n );\n });\n\n const timeLabels = weekdays.flatMap((day) =>\n slots.map((interval) => {\n const dayStr = dayjs(day).format('YYYY-MM-DD');\n const intervalTime = dayjs(`${dayStr} ${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('resourcesWeekViewTimeLabel')}\n key={`${day}-${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\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 (!startScrollDateTime || !viewportRef.current) {\n return;\n }\n const parsed = dayjs(startScrollDateTime);\n const targetDayStr = parsed.format('YYYY-MM-DD 00:00:00');\n const targetTime = parsed.format('HH:mm:ss');\n const dayIndex = weekdays.indexOf(targetDayStr);\n if (dayIndex < 0) {\n return;\n }\n const slotInDay = slots.findIndex((s) => s.startTime >= targetTime);\n if (slotInDay < 0) {\n return;\n }\n const flatIndex = dayIndex * totalSlotsPerDay + slotInDay;\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n const targetSlot = firstResourceSlots[flatIndex];\n if (!targetSlot) {\n return;\n }\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesWeekViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left + viewportRef.current.scrollLeft - 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 dayWidthPercent = 100 / weekdays.length;\n\n const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== 'static';\n\n const rows = orderedResources.map((resource, resourceIndex) => {\n const eventNodes: React.ReactNode[] = [];\n const resourceAllDayBars = weekViewEvents.allDayBars[resource.id] ?? [];\n const maxAllDayCount = resourceAllDayBars.reduce((max, bar) => Math.max(max, bar.row + 1), 0);\n\n weekdays.forEach((day, dayIndex) => {\n const dayEvents = weekViewEvents.byDay[day];\n if (!dayEvents) {\n return;\n }\n\n const dayOffsetPercent = (dayIndex / weekdays.length) * 100;\n\n const pushBackgroundEvent = (event: DayPositionedEventData, allDay: boolean) => {\n const backgroundEventDate = dayjs(day).format('YYYY-MM-DD');\n const isResizable = !allDay && eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id, backgroundEventDate);\n const effectiveLeft = resizePosition ? resizePosition.left : event.position.top;\n const effectiveWidth = resizePosition ? resizePosition.width : event.position.height;\n\n eventNodes.push(\n <ScheduleBackgroundEvent<'start' | 'end'>\n key={`bg-${event.id}-${day}`}\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('resourcesWeekViewResizeHandle')}\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: backgroundEventDate,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }\n : undefined\n }\n {...getStyles('resourcesWeekViewBackgroundEvent', {\n style: {\n left: `${dayOffsetPercent + (effectiveLeft / 100) * dayWidthPercent}%`,\n width: `${(effectiveWidth / 100) * dayWidthPercent}%`,\n top: 0,\n height: '100%',\n },\n })}\n />\n );\n };\n\n for (const event of dayEvents.backgroundTimedEvents[resource.id] || []) {\n pushBackgroundEvent(event, false);\n }\n\n for (const event of dayEvents.backgroundAllDayEvents[resource.id] || []) {\n pushBackgroundEvent(event, true);\n }\n\n const allRegularEvents = (dayEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date: day })\n );\n\n const visibleEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n for (const event of visibleEvents) {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n const effectiveTop = resizePosition ? resizePosition.left : event.position.top;\n const effectiveHeight = resizePosition ? resizePosition.width : event.position.height;\n const eventLeft = dayOffsetPercent + (effectiveTop / 100) * dayWidthPercent;\n const eventWidth = (effectiveHeight / 100) * dayWidthPercent;\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 adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventDate = dayjs(day).format('YYYY-MM-DD');\n\n eventNodes.push(\n <Box\n key={`${event.id}-${day}`}\n {...getStyles('resourcesWeekViewEventWrapper')}\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 mod={{ invalid: isThisEventResizing && !eventResize.resizeValid }}\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('resourcesWeekViewResizeHandle')}\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,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesWeekViewResizeHandle')}\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,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n }\n\n if (maxEventsPerTimeSlot !== undefined) {\n const clusters = getOverlapClusters(allRegularEvents);\n for (const cluster of clusters) {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n\n if (hiddenCount > 0 && mode !== 'static') {\n const leftPercent =\n dayOffsetPercent +\n (Math.min(...cluster.map((e) => e.position.top)) / 100) * dayWidthPercent;\n const rightPercent =\n dayOffsetPercent +\n (Math.max(...cluster.map((e) => e.position.top + e.position.height)) / 100) *\n dayWidthPercent;\n\n eventNodes.push(\n <MoreEvents\n key={`more-${resource.id}-${day}-${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 });\n\n const stickyLabelOffset = hasGroups\n ? 'calc(var(--resources-week-view-group-label-width) + var(--resources-week-view-resource-label-width) + 5px)'\n : 'calc(var(--resources-week-view-resource-label-width) + 5px)';\n\n resourceAllDayBars.forEach((bar) => {\n const leftPercent = bar.startDayIndex * dayWidthPercent;\n const widthPercent = (bar.endDayIndex - bar.startDayIndex + 1) * dayWidthPercent;\n\n eventNodes.push(\n <div\n key={`all-day-${bar.event.id}-${bar.startDayIndex}`}\n {...getStyles('resourcesWeekViewAllDayEvent', {\n style: {\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${widthPercent}% - 2px)`,\n top: `calc(${bar.row} * (var(--resources-week-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={bar.event}\n autoSize\n nowrap\n renderEventBody={(barEvent) => (\n <span\n style={{\n position: 'sticky',\n insetInlineStart: stickyLabelOffset,\n display: 'inline-block',\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {renderEventBody ? renderEventBody(barEvent) : barEvent.title}\n </span>\n )}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(bar.event, e) : undefined}\n style={{ width: '100%', height: '100%', overflow: 'visible' }}\n styles={{\n eventInner: {\n display: 'block',\n overflow: 'visible',\n lineHeight: 'var(--resources-week-view-all-day-height)',\n },\n }}\n />\n </div>\n );\n });\n\n return (\n <ResourcesWeekViewRow\n key={resource.id}\n resource={resource}\n resourceIndex={resourceIndex}\n weekdays={weekdays}\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={maxAllDayCount}\n >\n {eventNodes}\n {dragDrop.dragPreview?.target.resourceId === resource.id &&\n dragDrop.dragContextValue.draggedEvent && (\n <Box\n mod={{ invalid: !dragDrop.dropValid }}\n {...getStyles('resourcesWeekViewDragPreview', {\n style: (() => {\n const previewDayIndex = Math.floor(\n dragDrop.dragPreview.target.slotIndex / totalSlotsPerDay\n );\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 const dayOffsetPercent = (previewDayIndex / weekdays.length) * 100;\n const eventLeft = dayOffsetPercent + (top / 100) * dayWidthPercent;\n const eventWidth = (height / 100) * dayWidthPercent;\n return {\n position: 'absolute',\n insetBlockStart: 0,\n insetBlockEnd: 0,\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n axis: 'horizontal',\n }),\n };\n })(),\n })}\n />\n )}\n </ResourcesWeekViewRow>\n );\n });\n\n const headerLabel = getWeekLabel({\n weekdays,\n locale: ctx.getLocale(locale),\n weekLabelFormat: weekLabelFormat!,\n renderWeekLabel,\n });\n\n const indicatorLeftPercent =\n todayDayIndex >= 0 ? ((todayDayIndex + timeIndicatorOffset / 100) / weekdays.length) * 100 : 0;\n\n const content = (\n <Box\n {...getStyles('resourcesWeekView')}\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=\"week\"\n navigationHandlers={{\n previous: () => previousWeek(date, ctx.getFirstDayOfWeek(firstDayOfWeek)),\n next: () => nextWeek(date, ctx.getFirstDayOfWeek(firstDayOfWeek)),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 180,\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('resourcesWeekViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesWeekViewScrollArea', {\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('resourcesWeekViewInner')}>\n <div {...getStyles('resourcesWeekViewHeaderRows')}>\n <div\n {...getStyles('resourcesWeekViewCorner')}\n key=\"corner\"\n style={\n hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n }\n : undefined\n }\n >\n {getLabel('resources', labels)}\n </div>\n <div {...getStyles('resourcesWeekViewHeaderContent')}>\n <div {...getStyles('resourcesWeekViewDayLabelsRow')}>{dayLabels}</div>\n <Box {...getStyles('resourcesWeekViewTimeLabelsRow')} mod={{ scrolled }}>\n {timeLabels}\n </Box>\n </div>\n </div>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesWeekViewCurrentTimeIndicator')}\n __vars={{\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width) + (100% - var(--resources-week-view-resource-label-width) - var(--resources-week-view-group-label-width)) * ${indicatorLeftPercent} / 100)`\n : `calc(var(--resources-week-view-resource-label-width) + (100% - var(--resources-week-view-resource-label-width)) * ${indicatorLeftPercent} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorLine')} />\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\nResourcesWeekView.displayName = '@mantine/schedule/ResourcesWeekView';\nResourcesWeekView.classes = classes;\nResourcesWeekView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqQA,MAAM,e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C,OAAD;SAAK,GAAI,UAAU,iDAAiD;SACjE,UAAA;QACE,CAAA;QAEN,CAAC,yBACA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,4CAA4C,EAAI,CAAA;QAErE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,GAAI,UAAU,2CAA2C,EAAI,CAAA;OAC/D;;KAEJ;;GACK,CAAA;EACT,CAAA,CACF;;CAGP,MAAM,oBAAA,GAAmBhB,MAAAA,QAAAA,OACjB,SAAS,kBACf,CAAC,SAAS,gBAAgB,CAC5B;CAEA,IAAI,uBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACoC,oBAAAA,YAAY,UAAb;EAAsB,OAAO;EAAmB,UAAA;CAA8B,CAAA;CAGvF,OAAO;AACT,CAAC;AAED,kBAAkB,cAAc;AAChC,kBAAkB,UAAUjB,iCAAAA;AAC5B,kBAAkB,eAAe"}
|
|
1
|
+
{"version":3,"file":"ResourcesWeekView.cjs","names":["createVarsResolver","getRadius","rem","factory","useProps","useStyles","useResolvedStylesApi","useMantineTheme","useDirection","useState","useDatesContext","getDayTimeIntervals","useMemo","getOrderedResources","getWeekDays","useMounted","getCurrentTimePosition","isInTimeRange","formatDate","useRef","useCallback","calculateDropTime","expandRecurringEvents","useDragDropHandlers","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","getResourcesWeekViewEvents","Box","getBusinessHoursState","addMinutesToTime","clampIntervalMinutes","useMergedRef","classes","getIndexFromDragPoint","ScheduleBackgroundEvent","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesWeekViewRow","getDayPosition","getWeekLabel","ScheduleHeaderBase","previousWeek","nextWeek","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesWeekView/ResourcesWeekView.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 DayOfWeek,\n DayPositionedEventData,\n PreventEventOverlap,\n ScheduleCanDropEventData,\n ScheduleCanDropExternalEventData,\n ScheduleCanResizeEventToData,\n ScheduleEventData,\n ScheduleEventPlacementRejectedData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types';\nimport {\n calculateDropTime,\n expandRecurringEvents,\n formatDate,\n addMinutesToTime,\n clampIntervalMinutes,\n getBusinessHoursState,\n getDayPosition,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getIndexFromDragPoint,\n getOrderedResources,\n getOverlapClusters,\n getTimeAxisEventStyle,\n getWeekDays,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n nextWeek,\n previousWeek,\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 { getWeekLabel } from '../WeekView/get-week-label/get-week-label';\nimport { getResourcesWeekViewEvents } from './get-resources-week-view-events/get-resources-week-view-events';\nimport { ResourcesWeekViewRow } from './ResourcesWeekViewRow';\nimport classes from './ResourcesWeekView.module.css';\n\nexport type ResourcesWeekViewStylesNames =\n | 'resourcesWeekView'\n | 'resourcesWeekViewRoot'\n | 'resourcesWeekViewInner'\n | 'resourcesWeekViewHeaderRows'\n | 'resourcesWeekViewHeaderContent'\n | 'resourcesWeekViewDayLabelsRow'\n | 'resourcesWeekViewDayLabel'\n | 'resourcesWeekViewTimeLabelsRow'\n | 'resourcesWeekViewScrollArea'\n | 'resourcesWeekViewCorner'\n | 'resourcesWeekViewTimeLabel'\n | 'resourcesWeekViewResourceLabel'\n | 'resourcesWeekViewRow'\n | 'resourcesWeekViewRowSlot'\n | 'resourcesWeekViewRowSlots'\n | 'resourcesWeekViewBackgroundEvent'\n | 'resourcesWeekViewAllDayEvent'\n | 'resourcesWeekViewCurrentTimeIndicator'\n | 'resourcesWeekViewCurrentTimeIndicatorLine'\n | 'resourcesWeekViewCurrentTimeIndicatorThumb'\n | 'resourcesWeekViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesWeekViewEventWrapper'\n | 'resourcesWeekViewDragPreview'\n | 'resourcesWeekViewResizeHandle'\n | 'resourcesWeekViewGroupColumn'\n | 'resourcesWeekViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesWeekViewCssVariables = {\n resourcesWeekView:\n | '--resources-week-view-radius'\n | '--resources-week-view-slot-width'\n | '--resources-week-view-row-height'\n | '--resources-week-view-group-label-width'\n | '--resources-week-view-business-hours-bg'\n | '--resources-week-view-non-business-hours-bg';\n};\n\nexport interface ResourcesWeekViewProps\n extends BoxProps, StylesApiProps<ResourcesWeekViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n date: Date | string;\n onDateChange?: (value: DateStringValue) => void;\n resources: ScheduleResourceData[];\n startTime?: string;\n endTime?: string;\n /** Number of minutes for each interval in the week 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 /** 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 slotLabelFormat?: DateLabelFormat;\n radius?: MantineRadius;\n /** Date and time to scroll to on initial render, in `YYYY-MM-DD HH:mm:ss` format */\n startScrollDateTime?: string;\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n locale?: string;\n withCurrentTimeIndicator?: boolean;\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 withHeader?: boolean;\n onViewChange?: (view: ScheduleViewLevel) => void;\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n weekLabelFormat?: DateLabelFormat;\n renderWeekLabel?: (params: {\n weekStart: DateStringValue;\n weekEnd: DateStringValue;\n }) => React.ReactNode;\n events?: ScheduleEventData[];\n slotWidth?: React.CSSProperties['width'];\n rowHeight?: React.CSSProperties['height'];\n labels?: ScheduleLabelsOverride;\n highlightBusinessHours?: boolean;\n businessHours?: [string, string];\n renderEventBody?: RenderEventBody;\n renderEvent?: RenderEvent;\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 withEventsDragAndDrop?: boolean;\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n canDragEvent?: (event: ScheduleEventData) => boolean;\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 onEventDragStart?: (event: ScheduleEventData) => void;\n onEventDragEnd?: () => void;\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\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 withDragSlotSelect?: boolean;\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n mode?: ScheduleMode;\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\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 /** Called while an event is dragged over a target to compute live feedback and again before the drop is committed, return `false` to reject the drop. Must be pure and cheap. */\n canDropEvent?: (data: ScheduleCanDropEventData) => boolean;\n\n /** Called while an external item is dragged over a target to compute live feedback and again before the drop is committed, return `false` to reject the drop. Must be pure and cheap. Only `dataTransfer.types` can be read while the drag is in progress. */\n canDropExternalEvent?: (data: ScheduleCanDropExternalEventData) => boolean;\n\n /** Called on every pointer move while an event is resized to compute live feedback and again before the resize is committed, return `false` to reject the new size. Must be pure and cheap. */\n canResizeEventTo?: (data: ScheduleCanResizeEventToData) => boolean;\n\n /** If set, drops and resizes that would make the event overlap another event are rejected. Pass a function to decide per pair of events: return `true` to forbid the overlap. The function runs while dragging and resizing to compute live feedback, it must be pure and cheap. @default false */\n preventEventOverlap?: PreventEventOverlap;\n\n /** Called when a drop or resize is rejected */\n onEventPlacementRejected?: (data: ScheduleEventPlacementRejectedData) => void;\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 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 firstDayOfWeek?: DayOfWeek;\n weekendDays?: DayOfWeek[];\n withWeekendDays?: boolean;\n weekdayFormat?: DateLabelFormat;\n highlightToday?: boolean;\n}\n\nexport type ResourcesWeekViewFactory = Factory<{\n props: ResourcesWeekViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesWeekViewStylesNames;\n vars: ResourcesWeekViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesWeekView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n weekLabelFormat: 'MMM DD',\n weekdayFormat: 'ddd D',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withEventResize: false,\n withDragSlotSelect: false,\n withWeekendDays: true,\n withCurrentTimeBubble: true,\n highlightToday: true,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n withInteractiveBackgroundEvents: false,\n} satisfies Partial<ResourcesWeekViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesWeekViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesWeekView: {\n '--resources-week-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-week-view-slot-width': rem(slotWidth),\n '--resources-week-view-row-height': rem(rowHeight),\n '--resources-week-view-group-label-width': rem(groupLabelWidth),\n '--resources-week-view-business-hours-bg': undefined,\n '--resources-week-view-non-business-hours-bg': undefined,\n },\n })\n);\n\nexport const ResourcesWeekView = factory<ResourcesWeekViewFactory>((_props) => {\n const props = useProps('ResourcesWeekView', 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 startScrollDateTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n weekLabelFormat,\n renderWeekLabel,\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 withEventResize,\n onEventResize,\n canResizeEvent,\n canDropEvent,\n canDropExternalEvent,\n canResizeEventTo,\n preventEventOverlap,\n onEventPlacementRejected,\n eventResizeInterval,\n onTimeSlotClick,\n onEventClick,\n withInteractiveBackgroundEvents,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n firstDayOfWeek,\n weekendDays,\n withWeekendDays,\n weekdayFormat,\n highlightToday,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesWeekViewFactory>({\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: 'resourcesWeekView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesWeekViewFactory>({\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 const weekdays = useMemo(\n () =>\n getWeekDays({\n week: date,\n withWeekendDays,\n weekendDays: ctx.getWeekendDays(weekendDays),\n firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),\n }),\n [date, withWeekendDays, weekendDays, firstDayOfWeek, ctx]\n );\n\n const totalSlotsPerDay = slots.length;\n\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = weekdays.some((day) => dayjs(day).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\n const todayDayIndex = weekdays.findIndex((day) => dayjs(day).isSame(now, 'day'));\n const showTimeIndicator =\n mounted &&\n withCurrentTimeIndicator &&\n todayDayIndex >= 0 &&\n isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\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 getExternalDropDateTime = useCallback(\n (target: DropTargetSlot) => {\n const dayIndex = Math.floor(target.slotIndex / totalSlotsPerDay);\n const slotInDay = target.slotIndex % totalSlotsPerDay;\n const slotDay = weekdays[dayIndex];\n\n if (!slotDay) {\n return null;\n }\n\n const slotDate = dayjs(slotDay).format('YYYY-MM-DD');\n const slotTime = slots[slotInDay].startTime;\n const dropDateTime = `${slotDate} ${slotTime}`;\n\n if (eventDragInterval == null) {\n return dropDateTime;\n }\n\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\n return dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n },\n [slots, weekdays, totalSlotsPerDay, eventDragInterval, intervalMinutes, startTime, endTime]\n );\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n\n const dropDateTime = getExternalDropDateTime(target);\n\n if (dropDateTime === null) {\n return;\n }\n\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, getExternalDropDateTime]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const getDropTimeForSlot = (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n const dayIndex = Math.floor(target.slotIndex / totalSlotsPerDay);\n const slotInDay = target.slotIndex % totalSlotsPerDay;\n const slotTime = slots[slotInDay].startTime;\n const targetDay = weekdays[dayIndex] || weekdays[0];\n return calculateDropTime({\n draggedEvent,\n targetDate: targetDay,\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 expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(weekdays[0]).startOf('day').toDate(),\n rangeEnd: dayjs(weekdays[weekdays.length - 1])\n .endOf('day')\n .toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, weekdays, recurrenceExpansionLimit]\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 events: expandedEvents,\n preventEventOverlap,\n canDropEvent,\n canDropExternalEvent,\n onEventPlacementRejected,\n getExternalDropDateTime,\n getTargetResourceId: (target) => target.resourceId,\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 startDayIndex = Math.floor(startIndex / totalSlotsPerDay);\n const startSlotInDay = startIndex % totalSlotsPerDay;\n const endDayIndex = Math.floor(endIndex / totalSlotsPerDay);\n const endSlotInDay = endIndex % totalSlotsPerDay;\n const startDay = weekdays[startDayIndex];\n const endDay = weekdays[endDayIndex];\n if (startDay && endDay) {\n onSlotDragEnd({\n rangeStart: `${dayjs(startDay).format('YYYY-MM-DD')} ${slots[startSlotInDay].startTime}`,\n rangeEnd: `${dayjs(endDay).format('YYYY-MM-DD')} ${slots[endSlotInDay].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\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 events: expandedEvents,\n preventEventOverlap,\n canResizeEventTo,\n onEventPlacementRejected,\n withBackgroundEvents: withInteractiveBackgroundEvents,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n day: string,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n const slot = slots[slotIndex];\n const dayStr = dayjs(day).format('YYYY-MM-DD');\n onTimeSlotClick({\n slotStart: `${dayStr} ${slot.startTime}`,\n slotEnd: `${dayStr} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const weekViewEvents = useMemo(\n () =>\n getResourcesWeekViewEvents({\n events,\n resources,\n weekdays,\n startTime,\n endTime,\n intervalMinutes,\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, resources, weekdays, startTime, endTime, intervalMinutes, recurrenceExpansionLimit]\n );\n\n const dayLabels = weekdays.map((day) => {\n const d = dayjs(day);\n const today = d.isSame(now, 'day') && highlightToday;\n const weekend = ctx.getWeekendDays(weekendDays).includes(d.day() as DayOfWeek);\n\n return (\n <Box\n {...getStyles('resourcesWeekViewDayLabel')}\n key={day}\n mod={{ today, weekend }}\n style={{ width: `calc(var(--resources-week-view-slot-width) * ${totalSlotsPerDay})` }}\n >\n {formatDate({ date: d, locale: ctx.getLocale(locale), format: weekdayFormat })}\n </Box>\n );\n });\n\n const timeLabels = weekdays.flatMap((day) =>\n slots.map((interval) => {\n const dayStr = dayjs(day).format('YYYY-MM-DD');\n const intervalTime = dayjs(`${dayStr} ${interval.startTime}`);\n const label = formatDate({\n date: intervalTime,\n locale: ctx.getLocale(locale),\n format: slotLabelFormat,\n });\n\n const labelBusinessHours = getBusinessHoursState({\n time: interval.startTime,\n endTime: addMinutesToTime(interval.startTime, clampIntervalMinutes(intervalMinutes)),\n businessHours,\n highlightBusinessHours,\n });\n\n return (\n <Box\n {...getStyles('resourcesWeekViewTimeLabel')}\n key={`${day}-${interval.startTime}`}\n mod={{ 'hour-start': interval.isHourStart, ...labelBusinessHours.mod }}\n __vars={labelBusinessHours.vars}\n >\n {label}\n </Box>\n );\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 (!startScrollDateTime || !viewportRef.current) {\n return;\n }\n const parsed = dayjs(startScrollDateTime);\n const targetDayStr = parsed.format('YYYY-MM-DD 00:00:00');\n const targetTime = parsed.format('HH:mm:ss');\n const dayIndex = weekdays.indexOf(targetDayStr);\n if (dayIndex < 0) {\n return;\n }\n const slotInDay = slots.findIndex((s) => s.startTime >= targetTime);\n if (slotInDay < 0) {\n return;\n }\n const flatIndex = dayIndex * totalSlotsPerDay + slotInDay;\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n const targetSlot = firstResourceSlots[flatIndex];\n if (!targetSlot) {\n return;\n }\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesWeekViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left + viewportRef.current.scrollLeft - 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 dayWidthPercent = 100 / weekdays.length;\n\n const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== 'static';\n\n const rows = orderedResources.map((resource, resourceIndex) => {\n const eventNodes: React.ReactNode[] = [];\n const resourceAllDayBars = weekViewEvents.allDayBars[resource.id] ?? [];\n const maxAllDayCount = resourceAllDayBars.reduce((max, bar) => Math.max(max, bar.row + 1), 0);\n\n weekdays.forEach((day, dayIndex) => {\n const dayEvents = weekViewEvents.byDay[day];\n if (!dayEvents) {\n return;\n }\n\n const dayOffsetPercent = (dayIndex / weekdays.length) * 100;\n\n const pushBackgroundEvent = (event: DayPositionedEventData, allDay: boolean) => {\n const backgroundEventDate = dayjs(day).format('YYYY-MM-DD');\n const isResizable = !allDay && eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id, backgroundEventDate);\n const effectiveLeft = resizePosition ? resizePosition.left : event.position.top;\n const effectiveWidth = resizePosition ? resizePosition.width : event.position.height;\n\n eventNodes.push(\n <ScheduleBackgroundEvent<'start' | 'end'>\n key={`bg-${event.id}-${day}`}\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('resourcesWeekViewResizeHandle')}\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: backgroundEventDate,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }\n : undefined\n }\n {...getStyles('resourcesWeekViewBackgroundEvent', {\n style: {\n left: `${dayOffsetPercent + (effectiveLeft / 100) * dayWidthPercent}%`,\n width: `${(effectiveWidth / 100) * dayWidthPercent}%`,\n top: 0,\n height: '100%',\n },\n })}\n />\n );\n };\n\n for (const event of dayEvents.backgroundTimedEvents[resource.id] || []) {\n pushBackgroundEvent(event, false);\n }\n\n for (const event of dayEvents.backgroundAllDayEvents[resource.id] || []) {\n pushBackgroundEvent(event, true);\n }\n\n const allRegularEvents = (dayEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date: day })\n );\n\n const visibleEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n for (const event of visibleEvents) {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n const effectiveTop = resizePosition ? resizePosition.left : event.position.top;\n const effectiveHeight = resizePosition ? resizePosition.width : event.position.height;\n const eventLeft = dayOffsetPercent + (effectiveTop / 100) * dayWidthPercent;\n const eventWidth = (effectiveHeight / 100) * dayWidthPercent;\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 adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventDate = dayjs(day).format('YYYY-MM-DD');\n\n eventNodes.push(\n <Box\n key={`${event.id}-${day}`}\n {...getStyles('resourcesWeekViewEventWrapper')}\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 mod={{ invalid: isThisEventResizing && !eventResize.resizeValid }}\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('resourcesWeekViewResizeHandle')}\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,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesWeekViewResizeHandle')}\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,\n dayIndex,\n dayCount: weekdays.length,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n }\n\n if (maxEventsPerTimeSlot !== undefined) {\n const clusters = getOverlapClusters(allRegularEvents);\n for (const cluster of clusters) {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n\n if (hiddenCount > 0 && mode !== 'static') {\n const leftPercent =\n dayOffsetPercent +\n (Math.min(...cluster.map((e) => e.position.top)) / 100) * dayWidthPercent;\n const rightPercent =\n dayOffsetPercent +\n (Math.max(...cluster.map((e) => e.position.top + e.position.height)) / 100) *\n dayWidthPercent;\n\n eventNodes.push(\n <MoreEvents\n key={`more-${resource.id}-${day}-${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 });\n\n const stickyLabelOffset = hasGroups\n ? 'calc(var(--resources-week-view-group-label-width) + var(--resources-week-view-resource-label-width) + 5px)'\n : 'calc(var(--resources-week-view-resource-label-width) + 5px)';\n\n resourceAllDayBars.forEach((bar) => {\n const leftPercent = bar.startDayIndex * dayWidthPercent;\n const widthPercent = (bar.endDayIndex - bar.startDayIndex + 1) * dayWidthPercent;\n\n eventNodes.push(\n <div\n key={`all-day-${bar.event.id}-${bar.startDayIndex}`}\n {...getStyles('resourcesWeekViewAllDayEvent', {\n style: {\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${widthPercent}% - 2px)`,\n top: `calc(${bar.row} * (var(--resources-week-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={bar.event}\n autoSize\n nowrap\n renderEventBody={(barEvent) => (\n <span\n style={{\n position: 'sticky',\n insetInlineStart: stickyLabelOffset,\n display: 'inline-block',\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {renderEventBody ? renderEventBody(barEvent) : barEvent.title}\n </span>\n )}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(bar.event, e) : undefined}\n style={{ width: '100%', height: '100%', overflow: 'visible' }}\n styles={{\n eventInner: {\n display: 'block',\n overflow: 'visible',\n lineHeight: 'var(--resources-week-view-all-day-height)',\n },\n }}\n />\n </div>\n );\n });\n\n return (\n <ResourcesWeekViewRow\n key={resource.id}\n resource={resource}\n intervalMinutes={intervalMinutes}\n resourceIndex={resourceIndex}\n weekdays={weekdays}\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={maxAllDayCount}\n >\n {eventNodes}\n {dragDrop.dragPreview?.target.resourceId === resource.id &&\n dragDrop.dragContextValue.draggedEvent && (\n <Box\n mod={{ invalid: !dragDrop.dropValid }}\n {...getStyles('resourcesWeekViewDragPreview', {\n style: (() => {\n const previewDayIndex = Math.floor(\n dragDrop.dragPreview.target.slotIndex / totalSlotsPerDay\n );\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 const dayOffsetPercent = (previewDayIndex / weekdays.length) * 100;\n const eventLeft = dayOffsetPercent + (top / 100) * dayWidthPercent;\n const eventWidth = (height / 100) * dayWidthPercent;\n return {\n position: 'absolute',\n insetBlockStart: 0,\n insetBlockEnd: 0,\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n axis: 'horizontal',\n }),\n };\n })(),\n })}\n />\n )}\n </ResourcesWeekViewRow>\n );\n });\n\n const headerLabel = getWeekLabel({\n weekdays,\n locale: ctx.getLocale(locale),\n weekLabelFormat: weekLabelFormat!,\n renderWeekLabel,\n });\n\n const indicatorLeftPercent =\n todayDayIndex >= 0 ? ((todayDayIndex + timeIndicatorOffset / 100) / weekdays.length) * 100 : 0;\n\n const content = (\n <Box\n {...getStyles('resourcesWeekView')}\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=\"week\"\n navigationHandlers={{\n previous: () => previousWeek(date, ctx.getFirstDayOfWeek(firstDayOfWeek)),\n next: () => nextWeek(date, ctx.getFirstDayOfWeek(firstDayOfWeek)),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 180,\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('resourcesWeekViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesWeekViewScrollArea', {\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('resourcesWeekViewInner')}>\n <div {...getStyles('resourcesWeekViewHeaderRows')}>\n <div\n {...getStyles('resourcesWeekViewCorner')}\n key=\"corner\"\n style={\n hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width))',\n }\n : undefined\n }\n >\n {getLabel('resources', labels)}\n </div>\n <div {...getStyles('resourcesWeekViewHeaderContent')}>\n <div {...getStyles('resourcesWeekViewDayLabelsRow')}>{dayLabels}</div>\n <Box {...getStyles('resourcesWeekViewTimeLabelsRow')} mod={{ scrolled }}>\n {timeLabels}\n </Box>\n </div>\n </div>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesWeekViewCurrentTimeIndicator')}\n __vars={{\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-week-view-resource-label-width) + var(--resources-week-view-group-label-width) + (100% - var(--resources-week-view-resource-label-width) - var(--resources-week-view-group-label-width)) * ${indicatorLeftPercent} / 100)`\n : `calc(var(--resources-week-view-resource-label-width) + (100% - var(--resources-week-view-resource-label-width)) * ${indicatorLeftPercent} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesWeekViewCurrentTimeIndicatorLine')} />\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\nResourcesWeekView.displayName = '@mantine/schedule/ResourcesWeekView';\nResourcesWeekView.classes = classes;\nResourcesWeekView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyQA,MAAM,eAAe;CACnB,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,iBAAiB;CACjB,eAAe;CACf,wBAAwB;CACxB,eAAe,CAAC,YAAY,UAAU;CACtC,uBAAuB;CACvB,iBAAiB;CACjB,oBAAoB;CACpB,iBAAiB;CACjB,uBAAuB;CACvB,gBAAgB;CAChB,MAAM;CACN,sBAAsB;CACtB,iCAAiC;AACnC;AAEA,MAAM,gBAAA,GAAeA,cAAAA,mBAAAA,EAClB,QAAQ,EAAE,QAAQ,WAAW,WAAW,uBAAuB,EAC9D,mBAAmB;CACjB,gCAAgC,UAAA,GAASC,cAAAA,UAAAA,CAAU,MAAM,IAAI,KAAA;CAC7D,qCAAA,GAAoCC,cAAAA,IAAAA,CAAI,SAAS;CACjD,qCAAA,GAAoCA,cAAAA,IAAAA,CAAI,SAAS;CACjD,4CAAA,GAA2CA,cAAAA,IAAAA,CAAI,eAAe;CAC9D,2CAA2C,KAAA;CAC3C,+CAA+C,KAAA;AACjD,EACF,EACF;AAEA,MAAa,qBAAA,GAAoBC,cAAAA,QAAAA,EAAmC,WAAW;CAC7E,MA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