@mantine/schedule 9.5.1 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/cjs/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/cjs/components/AgendaView/AgendaView.cjs +7 -6
  3. package/cjs/components/AgendaView/AgendaView.cjs.map +1 -1
  4. package/cjs/components/AgendaView/get-agenda-view-events.cjs.map +1 -1
  5. package/cjs/components/CurrentTimeIndicator/CurrentTimeIndicator.cjs +3 -2
  6. package/cjs/components/CurrentTimeIndicator/CurrentTimeIndicator.cjs.map +1 -1
  7. package/cjs/components/DayView/DayView.cjs +144 -78
  8. package/cjs/components/DayView/DayView.cjs.map +1 -1
  9. package/cjs/components/DayView/DayView.module.cjs +2 -1
  10. package/cjs/components/DayView/DayView.module.cjs.map +1 -1
  11. package/cjs/components/DayView/get-day-view-events/get-day-view-events.cjs.map +1 -1
  12. package/cjs/components/DragContext/DragContext.cjs.map +1 -1
  13. package/cjs/components/MobileMonthView/MobileMonthView.cjs +7 -6
  14. package/cjs/components/MobileMonthView/MobileMonthView.cjs.map +1 -1
  15. package/cjs/components/MobileMonthView/get-mobile-month-view-events.cjs.map +1 -1
  16. package/cjs/components/MonthView/MonthView.cjs +24 -34
  17. package/cjs/components/MonthView/MonthView.cjs.map +1 -1
  18. package/cjs/components/MonthView/MonthView.module.cjs.map +1 -1
  19. package/cjs/components/MonthView/get-month-view-events/find-available-row.cjs.map +1 -1
  20. package/cjs/components/MonthView/get-month-view-events/get-month-positioned-events.cjs +4 -2
  21. package/cjs/components/MonthView/get-month-view-events/get-month-positioned-events.cjs.map +1 -1
  22. package/cjs/components/MonthView/get-month-view-events/get-month-view-events.cjs.map +1 -1
  23. package/cjs/components/MonthView/get-month-view-events/get-weeks-in-range.cjs +3 -2
  24. package/cjs/components/MonthView/get-month-view-events/get-weeks-in-range.cjs.map +1 -1
  25. package/cjs/components/MonthView/get-renderable-month-event-segments.cjs +1 -1
  26. package/cjs/components/MonthView/get-renderable-month-event-segments.cjs.map +1 -1
  27. package/cjs/components/MoreEvents/MoreEvents.cjs.map +1 -1
  28. package/cjs/components/ResourcesDayView/ResourcesDayView.cjs +136 -52
  29. package/cjs/components/ResourcesDayView/ResourcesDayView.cjs.map +1 -1
  30. package/cjs/components/ResourcesDayView/ResourcesDayView.module.cjs +2 -1
  31. package/cjs/components/ResourcesDayView/ResourcesDayView.module.cjs.map +1 -1
  32. package/cjs/components/ResourcesDayView/ResourcesDayViewColumn.cjs.map +1 -1
  33. package/cjs/components/ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events.cjs.map +1 -1
  34. package/cjs/components/ResourcesMonthView/ResourcesMonthView.cjs.map +1 -1
  35. package/cjs/components/ResourcesSchedule/ResourcesSchedule.cjs +3 -1
  36. package/cjs/components/ResourcesSchedule/ResourcesSchedule.cjs.map +1 -1
  37. package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs +150 -59
  38. package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs.map +1 -1
  39. package/cjs/components/ResourcesWeekView/ResourcesWeekView.module.cjs +2 -1
  40. package/cjs/components/ResourcesWeekView/ResourcesWeekView.module.cjs.map +1 -1
  41. package/cjs/components/ResourcesWeekView/ResourcesWeekViewRow.cjs.map +1 -1
  42. package/cjs/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.cjs +6 -3
  43. package/cjs/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.cjs.map +1 -1
  44. package/cjs/components/Schedule/Schedule.cjs +4 -1
  45. package/cjs/components/Schedule/Schedule.cjs.map +1 -1
  46. package/cjs/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs +53 -0
  47. package/cjs/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs.map +1 -0
  48. package/cjs/components/ScheduleEvent/ScheduleEvent.cjs.map +1 -1
  49. package/cjs/components/ScheduleHeader/HeaderControl/HeaderControl.cjs +15 -14
  50. package/cjs/components/ScheduleHeader/HeaderControl/HeaderControl.cjs.map +1 -1
  51. package/cjs/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.cjs.map +1 -1
  52. package/cjs/components/ScheduleHeader/ScheduleHeader.cjs.map +1 -1
  53. package/cjs/components/ScheduleHeader/ScheduleHeaderBase.cjs.map +1 -1
  54. package/cjs/components/ScheduleHeader/ScheduleHeaderContext.cjs.map +1 -1
  55. package/cjs/components/ScheduleHeader/ViewSelect/ViewSelect.cjs.map +1 -1
  56. package/cjs/components/WeekView/WeekView.cjs +159 -82
  57. package/cjs/components/WeekView/WeekView.cjs.map +1 -1
  58. package/cjs/components/WeekView/WeekView.module.cjs +2 -1
  59. package/cjs/components/WeekView/WeekView.module.cjs.map +1 -1
  60. package/cjs/components/WeekView/WeekViewDay.cjs.map +1 -1
  61. package/cjs/components/WeekView/get-week-label/get-week-label.cjs.map +1 -1
  62. package/cjs/components/WeekView/get-week-view-events/calculate-all-day-event-offset.cjs.map +1 -1
  63. package/cjs/components/WeekView/get-week-view-events/calculate-all-day-event-width.cjs.map +1 -1
  64. package/cjs/components/WeekView/get-week-view-events/calculate-event-days.cjs.map +1 -1
  65. package/cjs/components/WeekView/get-week-view-events/find-available-column.cjs +5 -10
  66. package/cjs/components/WeekView/get-week-view-events/find-available-column.cjs.map +1 -1
  67. package/cjs/components/WeekView/get-week-view-events/get-event-end-date.cjs.map +1 -1
  68. package/cjs/components/WeekView/get-week-view-events/get-hanging-status.cjs.map +1 -1
  69. package/cjs/components/WeekView/get-week-view-events/get-week-positioned-events.cjs +5 -3
  70. package/cjs/components/WeekView/get-week-view-events/get-week-positioned-events.cjs.map +1 -1
  71. package/cjs/components/YearView/YearView.cjs +7 -6
  72. package/cjs/components/YearView/YearView.cjs.map +1 -1
  73. package/cjs/components/YearView/YearViewMonth.cjs.map +1 -1
  74. package/cjs/components/YearView/get-visible-week-days.cjs.map +1 -1
  75. package/cjs/components/YearView/get-year-view-events/get-year-view-events.cjs.map +1 -1
  76. package/cjs/hooks/use-auto-scroll-on-drag.cjs.map +1 -1
  77. package/cjs/hooks/use-day-grid-event-resize.cjs.map +1 -1
  78. package/cjs/hooks/use-drag-drop-handlers.cjs +13 -2
  79. package/cjs/hooks/use-drag-drop-handlers.cjs.map +1 -1
  80. package/cjs/hooks/use-drag-state.cjs.map +1 -1
  81. package/cjs/hooks/use-event-resize.cjs +30 -15
  82. package/cjs/hooks/use-event-resize.cjs.map +1 -1
  83. package/cjs/hooks/use-horizontal-event-resize.cjs +30 -15
  84. package/cjs/hooks/use-horizontal-event-resize.cjs.map +1 -1
  85. package/cjs/hooks/use-slot-drag-select.cjs.map +1 -1
  86. package/cjs/index.cjs +2 -0
  87. package/cjs/utils/calculate-drop-time/calculate-drop-time.cjs +25 -4
  88. package/cjs/utils/calculate-drop-time/calculate-drop-time.cjs.map +1 -1
  89. package/cjs/utils/calculate-month-drop-date/calculate-month-drop-date.cjs.map +1 -1
  90. package/cjs/utils/calculate-month-resize-dates/calculate-month-resize-dates.cjs.map +1 -1
  91. package/cjs/utils/expand-recurring-events/expand-recurring-events.cjs +20 -8
  92. package/cjs/utils/expand-recurring-events/expand-recurring-events.cjs.map +1 -1
  93. package/cjs/utils/format-date/format-date.cjs.map +1 -1
  94. package/cjs/utils/get-current-time-position/get-current-time-position.cjs.map +1 -1
  95. package/cjs/utils/get-day-position/get-day-position.cjs.map +1 -1
  96. package/cjs/utils/get-end-of-week/get-end-of-week.cjs.map +1 -1
  97. package/cjs/utils/get-month-days/get-month-days.cjs +4 -2
  98. package/cjs/utils/get-month-days/get-month-days.cjs.map +1 -1
  99. package/cjs/utils/get-month-range/get-month-range.cjs.map +1 -1
  100. package/cjs/utils/get-months-by-quarter/get-months-by-quarter.cjs.map +1 -1
  101. package/cjs/utils/get-months-list/get-months-list.cjs.map +1 -1
  102. package/cjs/utils/get-start-of-week/get-start-of-week.cjs.map +1 -1
  103. package/cjs/utils/get-week-days/get-week-days.cjs.map +1 -1
  104. package/cjs/utils/get-week-number/get-week-number.cjs +4 -1
  105. package/cjs/utils/get-week-number/get-week-number.cjs.map +1 -1
  106. package/cjs/utils/get-weekdays-names/get-weekdays-names.cjs.map +1 -1
  107. package/cjs/utils/is-after-min-date/is-after-min-date.cjs.map +1 -1
  108. package/cjs/utils/is-all-day-event/is-all-day-event.cjs.map +1 -1
  109. package/cjs/utils/is-before-max-date/is-before-max-date.cjs.map +1 -1
  110. package/cjs/utils/is-event-in-time-range/is-event-in-time-range.cjs.map +1 -1
  111. package/cjs/utils/is-events-overlap/is-events-overlap.cjs +16 -4
  112. package/cjs/utils/is-events-overlap/is-events-overlap.cjs.map +1 -1
  113. package/cjs/utils/is-in-time-range/is-in-time-range.cjs.map +1 -1
  114. package/cjs/utils/is-multiday-event/is-multiday-event.cjs.map +1 -1
  115. package/cjs/utils/is-same-month/is-same-month.cjs.map +1 -1
  116. package/cjs/utils/is-within-week/is-within-week.cjs.map +1 -1
  117. package/cjs/utils/next-week/next-week.cjs.map +1 -1
  118. package/cjs/utils/previous-week/previous-week.cjs.map +1 -1
  119. package/cjs/utils/sort-events/sort-events.cjs.map +1 -1
  120. package/cjs/utils/to-date-string/to-date-string.cjs.map +1 -1
  121. package/cjs/utils/validate-event/validate-event.cjs.map +1 -1
  122. package/esm/components/AgendaView/AgendaView.mjs +7 -6
  123. package/esm/components/AgendaView/AgendaView.mjs.map +1 -1
  124. package/esm/components/CurrentTimeIndicator/CurrentTimeIndicator.mjs +4 -3
  125. package/esm/components/CurrentTimeIndicator/CurrentTimeIndicator.mjs.map +1 -1
  126. package/esm/components/DayView/DayView.mjs +145 -79
  127. package/esm/components/DayView/DayView.mjs.map +1 -1
  128. package/esm/components/DayView/DayView.module.mjs +2 -1
  129. package/esm/components/DayView/DayView.module.mjs.map +1 -1
  130. package/esm/components/MobileMonthView/MobileMonthView.mjs +7 -6
  131. package/esm/components/MobileMonthView/MobileMonthView.mjs.map +1 -1
  132. package/esm/components/MonthView/MonthView.mjs +25 -35
  133. package/esm/components/MonthView/MonthView.mjs.map +1 -1
  134. package/esm/components/MonthView/MonthView.module.mjs.map +1 -1
  135. package/esm/components/MonthView/get-month-view-events/get-month-positioned-events.mjs +4 -2
  136. package/esm/components/MonthView/get-month-view-events/get-month-positioned-events.mjs.map +1 -1
  137. package/esm/components/MonthView/get-month-view-events/get-weeks-in-range.mjs +3 -2
  138. package/esm/components/MonthView/get-month-view-events/get-weeks-in-range.mjs.map +1 -1
  139. package/esm/components/MonthView/get-renderable-month-event-segments.mjs +1 -1
  140. package/esm/components/MonthView/get-renderable-month-event-segments.mjs.map +1 -1
  141. package/esm/components/MoreEvents/MoreEvents.mjs.map +1 -1
  142. package/esm/components/ResourcesDayView/ResourcesDayView.mjs +138 -54
  143. package/esm/components/ResourcesDayView/ResourcesDayView.mjs.map +1 -1
  144. package/esm/components/ResourcesDayView/ResourcesDayView.module.mjs +2 -1
  145. package/esm/components/ResourcesDayView/ResourcesDayView.module.mjs.map +1 -1
  146. package/esm/components/ResourcesDayView/ResourcesDayViewColumn.mjs.map +1 -1
  147. package/esm/components/ResourcesMonthView/ResourcesMonthView.mjs.map +1 -1
  148. package/esm/components/ResourcesSchedule/ResourcesSchedule.mjs +3 -1
  149. package/esm/components/ResourcesSchedule/ResourcesSchedule.mjs.map +1 -1
  150. package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs +152 -61
  151. package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs.map +1 -1
  152. package/esm/components/ResourcesWeekView/ResourcesWeekView.module.mjs +2 -1
  153. package/esm/components/ResourcesWeekView/ResourcesWeekView.module.mjs.map +1 -1
  154. package/esm/components/ResourcesWeekView/ResourcesWeekViewRow.mjs.map +1 -1
  155. package/esm/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.mjs +6 -3
  156. package/esm/components/ResourcesWeekView/get-resources-week-view-events/get-resources-week-view-events.mjs.map +1 -1
  157. package/esm/components/Schedule/Schedule.mjs +4 -1
  158. package/esm/components/Schedule/Schedule.mjs.map +1 -1
  159. package/esm/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.mjs +53 -0
  160. package/esm/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.mjs.map +1 -0
  161. package/esm/components/ScheduleEvent/ScheduleEvent.mjs.map +1 -1
  162. package/esm/components/ScheduleHeader/HeaderControl/HeaderControl.mjs +15 -14
  163. package/esm/components/ScheduleHeader/HeaderControl/HeaderControl.mjs.map +1 -1
  164. package/esm/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.mjs.map +1 -1
  165. package/esm/components/ScheduleHeader/ScheduleHeader.mjs.map +1 -1
  166. package/esm/components/ScheduleHeader/ScheduleHeaderBase.mjs.map +1 -1
  167. package/esm/components/ScheduleHeader/ViewSelect/ViewSelect.mjs.map +1 -1
  168. package/esm/components/WeekView/WeekView.mjs +160 -83
  169. package/esm/components/WeekView/WeekView.mjs.map +1 -1
  170. package/esm/components/WeekView/WeekView.module.mjs +2 -1
  171. package/esm/components/WeekView/WeekView.module.mjs.map +1 -1
  172. package/esm/components/WeekView/WeekViewDay.mjs.map +1 -1
  173. package/esm/components/WeekView/get-week-view-events/find-available-column.mjs +5 -10
  174. package/esm/components/WeekView/get-week-view-events/find-available-column.mjs.map +1 -1
  175. package/esm/components/WeekView/get-week-view-events/get-week-positioned-events.mjs +5 -3
  176. package/esm/components/WeekView/get-week-view-events/get-week-positioned-events.mjs.map +1 -1
  177. package/esm/components/YearView/YearView.mjs +7 -6
  178. package/esm/components/YearView/YearView.mjs.map +1 -1
  179. package/esm/components/YearView/YearViewMonth.mjs.map +1 -1
  180. package/esm/hooks/use-drag-drop-handlers.mjs +13 -2
  181. package/esm/hooks/use-drag-drop-handlers.mjs.map +1 -1
  182. package/esm/hooks/use-event-resize.mjs +30 -15
  183. package/esm/hooks/use-event-resize.mjs.map +1 -1
  184. package/esm/hooks/use-horizontal-event-resize.mjs +30 -15
  185. package/esm/hooks/use-horizontal-event-resize.mjs.map +1 -1
  186. package/esm/index.mjs +2 -1
  187. package/esm/utils/calculate-drop-time/calculate-drop-time.mjs +25 -4
  188. package/esm/utils/calculate-drop-time/calculate-drop-time.mjs.map +1 -1
  189. package/esm/utils/expand-recurring-events/expand-recurring-events.mjs +20 -8
  190. package/esm/utils/expand-recurring-events/expand-recurring-events.mjs.map +1 -1
  191. package/esm/utils/get-month-days/get-month-days.mjs +4 -2
  192. package/esm/utils/get-month-days/get-month-days.mjs.map +1 -1
  193. package/esm/utils/get-week-number/get-week-number.mjs +4 -1
  194. package/esm/utils/get-week-number/get-week-number.mjs.map +1 -1
  195. package/esm/utils/is-events-overlap/is-events-overlap.mjs +16 -4
  196. package/esm/utils/is-events-overlap/is-events-overlap.mjs.map +1 -1
  197. package/lib/components/DayView/DayView.d.ts +7 -1
  198. package/lib/components/MonthView/MonthView.d.ts +2 -0
  199. package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +7 -1
  200. package/lib/components/ResourcesDayView/ResourcesDayViewColumn.d.ts +1 -1
  201. package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +3 -1
  202. package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +7 -1
  203. package/lib/components/ResourcesWeekView/ResourcesWeekViewRow.d.ts +1 -1
  204. package/lib/components/Schedule/Schedule.d.ts +3 -1
  205. package/lib/components/ScheduleBackgroundEvent/ScheduleBackgroundEvent.d.ts +19 -0
  206. package/lib/components/ScheduleBackgroundEvent/index.d.ts +2 -0
  207. package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.d.ts +3 -3
  208. package/lib/components/ScheduleHeader/ScheduleHeaderBase.d.ts +1 -1
  209. package/lib/components/WeekView/WeekView.d.ts +7 -1
  210. package/lib/components/WeekView/WeekViewDay.d.ts +1 -1
  211. package/lib/components/WeekView/get-week-view-events/find-available-column.d.ts +7 -3
  212. package/lib/components/YearView/YearViewMonth.d.ts +1 -1
  213. package/lib/hooks/use-drag-drop-handlers.d.ts +10 -1
  214. package/lib/hooks/use-event-resize.d.ts +2 -1
  215. package/lib/hooks/use-horizontal-event-resize.d.ts +2 -1
  216. package/lib/index.d.mts +1 -0
  217. package/lib/index.d.ts +1 -0
  218. package/lib/types.d.ts +1 -1
  219. package/lib/utils/calculate-drop-time/calculate-drop-time.d.ts +11 -1
  220. package/package.json +8 -5
  221. package/styles.css +160 -0
  222. package/styles.layer.css +160 -0
