@mantine-vue/schedule 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.cjs CHANGED
@@ -420,8 +420,9 @@ function isEventInTimeRange({ event, startTime, endTime }) {
420
420
  const timeWindowEndMinutes = endHour * 60 + endMinute;
421
421
  const eventStart = (0, dayjs.default)(event.start);
422
422
  const eventEnd = (0, dayjs.default)(event.end);
423
+ const endsAtNextDayStart = eventEnd.isSame(eventStart.startOf("day").add(1, "day"), "second");
423
424
  const eventStartMinutes = eventStart.hour() * 60 + eventStart.minute();
424
- return !(eventEnd.hour() * 60 + eventEnd.minute() <= timeWindowStartMinutes || eventStartMinutes >= timeWindowEndMinutes);
425
+ return !((endsAtNextDayStart ? 1440 : eventEnd.hour() * 60 + eventEnd.minute()) <= timeWindowStartMinutes || eventStartMinutes >= timeWindowEndMinutes);
425
426
  }
426
427
  //#endregion
427
428
  //#region src/utils/is-within-week/is-within-week.ts
@@ -688,6 +689,43 @@ function expandRecurringEvents({ events, rangeStart, rangeEnd, expansionLimit =
688
689
  return output;
689
690
  }
690
691
  //#endregion
692
+ //#region src/utils/get-overlap-clusters/get-overlap-clusters.ts
693
+ function getOverlapClusters(events) {
694
+ const clusters = [];
695
+ const assigned = /* @__PURE__ */ new Set();
696
+ for (let i = 0; i < events.length; i++) {
697
+ if (assigned.has(i)) continue;
698
+ const cluster = [events[i]];
699
+ assigned.add(i);
700
+ let j = 0;
701
+ while (j < cluster.length) {
702
+ for (let k = 0; k < events.length; k++) if (!assigned.has(k) && isEventsOverlap(cluster[j], events[k])) {
703
+ cluster.push(events[k]);
704
+ assigned.add(k);
705
+ }
706
+ j += 1;
707
+ }
708
+ clusters.push(cluster);
709
+ }
710
+ return clusters;
711
+ }
712
+ //#endregion
713
+ //#region src/utils/apply-cascade-layout/apply-cascade-layout.ts
714
+ var BASE_STEP = 20;
715
+ var MIN_TOP_WIDTH = 60;
716
+ function applyCascadeLayout(events) {
717
+ const timedEvents = events.filter((event) => !event.position.allDay);
718
+ for (const cluster of getOverlapClusters(timedEvents)) {
719
+ const columns = Math.max(...cluster.map((event) => event.position.column)) + 1;
720
+ const step = columns > 1 ? Math.min(BASE_STEP, (100 - MIN_TOP_WIDTH) / (columns - 1)) : 0;
721
+ for (const event of cluster) {
722
+ event.position.overlaps = columns;
723
+ event.position.offset = event.position.column * step;
724
+ event.position.width = 100 - event.position.offset;
725
+ }
726
+ }
727
+ }
728
+ //#endregion
691
729
  //#region src/utils/get-ordered-resources/get-ordered-resources.ts
692
730
  function getOrderedResources(resources, groups) {
693
731
  if (!groups?.length) return {
@@ -1027,17 +1065,19 @@ function useEventResize(input) {
1027
1065
  document.addEventListener("pointermove", trackPointer);
1028
1066
  document.addEventListener("pointerup", handlePointerUp);
1029
1067
  };
1030
- const getResizePosition = (eventId) => {
1068
+ const getResizePosition = (eventId, eventDate) => {
1031
1069
  const state = resizeState.value;
1032
- return state?.eventId === eventId ? {
1070
+ return state?.eventId === eventId && (eventDate === void 0 || state.eventDate === eventDate) ? {
1033
1071
  top: state.currentTop,
1034
1072
  height: state.currentHeight
1035
1073
  } : null;
1036
1074
  };
1037
- const isResizableEvent = (event) => input.enabled() && input.mode() !== "static" && event.display !== "background" && (input.canResizeEvent()?.(event) ?? true);
1075
+ const isResizableEvent = (event) => input.enabled() && input.mode() !== "static" && (event.display !== "background" || input.withBackgroundEvents?.() === true) && (input.canResizeEvent()?.(event) ?? true);
1038
1076
  (0, vue.onBeforeUnmount)(removeDocumentListeners);
1039
1077
  return {
1040
1078
  handleResizeStart,
1079
+ isResizing: (0, vue.computed)(() => resizeState.value !== null),
1080
+ resizingEventId: (0, vue.computed)(() => resizeState.value?.eventId ?? null),
1041
1081
  getResizePosition,
1042
1082
  isResizableEvent,
1043
1083
  wasResizing: () => justResized
@@ -1263,9 +1303,9 @@ function provideScheduleDragState(input = {}) {
1263
1303
  };
1264
1304
  }
1265
1305
  var ScheduleEvent_module_default = {
1266
- event: "_event_19lsr_1",
1267
- eventInner: "_eventInner_19lsr_14",
1268
- eventResizeHandle: "_eventResizeHandle_19lsr_186"
1306
+ event: "_event_ho258_1",
1307
+ eventInner: "_eventInner_ho258_14",
1308
+ eventResizeHandle: "_eventResizeHandle_ho258_210"
1269
1309
  };
1270
1310
  //#endregion
1271
1311
  //#region src/components/ScheduleEvent/ScheduleEvent.vue?vue&type=script&setup=true&lang.ts
@@ -1651,9 +1691,20 @@ var ScheduleBackgroundEvent_default = /* @__PURE__ */ (0, vue.defineComponent)({
1651
1691
  renderEventBody: {
1652
1692
  type: Function,
1653
1693
  default: void 0
1654
- }
1694
+ },
1695
+ withResize: {
1696
+ type: Boolean,
1697
+ default: false
1698
+ },
1699
+ resizeAxis: { default: "vertical" },
1700
+ resizeHandleProps: {},
1701
+ isResizing: {
1702
+ type: Boolean,
1703
+ default: false
1704
+ },
1705
+ activeResizeEdge: { default: void 0 }
1655
1706
  },
1656
- emits: ["eventClick"],
1707
+ emits: ["eventClick", "resizeStart"],
1657
1708
  setup(__props, { emit: __emit }) {
1658
1709
  const props = __props;
1659
1710
  const emit = __emit;
@@ -1692,7 +1743,11 @@ var ScheduleBackgroundEvent_default = /* @__PURE__ */ (0, vue.defineComponent)({
1692
1743
  return {
1693
1744
  ...attrs,
1694
1745
  style,
1695
- mod: [attrs.mod, { interactive: props.interactive }],
1746
+ mod: [attrs.mod, {
1747
+ interactive: props.interactive,
1748
+ resizable: props.withResize,
1749
+ resizing: props.isResizing
1750
+ }],
1696
1751
  ...props.interactive ? {
1697
1752
  "data-event-id": props.event.id,
1698
1753
  title: props.event.title,
@@ -1702,7 +1757,17 @@ var ScheduleBackgroundEvent_default = /* @__PURE__ */ (0, vue.defineComponent)({
1702
1757
  } : {}
1703
1758
  };
1704
1759
  });
1705
- const content = () => slots.default?.({ event: props.event }) ?? props.renderEventBody?.(props.event) ?? props.event.title;
1760
+ const content = () => {
1761
+ const body = slots.default?.({ event: props.event }) ?? props.renderEventBody?.(props.event) ?? props.event.title;
1762
+ const edges = props.resizeAxis === "horizontal" ? ["start", "end"] : ["top", "bottom"];
1763
+ return props.withResize ? [...edges.map((edge) => (0, vue.h)(_mantine_vue_core.Box, {
1764
+ ...props.resizeHandleProps,
1765
+ key: edge,
1766
+ mod: { edge },
1767
+ "data-active": props.isResizing && props.activeResizeEdge === edge ? true : void 0,
1768
+ onPointerdown: (event) => emit("resizeStart", edge, event)
1769
+ })), body] : body;
1770
+ };
1706
1771
  const render = () => {
1707
1772
  const component = props.interactive ? _mantine_vue_core.UnstyledButton : _mantine_vue_core.Box;
1708
1773
  if (props.renderEvent) return props.renderEvent(props.event, {
@@ -2742,7 +2807,7 @@ function columnHasConflict$1({ columns, columnIndex, event, allDay, date }) {
2742
2807
  return hasTimeConflict;
2743
2808
  });
2744
2809
  }
2745
- function getDayPositionedEvents({ events, startTime, endTime, intervalMinutes, date }) {
2810
+ function getDayPositionedEvents({ events, startTime, endTime, intervalMinutes, date, eventOverlapMode = "columns" }) {
2746
2811
  const columns = [];
2747
2812
  const positioned = [];
2748
2813
  const sorted = sortEvents(events);
@@ -2782,14 +2847,18 @@ function getDayPositionedEvents({ events, startTime, endTime, intervalMinutes, d
2782
2847
  }
2783
2848
  });
2784
2849
  }
2850
+ for (const positionedEvent of positioned) if (positionedEvent.position.allDay) {
2851
+ positionedEvent.position.overlaps = 1;
2852
+ positionedEvent.position.width = 100;
2853
+ positionedEvent.position.offset = 0;
2854
+ }
2855
+ if (eventOverlapMode === "cascade") {
2856
+ applyCascadeLayout(positioned);
2857
+ return positioned;
2858
+ }
2785
2859
  for (const positionedEvent of positioned) {
2786
2860
  const { allDay, column } = positionedEvent.position;
2787
- if (allDay) {
2788
- positionedEvent.position.overlaps = 1;
2789
- positionedEvent.position.width = 100;
2790
- positionedEvent.position.offset = 0;
2791
- continue;
2792
- }
2861
+ if (allDay) continue;
2793
2862
  const directlyOverlapping = [];
2794
2863
  for (const otherEvent of positioned) {
2795
2864
  if (otherEvent === positionedEvent || otherEvent.position.allDay) continue;
@@ -2815,7 +2884,7 @@ function getDayPositionedEvents({ events, startTime, endTime, intervalMinutes, d
2815
2884
  }
2816
2885
  //#endregion
2817
2886
  //#region src/components/DayView/get-day-view-events/get-day-view-events.ts
2818
- function getDayViewEvents({ events, date, startTime, endTime, intervalMinutes }) {
2887
+ function getDayViewEvents({ events, date, startTime, endTime, intervalMinutes, eventOverlapMode }) {
2819
2888
  if (events === void 0) return {
2820
2889
  allDayEvents: [],
2821
2890
  regularEvents: [],
@@ -2850,7 +2919,8 @@ function getDayViewEvents({ events, date, startTime, endTime, intervalMinutes })
2850
2919
  startTime,
2851
2920
  endTime,
2852
2921
  intervalMinutes,
2853
- date
2922
+ date,
2923
+ eventOverlapMode
2854
2924
  });
2855
2925
  const allDayEvents = [];
2856
2926
  const regularEvents = [];
@@ -2913,17 +2983,19 @@ function getDayViewEvents({ events, date, startTime, endTime, intervalMinutes })
2913
2983
  };
2914
2984
  }
2915
2985
  var DayView_module_default = {
2916
- dayView: "_dayView_1nebu_1",
2917
- dayViewScrollArea: "_dayViewScrollArea_1nebu_22",
2918
- dayViewInner: "_dayViewInner_1nebu_32",
2919
- dayViewTimeSlots: "_dayViewTimeSlots_1nebu_36",
2920
- dayViewSlot: "_dayViewSlot_1nebu_39",
2921
- dayViewSlotLabels: "_dayViewSlotLabels_1nebu_44",
2922
- dayViewSlotLabel: "_dayViewSlotLabel_1nebu_44",
2923
- dayViewSlots: "_dayViewSlots_1nebu_74",
2924
- dayViewBackgroundEvent: "_dayViewBackgroundEvent_1nebu_178",
2925
- dayViewAllDay: "_dayViewAllDay_1nebu_201",
2926
- dayViewAllDayEvents: "_dayViewAllDayEvents_1nebu_206"
2986
+ dayView: "_dayView_10v37_1",
2987
+ dayViewDragPreview: "_dayViewDragPreview_10v37_13",
2988
+ dayViewScrollArea: "_dayViewScrollArea_10v37_31",
2989
+ dayViewInner: "_dayViewInner_10v37_41",
2990
+ dayViewTimeSlots: "_dayViewTimeSlots_10v37_45",
2991
+ dayViewSlot: "_dayViewSlot_10v37_48",
2992
+ dayViewSlotLabels: "_dayViewSlotLabels_10v37_53",
2993
+ dayViewSlotLabel: "_dayViewSlotLabel_10v37_53",
2994
+ dayViewSlots: "_dayViewSlots_10v37_83",
2995
+ dayViewBackgroundEvent: "_dayViewBackgroundEvent_10v37_187",
2996
+ dayViewBackgroundEventResizeHandle: "_dayViewBackgroundEventResizeHandle_10v37_216",
2997
+ dayViewAllDay: "_dayViewAllDay_10v37_263",
2998
+ dayViewAllDayEvents: "_dayViewAllDayEvents_10v37_268"
2927
2999
  };
2928
3000
  //#endregion
2929
3001
  //#region src/components/DayView/DayView.vue?vue&type=script&setup=true&lang.ts
@@ -2954,6 +3026,8 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
2954
3026
  inheritAttrs: false,
2955
3027
  __name: "DayView",
2956
3028
  props: {
3029
+ eventOverlapMode: { default: "columns" },
3030
+ eventOverlapRaiseDelay: { default: 600 },
2957
3031
  intervalMinutes: { default: void 0 },
2958
3032
  headerFormat: {
2959
3033
  type: [String, Function],
@@ -3095,7 +3169,8 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3095
3169
  date: date.value,
3096
3170
  startTime: props.startTime,
3097
3171
  endTime: props.endTime,
3098
- intervalMinutes: props.intervalMinutes
3172
+ intervalMinutes: props.intervalMinutes,
3173
+ eventOverlapMode: props.eventOverlapMode
3099
3174
  }));
3100
3175
  const intervals = (0, vue.computed)(() => getDayTimeIntervals({
3101
3176
  startTime: props.startTime,
@@ -3118,7 +3193,8 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3118
3193
  intervalMinutes: () => props.intervalMinutes,
3119
3194
  resizeIntervalMinutes: () => props.eventResizeInterval,
3120
3195
  onEventResize: (data) => emit("eventResize", data),
3121
- canResizeEvent: () => props.canResizeEvent
3196
+ canResizeEvent: () => props.canResizeEvent,
3197
+ withBackgroundEvents: () => Boolean(props.withInteractiveBackgroundEvents)
3122
3198
  });
3123
3199
  const slotDragSelect = useSlotDragSelect({
3124
3200
  enabled: () => withSlotSelect.value,
@@ -3209,11 +3285,16 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3209
3285
  "business-hours": false,
3210
3286
  "non-business-hours": false
3211
3287
  }));
3212
- const backgroundEventStyle = (position) => ({
3213
- top: `${position.top}%`,
3214
- bottom: `${100 - position.top - position.height}%`,
3215
- minHeight: "1px"
3216
- });
3288
+ const backgroundEventStyle = (event) => {
3289
+ const resizePosition = eventResize.getResizePosition(event.id);
3290
+ const top = resizePosition?.top ?? event.position.top;
3291
+ const height = resizePosition?.height ?? event.position.height;
3292
+ return {
3293
+ top: `${top}%`,
3294
+ bottom: `${100 - top - height}%`,
3295
+ minHeight: "1px"
3296
+ };
3297
+ };
3217
3298
  const regularEventStyle = (event) => {
3218
3299
  const resizePosition = eventResize.getResizePosition(event.id);
3219
3300
  const top = resizePosition?.top ?? event.position.top;
@@ -3224,7 +3305,9 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3224
3305
  bottom: `${100 - top - height}%`,
3225
3306
  minHeight: "1px",
3226
3307
  width: `${event.position.width}%`,
3227
- insetInlineStart: `${event.position.offset}%`
3308
+ insetInlineStart: `${event.position.offset}%`,
3309
+ "--event-z-index": event.position.column + 3,
3310
+ "--event-z-index-raised": event.position.overlaps + 3
3228
3311
  };
3229
3312
  };
3230
3313
  const startEventResize = (event, edge, pointerEvent) => {
@@ -3247,10 +3330,14 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3247
3330
  return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.Box), (0, vue.mergeProps)({
3248
3331
  ...(0, vue.unref)(attrs),
3249
3332
  ...(0, vue.unref)(getStyles)("dayView")
3250
- }, { mod: [{
3251
- static: isStatic.value,
3252
- "slot-dragging": (0, vue.unref)(slotDragSelect).isDragging()
3253
- }, (0, vue.unref)(attrs).mod] }), {
3333
+ }, {
3334
+ mod: [{
3335
+ static: isStatic.value,
3336
+ "slot-dragging": (0, vue.unref)(slotDragSelect).isDragging()
3337
+ }, (0, vue.unref)(attrs).mod],
3338
+ "data-event-interaction": (0, vue.unref)(eventResize).isResizing.value || void 0,
3339
+ style: { "--event-raise-delay": `${(0, vue.unref)(props).eventOverlapRaiseDelay}ms` }
3340
+ }), {
3254
3341
  default: (0, vue.withCtx)(() => [(0, vue.unref)(props).withHeader ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(ScheduleHeaderBase), (0, vue.mergeProps)({
3255
3342
  key: 0,
3256
3343
  view: "day",
@@ -3382,12 +3469,20 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3382
3469
  ...eventRenderers.value,
3383
3470
  ...(0, vue.unref)(staticStyles)("dayViewBackgroundEvent")
3384
3471
  }, {
3385
- style: backgroundEventStyle(event.position),
3386
- onEventClick: clickEvent
3472
+ style: backgroundEventStyle(event),
3473
+ "with-resize": (0, vue.unref)(eventResize).isResizableEvent(event),
3474
+ "is-resizing": (0, vue.unref)(eventResize).getResizePosition(event.id) !== null,
3475
+ "resize-handle-props": (0, vue.unref)(staticStyles)("dayViewBackgroundEventResizeHandle"),
3476
+ onEventClick: clickResizableEvent,
3477
+ onResizeStart: (edge, pointerEvent) => startEventResize(event, edge, pointerEvent)
3387
3478
  }), null, 16, [
3388
3479
  "event",
3389
3480
  "interactive",
3390
- "style"
3481
+ "style",
3482
+ "with-resize",
3483
+ "is-resizing",
3484
+ "resize-handle-props",
3485
+ "onResizeStart"
3391
3486
  ]);
3392
3487
  }), 128)),
3393
3488
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(dayEvents.value.regularEvents, (event) => {
@@ -3396,6 +3491,7 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3396
3491
  event,
3397
3492
  "auto-size": "",
3398
3493
  mode: (0, vue.unref)(props).mode,
3494
+ mod: { cascade: (0, vue.unref)(props).eventOverlapMode === "cascade" },
3399
3495
  style: regularEventStyle(event),
3400
3496
  draggable: !isStatic.value && (0, vue.unref)(props).withEventsDragAndDrop === true && ((0, vue.unref)(props).canDragEvent?.(event) ?? true),
3401
3497
  "with-resize": (0, vue.unref)(eventResize).isResizableEvent(event),
@@ -3411,6 +3507,7 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3411
3507
  }), null, 16, [
3412
3508
  "event",
3413
3509
  "mode",
3510
+ "mod",
3414
3511
  "style",
3415
3512
  "draggable",
3416
3513
  "with-resize",
@@ -3483,7 +3580,11 @@ var DayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
3483
3580
  _: 1
3484
3581
  }, 16, ["viewport-props"])]),
3485
3582
  _: 1
3486
- }, 16, ["mod"]);
3583
+ }, 16, [
3584
+ "mod",
3585
+ "data-event-interaction",
3586
+ "style"
3587
+ ]);
3487
3588
  };
