@mantine/schedule 9.6.3 → 9.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/DayView/DayView.cjs +46 -31
- package/cjs/components/DayView/DayView.cjs.map +1 -1
- package/cjs/components/DayView/DayView.module.cjs.map +1 -1
- package/cjs/components/MonthView/MonthView.cjs +11 -4
- package/cjs/components/MonthView/MonthView.cjs.map +1 -1
- package/cjs/components/MonthView/get-month-view-events/get-month-positioned-events.cjs +10 -8
- package/cjs/components/MonthView/get-month-view-events/get-month-positioned-events.cjs.map +1 -1
- package/cjs/components/MonthView/get-month-view-events/reserve-row.cjs +12 -0
- package/cjs/components/MonthView/get-month-view-events/reserve-row.cjs.map +1 -0
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs +75 -60
- package/cjs/components/ResourcesDayView/ResourcesDayView.cjs.map +1 -1
- package/cjs/components/ResourcesDayView/ResourcesDayView.module.cjs.map +1 -1
- package/cjs/components/ResourcesMonthView/ResourcesMonthView.cjs +19 -7
- package/cjs/components/ResourcesMonthView/ResourcesMonthView.cjs.map +1 -1
- package/cjs/components/ResourcesSchedule/ResourcesSchedule.cjs +6 -1
- package/cjs/components/ResourcesSchedule/ResourcesSchedule.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs +85 -58
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.cjs.map +1 -1
- package/cjs/components/ResourcesWeekView/ResourcesWeekView.module.cjs.map +1 -1
- package/cjs/components/Schedule/Schedule.cjs +14 -1
- package/cjs/components/Schedule/Schedule.cjs.map +1 -1
- package/cjs/components/ScheduleEvent/ScheduleEvent.module.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.cjs +70 -46
- package/cjs/components/WeekView/WeekView.cjs.map +1 -1
- package/cjs/components/WeekView/WeekView.module.cjs.map +1 -1
- package/cjs/hooks/use-day-grid-event-resize.cjs +38 -8
- package/cjs/hooks/use-day-grid-event-resize.cjs.map +1 -1
- package/cjs/hooks/use-drag-drop-handlers.cjs +126 -10
- package/cjs/hooks/use-drag-drop-handlers.cjs.map +1 -1
- package/cjs/hooks/use-event-resize.cjs +36 -12
- package/cjs/hooks/use-event-resize.cjs.map +1 -1
- package/cjs/hooks/use-horizontal-event-resize.cjs +37 -12
- package/cjs/hooks/use-horizontal-event-resize.cjs.map +1 -1
- package/cjs/hooks/validate-event-resize.cjs +37 -0
- package/cjs/hooks/validate-event-resize.cjs.map +1 -0
- package/cjs/index.cjs +2 -0
- package/cjs/utils/is-event-placement-allowed/is-event-placement-allowed.cjs +52 -0
- package/cjs/utils/is-event-placement-allowed/is-event-placement-allowed.cjs.map +1 -0
- package/esm/components/DayView/DayView.mjs +46 -31
- package/esm/components/DayView/DayView.mjs.map +1 -1
- package/esm/components/DayView/DayView.module.mjs.map +1 -1
- package/esm/components/MonthView/MonthView.mjs +11 -4
- package/esm/components/MonthView/MonthView.mjs.map +1 -1
- package/esm/components/MonthView/get-month-view-events/get-month-positioned-events.mjs +10 -8
- package/esm/components/MonthView/get-month-view-events/get-month-positioned-events.mjs.map +1 -1
- package/esm/components/MonthView/get-month-view-events/reserve-row.mjs +12 -0
- package/esm/components/MonthView/get-month-view-events/reserve-row.mjs.map +1 -0
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs +75 -60
- package/esm/components/ResourcesDayView/ResourcesDayView.mjs.map +1 -1
- package/esm/components/ResourcesDayView/ResourcesDayView.module.mjs.map +1 -1
- package/esm/components/ResourcesMonthView/ResourcesMonthView.mjs +19 -7
- package/esm/components/ResourcesMonthView/ResourcesMonthView.mjs.map +1 -1
- package/esm/components/ResourcesSchedule/ResourcesSchedule.mjs +6 -1
- package/esm/components/ResourcesSchedule/ResourcesSchedule.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs +85 -58
- package/esm/components/ResourcesWeekView/ResourcesWeekView.mjs.map +1 -1
- package/esm/components/ResourcesWeekView/ResourcesWeekView.module.mjs.map +1 -1
- package/esm/components/Schedule/Schedule.mjs +14 -1
- package/esm/components/Schedule/Schedule.mjs.map +1 -1
- package/esm/components/ScheduleEvent/ScheduleEvent.module.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.mjs +70 -46
- package/esm/components/WeekView/WeekView.mjs.map +1 -1
- package/esm/components/WeekView/WeekView.module.mjs.map +1 -1
- package/esm/hooks/use-day-grid-event-resize.mjs +38 -8
- package/esm/hooks/use-day-grid-event-resize.mjs.map +1 -1
- package/esm/hooks/use-drag-drop-handlers.mjs +126 -10
- package/esm/hooks/use-drag-drop-handlers.mjs.map +1 -1
- package/esm/hooks/use-event-resize.mjs +36 -12
- package/esm/hooks/use-event-resize.mjs.map +1 -1
- package/esm/hooks/use-horizontal-event-resize.mjs +37 -12
- package/esm/hooks/use-horizontal-event-resize.mjs.map +1 -1
- package/esm/hooks/validate-event-resize.mjs +37 -0
- package/esm/hooks/validate-event-resize.mjs.map +1 -0
- package/esm/index.mjs +2 -1
- package/esm/utils/is-event-placement-allowed/is-event-placement-allowed.mjs +50 -0
- package/esm/utils/is-event-placement-allowed/is-event-placement-allowed.mjs.map +1 -0
- package/lib/components/DayView/DayView.d.ts +11 -1
- package/lib/components/MonthView/MonthView.d.ts +9 -1
- package/lib/components/MonthView/get-month-view-events/reserve-row.d.ts +7 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +11 -1
- package/lib/components/ResourcesMonthView/ResourcesMonthView.d.ts +11 -1
- package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +12 -2
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +11 -1
- package/lib/components/Schedule/Schedule.d.ts +12 -2
- package/lib/components/WeekView/WeekView.d.ts +11 -1
- package/lib/hooks/use-day-grid-event-resize.d.ts +4 -2
- package/lib/hooks/use-drag-drop-handlers.d.ts +17 -1
- package/lib/hooks/use-event-resize.d.ts +4 -2
- package/lib/hooks/use-horizontal-event-resize.d.ts +4 -2
- package/lib/hooks/validate-event-resize.d.ts +33 -0
- package/lib/types.d.ts +65 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/is-event-placement-allowed/is-event-placement-allowed.d.ts +22 -0
- package/package.json +6 -6
- package/styles.css +29 -0
- package/styles.layer.css +29 -0
- package/cjs/components/MonthView/get-month-view-events/find-available-row.cjs +0 -18
- package/cjs/components/MonthView/get-month-view-events/find-available-row.cjs.map +0 -1
- package/esm/components/MonthView/get-month-view-events/find-available-row.mjs +0 -16
- package/esm/components/MonthView/get-month-view-events/find-available-row.mjs.map +0 -1
- package/lib/components/MonthView/get-month-view-events/find-available-row.d.ts +0 -10
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DateTimeStringValue, PreventEventOverlap, ScheduleEventData } from '../../types';
|
|
2
|
+
export interface IsEventPlacementAllowedInput {
|
|
3
|
+
/** Event that is being moved or resized */
|
|
4
|
+
event: ScheduleEventData;
|
|
5
|
+
/** Candidate start of the event */
|
|
6
|
+
start: DateTimeStringValue;
|
|
7
|
+
/** Candidate end of the event */
|
|
8
|
+
end: DateTimeStringValue;
|
|
9
|
+
/** Events the candidate range is checked against */
|
|
10
|
+
events: ScheduleEventData[];
|
|
11
|
+
/** If set, placements that overlap another event are rejected */
|
|
12
|
+
preventEventOverlap?: PreventEventOverlap;
|
|
13
|
+
/** Target resource, limits the check to events of that resource */
|
|
14
|
+
resourceId?: string | number;
|
|
15
|
+
}
|
|
16
|
+
export interface IsEventPlacementAllowedResult {
|
|
17
|
+
/** True if the candidate range does not conflict with any event */
|
|
18
|
+
allowed: boolean;
|
|
19
|
+
/** Events the candidate range collided with */
|
|
20
|
+
conflicts: ScheduleEventData[];
|
|
21
|
+
}
|
|
22
|
+
export declare function isEventPlacementAllowed({ event, start, end, events, preventEventOverlap, resourceId, }: IsEventPlacementAllowedInput): IsEventPlacementAllowedResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/schedule",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"description": "Schedule Mantine component",
|
|
5
5
|
"homepage": "https://mantine.dev/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"directory": "packages/@mantine/schedule"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@mantine/core": "9.
|
|
39
|
-
"@mantine/dates": "9.
|
|
40
|
-
"@mantine/hooks": "9.
|
|
38
|
+
"@mantine/core": "9.7.1",
|
|
39
|
+
"@mantine/dates": "9.7.1",
|
|
40
|
+
"@mantine/hooks": "9.7.1",
|
|
41
41
|
"react": "^19.2.0",
|
|
42
42
|
"react-dom": "^19.2.0"
|
|
43
43
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@mantine/dates": "workspace:*",
|
|
51
51
|
"@mantine/hooks": "workspace:*",
|
|
52
52
|
"dayjs": "^1.11.23",
|
|
53
|
-
"react": "19.
|
|
54
|
-
"react-dom": "19.
|
|
53
|
+
"react": "19.3.0",
|
|
54
|
+
"react-dom": "19.3.0"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/styles.css
CHANGED
|
@@ -194,6 +194,11 @@
|
|
|
194
194
|
cursor: grabbing;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
.m_1ac94670:where([data-invalid]) .m_71699dc6 {
|
|
198
|
+
border: 1px solid var(--mantine-color-error);
|
|
199
|
+
opacity: 0.6;
|
|
200
|
+
}
|
|
201
|
+
|
|
197
202
|
.m_1ac94670:where([data-dragging]) {
|
|
198
203
|
opacity: 0.2;
|
|
199
204
|
}
|
|
@@ -1084,6 +1089,12 @@
|
|
|
1084
1089
|
opacity: 0.6;
|
|
1085
1090
|
}
|
|
1086
1091
|
|
|
1092
|
+
.m_2d4819df:where([data-invalid]) {
|
|
1093
|
+
border-color: var(--mantine-color-error);
|
|
1094
|
+
background-color: transparent;
|
|
1095
|
+
opacity: 0.4;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1087
1098
|
.m_70d87f99 {
|
|
1088
1099
|
--mobile-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
1089
1100
|
--week-numbers-offset: 0rem;
|
|
@@ -2216,6 +2227,12 @@
|
|
|
2216
2227
|
opacity: 0.6;
|
|
2217
2228
|
}
|
|
2218
2229
|
|
|
2230
|
+
.m_e0da287:where([data-invalid]) {
|
|
2231
|
+
border-color: var(--mantine-color-error);
|
|
2232
|
+
background-color: transparent;
|
|
2233
|
+
opacity: 0.4;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2219
2236
|
.m_7301354d {
|
|
2220
2237
|
--year-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
2221
2238
|
--year-view-font-size: var(--mantine-font-size-sm);
|
|
@@ -3093,6 +3110,12 @@
|
|
|
3093
3110
|
opacity: 0.6;
|
|
3094
3111
|
}
|
|
3095
3112
|
|
|
3113
|
+
.m_969d1c27:where([data-invalid]) {
|
|
3114
|
+
border-color: var(--mantine-color-error);
|
|
3115
|
+
background-color: transparent;
|
|
3116
|
+
opacity: 0.4;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3096
3119
|
.m_ed4c47cf {
|
|
3097
3120
|
--resources-week-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
3098
3121
|
--resources-week-view-resource-label-width: calc(7.5rem * var(--mantine-scale));
|
|
@@ -3647,6 +3670,12 @@
|
|
|
3647
3670
|
opacity: 0.6;
|
|
3648
3671
|
}
|
|
3649
3672
|
|
|
3673
|
+
.m_27f284a5:where([data-invalid]) {
|
|
3674
|
+
border-color: var(--mantine-color-error);
|
|
3675
|
+
background-color: transparent;
|
|
3676
|
+
opacity: 0.4;
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3650
3679
|
.m_652b3acd {
|
|
3651
3680
|
--resources-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
3652
3681
|
--resources-month-view-resource-label-width: calc(7.5rem * var(--mantine-scale));
|
package/styles.layer.css
CHANGED
|
@@ -194,6 +194,11 @@
|
|
|
194
194
|
cursor: grabbing;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
.m_1ac94670:where([data-invalid]) .m_71699dc6 {
|
|
198
|
+
border: 1px solid var(--mantine-color-error);
|
|
199
|
+
opacity: 0.6;
|
|
200
|
+
}
|
|
201
|
+
|
|
197
202
|
.m_1ac94670:where([data-dragging]) {
|
|
198
203
|
opacity: 0.2;
|
|
199
204
|
}
|
|
@@ -1084,6 +1089,12 @@
|
|
|
1084
1089
|
opacity: 0.6;
|
|
1085
1090
|
}
|
|
1086
1091
|
|
|
1092
|
+
.m_2d4819df:where([data-invalid]) {
|
|
1093
|
+
border-color: var(--mantine-color-error);
|
|
1094
|
+
background-color: transparent;
|
|
1095
|
+
opacity: 0.4;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1087
1098
|
.m_70d87f99 {
|
|
1088
1099
|
--mobile-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
1089
1100
|
--week-numbers-offset: 0rem;
|
|
@@ -2216,6 +2227,12 @@
|
|
|
2216
2227
|
opacity: 0.6;
|
|
2217
2228
|
}
|
|
2218
2229
|
|
|
2230
|
+
.m_e0da287:where([data-invalid]) {
|
|
2231
|
+
border-color: var(--mantine-color-error);
|
|
2232
|
+
background-color: transparent;
|
|
2233
|
+
opacity: 0.4;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2219
2236
|
.m_7301354d {
|
|
2220
2237
|
--year-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
2221
2238
|
--year-view-font-size: var(--mantine-font-size-sm);
|
|
@@ -3093,6 +3110,12 @@
|
|
|
3093
3110
|
opacity: 0.6;
|
|
3094
3111
|
}
|
|
3095
3112
|
|
|
3113
|
+
.m_969d1c27:where([data-invalid]) {
|
|
3114
|
+
border-color: var(--mantine-color-error);
|
|
3115
|
+
background-color: transparent;
|
|
3116
|
+
opacity: 0.4;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3096
3119
|
.m_ed4c47cf {
|
|
3097
3120
|
--resources-week-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
3098
3121
|
--resources-week-view-resource-label-width: calc(7.5rem * var(--mantine-scale));
|
|
@@ -3647,6 +3670,12 @@
|
|
|
3647
3670
|
opacity: 0.6;
|
|
3648
3671
|
}
|
|
3649
3672
|
|
|
3673
|
+
.m_27f284a5:where([data-invalid]) {
|
|
3674
|
+
border-color: var(--mantine-color-error);
|
|
3675
|
+
background-color: transparent;
|
|
3676
|
+
opacity: 0.4;
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3650
3679
|
.m_652b3acd {
|
|
3651
3680
|
--resources-month-view-radius: var(--schedule-radius, var(--mantine-radius-default));
|
|
3652
3681
|
--resources-month-view-resource-label-width: calc(7.5rem * var(--mantine-scale));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let dayjs = require("dayjs");
|
|
4
|
-
dayjs = require_runtime.__toESM(dayjs);
|
|
5
|
-
//#region packages/@mantine/schedule/src/components/MonthView/get-month-view-events/find-available-row.ts
|
|
6
|
-
function findAvailableRow({ existingEvents, startDayIndex, daysSpanned, weekStart }) {
|
|
7
|
-
let row = 0;
|
|
8
|
-
for (const existing of existingEvents) {
|
|
9
|
-
const existingStart = (0, dayjs.default)(existing.start).startOf("day");
|
|
10
|
-
const existingDayIndex = (existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, "day") ? weekStart : existingStart).diff(weekStart, "day");
|
|
11
|
-
if (existingDayIndex + (existing.position?.width || 0) / 100 * 7 > startDayIndex && existingDayIndex < startDayIndex + daysSpanned) row = Math.max(row, (existing.position?.row || 0) + 1);
|
|
12
|
-
}
|
|
13
|
-
return row;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.findAvailableRow = findAvailableRow;
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=find-available-row.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-available-row.cjs","names":[],"sources":["../../../../src/components/MonthView/get-month-view-events/find-available-row.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport { MonthPositionedEventData } from '../../../types';\n\ninterface FindAvailableRowInput {\n existingEvents: MonthPositionedEventData[];\n startDayIndex: number;\n daysSpanned: number;\n weekStart: dayjs.Dayjs;\n}\n\nexport function findAvailableRow({\n existingEvents,\n startDayIndex,\n daysSpanned,\n weekStart,\n}: FindAvailableRowInput): number {\n let row = 0;\n\n for (const existing of existingEvents) {\n const existingStart = dayjs(existing.start).startOf('day');\n const existingDisplayStart =\n existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, 'day')\n ? weekStart\n : existingStart;\n const existingDayIndex = existingDisplayStart.diff(weekStart, 'day');\n const existingWidth = existing.position?.width || 0;\n const existingDaysSpanned = (existingWidth / 100) * 7;\n\n if (\n existingDayIndex + existingDaysSpanned > startDayIndex &&\n existingDayIndex < startDayIndex + daysSpanned\n ) {\n row = Math.max(row, (existing.position?.row || 0) + 1);\n }\n }\n\n return row;\n}\n"],"mappings":";;;;;AAUA,SAAgB,iBAAiB,EAC/B,gBACA,eACA,aACA,aACgC;CAChC,IAAI,MAAM;CAEV,KAAK,MAAM,YAAY,gBAAgB;EACrC,MAAM,iBAAA,GAAgB,MAAA,QAAA,CAAM,SAAS,KAAK,CAAC,CAAC,QAAQ,KAAK;EAKzD,MAAM,oBAHJ,cAAc,SAAS,SAAS,KAAK,cAAc,OAAO,WAAW,KAAK,IACtE,YACA,cAAA,CACwC,KAAK,WAAW,KAAK;EAInE,IACE,oBAJoB,SAAS,UAAU,SAAS,KACL,MAAO,IAGT,iBACzC,mBAAmB,gBAAgB,aAEnC,MAAM,KAAK,IAAI,MAAM,SAAS,UAAU,OAAO,KAAK,CAAC;CAEzD;CAEA,OAAO;AACT"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import dayjs from "dayjs";
|
|
3
|
-
//#region packages/@mantine/schedule/src/components/MonthView/get-month-view-events/find-available-row.ts
|
|
4
|
-
function findAvailableRow({ existingEvents, startDayIndex, daysSpanned, weekStart }) {
|
|
5
|
-
let row = 0;
|
|
6
|
-
for (const existing of existingEvents) {
|
|
7
|
-
const existingStart = dayjs(existing.start).startOf("day");
|
|
8
|
-
const existingDayIndex = (existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, "day") ? weekStart : existingStart).diff(weekStart, "day");
|
|
9
|
-
if (existingDayIndex + (existing.position?.width || 0) / 100 * 7 > startDayIndex && existingDayIndex < startDayIndex + daysSpanned) row = Math.max(row, (existing.position?.row || 0) + 1);
|
|
10
|
-
}
|
|
11
|
-
return row;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { findAvailableRow };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=find-available-row.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-available-row.mjs","names":[],"sources":["../../../../src/components/MonthView/get-month-view-events/find-available-row.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport { MonthPositionedEventData } from '../../../types';\n\ninterface FindAvailableRowInput {\n existingEvents: MonthPositionedEventData[];\n startDayIndex: number;\n daysSpanned: number;\n weekStart: dayjs.Dayjs;\n}\n\nexport function findAvailableRow({\n existingEvents,\n startDayIndex,\n daysSpanned,\n weekStart,\n}: FindAvailableRowInput): number {\n let row = 0;\n\n for (const existing of existingEvents) {\n const existingStart = dayjs(existing.start).startOf('day');\n const existingDisplayStart =\n existingStart.isBefore(weekStart) || existingStart.isSame(weekStart, 'day')\n ? weekStart\n : existingStart;\n const existingDayIndex = existingDisplayStart.diff(weekStart, 'day');\n const existingWidth = existing.position?.width || 0;\n const existingDaysSpanned = (existingWidth / 100) * 7;\n\n if (\n existingDayIndex + existingDaysSpanned > startDayIndex &&\n existingDayIndex < startDayIndex + daysSpanned\n ) {\n row = Math.max(row, (existing.position?.row || 0) + 1);\n }\n }\n\n return row;\n}\n"],"mappings":";;;AAUA,SAAgB,iBAAiB,EAC/B,gBACA,eACA,aACA,aACgC;CAChC,IAAI,MAAM;CAEV,KAAK,MAAM,YAAY,gBAAgB;EACrC,MAAM,gBAAgB,MAAM,SAAS,KAAK,CAAC,CAAC,QAAQ,KAAK;EAKzD,MAAM,oBAHJ,cAAc,SAAS,SAAS,KAAK,cAAc,OAAO,WAAW,KAAK,IACtE,YACA,cAAA,CACwC,KAAK,WAAW,KAAK;EAInE,IACE,oBAJoB,SAAS,UAAU,SAAS,KACL,MAAO,IAGT,iBACzC,mBAAmB,gBAAgB,aAEnC,MAAM,KAAK,IAAI,MAAM,SAAS,UAAU,OAAO,KAAK,CAAC;CAEzD;CAEA,OAAO;AACT"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import { MonthPositionedEventData } from '../../../types';
|
|
3
|
-
interface FindAvailableRowInput {
|
|
4
|
-
existingEvents: MonthPositionedEventData[];
|
|
5
|
-
startDayIndex: number;
|
|
6
|
-
daysSpanned: number;
|
|
7
|
-
weekStart: dayjs.Dayjs;
|
|
8
|
-
}
|
|
9
|
-
export declare function findAvailableRow({ existingEvents, startDayIndex, daysSpanned, weekStart, }: FindAvailableRowInput): number;
|
|
10
|
-
export {};
|