@@ -7,6 +7,7 @@ const require_to_date_string = require("../../utils/to-date-string/to-date-strin
7
7
  const require_get_current_time_position = require("../../utils/get-current-time-position/get-current-time-position.cjs");
8
8
  const require_is_in_time_range = require("../../utils/is-in-time-range/is-in-time-range.cjs");
9
9
  const require_is_all_day_event = require("../../utils/is-all-day-event/is-all-day-event.cjs");
10
+ const require_get_day_position = require("../../utils/get-day-position/get-day-position.cjs");
10
11
  const require_get_time_axis_event_style = require("../../utils/get-time-axis-event-style/get-time-axis-event-style.cjs");
11
12
  const require_calculate_drop_time = require("../../utils/calculate-drop-time/calculate-drop-time.cjs");
12
13
  const require_get_business_hours_mod = require("../../utils/get-business-hours-mod/get-business-hours-mod.cjs");
@@ -20,6 +21,7 @@ const require_use_slot_drag_select = require("../../hooks/use-slot-drag-select.c
20
21
  const require_DragContext = require("../DragContext/DragContext.cjs");
21
22
  const require_ScheduleEvent = require("../ScheduleEvent/ScheduleEvent.cjs");
22
23
  const require_MoreEvents = require("../MoreEvents/MoreEvents.cjs");
24
+ const require_ScheduleBackgroundEvent = require("../ScheduleBackgroundEvent/ScheduleBackgroundEvent.cjs");
23
25
  const require_ScheduleHeaderBase = require("../ScheduleHeader/ScheduleHeaderBase.cjs");
24
26
  const require_use_horizontal_event_resize = require("../../hooks/use-horizontal-event-resize.cjs");
25
27
  const require_get_overlap_clusters = require("./get-overlap-clusters/get-overlap-clusters.cjs");
@@ -49,7 +51,8 @@ const defaultProps = {
49
51
  withDragSlotSelect: false,
50
52
  withEventResize: false,
51
53
  mode: "default",
52
- maxEventsPerTimeSlot: 2
54
+ maxEventsPerTimeSlot: 2,
55
+ withInteractiveBackgroundEvents: false
53
56
  };
54
57
  const varsResolver = (0, _mantine_core.createVarsResolver)((_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({ resourcesDayView: {
55
58
  "--resources-day-view-radius": radius ? (0, _mantine_core.getRadius)(radius) : void 0,
@@ -59,7 +62,7 @@ const varsResolver = (0, _mantine_core.createVarsResolver)((_theme, { radius, sl
59
62
  } }));
60
63
  const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
61
64
  const props = (0, _mantine_core.useProps)("ResourcesDayView", defaultProps, _props);
62
- const { classNames, className, style, styles, unstyled, attributes, vars, startTime, endTime, date, onDateChange, resources, intervalMinutes, minEventSize, slotLabelFormat, radius, startScrollTime, scrollAreaProps, locale, withCurrentTimeIndicator: _withCurrentTimeIndicator, withCurrentTimeBubble = true, getCurrentTime, __staticSelector, withHeader, onViewChange, previousControlProps, nextControlProps, todayControlProps, viewSelectProps, headerFormat, events, slotWidth, rowHeight, labels, highlightBusinessHours, businessHours, renderEventBody, renderEvent, renderResourceLabel, groups, renderGroupLabel, groupLabelWidth, withEventsDragAndDrop, onEventDrop, canDragEvent, onEventDragStart, onEventDragEnd, onTimeSlotClick, onEventClick, withDragSlotSelect, onSlotDragEnd, mode, onExternalEventDrop, withEventResize, onEventResize, canResizeEvent, recurrenceExpansionLimit, maxEventsPerTimeSlot: _maxEventsPerTimeSlot, moreEventsProps, ...others } = props;
65
+ const { classNames, className, style, styles, unstyled, attributes, vars, startTime, endTime, date, onDateChange, resources, intervalMinutes, minEventSize, slotLabelFormat, radius, startScrollTime, scrollAreaProps, locale, withCurrentTimeIndicator: _withCurrentTimeIndicator, withCurrentTimeBubble = true, getCurrentTime, __staticSelector, withHeader, onViewChange, previousControlProps, nextControlProps, todayControlProps, viewSelectProps, headerFormat, events, slotWidth, rowHeight, labels, highlightBusinessHours, businessHours, renderEventBody, renderEvent, renderResourceLabel, groups, renderGroupLabel, groupLabelWidth, withEventsDragAndDrop, onEventDrop, canDragEvent, eventDragInterval, onEventDragStart, onEventDragEnd, onTimeSlotClick, onEventClick, withInteractiveBackgroundEvents, withDragSlotSelect, onSlotDragEnd, mode, onExternalEventDrop, withEventResize, onEventResize, canResizeEvent, eventResizeInterval, recurrenceExpansionLimit, maxEventsPerTimeSlot: _maxEventsPerTimeSlot, moreEventsProps, ...others } = props;
63
66
  const maxEventsPerTimeSlot = _maxEventsPerTimeSlot !== void 0 ? Math.max(1, _maxEventsPerTimeSlot) : void 0;
64
67
  const getStyles = (0, _mantine_core.useStyles)({
65
68
  name: __staticSelector,
@@ -88,6 +91,7 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
88
91
  radius
89
92
  };
90
93
  const theme = (0, _mantine_core.useMantineTheme)();
94
+ const { dir } = (0, _mantine_core.useDirection)();
91
95
  const [scrolled, setScrolled] = (0, react.useState)(false);
92
96
  const [scrolledX, setScrolledX] = (0, react.useState)(false);
93
97
  const ctx = (0, _mantine_dates.useDatesContext)();
@@ -98,44 +102,92 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
98
102
  });
99
103
  const { orderedResources, groupRanges, resourceGroupMap } = (0, react.useMemo)(() => require_get_ordered_resources.getOrderedResources(resources, groups), [resources, groups]);
100
104
  const hasGroups = groupRanges.length > 0;
105
+ const dragOffsetRef = (0, react.useRef)({
106
+ offset: 0,
107
+ size: 0
108
+ });
101
109
  const handleExternalDrop = (0, react.useCallback)((e, target) => {
102
110
  if (!onExternalEventDrop) return;
103
111
  const slotDate = (0, dayjs.default)(date).format("YYYY-MM-DD");
112
+ const slotTime = slots[target.slotIndex].startTime;
113
+ let dropDateTime = `${slotDate} ${slotTime}`;
114
+ if (eventDragInterval != null) {
115
+ const { start } = require_calculate_drop_time.calculateDropTime({
116
+ draggedEvent: {
117
+ start: dropDateTime,
118
+ end: dropDateTime
119
+ },
120
+ targetDate: slotDate,
121
+ targetSlotTime: slotTime,
122
+ intervalMinutes,
123
+ dragIntervalMinutes: eventDragInterval,
124
+ slotOffset: dragOffsetRef.current.offset,
125
+ slotSize: dragOffsetRef.current.size,
126
+ startTime,
127
+ endTime
128
+ });
129
+ dropDateTime = (0, dayjs.default)(start).format("YYYY-MM-DD HH:mm:ss");
130
+ }
104
131
  onExternalEventDrop({
105
132
  dataTransfer: e.dataTransfer,
106
- dropDateTime: `${slotDate} ${slots[target.slotIndex].startTime}`,
133
+ dropDateTime,
107
134
  resourceId: target.resourceId
108
135
  });
109
136
  }, [
110
137
  onExternalEventDrop,
111
138
  slots,
112
- date
139
+ date,
140
+ eventDragInterval,
141
+ intervalMinutes,
142
+ startTime,
143
+ endTime
113
144
  ]);
114
145
  const lastDropResourceId = (0, react.useRef)(void 0);
146
+ const getDropTimeForSlot = (target, draggedEvent) => {
147
+ const slotTime = slots[target.slotIndex].startTime;
148
+ return require_calculate_drop_time.calculateDropTime({
149
+ draggedEvent,
150
+ targetDate: (0, dayjs.default)(date).format("YYYY-MM-DD"),
151
+ targetSlotTime: slotTime,
152
+ intervalMinutes,
153
+ dragIntervalMinutes: eventDragInterval,
154
+ slotOffset: eventDragInterval == null ? void 0 : dragOffsetRef.current.offset,
155
+ slotSize: eventDragInterval == null ? void 0 : dragOffsetRef.current.size,
156
+ startTime,
157
+ endTime
158
+ });
159
+ };
160
+ const handleInternalEventDrop = (0, react.useCallback)((data) => {
161
+ onEventDrop?.({
162
+ ...data,
163
+ resourceId: lastDropResourceId.current
164
+ });
165
+ }, [onEventDrop]);
115
166
  const dragDrop = require_use_drag_drop_handlers.useDragDropHandlers({
116
167
  enabled: withEventsDragAndDrop,
117
168
  mode,
118
- onEventDrop: (0, react.useCallback)((data) => {
119
- onEventDrop?.({
120
- ...data,
121
- resourceId: lastDropResourceId.current
122
- });
123
- }, [onEventDrop]),
169
+ onEventDrop: handleInternalEventDrop,
124
170
  canDragEvent,
125
171
  onEventDragStart,
126
172
  onEventDragEnd,
127
173
  calculateDropTarget: (target, draggedEvent) => {
128
174
  lastDropResourceId.current = target.resourceId;
129
- const slotTime = slots[target.slotIndex].startTime;
130
- return require_calculate_drop_time.calculateDropTime({
131
- draggedEvent,
132
- targetDate: (0, dayjs.default)(date).format("YYYY-MM-DD"),
133
- targetSlotTime: slotTime,
134
- intervalMinutes
135
- });
175
+ return getDropTimeForSlot(target, draggedEvent);
136
176
  },
137
177
  onExternalDrop: onExternalEventDrop ? handleExternalDrop : void 0
138
178
  });
179
+ const updateDragPreview = (target) => {
180
+ const draggedEvent = dragDrop.dragContextValue.draggedEvent;
181
+ if (eventDragInterval == null || !draggedEvent) return;
182
+ const { start, end } = getDropTimeForSlot(target, draggedEvent);
183
+ const newStart = (0, dayjs.default)(start).format("YYYY-MM-DD HH:mm:ss");
184
+ if (dragDrop.dragPreview?.start !== newStart || dragDrop.dragPreview?.target.resourceId !== target.resourceId) dragDrop.setDragPreview({
185
+ start: newStart,
186
+ end: (0, dayjs.default)(end).format("YYYY-MM-DD HH:mm:ss"),
187
+ target
188
+ });
189
+ };
190
+ const suppressDropHighlight = eventDragInterval != null && dragDrop.dragContextValue.isDragging;
139
191
  const groupToResourceId = (0, react.useMemo)(() => require_get_group_to_resource_id_map.getGroupToResourceIdMap(resources), [resources]);
140
192
  const slotDragSelect = require_use_slot_drag_select.useSlotDragSelect({
141
193
  enabled: withDragSlotSelect && mode !== "static",
@@ -155,6 +207,7 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
155
207
  startTime,
156
208
  endTime,
157
209
  intervalMinutes,
210
+ resizeIntervalMinutes: eventResizeInterval,
158
211
  onEventResize,
159
212
  canResizeEvent
160
213
  });
@@ -177,6 +230,7 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
177
230
  const now = resolveNow();
178
231
  const isToday = (0, dayjs.default)(date).isSame(now, "day");
179
232
  const withCurrentTimeIndicator = _withCurrentTimeIndicator ?? isToday;
233
+ const mounted = (0, _mantine_hooks.useMounted)();
180
234
  const [, setTimeIndicatorTick] = (0, react.useState)(0);
181
235
  (0, _mantine_hooks.useInterval)(() => setTimeIndicatorTick((tick) => tick + 1), 6e4, { autoInvoke: true });
182
236
  const timeIndicatorOffset = require_get_current_time_position.getCurrentTimePosition({
@@ -185,7 +239,7 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
185
239
  intervalMinutes,
186
240
  now
187
241
  });
188
- const showTimeIndicator = withCurrentTimeIndicator && require_is_in_time_range.isInTimeRange({
242
+ const showTimeIndicator = mounted && withCurrentTimeIndicator && require_is_in_time_range.isInTimeRange({
189
243
  date: now.toDate(),
190
244
  startTime,
191
245
  endTime
@@ -221,8 +275,9 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
221
275
  intervalMinutes
222
276
  ]);
223
277
  const timeLabels = slots.map((interval) => {
278
+ const intervalTime = (0, dayjs.default)(`${dateStr} ${interval.startTime}`);
224
279
  const label = require_format_date.formatDate({
225
- date: (0, dayjs.default)(`${dateStr} ${interval.startTime}`),
280
+ date: intervalTime,
226
281
  locale: ctx.getLocale(locale),
227
282
  format: slotLabelFormat
228
283
  });
@@ -265,8 +320,20 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
265
320
  });
266
321
  }, []);
267
322
  const getSlotIndexFromDragPoint = (0, react.useCallback)((event, resourceIndex) => {
268
- return require_get_index_from_drag_point.getIndexFromDragPoint(slotsRef.current[resourceIndex] ?? [], event.clientX);
269
- }, []);
323
+ const daySlots = slotsRef.current[resourceIndex] ?? [];
324
+ const index = require_get_index_from_drag_point.getIndexFromDragPoint(daySlots, event.clientX);
325
+ if (index !== null) {
326
+ const rect = daySlots[index]?.getBoundingClientRect();
327
+ if (rect) {
328
+ const rawOffset = dir === "rtl" ? rect.right - event.clientX : event.clientX - rect.left;
329
+ dragOffsetRef.current = {
330
+ offset: Math.max(0, Math.min(rect.width, rawOffset)),
331
+ size: rect.width
332
+ };
333
+ }
334
+ }
335
+ return index;
336
+ }, [dir]);
270
337
  const handleSlotKeyDown = (event, resourceIndex, slotIndex) => {
271
338
  require_handle_resources_grid_key_down.handleResourcesGridKeyDown({
272
339
  controlsRef: slotsRef,
@@ -275,32 +342,21 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
275
342
  event
276
343
  });
277
344
  };
345
+ const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== "static";
278
346
  const rows = orderedResources.map((resource, resourceIndex) => {
279
- const backgroundEventNodes = [...resourceEvents.backgroundTimedEvents[resource.id] || [], ...resourceEvents.backgroundAllDayEvents[resource.id] || []].map((event) => {
280
- const colors = theme.variantColorResolver({
281
- color: event.color || theme.primaryColor,
282
- theme,
283
- variant: "light",
284
- autoContrast: true
285
- });
286
- const bgEventBody = typeof renderEventBody === "function" ? renderEventBody(event) : event.title;
287
- const bgEventProps = {
288
- key: `bg-${event.id}`,
289
- ...getStyles("resourcesDayViewBackgroundEvent", { style: {
290
- left: `${event.position.top}%`,
291
- width: `${event.position.height}%`,
292
- top: 0,
293
- height: "100%"
294
- } }),
295
- __vars: {
296
- "--bg-event-bg": colors.background,
297
- "--bg-event-color": colors.color
298
- },
299
- children: bgEventBody
300
- };
301
- if (typeof renderEvent === "function") return renderEvent(event, bgEventProps);
302
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, { ...bgEventProps });
303
- });
347
+ const backgroundEventNodes = [...resourceEvents.backgroundTimedEvents[resource.id] || [], ...resourceEvents.backgroundAllDayEvents[resource.id] || []].map((event) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ScheduleBackgroundEvent.ScheduleBackgroundEvent, {
348
+ event,
349
+ renderEvent,
350
+ renderEventBody,
351
+ interactive: interactiveBackgroundEvents,
352
+ onEventClick,
353
+ ...getStyles("resourcesDayViewBackgroundEvent", { style: {
354
+ left: `${event.position.top}%`,
355
+ width: `${event.position.height}%`,
356
+ top: 0,
357
+ height: "100%"
358
+ } })
359
+ }, `bg-${event.id}`));
304
360
  const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter((event) => !require_is_all_day_event.isAllDayEvent({
305
361
  event,
306
362
  date
@@ -446,10 +502,16 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
446
502
  onSlotClick: handleTimeSlotClick,
447
503
  onRowSlotsDragOver: (event, resourceId, resIdx) => {
448
504
  const slotIndex = getSlotIndexFromDragPoint(event, resIdx);
449
- if (slotIndex !== null) dragDrop.handleDragOver(event, {
450
- resourceId,
451
- slotIndex
452
- });
505
+ if (slotIndex !== null) {
506
+ dragDrop.handleDragOver(event, {
507
+ resourceId,
508
+ slotIndex
509
+ });
510
+ updateDragPreview({
511
+ resourceId,
512
+ slotIndex
513
+ });
514
+ }
453
515
  },
454
516
  onRowSlotsDragLeave: dragDrop.handleDragLeave,
455
517
  onRowSlotsDrop: (event, resourceId, resIdx) => {
@@ -459,7 +521,7 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
459
521
  slotIndex
460
522
  });
461
523
  },
462
- dropTargetSlotIndex: dragDrop.dropTarget?.resourceId === resource.id ? dragDrop.dropTarget.slotIndex : void 0,
524
+ dropTargetSlotIndex: !suppressDropHighlight && dragDrop.dropTarget?.resourceId === resource.id ? dragDrop.dropTarget.slotIndex : void 0,
463
525
  withDragSlotSelect,
464
526
  onSlotPointerDown: slotDragSelect.handleSlotPointerDown,
465
527
  isSlotDragSelected: slotDragSelect.isSlotSelected,
@@ -475,7 +537,29 @@ const ResourcesDayView = (0, _mantine_core.factory)((_props) => {
475
537
  backgroundEventNodes,
476
538
  allDayEventNodes,
477
539
  regularEvents,
478
- moreEventsForResource
540
+ moreEventsForResource,
541
+ dragDrop.dragPreview?.target.resourceId === resource.id && dragDrop.dragContextValue.draggedEvent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, { ...getStyles("resourcesDayViewDragPreview", { style: (() => {
542
+ const { top, height } = require_get_day_position.getDayPosition({
543
+ event: {
544
+ ...dragDrop.dragContextValue.draggedEvent,
545
+ start: dragDrop.dragPreview.start,
546
+ end: dragDrop.dragPreview.end
547
+ },
548
+ startTime,
549
+ endTime,
550
+ intervalMinutes
551
+ });
552
+ return {
553
+ position: "absolute",
554
+ insetBlockStart: 0,
555
+ insetBlockEnd: 0,
556
+ ...require_get_time_axis_event_style.getTimeAxisEventStyle({
557
+ start: top,
558
+ span: height,
559
+ axis: "horizontal"
560
+ })
561
+ };
562
+ })() }) })
479
563
  ]
480
564
  }, resource.id);
481
565
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ResourcesDayView.cjs","names":["getDayTimeIntervals","getOrderedResources","useDragDropHandlers","calculateDropTime","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","getCurrentTimePosition","isInTimeRange","formatDate","expandRecurringEvents","getResourcesDayViewEvents","Box","getBusinessHoursMod","classes","getIndexFromDragPoint","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesDayViewRow","ScheduleHeaderBase","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineRadius,\n rem,\n ScrollArea,\n ScrollAreaProps,\n StylesApiProps,\n useMantineTheme,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useInterval, useIsomorphicEffect, useMergedRef } from '@mantine/hooks';\nimport { useDragDropHandlers } from '../../hooks/use-drag-drop-handlers';\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize';\nimport { useSlotDragSelect } from '../../hooks/use-slot-drag-select';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types';\nimport {\n calculateDropTime,\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getIndexFromDragPoint,\n getOrderedResources,\n getTimeAxisEventStyle,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n ResourcesGridControlsRef,\n toDateString,\n} from '../../utils';\nimport { DragContext, DragContextValue } from '../DragContext/DragContext';\nimport { MoreEvents, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents';\nimport { RenderEvent, RenderEventBody, ScheduleEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader';\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase';\nimport { ViewSelectProps } from '../ScheduleHeader/ViewSelect/ViewSelect';\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters';\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events';\nimport { ResourcesDayViewRow } from './ResourcesDayViewColumn';\nimport classes from './ResourcesDayView.module.css';\n\nexport type ResourcesDayViewStylesNames =\n | 'resourcesDayView'\n | 'resourcesDayViewRoot'\n | 'resourcesDayViewInner'\n | 'resourcesDayViewTimeLabelsRow'\n | 'resourcesDayViewScrollArea'\n | 'resourcesDayViewCorner'\n | 'resourcesDayViewTimeLabel'\n | 'resourcesDayViewResourceLabel'\n | 'resourcesDayViewRow'\n | 'resourcesDayViewRowSlot'\n | 'resourcesDayViewRowSlots'\n | 'resourcesDayViewBackgroundEvent'\n | 'resourcesDayViewAllDayEvent'\n | 'resourcesDayViewCurrentTimeIndicator'\n | 'resourcesDayViewCurrentTimeIndicatorLine'\n | 'resourcesDayViewCurrentTimeIndicatorThumb'\n | 'resourcesDayViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesDayViewEventWrapper'\n | 'resourcesDayViewResizeHandle'\n | 'resourcesDayViewGroupColumn'\n | 'resourcesDayViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesDayViewCssVariables = {\n resourcesDayView:\n | '--resources-day-view-radius'\n | '--resources-day-view-slot-width'\n | '--resources-day-view-row-height'\n | '--resources-day-view-group-label-width';\n};\n\nexport interface ResourcesDayViewProps\n extends BoxProps, StylesApiProps<ResourcesDayViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Day to display, Date object or date string in `YYYY-MM-DD` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** List of resources to display as rows */\n resources: ScheduleResourceData[];\n\n /** Start time for the day view, in `HH:mm:ss` format @default 00:00:00 */\n startTime?: string;\n\n /** End time for the day view, in `HH:mm:ss` format @default 23:59:59 */\n endTime?: string;\n\n /** Number of minutes for each interval in the day view. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours (e.g. `120`, `240`) @default 60 */\n intervalMinutes?: number;\n\n /** Minimum on-screen size of an event along the time axis, in px. Prevents very short events from collapsing. Larger values make brief events easier to see but extend them past their real start time. @default 1 */\n minEventSize?: number;\n\n /** Dayjs format for slot labels or a callback function that returns formatted value @default HH:mm */\n slotLabelFormat?: DateLabelFormat;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Time to scroll to on initial render, in `HH:mm:ss` format */\n startScrollTime?: string;\n\n /** Props passed down to the `ScrollArea` component */\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** If set, displays a vertical line indicating the current time. By default, displayed only for the current day. */\n withCurrentTimeIndicator?: boolean;\n\n /** If set, the time indicator displays the current time in the bubble @default true */\n withCurrentTimeBubble?: boolean;\n\n /** A function to get the current time, called on every tick. Can be used to display the current time indicator in a different timezone. @default () => dayjs() */\n getCurrentTime?: () => AnyDateValue;\n\n /** If set, the header is displayed @default true */\n withHeader?: boolean;\n\n /** Called when view level select button is clicked */\n onViewChange?: (view: ScheduleViewLevel) => void;\n\n /** Props passed to previous control */\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to next control */\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to today control */\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to view level select */\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n\n /** Dayjs format for header label @default 'MMMM D, YYYY' */\n headerFormat?: DateLabelFormat;\n\n /** List of events to display */\n events?: ScheduleEventData[];\n\n /** Width of each time slot column @default 80px */\n slotWidth?: React.CSSProperties['width'];\n\n /** Height of each resource row @default 64px */\n rowHeight?: React.CSSProperties['height'];\n\n /** Labels override */\n labels?: ScheduleLabelsOverride;\n\n /** If set to true, highlights business hours with white background @default false */\n highlightBusinessHours?: boolean;\n\n /** Business hours range in `HH:mm:ss` format @default ['09:00:00', '17:00:00'] */\n businessHours?: [string, string];\n\n /** Function to customize event body */\n renderEventBody?: RenderEventBody;\n\n /** Function to fully customize event rendering */\n renderEvent?: RenderEvent;\n\n /** Function to customize resource label rendering */\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n\n /** List of resource groups to display as a column to the left of resource labels */\n groups?: ScheduleResourceGroup[];\n\n /** Function to customize group label rendering */\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n\n /** Width of the group label column @default 80px */\n groupLabelWidth?: React.CSSProperties['width'];\n\n /** If true, events can be dragged and dropped @default false */\n withEventsDragAndDrop?: boolean;\n\n /** Called when event is dropped at new time, includes target resourceId */\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n\n /** Function to determine if event can be dragged */\n canDragEvent?: (event: ScheduleEventData) => boolean;\n\n /** Called when any event drag starts */\n onEventDragStart?: (event: ScheduleEventData) => void;\n\n /** Called when any event drag ends */\n onEventDragEnd?: () => void;\n\n /** Called when time slot is clicked, includes resourceId */\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, enables drag-to-select time slot ranges @default false */\n withDragSlotSelect?: boolean;\n\n /** Called when a time slot range is selected by dragging, includes resourceId */\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** Interaction mode @default default */\n mode?: ScheduleMode;\n\n /** Called when an external item is dropped onto the schedule */\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** If true, events can be resized by dragging their left/right edges @default false */\n withEventResize?: boolean;\n\n /** Called when event is resized */\n onEventResize?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => void;\n\n /** Function to determine if event can be resized */\n canResizeEvent?: (event: ScheduleEventData) => boolean;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n\n /** Maximum number of events visible per time slot before \"+more\" indicator shows, minimum value is 1 @default 2 */\n maxEventsPerTimeSlot?: number;\n\n /** Props passed down to `MoreEvents` component */\n moreEventsProps?: Partial<MoreEventsProps>;\n}\n\nexport type ResourcesDayViewFactory = Factory<{\n props: ResourcesDayViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesDayViewStylesNames;\n vars: ResourcesDayViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesDayView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withDragSlotSelect: false,\n withEventResize: false,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n} satisfies Partial<ResourcesDayViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesDayViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-day-view-slot-width': rem(slotWidth),\n '--resources-day-view-row-height': rem(rowHeight),\n '--resources-day-view-group-label-width': rem(groupLabelWidth),\n },\n })\n);\n\nexport const ResourcesDayView = factory<ResourcesDayViewFactory>((_props) => {\n const props = useProps('ResourcesDayView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n attributes,\n vars,\n startTime,\n endTime,\n date,\n onDateChange,\n resources,\n intervalMinutes,\n minEventSize,\n slotLabelFormat,\n radius,\n startScrollTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble = true,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n headerFormat,\n events,\n slotWidth,\n rowHeight,\n labels,\n highlightBusinessHours,\n businessHours,\n renderEventBody,\n renderEvent,\n renderResourceLabel,\n groups,\n renderGroupLabel,\n groupLabelWidth,\n withEventsDragAndDrop,\n onEventDrop,\n canDragEvent,\n onEventDragStart,\n onEventDragEnd,\n onTimeSlotClick,\n onEventClick,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n withEventResize,\n onEventResize,\n canResizeEvent,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesDayViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'resourcesDayView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesDayViewFactory>({\n classNames,\n styles,\n props,\n });\n\n const stylesApiProps = {\n classNames: resolvedClassNames,\n styles: resolvedStyles,\n attributes,\n __staticSelector,\n radius,\n };\n\n const theme = useMantineTheme();\n const [scrolled, setScrolled] = useState(false);\n const [scrolledX, setScrolledX] = useState(false);\n const ctx = useDatesContext();\n const slots = getDayTimeIntervals({ startTime, endTime, intervalMinutes });\n const { orderedResources, groupRanges, resourceGroupMap } = useMemo(\n () => getOrderedResources(resources, groups),\n [resources, groups]\n );\n const hasGroups = groupRanges.length > 0;\n\n type DropTargetSlot = { resourceId: string | number; slotIndex: number };\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime: `${slotDate} ${slots[target.slotIndex].startTime}`,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, slots, date]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const handleInternalEventDrop = useCallback(\n (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => {\n onEventDrop?.({ ...data, resourceId: lastDropResourceId.current });\n },\n [onEventDrop]\n );\n\n const dragDrop = useDragDropHandlers<DropTargetSlot>({\n enabled: withEventsDragAndDrop,\n mode,\n onEventDrop: handleInternalEventDrop,\n canDragEvent,\n onEventDragStart,\n onEventDragEnd,\n calculateDropTarget: (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n lastDropResourceId.current = target.resourceId;\n const slotTime = slots[target.slotIndex].startTime;\n return calculateDropTime({\n draggedEvent,\n targetDate: dayjs(date).format('YYYY-MM-DD'),\n targetSlotTime: slotTime,\n intervalMinutes,\n });\n },\n onExternalDrop: onExternalEventDrop ? handleExternalDrop : undefined,\n });\n\n const groupToResourceId = useMemo(() => getGroupToResourceIdMap(resources), [resources]);\n\n const slotDragSelect = useSlotDragSelect({\n enabled: withDragSlotSelect && mode !== 'static',\n onDragEnd: (startIndex, endIndex, group) => {\n if (!onSlotDragEnd) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n onSlotDragEnd({\n rangeStart: `${slotDate} ${slots[startIndex].startTime}`,\n rangeEnd: `${slotDate} ${slots[endIndex].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\n },\n });\n\n const eventResize = useHorizontalEventResize({\n enabled: withEventResize,\n mode,\n startTime,\n endTime,\n intervalMinutes,\n onEventResize,\n canResizeEvent,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n\n const slot = slots[slotIndex];\n onTimeSlotClick({\n slotStart: `${slotDate} ${slot.startTime}`,\n slotEnd: `${slotDate} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const dateStr = dayjs(date).format('YYYY-MM-DD');\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = dayjs(date).isSame(now, 'day');\n const withCurrentTimeIndicator = _withCurrentTimeIndicator ?? isToday;\n\n const [, setTimeIndicatorTick] = useState(0);\n useInterval(() => setTimeIndicatorTick((tick) => tick + 1), 60000, { autoInvoke: true });\n const timeIndicatorOffset = getCurrentTimePosition({ startTime, endTime, intervalMinutes, now });\n const showTimeIndicator =\n withCurrentTimeIndicator && isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\n\n const expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('day').toDate(),\n rangeEnd: dayjs(date).endOf('day').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, date, recurrenceExpansionLimit]\n );\n\n const resourceEvents = useMemo(\n () =>\n getResourcesDayViewEvents({\n date,\n events: expandedEvents,\n resources,\n startTime,\n endTime,\n intervalMinutes,\n }),\n [date, expandedEvents, resources, startTime, endTime, intervalMinutes]\n );\n\n const timeLabels = slots.map((interval) => {\n const intervalTime = dayjs(`${dateStr} ${interval.startTime}`);\n const label = formatDate({\n date: intervalTime,\n locale: ctx.getLocale(locale),\n format: slotLabelFormat,\n });\n\n return (\n <Box\n {...getStyles('resourcesDayViewTimeLabel')}\n key={interval.startTime}\n mod={{\n 'hour-start': interval.isHourStart,\n ...getBusinessHoursMod({\n time: interval.startTime,\n businessHours,\n highlightBusinessHours,\n }),\n }}\n >\n {label}\n </Box>\n );\n });\n\n const slotsRef: ResourcesGridControlsRef = useRef<HTMLButtonElement[][]>([]);\n const rowSlotsContainersRef = useRef<(HTMLDivElement | null)[]>([]);\n const viewportRef = useRef<HTMLDivElement>(null);\n const mergedViewportRef = useMergedRef(viewportRef, scrollAreaProps?.viewportRef);\n\n const firstSlotIndex = { resourceIndex: 0, slotIndex: 0 };\n\n useIsomorphicEffect(() => {\n if (!startScrollTime || !viewportRef.current) {\n return;\n }\n\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n\n const targetIndex = slots.findIndex((s) => s.startTime >= startScrollTime);\n if (targetIndex < 0) {\n return;\n }\n\n const targetSlot = firstResourceSlots[targetIndex];\n if (!targetSlot) {\n return;\n }\n\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesDayViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left - labelWidth,\n top: 0,\n });\n }, []);\n\n const getSlotIndexFromDragPoint = useCallback((event: React.DragEvent, resourceIndex: number) => {\n return getIndexFromDragPoint(slotsRef.current[resourceIndex] ?? [], event.clientX);\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 rows = orderedResources.map((resource, resourceIndex) => {\n const allBgEvents = [\n ...(resourceEvents.backgroundTimedEvents[resource.id] || []),\n ...(resourceEvents.backgroundAllDayEvents[resource.id] || []),\n ];\n\n // oxlint-disable-next-line react/jsx-key\n const backgroundEventNodes = allBgEvents.map((event) => {\n const colors = theme.variantColorResolver({\n color: event.color || theme.primaryColor,\n theme,\n variant: 'light',\n autoContrast: true,\n });\n\n const bgEventBody =\n typeof renderEventBody === 'function' ? renderEventBody(event) : event.title;\n\n const bgEventProps = {\n key: `bg-${event.id}`,\n ...getStyles('resourcesDayViewBackgroundEvent', {\n style: {\n left: `${event.position.top}%`,\n width: `${event.position.height}%`,\n top: 0,\n height: '100%',\n },\n }),\n __vars: {\n '--bg-event-bg': colors.background,\n '--bg-event-color': colors.color,\n },\n children: bgEventBody,\n };\n\n if (typeof renderEvent === 'function') {\n return renderEvent(event, bgEventProps as any);\n }\n\n return <Box {...bgEventProps} />;\n });\n\n const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date })\n );\n\n const visibleRegularEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n const regularEvents = visibleRegularEvents.map((event) => {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const eventLeft = resizePosition ? resizePosition.left : event.position.top;\n const eventWidth = resizePosition ? resizePosition.width : event.position.height;\n\n const adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventColors = isResizable\n ? theme.variantColorResolver({\n color: event.color || theme.primaryColor,\n theme,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n : null;\n\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n return (\n <Box\n key={event.id}\n {...getStyles('resourcesDayViewEventWrapper')}\n __vars={eventColors ? { '--event-color': eventColors.color } : undefined}\n data-resizing={isThisEventResizing || undefined}\n style={{\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n minSize: minEventSize,\n }),\n top: adjustPosition\n ? `calc((100% - 22px) * ${event.position.column} / ${maxEventsPerTimeSlot})`\n : `${event.position.offset}%`,\n height: adjustPosition\n ? `calc((100% - 22px) / ${maxEventsPerTimeSlot})`\n : `${event.position.width}%`,\n }}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n draggable={isDraggable}\n isResizing={isThisEventResizing}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={\n onEventClick\n ? (e) => {\n if (!eventResize.wasResizing()) {\n onEventClick(event, e);\n }\n }\n : undefined\n }\n style={{ width: '100%', height: '100%', padding: 0 }}\n />\n {isResizable && mode !== 'static' && (\n <>\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"start\"\n data-active={activeEdge === 'start' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'start',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"end\"\n data-active={activeEdge === 'end' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n });\n\n const allDayEvents = resourceEvents.allDayEvents[resource.id] || [];\n\n const allDayEventNodes = allDayEvents.map((event, index) => (\n <Box\n key={`all-day-${event.id}`}\n {...getStyles('resourcesDayViewAllDayEvent', {\n style: {\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(event, e) : undefined}\n style={{ width: '100%', height: '100%' }}\n />\n </Box>\n ));\n\n const moreEventsForResource =\n maxEventsPerTimeSlot !== undefined\n ? getOverlapClusters(allRegularEvents)\n .filter((cluster) => cluster.some((e) => e.position.column >= maxEventsPerTimeSlot))\n .map((cluster) => {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n const leftPercent = Math.min(...cluster.map((e) => e.position.top));\n const rightPercent = Math.max(\n ...cluster.map((e) => e.position.top + e.position.height)\n );\n\n return (\n <MoreEvents\n key={`more-${cluster[0].id}`}\n events={cluster}\n moreEventsCount={hiddenCount}\n mode={mode}\n labels={labels}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n onEventClick={onEventClick}\n style={{\n position: 'absolute',\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${rightPercent - leftPercent}% - 2px)`,\n bottom: 0,\n height: '22px',\n paddingInline: 4,\n zIndex: 4,\n }}\n {...stylesApiProps}\n {...moreEventsProps}\n />\n );\n })\n : [];\n\n return (\n <ResourcesDayViewRow\n key={resource.id}\n resource={resource}\n resourceIndex={resourceIndex}\n date={dateStr}\n slots={slots}\n getStyles={getStyles}\n labels={labels}\n highlightBusinessHours={highlightBusinessHours}\n businessHours={businessHours}\n withEventsDragAndDrop={withDragHandlers}\n mode={mode}\n slotsRef={slotsRef}\n firstSlotIndex={firstSlotIndex}\n onSlotKeyDown={handleSlotKeyDown}\n onSlotClick={handleTimeSlotClick}\n onRowSlotsDragOver={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDragOver(event, { resourceId, slotIndex });\n }\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 dragDrop.dropTarget?.resourceId === resource.id\n ? dragDrop.dropTarget.slotIndex\n : undefined\n }\n withDragSlotSelect={withDragSlotSelect}\n onSlotPointerDown={slotDragSelect.handleSlotPointerDown}\n isSlotDragSelected={slotDragSelect.isSlotSelected}\n rowSlotsContainerRef={(node) => {\n rowSlotsContainersRef.current[resourceIndex] = node;\n }}\n renderResourceLabel={renderResourceLabel}\n renderGroupLabel={renderGroupLabel}\n scrolledX={scrolledX}\n groupInfo={hasGroups ? resourceGroupMap[resourceIndex] : undefined}\n allDayCount={allDayEvents.length}\n >\n {backgroundEventNodes}\n {allDayEventNodes}\n {regularEvents}\n {moreEventsForResource}\n </ResourcesDayViewRow>\n );\n });\n\n const headerLabel = formatDate({\n date: dayjs(date),\n locale: ctx.getLocale(locale),\n format: headerFormat,\n });\n\n const content = (\n <Box\n {...getStyles('resourcesDayView')}\n mod={{\n static: mode === 'static',\n 'slot-dragging': slotDragSelect.isDragging,\n resizing: eventResize.isResizing,\n 'event-interaction': eventResize.isResizing || dragDrop.dragContextValue.isDragging,\n }}\n {...others}\n >\n {withHeader && (\n <ScheduleHeaderBase\n view=\"day\"\n navigationHandlers={{\n previous: () => toDateString(dayjs(date).subtract(1, 'day')),\n next: () => toDateString(dayjs(date).add(1, 'day')),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 140,\n title: headerLabel,\n }}\n labels={labels}\n onDateChange={onDateChange}\n onViewChange={onViewChange}\n previousControlProps={previousControlProps}\n nextControlProps={nextControlProps}\n todayControlProps={todayControlProps}\n viewSelectProps={{ views: ['day', 'week', 'month'] as const, ...viewSelectProps }}\n stylesApiProps={stylesApiProps}\n />\n )}\n\n <Box {...getStyles('resourcesDayViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesDayViewScrollArea', {\n className: scrollAreaProps?.className,\n style: scrollAreaProps?.style,\n })}\n onScrollPositionChange={(position) => {\n scrollAreaProps?.onScrollPositionChange?.(position);\n setScrolled(position.y !== 0);\n setScrolledX(position.x !== 0);\n }}\n viewportRef={mergedViewportRef}\n >\n <div {...getStyles('resourcesDayViewInner')}>\n <Box {...getStyles('resourcesDayViewTimeLabelsRow')} mod={{ scrolled }}>\n <div\n {...getStyles('resourcesDayViewCorner')}\n key=\"corner\"\n style={\n hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n }\n : undefined\n }\n >\n {getLabel('resources', labels)}\n </div>\n {timeLabels}\n </Box>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesDayViewCurrentTimeIndicator')}\n __vars={{\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width) + (100% - var(--resources-day-view-resource-label-width) - var(--resources-day-view-group-label-width)) * ${timeIndicatorOffset} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${timeIndicatorOffset} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorLine')} />\n </Box>\n )}\n </div>\n </ScrollArea>\n </Box>\n </Box>\n );\n\n const dragContextValue = useMemo<DragContextValue>(\n () => dragDrop.dragContextValue,\n [dragDrop.dragContextValue]\n );\n\n if (withEventsDragAndDrop) {\n return <DragContext.Provider value={dragContextValue}>{content}</DragContext.Provider>;\n }\n\n return content;\n});\n\nResourcesDayView.displayName = '@mantine/schedule/ResourcesDayView';\nResourcesDayView.classes = classes;\nResourcesDayView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgSA,MAAM,eAAe;CACnB,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,cAAc;CACd,wBAAwB;CACxB,eAAe,CAAC,YAAY,UAAU;CACtC,uBAAuB;CACvB,oBAAoB;CACpB,iBAAiB;CACjB,MAAM;CACN,sBAAsB;AACxB;AAEA,MAAM,gBAAA,GAAA,cAAA,mBAAA,EACH,QAAQ,EAAE,QAAQ,WAAW,WAAW,uBAAuB,EAC9D,kBAAkB;CAChB,+BAA+B,UAAA,GAAA,cAAA,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version":3,"file":"ResourcesDayView.cjs","names":["createVarsResolver","getRadius","rem","factory","useProps","useStyles","useResolvedStylesApi","useMantineTheme","useDirection","useState","useDatesContext","getDayTimeIntervals","useMemo","getOrderedResources","useRef","useCallback","calculateDropTime","useDragDropHandlers","getGroupToResourceIdMap","useSlotDragSelect","useHorizontalEventResize","useMounted","getCurrentTimePosition","isInTimeRange","formatDate","expandRecurringEvents","getResourcesDayViewEvents","Box","getBusinessHoursMod","useMergedRef","classes","getIndexFromDragPoint","ScheduleBackgroundEvent","isAllDayEvent","getTimeAxisEventStyle","ScheduleEvent","getOverlapClusters","MoreEvents","ResourcesDayViewRow","getDayPosition","ScheduleHeaderBase","toDateString","ScrollArea","getLabel","DragContext"],"sources":["../../../src/components/ResourcesDayView/ResourcesDayView.tsx"],"sourcesContent":["import dayjs from 'dayjs';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineRadius,\n rem,\n ScrollArea,\n ScrollAreaProps,\n StylesApiProps,\n useDirection,\n useMantineTheme,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '@mantine/core';\nimport { useDatesContext } from '@mantine/dates';\nimport { useInterval, useIsomorphicEffect, useMergedRef, useMounted } from '@mantine/hooks';\nimport { useDragDropHandlers } from '../../hooks/use-drag-drop-handlers';\nimport { useHorizontalEventResize } from '../../hooks/use-horizontal-event-resize';\nimport { useSlotDragSelect } from '../../hooks/use-slot-drag-select';\nimport { getLabel, ScheduleLabelsOverride } from '../../labels';\nimport {\n AnyDateValue,\n DateLabelFormat,\n DateStringValue,\n DateTimeStringValue,\n ScheduleEventData,\n ScheduleMode,\n ScheduleResourceData,\n ScheduleResourceGroup,\n ScheduleViewLevel,\n} from '../../types';\nimport {\n calculateDropTime,\n expandRecurringEvents,\n formatDate,\n getBusinessHoursMod,\n getDayPosition,\n getCurrentTimePosition,\n getDayTimeIntervals,\n getGroupToResourceIdMap,\n getIndexFromDragPoint,\n getOrderedResources,\n getTimeAxisEventStyle,\n handleResourcesGridKeyDown,\n isAllDayEvent,\n isInTimeRange,\n ResourcesGridControlsRef,\n toDateString,\n} from '../../utils';\nimport { DragContext, DragContextValue } from '../DragContext/DragContext';\nimport { MoreEvents, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents';\nimport { ScheduleBackgroundEvent } from '../ScheduleBackgroundEvent';\nimport { RenderEvent, RenderEventBody, ScheduleEvent } from '../ScheduleEvent/ScheduleEvent';\nimport { CombinedScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader';\nimport { ScheduleHeaderBase } from '../ScheduleHeader/ScheduleHeaderBase';\nimport { ViewSelectProps } from '../ScheduleHeader/ViewSelect/ViewSelect';\nimport { getOverlapClusters } from './get-overlap-clusters/get-overlap-clusters';\nimport { getResourcesDayViewEvents } from './get-resources-day-view-events/get-resources-day-view-events';\nimport { ResourcesDayViewRow } from './ResourcesDayViewColumn';\nimport classes from './ResourcesDayView.module.css';\n\nexport type ResourcesDayViewStylesNames =\n | 'resourcesDayView'\n | 'resourcesDayViewRoot'\n | 'resourcesDayViewInner'\n | 'resourcesDayViewTimeLabelsRow'\n | 'resourcesDayViewScrollArea'\n | 'resourcesDayViewCorner'\n | 'resourcesDayViewTimeLabel'\n | 'resourcesDayViewResourceLabel'\n | 'resourcesDayViewRow'\n | 'resourcesDayViewRowSlot'\n | 'resourcesDayViewRowSlots'\n | 'resourcesDayViewBackgroundEvent'\n | 'resourcesDayViewAllDayEvent'\n | 'resourcesDayViewCurrentTimeIndicator'\n | 'resourcesDayViewCurrentTimeIndicatorLine'\n | 'resourcesDayViewCurrentTimeIndicatorThumb'\n | 'resourcesDayViewCurrentTimeIndicatorTimeBubble'\n | 'resourcesDayViewEventWrapper'\n | 'resourcesDayViewDragPreview'\n | 'resourcesDayViewResizeHandle'\n | 'resourcesDayViewGroupColumn'\n | 'resourcesDayViewGroupColumnEmpty'\n | MoreEventsStylesNames\n | CombinedScheduleHeaderStylesNames;\n\nexport type ResourcesDayViewCssVariables = {\n resourcesDayView:\n | '--resources-day-view-radius'\n | '--resources-day-view-slot-width'\n | '--resources-day-view-row-height'\n | '--resources-day-view-group-label-width';\n};\n\nexport interface ResourcesDayViewProps\n extends BoxProps, StylesApiProps<ResourcesDayViewFactory>, ElementProps<'div'> {\n __staticSelector?: string;\n\n /** Day to display, Date object or date string in `YYYY-MM-DD` format */\n date: Date | string;\n\n /** Called with the new date value when a date is selected */\n onDateChange?: (value: DateStringValue) => void;\n\n /** List of resources to display as rows */\n resources: ScheduleResourceData[];\n\n /** Start time for the day view, in `HH:mm:ss` format @default 00:00:00 */\n startTime?: string;\n\n /** End time for the day view, in `HH:mm:ss` format @default 23:59:59 */\n endTime?: string;\n\n /** Number of minutes for each interval in the day view. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours (e.g. `120`, `240`) @default 60 */\n intervalMinutes?: number;\n\n /** Minimum on-screen size of an event along the time axis, in px. Prevents very short events from collapsing. Larger values make brief events easier to see but extend them past their real start time. @default 1 */\n minEventSize?: number;\n\n /** Dayjs format for slot labels or a callback function that returns formatted value @default HH:mm */\n slotLabelFormat?: DateLabelFormat;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Time to scroll to on initial render, in `HH:mm:ss` format */\n startScrollTime?: string;\n\n /** Props passed down to the `ScrollArea` component */\n scrollAreaProps?: Partial<ScrollAreaProps> & DataAttributes;\n\n /** Locale passed down to dayjs, overrides value defined on `DatesProvider` */\n locale?: string;\n\n /** If set, displays a vertical line indicating the current time. By default, displayed only for the current day. */\n withCurrentTimeIndicator?: boolean;\n\n /** If set, the time indicator displays the current time in the bubble @default true */\n withCurrentTimeBubble?: boolean;\n\n /** A function to get the current time, called on every tick. Can be used to display the current time indicator in a different timezone. @default () => dayjs() */\n getCurrentTime?: () => AnyDateValue;\n\n /** If set, the header is displayed @default true */\n withHeader?: boolean;\n\n /** Called when view level select button is clicked */\n onViewChange?: (view: ScheduleViewLevel) => void;\n\n /** Props passed to previous control */\n previousControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to next control */\n nextControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to today control */\n todayControlProps?: React.ComponentProps<'button'> & DataAttributes;\n\n /** Props passed to view level select */\n viewSelectProps?: Partial<ViewSelectProps> & DataAttributes;\n\n /** Dayjs format for header label @default 'MMMM D, YYYY' */\n headerFormat?: DateLabelFormat;\n\n /** List of events to display */\n events?: ScheduleEventData[];\n\n /** Width of each time slot column @default 80px */\n slotWidth?: React.CSSProperties['width'];\n\n /** Height of each resource row @default 64px */\n rowHeight?: React.CSSProperties['height'];\n\n /** Labels override */\n labels?: ScheduleLabelsOverride;\n\n /** If set to true, highlights business hours with white background @default false */\n highlightBusinessHours?: boolean;\n\n /** Business hours range in `HH:mm:ss` format @default ['09:00:00', '17:00:00'] */\n businessHours?: [string, string];\n\n /** Function to customize event body */\n renderEventBody?: RenderEventBody;\n\n /** Function to fully customize event rendering */\n renderEvent?: RenderEvent;\n\n /** Function to customize resource label rendering */\n renderResourceLabel?: (resource: ScheduleResourceData) => React.ReactNode;\n\n /** List of resource groups to display as a column to the left of resource labels */\n groups?: ScheduleResourceGroup[];\n\n /** Function to customize group label rendering */\n renderGroupLabel?: (group: ScheduleResourceGroup) => React.ReactNode;\n\n /** Width of the group label column @default 80px */\n groupLabelWidth?: React.CSSProperties['width'];\n\n /** If true, events can be dragged and dropped @default false */\n withEventsDragAndDrop?: boolean;\n\n /** Called when event is dropped at new time, includes target resourceId */\n onEventDrop?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n resourceId?: string | number;\n }) => void;\n\n /** Function to determine if event can be dragged */\n canDragEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for moving events by drag and drop, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventDragInterval?: number;\n\n /** Called when any event drag starts */\n onEventDragStart?: (event: ScheduleEventData) => void;\n\n /** Called when any event drag ends */\n onEventDragEnd?: () => void;\n\n /** Called when time slot is clicked, includes resourceId */\n onTimeSlotClick?: (data: {\n slotStart: DateTimeStringValue;\n slotEnd: DateTimeStringValue;\n nativeEvent: React.MouseEvent<HTMLButtonElement>;\n resourceId?: string | number;\n }) => void;\n\n /** Called when event is clicked */\n onEventClick?: (event: ScheduleEventData, e: React.MouseEvent<HTMLButtonElement>) => void;\n\n /** If set, background events (`display: 'background'`) can be clicked and trigger `onEventClick` @default false */\n withInteractiveBackgroundEvents?: boolean;\n\n /** If set, enables drag-to-select time slot ranges @default false */\n withDragSlotSelect?: boolean;\n\n /** Called when a time slot range is selected by dragging, includes resourceId */\n onSlotDragEnd?: (data: {\n rangeStart: DateTimeStringValue;\n rangeEnd: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** Interaction mode @default default */\n mode?: ScheduleMode;\n\n /** Called when an external item is dropped onto the schedule */\n onExternalEventDrop?: (data: {\n dataTransfer: DataTransfer;\n dropDateTime: DateTimeStringValue;\n resourceId?: string | number;\n }) => void;\n\n /** If true, events can be resized by dragging their left/right edges @default false */\n withEventResize?: boolean;\n\n /** Called when event is resized */\n onEventResize?: (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => void;\n\n /** Function to determine if event can be resized */\n canResizeEvent?: (event: ScheduleEventData) => boolean;\n\n /** Snap step for resizing events, in minutes. Must divide evenly into an hour (e.g. `15`, `30`) or be a whole number of hours. When not set, `intervalMinutes` is used. @default intervalMinutes */\n eventResizeInterval?: number;\n\n /** Max number of generated recurring instances per recurring series @default 2000 */\n recurrenceExpansionLimit?: number;\n\n /** Maximum number of events visible per time slot before \"+more\" indicator shows, minimum value is 1 @default 2 */\n maxEventsPerTimeSlot?: number;\n\n /** Props passed down to `MoreEvents` component */\n moreEventsProps?: Partial<MoreEventsProps>;\n}\n\nexport type ResourcesDayViewFactory = Factory<{\n props: ResourcesDayViewProps;\n ref: HTMLDivElement;\n stylesNames: ResourcesDayViewStylesNames;\n vars: ResourcesDayViewCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'ResourcesDayView',\n startTime: '00:00:00',\n endTime: '23:59:59',\n slotLabelFormat: 'HH:mm',\n intervalMinutes: 60,\n minEventSize: 1,\n withHeader: true,\n headerFormat: 'MMMM D, YYYY',\n highlightBusinessHours: false,\n businessHours: ['09:00:00', '17:00:00'],\n withEventsDragAndDrop: false,\n withDragSlotSelect: false,\n withEventResize: false,\n mode: 'default',\n maxEventsPerTimeSlot: 2,\n withInteractiveBackgroundEvents: false,\n} satisfies Partial<ResourcesDayViewProps>;\n\nconst varsResolver = createVarsResolver<ResourcesDayViewFactory>(\n (_theme, { radius, slotWidth, rowHeight, groupLabelWidth }) => ({\n resourcesDayView: {\n '--resources-day-view-radius': radius ? getRadius(radius) : undefined,\n '--resources-day-view-slot-width': rem(slotWidth),\n '--resources-day-view-row-height': rem(rowHeight),\n '--resources-day-view-group-label-width': rem(groupLabelWidth),\n },\n })\n);\n\nexport const ResourcesDayView = factory<ResourcesDayViewFactory>((_props) => {\n const props = useProps('ResourcesDayView', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n attributes,\n vars,\n startTime,\n endTime,\n date,\n onDateChange,\n resources,\n intervalMinutes,\n minEventSize,\n slotLabelFormat,\n radius,\n startScrollTime,\n scrollAreaProps,\n locale,\n withCurrentTimeIndicator: _withCurrentTimeIndicator,\n withCurrentTimeBubble = true,\n getCurrentTime,\n __staticSelector,\n withHeader,\n onViewChange,\n previousControlProps,\n nextControlProps,\n todayControlProps,\n viewSelectProps,\n headerFormat,\n events,\n slotWidth,\n rowHeight,\n labels,\n highlightBusinessHours,\n businessHours,\n renderEventBody,\n renderEvent,\n renderResourceLabel,\n groups,\n renderGroupLabel,\n groupLabelWidth,\n withEventsDragAndDrop,\n onEventDrop,\n canDragEvent,\n eventDragInterval,\n onEventDragStart,\n onEventDragEnd,\n onTimeSlotClick,\n onEventClick,\n withInteractiveBackgroundEvents,\n withDragSlotSelect,\n onSlotDragEnd,\n mode,\n onExternalEventDrop,\n withEventResize,\n onEventResize,\n canResizeEvent,\n eventResizeInterval,\n recurrenceExpansionLimit,\n maxEventsPerTimeSlot: _maxEventsPerTimeSlot,\n moreEventsProps,\n ...others\n } = props;\n\n const maxEventsPerTimeSlot =\n _maxEventsPerTimeSlot !== undefined ? Math.max(1, _maxEventsPerTimeSlot) : undefined;\n\n const getStyles = useStyles<ResourcesDayViewFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'resourcesDayView',\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ResourcesDayViewFactory>({\n classNames,\n styles,\n props,\n });\n\n const stylesApiProps = {\n classNames: resolvedClassNames,\n styles: resolvedStyles,\n attributes,\n __staticSelector,\n radius,\n };\n\n const theme = useMantineTheme();\n const { dir } = useDirection();\n const [scrolled, setScrolled] = useState(false);\n const [scrolledX, setScrolledX] = useState(false);\n const ctx = useDatesContext();\n const slots = getDayTimeIntervals({ startTime, endTime, intervalMinutes });\n const { orderedResources, groupRanges, resourceGroupMap } = useMemo(\n () => getOrderedResources(resources, groups),\n [resources, groups]\n );\n const hasGroups = groupRanges.length > 0;\n\n type DropTargetSlot = { resourceId: string | number; slotIndex: number };\n\n const dragOffsetRef = useRef<{ offset: number; size: number }>({ offset: 0, size: 0 });\n\n const handleExternalDrop = useCallback(\n (e: React.DragEvent, target: DropTargetSlot) => {\n if (!onExternalEventDrop) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotTime = slots[target.slotIndex].startTime;\n let dropDateTime: string = `${slotDate} ${slotTime}`;\n\n if (eventDragInterval != null) {\n const { start } = calculateDropTime({\n draggedEvent: { start: dropDateTime, end: dropDateTime } as ScheduleEventData,\n targetDate: slotDate,\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: dragOffsetRef.current.offset,\n slotSize: dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n dropDateTime = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n }\n\n onExternalEventDrop({\n dataTransfer: e.dataTransfer,\n dropDateTime,\n resourceId: target.resourceId,\n });\n },\n [onExternalEventDrop, slots, date, eventDragInterval, intervalMinutes, startTime, endTime]\n );\n\n const lastDropResourceId = useRef<string | number | undefined>(undefined);\n\n const getDropTimeForSlot = (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n const slotTime = slots[target.slotIndex].startTime;\n return calculateDropTime({\n draggedEvent,\n targetDate: dayjs(date).format('YYYY-MM-DD'),\n targetSlotTime: slotTime,\n intervalMinutes,\n dragIntervalMinutes: eventDragInterval,\n slotOffset: eventDragInterval == null ? undefined : dragOffsetRef.current.offset,\n slotSize: eventDragInterval == null ? undefined : dragOffsetRef.current.size,\n startTime,\n endTime,\n });\n };\n\n const handleInternalEventDrop = useCallback(\n (data: {\n eventId: string | number;\n newStart: DateTimeStringValue;\n newEnd: DateTimeStringValue;\n event: ScheduleEventData;\n }) => {\n onEventDrop?.({ ...data, resourceId: lastDropResourceId.current });\n },\n [onEventDrop]\n );\n\n const dragDrop = useDragDropHandlers<DropTargetSlot>({\n enabled: withEventsDragAndDrop,\n mode,\n onEventDrop: handleInternalEventDrop,\n canDragEvent,\n onEventDragStart,\n onEventDragEnd,\n calculateDropTarget: (target: DropTargetSlot, draggedEvent: ScheduleEventData) => {\n lastDropResourceId.current = target.resourceId;\n return getDropTimeForSlot(target, draggedEvent);\n },\n onExternalDrop: onExternalEventDrop ? handleExternalDrop : undefined,\n });\n\n const updateDragPreview = (target: DropTargetSlot) => {\n const draggedEvent = dragDrop.dragContextValue.draggedEvent;\n if (eventDragInterval == null || !draggedEvent) {\n return;\n }\n const { start, end } = getDropTimeForSlot(target, draggedEvent);\n const newStart = dayjs(start).format('YYYY-MM-DD HH:mm:ss');\n if (\n dragDrop.dragPreview?.start !== newStart ||\n dragDrop.dragPreview?.target.resourceId !== target.resourceId\n ) {\n dragDrop.setDragPreview({\n start: newStart,\n end: dayjs(end).format('YYYY-MM-DD HH:mm:ss'),\n target,\n });\n }\n };\n\n const suppressDropHighlight = eventDragInterval != null && dragDrop.dragContextValue.isDragging;\n\n const groupToResourceId = useMemo(() => getGroupToResourceIdMap(resources), [resources]);\n\n const slotDragSelect = useSlotDragSelect({\n enabled: withDragSlotSelect && mode !== 'static',\n onDragEnd: (startIndex, endIndex, group) => {\n if (!onSlotDragEnd) {\n return;\n }\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n onSlotDragEnd({\n rangeStart: `${slotDate} ${slots[startIndex].startTime}`,\n rangeEnd: `${slotDate} ${slots[endIndex].endTime}`,\n resourceId: groupToResourceId.get(group) ?? group,\n });\n },\n });\n\n const eventResize = useHorizontalEventResize({\n enabled: withEventResize,\n mode,\n startTime,\n endTime,\n intervalMinutes,\n resizeIntervalMinutes: eventResizeInterval,\n onEventResize,\n canResizeEvent,\n });\n\n const withDragHandlers = (withEventsDragAndDrop || !!onExternalEventDrop) && mode !== 'static';\n\n const handleTimeSlotClick = (\n resourceId: string | number,\n slotTime: string,\n e: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!onTimeSlotClick) {\n return;\n }\n\n const slotDate = dayjs(date).format('YYYY-MM-DD');\n const slotIndex = slots.findIndex((s) => s.startTime === slotTime);\n if (slotIndex === -1) {\n return;\n }\n\n const slot = slots[slotIndex];\n onTimeSlotClick({\n slotStart: `${slotDate} ${slot.startTime}`,\n slotEnd: `${slotDate} ${slot.endTime}`,\n nativeEvent: e,\n resourceId,\n });\n };\n\n const dateStr = dayjs(date).format('YYYY-MM-DD');\n const resolveNow = () => (getCurrentTime ? dayjs(getCurrentTime()) : dayjs());\n const now = resolveNow();\n const isToday = dayjs(date).isSame(now, 'day');\n const withCurrentTimeIndicator = _withCurrentTimeIndicator ?? isToday;\n\n const mounted = useMounted();\n const [, setTimeIndicatorTick] = useState(0);\n useInterval(() => setTimeIndicatorTick((tick) => tick + 1), 60000, { autoInvoke: true });\n const timeIndicatorOffset = getCurrentTimePosition({ startTime, endTime, intervalMinutes, now });\n const showTimeIndicator =\n mounted &&\n withCurrentTimeIndicator &&\n isInTimeRange({ date: now.toDate(), startTime, endTime });\n const formattedCurrentTime = withCurrentTimeBubble\n ? formatDate({ locale: ctx.getLocale(locale), date: now, format: slotLabelFormat })\n : '';\n\n const expandedEvents = useMemo(\n () =>\n expandRecurringEvents({\n events,\n rangeStart: dayjs(date).startOf('day').toDate(),\n rangeEnd: dayjs(date).endOf('day').toDate(),\n expansionLimit: recurrenceExpansionLimit,\n }),\n [events, date, recurrenceExpansionLimit]\n );\n\n const resourceEvents = useMemo(\n () =>\n getResourcesDayViewEvents({\n date,\n events: expandedEvents,\n resources,\n startTime,\n endTime,\n intervalMinutes,\n }),\n [date, expandedEvents, resources, startTime, endTime, intervalMinutes]\n );\n\n const timeLabels = slots.map((interval) => {\n const intervalTime = dayjs(`${dateStr} ${interval.startTime}`);\n const label = formatDate({\n date: intervalTime,\n locale: ctx.getLocale(locale),\n format: slotLabelFormat,\n });\n\n return (\n <Box\n {...getStyles('resourcesDayViewTimeLabel')}\n key={interval.startTime}\n mod={{\n 'hour-start': interval.isHourStart,\n ...getBusinessHoursMod({\n time: interval.startTime,\n businessHours,\n highlightBusinessHours,\n }),\n }}\n >\n {label}\n </Box>\n );\n });\n\n const slotsRef: ResourcesGridControlsRef = useRef<HTMLButtonElement[][]>([]);\n const rowSlotsContainersRef = useRef<(HTMLDivElement | null)[]>([]);\n const viewportRef = useRef<HTMLDivElement>(null);\n const mergedViewportRef = useMergedRef(viewportRef, scrollAreaProps?.viewportRef);\n\n const firstSlotIndex = { resourceIndex: 0, slotIndex: 0 };\n\n useIsomorphicEffect(() => {\n if (!startScrollTime || !viewportRef.current) {\n return;\n }\n\n const firstResourceSlots = slotsRef.current[0];\n if (!firstResourceSlots || firstResourceSlots.length === 0) {\n return;\n }\n\n const targetIndex = slots.findIndex((s) => s.startTime >= startScrollTime);\n if (targetIndex < 0) {\n return;\n }\n\n const targetSlot = firstResourceSlots[targetIndex];\n if (!targetSlot) {\n return;\n }\n\n const slotRect = targetSlot.getBoundingClientRect();\n const viewportRect = viewportRef.current.getBoundingClientRect();\n const cornerEl = viewportRef.current.querySelector(`.${classes.resourcesDayViewCorner}`);\n const labelWidth = cornerEl ? cornerEl.getBoundingClientRect().width : 0;\n viewportRef.current.scrollTo({\n left: slotRect.left - viewportRect.left - labelWidth,\n top: 0,\n });\n }, []);\n\n const getSlotIndexFromDragPoint = useCallback(\n (event: React.DragEvent, resourceIndex: number) => {\n const daySlots = slotsRef.current[resourceIndex] ?? [];\n const index = getIndexFromDragPoint(daySlots, event.clientX);\n if (index !== null) {\n const rect = daySlots[index]?.getBoundingClientRect();\n if (rect) {\n const rawOffset = dir === 'rtl' ? rect.right - event.clientX : event.clientX - rect.left;\n dragOffsetRef.current = {\n offset: Math.max(0, Math.min(rect.width, rawOffset)),\n size: rect.width,\n };\n }\n }\n return index;\n },\n [dir]\n );\n\n const handleSlotKeyDown = (\n event: React.KeyboardEvent<HTMLButtonElement>,\n resourceIndex: number,\n slotIndex: number\n ) => {\n handleResourcesGridKeyDown({\n controlsRef: slotsRef,\n resourceIndex,\n slotIndex,\n event,\n });\n };\n\n const interactiveBackgroundEvents = withInteractiveBackgroundEvents && mode !== 'static';\n\n const rows = orderedResources.map((resource, resourceIndex) => {\n const allBgEvents = [\n ...(resourceEvents.backgroundTimedEvents[resource.id] || []),\n ...(resourceEvents.backgroundAllDayEvents[resource.id] || []),\n ];\n\n const backgroundEventNodes = allBgEvents.map((event) => (\n <ScheduleBackgroundEvent\n key={`bg-${event.id}`}\n event={event}\n renderEvent={renderEvent}\n renderEventBody={renderEventBody}\n interactive={interactiveBackgroundEvents}\n onEventClick={onEventClick}\n {...getStyles('resourcesDayViewBackgroundEvent', {\n style: {\n left: `${event.position.top}%`,\n width: `${event.position.height}%`,\n top: 0,\n height: '100%',\n },\n })}\n />\n ));\n\n const allRegularEvents = (resourceEvents.regularEvents[resource.id] || []).filter(\n (event) => !isAllDayEvent({ event, date })\n );\n\n const visibleRegularEvents =\n maxEventsPerTimeSlot !== undefined\n ? allRegularEvents.filter((event) => event.position.column < maxEventsPerTimeSlot)\n : allRegularEvents;\n\n const regularEvents = visibleRegularEvents.map((event) => {\n const isDraggable = dragDrop.isDraggableEvent(event);\n const isResizable = eventResize.isResizableEvent(event);\n const resizePosition = eventResize.getResizePosition(event.id);\n const eventLeft = resizePosition ? resizePosition.left : event.position.top;\n const eventWidth = resizePosition ? resizePosition.width : event.position.height;\n\n const adjustPosition =\n maxEventsPerTimeSlot !== undefined && event.position.overlaps > maxEventsPerTimeSlot;\n\n const eventColors = isResizable\n ? theme.variantColorResolver({\n color: event.color || theme.primaryColor,\n theme,\n variant: event.variant || 'light',\n autoContrast: true,\n })\n : null;\n\n const isThisEventResizing = resizePosition !== null;\n const activeEdge =\n isThisEventResizing && eventResize.resizingEdge ? eventResize.resizingEdge : null;\n\n return (\n <Box\n key={event.id}\n {...getStyles('resourcesDayViewEventWrapper')}\n __vars={eventColors ? { '--event-color': eventColors.color } : undefined}\n data-resizing={isThisEventResizing || undefined}\n style={{\n ...getTimeAxisEventStyle({\n start: eventLeft,\n span: eventWidth,\n minSize: minEventSize,\n }),\n top: adjustPosition\n ? `calc((100% - 22px) * ${event.position.column} / ${maxEventsPerTimeSlot})`\n : `${event.position.offset}%`,\n height: adjustPosition\n ? `calc((100% - 22px) / ${maxEventsPerTimeSlot})`\n : `${event.position.width}%`,\n }}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n draggable={isDraggable}\n isResizing={isThisEventResizing}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={\n onEventClick\n ? (e) => {\n if (!eventResize.wasResizing()) {\n onEventClick(event, e);\n }\n }\n : undefined\n }\n style={{ width: '100%', height: '100%', padding: 0 }}\n />\n {isResizable && mode !== 'static' && (\n <>\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"start\"\n data-active={activeEdge === 'start' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'start',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n <div\n {...getStyles('resourcesDayViewResizeHandle')}\n data-edge=\"end\"\n data-active={activeEdge === 'end' || undefined}\n onPointerDown={(e) => {\n const container = rowSlotsContainersRef.current[resourceIndex];\n if (container) {\n eventResize.handleResizeStart({\n event,\n edge: 'end',\n container,\n originalLeft: event.position.top,\n originalWidth: event.position.height,\n eventDate: dateStr,\n pointerEvent: e,\n });\n }\n }}\n />\n </>\n )}\n </Box>\n );\n });\n\n const allDayEvents = resourceEvents.allDayEvents[resource.id] || [];\n\n const allDayEventNodes = allDayEvents.map((event, index) => (\n <Box\n key={`all-day-${event.id}`}\n {...getStyles('resourcesDayViewAllDayEvent', {\n style: {\n top: `calc(${index} * (var(--resources-day-view-all-day-height) + 2px) + 2px)`,\n },\n })}\n >\n <ScheduleEvent\n event={event}\n autoSize\n nowrap\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n radius={radius}\n mode={mode}\n onClick={onEventClick ? (e) => onEventClick(event, e) : undefined}\n style={{ width: '100%', height: '100%' }}\n />\n </Box>\n ));\n\n const moreEventsForResource =\n maxEventsPerTimeSlot !== undefined\n ? getOverlapClusters(allRegularEvents)\n .filter((cluster) => cluster.some((e) => e.position.column >= maxEventsPerTimeSlot))\n .map((cluster) => {\n const hiddenCount = cluster.filter(\n (e) => e.position.column >= maxEventsPerTimeSlot\n ).length;\n const leftPercent = Math.min(...cluster.map((e) => e.position.top));\n const rightPercent = Math.max(\n ...cluster.map((e) => e.position.top + e.position.height)\n );\n\n return (\n <MoreEvents\n key={`more-${cluster[0].id}`}\n events={cluster}\n moreEventsCount={hiddenCount}\n mode={mode}\n labels={labels}\n renderEventBody={renderEventBody}\n renderEvent={renderEvent}\n onEventClick={onEventClick}\n style={{\n position: 'absolute',\n left: `calc(${leftPercent}% + 1px)`,\n width: `calc(${rightPercent - leftPercent}% - 2px)`,\n bottom: 0,\n height: '22px',\n paddingInline: 4,\n zIndex: 4,\n }}\n {...stylesApiProps}\n {...moreEventsProps}\n />\n );\n })\n : [];\n\n return (\n <ResourcesDayViewRow\n key={resource.id}\n resource={resource}\n resourceIndex={resourceIndex}\n date={dateStr}\n slots={slots}\n getStyles={getStyles}\n labels={labels}\n highlightBusinessHours={highlightBusinessHours}\n businessHours={businessHours}\n withEventsDragAndDrop={withDragHandlers}\n mode={mode}\n slotsRef={slotsRef}\n firstSlotIndex={firstSlotIndex}\n onSlotKeyDown={handleSlotKeyDown}\n onSlotClick={handleTimeSlotClick}\n onRowSlotsDragOver={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDragOver(event, { resourceId, slotIndex });\n updateDragPreview({ resourceId, slotIndex });\n }\n }}\n onRowSlotsDragLeave={dragDrop.handleDragLeave}\n onRowSlotsDrop={(event, resourceId, resIdx) => {\n const slotIndex = getSlotIndexFromDragPoint(event, resIdx);\n if (slotIndex !== null) {\n dragDrop.handleDrop(event, { resourceId, slotIndex });\n }\n }}\n dropTargetSlotIndex={\n !suppressDropHighlight && dragDrop.dropTarget?.resourceId === resource.id\n ? dragDrop.dropTarget.slotIndex\n : undefined\n }\n withDragSlotSelect={withDragSlotSelect}\n onSlotPointerDown={slotDragSelect.handleSlotPointerDown}\n isSlotDragSelected={slotDragSelect.isSlotSelected}\n rowSlotsContainerRef={(node) => {\n rowSlotsContainersRef.current[resourceIndex] = node;\n }}\n renderResourceLabel={renderResourceLabel}\n renderGroupLabel={renderGroupLabel}\n scrolledX={scrolledX}\n groupInfo={hasGroups ? resourceGroupMap[resourceIndex] : undefined}\n allDayCount={allDayEvents.length}\n >\n {backgroundEventNodes}\n {allDayEventNodes}\n {regularEvents}\n {moreEventsForResource}\n {dragDrop.dragPreview?.target.resourceId === resource.id &&\n dragDrop.dragContextValue.draggedEvent && (\n <Box\n {...getStyles('resourcesDayViewDragPreview', {\n style: (() => {\n const { top, height } = getDayPosition({\n event: {\n ...dragDrop.dragContextValue.draggedEvent,\n start: dragDrop.dragPreview.start,\n end: dragDrop.dragPreview.end,\n },\n startTime,\n endTime,\n intervalMinutes,\n });\n return {\n position: 'absolute',\n insetBlockStart: 0,\n insetBlockEnd: 0,\n ...getTimeAxisEventStyle({ start: top, span: height, axis: 'horizontal' }),\n };\n })(),\n })}\n />\n )}\n </ResourcesDayViewRow>\n );\n });\n\n const headerLabel = formatDate({\n date: dayjs(date),\n locale: ctx.getLocale(locale),\n format: headerFormat,\n });\n\n const content = (\n <Box\n {...getStyles('resourcesDayView')}\n mod={{\n static: mode === 'static',\n 'slot-dragging': slotDragSelect.isDragging,\n resizing: eventResize.isResizing,\n 'event-interaction': eventResize.isResizing || dragDrop.dragContextValue.isDragging,\n }}\n {...others}\n >\n {withHeader && (\n <ScheduleHeaderBase\n view=\"day\"\n navigationHandlers={{\n previous: () => toDateString(dayjs(date).subtract(1, 'day')),\n next: () => toDateString(dayjs(date).add(1, 'day')),\n today: () => toDateString(resolveNow()),\n }}\n control={{\n miw: 140,\n title: headerLabel,\n }}\n labels={labels}\n onDateChange={onDateChange}\n onViewChange={onViewChange}\n previousControlProps={previousControlProps}\n nextControlProps={nextControlProps}\n todayControlProps={todayControlProps}\n viewSelectProps={{ views: ['day', 'week', 'month'] as const, ...viewSelectProps }}\n stylesApiProps={stylesApiProps}\n />\n )}\n\n <Box {...getStyles('resourcesDayViewRoot')}>\n <ScrollArea\n scrollbarSize={4}\n {...scrollAreaProps}\n {...getStyles('resourcesDayViewScrollArea', {\n className: scrollAreaProps?.className,\n style: scrollAreaProps?.style,\n })}\n onScrollPositionChange={(position) => {\n scrollAreaProps?.onScrollPositionChange?.(position);\n setScrolled(position.y !== 0);\n setScrolledX(position.x !== 0);\n }}\n viewportRef={mergedViewportRef}\n >\n <div {...getStyles('resourcesDayViewInner')}>\n <Box {...getStyles('resourcesDayViewTimeLabelsRow')} mod={{ scrolled }}>\n <div\n {...getStyles('resourcesDayViewCorner')}\n key=\"corner\"\n style={\n hasGroups\n ? {\n flexBasis:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n minWidth:\n 'calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width))',\n }\n : undefined\n }\n >\n {getLabel('resources', labels)}\n </div>\n {timeLabels}\n </Box>\n\n {rows}\n\n {showTimeIndicator && (\n <Box\n {...getStyles('resourcesDayViewCurrentTimeIndicator')}\n __vars={{\n '--indicator-left-offset': hasGroups\n ? `calc(var(--resources-day-view-resource-label-width) + var(--resources-day-view-group-label-width) + (100% - var(--resources-day-view-resource-label-width) - var(--resources-day-view-group-label-width)) * ${timeIndicatorOffset} / 100)`\n : `calc(var(--resources-day-view-resource-label-width) + (100% - var(--resources-day-view-resource-label-width)) * ${timeIndicatorOffset} / 100)`,\n '--_time-bubble-width': formattedCurrentTime\n ?.toString()\n .toLowerCase()\n .includes('m')\n ? '64px'\n : '46px',\n }}\n >\n {withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorTimeBubble')}>\n {formattedCurrentTime}\n </div>\n )}\n {!withCurrentTimeBubble && (\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorThumb')} />\n )}\n <div {...getStyles('resourcesDayViewCurrentTimeIndicatorLine')} />\n </Box>\n )}\n </div>\n </ScrollArea>\n </Box>\n </Box>\n );\n\n const dragContextValue = useMemo<DragContextValue>(\n () => dragDrop.dragContextValue,\n [dragDrop.dragContextValue]\n );\n\n if (withEventsDragAndDrop) {\n return <DragContext.Provider value={dragContextValue}>{content}</DragContext.Provider>;\n }\n\n return content;\n});\n\nResourcesDayView.displayName = '@mantine/schedule/ResourcesDayView';\nResourcesDayView.classes = classes;\nResourcesDayView.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6SA,MAAM,eAAe;CACnB,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,cAAc;CACd,wBAAwB;CACxB,eAAe,CAAC,YAAY,UAAU;CACtC,uBAAuB;CACvB,oBAAoB;CACpB,iBAAiB;CACjB,MAAM;CACN,sBAAsB;CACtB,iCAAiC;AACnC;AAEA,MAAM,gBAAA,GAAeA,cAAAA,mBAAAA,EAClB,QAAQ,EAAE,QAAQ,WAAW,WAAW,uBAAuB,EAC9D,kBAAkB;CAChB,+BAA+B,UAAA,GAASC,cAAAA,UAAAA,CAAU,MAAM,IAAI,KAAA;CAC5D,oCAAA,GAAmCC,cAAAA,IAAAA,CAAI,SAAS;CAChD,oCAAA,GAAmCA,cAAAA,IAAAA,CAAI,SAAS;CAChD,2CAAA,GAA0CA,cAAAA,IAAAA,CAAI,eAAe;AAC/D,EACF,EACF;AAEA,MAAa,oBAAA,GAAmBC,cAAAA,QAAAA,EAAkC,WAAW;CAC3E,MAAM,SAAA,GAAQC,cAAAA,SAAAA,CAAS,oBAAoB,cAAc,MAAM;CAC/D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,YACA,MACA,WACA,SACA,MACA,cACA,WACA,iBACA,cACA,iBACA,QACA,iBACA,iBACA,QACA,0BAA0B,2BAC1B,wBAAwB,MACxB,gBACA,kBACA,YACA,cACA,sBACA,kBACA,mBACA,iBACA,cACA,QACA,WACA,WACA,QACA,wBACA,eACA,iBACA,aACA,qBACA,Q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S,gBAAgB,CAC5B;CAEA,IAAI,uBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACgC,oBAAAA,YAAY,UAAb;EAAsB,OAAO;EAAmB,UAAA;CAA8B,CAAA;CAGvF,OAAO;AACT,CAAC;AAED,iBAAiB,cAAc;AAC/B,iBAAiB,UAAUd,gCAAAA;AAC3B,iBAAiB,eAAe"}
@@ -21,7 +21,8 @@ var ResourcesDayView_module_default = {
21
21
  "resourcesDayViewBackgroundEvent": "m_9cc838bf",
22
22
  "resourcesDayViewAllDayEvent": "m_d6d6dd52",
23
23
  "resourcesDayViewResizeHandle": "m_97715629",
24
- "resourcesDayViewEventWrapper": "m_93bc1ec6"
24
+ "resourcesDayViewEventWrapper": "m_93bc1ec6",
25
+ "resourcesDayViewDragPreview": "m_969d1c27"
25
26
  };
26
27
  //#endregion
27
28
  exports.default = ResourcesDayView_module_default;