3488
3589
  }
3489
3590
  });
@@ -4776,7 +4877,7 @@ function getHangingStatus({ eventStartDate, actualEndDate, weekDays }) {
4776
4877
  }
4777
4878
  //#endregion
4778
4879
  //#region src/components/WeekView/get-week-view-events/get-week-positioned-events.ts
4779
- function getWeekPositionedEvents({ date, events, startTime, endTime, intervalMinutes, firstDayOfWeek = 1, weekendDays = [0, 6], withWeekendDays = true }) {
4880
+ function getWeekPositionedEvents({ date, events, startTime, endTime, intervalMinutes, firstDayOfWeek = 1, weekendDays = [0, 6], withWeekendDays = true, eventOverlapMode = "columns" }) {
4780
4881
  const weekDays = getWeekDays({
4781
4882
  week: date,
4782
4883
  firstDayOfWeek,
@@ -4935,7 +5036,8 @@ function getWeekPositionedEvents({ date, events, startTime, endTime, intervalMin
4935
5036
  });
4936
5037
  }
4937
5038
  }
4938
- for (const day of weekDays) calculateRegularEventOverlaps(grouped.regularEvents[day]);
5039
+ for (const day of weekDays) if (eventOverlapMode === "cascade") applyCascadeLayout(grouped.regularEvents[day]);
5040
+ else calculateRegularEventOverlaps(grouped.regularEvents[day]);
4939
5041
  if (grouped.allDayEvents.length > 0) {
4940
5042
  const eventRows = assignEventRows(grouped.allDayEvents);
4941
5043
  const assignedRows = /* @__PURE__ */ new Set();
@@ -4970,27 +5072,29 @@ function getWeekViewEvents(input) {
4970
5072
  });
4971
5073
  }
4972
5074
  var WeekView_module_default = {
4973
- weekView: "_weekView_1f3zt_1",
4974
- weekViewRoot: "_weekViewRoot_1f3zt_22",
4975
- weekViewInner: "_weekViewInner_1f3zt_30",
4976
- weekViewScrollArea: "_weekViewScrollArea_1f3zt_36",
4977
- weekViewHeader: "_weekViewHeader_1f3zt_42",
4978
- weekViewCorner: "_weekViewCorner_1f3zt_57",
4979
- weekViewSlotLabels: "_weekViewSlotLabels_1f3zt_68",
4980
- weekViewSlotLabel: "_weekViewSlotLabel_1f3zt_68",
4981
- weekViewDay: "_weekViewDay_1f3zt_95",
4982
- weekViewDayLabel: "_weekViewDayLabel_1f3zt_100",
4983
- weekViewDayNumber: "_weekViewDayNumber_1f3zt_138",
4984
- weekViewDayWeekday: "_weekViewDayWeekday_1f3zt_154",
4985
- weekViewBackgroundEvent: "_weekViewBackgroundEvent_1f3zt_160",
4986
- weekViewDaySlots: "_weekViewDaySlots_1f3zt_183",
4987
- weekViewDaySlot: "_weekViewDaySlot_1f3zt_183",
4988
- weekViewWeekLabel: "_weekViewWeekLabel_1f3zt_281",
4989
- weekViewWeekNumber: "_weekViewWeekNumber_1f3zt_287",
4990
- weekViewAllDaySlots: "_weekViewAllDaySlots_1f3zt_293",
4991
- weekViewAllDaySlotsLabel: "_weekViewAllDaySlotsLabel_1f3zt_298",
4992
- weekViewAllDaySlotsEvents: "_weekViewAllDaySlotsEvents_1f3zt_305",
4993
- weekViewAllDaySlotsList: "_weekViewAllDaySlotsList_1f3zt_312"
5075
+ weekView: "_weekView_jkexi_1",
5076
+ weekViewRoot: "_weekViewRoot_jkexi_22",
5077
+ weekViewDragPreview: "_weekViewDragPreview_jkexi_33",
5078
+ weekViewInner: "_weekViewInner_jkexi_39",
5079
+ weekViewScrollArea: "_weekViewScrollArea_jkexi_45",
5080
+ weekViewHeader: "_weekViewHeader_jkexi_51",
5081
+ weekViewCorner: "_weekViewCorner_jkexi_66",
5082
+ weekViewSlotLabels: "_weekViewSlotLabels_jkexi_77",
5083
+ weekViewSlotLabel: "_weekViewSlotLabel_jkexi_77",
5084
+ weekViewDay: "_weekViewDay_jkexi_104",
5085
+ weekViewDayLabel: "_weekViewDayLabel_jkexi_109",
5086
+ weekViewDayNumber: "_weekViewDayNumber_jkexi_147",
5087
+ weekViewDayWeekday: "_weekViewDayWeekday_jkexi_163",
5088
+ weekViewBackgroundEvent: "_weekViewBackgroundEvent_jkexi_169",
5089
+ weekViewBackgroundEventResizeHandle: "_weekViewBackgroundEventResizeHandle_jkexi_198",
5090
+ weekViewDaySlots: "_weekViewDaySlots_jkexi_246",
5091
+ weekViewDaySlot: "_weekViewDaySlot_jkexi_246",
5092
+ weekViewWeekLabel: "_weekViewWeekLabel_jkexi_344",
5093
+ weekViewWeekNumber: "_weekViewWeekNumber_jkexi_350",
5094
+ weekViewAllDaySlots: "_weekViewAllDaySlots_jkexi_356",
5095
+ weekViewAllDaySlotsLabel: "_weekViewAllDaySlotsLabel_jkexi_361",
5096
+ weekViewAllDaySlotsEvents: "_weekViewAllDaySlotsEvents_jkexi_368",
5097
+ weekViewAllDaySlotsList: "_weekViewAllDaySlotsList_jkexi_375"
4994
5098
  };
4995
5099
  //#endregion
4996
5100
  //#region src/components/WeekView/WeekView.vue?vue&type=script&setup=true&lang.ts
@@ -5033,6 +5137,8 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5033
5137
  inheritAttrs: false,
5034
5138
  __name: "WeekView",
5035
5139
  props: {
5140
+ eventOverlapMode: { default: "columns" },
5141
+ eventOverlapRaiseDelay: { default: 600 },
5036
5142
  intervalMinutes: { default: void 0 },
5037
5143
  withCurrentTimeIndicator: {
5038
5144
  type: Boolean,
@@ -5221,7 +5327,8 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5221
5327
  intervalMinutes: props.intervalMinutes,
5222
5328
  firstDayOfWeek: props.firstDayOfWeek,
5223
5329
  weekendDays: props.weekendDays,
5224
- withWeekendDays: props.withWeekendDays
5330
+ withWeekendDays: props.withWeekendDays,
5331
+ eventOverlapMode: props.eventOverlapMode
5225
5332
  }));
5226
5333
  const intervals = (0, vue.computed)(() => getDayTimeIntervals({
5227
5334
  startTime: props.startTime,
@@ -5238,7 +5345,8 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5238
5345
  }));
5239
5346
  const rootVars = (0, vue.computed)(() => ({
5240
5347
  "--number-of-days": String(days.value.length),
5241
- "--indicator-offset-index": currentWeekdayIndex.value === -1 ? void 0 : String(currentWeekdayIndex.value + 1)
5348
+ "--indicator-offset-index": currentWeekdayIndex.value === -1 ? void 0 : String(currentWeekdayIndex.value + 1),
5349
+ "--event-raise-delay": `${props.eventOverlapRaiseDelay}ms`
5242
5350
  }));
5243
5351
  /**
5244
5352
  * Everything the template needs per day column.
@@ -5285,7 +5393,8 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5285
5393
  intervalMinutes: () => props.intervalMinutes,
5286
5394
  resizeIntervalMinutes: () => props.eventResizeInterval,
5287
5395
  onEventResize: (data) => emit("eventResize", data),
5288
- canResizeEvent: () => props.canResizeEvent
5396
+ canResizeEvent: () => props.canResizeEvent,
5397
+ withBackgroundEvents: () => Boolean(props.withInteractiveBackgroundEvents)
5289
5398
  });
5290
5399
  const slotDragSelect = useSlotDragSelect({
5291
5400
  enabled: () => withSlotSelect.value,
@@ -5403,12 +5512,17 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5403
5512
  width: `${position.width}%`,
5404
5513
  top: `${position.row * 22}px`
5405
5514
  });
5406
- const backgroundEventStyle = (position) => ({
5407
- top: `${position.top}%`,
5408
- bottom: `${100 - position.top - position.height}%`,
5409
- minHeight: "1px",
5410
- width: "100%"
5411
- });
5515
+ const backgroundEventStyle = (event, date) => {
5516
+ const resizePosition = eventResize.getResizePosition(event.id, (0, dayjs.default)(date).format("YYYY-MM-DD"));
5517
+ const top = resizePosition?.top ?? event.position.top;
5518
+ const height = resizePosition?.height ?? event.position.height;
5519
+ return {
5520
+ top: `${top}%`,
5521
+ bottom: `${100 - top - height}%`,
5522
+ minHeight: "1px",
5523
+ width: "100%"
5524
+ };
5525
+ };
5412
5526
  const regularEventStyle = (event) => {
5413
5527
  const resizePosition = eventResize.getResizePosition(event.id);
5414
5528
  const top = resizePosition?.top ?? event.position.top;
@@ -5419,7 +5533,9 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5419
5533
  bottom: `${100 - top - height}%`,
5420
5534
  minHeight: "1px",
5421
5535
  width: `${event.position.width}%`,
5422
- insetInlineStart: `${event.position.offset}%`
5536
+ insetInlineStart: `${event.position.offset}%`,
5537
+ "--event-z-index": event.position.column + 3,
5538
+ "--event-z-index-raised": event.position.overlaps + 3
5423
5539
  };
5424
5540
  };
5425
5541
  const startEventResize = (event, date, edge, pointerEvent) => {
@@ -5469,7 +5585,10 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5469
5585
  "next-control-props",
5470
5586
  "today-control-props",
5471
5587
  "view-select-props"
5472
- ])) : (0, vue.createCommentVNode)("", true), (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.Box), (0, vue.mergeProps)({ "root-ref": setWeekRoot }, (0, vue.unref)(getStyles)("weekViewRoot", { style: rootVars.value }), { mod: { "with-weekends": (0, vue.unref)(props).withWeekendDays } }), {
5588
+ ])) : (0, vue.createCommentVNode)("", true), (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.Box), (0, vue.mergeProps)({ "root-ref": setWeekRoot }, (0, vue.unref)(getStyles)("weekViewRoot", { style: rootVars.value }), {
5589
+ mod: { "with-weekends": (0, vue.unref)(props).withWeekendDays },
5590
+ "data-event-interaction": (0, vue.unref)(eventResize).isResizing.value || void 0
5591
+ }), {
5473
5592
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.ScrollArea).Autosize, (0, vue.mergeProps)({ "scrollbar-size": 4 }, {
5474
5593
  ...(0, vue.unref)(props).scrollAreaProps,
5475
5594
  ...(0, vue.unref)(getStyles)("weekViewScrollArea")
@@ -5631,12 +5750,20 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5631
5750
  ...eventRenderers.value,
5632
5751
  ...(0, vue.unref)(staticStyles)("weekViewBackgroundEvent")
5633
5752
  }, {
5634
- style: backgroundEventStyle(event.position),
5635
- onEventClick: clickEvent
5753
+ style: backgroundEventStyle(event, column.date),
5754
+ "with-resize": (0, vue.unref)(eventResize).isResizableEvent(event) && !event.position.allDay,
5755
+ "is-resizing": (0, vue.unref)(eventResize).getResizePosition(event.id, column.date) !== null,
5756
+ "resize-handle-props": (0, vue.unref)(staticStyles)("weekViewBackgroundEventResizeHandle"),
5757
+ onEventClick: clickResizableEvent,
5758
+ onResizeStart: (edge, pointerEvent) => startEventResize(event, column.date, edge, pointerEvent)
5636
5759
  }), null, 16, [
5637
5760
  "event",
5638
5761
  "interactive",
5639
- "style"
5762
+ "style",
5763
+ "with-resize",
5764
+ "is-resizing",
5765
+ "resize-handle-props",
5766
+ "onResizeStart"
5640
5767
  ]);
5641
5768
  }), 128)),
5642
5769
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(grouped.value.regularEvents[column.date] || [], (event) => {
@@ -5645,6 +5772,7 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5645
5772
  event,
5646
5773
  "auto-size": "",
5647
5774
  mode: (0, vue.unref)(props).mode,
5775
+ mod: { cascade: (0, vue.unref)(props).eventOverlapMode === "cascade" },
5648
5776
  style: regularEventStyle(event),
5649
5777
  draggable: isDraggableEvent(event),
5650
5778
  "with-resize": (0, vue.unref)(eventResize).isResizableEvent(event),
@@ -5660,6 +5788,7 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5660
5788
  }), null, 16, [
5661
5789
  "event",
5662
5790
  "mode",
5791
+ "mod",
5663
5792
  "style",
5664
5793
  "draggable",
5665
5794
  "with-resize",
@@ -5677,7 +5806,7 @@ var WeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5677
5806
  _: 1
5678
5807
  }, 16, ["viewport-props"])]),
5679
5808
  _: 1
5680
- }, 16, ["mod"])]),
5809
+ }, 16, ["mod", "data-event-interaction"])]),
5681
5810
  _: 1
5682
5811
  }, 16, ["mod"]);
5683
5812
  };
@@ -6381,35 +6510,19 @@ function useHorizontalEventResize(input) {
6381
6510
  (0, vue.onBeforeUnmount)(cleanup);
6382
6511
  return {
6383
6512
  state,
6513
+ get resizingEdge() {
6514
+ return state.value?.edge ?? null;
6515
+ },
6384
6516
  handleResizeStart,
6385
- getResizePosition: (id) => state.value?.event.id === id ? {
6517
+ getResizePosition: (id, eventDate) => state.value?.event.id === id && (eventDate === void 0 || state.value.eventDate === eventDate) ? {
6386
6518
  left: state.value.currentLeft,
6387
6519
  width: state.value.currentWidth
6388
6520
  } : null,
6389
- isResizableEvent: (event) => input.enabled() && input.mode() !== "static" && event.display !== "background" && (input.canResizeEvent()?.(event) ?? true),
6521
+ isResizableEvent: (event) => input.enabled() && input.mode() !== "static" && (event.display !== "background" || input.withBackgroundEvents?.() === true) && (input.canResizeEvent()?.(event) ?? true),
6390
6522
  wasResizing: () => justResized
6391
6523
  };
6392
6524
  }
6393
6525
  //#endregion
6394
- //#region src/components/ResourcesDayView/get-overlap-clusters/get-overlap-clusters.ts
6395
- function getOverlapClusters(events) {
6396
- const sorted = [...events].sort((a, b) => a.position.top - b.position.top);
6397
- const clusters = [];
6398
- let current = [];
6399
- let end = -1;
6400
- sorted.forEach((event) => {
6401
- if (current.length && event.position.top >= end) {
6402
- clusters.push(current);
6403
- current = [];
6404
- end = -1;
6405
- }
6406
- current.push(event);
6407
- end = Math.max(end, event.position.top + event.position.height);
6408
- });
6409
- if (current.length) clusters.push(current);
6410
- return clusters;
6411
- }
6412
- //#endregion
6413
6526
  //#region src/components/ResourcesDayView/get-resources-day-view-events/get-resources-day-view-events.ts
6414
6527
  function getResourcesDayViewEvents({ events, resources, date, startTime, endTime, intervalMinutes }) {
6415
6528
  const result = {
@@ -6507,27 +6620,27 @@ function getResourcesDayViewEvents({ events, resources, date, startTime, endTime
6507
6620
  return result;
6508
6621
  }
6509
6622
  var ResourcesDayView_module_default = {
6510
- resourcesDayView: "_resourcesDayView_wmj51_1",
6511
- resourcesDayViewRoot: "_resourcesDayViewRoot_wmj51_22",
6512
- resourcesDayViewScrollArea: "_resourcesDayViewScrollArea_wmj51_30",
6513
- resourcesDayViewInner: "_resourcesDayViewInner_wmj51_39",
6514
- resourcesDayViewTimeLabelsRow: "_resourcesDayViewTimeLabelsRow_wmj51_44",
6515
- resourcesDayViewCorner: "_resourcesDayViewCorner_wmj51_57",
6516
- resourcesDayViewTimeLabel: "_resourcesDayViewTimeLabel_wmj51_44",
6517
- resourcesDayViewRow: "_resourcesDayViewRow_wmj51_96",
6518
- resourcesDayViewResourceLabel: "_resourcesDayViewResourceLabel_wmj51_100",
6519
- resourcesDayViewGroupColumn: "_resourcesDayViewGroupColumn_wmj51_124",
6520
- resourcesDayViewGroupColumnEmpty: "_resourcesDayViewGroupColumnEmpty_wmj51_125",
6521
- resourcesDayViewRowSlots: "_resourcesDayViewRowSlots_wmj51_153",
6522
- resourcesDayViewRowSlot: "_resourcesDayViewRowSlot_wmj51_153",
6523
- resourcesDayViewCurrentTimeIndicator: "_resourcesDayViewCurrentTimeIndicator_wmj51_231",
6524
- resourcesDayViewCurrentTimeIndicatorLine: "_resourcesDayViewCurrentTimeIndicatorLine_wmj51_243",
6525
- resourcesDayViewCurrentTimeIndicatorThumb: "_resourcesDayViewCurrentTimeIndicatorThumb_wmj51_249",
6526
- resourcesDayViewCurrentTimeIndicatorTimeBubble: "_resourcesDayViewCurrentTimeIndicatorTimeBubble_wmj51_259",
6527
- resourcesDayViewBackgroundEvent: "_resourcesDayViewBackgroundEvent_wmj51_278",
6528
- resourcesDayViewAllDayEvent: "_resourcesDayViewAllDayEvent_wmj51_300",
6529
- resourcesDayViewEventWrapper: "_resourcesDayViewEventWrapper_wmj51_306",
6530
- resourcesDayViewResizeHandle: "_resourcesDayViewResizeHandle_wmj51_310"
6623
+ resourcesDayView: "_resourcesDayView_bsrxh_1",
6624
+ resourcesDayViewRoot: "_resourcesDayViewRoot_bsrxh_22",
6625
+ resourcesDayViewScrollArea: "_resourcesDayViewScrollArea_bsrxh_30",
6626
+ resourcesDayViewInner: "_resourcesDayViewInner_bsrxh_39",
6627
+ resourcesDayViewTimeLabelsRow: "_resourcesDayViewTimeLabelsRow_bsrxh_44",
6628
+ resourcesDayViewCorner: "_resourcesDayViewCorner_bsrxh_57",
6629
+ resourcesDayViewTimeLabel: "_resourcesDayViewTimeLabel_bsrxh_44",
6630
+ resourcesDayViewRow: "_resourcesDayViewRow_bsrxh_96",
6631
+ resourcesDayViewResourceLabel: "_resourcesDayViewResourceLabel_bsrxh_100",
6632
+ resourcesDayViewGroupColumn: "_resourcesDayViewGroupColumn_bsrxh_124",
6633
+ resourcesDayViewGroupColumnEmpty: "_resourcesDayViewGroupColumnEmpty_bsrxh_125",
6634
+ resourcesDayViewRowSlots: "_resourcesDayViewRowSlots_bsrxh_153",
6635
+ resourcesDayViewRowSlot: "_resourcesDayViewRowSlot_bsrxh_153",
6636
+ resourcesDayViewCurrentTimeIndicator: "_resourcesDayViewCurrentTimeIndicator_bsrxh_231",
6637
+ resourcesDayViewCurrentTimeIndicatorLine: "_resourcesDayViewCurrentTimeIndicatorLine_bsrxh_243",
6638
+ resourcesDayViewCurrentTimeIndicatorThumb: "_resourcesDayViewCurrentTimeIndicatorThumb_bsrxh_249",
6639
+ resourcesDayViewCurrentTimeIndicatorTimeBubble: "_resourcesDayViewCurrentTimeIndicatorTimeBubble_bsrxh_259",
6640
+ resourcesDayViewBackgroundEvent: "_resourcesDayViewBackgroundEvent_bsrxh_278",
6641
+ resourcesDayViewAllDayEvent: "_resourcesDayViewAllDayEvent_bsrxh_306",
6642
+ resourcesDayViewEventWrapper: "_resourcesDayViewEventWrapper_bsrxh_312",
6643
+ resourcesDayViewResizeHandle: "_resourcesDayViewResizeHandle_bsrxh_316"
6531
6644
  };
6532
6645
  //#endregion
6533
6646
  //#region src/components/ResourcesDayView/ResourcesDayView.vue?vue&type=script&setup=true&lang.ts
@@ -6789,7 +6902,8 @@ var ResourcesDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6789
6902
  intervalMinutes: () => props.intervalMinutes,
6790
6903
  resizeIntervalMinutes: () => props.eventResizeInterval,
6791
6904
  onEventResize: (data) => emit("eventResize", data),
6792
- canResizeEvent: () => props.canResizeEvent
6905
+ canResizeEvent: () => props.canResizeEvent,
6906
+ withBackgroundEvents: () => Boolean(props.withInteractiveBackgroundEvents)
6793
6907
  });
6794
6908
  (0, vue.onMounted)(async () => {
6795
6909
  if (!props.startScrollTime) return;
@@ -6888,6 +7002,9 @@ var ResourcesDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6888
7002
  const groupInfo = (resourceIndex) => hasGroups.value ? ordered.value.resourceGroupMap[resourceIndex] : void 0;
6889
7003
  const backgroundEvents = (resourceId) => [...positioned.value.backgroundTimedEvents[resourceId] || [], ...positioned.value.backgroundAllDayEvents[resourceId] || []];
6890
7004
  const backgroundEventStyle = (event) => {
7005
+ const resizePosition = resize.getResizePosition(event.id);
7006
+ const left = resizePosition?.left ?? event.position.top;
7007
+ const width = resizePosition?.width ?? event.position.height;
6891
7008
  const colors = theme.value.variantColorResolver({
6892
7009
  color: event.color || theme.value.primaryColor,
6893
7010
  theme: theme.value,
@@ -6895,8 +7012,8 @@ var ResourcesDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
6895
7012
  autoContrast: true
6896
7013
  });
6897
7014
  return {
6898
- left: `${event.position.top}%`,
6899
- right: `${100 - event.position.top - event.position.height}%`,
7015
+ left: `${left}%`,
7016
+ right: `${100 - left - width}%`,
6900
7017
  minWidth: "1px",
6901
7018
  top: 0,
6902
7019
  height: "100%",
@@ -7114,11 +7231,22 @@ var ResourcesDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
7114
7231
  ...(0, vue.unref)(getStyles)("resourcesDayViewBackgroundEvent")
7115
7232
  }, {
7116
7233
  style: backgroundEventStyle(event),
7117
- onEventClick: clickEvent
7234
+ "with-resize": (0, vue.unref)(resize).isResizableEvent(event) && !event.position.allDay,
7235
+ "resize-axis": "horizontal",
7236
+ "is-resizing": (0, vue.unref)(resize).getResizePosition(event.id) !== null,
7237
+ "active-resize-edge": (0, vue.unref)(resize).resizingEdge,
7238
+ "resize-handle-props": (0, vue.unref)(staticStyles)("resourcesDayViewResizeHandle"),
7239
+ onEventClick: clickEvent,
7240
+ onResizeStart: (edge, pointerEvent) => startResize(event, resourceIndex, edge, pointerEvent)
7118
7241
  }), null, 16, [
7119
7242
  "event",
7120
7243
  "interactive",
7121
- "style"
7244
+ "style",
7245
+ "with-resize",
7246
+ "is-resizing",
7247
+ "active-resize-edge",
7248
+ "resize-handle-props",
7249
+ "onResizeStart"
7122
7250
  ])]);
7123
7251
  }), 128)),
7124
7252
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(allDayEvents(resource.id), (event, index) => {
@@ -7370,31 +7498,31 @@ function getResourcesWeekViewEvents({ events, resources, weekdays, startTime, en
7370
7498
  };
7371
7499
  }
7372
7500
  var ResourcesWeekView_module_default = {
7373
- resourcesWeekView: "_resourcesWeekView_1komm_1",
7374
- resourcesWeekViewRoot: "_resourcesWeekViewRoot_1komm_19",
7375
- resourcesWeekViewScrollArea: "_resourcesWeekViewScrollArea_1komm_26",
7376
- resourcesWeekViewInner: "_resourcesWeekViewInner_1komm_34",
7377
- resourcesWeekViewHeaderRows: "_resourcesWeekViewHeaderRows_1komm_39",
7378
- resourcesWeekViewCorner: "_resourcesWeekViewCorner_1komm_48",
7379
- resourcesWeekViewHeaderContent: "_resourcesWeekViewHeaderContent_1komm_63",
7380
- resourcesWeekViewDayLabelsRow: "_resourcesWeekViewDayLabelsRow_1komm_67",
7381
- resourcesWeekViewDayLabel: "_resourcesWeekViewDayLabel_1komm_67",
7382
- resourcesWeekViewTimeLabelsRow: "_resourcesWeekViewTimeLabelsRow_1komm_94",
7383
- resourcesWeekViewTimeLabel: "_resourcesWeekViewTimeLabel_1komm_94",
7384
- resourcesWeekViewRow: "_resourcesWeekViewRow_1komm_121",
7385
- resourcesWeekViewResourceLabel: "_resourcesWeekViewResourceLabel_1komm_125",
7386
- resourcesWeekViewGroupColumn: "_resourcesWeekViewGroupColumn_1komm_149",
7387
- resourcesWeekViewGroupColumnEmpty: "_resourcesWeekViewGroupColumnEmpty_1komm_150",
7388
- resourcesWeekViewRowSlots: "_resourcesWeekViewRowSlots_1komm_178",
7389
- resourcesWeekViewRowSlot: "_resourcesWeekViewRowSlot_1komm_178",
7390
- resourcesWeekViewBackgroundEvent: "_resourcesWeekViewBackgroundEvent_1komm_250",
7391
- resourcesWeekViewAllDayEvent: "_resourcesWeekViewAllDayEvent_1komm_272",
7392
- resourcesWeekViewEventWrapper: "_resourcesWeekViewEventWrapper_1komm_277",
7393
- resourcesWeekViewResizeHandle: "_resourcesWeekViewResizeHandle_1komm_281",
7394
- resourcesWeekViewCurrentTimeIndicator: "_resourcesWeekViewCurrentTimeIndicator_1komm_322",
7395
- resourcesWeekViewCurrentTimeIndicatorLine: "_resourcesWeekViewCurrentTimeIndicatorLine_1komm_334",
7396
- resourcesWeekViewCurrentTimeIndicatorThumb: "_resourcesWeekViewCurrentTimeIndicatorThumb_1komm_340",
7397
- resourcesWeekViewCurrentTimeIndicatorTimeBubble: "_resourcesWeekViewCurrentTimeIndicatorTimeBubble_1komm_350"
7501
+ resourcesWeekView: "_resourcesWeekView_1rg4q_1",
7502
+ resourcesWeekViewRoot: "_resourcesWeekViewRoot_1rg4q_19",
7503
+ resourcesWeekViewScrollArea: "_resourcesWeekViewScrollArea_1rg4q_26",
7504
+ resourcesWeekViewInner: "_resourcesWeekViewInner_1rg4q_34",
7505
+ resourcesWeekViewHeaderRows: "_resourcesWeekViewHeaderRows_1rg4q_39",
7506
+ resourcesWeekViewCorner: "_resourcesWeekViewCorner_1rg4q_48",
7507
+ resourcesWeekViewHeaderContent: "_resourcesWeekViewHeaderContent_1rg4q_63",
7508
+ resourcesWeekViewDayLabelsRow: "_resourcesWeekViewDayLabelsRow_1rg4q_67",
7509
+ resourcesWeekViewDayLabel: "_resourcesWeekViewDayLabel_1rg4q_67",
7510
+ resourcesWeekViewTimeLabelsRow: "_resourcesWeekViewTimeLabelsRow_1rg4q_94",
7511
+ resourcesWeekViewTimeLabel: "_resourcesWeekViewTimeLabel_1rg4q_94",
7512
+ resourcesWeekViewRow: "_resourcesWeekViewRow_1rg4q_121",
7513
+ resourcesWeekViewResourceLabel: "_resourcesWeekViewResourceLabel_1rg4q_125",
7514
+ resourcesWeekViewGroupColumn: "_resourcesWeekViewGroupColumn_1rg4q_149",
7515
+ resourcesWeekViewGroupColumnEmpty: "_resourcesWeekViewGroupColumnEmpty_1rg4q_150",
7516
+ resourcesWeekViewRowSlots: "_resourcesWeekViewRowSlots_1rg4q_178",
7517
+ resourcesWeekViewRowSlot: "_resourcesWeekViewRowSlot_1rg4q_178",
7518
+ resourcesWeekViewBackgroundEvent: "_resourcesWeekViewBackgroundEvent_1rg4q_250",
7519
+ resourcesWeekViewAllDayEvent: "_resourcesWeekViewAllDayEvent_1rg4q_278",
7520
+ resourcesWeekViewEventWrapper: "_resourcesWeekViewEventWrapper_1rg4q_283",
7521
+ resourcesWeekViewResizeHandle: "_resourcesWeekViewResizeHandle_1rg4q_287",
7522
+ resourcesWeekViewCurrentTimeIndicator: "_resourcesWeekViewCurrentTimeIndicator_1rg4q_364",
7523
+ resourcesWeekViewCurrentTimeIndicatorLine: "_resourcesWeekViewCurrentTimeIndicatorLine_1rg4q_376",
7524
+ resourcesWeekViewCurrentTimeIndicatorThumb: "_resourcesWeekViewCurrentTimeIndicatorThumb_1rg4q_382",
7525
+ resourcesWeekViewCurrentTimeIndicatorTimeBubble: "_resourcesWeekViewCurrentTimeIndicatorTimeBubble_1rg4q_392"
7398
7526
  };
7399
7527
  //#endregion
7400
7528
  //#region src/components/ResourcesWeekView/ResourcesWeekView.vue?vue&type=script&setup=true&lang.ts
@@ -7691,7 +7819,8 @@ var ResourcesWeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
7691
7819
  intervalMinutes: () => props.intervalMinutes,
7692
7820
  resizeIntervalMinutes: () => props.eventResizeInterval,
7693
7821
  onEventResize: (data) => emit("eventResize", data),
7694
- canResizeEvent: () => props.canResizeEvent
7822
+ canResizeEvent: () => props.canResizeEvent,
7823
+ withBackgroundEvents: () => Boolean(props.withInteractiveBackgroundEvents)
7695
7824
  });
7696
7825
  (0, vue.onMounted)(async () => {
7697
7826
  if (!props.startScrollDateTime) return;
@@ -7807,7 +7936,10 @@ var ResourcesWeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
7807
7936
  dayIndex
7808
7937
  }));
7809
7938
  });
7810
- const backgroundEventStyle = (event, dayIndex) => {
7939
+ const backgroundEventStyle = (event, day, dayIndex) => {
7940
+ const resizePosition = resize.getResizePosition(event.id, day);
7941
+ const left = resizePosition?.left ?? event.position.top;
7942
+ const width = resizePosition?.width ?? event.position.height;
7811
7943
  const colors = theme.value.variantColorResolver({
7812
7944
  color: event.color || theme.value.primaryColor,
7813
7945
  theme: theme.value,
@@ -7815,8 +7947,8 @@ var ResourcesWeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
7815
7947
  autoContrast: true
7816
7948
  });
7817
7949
  return {
7818
- left: `${dayOffset(dayIndex) + event.position.top / 100 * dayWidth.value}%`,
7819
- right: `${100 - dayOffset(dayIndex) - (event.position.top + event.position.height) / 100 * dayWidth.value}%`,
7950
+ left: `${dayOffset(dayIndex) + left / 100 * dayWidth.value}%`,
7951
+ right: `${100 - dayOffset(dayIndex) - (left + width) / 100 * dayWidth.value}%`,
7820
7952
  minWidth: "1px",
7821
7953
  top: 0,
7822
7954
  height: "100%",
@@ -8068,12 +8200,23 @@ var ResourcesWeekView_default = /* @__PURE__ */ (0, vue.defineComponent)({
8068
8200
  ...eventRenderers.value,
8069
8201
  ...(0, vue.unref)(getStyles)("resourcesWeekViewBackgroundEvent")
8070
8202
  }, {
8071
- style: backgroundEventStyle(entry.event, entry.dayIndex),
8072
- onEventClick: clickEvent
8203
+ style: backgroundEventStyle(entry.event, entry.day, entry.dayIndex),
8204
+ "with-resize": (0, vue.unref)(resize).isResizableEvent(entry.event) && !entry.event.position.allDay,
8205
+ "resize-axis": "horizontal",
8206
+ "is-resizing": (0, vue.unref)(resize).getResizePosition(entry.event.id, entry.day) !== null,
8207
+ "active-resize-edge": (0, vue.unref)(resize).resizingEdge,
8208
+ "resize-handle-props": (0, vue.unref)(staticStyles)("resourcesWeekViewResizeHandle"),
8209
+ onEventClick: clickEvent,
8210
+ onResizeStart: (edge, pointerEvent) => startResize(entry.event, entry.day, entry.dayIndex, resourceIndex, edge, pointerEvent)
8073
8211
  }), null, 16, [
8074
8212
  "event",
8075
8213
  "interactive",
8076
- "style"
8214
+ "style",
8215
+ "with-resize",
8216
+ "is-resizing",
8217
+ "active-resize-edge",
8218
+ "resize-handle-props",
8219
+ "onResizeStart"
8077
8220
  ])]);
8078
8221
  }), 128)),
8079
8222
  ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(allDayBars(resource.id), (bar) => {
@@ -9358,6 +9501,7 @@ exports.ScheduleHeaderToday = ScheduleHeaderToday;
9358
9501
  exports.ViewSelect = ViewSelect;
9359
9502
  exports.WeekView = WeekView;
9360
9503
  exports.YearView = YearView;
9504
+ exports.applyCascadeLayout = applyCascadeLayout;
9361
9505
  exports.calculateDropTime = calculateDropTime;
9362
9506
  exports.calculateMonthDropDate = calculateMonthDropDate;
9363
9507
  exports.clampIntervalMinutes = clampIntervalMinutes;